Last active
December 5, 2018 07:15
-
-
Save CryZe/a10bd2468da29e2bc74c621b924332a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
day_05::part1: | |
push rsi | |
mov eax, 16392 | |
call __chkstk | |
sub rsp, rax | |
mov byte, ptr, [rsp, +, 2], 0 | |
mov word, ptr, [rsp], 0 | |
xor eax, eax | |
test rcx, rcx | |
je .LBB4_15 | |
lea r8, [rip, +, __unnamed_2] | |
xor r9d, r9d | |
xor r10d, r10d | |
xor esi, esi | |
.LBB4_2: | |
mov edx, esi | |
movzx esi, byte, ptr, [rax, +, r8] | |
xor dl, 32 | |
cmp dl, sil | |
jne .LBB4_8 | |
test r10w, r10w | |
je .LBB4_5 | |
add r10d, -1 | |
mov word, ptr, [rsp], r10w | |
mov r9d, r10d | |
.LBB4_5: | |
movzx r10d, r9w | |
xor esi, esi | |
mov rdx, r10 | |
sub rdx, 1 | |
jb .LBB4_10 | |
cmp rdx, r10 | |
jae .LBB4_10 | |
movzx esi, byte, ptr, [rsp, +, rdx, +, 3] | |
jmp .LBB4_10 | |
.LBB4_8: | |
movzx r11d, r10w | |
cmp r11d, 16383 | |
ja .LBB4_11 | |
mov byte, ptr, [rsp, +, r11, +, 3], sil | |
lea r9d, [r11, +, 1] | |
mov word, ptr, [rsp], r9w | |
.LBB4_10: | |
mov r10d, r9d | |
.LBB4_11: | |
add rax, 1 | |
cmp rcx, rax | |
jne .LBB4_2 | |
test r9w, r9w | |
je .LBB4_13 | |
movzx eax, r9w | |
mov word, ptr, [rsp], 0 | |
.LBB4_15: | |
add rsp, 16392 | |
pop rsi | |
ret | |
.LBB4_13: | |
xor eax, eax | |
add rsp, 16392 | |
pop rsi | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment