LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/VeeeectorPan[P]MyNetdisk/clientSrc/recv_n_bytes.c
// Function: recv_n_bytes
int recv_n_bytes(int sock_fd,void* buf,int len)
{
    int total = 0;
    while(total < len)
    {
        int ret = recv(sock_fd,buf,len - total,0);
        if(ret == 0)
        {
            return -1;
        }
        total += ret;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4df5
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movslq %eax, %rdx
xorl %ecx, %ecx
callq 0x2080
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x4dea
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4dfc
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x4db9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/sender.c
// Function: get_timeout
uint32_t get_timeout(void) {
	/* Select waits until either the socket is ready for reading or the
	 * timeout expires. If the window is full or if we've reached EOF on the
	 * file, we can't write any more data right now and we should block,
	 * albeit at *most* until the closest timer in the window expires. */
	if ((window_full(w) && !window_empty(w)) || sent_eof) {
		uint32_t timer = pkt_get_timestamp(window_peek_min_timestamp(w));
		uint32_t now = get_monotime();
		/* select doesn't like negative timeouts, and we can't return
		 * a negative number through an unsigned type anyway */
		if (timer > now) {
			return timer - now;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x4779(%rip), %rdi      # 0x7578
callq 0x2960
testb $0x1, %al
jne 0x2e0a
jmp 0x2e1c
movq 0x4767(%rip), %rdi      # 0x7578
callq 0x2a00
testb $0x1, %al
jne 0x2e1c
jmp 0x2e25
testb $0x1, 0x475d(%rip)      # 0x7580
je 0x2e59
movq 0x474c(%rip), %rdi      # 0x7578
callq 0x2c70
movq %rax, %rdi
callq 0x19d0
movl %eax, -0x8(%rbp)
callq 0x23b0
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x2e57
movl -0x8(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2e60
jmp 0x2e59
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/sender.c
// Function: handle_ack
void handle_ack(pkt_t *ack) {
	/* The seqnum field has the next sequence number expected by the receiver.
	 * The timestamp field corresponds to the last packet received by the receiver. */

	/* Whether the packet with the given timestamp has been popped from the buffer. */
	bool popped_timestamp = false;

	/* ACKs are cumulative so we can remove from the buffer all packets that
	 * have a smaller sequence number. */
	pkt_t *min_seqnum = window_peek_min_seqnum(w);
	while (min_seqnum != NULL && pkt_get_seqnum(min_seqnum) < pkt_get_seqnum(ack)) {
		assert(window_pop_min_seqnum(w) == min_seqnum);
		log_msg("Removed packet #%d from buffer\n", pkt_get_seqnum(min_seqnum));

		if (pkt_get_timestamp(min_seqnum) == pkt_get_timestamp(ack)) {
			popped_timestamp = true;
		}

		pkt_del(min_seqnum);
		min_seqnum = window_peek_min_seqnum(w);
	}

	window_slide_to(w, pkt_get_seqnum(ack));

	if (!popped_timestamp) {
		pkt_t *last = window_pop_timestamp(w, pkt_get_timestamp(ack));
		if (last == NULL) {
			log_msg("No packet with matching timestamp in buffer\n");
		} else {
			log_msg("Acking packet #%d from timestamp field, removed from buffer\n",
				pkt_get_seqnum(last));
		}
		pkt_del(last);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq 0x46f1(%rip), %rdi      # 0x7578
callq 0x2d70
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x21(%rbp)
je 0x2ec4
movq -0x18(%rbp), %rdi
callq 0x19b0
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movb %al, %cl
movl -0x28(%rbp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x2ed0
jmp 0x2f5d
movq 0x46a1(%rip), %rdi      # 0x7578
callq 0x2dc0
cmpq -0x18(%rbp), %rax
jne 0x2ee4
jmp 0x2f03
leaq 0x1311(%rip), %rdi      # 0x41fc
leaq 0x1331(%rip), %rsi      # 0x4223
movl $0x39, %edx
leaq 0x1332(%rip), %rcx      # 0x4230
callq 0x10f0
movq -0x18(%rbp), %rdi
callq 0x19b0
movzbl %al, %esi
leaq 0x1333(%rip), %rdi      # 0x4249
movb $0x0, %al
callq 0x1ce0
movq -0x18(%rbp), %rdi
callq 0x19d0
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19d0
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jne 0x2f3f
movb $0x1, -0x9(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1370
movq 0x4629(%rip), %rdi      # 0x7578
callq 0x2d70
movq %rax, -0x18(%rbp)
jmp 0x2e90
movq 0x4614(%rip), %rax      # 0x7578
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq -0x38(%rbp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x2710
testb $0x1, -0x9(%rbp)
jne 0x2fe2
movq 0x45ec(%rip), %rax      # 0x7578
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19d0
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0x2b80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2fbf
leaq 0x12b3(%rip), %rdi      # 0x4269
movb $0x0, %al
callq 0x1ce0
jmp 0x2fd9
movq -0x20(%rbp), %rdi
callq 0x19b0
movzbl %al, %esi
leaq 0x12c4(%rip), %rdi      # 0x4296
movb $0x0, %al
callq 0x1ce0
movq -0x20(%rbp), %rdi
callq 0x1370
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/sender.c
// Function: handle_nack
void handle_nack(pkt_t *nack) {
	if (!window_has(w, pkt_get_seqnum(nack))) {
		log_msg("Out of window, ignoring\n");
		return;
	}

	pkt_t *match = window_find_seqnum(w, pkt_get_seqnum(nack));
	if (match == NULL) {
		log_msg("No packet with matching seqnum in buffer\n");
		return;
	}

	/* Set the timer of the corresponding packet to the current time
	 * so that it will be resent immediately (retransmit_packets calls
	 * get_monotime after this). */
	pkt_set_timestamp(match, get_monotime());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq 0x4575(%rip), %rax      # 0x7578
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq -0x18(%rbp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x2760
testb $0x1, %al
jne 0x3032
leaq 0x12aa(%rip), %rdi      # 0x42d3
movb $0x0, %al
callq 0x1ce0
jmp 0x3087
movq 0x453f(%rip), %rax      # 0x7578
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x2a20
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x306f
leaq 0x1286(%rip), %rdi      # 0x42ec
movb $0x0, %al
callq 0x1ce0
jmp 0x3087
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x23b0
movq -0x28(%rbp), %rdi
movl %eax, %esi
callq 0x1bc0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/sender.c
// Function: retransmit_packets
void retransmit_packets(void) {
	uint32_t loop_now = get_monotime();
	pkt_t *pkt = window_peek_min_timestamp(w);

	while (pkt != NULL && pkt_get_timestamp(pkt) <= loop_now) {
		/* Don't put this outside the loop! Would defeat its purpose. */
		uint32_t now = get_monotime();

		/* Reschedule the retransmission of the packet in case it fails again */
		if (window_update_timestamp(w, pkt_get_timestamp(pkt), now + TIMER) == -1) {
			exit_msg("Cannot update timestamp of packet\n");
		}

		/* Resend it now */
		if (send_packet(sockfd, pkt) == -1) {
			exit_perror("send");
		}

		/* The packet was in the buffer already so nothing else to do */

		log_msg("> RETR %s\n", pkt_repr(pkt));
		pkt = window_peek_min_timestamp(w);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x23b0
movl %eax, -0x4(%rbp)
movq 0x44d1(%rip), %rdi      # 0x7578
callq 0x2c70
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x15(%rbp)
je 0x30ce
movq -0x10(%rbp), %rdi
callq 0x19d0
cmpl -0x4(%rbp), %eax
setbe %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x30da
jmp 0x316c
callq 0x23b0
movl %eax, -0x14(%rbp)
movq 0x448f(%rip), %rax      # 0x7578
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19d0
movq -0x20(%rbp), %rdi
movl %eax, %esi
movl -0x14(%rbp), %edx
addl $0x44aa20, %edx         # imm = 0x44AA20
callq 0x2a90
cmpl $-0x1, %eax
jne 0x311d
leaq 0x1200(%rip), %rdi      # 0x4316
movb $0x0, %al
callq 0x1db0
movl 0x4019(%rip), %edi      # 0x713c
movq -0x10(%rbp), %rsi
callq 0x2340
cmpl $-0x1, %eax
jne 0x313d
leaq 0x1201(%rip), %rdi      # 0x4339
callq 0x1e60
movq -0x10(%rbp), %rdi
callq 0x1f00
movq %rax, %rsi
leaq 0x11ee(%rip), %rdi      # 0x433e
movb $0x0, %al
callq 0x1ce0
movq 0x441a(%rip), %rdi      # 0x7578
callq 0x2c70
movq %rax, -0x10(%rbp)
jmp 0x30b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vsee[P]openCLFeatureExtract/oclFeatureExt.cpp
// Function: checkAddrSpace(unsigned int, FeatureStats&)
bool checkAddrSpace(const unsigned addrSpaceId, FeatureStats &stats) {
    if(addrSpaceId == localAddressSpace) {
        stats.localMemAcc++;
        return true;
    } else if(addrSpaceId == globalAddressSpace) {
        stats.globalMemAcc++;
        return true;
    } else if(addrSpaceId == privateAddressSpace) {
        stats.privateMemAcc++;
        return true;
    } else {
        errs() << "WARNING: unhandled address space id: " << addrSpaceId << "\n";
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x59b8
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5a1c
cmpl $0x2, -0x8(%rbp)
jne 0x59d1
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5a1c
cmpl $0x0, -0x8(%rbp)
jne 0x59ea
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5a1c
callq 0x3370
movq %rax, %rdi
leaq 0x6785(%rip), %rsi      # 0xc17e
callq 0x60a0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x6bf0
movq %rax, %rdi
leaq 0x6769(%rip), %rsi      # 0xc17c
callq 0x60a0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vsee[P]openCLFeatureExtract/oclFeatureExt.cpp
// Function: InputParser::getCmdOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const string& getCmdOption(const string &option) const{
            vector<string>::const_iterator itr;
            itr =  find(this->tokens.begin(), this->tokens.end(), option);
            if (itr != this->tokens.end() && ++itr != this->tokens.end()){
                return *itr;
            }
            static const string empty = "";
            return empty;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8390
movq -0x68(%rbp), %rdi
callq 0x7e90
movq -0x68(%rbp), %rdi
movq %rax, -0x30(%rbp)
callq 0x7ec0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7e40
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x7ec0
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x7e00
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x5d(%rbp)
jne 0x5e53
jmp 0x5e7d
leaq -0x20(%rbp), %rdi
callq 0x8200
movq -0x68(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x7ec0
movq -0x70(%rbp), %rdi
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x7e00
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x5e86
jmp 0x5e98
leaq -0x20(%rbp), %rdi
callq 0x82b0
movq %rax, -0x8(%rbp)
jmp 0x5f37
cmpb $0x0, 0xd4d1(%rip)      # 0x13370
jne 0x5f07
leaq 0xd4c8(%rip), %rdi      # 0x13370
callq 0x3300
cmpl $0x0, %eax
je 0x5f07
leaq -0x49(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x31c0
movq -0x78(%rbp), %rdx
leaq 0xd486(%rip), %rdi      # 0x13350
leaq 0x62ac(%rip), %rsi      # 0xc17d
callq 0x5ab0
jmp 0x5ed8
leaq -0x49(%rbp), %rdi
callq 0x3030
movq 0xd110(%rip), %rdi      # 0x12ff8
leaq 0xd461(%rip), %rsi      # 0x13350
leaq 0xd32a(%rip), %rdx      # 0x13220
callq 0x3190
leaq 0xd46e(%rip), %rdi      # 0x13370
callq 0x3340
leaq 0xd442(%rip), %rax      # 0x13350
movq %rax, -0x8(%rbp)
jmp 0x5f37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x3030
leaq 0xd440(%rip), %rdi      # 0x13370
callq 0x30e0
jmp 0x5f44
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3130
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/x86_interpreter.c
// Function: print_regs
void print_regs(FILE* fp) {
	fprintf(fp, "   EAX:%08"PRIx32" EBX:%08"PRIx32" ECX:%08"PRIx32" EDX:%08"PRIx32"\n",
		regs[EAX], regs[EBX], regs[ECX], regs[EDX]);
	fprintf(fp, "   ESI:%08"PRIx32" EDI:%08"PRIx32" ESP:%08"PRIx32" EBP:%08"PRIx32"\n",
		regs[ESI], regs[EDI], regs[ESP], regs[EBP]);
	fprintf(fp, "   EIP:%08"PRIx32"\n", eip);
	fprintf(fp, "EFLAGS:%08"PRIx32
		" (CF[%c] PF[%c] AF[%c] ZF[%c] SF[%c] IF[%c] DF[%c] OF[%c])\n", eflags,
		eflags & CF ? 'x' : ' ', eflags & PF ? 'x' : ' ', eflags & AF ? 'x' : ' ',
		eflags & ZF ? 'x' : ' ', eflags & SF ? 'x' : ' ', eflags & IF ? 'x' : ' ',
		eflags & DF ? 'x' : ' ', eflags & OF ? 'x' : ' ');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl 0x13ef5(%rip), %edx     # 0x151c0
movl 0x13efb(%rip), %ecx     # 0x151cc
movl 0x13eec(%rip), %r8d     # 0x151c4
movl 0x13ee9(%rip), %r9d     # 0x151c8
leaq 0x1008a(%rip), %rsi     # 0x11370
movb $0x0, %al
callq 0x10d0
movq -0x20(%rbp), %rdi
movl 0x13ee1(%rip), %edx     # 0x151d8
movl 0x13edf(%rip), %ecx     # 0x151dc
movl 0x13ecc(%rip), %r8d     # 0x151d0
movl 0x13ec9(%rip), %r9d     # 0x151d4
leaq 0x10086(%rip), %rsi     # 0x11398
movb $0x0, %al
callq 0x10d0
movq -0x20(%rbp), %rdi
movl 0x13ebd(%rip), %edx     # 0x151e0
leaq 0x10096(%rip), %rsi     # 0x113c0
movb $0x0, %al
callq 0x10d0
movq -0x20(%rbp), %rdi
movl 0x13ea9(%rip), %edx     # 0x151e4
movl 0x13ea3(%rip), %esi     # 0x151e4
andl $0x1, %esi
movl $0x20, %ecx
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %ecx
movl 0x13e8a(%rip), %esi     # 0x151e4
andl $0x4, %esi
movl $0x20, %r8d
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %r8d
movl 0x13e6f(%rip), %esi     # 0x151e4
andl $0x10, %esi
movl $0x20, %r9d
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %r9d
movl 0x13e54(%rip), %esi     # 0x151e4
andl $0x40, %esi
movl $0x20, %r14d
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %r14d
movl 0x13e39(%rip), %esi     # 0x151e4
andl $0x80, %esi
movl $0x20, %ebx
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %ebx
movl 0x13e1d(%rip), %esi     # 0x151e4
andl $0x200, %esi            # imm = 0x200
movl $0x20, %r11d
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %r11d
movl 0x13dff(%rip), %esi     # 0x151e4
andl $0x400, %esi            # imm = 0x400
movl $0x20, %r10d
movl $0x78, %eax
cmpl $0x0, %esi
cmovnel %eax, %r10d
movl 0x13de0(%rip), %r15d    # 0x151e4
andl $0x800, %r15d           # imm = 0x800
movl $0x20, %eax
movl $0x78, %esi
cmpl $0x0, %r15d
cmovnel %esi, %eax
leaq 0xffaa(%rip), %rsi      # 0x113cd
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x10d0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/x86_interpreter.c
// Function: memory_access
int memory_access(uint8_t* data_read, uint32_t addr, uint8_t data, int we) {
	if (dmemory_is_allocated(addr, 1)) {
		if (we) dmemory_write(&data, addr, 1);
		dmemory_read(data_read, addr, 1);
		return 1;
	} else {
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb %al, -0x15(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x14(%rbp), %edi
movl $0x1, %esi
callq 0x7f60
cmpl $0x0, %eax
je 0x14aa
cmpl $0x0, -0x1c(%rbp)
je 0x1490
movl -0x14(%rbp), %esi
leaq -0x15(%rbp), %rdi
movl $0x1, %edx
callq 0x7ad0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x7890
movl $0x1, -0x4(%rbp)
jmp 0x14b1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/x86_interpreter.c
// Function: step_memwrite
static int step_memwrite(uint32_t inst_addr, int segment, uint32_t addr, uint32_t value, int size) {
	int i;
	if (UINT32_MAX - segment_offsets[segment] < addr ||
	(size <= 0 || UINT32_MAX - (segment_offsets[segment] + addr) < (uint32_t)(size - 1))) {
		return 0;
	}
	for (i = 0; i < size; i++) {
		uint32_t this_addr = segment_offsets[segment] + addr + i;
		uint8_t dummy_read;
		if (!memory_access(&dummy_read, this_addr, (value >> (i * 8)) & 0xff, 1)) {
			fprintf(stderr, "failed to write memory %08"PRIx32" at %08"PRIx32"\n\n", this_addr, inst_addr);
			print_regs(stderr);
			return 0;
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movslq -0xc(%rbp), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0xe888(%rip), %rcx      # 0x15210
subl (%rcx,%rdx,4), %eax
cmpl -0x10(%rbp), %eax
jb 0x69b8
cmpl $0x0, -0x18(%rbp)
jle 0x69b8
movslq -0xc(%rbp), %rcx
leaq 0xe86f(%rip), %rax      # 0x15210
movl (%rax,%rcx,4), %ecx
addl -0x10(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x69c4
movl $0x0, -0x4(%rbp)
jmp 0x6a64
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x6a5d
movslq -0xc(%rbp), %rcx
leaq 0xe82e(%rip), %rax      # 0x15210
movl (%rax,%rcx,4), %eax
addl -0x10(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %esi
movl -0x14(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
leaq -0x21(%rbp), %rdi
movl $0x1, %ecx
movzbl %al, %edx
callq 0x1450
cmpl $0x0, %eax
jne 0x6a4d
movq 0xe5d2(%rip), %rax      # 0x14ff0
movq (%rax), %rdi
movl -0x20(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq 0xb15d(%rip), %rsi      # 0x11b8b
movb $0x0, %al
callq 0x10d0
movq 0xe5b4(%rip), %rax      # 0x14ff0
movq (%rax), %rdi
callq 0x12b0
movl $0x0, -0x4(%rbp)
jmp 0x6a64
jmp 0x6a4f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x69cb
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/x86_interpreter.c
// Function: step_push
static int step_push(uint32_t inst_addr, uint32_t value, int op_width, int is_addr_16bit) {
	uint32_t addr = regs[ESP];
	if (is_addr_16bit) addr &= 0xffff;
	addr -= op_width;
	if (!step_memwrite(inst_addr, SS, addr, value, op_width)) return 0;
	if (is_addr_16bit) {
		regs[ESP] = (regs[ESP] & UINT32_C(0xffff0000)) | (addr & 0xffff);
	} else {
		regs[ESP] = addr;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl 0xe746(%rip), %eax      # 0x151d0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x6a9e
movl -0x18(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %edi
movl -0x18(%rbp), %edx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
movl $0x2, %esi
callq 0x6960
cmpl $0x0, %eax
jne 0x6ace
movl $0x0, -0x4(%rbp)
jmp 0x6b02
cmpl $0x0, -0x14(%rbp)
je 0x6af2
movl 0xe6f6(%rip), %eax      # 0x151d0
andl $0xffff0000, %eax       # imm = 0xFFFF0000
movl -0x18(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
orl %ecx, %eax
movl %eax, 0xe6e0(%rip)      # 0x151d0
jmp 0x6afb
movl -0x18(%rbp), %eax
movl %eax, 0xe6d5(%rip)      # 0x151d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/x86_interpreter.c
// Function: step_pop
static uint32_t step_pop(int* success, uint32_t inst_addr, int op_width, int is_addr_16bit) {
	int memread_ok = 0;
	uint32_t next_esp;
	uint32_t value = step_memread(&memread_ok, inst_addr, SS,
		is_addr_16bit ? regs[ESP] & 0xffff : regs[ESP], op_width);
	if (!memread_ok) {
		*success = 0;
		return 0;
	}
	next_esp = regs[ESP] + op_width;
	if (is_addr_16bit) {
		regs[ESP] = (regs[ESP] & UINT32_C(0xffff0000)) | (next_esp & 0xffff);
	} else {
		regs[ESP] = next_esp;
	}
	*success = 1;
	return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6b48
movl 0xe692(%rip), %eax      # 0x151d0
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x30(%rbp)
jmp 0x6b51
movl 0xe682(%rip), %eax      # 0x151d0
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %ecx
movl -0x18(%rbp), %r8d
leaq -0x20(%rbp), %rdi
movl $0x2, %edx
callq 0x67d0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x6b85
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6bce
movl 0xe645(%rip), %eax      # 0x151d0
addl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6bb5
movl 0xe633(%rip), %eax      # 0x151d0
andl $0xffff0000, %eax       # imm = 0xFFFF0000
movl -0x24(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
orl %ecx, %eax
movl %eax, 0xe61d(%rip)      # 0x151d0
jmp 0x6bbe
movl -0x24(%rbp), %eax
movl %eax, 0xe612(%rip)      # 0x151d0
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dynamic_memory.c
// Function: get_idxs
static int get_idxs(int* fidx_s, int* sidx_s, int* fidx_e, int* sidx_e, uint32_t addr, uint32_t size) {
	if (size == 0) return 0;
	size--;
	if (size > UINT32_MAX - addr) return 0;
	*fidx_s = (addr >> FIRST_TABLE_SHIFT) % FIRST_TABLE_SIZE;
	*sidx_s = (addr >> SECOND_TABLE_SHIFT) % SECOND_TABLE_SIZE;
	*fidx_e = ((addr + size) >> FIRST_TABLE_SHIFT) % FIRST_TABLE_SIZE;
	*sidx_e = ((addr + size) >> SECOND_TABLE_SHIFT) % SECOND_TABLE_SIZE;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x7a4b
movl $0x0, -0x4(%rbp)
jmp 0x7ac1
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl -0x2c(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x7a6c
movl $0x0, -0x4(%rbp)
jmp 0x7ac1
movl -0x2c(%rbp), %ecx
shrl $0x16, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
addl -0x30(%rbp), %ecx
shrl $0x16, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %ecx
addl -0x30(%rbp), %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dynamic_memory.c
// Function: dmemory_deallocate
void dmemory_deallocate(uint32_t addr, uint32_t size) {
	int fidx_s, sidx_s, fidx_e, sidx_e;
	if (!get_idxs(&fidx_s, &sidx_s, &fidx_e, &sidx_e, addr, size)) return;
	int i, j;
	for (i = fidx_s; i <= fidx_e; i++) {
		int jmin = (i == fidx_s ? sidx_s : 0);
		int jmax = (i == fidx_e ? sidx_e : SECOND_TABLE_SIZE - 1);
		if (aut_table[i] != NULL) {
			for (j = jmin; j <= jmax; j++) {
				free((*aut_table[i])[j]);
				(*aut_table[i])[j] = NULL;
			}
			if (jmin == 0 && jmax == SECOND_TABLE_SIZE - 1) {
				free(aut_table[i]);
				aut_table[i] = NULL;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %r8d
movl -0x8(%rbp), %r9d
leaq -0xc(%rbp), %rdi
leaq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdx
leaq -0x18(%rbp), %rcx
callq 0x7a20
cmpl $0x0, %eax
jne 0x7e55
jmp 0x7f52
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x7f52
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x7e77
movl -0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x7e7e
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7e7e
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x7e94
movl -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x7e9e
movl $0x3ff, %eax            # imm = 0x3FF
movl %eax, -0x30(%rbp)
jmp 0x7e9e
movl -0x30(%rbp), %eax
movl %eax, -0x28(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0xd381(%rip), %rax      # 0x15230
cmpq $0x0, (%rax,%rcx,8)
je 0x7f42
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x28(%rbp), %eax
jg 0x7f0a
movslq -0x1c(%rbp), %rcx
leaq 0xd35d(%rip), %rax      # 0x15230
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1030
movslq -0x1c(%rbp), %rcx
leaq 0xd341(%rip), %rax      # 0x15230
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7ec0
cmpl $0x0, -0x24(%rbp)
jne 0x7f40
cmpl $0x3ff, -0x28(%rbp)     # imm = 0x3FF
jne 0x7f40
movslq -0x1c(%rbp), %rcx
leaq 0xd30c(%rip), %rax      # 0x15230
movq (%rax,%rcx,8), %rdi
callq 0x1030
movslq -0x1c(%rbp), %rcx
leaq 0xd2f8(%rip), %rax      # 0x15230
movq $0x0, (%rax,%rcx,8)
jmp 0x7f42
jmp 0x7f44
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7e5b
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dynamic_memory.c
// Function: dmemory_is_allocated
int dmemory_is_allocated(uint32_t addr, uint32_t size) {
	int fidx_s, sidx_s, fidx_e, sidx_e;
	if (size == 0) return 1;
	if (!get_idxs(&fidx_s, &sidx_s, &fidx_e, &sidx_e, addr, size)) return 0;
	int i, j;
	for (i = fidx_s; i <= fidx_e; i++) {
		int jmin = (i == fidx_s ? sidx_s : 0);
		int jmax = (i == fidx_e ? sidx_e : SECOND_TABLE_SIZE - 1);
		for (j = jmin; j <= jmax; j++) {
			if (aut_table[i] == NULL || (*aut_table[i])[j] == NULL) return 0;
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x7f80
movl $0x1, -0x4(%rbp)
jmp 0x8064
movl -0x8(%rbp), %r8d
movl -0xc(%rbp), %r9d
leaq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
callq 0x7a20
cmpl $0x0, %eax
jne 0x7fae
movl $0x0, -0x4(%rbp)
jmp 0x8064
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x805d
movl -0x20(%rbp), %eax
cmpl -0x10(%rbp), %eax
jne 0x7fd0
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x7fd7
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x7fd7
movl -0x30(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x7fed
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x7ff7
movl $0x3ff, %eax            # imm = 0x3FF
movl %eax, -0x34(%rbp)
jmp 0x7ff7
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x804d
movslq -0x20(%rbp), %rcx
leaq 0xd21a(%rip), %rax      # 0x15230
cmpq $0x0, (%rax,%rcx,8)
je 0x8037
movslq -0x20(%rbp), %rcx
leaq 0xd208(%rip), %rax      # 0x15230
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x8040
movl $0x0, -0x4(%rbp)
jmp 0x8064
jmp 0x8042
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8003
jmp 0x804f
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7fb4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_utils.c
// Function: dmem_write_uint
int dmem_write_uint(uint32_t addr, uint32_t value, int size) {
	uint8_t buffer[4];
	int i;
	if (size < 0 || 4 < size) return 0;
	if (!dmemory_is_allocated(addr, size)) return 0;
	for (i = 0; i < size; i++) buffer[i] = (value >> (8 * i)) & 0xff;
	dmemory_write(buffer, addr, size);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x8091
movl $0x4, %eax
cmpl -0x10(%rbp), %eax
jge 0x809a
movl $0x0, -0x4(%rbp)
jmp 0x80fd
movl -0x8(%rbp), %edi
movl -0x10(%rbp), %esi
callq 0x7f60
cmpl $0x0, %eax
jne 0x80b3
movl $0x0, -0x4(%rbp)
jmp 0x80fd
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x80e7
movl -0xc(%rbp), %eax
movl -0x18(%rbp), %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
movb %al, %cl
movslq -0x18(%rbp), %rax
movb %cl, -0x14(%rbp,%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x80ba
leaq -0x14(%rbp), %rdi
movl -0x8(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x7ad0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_utils.c
// Function: dmem_read_uint
uint32_t dmem_read_uint(int* ok, uint32_t addr, int size) {
	uint8_t buffer[4];
	uint32_t res = 0;
	int i;
	if (ok != NULL) *ok = 0;
	if (size < 0 || 4 < size) return 0;
	if (!dmemory_is_allocated(addr, size)) return 0;
	dmemory_read(buffer, addr ,size);
	for (i = 0; i < size; i++) res |= buffer[i] << (8 * i);
	if (ok != NULL) *ok = 1;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x813a
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
cmpl $0x0, -0x18(%rbp)
jl 0x814a
movl $0x4, %eax
cmpl -0x18(%rbp), %eax
jge 0x8153
movl $0x0, -0x4(%rbp)
jmp 0x81c3
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x7f60
cmpl $0x0, %eax
jne 0x816c
movl $0x0, -0x4(%rbp)
jmp 0x81c3
leaq -0x1c(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x7890
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x81ac
movslq -0x24(%rbp), %rax
movzbl -0x1c(%rbp,%rax), %eax
movl -0x24(%rbp), %ecx
shll $0x3, %ecx
shll %cl, %eax
orl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8182
cmpq $0x0, -0x10(%rbp)
je 0x81bd
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_utils.c
// Function: dmem_read_string
char* dmem_read_string(uint32_t addr) {
	uint32_t size = 0;
	uint8_t test_value;
	char* ret;
	/* 文字列の範囲を調べる(終端のNULを含む) */
	do {
		if (!dmemory_is_allocated(addr + size, 1)) return NULL;
		dmemory_read(&test_value, addr + size, 1);
		if (size == UINT32_MAX) return NULL;
		size++;
	} while (test_value != 0);
	/* 調べた範囲を読み込む */
	ret = malloc(size);
	if (ret == NULL) return NULL;
	dmemory_read(ret, addr, size);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %edi
addl -0x10(%rbp), %edi
movl $0x1, %esi
callq 0x7f60
cmpl $0x0, %eax
jne 0x8201
movq $0x0, -0x8(%rbp)
jmp 0x826d
movl -0xc(%rbp), %esi
addl -0x10(%rbp), %esi
leaq -0x11(%rbp), %rdi
movl $0x1, %edx
callq 0x7890
cmpl $-0x1, -0x10(%rbp)
jne 0x8225
movq $0x0, -0x8(%rbp)
jmp 0x826d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x81e2
movl -0x10(%rbp), %eax
movl %eax, %edi
callq 0x1110
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x8256
movq $0x0, -0x8(%rbp)
jmp 0x826d
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x7890
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_utils.c
// Function: dmem_get_args
int dmem_get_args(uint32_t esp, int num, ...) {
	va_list args;
	int ok = 1;
	int i;
	uint32_t addr = esp;
	va_start(args, num);
	for (i = 0; ok && i < num; i++) {
		uint32_t* dest = va_arg(args, uint32_t*);
		if (UINT32_MAX - addr < 4) {
			ok = 0;
			break;
		}
		addr += 4;
		*dest = dmem_read_uint(&ok, addr, 4);
	}
	va_end(args);
	return ok;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x82bb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movl $0x0, -0x28(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0xf1(%rbp)
je 0x8332
movl -0x28(%rbp), %eax
cmpl -0x8(%rbp), %eax
setl %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x8341
jmp 0x83ed
leaq -0x20(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xf8(%rbp)
cmpl $0x28, %eax
ja 0x837c
movq -0x100(%rbp), %rcx
movl -0xf8(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x8399
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl -0x2c(%rbp), %eax
cmpl $0x4, %eax
jae 0x83bd
movl $0x0, -0x24(%rbp)
jmp 0x83ed
movl -0x2c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
leaq -0x24(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8315
movl -0x24(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdio.c
// Function: dmem_libc_stdio_initialize
int dmem_libc_stdio_initialize(uint32_t iob_addr_in) {
	int i;
	iob_addr = iob_addr_in;
	for (i = 0; i < IOB_SIZE; i++) {
		file_info[i].fp = NULL;
		file_info[i].is_standard = 0;
		file_info[i].can_read = 0;
		file_info[i].can_write = 0;
		file_info[i].previous_operation = POP_NONE;
	}
	file_info[0].fp = stdin;
	file_info[0].is_standard = 1;
	file_info[0].can_read = 1;
	file_info[1].fp = stdout;
	file_info[1].is_standard = 1;
	file_info[1].can_write = 1;
	file_info[2].fp = stderr;
	file_info[2].is_standard = 1;
	file_info[2].can_write = 1;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0xee20(%rip)      # 0x17230
movl $0x0, -0x8(%rbp)
cmpl $0x80, -0x8(%rbp)
jge 0x84af
movslq -0x8(%rbp), %rcx
leaq 0xee11(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movslq -0x8(%rbp), %rcx
leaq 0xedf8(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movslq -0x8(%rbp), %rcx
leaq 0xeddf(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movslq -0x8(%rbp), %rcx
leaq 0xedc6(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movslq -0x8(%rbp), %rcx
leaq 0xedad(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8417
movq 0xcb1a(%rip), %rax      # 0x14fd0
movq (%rax), %rax
movq %rax, 0xed80(%rip)      # 0x17240
movl $0x1, 0xed7e(%rip)      # 0x17248
movl $0x1, 0xed78(%rip)      # 0x1724c
movq 0xcaed(%rip), %rax      # 0x14fc8
movq (%rax), %rax
movq %rax, 0xed73(%rip)      # 0x17258
movl $0x1, 0xed71(%rip)      # 0x17260
movl $0x1, 0xed6f(%rip)      # 0x17268
movq 0xcaf0(%rip), %rax      # 0x14ff0
movq (%rax), %rax
movq %rax, 0xed66(%rip)      # 0x17270
movl $0x1, 0xed64(%rip)      # 0x17278
movl $0x1, 0xed62(%rip)      # 0x17280
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdio.c
// Function: file_ptr_to_info
static file_info_t* file_ptr_to_info(uint32_t file_ptr) {
	uint32_t delta;
	if (file_ptr < iob_addr) return NULL;
	delta = file_ptr - iob_addr;
	if (delta % BYTE_PER_IOB_FILE != 0) return NULL;
	delta /= BYTE_PER_IOB_FILE;
	return delta < IOB_SIZE ? &file_info[delta] : NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xebd0(%rip), %eax      # 0x17230
jae 0x866c
movq $0x0, -0x8(%rbp)
jmp 0x86c8
movl -0xc(%rbp), %eax
subl 0xebbb(%rip), %eax      # 0x17230
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0x1f, %eax
cmpl $0x0, %eax
je 0x868d
movq $0x0, -0x8(%rbp)
jmp 0x86c8
movl -0x10(%rbp), %eax
shrl $0x5, %eax
movl %eax, -0x10(%rbp)
cmpl $0x80, -0x10(%rbp)
jae 0x86b8
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0xeb95(%rip), %rax      # 0x17240
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x86c0
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x86c0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdio.c
// Function: info_to_file_ptr
static uint32_t info_to_file_ptr(const file_info_t* info) {
	ptrdiff_t delta = info - file_info;
	uint32_t addr_delta;
	if (delta < 0 || UINT32_MAX / BYTE_PER_IOB_FILE < (uint32_t)delta) return 0;
	addr_delta = BYTE_PER_IOB_FILE * (uint32_t)delta;
	if (UINT32_MAX - iob_addr < addr_delta) return 0;
	return iob_addr + addr_delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xe57d(%rip), %rcx      # 0x17240
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0x8cea
movq -0x18(%rbp), %rax
movl %eax, %ecx
movl $0x7ffffff, %eax        # imm = 0x7FFFFFF
cmpl %ecx, %eax
jae 0x8cf3
movl $0x0, -0x4(%rbp)
jmp 0x8d22
movq -0x18(%rbp), %rax
shll $0x5, %eax
movl %eax, -0x1c(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl 0xe528(%rip), %eax      # 0x17230
cmpl -0x1c(%rbp), %eax
jae 0x8d16
movl $0x0, -0x4(%rbp)
jmp 0x8d22
movl 0xe514(%rip), %eax      # 0x17230
addl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdio.c
// Function: integer_to_string
static uint32_t integer_to_string(char* dest, uint32_t value,
uint32_t least_digits, uint32_t radix, const char* digits) {
	char buffer[64];
	char *p = buffer + (sizeof(buffer) / sizeof(*buffer));
	uint32_t digit_cnt = 0;
	uint32_t i;
	/* 変換する */
	while (value > 0 || least_digits > 0) {
		*(--p) = digits[value % radix];
		value /= radix;
		if (least_digits > 0) least_digits--;
		digit_cnt++;
	}
	/* 結果を書き込む */
	for (i = 0; i < digit_cnt; i++) dest[i] = p[i];
	return digit_cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
leaq -0x60(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movb $0x1, %al
cmpl $0x0, -0xc(%rbp)
movb %al, -0x71(%rbp)
ja 0xaaed
cmpl $0x0, -0x10(%rbp)
seta %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0xaaf6
jmp 0xab48
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0xc(%rbp), %eax
xorl %edx, %edx
divl -0x14(%rbp)
movq -0x80(%rbp), %rax
movl %edx, %ecx
movb (%rax,%rcx), %cl
movq -0x68(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x68(%rbp)
movb %cl, -0x1(%rax)
movl -0x14(%rbp), %ecx
movl -0xc(%rbp), %eax
xorl %edx, %edx
divl %ecx
movl %eax, -0xc(%rbp)
cmpl $0x0, -0x10(%rbp)
jbe 0xab3d
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0xaad8
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jae 0xab76
movq -0x68(%rbp), %rax
movl -0x70(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x70(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0xab4f
movl -0x6c(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdlib.c
// Function: dmem_libc_stdlib_initialize
int dmem_libc_stdlib_initialize(uint32_t heap_start_addr) {
	if (heap_start_addr % HEAP_ALIGN != 0) {
		uint32_t delta = HEAP_ALIGN - heap_start_addr % HEAP_ALIGN;
		if (UINT32_MAX - delta < heap_start_addr) return 0;
		heap_start = heap_start_addr + delta;
	} else {
		heap_start = heap_start_addr;
	}
	if (heap_start == 0) heap_start = HEAP_ALIGN;
	heap_info_head = NULL;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
je 0xabc6
movl -0x8(%rbp), %ecx
andl $0x3f, %ecx
movl $0x40, %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0xabb8
movl $0x0, -0x4(%rbp)
jmp 0xabf4
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, 0xd27c(%rip)      # 0x17e40
jmp 0xabcf
movl -0x8(%rbp), %eax
movl %eax, 0xd271(%rip)      # 0x17e40
cmpl $0x0, 0xd26a(%rip)      # 0x17e40
jne 0xabe2
movl $0x40, 0xd25e(%rip)     # 0x17e40
movq $0x0, 0xd25b(%rip) # 0x17e48
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdlib.c
// Function: dmem_libc_calloc
int dmem_libc_calloc(uint32_t* ret, uint32_t esp) {
	uint32_t num, elem_size;
	if (!dmem_get_args(esp, 2, &num, &elem_size)) return 0;
	if (num > 0 && UINT32_MAX / num < elem_size) {
		*ret = 0;
	} else {
		size_t size = elem_size * num;
		char* buf = malloc(size);
		*ret = malloc_core(size);
		if (buf != NULL) {
			memset(buf, 0, size);
			dmemory_write(buf, *ret, size);
			free(buf);
		} else {
			size_t i;
			uint8_t cbuf = 0;
			for (i = 0; i < size; i++) {
				dmemory_write(&cbuf, (*ret) + i, 1);
			}
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
movl $0x2, %esi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
movb $0x0, %al
callq 0x8280
cmpl $0x0, %eax
jne 0xac37
movl $0x0, -0x4(%rbp)
jmp 0xad07
cmpl $0x0, -0x18(%rbp)
jbe 0xac5b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x18(%rbp)
cmpl -0x1c(%rbp), %eax
jae 0xac5b
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0xad00
movl -0x1c(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1110
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl %eax, %edi
callq 0xad10
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0xacbe
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x10a0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x28(%rbp), %rax
movl %eax, %edx
callq 0x7ad0
movq -0x30(%rbp), %rdi
callq 0x1030
jmp 0xacfe
movb $0x0, -0x39(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xacfc
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq -0x38(%rbp), %rax
movl %eax, %esi
leaq -0x39(%rbp), %rdi
movl $0x1, %edx
callq 0x7ad0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xacca
jmp 0xacfe
jmp 0xad00
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdlib.c
// Function: free_core
static int free_core(uint32_t addr_to_free) {
	heap_info_t* prev_ptr = NULL;
	heap_info_t* ptr = heap_info_head;
	uint32_t addr = heap_start;
	if (addr_to_free == 0) return 1;
	while (ptr != NULL) {
		if (ptr->used && addr == addr_to_free) {
			ptr->used = 0;
			if (prev_ptr != NULL && !prev_ptr->used) {
				/* 空き領域を統合する */
				prev_ptr->size += ptr->size;
				prev_ptr->next = ptr->next;
				free(ptr);
			}
			return 1;
		}
		addr += ptr->size;
		prev_ptr = ptr;
		ptr = ptr->next;
	}
	/* 該当の領域が見つからなかった */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq 0xcf2e(%rip), %rax      # 0x17e48
movq %rax, -0x18(%rbp)
movl 0xcf1c(%rip), %eax      # 0x17e40
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xaf39
movl $0x1, -0x4(%rbp)
jmp 0xafd0
jmp 0xaf3b
cmpq $0x0, -0x18(%rbp)
je 0xafc9
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xafa4
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0xafa4
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
cmpq $0x0, -0x10(%rbp)
je 0xaf9b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xaf9b
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x1030
movl $0x1, -0x4(%rbp)
jmp 0xafd0
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xaf3b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_stdlib.c
// Function: dmem_libc_malloc
int dmem_libc_malloc(uint32_t* ret, uint32_t esp) {
	uint32_t size;
	if (!dmem_get_args(esp, 1, &size)) return 0;
	*ret = malloc_core(size);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
movl $0x1, %esi
leaq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x8280
cmpl $0x0, %eax
jne 0xb010
movl $0x0, -0x4(%rbp)
jmp 0xb027
movl -0x18(%rbp), %edi
callq 0xad10
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_string.c
// Function: dmem_libc_memcpy
int dmem_libc_memcpy(uint32_t* ret, uint32_t esp) {
	uint32_t dest, src, size;
	char* buf;
	if (!dmem_get_args(esp, 3, &dest, &src, &size)) return 0;
	if (!dmemory_is_allocated(src, size) || !dmemory_is_allocated(dest, size)) return 0;

	buf = malloc(size);
	if (buf == NULL) return 0;
	dmemory_read(buf, src, size);
	dmemory_write(buf, dest, size);
	*ret = dest;
	free(buf);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %edi
movl $0x3, %esi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
movb $0x0, %al
callq 0x8280
cmpl $0x0, %eax
jne 0xb368
movl $0x0, -0x4(%rbp)
jmp 0xb3e6
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0x7f60
cmpl $0x0, %eax
je 0xb388
movl -0x18(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0x7f60
cmpl $0x0, %eax
jne 0xb391
movl $0x0, -0x4(%rbp)
jmp 0xb3e6
movl -0x20(%rbp), %eax
movl %eax, %edi
callq 0x1110
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xb3af
movl $0x0, -0x4(%rbp)
jmp 0xb3e6
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x7890
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x20(%rbp), %edx
callq 0x7ad0
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x1030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop