LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: scopeinit
void
scopeinit(void)
{
	static struct decl builtins[] = {
		{.name = "__builtin_alloca",      .kind = DECLBUILTIN, .u.builtin = BUILTINALLOCA},
		{.name = "__builtin_constant_p",  .kind = DECLBUILTIN, .u.builtin = BUILTINCONSTANTP},
		{.name = "__builtin_expect",      .kind = DECLBUILTIN, .u.builtin = BUILTINEXPECT},
		{.name = "__builtin_inff",        .kind = DECLBUILTIN, .u.builtin = BUILTININFF},
		{.name = "__builtin_nanf",        .kind = DECLBUILTIN, .u.builtin = BUILTINNANF},
		{.name = "__builtin_offsetof",    .kind = DECLBUILTIN, .u.builtin = BUILTINOFFSETOF},
		{.name = "__builtin_types_compatible_p", .kind = DECLBUILTIN, .u.builtin = BUILTINTYPESCOMPATIBLEP},
		{.name = "__builtin_unreachable", .kind = DECLBUILTIN, .u.builtin = BUILTINUNREACHABLE},
		{.name = "__builtin_va_arg",      .kind = DECLBUILTIN, .u.builtin = BUILTINVAARG},
		{.name = "__builtin_va_copy",     .kind = DECLBUILTIN, .u.builtin = BUILTINVACOPY},
		{.name = "__builtin_va_end",      .kind = DECLBUILTIN, .u.builtin = BUILTINVAEND},
		{.name = "__builtin_va_start",    .kind = DECLBUILTIN, .u.builtin = BUILTINVASTART},
	};
	static struct decl valist;
	struct decl *d;

	for (d = builtins; d < builtins + LEN(builtins); ++d)
		scopeputdecl(&filescope, d);
	valist.name = "__builtin_va_list";
	valist.kind = DECLTYPE;
	valist.type = targ->typevalist;
	scopeputdecl(&filescope, &valist);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq $-0x48, %r14
leaq 0xeb91(%rip), %r15      # 0x1b150
leaq 0xfada(%rip), %rbx      # 0x1c0a0
leaq (%r14,%r15), %rsi
addq $0x48, %rsi
movq %rbx, %rdi
callq 0xc628
addq $0x48, %r14
cmpq $0x318, %r14            # imm = 0x318
jb 0xc5c6
leaq 0x890f(%rip), %rax      # 0x14ef9
movq %rax, 0xfa67(%rip)      # 0x1c058
leaq 0xfa60(%rip), %rsi      # 0x1c058
movl $0x0, 0xfa5e(%rip)      # 0x1c060
leaq 0xfaf7(%rip), %rax      # 0x1c100
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xfa51(%rip)      # 0x1c068
leaq 0xfa82(%rip), %rdi      # 0x1c0a0
popq %rbx
popq %r14
popq %r15
jmp 0xc628
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: scopeputdecl
void
scopeputdecl(struct scope *s, struct decl *d)
{
	struct mapkey k;

	if (!s->decls.len)
		mapinit(&s->decls, 32);
	mapkey(&k, d->name, strlen(d->name));
	*mapput(&s->decls, &k) = d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x20(%rdi), %r14
cmpq $0x0, 0x20(%rdi)
jne 0xc64e
movl $0x20, %esi
movq %r14, %rdi
callq 0xa6f3
movq (%rbx), %r15
movq %r15, %rdi
callq 0x3090
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa6c4
movq %r14, %rdi
movq %r12, %rsi
callq 0xa7db
movq %rbx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: mkscope
struct scope *
mkscope(struct scope *parent)
{
	struct scope *s;

	s = xmalloc(sizeof(*s));
	s->decls.len = 0;
	s->tags.len = 0;
	s->breaklabel = parent->breaklabel;
	s->continuelabel = parent->continuelabel;
	s->switchcases = parent->switchcases;
	s->parent = parent;

	return s;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x60, %edi
callq 0xe13e
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movq %rcx, (%rax)
movq 0x40(%rbx), %rcx
movq %rcx, 0x40(%rax)
movq 0x48(%rbx), %rcx
movq %rcx, 0x48(%rax)
movq 0x50(%rbx), %rcx
movq %rcx, 0x50(%rax)
movq %rbx, 0x58(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: delscope
struct scope *
delscope(struct scope *s)
{
	struct scope *parent = s->parent;

	if (s->decls.len)
		mapfree(&s->decls, NULL);
	if (s->tags.len)
		mapfree(&s->tags, NULL);
	free(s);

	return parent;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x58(%rdi), %rbx
cmpq $0x0, 0x20(%rdi)
je 0xc6d6
leaq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0xa778
cmpq $0x0, (%r14)
je 0xc6e6
movq %r14, %rdi
xorl %esi, %esi
callq 0xa778
movq %r14, %rdi
callq 0x3250
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: scopegetdecl
struct decl *
scopegetdecl(struct scope *s, const char *name, bool recurse)
{
	struct decl *d;
	struct mapkey k;

	mapkey(&k, name, strlen(name));
	do {
		d = s->decls.len ? mapget(&s->decls, &k) : NULL;
		s = s->parent;
	} while (!d && s && recurse);

	return d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3090
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xa6c4
cmpq $0x0, 0x20(%r14)
je 0xc73a
leaq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0xa991
jmp 0xc73c
xorl %eax, %eax
testq %rax, %rax
jne 0xc74e
movq 0x58(%r14), %r14
testq %r14, %r14
je 0xc74e
testb %bl, %bl
jne 0xc725
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: scopegettag
struct type *
scopegettag(struct scope *s, const char *name, bool recurse)
{
	struct type *t;
	struct mapkey k;

	mapkey(&k, name, strlen(name));
	do {
		t = s->tags.len ? mapget(&s->tags, &k) : NULL;
		s = s->parent;
	} while (!t && s && recurse);

	return t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3090
movq %rsp, %r15
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xa6c4
cmpq $0x0, (%r14)
je 0xc799
movq %r14, %rdi
movq %r15, %rsi
callq 0xa991
jmp 0xc79b
xorl %eax, %eax
testq %rax, %rax
jne 0xc7ad
movq 0x58(%r14), %r14
testq %r14, %r14
je 0xc7ad
testb %bl, %bl
jne 0xc786
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/scope.c
// Function: scopeputtag
void
scopeputtag(struct scope *s, const char *name, struct type *t)
{
	struct mapkey k;

	if (!s->tags.len)
		mapinit(&s->tags, 32);
	mapkey(&k, name, strlen(name));
	*mapput(&s->tags, &k) = t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, (%rdi)
jne 0xc7e0
movl $0x20, %esi
movq %r14, %rdi
callq 0xa6f3
movq %r15, %rdi
callq 0x3090
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa6c4
movq %r14, %rdi
movq %r12, %rsi
callq 0xa7db
movq %rbx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/stmt.c
// Function: label
static bool
label(struct func *f, struct scope *s)
{
	char *name;
	struct gotolabel *g;
	struct block *b;
	unsigned long long i;

	attr(NULL, 0);
	switch (tok.kind) {
	case TCASE:
		next();
		if (!s->switchcases)
			error(&tok.loc, "'case' label must be in switch");
		b = mkblock("switch_case");
		funclabel(f, b);
		i = intconstexpr(s, true);
		switchcase(s->switchcases, i, b);
		expect(TCOLON, "after case expression");
		break;
	case TDEFAULT:
		next();
		if (!s->switchcases)
			error(&tok.loc, "'default' label must be in switch");
		if (s->switchcases->defaultlabel)
			error(&tok.loc, "multiple 'default' labels");
		expect(TCOLON, "after 'default'");
		s->switchcases->defaultlabel = mkblock("switch_default");
		funclabel(f, s->switchcases->defaultlabel);
		break;
	case TIDENT:
		name = tok.lit;
		if (!peek(TCOLON))
			return false;
		g = funcgoto(f, name);
		g->defined = true;
		funclabel(f, g->label);
		break;
	default:
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
xorl %edi, %edi
xorl %esi, %esi
callq 0x33ec
leaq 0xefb3(%rip), %r15      # 0x1c108
movl (%r15), %eax
cmpl $0x4, %eax
je 0xd247
cmpl $0x12, %eax
je 0xd1dc
cmpl $0xd, %eax
jne 0xd276
callq 0xa9d0
cmpq $0x0, 0x50(%r14)
jne 0xd190
addq $0x8, %r15
leaq 0x8042(%rip), %rsi      # 0x151c8
movq %r15, %rdi
xorl %eax, %eax
callq 0xd56a
leaq 0x8050(%rip), %rdi      # 0x151e7
callq 0xe2e3
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0xed47
movq %r14, %rdi
movl $0x1, %esi
callq 0x74a9
movq 0x50(%r14), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xe2a4
leaq 0x8026(%rip), %rsi      # 0x151f3
movl $0x5f, %edi
callq 0xb07a
jmp 0xd273
callq 0xa9d0
cmpq $0x0, 0x50(%r14)
jne 0xd1fa
leaq 0x8(%r15), %rdi
leaq 0x8016(%rip), %rsi      # 0x15209
xorl %eax, %eax
callq 0xd56a
movq 0x50(%r14), %rax
cmpq $0x0, 0x10(%rax)
je 0xd21a
addq $0x8, %r15
leaq 0x801b(%rip), %rsi      # 0x1522b
movq %r15, %rdi
xorl %eax, %eax
callq 0xd56a
leaq 0x692e(%rip), %rsi      # 0x13b4f
movl $0x5f, %edi
callq 0xb07a
leaq 0x8013(%rip), %rdi      # 0x15245
callq 0xe2e3
movq 0x50(%r14), %rcx
movq %rax, 0x10(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
jmp 0xd26e
movq 0x20(%r15), %r14
movl $0x5f, %edi
callq 0xafb3
testb %al, %al
je 0xd285
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf19d
movb $0x1, 0x8(%rax)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xed47
movb $0x1, %r12b
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r12d, %r12d
jmp 0xd276
nop
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/targ.c
// Function: targinit
void
targinit(const char *name)
{
	size_t i;
	enum typequal qual;

	if (!name) {
		/* TODO: provide a way to set this default */
		targ = &alltargs[0];
	}
	for (i = 0; i < LEN(alltargs) && !targ; ++i) {
		if (strcmp(alltargs[i].name, name) == 0)
			targ = &alltargs[i];
	}
	if (!targ)
		fatal("unknown target '%s'", name);
	typechar.u.basic.issigned = targ->signedchar;
	qual = QUALNONE;
	typeadjvalist = typeadjust(targ->typevalist, &qual);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0xd2aa
leaq 0xd7ed(%rip), %rax      # 0x1aa90
movq %rax, 0xee56(%rip)      # 0x1c100
movq 0xee4f(%rip), %r14      # 0x1c100
testq %r14, %r14
sete %al
jne 0xd2f4
leaq 0xd7d0(%rip), %r15      # 0x1aa90
xorl %r12d, %r12d
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x3140
testl %eax, %eax
jne 0xd2dc
movq %r15, 0xee27(%rip)      # 0x1c100
movq %r15, %r14
testq %r14, %r14
sete %al
cmpq $0x1, %r12
ja 0xd2f4
incq %r12
addq $0x20, %r15
testq %r14, %r14
je 0xd2c3
testb %al, %al
je 0xd309
leaq 0x7f55(%rip), %rdi      # 0x15254
movq %rbx, %rsi
xorl %eax, %eax
callq 0xe054
movq 0xedf0(%rip), %rax      # 0x1c100
cmpl $0x0, 0x18(%rax)
leaq 0xe72d(%rip), %rcx      # 0x1ba48
setne 0x40(%rcx)
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rax), %rdi
callq 0xdc0b
leaq 0xedf6(%rip), %rcx      # 0x1c130
movq %rax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/token.c
// Function: tokenprint
void
tokenprint(const struct token *t)
{
	const char *str;

	if (t->space)
		fputc(' ', stdout);
	switch (t->kind) {
	case TIDENT:
	case TNUMBER:
	case TCHARCONST:
	case TSTRINGLIT:
		str = t->lit;
		break;
	case TNEWLINE:
		str = "\n";
		break;
	case TEOF:
		return;
	default:
		str = tokstr[t->kind];
	}
	if (!str)
		fatal("cannot print token %d", t->kind);
	fputs(str, stdout);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x5(%rdi)
jne 0xd36a
movq 0xdc63(%rip), %rax      # 0x1afc0
movq (%rax), %rsi
movl $0x20, %edi
callq 0x3110
movl (%rbx), %esi
leal -0x4(%rsi), %eax
cmpl $0x4, %eax
jae 0xd3a1
addq $0x20, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xd38e
leaq 0x7f7c(%rip), %rdi      # 0x15303
xorl %eax, %eax
callq 0xe054
movq 0xdc2b(%rip), %rax      # 0x1afc0
movq (%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x30f0
cmpl $0x1, %esi
je 0xd3b4
cmpl $0x2, %esi
jne 0xd3b6
leaq 0x7302(%rip), %rbx      # 0x146b4
jmp 0xd37b
popq %rbx
retq
leaq 0xe253(%rip), %rax      # 0x1b610
leaq (%rax,%rsi,8), %rbx
jmp 0xd378
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/token.c
// Function: tokencheck
char *
tokencheck(const struct token *t, enum tokenkind kind, const char *msg)
{
	char want[64], got[64];

	if (t->kind != kind) {
		tokendesc(want, sizeof(want), kind, NULL);
		tokendesc(got, sizeof(got), t->kind, t->lit);
		error(&t->loc, "expected %s %s, saw %s", want, msg, got);
	}
	return t->lit;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
cmpl %esi, (%rdi)
jne 0xd3eb
movq 0x20(%r14), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %rbx
leaq 0x40(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0xd42d
movl (%r14), %esi
movq 0x20(%r14), %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0xd42d
addq $0x8, %r14
leaq 0x7eff(%rip), %rsi      # 0x15319
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0xd56a
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/token.c
// Function: tokendesc
static void
tokendesc(char *buf, size_t len, enum tokenkind kind, const char *lit)
{
	const char *class;
	bool quote = true;

	switch (kind) {
	case TEOF:       class = "EOF";                       break;
	case TIDENT:     class = "identifier"; quote = true;  break;
	case TNUMBER:    class = "number";     quote = true;  break;
	case TCHARCONST: class = "character";  quote = false; break;
	case TSTRINGLIT: class = "string";     quote = false; break;
	case TNEWLINE:   class = "newline";                   break;
	case TOTHER:     class = NULL;                        break;
	default:
		class = NULL;
		lit = kind < LEN(tokstr) ? tokstr[kind] : NULL;
	}
	if (class && lit)
		snprintf(buf, len, quote ? "%s '%s'" : "%s %s", class, lit);
	else if (class)
		snprintf(buf, len, "%s", class);
	else if (kind == TOTHER && !isprint(*(unsigned char *)lit))
		snprintf(buf, len, "<U+%04x>", *(unsigned char *)lit);
	else if (lit)
		snprintf(buf, len, "'%s'", lit);
	else
		snprintf(buf, len, "<unknown>");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x7f23(%rip), %rdx      # 0x15361
leal -0x1(%rsi), %ecx
cmpl $0x6, %ecx
ja 0xd47c
movb $0x1, %al
leaq 0x7e35(%rip), %rdi      # 0x15284
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
leaq 0x7ee5(%rip), %rcx      # 0x15344
jmp 0xd4b7
leaq 0x7ee0(%rip), %rcx      # 0x15348
jmp 0xd4b7
leaq 0x7ee8(%rip), %rcx      # 0x15359
jmp 0xd4b7
leaq 0x58d0(%rip), %rcx      # 0x12d4a
jmp 0xd4b7
cmpl $0x70, %esi
ja 0xd4b0
movl %esi, %eax
leaq 0xe186(%rip), %rcx      # 0x1b610
movq (%rcx,%rax,8), %r14
jmp 0xd4b3
leaq 0x7ed2(%rip), %rdx      # 0x15369
leaq 0x7eb1(%rip), %rcx      # 0x1534f
jmp 0xd4b7
leaq 0x7ec2(%rip), %rdx      # 0x15369
leaq 0x508d(%rip), %rcx      # 0x1253b
jmp 0xd4b7
xorl %r14d, %r14d
xorl %eax, %eax
xorl %ecx, %ecx
testq %r14, %r14
setne %dil
andb %al, %dil
cmpb $0x1, %dil
jne 0xd4e0
movl $0x40, %esi
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30c0
testb %al, %al
je 0xd4f5
leaq 0x64a3(%rip), %rdx      # 0x1398e
movl $0x40, %esi
movq %rbx, %rdi
jmp 0xd541
cmpl $0x3, %esi
jne 0xd52a
callq 0x3240
movq (%rax), %rax
movzbl (%r14), %ecx
testb $0x40, 0x1(%rax,%rcx,2)
jne 0xd52a
leaq 0x7e5b(%rip), %rdx      # 0x1536f
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30c0
testq %r14, %r14
je 0xd54f
leaq 0x643c(%rip), %rdx      # 0x13972
movl $0x40, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30c0
movabsq $0x6e776f6e6b6e753c, %rax # imm = 0x6E776F6E6B6E753C
movq %rax, (%rbx)
movw $0x3e, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/token.c
// Function: error
void error(const struct location *loc, const char *fmt, ...)
{
	va_list ap;

	fprintf(stderr, "%s:%zu:%zu: error: ", loc->file, loc->line, loc->col);
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
	putc('\n', stderr);
	exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
leaq 0x20(%rsp), %r14
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0xd5c9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0xda28(%rip), %r15      # 0x1aff8
movq (%r15), %rax
movq (%rdi), %rdx
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %r8
leaq 0x7d4b(%rip), %rsi      # 0x15330
movq %rax, %rdi
xorl %eax, %eax
callq 0x3160
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x3200
movq (%r15), %rsi
movl $0xa, %edi
callq 0x3150
movl $0x1, %edi
callq 0x3210
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/tree.c
// Function: treeinsert
void *
treeinsert(void **root, unsigned long long key, size_t sz)
{
	void **a[MAXH];
	struct treenode *n = *root;
	int i = 0;

	a[i++] = root;
	while (n) {
		if (key == n->key) {
			n->new = false;
			return n;
		}
		a[i++] = &n->child[key > n->key];
		n = n->child[key > n->key];
	}
	assert(sz > sizeof(*n));
	n = xmalloc(sz);
	n->key = key;
	n->child[0] = n->child[1] = 0;
	n->height = 1;
	/* insert new node, rebalance ancestors.  */
	*a[--i] = n;
	while (i && balance(a[--i]))
		;
	n->new = true;
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rsi, %rbx
movq (%rdi), %rax
movq %rdi, (%rsp)
xorl %r14d, %r14d
testq %rax, %rax
je 0xd677
cmpq %rbx, (%rax)
je 0xd7b2
setb %cl
movzbl %cl, %ecx
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp,%r14,8)
movq (%rax), %rax
incq %r14
jmp 0xd64e
cmpq $0x20, %rdx
jbe 0xd7c5
movq %rdx, %rdi
callq 0xe13e
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl $0x1, 0x18(%rax)
movl %r14d, %edx
movq (%rsp,%rdx,8), %rcx
movq %rax, (%rcx)
movb $0x1, %cl
testl %r14d, %r14d
je 0xd7b4
decq %rdx
movq (%rsp,%rdx,8), %rsi
movq (%rsi), %rdi
movq 0x8(%rdi), %r10
xorl %r9d, %r9d
movl $0x0, %r8d
testq %r10, %r10
je 0xd6cf
movl 0x18(%r10), %r8d
movq 0x10(%rdi), %r10
testq %r10, %r10
je 0xd6dc
movl 0x18(%r10), %r9d
movl %r8d, %r10d
subl %r9d, %r10d
incl %r10d
cmpl $0x2, %r10d
ja 0xd705
cmpl %r9d, %r8d
cmovgl %r8d, %r9d
incl %r9d
movl %r9d, %r8d
subl 0x18(%rdi), %r8d
movl %r9d, 0x18(%rdi)
jmp 0xd7a1
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpl %r9d, %r8d
setge %r11b
setl %bl
movq 0x8(%rdi,%rbx,8), %r10
movq 0x8(%r10,%r11,8), %r9
xorl %r14d, %r14d
movl $0x0, %r8d
testq %r9, %r9
je 0xd730
movl 0x18(%r9), %r8d
movq 0x8(%r10,%rbx,8), %r15
testq %r15, %r15
je 0xd73e
movl 0x18(%r15), %r14d
movl 0x18(%rdi), %ebp
cmpl %r14d, %r8d
jle 0xd77a
shll $0x3, %r11d
movq 0x8(%r9,%r11), %r14
shll $0x3, %ebx
movq %r14, 0x8(%rdi,%rbx)
movq 0x8(%r9,%rbx), %r14
movq %r14, 0x8(%r10,%r11)
movq %rdi, 0x8(%r9,%r11)
movq %r10, 0x8(%r9,%rbx)
movl %r8d, 0x18(%rdi)
movl %r8d, 0x18(%r10)
movl $0x1, %edi
jmp 0xd794
movq %r9, 0x8(%rdi,%rbx,8)
movq %rdi, 0x8(%r10,%r11,8)
leal 0x1(%r8), %r9d
movl %r9d, 0x18(%rdi)
movl $0x2, %edi
movq %r10, %r9
addl %edi, %r8d
movl %r8d, 0x18(%r9)
movq %r9, (%rsi)
subl %ebp, %r8d
addq $-0x1, %rdx
jae 0xd7b4
testl %r8d, %r8d
jne 0xd6b2
jmp 0xd7b4
xorl %ecx, %ecx
movb %cl, 0x1c(%rax)
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7bb6(%rip), %rdi      # 0x15382
leaq 0x7bbf(%rip), %rsi      # 0x15392
leaq 0x7bbf(%rip), %rcx      # 0x15399
movl $0x55, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: mktype
struct type *
mktype(enum typekind kind, enum typeprop prop)
{
	struct type *t;

	t = xmalloc(sizeof(*t));
	t->kind = kind;
	t->prop = prop;
	t->value = NULL;
	t->incomplete = false;
	t->flexible = false;

	return t;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x58, %edi
callq 0xe13e
movl %ebp, (%rax)
movl %ebx, 0x4(%rax)
movq $0x0, 0x18(%rax)
movw $0x0, 0x3c(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: mkpointertype
struct type *
mkpointertype(struct type *base, enum typequal qual)
{
	struct type *t;

	t = mktype(TYPEPOINTER, PROPSCALAR);
	t->base = base;
	t->qual = qual;
	t->size = 8;
	t->align = 8;
	if (base)
		t->prop |= base->prop & PROPVM;

	return t;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x58, %edi
callq 0xe13e
movabsq $0x100000000c, %rcx     # imm = 0x100000000C
movq %rcx, (%rax)
movq $0x0, 0x18(%rax)
movw $0x0, 0x3c(%rax)
movq %rbx, 0x20(%rax)
movl %ebp, 0x38(%rax)
movq $0x8, 0x10(%rax)
movl $0x8, 0x8(%rax)
testq %rbx, %rbx
je 0xd863
movl 0x4(%rbx), %ecx
andl $0x40, %ecx
orl $0x10, %ecx
movl %ecx, 0x4(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: mkarraytype
struct type *
mkarraytype(struct type *base, enum typequal qual, unsigned long long len)
{
	struct type *t;

	t = mktype(TYPEARRAY, 0);
	t->base = base;
	t->qual = qual;
	t->u.array.length = NULL;
	t->u.array.ptrqual = QUALNONE;
	t->incomplete = !len;
	if (t->base) {
		t->align = t->base->align;
		t->size = t->base->size * len;  /* XXX: overflow? */
	}

	return t;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x58, %edi
callq 0xe13e
movq $0xd, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x18(%rax)
movb $0x0, 0x3d(%rax)
movq %r14, 0x20(%rax)
movl %ebp, 0x38(%rax)
movq %rcx, 0x40(%rax)
movl $0x0, 0x48(%rax)
testq %rbx, %rbx
sete 0x3c(%rax)
testq %r14, %r14
je 0xd8bf
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rax)
imulq 0x10(%r14), %rbx
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typecompatible
bool
typecompatible(struct type *t1, struct type *t2)
{
	struct decl *p1, *p2;
	struct expr *e1, *e2;

	if (t1 == t2)
		return true;
	if (t1->kind != t2->kind) {
		/*
		enum types are compatible with their underlying
		type, but not with each other (unless they are the
		same type)
		*/
		return t1->kind == TYPEENUM && t2 == t1->base ||
		       t2->kind == TYPEENUM && t1 == t2->base;
	}
	switch (t1->kind) {
	case TYPEPOINTER:
		goto derived;
	case TYPEARRAY:
		if (t1->incomplete || t2->incomplete)
			goto derived;
		e1 = t1->u.array.length;
		e2 = t2->u.array.length;
		if (e1 && e2 && e1->kind == EXPRCONST && e2->kind == EXPRCONST && e1->u.constant.u != e2->u.constant.u)
			return false;
		goto derived;
	case TYPEFUNC:
		if (t1->u.func.isvararg != t2->u.func.isvararg)
			return false;
		for (p1 = t1->u.func.params, p2 = t2->u.func.params; p1 && p2; p1 = p1->next, p2 = p2->next) {
			if (!typecompatible(p1->type, p2->type))
				return false;
		}
		if (p1 || p2)
			return false;
		goto derived;
	derived:
		return t1->qual == t2->qual && typecompatible(t1->base, t2->base);
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, %al
cmpq %rbx, %r14
je 0xd9b2
movl (%r14), %ecx
movl (%rbx), %edx
cmpl %edx, %ecx
jne 0xd997
cmpl $0xc, %ecx
je 0xd981
cmpl $0xe, %ecx
je 0xd936
cmpl $0xd, %ecx
jne 0xd9b0
cmpb $0x0, 0x3c(%r14)
jne 0xd981
cmpb $0x0, 0x3c(%rbx)
jne 0xd981
movq 0x40(%r14), %rax
testq %rax, %rax
je 0xd981
movq 0x40(%rbx), %rcx
testq %rcx, %rcx
je 0xd981
cmpl $0x1, (%rax)
jne 0xd981
cmpl $0x1, (%rcx)
jne 0xd981
movq 0x30(%rax), %rax
cmpq 0x30(%rcx), %rax
je 0xd981
jmp 0xd9b0
movb 0x40(%r14), %al
cmpb 0x40(%rbx), %al
jne 0xd9b0
movq 0x48(%r14), %r15
movq 0x48(%rbx), %r12
testq %r12, %r12
setne %cl
testq %r15, %r15
setne %dl
je 0xd977
testq %r12, %r12
je 0xd977
movq 0x10(%r15), %rdi
movq 0x10(%r12), %rsi
callq 0xd8c4
testb %al, %al
je 0xd9b0
movq 0x38(%r15), %r15
movq 0x38(%r12), %r12
jmp 0xd947
xorl %eax, %eax
testb %dl, %dl
jne 0xd9b2
testb %cl, %cl
jne 0xd9b2
movl 0x38(%r14), %eax
cmpl 0x38(%rbx), %eax
jne 0xd9b0
movq 0x20(%r14), %r14
movq 0x20(%rbx), %rbx
jmp 0xd8d2
cmpl $0x6, %ecx
jne 0xd9a2
cmpq %rbx, 0x20(%r14)
je 0xd9b2
cmpl $0x6, %edx
jne 0xd9b0
cmpq %r14, 0x20(%rbx)
sete %al
jmp 0xd9b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typepromote
struct type *
typepromote(struct type *t, unsigned width)
{
	if (t == &typefloat)
		return &typedouble;
	if (t->prop & PROPINT && (typerank(t) <= typerank(&typeint) || width <= typeint.size * 8)) {
		if (width == -1)
			width = t->size * 8;
		return width - t->u.basic.issigned < typeint.size * 8 ? &typeint : &typeuint;
	}
	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xe43b(%rip), %rax      # 0x1be10
cmpq %rax, %rdi
je 0xda46
movq %rdi, %rbx
testb $0x2, 0x4(%rdi)
je 0xda4d
movl %esi, %r14d
movq %rbx, %rdi
callq 0xda5b
movl %eax, %ebp
leaq 0xe209(%rip), %r15      # 0x1bc00
movq %r15, %rdi
callq 0xda5b
cmpl %eax, %ebp
jbe 0xda16
movl %r14d, %eax
movq 0xe203(%rip), %rcx      # 0x1bc10
shlq $0x3, %rcx
cmpq %rax, %rcx
jb 0xda4d
cmpl $-0x1, %r14d
jne 0xda24
movl 0x10(%rbx), %r14d
shll $0x3, %r14d
movzbl 0x40(%rbx), %eax
subl %eax, %r14d
movq 0xe1de(%rip), %rax      # 0x1bc10
shlq $0x3, %rax
cmpq %r14, %rax
leaq 0xe218(%rip), %rbx      # 0x1bc58
cmovaq %r15, %rbx
jmp 0xda4d
leaq 0xe41b(%rip), %rbx      # 0x1be68
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typerank
static int
typerank(struct type *t)
{
	if (t->kind == TYPEENUM)
		t = t->base;
	assert(t->prop & PROPINT);
	switch (t->kind) {
	case TYPEBOOL:  return 1;
	case TYPECHAR:  return 2;
	case TYPESHORT: return 3;
	case TYPEINT:   return 4;
	case TYPELONG:  return 5;
	case TYPELLONG: return 6;
	}
	fatal("internal error; unhandled integer type");
	return 0;
}

// Assembly:
pushq %rbx
cmpl $0x6, (%rdi)
jne 0xda65
movq 0x20(%rdi), %rdi
testb $0x2, 0x4(%rdi)
je 0xdaa1
movl (%rdi), %eax
addl $-0x2, %eax
cmpl $0x7, %eax
jae 0xda8d
movl $0x6f, %ecx
btl %eax, %ecx
jae 0xda8d
movl %eax, %eax
leaq 0x7b54(%rip), %rcx      # 0x155dc
movl (%rcx,%rax,4), %ebx
jmp 0xda9d
leaq 0x7b1f(%rip), %rdi      # 0x155b3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe054
movl %ebx, %eax
popq %rbx
retq
leaq 0x7aa2(%rip), %rdi      # 0x1554a
leaq 0x794b(%rip), %rsi      # 0x153fa
leaq 0x7ae1(%rip), %rcx      # 0x15597
movl $0x64, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typecommonreal
struct type *
typecommonreal(struct type *t1, unsigned w1, struct type *t2, unsigned w2)
{
	struct type *tmp;

	assert(t1->prop & PROPREAL && t2->prop & PROPREAL);
	if (t1 == &typeldouble || t2 == &typeldouble)
		return &typeldouble;
	if (t1 == &typedouble || t2 == &typedouble)
		return &typedouble;
	if (t1 == &typefloat || t2 == &typefloat)
		return &typefloat;
	t1 = typepromote(t1, w1);
	t2 = typepromote(t2, w2);
	if (t1 == t2)
		return t1;
	if (t1->u.basic.issigned == t2->u.basic.issigned)
		return typerank(t1) > typerank(t2) ? t1 : t2;
	if (t1->u.basic.issigned) {
		tmp = t1;
		t1 = t2;
		t2 = tmp;
	}
	if (typerank(t1) >= typerank(t2))
		return t1;
	if (t1->size < t2->size)
		return t2;
	if (t2 == &typelong)
		return &typeulong;
	if (t2 == &typellong)
		return &typeullong;
	fatal("internal error; could not find common real type");
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testb $0x4, 0x4(%rdi)
je 0xdbec
movq %rdx, %r14
testb $0x4, 0x4(%rdx)
je 0xdbec
movl %ecx, %ebp
leaq 0xe3d9(%rip), %rbx      # 0x1bec0
cmpq %rbx, %rdi
sete %al
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0xdbde
leaq 0xe366(%rip), %rbx      # 0x1be68
cmpq %rbx, %rdi
sete %al
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0xdbde
leaq 0xe2f3(%rip), %rbx      # 0x1be10
cmpq %rbx, %rdi
sete %al
cmpq %rbx, %r14
sete %cl
orb %al, %cl
jne 0xdbde
callq 0xd9c7
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0xd9c7
cmpq %rax, %rbx
je 0xdbde
movq %rax, %r15
movb 0x40(%rbx), %al
cmpb 0x40(%r15), %al
jne 0xdb72
movq %rbx, %rdi
callq 0xda5b
movl %eax, %ebp
movq %r15, %rdi
callq 0xda5b
cmpl %eax, %ebp
cmovbeq %r15, %rbx
jmp 0xdbde
testb %al, %al
movq %r15, %r14
cmovneq %rbx, %r14
cmovneq %r15, %rbx
movq %rbx, %rdi
callq 0xda5b
movl %eax, %ebp
movq %r14, %rdi
callq 0xda5b
cmpl %eax, %ebp
jae 0xdbde
movq 0x10(%rbx), %rax
cmpq 0x10(%r14), %rax
jae 0xdba4
movq %r14, %rbx
jmp 0xdbde
leaq 0xe105(%rip), %rax      # 0x1bcb0
cmpq %rax, %r14
je 0xdbce
leaq 0xe1a9(%rip), %rax      # 0x1bd60
cmpq %rax, %r14
je 0xdbd7
leaq 0x7894(%rip), %rdi      # 0x15457
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xe054
jmp 0xdbde
leaq 0xe133(%rip), %rbx      # 0x1bd08
jmp 0xdbde
leaq 0xe1da(%rip), %rbx      # 0x1bdb8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x77dc(%rip), %rdi      # 0x153cf
leaq 0x7800(%rip), %rsi      # 0x153fa
leaq 0x7800(%rip), %rcx      # 0x15401
movl $0xbe, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typeadjust
struct type *
typeadjust(struct type *t, enum typequal *tq)
{
	enum typequal ptrqual;

	switch (t->kind) {
	case TYPEARRAY:
		ptrqual = t->u.array.ptrqual;
		t = mkpointertype(t->base, *tq | t->qual);
		*tq = ptrqual;
		break;
	case TYPEFUNC:
		assert(*tq == QUALNONE);
		t = mkpointertype(t, QUALNONE);
		break;
	}

	return t;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0xe, %eax
je 0xdc38
cmpl $0xd, %eax
jne 0xdc8c
movl 0x48(%rbx), %ebp
movq 0x20(%rbx), %rdi
movl 0x38(%rbx), %esi
orl (%r14), %esi
callq 0xd80f
movl %ebp, (%r14)
jmp 0xdc8f
cmpl $0x0, (%r14)
jne 0xdc94
movl $0x58, %edi
callq 0xe13e
movabsq $0x100000000c, %rcx     # imm = 0x100000000C
movq %rcx, (%rax)
movq $0x0, 0x18(%rax)
movw $0x0, 0x3c(%rax)
movq %rbx, 0x20(%rax)
movl $0x0, 0x38(%rax)
movq $0x8, 0x10(%rax)
movl $0x8, 0x8(%rax)
movl 0x4(%rbx), %ecx
andl $0x40, %ecx
orl $0x10, %ecx
movl %ecx, 0x4(%rax)
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x77ec(%rip), %rdi      # 0x15487
leaq 0x7758(%rip), %rsi      # 0x153fa
leaq 0x77ee(%rip), %rcx      # 0x15497
movl $0xe9, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typemember
struct member *
typemember(struct type *t, const char *name, unsigned long long *offset)
{
	struct member *m, *sub;

	assert(t->kind == TYPESTRUCT || t->kind == TYPEUNION);
	for (m = t->u.structunion.members; m; m = m->next) {
		if (m->name) {
			if (strcmp(m->name, name) == 0) {
				*offset += m->offset;
				return m;
			}
		} else {
			sub = typemember(m->type, name, offset);
			if (sub) {
				*offset += m->offset;
				return sub;
			}
		}
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl (%rdi), %eax
addl $-0xf, %eax
cmpl $0x2, %eax
jae 0xdd18
movq 0x48(%rdi), %r15
testq %r15, %r15
je 0xdd04
movq %rdx, %rbx
movq %rsi, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0xdce7
movq %r14, %rsi
callq 0x3140
testl %eax, %eax
jne 0xdcfb
jmp 0xdd08
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdcb3
testq %rax, %rax
jne 0xdd0b
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0xdcd1
xorl %eax, %eax
jmp 0xdd12
movq %r15, %rax
movq 0x18(%r15), %rcx
addq %rcx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x77b0(%rip), %rdi      # 0x154cf
leaq 0x76d4(%rip), %rsi      # 0x153fa
leaq 0x77d0(%rip), %rcx      # 0x154fd
movl $0xf6, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/type.c
// Function: typehasint
bool
typehasint(struct type *t, unsigned long long i, bool sign)
{
	assert(t->prop & PROPINT);
	if (sign && i >= -1ull << 63)
		return t->u.basic.issigned && i >= -1ull << (t->size << 3) - 1;
	return i <= 0xffffffffffffffffull >> (8 - t->size << 3) + t->u.basic.issigned;
}

// Assembly:
testb $0x2, 0x4(%rdi)
je 0xdd88
testq %rsi, %rsi
setns %al
xorb $0x1, %dl
orb %al, %dl
jne 0xdd69
cmpb $0x1, 0x40(%rdi)
jne 0xdd85
movb 0x10(%rdi), %cl
shlb $0x3, %cl
decb %cl
movq $-0x1, %rax
shlq %cl, %rax
cmpq %rsi, %rax
setbe %al
retq
movl 0x10(%rdi), %eax
movl 0x40(%rdi), %ecx
shll $0x3, %eax
subl %eax, %ecx
movq $-0x1, %rax
shrq %cl, %rax
cmpq %rsi, %rax
setae %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x77ba(%rip), %rdi      # 0x1554a
leaq 0x7663(%rip), %rsi      # 0x153fa
leaq 0x77be(%rip), %rcx      # 0x1555c
movl $0x10b, %edx            # imm = 0x10B
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/utf.c
// Function: utf8enc
size_t
utf8enc(unsigned char *s, uint_least32_t c)
{
	if (c < 0x80) {
		s[0] = c;
		return 1;
	}
	if (c < 0x800) {
		s[0] = 0xc0 | c >> 6;
		s[1] = 0x80 | c & 0x3f;
		return 2;
	}
	if (c < 0xd800 || c - 0xe000 < 0x2000) {
		s[0] = 0xe0 | c >> 12;
		s[1] = 0x80 | c >> 6 & 0x3f;
		s[2] = 0x80 | c & 0x3f;
		return 3;
	}
	if (c - 0x10000 < 0x100000) {
		s[0] = 0xf0 | c >> 18;
		s[1] = 0x80 | c >> 12 & 0x3f;
		s[2] = 0x80 | c >> 6 & 0x3f;
		s[3] = 0x80 | c & 0x3f;
		return 4;
	}
	assert(0);
	return 0;
}

// Assembly:
cmpl $0x7f, %esi
ja 0xddb6
movb %sil, (%rdi)
movl $0x1, %eax
retq
cmpl $0x7ff, %esi            # imm = 0x7FF
ja 0xddd9
movl %esi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdi)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rdi)
movl $0x2, %eax
retq
cmpl $0xd800, %esi           # imm = 0xD800
setae %al
movl %esi, %ecx
andl $0xffffe000, %ecx       # imm = 0xFFFFE000
cmpl $0xe000, %ecx           # imm = 0xE000
setne %cl
testb %cl, %al
jne 0xde1e
movl %esi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdi)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdi)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rdi)
movl $0x3, %eax
retq
leal -0x10000(%rsi), %eax
cmpl $0xfffff, %eax          # imm = 0xFFFFF
ja 0xde5e
movl %esi, %eax
shrl $0x12, %eax
orb $-0x10, %al
movb %al, (%rdi)
movl %esi, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rdi)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x3(%rdi)
movl $0x4, %eax
retq
pushq %rax
leaq 0x7e58(%rip), %rdi      # 0x15cbe
leaq 0x778b(%rip), %rsi      # 0x155f8
leaq 0x778a(%rip), %rcx      # 0x155fe
movl $0x1f, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/utf.c
// Function: utf8dec
size_t
utf8dec(uint_least32_t *c, const unsigned char *s, size_t n)
{
	size_t i, l;
	unsigned char b;
	uint_least32_t x;

	b = s[0];
	if (b < 0x80) {
		*c = b;
		return 1;
	}
	if ((b & 0xe0) == 0xc0) {
		x = b & 0x1f;
		l = 2;
	} else if ((b & 0xf0) == 0xe0) {
		x = b & 0x0f;
		l = 3;
	} else if ((b & 0xf8) == 0xf0) {
		x = b & 0x07;
		l = 4;
	} else {
		return -1;
	}
	if (n < l)
		return -1;
	for (i = 1; i < l; ++i) {
		b = *++s;
		if ((b & 0xc0) != 0x80)
			return -1;
		x = x << 6 | b & 0x3f;
	}
	if (x >= 0x110000 || x - 0xd800 < 0x0200)
		return -1;
	*c = x;
	return l;
}

// Assembly:
movzbl (%rsi), %ecx
movl $0x1, %r8d
testb %cl, %cl
js 0xde91
movl %ecx, (%rdi)
movq %r8, %rax
retq
movl %ecx, %eax
andl $-0x20, %eax
cmpl $0xc0, %eax
jne 0xdeab
movl $0x2, %r8d
movl $0x1f, %r9d
jmp 0xdee8
movl %ecx, %eax
andl $-0x10, %eax
cmpl $0xe0, %eax
jne 0xdec5
movl $0x3, %r8d
movl $0xf, %r9d
jmp 0xdee8
movl %ecx, %r8d
andl $-0x8, %r8d
movq $-0x1, %rax
cmpl $0xf0, %r8d
jne 0xde90
movl $0x4, %r8d
movl $0x7, %r9d
movq $-0x1, %rax
cmpq %rdx, %r8
ja 0xde90
andl %r9d, %ecx
movl $0x1, %r9d
movl %ecx, %edx
movzbl (%rsi,%r9), %ecx
movl %ecx, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0xde90
movl %edx, %r10d
shll $0x6, %r10d
andl $0x3f, %ecx
orl %r10d, %ecx
incq %r9
cmpq %r9, %r8
jne 0xdefd
cmpl $0x110000, %r10d        # imm = 0x110000
setae %sil
andl $0x7ff8, %edx           # imm = 0x7FF8
cmpl $0x360, %edx            # imm = 0x360
sete %dl
orb %sil, %dl
je 0xde8b
jmp 0xde90
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/utf.c
// Function: utf16enc
size_t
utf16enc(uint_least16_t *s, uint_least32_t c)
{
	if (c < 0xd800 || c - 0xe000 < 0x2000) {
		s[0] = c;
		return 1;
	}
	c -= 0x10000;
	if (c < 0x100000) {
		s[0] = 0xd800 | c >> 10 & 0x3ff;
		s[1] = 0xdc00 | c & 0x3ff;
		return 2;
	}
	assert(0);
	return 0;
}

// Assembly:
cmpl $0xd800, %esi           # imm = 0xD800
setae %al
movl %esi, %ecx
andl $0xffffe000, %ecx       # imm = 0xFFFFE000
cmpl $0xe000, %ecx           # imm = 0xE000
setne %cl
testb %cl, %al
jne 0xdf7c
movw %si, (%rdi)
movl $0x1, %eax
retq
leal -0x10000(%rsi), %eax
cmpl $0xfffff, %eax          # imm = 0xFFFFF
ja 0xdfaa
shrl $0xa, %eax
orl $0xd800, %eax           # imm = 0xD800
movw %ax, (%rdi)
andl $0x3ff, %esi            # imm = 0x3FF
orl $0xdc00, %esi           # imm = 0xDC00
movw %si, 0x2(%rdi)
movl $0x2, %eax
retq
pushq %rax
leaq 0x7d0c(%rip), %rdi      # 0x15cbe
leaq 0x763f(%rip), %rsi      # 0x155f8
leaq 0x766e(%rip), %rcx      # 0x1562e
movl $0x56, %edx
callq 0x30e0
nop
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/util.c
// Function: xreallocarray
void *
xreallocarray(void *buf, size_t n, size_t m)
{
	buf = reallocarray(buf, n, m);
	if (!buf && n && m)
		fatal("reallocarray:");

	return buf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
callq 0xe0de
testq %r14, %r14
je 0xe128
testq %rbx, %rbx
je 0xe128
testq %rax, %rax
je 0xe130
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7529(%rip), %rdi      # 0x15660
xorl %eax, %eax
callq 0xe054
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/util.c
// Function: xmalloc
void *
xmalloc(size_t len)
{
	void *buf;

	buf = malloc(len);
	if (!buf && len)
		fatal("malloc:");

	return buf;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3180
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
je 0xe159
popq %rbx
retq
leaq 0x750e(%rip), %rdi      # 0x1566e
xorl %eax, %eax
callq 0xe054
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/util.c
// Function: arrayadd
void *
arrayadd(struct array *a, size_t n)
{
	void *v;

	if (a->cap - a->len < n) {
		do a->cap = a->cap ? a->cap * 2 : 256;
		while (a->cap - a->len < n);
		a->val = realloc(a->val, a->cap);
		if (!a->val)
			fatal("realloc");
	}
	v = (char *)a->val + a->len;
	a->len += n;

	return v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
cmpq %rsi, %rcx
jae 0xe1d9
movq 0x10(%r14), %rsi
movl $0x100, %ecx            # imm = 0x100
testq %rsi, %rsi
leaq (%rsi,%rsi), %rsi
cmoveq %rcx, %rsi
movq %rsi, %rdx
subq %rax, %rdx
cmpq %rbx, %rdx
jb 0xe1af
movq %rsi, 0x10(%r14)
movq (%r14), %rdi
callq 0x31d0
movq %rax, (%r14)
testq %rax, %rax
je 0xe1f2
movq 0x8(%r14), %rcx
movq (%r14), %rax
addq %rcx, %rax
addq %rcx, %rbx
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x747d(%rip), %rdi      # 0x15676
xorl %eax, %eax
callq 0xe054
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/util.c
// Function: arraylast
void *
arraylast(struct array *a, size_t n)
{
	if (a->len == 0)
		return NULL;
	assert(n <= a->len);
	return (char *)a->val + a->len - n;
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xe24f
cmpq %rsi, %rax
jb 0xe252
addq (%rdi), %rax
subq %rsi, %rax
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0x7424(%rip), %rdi      # 0x1567e
leaq 0x7429(%rip), %rsi      # 0x1568a
leaq 0x7429(%rip), %rcx      # 0x15691
movl $0x7d, %edx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/util.c
// Function: listinsert
void
listinsert(struct list *list, struct list *new)
{
	new->next = list->next;
	new->prev = list;
	list->next->prev = new;
	list->next = new;
}

// Assembly:
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsi)
movq %rdi, (%rsi)
movq 0x8(%rdi), %rax
movq %rsi, (%rax)
movq %rsi, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: switchcase
void
switchcase(struct switchcases *cases, unsigned long long i, struct block *b)
{
	struct switchcase *c;

	c = treeinsert(&cases->root, i, sizeof(*c));
	if (!c->node.new)
		error(&tok.loc, "multiple 'case' labels with same value");
	c->body = b;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl $0x28, %edx
callq 0xd634
movq %rax, %r14
cmpb $0x0, 0x1c(%rax)
jne 0xe2d7
leaq 0xde43(%rip), %rdi      # 0x1c108
addq $0x8, %rdi
leaq 0x7554(%rip), %rsi      # 0x15824
xorl %eax, %eax
callq 0xd56a
movq %rbx, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: mkblock
struct block *
mkblock(char *name)
{
	static unsigned id;
	struct block *b;

	b = xmalloc(sizeof(*b));
	b->label.kind = VALUE_LABEL;
	b->label.u.name = name;
	b->label.id = ++id;
	b->insts = (struct array){0};
	b->jump.kind = JUMP_NONE;
	b->phi.res.kind = VALUE_NONE;
	b->next = NULL;

	return b;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x88, %edi
callq 0xe13e
movl $0x7, (%rax)
movq %rbx, 0x8(%rax)
movl 0xde3f(%rip), %ecx      # 0x1c140
incl %ecx
movl %ecx, 0xde37(%rip)      # 0x1c140
movl %ecx, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movl %ecx, 0x60(%rax)
movl %ecx, 0x50(%rax)
movq %rcx, 0x80(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: mkglobal
struct value *
mkglobal(struct decl *d)
{
	static unsigned id;
	struct value *v;

	v = xmalloc(sizeof(*v));
	v->kind = VALUE_GLOBAL;
	if (d->kind == DECLOBJECT && d->u.obj.storage == SDTHREAD)
		v->kind |= VALUE_THREAD;
	if (d->asmname) {
		v->u.name = d->asmname;
		v->id = 0;
	} else {
		v->u.name = d->name;
		v->id = d->linkage == LINKNONE ? ++id : 0;
	}

	return v;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0xe13e
movl $0x1, (%rax)
cmpl $0x1, 0x8(%rbx)
jne 0xe34e
cmpl $0x1, 0x44(%rbx)
jne 0xe34e
movl $0x11, (%rax)
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0xe35f
movq %rcx, 0x8(%rax)
xorl %ecx, %ecx
jmp 0xe37c
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
xorl %ecx, %ecx
cmpl $0x0, 0xc(%rbx)
jne 0xe37c
movl 0xddd0(%rip), %ecx      # 0x1c144
incl %ecx
movl %ecx, 0xddc8(%rip)      # 0x1c144
movl %ecx, 0x4(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: funcalloc
static void
funcalloc(struct func *f, struct decl *d)
{
	enum instkind op;
	struct block *end;
	struct value *v;
	int align;

	assert(!d->type->incomplete);
	calcvla(f, d->type);
	end = f->end;
	if (d->type->size) {
		f->end = f->start;
		v = mkintconst(d->type->size);
	} else {
		assert(d->type->kind == TYPEARRAY);
		assert(d->type->u.array.size);
		v = d->type->u.array.size;
	}
	align = d->u.obj.align;
	switch (align) {
	case 1:
	case 2:
	case 4:  op = IALLOC4; break;
	case 8:  op = IALLOC8; break;
	default: v = funcinst(f, IADD, ptrclass, v, mkintconst(align - 16));  /* fallthrough */
	case 16: op = IALLOC16; break;
	}
	v = funcinst(f, op, ptrclass, v, NULL);
	if (align > 16) {
		/* TODO: implement alloc32 in QBE and use that instead */
		v = funcinst(f, IADD, ptrclass, v, mkintconst(align - 16));
		v = funcinst(f, IAND, ptrclass, v, mkintconst(-align));
	}
	d->value = v;
	f->end = end;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x10(%rsi), %rsi
cmpb $0x1, 0x3c(%rsi)
je 0xe908
movq %rdi, %rbx
callq 0xfef3
movq 0x30(%rbx), %r12
movq 0x10(%r14), %rax
movq 0x10(%rax), %r13
testq %r13, %r13
je 0xe7ed
movq 0x28(%rbx), %rax
movq %rax, 0x30(%rbx)
movl $0x10, %edi
callq 0xe13e
movq %rax, %r15
movl $0x2, (%rax)
movq %r13, 0x8(%rax)
jmp 0xe803
cmpl $0xd, (%rax)
jne 0xe927
movq 0x50(%rax), %r15
testq %r15, %r15
je 0xe946
movslq 0x40(%r14), %r13
cmpq $0x7, %r13
jg 0xe823
movl $0x1d, %esi
leal -0x1(%r13), %eax
cmpl $0x2, %eax
jb 0xe86e
cmpl $0x4, %r13d
je 0xe86e
jmp 0xe836
cmpl $0x10, %r13d
je 0xe869
cmpl $0x8, %r13d
jne 0xe836
movl $0x1e, %esi
jmp 0xe86e
leaq -0x10(%r13), %rbp
movl $0x10, %edi
callq 0xe13e
movl $0x2, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6c, %edx
movq %r15, %rcx
movq %rax, %r8
callq 0x101fd
movq %rax, %r15
movl $0x1f, %esi
movq %rbx, %rdi
movl $0x6c, %edx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x101fd
movq %rax, %r15
cmpl $0x11, %r13d
jl 0xe8f1
leal -0x10(%r13), %ebp
movl $0x10, %edi
callq 0xe13e
movl $0x2, %ecx
movl %ecx, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6c, %edx
movq %r15, %rcx
movq %rax, %r8
callq 0x101fd
movq %rax, %r15
negq %r13
movl $0x10, %edi
callq 0xe13e
movl $0x2, %ecx
movl %ecx, (%rax)
movq %r13, 0x8(%rax)
movq %rbx, %rdi
movl $0xb, %esi
movl $0x6c, %edx
movq %r15, %rcx
movq %rax, %r8
callq 0x101fd
movq %rax, %r15
movq %r15, 0x20(%r14)
movq %r12, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7238(%rip), %rdi      # 0x15b47
leaq 0x6f3e(%rip), %rsi      # 0x15854
leaq 0x723f(%rip), %rcx      # 0x15b5c
movl $0x16a, %edx            # imm = 0x16A
callq 0x30e0
leaq 0x725b(%rip), %rdi      # 0x15b89
leaq 0x6f1f(%rip), %rsi      # 0x15854
leaq 0x7220(%rip), %rcx      # 0x15b5c
movl $0x171, %edx            # imm = 0x171
callq 0x30e0
leaq 0x7257(%rip), %rdi      # 0x15ba4
leaq 0x6f00(%rip), %rsi      # 0x15854
leaq 0x7201(%rip), %rcx      # 0x15b5c
movl $0x172, %edx            # imm = 0x172
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: delfunc
void
delfunc(struct func *f)
{
	struct block *b;
	struct inst **inst;

	while (b = f->start) {
		f->start = b->next;
		arrayforeach (&b->insts, inst)
			free(*inst);
		free(b->insts.val);
		free(b);
	}
	mapfree(&f->gotos, free);
	free(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0xedb2
movq 0x80(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%r14), %r15
cmpq $0x0, 0x18(%r14)
je 0xed9c
movq (%r15), %rdi
callq 0x3250
addq $0x8, %r15
movq 0x10(%r14), %rdi
movq 0x18(%r14), %rax
addq %rdi, %rax
cmpq %rax, %r15
jne 0xed7e
jmp 0xed9f
movq %r15, %rdi
callq 0x3250
movq %r14, %rdi
callq 0x3250
movq 0x28(%rbx), %r14
jmp 0xed63
leaq 0x38(%rbx), %rdi
movq 0xc1db(%rip), %rsi      # 0x1af98
callq 0xa778
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3250
// File: /workspace/github_c_makefile_star2_O1/michaelforney[P]cproc/qbe.c
// Function: funcjnz
void
funcjnz(struct func *f, struct value *v, struct type *t, struct block *l1, struct block *l2)
{
	struct block *b = f->end;

	if (b->jump.kind)
		return;
	if (t) {
		assert(t->prop & PROPSCALAR);
		/*
		Ideally we would just do this conversion unconditionally,
		but QBE is not currently able to optimize the conversion
		away for int.
		*/
		if (t->prop & PROPINT && t->size < 4)
			v = convert(f, &typeint, t, v);
		else if (t->prop & PROPFLOAT || t->size > 4)
			v = convert(f, &typebool, t, v);
	}
	b->jump.kind = JUMP_JNZ;
	b->jump.arg = v;
	b->jump.blk[0] = l1;
	b->jump.blk[1] = l2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x30(%rdi), %r15
cmpl $0x0, 0x60(%r15)
jne 0xee55
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %rax
testq %rdx, %rdx
je 0xee41
movl 0x4(%rdx), %ecx
testb $0x10, %cl
je 0xee5b
testb $0x2, %cl
je 0xee26
cmpq $0x4, 0x10(%rdx)
jae 0xee26
leaq 0xcddc(%rip), %rsi      # 0x1bc00
jmp 0xee39
leaq 0xcbc3(%rip), %rsi      # 0x1b9f0
testb $0x20, %cl
jne 0xee39
cmpq $0x5, 0x10(%rdx)
jb 0xee41
movq %rax, %rcx
callq 0xee7a
movl $0x2, 0x60(%r15)
movq %rax, 0x68(%r15)
movq %r14, 0x70(%r15)
movq %rbx, 0x78(%r15)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x56e4(%rip), %rdi      # 0x14546
leaq 0x69eb(%rip), %rsi      # 0x15854
leaq 0x69ea(%rip), %rcx      # 0x1585a
movl $0x252, %edx            # imm = 0x252
callq 0x30e0