LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_write_domainname
static int ns_write_domainname(serialize_ctx *ctx, stream_t *s, char *name)
{
	if (name != NULL && strlen(name) > 0) {
		if (ctx && ctx->compression) {
			return ns_write_domainname_comp(ctx, s, name);
		}
		else {
			return ns_write_domainname_nocomp(ctx, s, name);
		}
	}
	else {

		if (stream_writei8(s, 0) != 1)
			return -1;

		return 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %rbx
testq %rdx, %rdx
je 0x1a815
movq %rdx, %r15
cmpb $0x0, (%rdx)
je 0x1a815
testq %rdi, %rdi
je 0x1a809
cmpl $0x0, (%rdi)
je 0x1a809
movq %rdi, 0x8(%rsp)
leaq 0x18(%rsp), %r14
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x1b459
testl %eax, %eax
jle 0x1a841
cmpq $0x200, %r13            # imm = 0x200
je 0x1a8c4
movq %r15, -0x8(%r14)
movl %eax, (%r14)
incq %r13
movl %eax, %eax
addq %rax, %r15
incq %r15
addq $0x10, %r14
jmp 0x1a7a0
movl %eax, %r14d
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x1bbcd
pushq $-0x1
popq %rbp
cmpl $0x1, %eax
jne 0x1a82d
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x1ba37
cmpl %r14d, %eax
jne 0x1a82d
movl %r14d, %eax
addq %rax, %r15
incq %r15
movq %r15, %rdi
callq 0x1b459
testl %eax, %eax
jg 0x1a7d5
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1bbcd
xorl %ebp, %ebp
cmpl $0x1, %eax
setne %bpl
negl %ebp
movl %ebp, %eax
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rbp
xorl %r15d, %r15d
testq %r13, %r13
jle 0x1a8cc
decq %r13
movq %r13, %rax
shlq $0x4, %rax
leaq (%rsp,%rax), %r14
addq $0x10, %r14
leaq 0x20(%rbp), %r12
movq %r12, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x1a888
movq (%r14), %rdi
movq (%r15), %rsi
callq 0x34f0
testl %eax, %eax
je 0x1a8bf
addq $0x28, %r15
jmp 0x1a86b
pushq $0x30
popq %rdi
callq 0x34c0
testq %rax, %rax
je 0x1a8c4
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq %rbp, 0x18(%rax)
movq 0x20(%rbp), %rax
testq %rax, %rax
je 0x1a8bb
movq %rax, 0x28(%r15)
movq %r15, (%r12)
movq %r15, %rbp
jmp 0x1a84d
pushq $-0x1
popq %rbp
jmp 0x1a82d
pushq $-0x1
popq %rbp
testq %r15, %r15
je 0x1a82d
pushq $0x1
popq %r12
movq 0x8(%rsp), %r14
testq %r15, %r15
je 0x1a94a
movl 0x10(%r15), %esi
testl %esi, %esi
jg 0x1a930
movl 0xc(%rbx), %eax
subl 0x4(%r14), %eax
movl %eax, 0x10(%r15)
movl 0x8(%r15), %esi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x1bbcd
cmpl $0x1, %eax
jne 0x1a82d
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0x1ba37
cmpl 0x8(%r15), %eax
jne 0x1a82d
movq 0x18(%r15), %r15
jmp 0x1a8e1
orl $0xc000, %esi           # imm = 0xC000
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x1bbcd
cmpl $0x2, %eax
jne 0x1a82d
xorl %ebp, %ebp
jmp 0x1a82d
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_parse_ect
ns_ecs_t* ns_parse_ect(ns_ecs_t *ecs, char *data, int len)
{
	int addrlen, i;
	stream_t ns = STREAM_INIT();
	ns.array = data;
	ns.cap = len;
	ns.size = len;
	ns.pos = 0;

#define check_size(n) \
        if (stream_rsize(&ns) < (n)) { \
            return NULL; \
        }

	memset(ecs, 0, sizeof(ns_ecs_t));

	check_size(2);
	ecs->family = stream_readi16(&ns);
	check_size(2);
	ecs->src_prefix_len = stream_readi8(&ns);
	ecs->scope_prefix_len = stream_readi8(&ns);

	addrlen = ecs->src_prefix_len / 8;
	if (ecs->src_prefix_len % 8)
		addrlen++;

	if (ecs->family == ADDR_FAMILY_NUM_IP) {
		if (addrlen > 4) {
			/* invalid src_prefix_len */
			return NULL;
		}
	}
	else if (ecs->family == ADDR_FAMILY_NUM_IP6) {
		if (addrlen > 16) {
			/* invalid src_prefix_len */
			return NULL;
		}
	}
	else {
		/* invalid family */
		return NULL;
	}

	check_size(addrlen);

	for (i = 0; i < addrlen; i++) {
		((uint8_t *)(&ecs->subnet))[i] = stream_readi8(&ns);
	}

#undef check_size

	return ecs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
andq $0x0, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x18(%rsp)
movl %edx, 0x10(%rsp)
andl $0x0, 0x14(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andl $0x0, 0x10(%rdi)
cmpl $0x2, %edx
jl 0x1aa00
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x1bfb1
movw %ax, (%rbx)
movl 0x8(%r14), %eax
subl 0xc(%r14), %eax
cmpl $0x2, %eax
jl 0x1aa00
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x1bfb1
movb %al, 0x2(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x1bfb1
movb %al, 0x3(%rbx)
movzbl 0x2(%rbx), %ecx
movl %ecx, %eax
shrl $0x3, %eax
andl $0x7, %ecx
cmpl $0x1, %ecx
sbbl $-0x1, %eax
movzwl (%rbx), %ecx
cmpl $0x2, %ecx
je 0x1a9ef
cmpl $0x1, %ecx
jne 0x1aa00
cmpl $0x4, %eax
jbe 0x1a9f4
jmp 0x1aa00
cmpl $0x10, %eax
ja 0x1aa00
movl 0x10(%rsp), %ecx
subl 0x14(%rsp), %ecx
cmpl %eax, %ecx
jge 0x1aa12
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r15d
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rbp
cmpq %r12, %r15
je 0x1aa02
movq %r14, %rdi
movl %ebp, %esi
callq 0x1bfb1
movb %al, 0x4(%rbx,%r12)
incq %r12
jmp 0x1aa20
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: ns_read_cstring
static int ns_read_cstring(stream_t *dst, stream_t *s)
{
	int spos = s->pos, dpos = dst->pos, len;

#define do_return(r) \
	s->pos = spos; \
	dst->pos = dpos; \
	return (r);

#define check_len(n) \
	if (stream_rsize(s) < (n)) { \
		loge("truncated stream\n"); \
		do_return(-1); \
	}

	check_len(1);
	len = stream_readi8(s);

	check_len(len);
	if (stream_writess(dst, s, len) != len) {
		loge("write stream\n");
		do_return(-1);
	}

	if (stream_writei8(dst, 0) != 1) {
		loge("write stream\n");
		do_return(-1);
	}

	stream_seek(dst, -1, SEEK_CUR);


#undef check_len
#undef do_return

	return dst->pos - dpos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %r12d
movl 0xc(%rdi), %r15d
cmpl %r12d, 0x8(%rsi)
jle 0x1b351
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1bfb1
movl %eax, %ebp
movl 0x8(%r14), %eax
subl 0xc(%r14), %eax
cmpl %ebp, %eax
jge 0x1b395
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1b381
leaq 0x78cb(%rip), %rsi      # 0x22c04
leaq 0x7c70(%rip), %rdx      # 0x22fb0
leaq 0x7926(%rip), %r8       # 0x22c6d
pushq $0x3
popq %rdi
movl $0x251, %ecx            # imm = 0x251
jmp 0x1b37a
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1b381
leaq 0x78a0(%rip), %rsi      # 0x22c04
leaq 0x7c45(%rip), %rdx      # 0x22fb0
leaq 0x78fb(%rip), %r8       # 0x22c6d
pushq $0x3
popq %rdi
movl $0x24e, %ecx            # imm = 0x24E
xorl %eax, %eax
callq 0x1662e
movl %r12d, 0xc(%r14)
movl %r15d, 0xc(%rbx)
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x1bb15
cmpl %ebp, %eax
jne 0x1b3ce
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1bbcd
cmpl $0x1, %eax
jne 0x1b3f9
pushq $-0x1
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x1b8c3
movl 0xc(%rbx), %eax
subl %r15d, %eax
jmp 0x1b38c
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1b381
leaq 0x7823(%rip), %rsi      # 0x22c04
leaq 0x7bc8(%rip), %rdx      # 0x22fb0
leaq 0x7bb3(%rip), %r8       # 0x22fa2
pushq $0x3
popq %rdi
movl $0x253, %ecx            # imm = 0x253
jmp 0x1b37a
xorl %eax, %eax
callq 0x165f5
cmpl $0x3, (%rax)
jl 0x1b381
leaq 0x77f4(%rip), %rsi      # 0x22c04
leaq 0x7b99(%rip), %rdx      # 0x22fb0
leaq 0x7b84(%rip), %r8       # 0x22fa2
pushq $0x3
popq %rdi
movl $0x258, %ecx            # imm = 0x258
jmp 0x1b37a
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/ns_msg.c
// Function: free_label_childs
static void free_label_childs(label_t *label)
{
	label_t *child = label->childs, *tmp;
	while (child) {
		tmp = child;
		child = child->next;
		free_label_childs(tmp);
		free(tmp);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rbx
testq %rbx, %rbx
je 0x1b451
movq 0x28(%rbx), %r14
movq %rbx, %rdi
callq 0x1b42b
movq %rbx, %rdi
callq 0x3460
movq %r14, %rbx
jmp 0x1b433
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/sha1.c
// Function: sha1_hashBlock
void sha1_hashBlock(sha1nfo *s) {
	uint8_t i;
	uint32_t a,b,c,d,e,t;

	a=s->state[0];
	b=s->state[1];
	c=s->state[2];
	d=s->state[3];
	e=s->state[4];
	for (i=0; i<80; i++) {
		if (i>=16) {
			t = s->buffer[(i+13)&15] ^ s->buffer[(i+8)&15] ^ s->buffer[(i+2)&15] ^ s->buffer[i&15];
			s->buffer[i&15] = sha1_rol32(t,1);
		}
		if (i<20) {
			t = (d ^ (b & (c ^ d))) + SHA1_K0;
		} else if (i<40) {
			t = (b ^ c ^ d) + SHA1_K20;
		} else if (i<60) {
			t = ((b & c) | (d & (b | c))) + SHA1_K40;
		} else {
			t = (b ^ c ^ d) + SHA1_K60;
		}
		t+=sha1_rol32(a,5) + e + s->buffer[i&15];
		e=d;
		d=c;
		c=sha1_rol32(b,30);
		b=a;
		a=t;
	}
	s->state[0] += a;
	s->state[1] += b;
	s->state[2] += c;
	s->state[3] += d;
	s->state[4] += e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x40(%rdi), %r8d
movl 0x44(%rdi), %esi
movl 0x48(%rdi), %edx
movl 0x4c(%rdi), %ecx
movl 0x50(%rdi), %eax
xorl %r14d, %r14d
movl %r8d, %r15d
movl %esi, %ebp
movl %edx, %ebx
movl %ecx, %r10d
movl %eax, %r9d
movl %r9d, %r11d
movl %r10d, %r9d
movl %ebx, %r10d
movl %ebp, %ebx
movl %r15d, %ebp
cmpl $0x50, %r14d
je 0x1b603
movq %r14, %r15
cmpl $0x10, %r14d
jb 0x1b586
leal 0xd(%r14), %r12d
andl $0xf, %r12d
movl %r14d, %r15d
andl $0xf, %r15d
movl %r15d, %r13d
xorl $0x8, %r13d
movl (%rdi,%r13,4), %r13d
xorl (%rdi,%r12,4), %r13d
leal 0x2(%r14), %r12d
andl $0xf, %r12d
xorl (%rdi,%r12,4), %r13d
xorl (%rdi,%r15,4), %r13d
roll %r13d
movl %r13d, (%rdi,%r15,4)
cmpl $0x13, %r14d
ja 0x1b5b8
movl %r9d, %r12d
xorl %r10d, %r12d
andl %ebx, %r12d
xorl %r9d, %r12d
addl $0x5a827999, %r12d      # imm = 0x5A827999
movl %ebp, %r13d
roll $0x5, %r13d
addl %r13d, %r11d
addl %r12d, %r11d
addl (%rdi,%r15,4), %r11d
roll $0x1e, %ebx
incq %r14
movl %r11d, %r15d
jmp 0x1b52a
cmpl $0x27, %r14d
ja 0x1b5d0
movl %r9d, %r12d
xorl %r10d, %r12d
xorl %ebx, %r12d
addl $0x6ed9eba1, %r12d      # imm = 0x6ED9EBA1
jmp 0x1b599
cmpl $0x3b, %r14d
ja 0x1b5f1
movl %r10d, %r13d
andl %ebx, %r13d
movl %r10d, %r12d
orl %ebx, %r12d
andl %r9d, %r12d
orl %r13d, %r12d
addl $0x8f1bbcdc, %r12d      # imm = 0x8F1BBCDC
jmp 0x1b599
movl %r9d, %r12d
xorl %r10d, %r12d
xorl %ebx, %r12d
addl $0xca62c1d6, %r12d      # imm = 0xCA62C1D6
jmp 0x1b599
addl %r8d, %ebp
movl %ebp, 0x40(%rdi)
addl %esi, %ebx
movl %ebx, 0x44(%rdi)
addl %edx, %r10d
movl %r10d, 0x48(%rdi)
addl %ecx, %r9d
movl %r9d, 0x4c(%rdi)
addl %eax, %r11d
movl %r11d, 0x50(%rdi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/sha1.c
// Function: sha1_addUncounted
void sha1_addUncounted(sha1nfo *s, uint8_t data) {
	uint8_t * const b = (uint8_t*) s->buffer;
	if (big_endian)
		b[s->bufferOffset] = data;
	else
		b[s->bufferOffset ^ 3] = data;
	s->bufferOffset++;
	if (s->bufferOffset == BLOCK_LENGTH) {
		sha1_hashBlock(s);
		s->bufferOffset = 0;
	}
}

// Assembly:
movl 0x58(%rdi), %eax
movl %eax, %ecx
xorb $0x3, %cl
movzbl %cl, %ecx
cmpb $0x0, 0x13760(%rip)     # 0x2eda0
cmovel %eax, %ecx
movzbl %cl, %eax
movb %sil, (%rdi,%rax)
movb 0x58(%rdi), %al
incb %al
movb %al, 0x58(%rdi)
cmpb $0x40, %al
jne 0x1b664
pushq %rbx
movq %rdi, %rbx
callq 0x1b500
movb $0x0, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/sha1.c
// Function: sha1_pad
void sha1_pad(sha1nfo *s) {
	// Implement SHA-1 padding (fips180-2 Â§5.1.1)

	// Pad with 0x80 followed by 0x00 until the end of the block
	sha1_addUncounted(s, 0x80);
	while (s->bufferOffset != 56) sha1_addUncounted(s, 0x00);

	// Append length in the last 8 bytes
	sha1_addUncounted(s, 0); // We're only using 32 bit lengths
	sha1_addUncounted(s, 0); // But SHA-1 supports 64 bit lengths
	sha1_addUncounted(s, 0); // So zero pad the top bits
	sha1_addUncounted(s, s->byteCount >> 29); // Shifting to multiply by 8
	sha1_addUncounted(s, s->byteCount >> 21); // as SHA-1 supports bitstreams as well as
	sha1_addUncounted(s, s->byteCount >> 13); // byte.
	sha1_addUncounted(s, s->byteCount >> 5);
	sha1_addUncounted(s, s->byteCount << 3);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x80, %esi
callq 0x1b62e
movb 0x58(%rbx), %bpl
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1b62e
cmpb $0x38, %bpl
jne 0x1b6b4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1b62e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1b62e
movl 0x54(%rbx), %esi
shrl $0x1d, %esi
movq %rbx, %rdi
callq 0x1b62e
movl 0x54(%rbx), %esi
shrl $0x15, %esi
movl $0xff, %ebp
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1b62e
movl 0x54(%rbx), %esi
shrl $0xd, %esi
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1b62e
movl 0x54(%rbx), %esi
shrl $0x5, %esi
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1b62e
movb 0x54(%rbx), %al
shlb $0x3, %al
movzbl %al, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1b62e
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/sha1.c
// Function: sha1_initHmac
void sha1_initHmac(sha1nfo *s, const uint8_t* key, int keyLength) {
	uint8_t i;
	memset(s->keyBuffer, 0, BLOCK_LENGTH);
	if (keyLength > BLOCK_LENGTH) {
		// Hash long keys
		sha1_init(s);
		for (;keyLength--;) sha1_writebyte(s, *key++);
		memcpy(s->keyBuffer, sha1_result(s), HASH_LENGTH);
	} else {
		// Block length keys are used as is
		memcpy(s->keyBuffer, key, keyLength);
	}
	// Start inner hash
	sha1_init(s);
	for (i=0; i<BLOCK_LENGTH; i++) {
		sha1_writebyte(s, s->keyBuffer[i] ^ HMAC_IPAD);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x59(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x89(%rdi)
movups %xmm0, 0x79(%rdi)
movups %xmm0, 0x69(%rdi)
movups %xmm0, 0x59(%rdi)
cmpl $0x41, %edx
jl 0x1b7bf
movq %rbx, %rdi
callq 0x1b4d0
movl %ebp, %r12d
xorl %r13d, %r13d
cmpl %r13d, %r12d
je 0x1b7cf
movzbl (%r15,%r13), %esi
movq %rbx, %rdi
callq 0x1b665
incq %r13
jmp 0x1b7a8
movslq %ebp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x32c0
jmp 0x1b7e5
movq %rbx, %rdi
callq 0x1b736
movups (%rax), %xmm0
movups %xmm0, (%r14)
movl 0x10(%rax), %eax
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x1b4d0
pushq $0x59
popq %r14
cmpq $0x99, %r14
je 0x1b80f
movzbl (%rbx,%r14), %esi
xorl $0x36, %esi
movq %rbx, %rdi
callq 0x1b665
incq %r14
jmp 0x1b7f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/sha1.c
// Function: sha1_resultHmac
uint8_t* sha1_resultHmac(sha1nfo *s) {
	uint8_t i;
	// Complete inner hash
	memcpy(s->innerHash,sha1_result(s),HASH_LENGTH);
	// Calculate outer hash
	sha1_init(s);
	for (i=0; i<BLOCK_LENGTH; i++) sha1_writebyte(s, s->keyBuffer[i] ^ HMAC_OPAD);
	for (i=0; i<HASH_LENGTH; i++) sha1_writebyte(s, s->innerHash[i]);
	return sha1_result(s);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1b736
movups (%rax), %xmm0
movups %xmm0, 0x99(%rbx)
movl 0x10(%rax), %eax
movl %eax, 0xa9(%rbx)
movq %rbx, %rdi
callq 0x1b4d0
pushq $0x59
popq %r14
cmpq $0x99, %r14
je 0x1b867
movzbl (%rbx,%r14), %esi
xorl $0x5c, %esi
movq %rbx, %rdi
callq 0x1b665
incq %r14
jmp 0x1b849
movl $0x99, %r14d
cmpq $0xad, %r14
je 0x1b888
movzbl (%rbx,%r14), %esi
movq %rbx, %rdi
callq 0x1b665
incq %r14
jmp 0x1b86d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1b736
nop
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/main.c
// Function: peer_close
static void peer_close(peer_t* peer)
{
	dlitem_t* cur, * nxt;
	req_t* req;
	dllist_remove(&peer->conn.entry);
	dllist_foreach(&peer->reqs, cur, nxt,
		req_t, req, entry_peer) {
		req_remove(req);
	}
#if DOHCLIENT_CACHE_API
	if (peer->hsctx)
		hsctx_free(peer->hsctx);
#endif
	peer_destroy(peer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x48(%rdi), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
leaq 0x70(%rdi), %r14
movq 0x70(%rdi), %rdi
cmpq %r14, %rdi
je 0x1e2fb
movq (%rdi), %r15
addq $-0x68, %rdi
callq 0x1ebde
movq %r15, %rdi
jmp 0x1e2e5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x181a9
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/main.c
// Function: cache_cb
static int cache_cb(channel_t* ctx,
	int status,
	ns_msg_t* result,
	int fromcache,
	int trust,
	void* state)
{
	req_t* req = state;

	if (status || !result || result->qdcount < 1) {
		chooser_t chooser[1] = {0};
		channel_t* channel;
		int n = 0, r;
		while ((channel = choose_channel(chooser)) != NULL) {
			r = channel->query(channel, req->msg, query_cb, req);
			if (r == 0) {
				n++;
			}
		}
		if (n > 0)
			return 0;
	}
	return _query_cb(ctx, status, result, fromcache, trust, state);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movq %rdx, %r14
movl %esi, %r15d
testl %esi, %esi
setne %al
testq %rdx, %rdx
sete %dl
orb %al, %dl
jne 0x1e749
cmpw $0x0, 0x4(%r14)
jne 0x1e7ec
movq %rdi, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
movl %r8d, 0xc(%rsp)
xorl %ebp, %ebp
leaq 0x56f(%rip), %rbx       # 0x1eccf
xorl %r12d, %r12d
movl 0xff57(%rip), %eax      # 0x2e6c0
cmpl $0x2, %eax
je 0x1e77d
cmpl $0x1, %eax
jne 0x1e791
cmpl 0x10e1f(%rip), %ebp     # 0x2f598
jl 0x1e7ae
jmp 0x1e7d9
testl %ebp, %ebp
jne 0x1e7d9
movl 0xff89(%rip), %eax      # 0x2e710
incl %eax
movl %eax, 0xff81(%rip)      # 0x2e710
jmp 0x1e7a5
testl %ebp, %ebp
jne 0x1e7d9
xorl %ebp, %ebp
cmpl $0x2, 0x10dfa(%rip)     # 0x2f598
jl 0x1e7ae
callq 0x30f0
cltd
idivl 0x10dec(%rip)           # 0x2f598
movl %edx, %ebp
movq 0x10deb(%rip), %rax     # 0x2f5a0
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x1e7d9
incl %ebp
movq 0x8(%r13), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *0x40(%rdi)
cmpl $0x1, %eax
adcl $0x0, %r12d
jmp 0x1e763
testl %r12d, %r12d
movl 0xc(%rsp), %r8d
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdi
jne 0x1e7f7
movl %r15d, %esi
movq %r14, %rdx
callq 0x1e82f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]dohclient/src/main.c
// Function: req_remove
static void req_remove(req_t* req)
{
	peer_t* peer;
	const char* key;
	if (req->fromtcp) {
		peer = req->from;
		dllist_remove(&req->entry_peer);
	}
	dllist_remove(&req->entry);
	key = req_key(req);
	reqdic_remove(req, key);
	logd("request removed (id:%d) - %s\n",
		req->id,
		key);
	req_destroy(req);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x24(%rdi)
je 0x1ebff
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq 0x58(%rbx), %rax
movq 0x60(%rbx), %rcx
movq %rax, (%rcx)
movq %rcx, 0x8(%rax)
movq %rbx, %rdi
callq 0x1e808
movq %rax, %r14
movq 0x78(%rbx), %rax
movq 0x80(%rbx), %rsi
movq %rax, (%rsi)
movq %rsi, 0x8(%rax)
cmpq %rsi, %rax
jne 0x1ec87
leaq -0x38(%rsi), %r15
addq $-0x28, %rsi
leaq 0xfac1(%rip), %rdi      # 0x2e700
callq 0x392c
xorl %eax, %eax
callq 0x165f5
cmpl $0x7, (%rax)
jl 0x1ec77
movq (%r15), %r9
leaq 0x4768(%rip), %rsi      # 0x233c2
leaq 0x56ae(%rip), %rdx      # 0x2430f
leaq 0x56b5(%rip), %r8       # 0x2431d
pushq $0x7
popq %rdi
movl $0xfe, %ecx
xorl %eax, %eax
callq 0x1662e
movq (%r15), %rdi
callq 0x3460
movq %r15, %rdi
callq 0x3460
xorl %eax, %eax
callq 0x165f5
cmpl $0x7, (%rax)
jl 0x1ecbe
movl (%rbx), %r9d
movq %r14, (%rsp)
leaq 0x4721(%rip), %rsi      # 0x233c2
leaq 0x563e(%rip), %rdx      # 0x242e6
leaq 0x5642(%rip), %r8       # 0x242f1
pushq $0x7
popq %rdi
movl $0x158, %ecx            # imm = 0x158
xorl %eax, %eax
callq 0x1662e
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x131f0
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/unsorted0/speclist.c
// Function: getline_1
void getline_1(FILE *in,int *linenum,int *linelen,int *t)
{
int b1,b2,f;

b1=fgetc(in);
b2=fgetc(in);
*linenum=b1*256+b2;
(*t)-=2;

b1=fgetc(in);
b2=fgetc(in);
*linelen=b1+256*b2;
(*t)-=2;

for(f=0;f<*linelen;f++)
  {
  linebuf[f]=fgetc(in);
  (*t)--;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0x30b0
movl %eax, %ebp
movq %r15, %rdi
callq 0x30b0
shll $0x8, %ebp
addl %eax, %ebp
movl %ebp, (%r12)
addl $-0x2, (%rbx)
movq %r15, %rdi
callq 0x30b0
movl %eax, %ebp
movq %r15, %rdi
callq 0x30b0
shll $0x8, %eax
addl %ebp, %eax
movl %eax, (%r14)
addl $-0x2, (%rbx)
xorl %r12d, %r12d
leaq 0x366b(%rip), %r13      # 0x6880
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x3230
movq %r15, %rdi
callq 0x30b0
movb %al, (%r12,%r13)
decl (%rbx)
incq %r12
jmp 0x3215
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/unsorted0/speclist.c
// Function: xlatline
void xlatline(int linelen)
{
int f;

for(f=0;f<linelen-1;f++)
  {
  if((linebuf[0]!=234)&&(linebuf[f]==14))
    f+=5;  /* avoid inline FP numbers - but ok for REMs */
  else
    printf("%s",charset[linebuf[f]]);
  }
printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
decl %ebx
leaq 0x362e(%rip), %r15      # 0x6880
leaq 0x2e17(%rip), %r12      # 0x6070
leaq 0x10ec(%rip), %r14      # 0x434c
xorl %ebp, %ebp
cmpl %ebx, %ebp
jge 0x3294
cmpb $-0x16, 0x3613(%rip)    # 0x6880
movslq %ebp, %rax
movb (%rax,%r15), %al
je 0x327f
cmpb $0xe, %al
jne 0x327f
addl $0x5, %ebp
jmp 0x3290
movzbl %al, %eax
movq (%r12,%rax,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3030
incl %ebp
jmp 0x3262
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3070
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/unsorted0/speclist.c
// Function: main
int main(int argc,char *argv[])
{
FILE *in;

if(argc!=3)
  {
  printf("Speclist - PD by RJM for improbabledesigns.\n\n");
  printf("Lists ZX Spectrum raw basic program files to stdout.\n\n");
  printf("Usage:  speclist infile prog_offset >outfile.txt\n");
  exit(1);
  }

if((in=fopen(argv[1],"rb"))==NULL)
  fprintf(stderr,"Error: couldn't open file '%s'\n",argv[1]),exit(1);

progtotal=atoi(argv[2]);
thrashfile(in);      /* process it */
fclose(in);

exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x3, %edi
jne 0x3353
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
leaq 0x1028(%rip), %rsi      # 0x4353
callq 0x3050
testq %rax, %rax
jne 0x337f
movq 0x2ca4(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x100c(%rip), %rsi      # 0x4356
xorl %eax, %eax
callq 0x3080
jmp 0x3377
leaq 0x101c(%rip), %rdi      # 0x4376
callq 0x3090
leaq 0x103d(%rip), %rdi      # 0x43a3
callq 0x3090
leaq 0x1067(%rip), %rdi      # 0x43d9
callq 0x3090
pushq $0x1
popq %rdi
callq 0x3060
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x30a0
movl %eax, 0xb4ef(%rip)      # 0xe880
movq %r14, %rdi
callq 0x32a4
movq %r14, %rdi
callq 0x3040
xorl %edi, %edi
callq 0x3060
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/bin/unterm.c
// Function: dump_row
void dump_row(int row)
{
  VTermPos pos = { .row = row, .col = 0 };
  VTermScreenCell prevcell = { 0 };
  vterm_state_get_default_colors(vterm_obtain_state(vt), &prevcell.fg, &prevcell.bg);

  while(pos.col < cols) {
    VTermScreenCell cell;
    vterm_screen_get_cell(vts, pos, &cell);

    dump_cell(&cell, &prevcell);

    pos.col += cell.width;
    prevcell = cell;
  }

  dump_eol(&prevcell);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, -0x10(%r14)
movaps %xmm0, -0x20(%r14)
andq $0x0, (%r14)
movq 0x2e72(%rip), %rdi      # 0x4138
callq 0x10f0
leaq 0x24(%rsp), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1110
movl %ebx, %r15d
xorl %r12d, %r12d
leaq 0x30(%rsp), %rbx
movq %rsp, %r14
cmpl 0x2e50(%rip), %r12d     # 0x4140
jge 0x1340
movq 0x2e4f(%rip), %rdi      # 0x4148
movq %r12, %rsi
shlq $0x20, %rsi
orq %r15, %rsi
movq %rbx, %rdx
callq 0x1170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1354
movsbl 0x48(%rsp), %eax
addl %r12d, %eax
movups 0x30(%rsp), %xmm0
movups 0x40(%rsp), %xmm1
movaps %xmm0, (%rsp)
movaps %xmm1, 0x10(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movl %eax, %r12d
jmp 0x12e9
movq %rsp, %rdi
callq 0x1616
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/bin/unterm.c
// Function: dump_cell_color
static int dump_cell_color(const VTermColor *col, int sgri, int sgr[], int fg)
{
    /* Reset the color if the given color is the default color */
    if (fg && VTERM_COLOR_IS_DEFAULT_FG(col)) {
        sgr[sgri++] = 39;
        return sgri;
    }
    if (!fg && VTERM_COLOR_IS_DEFAULT_BG(col)) {
        sgr[sgri++] = 49;
        return sgri;
    }

    /* Decide whether to send an indexed color or an RGB color */
    if (VTERM_COLOR_IS_INDEXED(col)) {
        const uint8_t idx = col->indexed.idx;
        if (idx < 8) {
            sgr[sgri++] = (idx + (fg ? 30 : 40));
        }
        else if (idx < 16) {
            sgr[sgri++] = (idx - 8 + (fg ? 90 : 100));
        }
        else {
            sgr[sgri++] = (fg ? 38 : 48);
            sgr[sgri++] = 5;
            sgr[sgri++] = idx;
        }
    }
    else if (VTERM_COLOR_IS_RGB(col)) {
        sgr[sgri++] = (fg ? 38 : 48);
        sgr[sgri++] = 2;
        sgr[sgri++] = col->rgb.red;
        sgr[sgri++] = col->rgb.green;
        sgr[sgri++] = col->rgb.blue;
    }
    return sgri;
}

// Assembly:
movl %esi, %eax
movb (%rdi), %sil
testl %ecx, %ecx
je 0x1873
testb $0x2, %sil
je 0x1879
movslq %eax, %rcx
incl %eax
movl $0x27, (%rdx,%rcx,4)
retq
testb $0x4, %sil
jne 0x18c5
testb $0x1, %sil
jne 0x18b4
testl %ecx, %ecx
pushq $0x30
popq %rcx
pushq $0x26
popq %rsi
cmovel %ecx, %esi
movslq %eax, %rcx
movl %esi, (%rdx,%rcx,4)
movl $0x2, 0x4(%rdx,%rcx,4)
movzbl 0x1(%rdi), %esi
movl %esi, 0x8(%rdx,%rcx,4)
movzbl 0x2(%rdi), %esi
movl %esi, 0xc(%rdx,%rcx,4)
movzbl 0x3(%rdi), %esi
addl $0x5, %eax
movl %esi, 0x10(%rdx,%rcx,4)
retq
movzbl 0x1(%rdi), %esi
cmpl $0x7, %esi
ja 0x18d2
leal 0x1e(%rsi), %edi
addl $0x28, %esi
jmp 0x18de
movslq %eax, %rcx
incl %eax
movl $0x31, (%rdx,%rcx,4)
retq
cmpb $0xf, %sil
ja 0x18ec
leal 0x52(%rsi), %edi
addl $0x5c, %esi
testl %ecx, %ecx
cmovnel %edi, %esi
movslq %eax, %rcx
incl %eax
movl %esi, (%rdx,%rcx,4)
retq
testl %ecx, %ecx
pushq $0x30
popq %rcx
pushq $0x26
popq %rdi
cmovel %ecx, %edi
movslq %eax, %rcx
movl %edi, (%rdx,%rcx,4)
movl $0x5, 0x4(%rdx,%rcx,4)
addl $0x3, %eax
movl %esi, 0x8(%rdx,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/bin/unterm.c
// Function: screen_sb_pushline
static int screen_sb_pushline(int cols, const VTermScreenCell *cells, void *user)
{
  VTermScreenCell prevcell = { 0 };
  vterm_state_get_default_colors(vterm_obtain_state(vt), &prevcell.fg, &prevcell.bg);

  for(int col = 0; col < cols; col++) {
    dump_cell(cells + col, &prevcell);
    prevcell = cells[col];
  }

  dump_eol(&prevcell);

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, -0x10(%r14)
movaps %xmm0, -0x20(%r14)
andq $0x0, (%r14)
movq 0x27ef(%rip), %rdi      # 0x4138
callq 0x10f0
leaq 0x24(%rsp), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1110
xorl %r15d, %r15d
testl %ebp, %ebp
cmovgl %ebp, %r15d
movq %rsp, %r14
subq $0x1, %r15
jb 0x199a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1354
movq 0x20(%rbx), %rax
movq %rax, 0x20(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
addq $0x28, %rbx
jmp 0x196a
movq %rsp, %rdi
callq 0x1616
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_mod.c
// Function: code
static char *code(int id) {
    static char code[20];
    if (id > 0) {
        code[0] = id;
        code[1] = 0;
    } else {
        snprintf(code, sizeof(code), "(%d)", -id);
    }

    return code;
}

// Assembly:
movl %edi, %ecx
testl %edi, %edi
jle 0x6094
movb %cl, 0x91494(%rip)      # 0x97520
movb $0x0, 0x9148e(%rip)     # 0x97521
retq
negl %ecx
leaq 0x91483(%rip), %rdi     # 0x97520
leaq 0x788ab(%rip), %rdx     # 0x7e94f
pushq $0x14
popq %rsi
xorl %eax, %eax
jmp 0x4820
nop
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: get_reg_number
int get_reg_number ( char *s, unsigned int *rx )
{
    unsigned int ra;

    for(ra=0;ra<NREGNAMES;ra++)
    {
        if(strcmp(s,reg_names[ra].name)==0)
        {
            *rx=reg_names[ra].num;
            return(0);
        }
    }
    return(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
pushq $0x1
popq %rbx
leaq 0x3e4a(%rip), %r12      # 0x5080
leaq 0x5(%rsi), %r13
cmpq $0x2d, %r13
je 0x125d
addq %r12, %rsi
movq %r15, %rdi
callq 0x1090
movq %r13, %rsi
testl %eax, %eax
jne 0x1236
movzbl -0x1(%r13,%r12), %eax
movl %eax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_immed
unsigned int parse_immed ( unsigned int ra )
{
    unsigned int rb;

    if((newline[ra]==0x30)&&((newline[ra+1]=='x')||(newline[ra+1]=='X')))
    {
        ra+=2;
        rb=0;
        for(;newline[ra];ra++)
        {
            if(newline[ra]==0x20) break;
            if(!hexchar[newline[ra]])
            {
                printf("<%u> Error: invalid number\n",line);
                return(0);
            }
            cstring[rb++]=newline[ra];
        }
        cstring[rb]=0;
        if(rb==0)
        {
            printf("<%u> Error: invalid number\n",line);
            return(0);
        }
        rx=strtoul(cstring,NULL,16);
    }
    else
    {
        rb=0;
        for(;newline[ra];ra++)
        {
            if(newline[ra]==0x20) break;
            if(!numchar[newline[ra]])
            {
                printf("<%u> Error: invalid number\n",line);
                return(0);
            }
            cstring[rb++]=newline[ra];
        }
        cstring[rb]=0;
        if(rb==0)
        {
            printf("<%u> Error: invalid number\n",line);
            return(0);
        }
        rx=strtoul(cstring,NULL,10);
    }
    for(;newline[ra];ra++) if(newline[ra]!=0x20) break;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %eax
leaq 0x3f8a(%rip), %r14      # 0x52c0
movb (%rax,%r14), %al
cmpb $0x30, %al
jne 0x1385
leal 0x1(%rdi), %ecx
movzbl (%rcx,%r14), %ecx
orl $0x20, %ecx
cmpl $0x78, %ecx
jne 0x1385
addl $0x2, %edi
xorl %eax, %eax
leaq 0x3d56(%rip), %rdx      # 0x50b0
leaq 0x436f(%rip), %rcx      # 0x56d0
leal (%rdi,%rax), %ebx
movzbl (%rbx,%r14), %esi
movl %eax, %r8d
testb $-0x21, %sil
je 0x13c5
movsbq %sil, %r9
cmpb $0x0, (%r9,%rdx)
je 0x13f4
incl %eax
movb %sil, (%r8,%rcx)
jmp 0x1361
xorl %ecx, %ecx
leaq 0x3e22(%rip), %rsi      # 0x51b0
leaq 0x433b(%rip), %rdx      # 0x56d0
movl %ecx, %r8d
testb $-0x21, %al
je 0x13b5
movsbq %al, %r9
cmpb $0x0, (%r9,%rsi)
je 0x13f4
incl %ecx
movb %al, (%r8,%rdx)
incl %edi
movb (%rdi,%r14), %al
jmp 0x1395
movb $0x0, (%r8,%rdx)
testl %ecx, %ecx
je 0x13f4
pushq $0xa
popq %rdx
movl %edi, %ebx
jmp 0x13d1
movb $0x0, (%r8,%rcx)
testl %eax, %eax
je 0x13f4
pushq $0x10
popq %rdx
leaq 0x42f8(%rip), %rdi      # 0x56d0
xorl %esi, %esi
callq 0x10c0
movl %eax, 0x46eb(%rip)      # 0x5ad0
movl %ebx, %eax
incl %ebx
cmpb $0x20, (%rax,%r14)
je 0x13e5
decl %ebx
jmp 0x140a
movl 0x42c6(%rip), %esi      # 0x56c0
leaq 0x1c6d(%rip), %rdi      # 0x306e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_reg
unsigned int parse_reg ( unsigned int ra )
{
    unsigned int rb;

    for(;newline[ra];ra++) if(newline[ra]!=0x20) break;
    rb=0;
    for(;newline[ra];ra++)
    {
        if(newline[ra]==',') break;
        if(newline[ra]==0x20) break;
        cstring[rb++]=newline[ra];
    }
    cstring[rb]=0;
    if(get_reg_number(cstring,&rx))
    {
        printf("<%u> Error: not a register\n",line);
        return(0);
    }
    for(;newline[ra];ra++) if(newline[ra]!=0x20) break;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x3e9f(%rip), %r14      # 0x52c0
movl %ebx, %eax
movb (%rax,%r14), %al
incl %ebx
cmpb $0x20, %al
je 0x1421
xorl %ecx, %ecx
leaq 0x429a(%rip), %rdi      # 0x56d0
movabsq $0x100100000001, %rdx   # imm = 0x100100000001
movl %ecx, %esi
cmpb $0x2c, %al
ja 0x1450
movzbl %al, %r8d
btq %r8, %rdx
jb 0x145f
incl %ecx
movb %al, (%rsi,%rdi)
movl %ebx, %eax
movb (%rax,%r14), %al
incl %ebx
jmp 0x1440
movb $0x0, (%rsi,%rdi)
leaq 0x4666(%rip), %rsi      # 0x5ad0
callq 0x1216
testl %eax, %eax
je 0x148b
movl 0x4247(%rip), %esi      # 0x56c0
leaq 0x1c0a(%rip), %rdi      # 0x308a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
jmp 0x1497
addl $-0x2, %ebx
incl %ebx
cmpb $0x20, (%rbx,%r14)
je 0x148e
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_three_regs
unsigned int parse_three_regs ( unsigned int ra )
{
    ra=parse_reg(ra); if(ra==0) return(0);
    rd=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_reg(ra); if(ra==0) return(0);
    rs=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_reg(ra); if(ra==0) return(0);
    rt=rx;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1411
xorl %ebx, %ebx
testl %eax, %eax
je 0x1599
movl 0x4583(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4581(%rip)      # 0x5ad4
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x1599
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x1599
movl 0x4561(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4563(%rip)      # 0x5ad8
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x1599
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x1599
movl 0x453f(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4545(%rip)      # 0x5adc
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_two_regs
unsigned int parse_two_regs ( unsigned int ra )
{
    ra=parse_reg(ra); if(ra==0) return(0);
    rd=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_reg(ra); if(ra==0) return(0);
    rs=rx;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1411
xorl %ebx, %ebx
testl %eax, %eax
je 0x15e3
movl 0x4517(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4515(%rip)      # 0x5ad4
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x15e3
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x15e3
movl 0x44f5(%rip), %ecx      # 0x5ad0
movl %ecx, 0x44f7(%rip)      # 0x5ad8
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_branch_label
unsigned int parse_branch_label ( unsigned int ra )
{
    unsigned int rb;
    unsigned int rc;

    is_const=0;
    is_label=0;
    for(;newline[ra];ra++) if(newline[ra]!=0x20) break;
    if(numchar[newline[ra]])
    {
        ra=parse_immed(ra); if(ra==0) return(0);
        is_const=1;
    }
    else
    {
        //assume label, find space or eol.
        for(rb=ra;newline[rb];rb++)
        {
            if(newline[rb]==0x20) break; //no spaces in labels
        }
        //got a label
        rc=rb-ra;
        if(rc==0)
        {
            printf("<%u> Error: Invalid label\n",line);
            return(0);
        }
        rc--;
        if(rc>=LABLEN)
        {
            printf("<%u> Error: Label too long\n",line);
            return(0);
        }
        for(rb=0;rb<=rc;rb++)
        {
            lab_struct[nlabs].name[rb]=newline[ra++];
        }
        lab_struct[nlabs].name[rb]=0;
        lab_struct[nlabs].addr=curradd;
        lab_struct[nlabs].line=line;
        lab_struct[nlabs].type=1;
        nlabs++;
        rx=0;
        is_label=1;
    }
    return(ra);
}

// Assembly:
andl $0x0, 0x4481(%rip)      # 0x5ae0
andl $0x0, 0x447e(%rip)      # 0x5ae4
leaq 0x3c53(%rip), %rax      # 0x52c0
movl %edi, %ecx
movsbq (%rcx,%rax), %rcx
incl %edi
cmpq $0x20, %rcx
je 0x166d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x3b27(%rip), %rdx      # 0x51b0
leal -0x1(%rdi), %ebx
cmpb $0x0, (%rcx,%rdx)
je 0x16ae
movl %ebx, %edi
callq 0x1326
testl %eax, %eax
je 0x16db
movl %eax, %ebx
movl $0x1, 0x4437(%rip)      # 0x5ae0
jmp 0x175d
xorl %esi, %esi
testb $-0x21, %cl
je 0x16bf
leal (%rdi,%rsi), %ecx
incl %esi
movb (%rcx,%rax), %cl
jmp 0x16b0
testl %esi, %esi
je 0x16df
movl %esi, %ecx
negl %ecx
cmpl $-0x40, %ecx
jae 0x16f7
movl 0x3fee(%rip), %esi      # 0x56c0
leaq 0x1a02(%rip), %rdi      # 0x30db
jmp 0x16ec
xorl %ebx, %ebx
jmp 0x175d
movl 0x3fdb(%rip), %esi      # 0x56c0
leaq 0x19d4(%rip), %rdi      # 0x30c0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
jmp 0x175d
movl 0x4c43f3(%rip), %ecx    # 0x4c5af0
imulq $0x4c, %rcx, %rdx
leaq 0x43e8(%rip), %rdi      # 0x5af0
leaq (%rdi,%rdx), %r8
movl %esi, %esi
xorl %r9d, %r9d
cmpq %r9, %rsi
je 0x1728
movl %ebx, %r10d
incl %ebx
movb (%r10,%rax), %r10b
movb %r10b, (%r8,%r9)
incq %r9
jmp 0x1711
movb $0x0, (%r8,%rsi)
movl 0x4c43c1(%rip), %eax    # 0x4c5af4
movl %eax, 0x40(%rdx,%rdi)
movl 0x3f83(%rip), %eax      # 0x56c0
movl %eax, 0x44(%rdx,%rdi)
pushq $0x1
popq %rax
movl %eax, 0x48(%rdx,%rdi)
incl %ecx
movl %ecx, 0x4c43a0(%rip)    # 0x4c5af0
andl $0x0, 0x4379(%rip)      # 0x5ad0
movl %eax, 0x4387(%rip)      # 0x5ae4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_two_label
unsigned int parse_two_label ( unsigned int ra )
{
    ra=parse_reg(ra); if(ra==0) return(0);
    rt=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_reg(ra); if(ra==0) return(0);
    rs=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_branch_label(ra); if(ra==0) return(0);
    rd=rx;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1411
xorl %ebx, %ebx
testl %eax, %eax
je 0x17c9
movl 0x4353(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4359(%rip)      # 0x5adc
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x17c9
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x17c9
movl 0x4331(%rip), %ecx      # 0x5ad0
movl %ecx, 0x4333(%rip)      # 0x5ad8
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x17c9
movl %eax, %edi
callq 0x1658
testl %eax, %eax
je 0x17c9
movl 0x430f(%rip), %ecx      # 0x5ad0
movl %ecx, 0x430d(%rip)      # 0x5ad4
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dwelch67[P]lc3/lc3asm.c
// Function: parse_one_label
unsigned int parse_one_label ( unsigned int ra )
{
    ra=parse_reg(ra); if(ra==0) return(0);
    rs=rx;
    ra=parse_comma(ra); if(ra==0) return(0);
    ra=parse_branch_label(ra); if(ra==0) return(0);
    rd=rx;
    return(ra);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1411
xorl %ebx, %ebx
testl %eax, %eax
je 0x1813
movl 0x42e7(%rip), %ecx      # 0x5ad0
movl %ecx, 0x42e9(%rip)      # 0x5ad8
movl %eax, %edi
callq 0x149e
testl %eax, %eax
je 0x1813
movl %eax, %edi
callq 0x1658
testl %eax, %eax
je 0x1813
movl 0x42c5(%rip), %ecx      # 0x5ad0
movl %ecx, 0x42c3(%rip)      # 0x5ad4
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hamsternz[P]drummer/drummer.c
// Function: write_sample
int write_sample(FILE *f, int16_t samples[2]) {
   uint8_t o[4];
   o[0] = samples[0];
   o[1] = samples[0]>>8;
   o[2] = samples[1];
   o[3] = samples[1]>>8;
   if(fwrite(o, sizeof(o), 1, f) != 1) 
     return 0;
   return 1;
}

// Assembly:
pushq %rax
movq %rdi, %rcx
movzwl (%rsi), %eax
leaq 0x4(%rsp), %rdi
movw %ax, (%rdi)
movzwl 0x2(%rsi), %eax
movw %ax, 0x2(%rdi)
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x1060
xorl %ecx, %ecx
cmpq $0x1, %rax
sete %cl
movl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/hamsternz[P]drummer/drummer.c
// Function: main
int main(int argc, char *argv[]) {
   FILE *f;
   int16_t samples[2];
   samplesPerBeat = SAMPLE_RATE*60/BPM;
   samplesPerTick = samplesPerBeat * BEATS_PER_BAR / BAR_LEN;
   samplesToGenerate = samplesPerTick * BAR_LEN * LOOP_BARS;

   printf("Samples per beet is %i\n", samplesPerBeat);
   printf("samples_per tick is %i\n", samplesPerTick);
   printf("samples_to_generate is %i\n", samplesToGenerate);
  
   f = fopen("out.wav","w");
   if(f == NULL) {
     fprintf(stderr, "Unable to open output file\n");
     return 0;
   } 
   output_header(f, samplesToGenerate);
   for(int i = 0; i < samplesToGenerate; i++) {
       generate_sample(samples);
       write_sample(f, samples);
   }
   fclose(f);
   printf("sampleOfTick %i\n",sampleOfTick);
   printf("tickOfBar    %i\n",tickOfBar);
   printf("bar          %i\n",bar);
   return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb $0x1, 0x182b2(%rip)     # 0x19668
leaq 0x1651f(%rip), %rdi     # 0x178dc
movl $0x42ae, %esi           # imm = 0x42AE
xorl %eax, %eax
callq 0x1040
leaq 0x16524(%rip), %rdi     # 0x178f4
movl $0x3b4, %esi            # imm = 0x3B4
xorl %eax, %eax
callq 0x1040
leaq 0x16529(%rip), %rdi     # 0x1790c
movl $0xa6a40, %ebp          # imm = 0xA6A40
movl $0xa6a40, %esi          # imm = 0xA6A40
xorl %eax, %eax
callq 0x1040
leaq 0x1652c(%rip), %rdi     # 0x17927
leaq 0x1652d(%rip), %rsi     # 0x1792f
callq 0x1050
testq %rax, %rax
je 0x148a
movq %rax, %rbx
movq %rax, %rdi
movl $0xa6a40, %esi          # imm = 0xA6A40
callq 0x12e4
leaq 0xc(%rsp), %r14
subl $0x1, %ebp
jb 0x143b
movq %r14, %rdi
callq 0x116c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1378
jmp 0x1421
movq %rbx, %rdi
callq 0x1030
movl 0x18213(%rip), %esi     # 0x1965c
leaq 0x164fd(%rip), %rdi     # 0x1794d
xorl %eax, %eax
callq 0x1040
movl 0x18207(%rip), %esi     # 0x19664
leaq 0x164fa(%rip), %rdi     # 0x1795e
xorl %eax, %eax
callq 0x1040
movl 0x181ef(%rip), %esi     # 0x19660
leaq 0x164f7(%rip), %rdi     # 0x1796f
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x17b67(%rip), %rax     # 0x18ff8
movq (%rax), %rcx
leaq 0x16496(%rip), %rdi     # 0x17931
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x1060
jmp 0x147f
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones.c
// Function: opt_key
bool opt_key(const char* arg, const char* keyword) {
   do { // check for a keyword option and nothing after it
      if (tolower(*arg++) != *keyword++) return false; }
   while (*keyword);
   return *arg == '\0'; }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1160
movq (%rax), %rax
movb (%r14), %dl
xorl %ecx, %ecx
movsbq (%rbx,%rcx), %rsi
movsbl %dl, %edx
cmpl %edx, (%rax,%rsi,4)
jne 0x12de
movb 0x1(%r14,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x12bc
cmpb $0x0, (%rbx,%rcx)
sete %al
jmp 0x12e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones.c
// Function: opt_int
bool opt_int(const char* arg, const char* keyword, int *pval, int min, int max) {
   do { // check for a "keyword=integer" option and nothing after it
      if (tolower(*arg++) != *keyword++)
         return false; }
   while (*keyword);
   if (*arg == '=') ++arg; // = is optional, actually
   int num, nch;
   if (sscanf(arg, *arg == '0' && *(arg + 1) == 'x' ? "%x%n" : "%d%n", &num, &nch) != 1) return false;
   if (num < min || num > max || arg[nch] != '\0') return false;
   *pval = num;
   return true; }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x1160
movq (%rax), %rax
movb (%r15), %cl
incq %r15
movsbq (%r12), %rdx
movsbl %cl, %ecx
cmpl %ecx, (%rax,%rdx,4)
jne 0x139a
incq %r12
movb (%r15), %cl
incq %r15
testb %cl, %cl
jne 0x1311
leaq 0x1(%r12), %r15
cmpb $0x3d, (%r12)
cmovneq %r12, %r15
cmpb $0x30, (%r15)
jne 0x1358
cmpb $0x78, 0x1(%r15)
leaq 0x3d33(%rip), %rax      # 0x507e
leaq 0x3d31(%rip), %rsi      # 0x5083
cmoveq %rax, %rsi
jmp 0x135f
leaq 0x3d24(%rip), %rsi      # 0x5083
xorl %r12d, %r12d
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1100
cmpl $0x1, %eax
jne 0x139d
movl 0xc(%rsp), %eax
cmpl %r14d, %eax
setl %cl
cmpl %ebp, %eax
setg %dl
orb %cl, %dl
jne 0x139a
movslq 0x8(%rsp), %rcx
cmpb $0x0, (%r15,%rcx)
je 0x13ad
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, (%rbx)
movb $0x1, %r12b
jmp 0x139d
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones.c
// Function: opt_str
bool opt_str(const char* arg, const char* keyword, const char** str) {
   do { // check for a "keyword=string" option
      if (tolower(*arg++) != *keyword++) return false; }
   while (*keyword);
   *str = arg; // ptr to "string" part, which could be null
   return true; }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1160
movq (%rax), %rax
movb (%r15), %cl
incq %r15
movsbq (%r14), %rdx
movl (%rax,%rdx,4), %edx
movsbl %cl, %esi
cmpl %esi, %edx
jne 0x13ee
incq %r14
movb (%r15), %cl
incq %r15
testb %cl, %cl
jne 0x13d0
movq %r14, (%rbx)
cmpl %esi, %edx
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones.c
// Function: assert
void assert(bool condition, char *msg) {
   if (!condition) {
      fprintf(stderr, "*** internal assertion error: %s\n", msg);
      if (logfile) fprintf(logfile, "*** internal assertion error: %s\n", msg);
      exit(8); } }

// Assembly:
testl %edi, %edi
je 0x19f6
retq
pushq %rbx
movq %rsi, %rbx
movq 0x75f7(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x3fd9(%rip), %rsi      # 0x59e4
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x77bc(%rip), %rdi      # 0x91d8
testq %rdi, %rdi
je 0x1a32
leaq 0x3fbc(%rip), %rsi      # 0x59e4
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10b0
pushq $0x8
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/LenShustek[P]miditones/miditones.c
// Function: midi_error
void midi_error(char *msg, byte *bufptr) {
   fprintf(stderr, "---> MIDI file error at position %04X (%d): %s\n",
           (uint16_t)(bufptr - buffer), (uint16_t)(bufptr - buffer), msg);
   byte *ptr = bufptr - 16;   // print some bytes surrounding the error
   if (ptr < buffer) ptr = buffer;
   for (; ptr <= bufptr + 16 && ptr < buffer + buflen; ++ptr)
      fprintf(stderr, ptr == bufptr ? " [%02X]  " : "%02X ", *ptr);
   fprintf(stderr, "\n");
   exit(8); }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r8
movq 0x75a6(%rip), %r14      # 0x8ff8
movq (%r14), %rdi
movl 0x7785(%rip), %eax      # 0x91e0
movl %ebx, %ecx
subl %eax, %ecx
movzwl %cx, %ecx
leaq 0x3f9d(%rip), %rsi      # 0x5a06
movl %ecx, %edx
xorl %eax, %eax
callq 0x10b0
leaq -0x10(%rbx), %r15
movq 0x7763(%rip), %rcx      # 0x91e0
cmpq %rcx, %r15
cmovbq %rcx, %r15
leaq 0x10(%rbx), %r12
leaq 0x3fa7(%rip), %r13      # 0x5a36
leaq 0x3faa(%rip), %rbp      # 0x5a40
movq (%r14), %rax
cmpq %r12, %r15
ja 0x1ace
addq 0x7743(%rip), %rcx      # 0x91e8
cmpq %rcx, %r15
jae 0x1ace
cmpq %rbx, %r15
movq %rbp, %rsi
cmoveq %r13, %rsi
movzbl (%r15), %edx
movq %rax, %rdi
xorl %eax, %eax
callq 0x10b0
incq %r15
movq 0x7714(%rip), %rcx      # 0x91e0
jmp 0x1a96
pushq $0xa
popq %rdi
movq %rax, %rsi
callq 0x1090
pushq $0x8
popq %rdi
callq 0x1140