nop mov rdi, [buf] ; EPILOGUE call _free %ifdef OUTPUT_LAST_CELL lea rdi, [strbuf64] ; snprintf(strbuf64,64,LCRformatstr,maxp-buf) mov esi, 64 lea rdx, [LCRformatstr] mov rcx, qword [maxp] sub rcx, qword [buf] call _snprintf mov edi, 2 lea rsi, [strbuf64] mov edx, eax call _write %endif %ifdef HEATMAP mov ebx, 0 ;loop counter hmloop: lea rdi, [strbuf64] ; snprintf(strbuf64,64,HMformatstr,ebx /*counter*/,r12[rbx]) mov esi, 64 lea rdx, [HMformatstr] mov ecx, ebx mov r8d, dword [r12+4*rbx] xor eax, eax call _snprintf mov edi, 2 lea rsi, [strbuf64] mov edx, eax call _write inc ebx cmp ebx, SOURCE_LENGTH jl hmloop %endif xor eax, eax mainend: pop r12 pop rbx mov rsp, rbp pop rbp ret nomem: mov edi, 2 lea rsi, [nomemstr] mov rdx, nomemstr.len call _write mov eax, 1 jmp mainend section .data sectalign 8 nomemstr: db "Out of memory!" .len: equ $-nomemstr %ifdef OUTPUT_LAST_CELL LCRformatstr: db "Last cell reached: %d", 10, 0 align 8, db 0 maxp: dq 0 %endif %ifdef HEATMAP HMformatstr: db "%d %d", 10, 0 %endif section .bss sectalign 8 buf: resq 1 strbuf64: resb 64