LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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), %r14d
xorl %ebx, %ebx
movl %r14d, -0x4(%rsp)
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %ebp
movl %r8d, %r15d
movl %r15d, %eax
movl %ebp, %r11d
movl %r13d, %r10d
movl %r12d, %r9d
cmpl $0x10, %ebx
jb 0x1d1e2
leal 0xd(%rbx), %r15d
andl $0xf, %r15d
movl %ebx, %r12d
andl $0xf, %r12d
movl %r12d, %r13d
xorl $0x8, %r13d
movl (%rdi,%r13,4), %ebp
xorl (%rdi,%r15,4), %ebp
leal 0x2(%rbx), %r15d
andl $0xf, %r15d
xorl (%rdi,%r15,4), %ebp
xorl (%rdi,%r12,4), %ebp
roll %ebp
movl %ebp, (%rdi,%r12,4)
cmpl $0x13, %ebx
ja 0x1d1fc
movl %r9d, %r15d
xorl %r10d, %r15d
andl %r11d, %r15d
xorl %r9d, %r15d
addl $0x5a827999, %r15d      # imm = 0x5A827999
jmp 0x1d243
cmpl $0x27, %ebx
ja 0x1d213
movl %r9d, %r15d
xorl %r10d, %r15d
xorl %r11d, %r15d
addl $0x6ed9eba1, %r15d      # imm = 0x6ED9EBA1
jmp 0x1d243
cmpl $0x3b, %ebx
ja 0x1d233
movl %r10d, %ebp
andl %r11d, %ebp
movl %r10d, %r15d
orl %r11d, %r15d
andl %r9d, %r15d
orl %ebp, %r15d
addl $0x8f1bbcdc, %r15d      # imm = 0x8F1BBCDC
jmp 0x1d243
movl %r9d, %r15d
xorl %r10d, %r15d
xorl %r11d, %r15d
addl $0xca62c1d6, %r15d      # imm = 0xCA62C1D6
movl %eax, %ebp
roll $0x5, %ebp
addl %ebp, %r14d
addl %r15d, %r14d
movl %ebx, %r12d
andl $0xf, %r12d
movl %r14d, %r15d
addl (%rdi,%r12,4), %r15d
roll $0x1e, %r11d
incl %ebx
movl %r9d, %r14d
movl %r10d, %r12d
movl %r11d, %r13d
movl %eax, %ebp
cmpl $0x50, %ebx
jne 0x1d19d
addl %r8d, %r15d
movl %r15d, 0x40(%rdi)
addl %esi, %eax
movl %eax, 0x44(%rdi)
addl %edx, %r11d
movl %r11d, 0x48(%rdi)
addl %ecx, %r10d
movl %r10d, 0x4c(%rdi)
addl -0x4(%rsp), %r9d
movl %r9d, 0x50(%rdi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x10ada(%rip)     # 0x2dd90
cmovel %eax, %ecx
movzbl %cl, %eax
movb %sil, (%rdi,%rax)
movb 0x58(%rdi), %al
incb %al
movb %al, 0x58(%rdi)
cmpb $0x40, %al
jne 0x1d2da
pushq %rbx
movq %rdi, %rbx
callq 0x1d170
movb $0x0, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1d2a4
cmpb $0x38, 0x58(%rbx)
je 0x1d33e
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x1d32c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1d2a4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1d2a4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1d2a4
movl 0x54(%rbx), %esi
shrl $0x1d, %esi
movq %rbx, %rdi
callq 0x1d2a4
movl 0x54(%rbx), %esi
shrl $0x15, %esi
movl $0xff, %ebp
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1d2a4
movl 0x54(%rbx), %esi
shrl $0xd, %esi
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1d2a4
movl 0x54(%rbx), %esi
shrl $0x5, %esi
andl %ebp, %esi
movq %rbx, %rdi
callq 0x1d2a4
movb 0x54(%rbx), %al
shlb $0x3, %al
movzbl %al, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1d2a4
// File: /workspace/github_c_makefile_star2_O1/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
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 0x1d49d
cmpb $0x0, 0x1096f(%rip)     # 0x2dd90
jne 0x1d42a
movb $0x1, 0x10966(%rip)     # 0x2dd90
leaq 0x40(%rbx), %r12
movaps 0x7d4b(%rip), %xmm0     # 0x25180
movups %xmm0, 0x40(%rbx)
movl $0xc3d2e1f0, %eax       # imm = 0xC3D2E1F0
movq %rax, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
movl %edx, %r13d
xorl %ebp, %ebp
movzbl (%r15,%rbp), %esi
incl 0x54(%rbx)
movq %rbx, %rdi
callq 0x1d2a4
incq %rbp
cmpl %ebp, %r13d
jne 0x1d44b
movq %rbx, %rdi
callq 0x1d321
cmpb $0x1, 0x1091e(%rip)     # 0x2dd90
jne 0x1d489
xorl %eax, %eax
movl (%r12,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%r12,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x1d476
movl 0x10(%r12), %eax
movl %eax, 0x10(%r14)
movups (%r12), %xmm0
movups %xmm0, (%r14)
jmp 0x1d4ab
movslq %edx, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x32b0
cmpb $0x0, 0x108de(%rip)     # 0x2dd90
jne 0x1d4bb
movb $0x1, 0x108d5(%rip)     # 0x2dd90
movaps 0x7cbe(%rip), %xmm0     # 0x25180
movups %xmm0, 0x40(%rbx)
movl $0xc3d2e1f0, %eax       # imm = 0xC3D2E1F0
movq %rax, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
movl $0x59, %r14d
movzbl (%rbx,%r14), %esi
incl 0x54(%rbx)
xorl $0x36, %esi
movq %rbx, %rdi
callq 0x1d2a4
incq %r14
cmpq $0x99, %r14
jne 0x1d4d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x99(%rdi), %r14
callq 0x1d321
movb 0x1086f(%rip), %al      # 0x2dd90
cmpb $0x1, %al
jne 0x1d53a
xorl %ecx, %ecx
movl 0x40(%rbx,%rcx,4), %edx
bswapl %edx
movl %edx, 0x40(%rbx,%rcx,4)
incq %rcx
cmpq $0x5, %rcx
jne 0x1d527
movl 0x50(%rbx), %ecx
movl %ecx, 0x10(%r14)
movups 0x40(%rbx), %xmm0
movups %xmm0, (%r14)
testb %al, %al
jne 0x1d554
movb $0x1, 0x1083c(%rip)     # 0x2dd90
leaq 0x40(%rbx), %r14
movaps 0x7c21(%rip), %xmm0     # 0x25180
movups %xmm0, 0x40(%rbx)
movl $0xc3d2e1f0, %eax       # imm = 0xC3D2E1F0
movq %rax, 0x50(%rbx)
movb $0x0, 0x58(%rbx)
movl $0x59, %r15d
movzbl (%rbx,%r15), %esi
incl 0x54(%rbx)
xorl $0x5c, %esi
movq %rbx, %rdi
callq 0x1d2a4
incq %r15
cmpq $0x99, %r15
jne 0x1d576
movl $0x99, %r15d
movzbl (%rbx,%r15), %esi
incl 0x54(%rbx)
movq %rbx, %rdi
callq 0x1d2a4
incq %r15
cmpq $0xad, %r15
jne 0x1d59b
movq %rbx, %rdi
callq 0x1d321
cmpb $0x1, 0x107ca(%rip)     # 0x2dd90
jne 0x1d5dd
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%r14,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x1d5ca
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x40(%rdi), %rax
movq %rcx, 0x8(%rax)
leaq 0x70(%rdi), %r14
movq 0x70(%rdi), %rdi
cmpq %r14, %rdi
je 0x20265
movq (%rdi), %r15
addq $-0x68, %rdi
callq 0x20c08
movq %r15, %rdi
cmpq %r14, %r15
jne 0x20251
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19a0a
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/main.c
// Function: req_check_expire
static void req_check_expire(time_t now)
{
	dlitem_t* cur, * nxt;
	req_t* req;
	dllist_foreach(&reqs, cur, nxt, req_t, req, entry) {
		if (req->expire > 0 && req->expire <= now) {
			loge("request timeout (id:%d) - %s %s %s\n",
				req->id,
				ns_typename(req->msg->qrs[0].qtype),
				ns_classname(req->msg->qrs[0].qclass),
				req->msg->qrs[0].qname);
			req_remove(req);
		}
		else {
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xd45c(%rip), %r14      # 0x2d6e0
leaq 0xd455(%rip), %r12      # 0x2d6e0
cmpq %r12, %r14
je 0x20340
movq %rdi, %rbx
movq -0x30(%r14), %rax
testq %rax, %rax
jle 0x20340
cmpq %rbx, %rax
jg 0x20340
movq (%r14), %r13
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x20328
movl -0x58(%r14), %ebp
movq -0x50(%r14), %rax
movq 0x10(%rax), %rax
movzwl 0x8(%rax), %edi
callq 0x1a346
movq %rax, %r15
movq -0x50(%r14), %rax
movq 0x10(%rax), %rax
movzwl 0xa(%rax), %edi
callq 0x1a47d
movq %rax, %r10
movq -0x50(%r14), %rax
movq 0x10(%rax), %r11
subq $0x8, %rsp
movl $0x3, %edi
leaq 0x5092(%rip), %rsi      # 0x25392
leaq 0x6055(%rip), %rdx      # 0x2635c
movl $0x1a4, %ecx            # imm = 0x1A4
leaq 0x605a(%rip), %r8       # 0x2636d
movl %ebp, %r9d
xorl %eax, %eax
pushq (%r11)
pushq %r10
pushq %r15
callq 0x17d92
addq $0x20, %rsp
addq $-0x58, %r14
movq %r14, %rdi
callq 0x20c08
movq %r13, %r14
cmpq %r12, %r13
jne 0x20297
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x207ba
cmpw $0x0, 0x4(%r14)
jne 0x20862
movq %rdi, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
movl %r8d, 0xc(%rsp)
xorl %ebp, %ebp
leaq 0x55a(%rip), %rbx       # 0x20d2b
xorl %r12d, %r12d
movl 0xced6(%rip), %eax      # 0x2d6b0
cmpl $0x2, %eax
je 0x207ee
cmpl $0x1, %eax
jne 0x20802
cmpl 0xdd9e(%rip), %ebp      # 0x2e588
jge 0x20806
jmp 0x20823
testl %ebp, %ebp
jne 0x20806
movl 0xcf08(%rip), %eax      # 0x2d700
incl %eax
movl %eax, 0xcf00(%rip)      # 0x2d700
jmp 0x2081a
testl %ebp, %ebp
je 0x2080a
xorl %edi, %edi
jmp 0x20834
xorl %ebp, %ebp
cmpl $0x2, 0xdd75(%rip)      # 0x2e588
jl 0x20823
callq 0x30f0
cltd
idivl 0xdd67(%rip)            # 0x2e588
movl %edx, %ebp
movq 0xdd66(%rip), %rax      # 0x2e590
movslq %ebp, %rcx
leal 0x1(%rcx), %ebp
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2084f
movq 0x8(%r13), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *0x40(%rdi)
cmpl $0x1, %eax
adcl $0x0, %r12d
jmp 0x207d4
testl %r12d, %r12d
movl 0xc(%rsp), %r8d
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdi
jne 0x2086d
movl %r15d, %esi
movq %r14, %rdx
callq 0x20883
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_O1/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 0x20c2d
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %rax, (%rcx)
movq 0x68(%rbx), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rbx), %rax
movq 0x60(%rbx), %rcx
movq %rax, (%rcx)
movq 0x58(%rbx), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x20c63
cmpw $0x0, 0x4(%rax)
je 0x20c63
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x20c63
callq 0x1a29d
movq %rax, %r14
jmp 0x20c66
xorl %r14d, %r14d
movq 0x78(%rbx), %rax
movq 0x80(%rbx), %rcx
movq %rax, (%rcx)
movq 0x78(%rbx), %rax
movq %rcx, 0x8(%rax)
movq 0x80(%rbx), %rsi
cmpq %rsi, (%rsi)
jne 0x20ce1
leaq -0x38(%rsi), %r15
addq $-0x28, %rsi
leaq 0xca59(%rip), %rdi      # 0x2d6f0
callq 0x3946
xorl %eax, %eax
callq 0x17d59
cmpl $0x7, (%rax)
jl 0x20cd1
movq (%r15), %r9
leaq 0x46e0(%rip), %rsi      # 0x25392
leaq 0x5626(%rip), %rdx      # 0x262df
leaq 0x562d(%rip), %r8       # 0x262ed
movl $0x7, %edi
movl $0xfe, %ecx
xorl %eax, %eax
callq 0x17d92
movq (%r15), %rdi
callq 0x3450
movq %r15, %rdi
callq 0x3450
xorl %eax, %eax
callq 0x17d59
cmpl $0x7, (%rax)
jl 0x20d1a
movl (%rbx), %r9d
movq %r14, (%rsp)
leaq 0x4697(%rip), %rsi      # 0x25392
leaq 0x55b4(%rip), %rdx      # 0x262b6
leaq 0x55b8(%rip), %r8       # 0x262c1
movl $0x7, %edi
movl $0x158, %ecx            # imm = 0x158
xorl %eax, %eax
callq 0x17d92
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x142ff
// File: /workspace/github_c_makefile_star2_O1/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)
cmpl $0x0, (%r14)
jle 0x3234
xorl %r12d, %r12d
leaq 0x3665(%rip), %r13      # 0x6880
movq %r15, %rdi
callq 0x30b0
movb %al, (%r12,%r13)
decl (%rbx)
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x321b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x2, %edi
jl 0x32a4
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
decl %ebx
leaq 0x3625(%rip), %r15      # 0x6880
leaq 0x2e0e(%rip), %r12      # 0x6070
leaq 0x10e3(%rip), %r14      # 0x434c
xorl %ebp, %ebp
cmpb $-0x16, 0x360e(%rip)    # 0x6880
movslq %ebp, %rax
je 0x3283
cmpb $0xe, (%rax,%r15)
jne 0x3283
addl $0x5, %ebp
jmp 0x3296
movzbl (%rax,%r15), %eax
movq (%r12,%rax,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3030
incl %ebp
cmpl %ebx, %ebp
jl 0x326b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
movl $0xa, %edi
jmp 0x3070
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/unsorted0/speclist.c
// Function: thrashfile
void thrashfile(FILE *in)
{
int linelen,linenum,total;

total=progtotal;

getline_1(in,&linenum,&linelen,&total);
while(total>3)
  {
  printf("%4d",linenum);
  xlatline(linelen);
  getline_1(in,&linenum,&linelen,&total);
  }
printf("%4d",linenum);
xlatline(linelen);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0xb5bc(%rip), %eax      # 0xe880
leaq 0xc(%rsp), %r14
movl %eax, (%r14)
leaq 0x4(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x31bc
cmpl $0x4, (%r14)
jl 0x3329
leaq 0x1064(%rip), %r14      # 0x434f
leaq 0x4(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0xc(%rsp), %r13
movl 0x4(%rsp), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3030
movl 0x8(%rsp), %edi
callq 0x3243
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x31bc
cmpl $0x3, 0xc(%rsp)
jg 0x32fa
movl 0x4(%rsp), %esi
leaq 0x101b(%rip), %rdi      # 0x434f
xorl %eax, %eax
callq 0x3030
movl 0x8(%rsp), %edi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3243
// File: /workspace/github_c_makefile_star2_O1/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 0x3390
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
leaq 0xfeb(%rip), %rsi       # 0x4353
callq 0x3050
testq %rax, %rax
jne 0x33be
movq 0x2c67(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0xfcf(%rip), %rsi       # 0x4356
xorl %eax, %eax
callq 0x3080
jmp 0x33b4
leaq 0xfdf(%rip), %rdi       # 0x4376
callq 0x3090
leaq 0x1000(%rip), %rdi      # 0x43a3
callq 0x3090
leaq 0x102a(%rip), %rdi      # 0x43d9
callq 0x3090
movl $0x1, %edi
callq 0x3060
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x30a0
movl %eax, 0xb4b0(%rip)      # 0xe880
movq %r14, %rdi
callq 0x32ae
movq %r14, %rdi
callq 0x3040
xorl %edi, %edi
callq 0x3060
// File: /workspace/github_c_makefile_star2_O1/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)
movq $0x0, (%r14)
movq 0x2e0f(%rip), %rdi      # 0x4138
callq 0x10f0
leaq 0x24(%rsp), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1110
cmpl $0x0, 0x2dfb(%rip)      # 0x4140
jle 0x13a9
movl %ebx, %r15d
xorl %r12d, %r12d
leaq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x2dec(%rip), %rdi      # 0x4148
movq %r12, %rsi
shlq $0x20, %rsi
orq %r15, %rsi
movq %rbx, %rdx
callq 0x1170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13bd
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
cmpl 0x2d99(%rip), %eax      # 0x4140
jl 0x1355
movq %rsp, %rdi
callq 0x16d7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x191e
testb $0x2, %sil
je 0x1924
movslq %eax, %rcx
incl %eax
movl $0x27, (%rdx,%rcx,4)
retq
testb $0x4, %sil
jne 0x1973
testb $0x1, (%rdi)
jne 0x1962
testl %ecx, %ecx
movl $0x30, %ecx
movl $0x26, %esi
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 0x1980
leal 0x1e(%rsi), %edi
addl $0x28, %esi
jmp 0x198c
movslq %eax, %rcx
incl %eax
movl $0x31, (%rdx,%rcx,4)
retq
cmpb $0xf, %sil
ja 0x199a
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
movl $0x30, %ecx
movl $0x26, %edi
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_O1/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)
movq $0x0, (%r14)
movq 0x2738(%rip), %rdi      # 0x4138
callq 0x10f0
leaq 0x24(%rsp), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1110
testl %ebp, %ebp
jle 0x1a4c
movl %ebp, %r15d
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13bd
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
decq %r15
jne 0x1a1f
movq %rsp, %rdi
callq 0x16d7
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x4e4d(%rip), %r12      # 0x6080
leaq (%r12,%r15), %rsi
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
je 0x1254
addq $0x5, %r15
cmpq $0x28, %r15
jne 0x1233
movl $0x1, %eax
jmp 0x125e
movzbl 0x4(%r15,%r12), %eax
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4f8d(%rip), %r14      # 0x62c0
cmpb $0x30, (%rax,%r14)
jne 0x1381
leal 0x1(%rdi), %eax
movzbl (%rax,%r14), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x1381
addl $0x2, %edi
xorl %eax, %eax
leaq 0x4d5a(%rip), %rdx      # 0x60b0
leaq 0x5373(%rip), %rcx      # 0x66d0
leal (%rdi,%rax), %ebx
movzbl (%rbx,%r14), %esi
testb $-0x21, %sil
je 0x13c2
movsbq %sil, %r8
cmpb $0x0, (%r8,%rdx)
je 0x13f4
movl %eax, %r8d
incl %eax
movb %sil, (%r8,%rcx)
jmp 0x135d
xorl %eax, %eax
leaq 0x4e26(%rip), %rdx      # 0x61b0
leaq 0x533f(%rip), %rcx      # 0x66d0
leal (%rdi,%rax), %ebx
movzbl (%rbx,%r14), %esi
testb $-0x21, %sil
je 0x13b5
movsbq %sil, %r8
cmpb $0x0, (%r8,%rdx)
je 0x13f4
movl %eax, %r8d
incl %eax
movb %sil, (%r8,%rcx)
jmp 0x1391
movl %eax, %edx
movb $0x0, (%rdx,%rcx)
movl $0xa, %edx
jmp 0x13cd
movl %eax, %edx
movb $0x0, (%rdx,%rcx)
movl $0x10, %edx
testl %eax, %eax
je 0x13f4
leaq 0x52f8(%rip), %rdi      # 0x66d0
xorl %esi, %esi
callq 0x10c0
movl %eax, 0x56eb(%rip)      # 0x6ad0
movl %ebx, %eax
incl %ebx
cmpb $0x20, (%rax,%r14)
je 0x13e5
decl %ebx
jmp 0x140a
movl 0x52c6(%rip), %esi      # 0x66c0
leaq 0x2c6d(%rip), %rdi      # 0x406e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x4e98(%rip), %r15      # 0x62c0
movl %ebx, %eax
incl %ebx
cmpb $0x20, (%rax,%r15)
je 0x1428
addl $-0x2, %ebx
xorl %eax, %eax
leaq 0x5291(%rip), %r14      # 0x66d0
movabsq $0x100100000001, %rcx   # imm = 0x100100000001
leal 0x1(%rbx), %edx
movzbl (%rdx,%r15), %esi
movl %eax, %edi
cmpq $0x2c, %rsi
ja 0x145f
btq %rsi, %rcx
jb 0x1469
incl %eax
movb %sil, (%rdi,%r14)
movl %edx, %ebx
jmp 0x1449
movb $0x0, (%rdi,%r14)
xorl %r12d, %r12d
leaq 0x4c08(%rip), %r13      # 0x6080
leaq (%r12,%r13), %rsi
movq %r14, %rdi
callq 0x1090
testl %eax, %eax
je 0x1494
addq $0x5, %r12
cmpq $0x28, %r12
jne 0x1478
jmp 0x14a0
movzbl 0x4(%r12,%r13), %ecx
movl %ecx, 0x5630(%rip)      # 0x6ad0
testl %eax, %eax
je 0x14bc
movl 0x5216(%rip), %esi      # 0x66c0
leaq 0x2bd9(%rip), %rdi      # 0x408a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
jmp 0x14c5
incl %ebx
cmpb $0x20, (%rbx,%r15)
je 0x14bc
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_O1/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 0x15d1
movl 0x554b(%rip), %ecx      # 0x6ad0
movl %ecx, 0x5549(%rip)      # 0x6ad4
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x15d1
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x15d1
movl 0x5529(%rip), %ecx      # 0x6ad0
movl %ecx, 0x552b(%rip)      # 0x6ad8
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x15d1
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x15d1
movl 0x5507(%rip), %ecx      # 0x6ad0
movl %ecx, 0x550d(%rip)      # 0x6adc
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x161b
movl 0x54df(%rip), %ecx      # 0x6ad0
movl %ecx, 0x54dd(%rip)      # 0x6ad4
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x161b
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x161b
movl 0x54bd(%rip), %ecx      # 0x6ad0
movl %ecx, 0x54bf(%rip)      # 0x6ad8
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %eax, %eax
movl %eax, 0x5440(%rip)      # 0x6ae0
movl %eax, 0x543e(%rip)      # 0x6ae4
leaq 0x4c13(%rip), %rax      # 0x62c0
movl %ebx, %ecx
movsbq (%rcx,%rax), %rcx
incl %ebx
cmpq $0x20, %rcx
je 0x16ad
leaq 0x4aed(%rip), %rdx      # 0x61b0
decl %ebx
cmpb $0x0, (%rcx,%rdx)
je 0x16e7
movl %ebx, %edi
callq 0x1323
testl %eax, %eax
je 0x1715
movl %eax, %ebx
movl $0x1, 0x53fe(%rip)      # 0x6ae0
jmp 0x17ac
xorl %edx, %edx
movl %ebx, %ecx
movl %ecx, %esi
movzbl (%rsi,%rax), %esi
testb $-0x21, %sil
je 0x16fd
incl %ecx
decl %edx
jmp 0x16eb
testl %edx, %edx
je 0x171c
cmpl $-0x40, %edx
jae 0x1734
movl 0x4fb4(%rip), %esi      # 0x66c0
leaq 0x29c8(%rip), %rdi      # 0x40db
jmp 0x1729
xorl %ebx, %ebx
jmp 0x17ac
movl 0x4f9e(%rip), %esi      # 0x66c0
leaq 0x2997(%rip), %rdi      # 0x40c0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1060
jmp 0x17ac
negl %edx
movl 0x4c53b4(%rip), %ecx    # 0x4c6af0
imulq $0x4c, %rcx, %rsi
leaq 0x53a9(%rip), %rcx      # 0x6af0
addq %rcx, %rsi
movl %edx, %edi
xorl %edx, %edx
movl %ebx, %r8d
incl %ebx
movb (%r8,%rax), %r8b
movb %r8b, (%rsi,%rdx)
incq %rdx
cmpq %rdx, %rdi
jne 0x174e
movl 0x4c5387(%rip), %eax    # 0x4c6af0
imulq $0x4c, %rax, %rsi
leaq (%rcx,%rsi), %rdi
movl %edx, %edx
movb $0x0, (%rdx,%rdi)
movl 0x4c5377(%rip), %edx    # 0x4c6af4
movl %edx, 0x40(%rsi,%rcx)
movl 0x4f39(%rip), %edx      # 0x66c0
movl %edx, 0x44(%rsi,%rcx)
movl $0x1, %edx
movl %edx, 0x48(%rsi,%rcx)
incl %eax
movl %eax, 0x4c5354(%rip)    # 0x4c6af0
movl $0x0, 0x532a(%rip)      # 0x6ad0
movl %edx, 0x5338(%rip)      # 0x6ae4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1818
movl 0x5304(%rip), %ecx      # 0x6ad0
movl %ecx, 0x530a(%rip)      # 0x6adc
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x1818
movl %eax, %edi
callq 0x1411
testl %eax, %eax
je 0x1818
movl 0x52e2(%rip), %ecx      # 0x6ad0
movl %ecx, 0x52e4(%rip)      # 0x6ad8
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x1818
movl %eax, %edi
callq 0x1690
testl %eax, %eax
je 0x1818
movl 0x52c0(%rip), %ecx      # 0x6ad0
movl %ecx, 0x52be(%rip)      # 0x6ad4
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1862
movl 0x5298(%rip), %ecx      # 0x6ad0
movl %ecx, 0x529a(%rip)      # 0x6ad8
movl %eax, %edi
callq 0x14d6
testl %eax, %eax
je 0x1862
movl %eax, %edi
callq 0x1690
testl %eax, %eax
je 0x1862
movl 0x5276(%rip), %ecx      # 0x6ad0
movl %ecx, 0x5274(%rip)      # 0x6ad4
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hamsternz[P]drummer/drummer.c
// Function: output_header
int output_header(FILE *f, int samples_to_generate) {
   struct WaveFileHeader header;

   memcpy(header.chunkID,       "RIFF",4);
   intToU4(header.chunkSize,     36 + samples_to_generate*4);
   memcpy(header.chunkFormat,    "WAVE",4);

   memcpy(header.subchunk1ID,   "fmt ",4);
   intToU4(header.subchunk1Size, 16);
   intToU2(header.audioFormat,   1);
   intToU2(header.numChannels,   2);
   intToU4(header.sampleRate,    44100);
   intToU4(header.byteRate,      44100*4);
   intToU2(header.blockAlign,    4);
   intToU2(header.bitsPerSample, 16);
   memcpy(header.subchunk2ID,   "data", 4);
   intToU4(header.subchunk2Size, samples_to_generate*4);
   if(fwrite(&header, sizeof(header), 1, f) != 1) {
      return 0;
   }
   return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, %rcx
leaq 0xc(%rsp), %rdi
movl $0x46464952, (%rdi)     # imm = 0x46464952
leal (,%rsi,4), %edx
leal 0x24(,%rsi,4), %eax
movb %al, 0x4(%rdi)
movb %ah, 0x11(%rsp)
movl %eax, %r8d
shrl $0x10, %r8d
movb %r8b, 0x6(%rdi)
shrl $0x18, %eax
movb %al, 0x7(%rdi)
movabsq $0x20746d6645564157, %rax # imm = 0x20746D6645564157
movq %rax, 0x8(%rdi)
movaps 0xcba(%rip), %xmm0      # 0x2010
movups %xmm0, 0x10(%rdi)
movabsq $0x6174616400100004, %rax # imm = 0x6174616400100004
movq %rax, 0x20(%rdi)
movb %dl, 0x28(%rdi)
movl %esi, %eax
shrl $0x6, %eax
movb %al, 0x29(%rdi)
movl %esi, %eax
shrl $0xe, %eax
movb %al, 0x2a(%rdi)
shrl $0x16, %esi
movb %sil, 0x2b(%rdi)
movl $0x2c, %esi
movl $0x1, %edx
callq 0x1060
xorl %ecx, %ecx
cmpq $0x1, %rax
sete %cl
movl %ecx, %eax
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x4, %esi
movl $0x1, %edx
callq 0x1060
xorl %ecx, %ecx
cmpq $0x1, %rax
sete %cl
movl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, 0x18286(%rip)     # 0x19668
leaq 0x164f3(%rip), %rdi     # 0x178dc
movl $0x42ae, %esi           # imm = 0x42AE
xorl %eax, %eax
callq 0x1040
leaq 0x164f8(%rip), %rdi     # 0x178f4
movl $0x3b4, %esi            # imm = 0x3B4
xorl %eax, %eax
callq 0x1040
leaq 0x164fd(%rip), %rdi     # 0x1790c
movl $0xa6a40, %ebp          # imm = 0xA6A40
movl $0xa6a40, %esi          # imm = 0xA6A40
xorl %eax, %eax
callq 0x1040
leaq 0x16500(%rip), %rdi     # 0x17927
leaq 0x16501(%rip), %rsi     # 0x1792f
callq 0x1050
testq %rax, %rax
je 0x14cd
movq %rax, %rbx
movq %rax, %rdi
movl $0xa6a40, %esi          # imm = 0xA6A40
callq 0x1309
movq %rsp, %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
callq 0x118c
movl (%rsp), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1060
decl %ebp
jne 0x1454
movq %rbx, %rdi
callq 0x1030
movl 0x181d2(%rip), %esi     # 0x1965c
leaq 0x164bc(%rip), %rdi     # 0x1794d
xorl %eax, %eax
callq 0x1040
movl 0x181c6(%rip), %esi     # 0x19664
leaq 0x164b9(%rip), %rdi     # 0x1795e
xorl %eax, %eax
callq 0x1040
movl 0x181ae(%rip), %esi     # 0x19660
leaq 0x164b6(%rip), %rdi     # 0x1796f
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1080
jmp 0x14c0
// File: /workspace/github_c_makefile_star2_O1/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
xorl %ecx, %ecx
movsbq (%rbx,%rcx), %rdx
movsbl (%r14,%rcx), %esi
cmpl %esi, (%rax,%rdx,4)
jne 0x1435
leaq 0x1(%rcx), %rdx
cmpb $0x0, 0x1(%r14,%rcx)
movq %rdx, %rcx
jne 0x140e
cmpb $0x0, (%rbx,%rdx)
sete %al
jmp 0x1437
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
incq %r15
movsbq (%r12), %rcx
movsbl -0x1(%r15), %edx
cmpl %edx, (%rax,%rcx,4)
jne 0x14f0
incq %r12
cmpb $0x0, (%r15)
leaq 0x1(%r15), %r15
jne 0x1465
leaq 0x1(%r12), %r15
cmpb $0x3d, (%r12)
cmovneq %r12, %r15
cmpb $0x30, (%r15)
jne 0x14ae
cmpb $0x78, 0x1(%r15)
leaq 0x3bdd(%rip), %rax      # 0x507e
leaq 0x3bdb(%rip), %rsi      # 0x5083
cmoveq %rax, %rsi
jmp 0x14b5
leaq 0x3bce(%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 0x14f3
movl 0xc(%rsp), %eax
cmpl %r14d, %eax
setl %cl
cmpl %ebp, %eax
setg %dl
orb %cl, %dl
jne 0x14f0
movslq 0x8(%rsp), %rcx
cmpb $0x0, (%r15,%rcx)
je 0x1503
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 0x14f3
// File: /workspace/github_c_makefile_star2_O1/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
incq %r15
movsbq (%r14), %rcx
movl (%rax,%rcx,4), %ecx
movsbl -0x1(%r15), %edx
cmpl %edx, %ecx
jne 0x1543
incq %r14
cmpb $0x0, (%r15)
leaq 0x1(%r15), %r15
jne 0x1523
movq %r14, (%rbx)
cmpl %edx, %ecx
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7457(%rip), %r14      # 0x8ff8
movq (%r14), %rdi
movl 0x7636(%rip), %eax      # 0x91e0
movl %ebx, %ecx
subl %eax, %ecx
movzwl %cx, %ecx
leaq 0x3e4e(%rip), %rsi      # 0x5a06
movl %ecx, %edx
xorl %eax, %eax
callq 0x10b0
leaq -0x10(%rbx), %r15
movq 0x7614(%rip), %rax      # 0x91e0
cmpq %rax, %r15
cmovbq %rax, %r15
leaq 0x10(%rbx), %r12
cmpq %r12, %r15
ja 0x1c29
addq 0x7605(%rip), %rax      # 0x91e8
cmpq %rax, %r15
jae 0x1c29
leaq 0x3e47(%rip), %r13      # 0x5a36
leaq 0x3e4a(%rip), %rbp      # 0x5a40
movq (%r14), %rdi
cmpq %rbx, %r15
movq %rbp, %rsi
cmoveq %r13, %rsi
movzbl (%r15), %edx
xorl %eax, %eax
callq 0x10b0
incq %r15
cmpq %r12, %r15
ja 0x1c29
movq 0x75c3(%rip), %rax      # 0x91e0
addq 0x75c4(%rip), %rax      # 0x91e8
cmpq %rax, %r15
jb 0x1bf6
movq (%r14), %rsi
movl $0xa, %edi
callq 0x1090
movl $0x8, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/LenShustek[P]miditones/miditones.c
// Function: miditones_strlcpy
size_t miditones_strlcpy (char *dst, const char *src, size_t siz) {
   char *d = dst;
   const char *s = src;
   size_t n = siz;
   if (n != 0) {   /* Copy as many bytes as will fit */
      while (--n != 0) {
         if ((*d++ = *s++) == '\0') break; } }
   if (n == 0) {   /* Not enough room in dst, add NUL and traverse rest of src */
      if (siz != 0) *d = '\0';  /* NUL-terminate dst */
      while (*s++) ; }
   return (s - src - 1);        /* count does not include NUL */
}

// Assembly:
movq %rsi, %rax
testq %rdx, %rdx
je 0x1c7d
leaq -0x1(%rdx), %r8
movq %rax, %rcx
subq $0x1, %r8
setb %sil
jb 0x1c83
movb (%rcx), %r9b
incq %rcx
movb %r9b, (%rdi)
incq %rdi
testb %r9b, %r9b
jne 0x1c60
jmp 0x1c83
movb $0x1, %sil
movq %rax, %rcx
testb %sil, %sil
je 0x1c9e
testq %rdx, %rdx
je 0x1c90
movb $0x0, (%rdi)
leaq 0x1(%rcx), %rdx
cmpb $0x0, (%rcx)
movq %rdx, %rcx
jne 0x1c90
jmp 0x1ca1
movq %rcx, %rdx
notq %rax
addq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/LenShustek[P]miditones/miditones.c
// Function: miditones_strlcat
size_t miditones_strlcat (char *dst, const char *src, size_t siz) {
   char *d = dst;
   const char *s = src;
   size_t n = siz;
   size_t dlen;
   /* Find the end of dst and adjust bytes left but don't go past end */
   while (n-- != 0 && *d != '\0') d++;
   dlen = d - dst;
   n = siz - dlen;
   if (n == 0) return (dlen + strlength (s));
   while (*s != '\0') {
      if (n != 1) {
         *d++ = *s;
         n--; }
      s++; }
   *d = '\0';
   return (dlen + (s - src));   /* count does not include NUL */
}

// Assembly:
movq %rdi, %r8
testq %rdx, %rdx
je 0x1ccb
leaq (%rdi,%rdx), %rax
movq %rdx, %rcx
movq %rdi, %r8
cmpb $0x0, (%r8)
je 0x1ccb
incq %r8
decq %rcx
jne 0x1cba
movq %rax, %r8
movq %r8, %rcx
subq %rdi, %rcx
subq %rcx, %rdx
je 0x1d10
movb (%rsi), %dil
movq %rsi, %rax
testb %dil, %dil
je 0x1d07
movl $0x1, %r9d
cmpq $0x1, %rdx
jne 0x1cf2
movq %r9, %rdx
jmp 0x1cfb
movb %dil, (%r8)
incq %r8
decq %rdx
movb 0x1(%rax), %dil
incq %rax
testb %dil, %dil
jne 0x1ce7
movb $0x0, (%r8)
subq %rsi, %rax
jmp 0x1d34
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rdx, %rax
cmpb $0x0, (%rsi)
leaq 0x1(%rsi), %rsi
jne 0x1d24
sarq $0x20, %rax
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/LenShustek[P]miditones/miditones.c
// Function: charcmp
int charcmp (const char *buf, const char *match) {
   int len, i;
   len = strlength (match);
   for (i = 0; i < len; ++i)
      if (buf[i] != match[i]) return 0;
   return 1; }

// Assembly:
movq $-0x1, %rax
cmpb $0x0, 0x1(%rsi,%rax)
leaq 0x1(%rax), %rax
jne 0x1d3f
testq %rax, %rax
je 0x1d70
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
xorl %eax, %eax
xorl %edx, %edx
movb (%rdi,%rdx), %r8b
cmpb (%rsi,%rdx), %r8b
jne 0x1d75
incq %rdx
cmpq %rdx, %rcx
jne 0x1d5e
movl $0x1, %eax
retq