LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/orangeduck[P]mpc/mpc.c
// Function: mpca_stmt_afold
static mpc_val_t *mpca_stmt_afold(int n, mpc_val_t **xs) {
  mpca_stmt_t *stmt = malloc(sizeof(mpca_stmt_t));
  stmt->ident = ((char**)xs)[0];
  stmt->name = ((char**)xs)[1];
  stmt->grammar = ((mpc_parser_t**)xs)[3];
  (void) n;
  free(((char**)xs)[2]);
  free(((char**)xs)[4]);

  return stmt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x4570
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4850
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x4850
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: panic
void
panic(char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, "\n");
	va_end(ap);
	quit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x2575
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x6a34(%rip), %rax      # 0x8ff8
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x2340
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
leaq 0x3db2(%rip), %rsi      # 0x639e
xorl %eax, %eax
callq 0x21d0
callq 0x2610
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: quit
void
quit(void)
{
	reset(0);
	putchar('\n');

	deinitmach();
	exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x2720
movl $0xa, %edi
callq 0x2040
callq 0x5b50
xorl %edi, %edi
callq 0x2370
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: raw
int
raw(int fd)
{
	struct termios tio;
	if(tcgetattr(fd, &tio) < 0) return -1;
	tiosaved = tio;
	cfmakeraw(&tio);
//	tio.c_iflag |= ICRNL;
	tio.c_oflag |= OPOST | ONLCR;
	if(tcsetattr(fd, TCSAFLUSH, &tio) < 0) return -1;
	canreset = 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edi
leaq -0x44(%rbp), %rsi
callq 0x22f0
cmpl $0x0, %eax
jge 0x26b5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x270c
leaq 0xbe54(%rip), %rdi      # 0xe510
leaq -0x44(%rbp), %rsi
movl $0x3c, %edx
callq 0x21f0
leaq -0x44(%rbp), %rdi
callq 0x2280
movl -0x40(%rbp), %eax
orl $0x5, %eax
movl %eax, -0x40(%rbp)
movl -0x8(%rbp), %edi
movl $0x2, %esi
leaq -0x44(%rbp), %rdx
callq 0x2300
cmpl $0x0, %eax
jge 0x26fb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x270c
movl $0x1, 0xbe47(%rip)      # 0xe54c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: tyo
void
tyo(char c)
{
	static char *alt = "◊";
	static char *ctrl = "↑";

	if(c < 040){
		switch(c){
		case ALT:
			write(1, alt, strlen(alt));
			return;
		case CTL('J'):
		case CTL('M'):
		case CTL('H'):
		case CTL('I'):
			write(1, &c, 1);
			break;
		default:
			write(1, ctrl, strlen(ctrl));
			c += 0100;
			write(1, &c, 1);
		}
	}else
		write(1, &c, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
cmpl $0x20, %eax
jge 0x2896
movsbl -0x1(%rbp), %eax
movl %eax, -0x8(%rbp)
addl $-0x8, %eax
subl $0x3, %eax
jb 0x283a
jmp 0x27fc
movl -0x8(%rbp), %eax
subl $0xd, %eax
je 0x283a
jmp 0x2806
movl -0x8(%rbp), %eax
subl $0x1b, %eax
jne 0x284f
jmp 0x2810
movq 0x6a19(%rip), %rax      # 0x9230
movq %rax, -0x10(%rbp)
movq 0x6a0e(%rip), %rdi      # 0x9230
callq 0x20e0
movq -0x10(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x20b0
jmp 0x28a9
movl $0x1, %edi
leaq -0x1(%rbp), %rsi
movl $0x1, %edx
callq 0x20b0
jmp 0x2894
movq 0x69e2(%rip), %rax      # 0x9238
movq %rax, -0x18(%rbp)
movq 0x69d7(%rip), %rdi      # 0x9238
callq 0x20e0
movq -0x18(%rbp), %rsi
movq %rax, %rdx
movl $0x1, %edi
callq 0x20b0
movsbl -0x1(%rbp), %eax
addl $0x40, %eax
movb %al, -0x1(%rbp)
movl $0x1, %edi
leaq -0x1(%rbp), %rsi
movl $0x1, %edx
callq 0x20b0
jmp 0x28a9
movl $0x1, %edi
leaq -0x1(%rbp), %rsi
movl $0x1, %edx
callq 0x20b0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: typenum
void
typenum(Word n)
{
	Word d;
	d = n % base;
	n /= base;
	if(n)
		typenum(n);
	tyo(d + '0');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
xorl %edx, %edx
divl 0x6982(%rip)            # 0x9248
movl %edx, -0x8(%rbp)
movl 0x6979(%rip), %ecx      # 0x9248
movl -0x4(%rbp), %eax
xorl %edx, %edx
divl %ecx
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x28e7
movl -0x4(%rbp), %edi
callq 0x28b0
movl -0x8(%rbp), %eax
addl $0x30, %eax
movsbl %al, %edi
callq 0x27d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: parsenum
Word
parsenum(void)
{
	Word w;
	char *c;

	w = 0;
	for(c = bufstart; c < &buf[nbuf]; c++){
		if(*c >= '0' && *c <= '9')
			w = w*base + *c-'0';
		else
			return BUF_ERR;
		w &= WORDMASK;
	}
	return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x8(%rbp)
movq 0x67be(%rip), %rax      # 0x9240
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq 0xbc63(%rip), %rdx      # 0xe6f4
leaq 0xbab8(%rip), %rcx      # 0xe550
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2af5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x2ad3
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x2ad3
movl -0x8(%rbp), %eax
imull 0x6786(%rip), %eax      # 0x9248
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movl %eax, -0x8(%rbp)
jmp 0x2adc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2afb
movl -0x8(%rbp), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2a86
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: defsym
void
defsym(char *sym, Word val)
{
	int i;
	for(i = 0; i < SYMTABSIZE; i++)
		if(symtab[i].sym[0] == '\0')
			goto found;
	err("?SYMTAB? ");
found:
	strncpy(symtab[i].sym, sym, 12);
	symtab[i].sym[11] = '\0';
	symtab[i].value = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x400, -0x10(%rbp)     # imm = 0x400
jge 0x2b48
movslq -0x10(%rbp), %rcx
leaq 0x6726(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2b3b
jmp 0x2b54
jmp 0x2b3d
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b16
leaq 0x36b8(%rip), %rdi      # 0x6207
callq 0x29c0
movslq -0x10(%rbp), %rax
leaq 0x66f1(%rip), %rdi      # 0x9250
imulq $0x14, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl $0xc, %edx
callq 0x2070
movslq -0x10(%rbp), %rcx
leaq 0x66d1(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0xb(%rax)
movl -0xc(%rbp), %ecx
movslq -0x10(%rbp), %rdx
leaq 0x66b8(%rip), %rax      # 0x9250
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: findsym
char*
findsym(Word val)
{
	int i;
	for(i = 0; i < SYMTABSIZE; i++)
		if(symtab[i].sym[0] &&
		   !(symtab[i].flags & SYM_HALFKILL) &&
		   symtab[i].value == val)
			return symtab[i].sym;
	return nil;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x400, -0x10(%rbp)     # imm = 0x400
jge 0x2c3d
movslq -0x10(%rbp), %rcx
leaq 0x667e(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2c30
movslq -0x10(%rbp), %rcx
leaq 0x6664(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2c30
movslq -0x10(%rbp), %rcx
leaq 0x6647(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x2c30
movslq -0x10(%rbp), %rcx
leaq 0x662d(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x2c45
jmp 0x2c32
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2bbe
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: parsesym
Word
parsesym(void)
{
	Word i;

	if(strcmp(bufstart, ".") == 0)
		return dot;

	for(i = 0; i < SYMTABSIZE; i++)
		if(symtab[i].sym[0] && strcasecmp(bufstart, symtab[i].sym) == 0)
			return symtab[i].value;
	return BUF_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x65e1(%rip), %rdi      # 0x9240
leaq 0x35ab(%rip), %rsi      # 0x6211
callq 0x21c0
cmpl $0x0, %eax
jne 0x2c7c
movzwl 0xba81(%rip), %eax      # 0xe6f8
movl %eax, -0x4(%rbp)
jmp 0x2cf8
movl $0x0, -0x8(%rbp)
cmpl $0x400, -0x8(%rbp)      # imm = 0x400
jae 0x2cf1
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x65b8(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2ce4
movq 0x6592(%rip), %rdi      # 0x9240
movl -0x8(%rbp), %eax
leaq 0x6598(%rip), %rsi      # 0x9250
imulq $0x14, %rax, %rax
addq %rax, %rsi
callq 0x2050
cmpl $0x0, %eax
jne 0x2ce4
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x657b(%rip), %rax      # 0x9250
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2cf8
jmp 0x2ce6
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2c83
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: parse
int
parse(Word *t)
{
	Word w;

	w = parsenum();
	if(bufstart >= &buf[nbuf])
		return 0;
	if((w = parsenum()) == BUF_ERR && (w = parsesym()) == BUF_ERR)
		err("?U? ");
	nbuf = 0;
	*t = w;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
callq 0x2a70
movl %eax, -0x14(%rbp)
movq 0x6515(%rip), %rax      # 0x9240
movslq 0xb9c2(%rip), %rdx      # 0xe6f4
leaq 0xb817(%rip), %rcx      # 0xe550
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x2d4a
movl $0x0, -0x4(%rbp)
jmp 0x2d8a
callq 0x2a70
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
jne 0x2d70
callq 0x2c50
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
jne 0x2d70
leaq 0x34a8(%rip), %rdi      # 0x6213
callq 0x29c0
movl $0x0, 0xb97a(%rip)      # 0xe6f4
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: combine
void
combine(Word t)
{
	switch(as.op){
	case '+':
	default:
		as.exp += t;
		break;
	case '-':
		as.exp += ~t;
		break;
	case '*':
		as.exp *= t;
		break;
	case '|':
		as.exp /= t;
		break;
	}
	as.gotexp = 1;
	as.op = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl 0xb923(%rip), %eax      # 0xe700
movl %eax, -0x8(%rbp)
subl $0x2a, %eax
je 0x2e2c
jmp 0x2de7
movl -0x8(%rbp), %eax
subl $0x2b, %eax
je 0x2e05
jmp 0x2df1
movl -0x8(%rbp), %eax
subl $0x2d, %eax
je 0x2e18
jmp 0x2dfb
movl -0x8(%rbp), %eax
subl $0x7c, %eax
je 0x2e3e
jmp 0x2e07
jmp 0x2e07
movl -0x4(%rbp), %eax
addl 0xb8ec(%rip), %eax      # 0xe6fc
movl %eax, 0xb8e6(%rip)      # 0xe6fc
jmp 0x2e51
movl -0x4(%rbp), %eax
xorl $-0x1, %eax
addl 0xb8d8(%rip), %eax      # 0xe6fc
movl %eax, 0xb8d2(%rip)      # 0xe6fc
jmp 0x2e51
movl -0x4(%rbp), %eax
imull 0xb8c6(%rip), %eax      # 0xe6fc
movl %eax, 0xb8c0(%rip)      # 0xe6fc
jmp 0x2e51
movl -0x4(%rbp), %ecx
movl 0xb8b5(%rip), %eax      # 0xe6fc
xorl %edx, %edx
divl %ecx
movl %eax, 0xb8ab(%rip)      # 0xe6fc
movl $0x1, 0xb8a9(%rip)      # 0xe704
movl $0x0, 0xb89b(%rip)      # 0xe700
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: endword
int
endword(Word *w)
{
	Word t;

	if(!parse(&t)){
		if(!as.gotexp)
			return 0;
		t = 0;
	}
	combine(t);
	t = as.exp;
	t &= WORDMASK;
	*w = t;
	resetexp();
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x2d10
cmpl $0x0, %eax
jne 0x2ea3
cmpl $0x0, 0xb873(%rip)      # 0xe704
jne 0x2e9c
movl $0x0, -0x4(%rbp)
jmp 0x2ed4
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %edi
callq 0x2dd0
movl 0xb84b(%rip), %eax      # 0xe6fc
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
callq 0x2da0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: prword
void
prword(int mode, Word wd)
{
	switch(mode){
	case MODE_SYM:
		typestr(disasm(wd));
		break;

	default:
		typenum(wd);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
subl $0x2, %eax
jne 0x2f0a
jmp 0x2ef8
movl -0x8(%rbp), %edi
callq 0x4ad0
movq %rax, %rdi
callq 0x2900
jmp 0x2f12
movl -0x8(%rbp), %edi
callq 0x28b0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: symaddr
char*
symaddr(Addr a)
{
	static char s[100];
	char *p, *sym;
	p = s;
	memset(s, 0, 100);
	sym = a == 0 ? nil : findsym(a);
	if(sym)
		p += sprintf(p, "%s", sym);
	else
		p += sprintf(p, "%o", a);
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq 0xb7da(%rip), %rax      # 0xe710
movq %rax, -0x10(%rbp)
leaq 0xb7cf(%rip), %rdi      # 0xe710
xorl %esi, %esi
movl $0x64, %edx
callq 0x2140
movzwl -0x2(%rbp), %eax
cmpl $0x0, %eax
jne 0x2f5e
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x2f6b
movzwl -0x2(%rbp), %edi
callq 0x2bb0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2fa2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3273(%rip), %rsi      # 0x61fc
movb $0x0, %al
callq 0x2360
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x2fc8
movq -0x10(%rbp), %rdi
movzwl -0x2(%rbp), %edx
leaq 0x33ce(%rip), %rsi      # 0x637f
movb $0x0, %al
callq 0x2360
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
leaq 0xb741(%rip), %rax      # 0xe710
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: praddr
void
praddr(int mode, Addr a)
{
	switch(mode){
	case MODE_SYM:
		typestr(symaddr(a));
		break;

	default:
		typenum(a);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %si, %ax
movl %edi, -0x4(%rbp)
movw %ax, -0x6(%rbp)
movl -0x4(%rbp), %eax
subl $0x2, %eax
jne 0x300f
jmp 0x2ffc
movzwl -0x6(%rbp), %edi
callq 0x2f20
movq %rax, %rdi
callq 0x2900
jmp 0x3018
movzwl -0x6(%rbp), %edi
callq 0x28b0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: aclose
void
aclose(int ins)
{
	// this is a bit ugly...
	// we don't want ^M to set Q if no location is open
	Word t;
	t = q;
	if(endword(&q) && ins){
		if(opened)
			deposit(addr, q);
		else if(regopened)
			depositreg(addr, q);
	}
	addr = q & ADDRMASK;
	if(!opened && !regopened)
		q = t;
	opened = 0;
	regopened = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0xb6d3(%rip), %eax      # 0xe774
movl %eax, -0x8(%rbp)
leaq 0xb6c9(%rip), %rdi      # 0xe774
callq 0x2e70
cmpl $0x0, %eax
je 0x30fa
cmpl $0x0, -0x4(%rbp)
je 0x30fa
cmpl $0x0, 0xb6ba(%rip)      # 0xe77c
je 0x30db
movw 0xb6b5(%rip), %ax       # 0xe780
movl 0xb6a3(%rip), %esi      # 0xe774
movzwl %ax, %edi
callq 0x49c0
jmp 0x30f8
cmpl $0x0, 0xb6a2(%rip)      # 0xe784
je 0x30f6
movzwl 0xb695(%rip), %edi      # 0xe780
movl 0xb683(%rip), %esi      # 0xe774
callq 0x4a10
jmp 0x30f8
jmp 0x30fa
movl 0xb674(%rip), %eax      # 0xe774
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, 0xb674(%rip)       # 0xe780
cmpl $0x0, 0xb669(%rip)      # 0xe77c
jne 0x3127
cmpl $0x0, 0xb668(%rip)      # 0xe784
jne 0x3127
movl -0x8(%rbp), %eax
movl %eax, 0xb64d(%rip)      # 0xe774
movl $0x0, 0xb64b(%rip)      # 0xe77c
movl $0x0, 0xb649(%rip)      # 0xe784
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: aopen
void
aopen(int mode)
{
	opened = 1;
	q = examine(addr);
	typestr("   ");
	if(mode != MODE_NONE)
		typeout(mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x1, 0xb617(%rip)      # 0xe77c
movzwl 0xb614(%rip), %edi      # 0xe780
callq 0x49f0
movl %eax, 0xb5fd(%rip)      # 0xe774
leaq 0x30a6(%rip), %rdi      # 0x6224
callq 0x2900
cmpl $0x0, -0x4(%rbp)
je 0x3191
movl -0x4(%rbp), %edi
callq 0x3020
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: aropen
void
aropen(int mode)
{
	regopened = 1;
	q = examinereg(addr);
	typestr("   ");
	if(mode != MODE_NONE)
		typeout(mode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x1, 0xb5cf(%rip)      # 0xe784
movzwl 0xb5c4(%rip), %edi      # 0xe780
callq 0x4a70
movl %eax, 0xb5ad(%rip)      # 0xe774
leaq 0x3056(%rip), %rdi      # 0x6224
callq 0x2900
cmpl $0x0, -0x4(%rbp)
je 0x31e1
movl -0x4(%rbp), %edi
callq 0x3020
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/fe.c
// Function: zerocore
void
zerocore(void)
{
	Addr a;
	for(a = 0; a < MAXMEM; a++)
		deposit(a, 0);
	putchar('\n');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw $0x0, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
cmpl $0x10000, %eax          # imm = 0x10000
jge 0x3222
xorl %esi, %esi
movzwl -0x2(%rbp), %edi
callq 0x49c0
movw -0x2(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x2(%rbp)
jmp 0x31fe
movl $0xa, %edi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/util.c
// Function: serve1
int
serve1(int port)
{
	int sockfd, confd;
	socklen_t len;
	struct sockaddr_in server, client;
	int x;

	sockfd = socket(AF_INET, SOCK_STREAM, 0);
	if(sockfd < 0){
		perror("error: socket");
		return -1;
	}

	x = 1;
	setsockopt (sockfd, SOL_SOCKET, SO_REUSEADDR, (void *)&x, sizeof x);
	
	memset(&server, 0, sizeof(server));
	server.sin_family = AF_INET;
	server.sin_addr.s_addr = INADDR_ANY;
	server.sin_port = htons(port);
	if(bind(sockfd, (struct sockaddr*)&server, sizeof(server)) < 0){
		perror("error: bind");
		return -1;
	}
	listen(sockfd, 5);
	len = sizeof(client);
	while(confd = accept(sockfd, (struct sockaddr*)&client, &len),
	      confd >= 0)
		return confd;
	perror("error: accept");
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2430
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x3dad
leaq 0x24b7(%rip), %rdi      # 0x6253
callq 0x2330
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3e6f
movl $0x1, -0x38(%rbp)
movl -0xc(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x38(%rbp), %rcx
movl $0x4, %r8d
callq 0x20a0
leaq -0x24(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2140
movw $0x2, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x8(%rbp), %eax
movzwl %ax, %edi
callq 0x20f0
movw %ax, -0x22(%rbp)
movl -0xc(%rbp), %edi
leaq -0x24(%rbp), %rsi
movl $0x10, %edx
callq 0x22a0
cmpl $0x0, %eax
jge 0x3e27
leaq 0x2448(%rip), %rdi      # 0x6261
callq 0x2330
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3e6f
movl -0xc(%rbp), %edi
movl $0x5, %esi
callq 0x2260
movl $0x10, -0x14(%rbp)
movl -0xc(%rbp), %edi
leaq -0x34(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x2350
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x3e5c
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e6f
leaq 0x240a(%rip), %rdi      # 0x626d
callq 0x2330
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: lock
void
lock(Lock *lk)
{
	if(!lk->init)
		lockinit(lk);
	if(pthread_mutex_lock(&lk->mutex) != 0)
		abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3ede
movq -0x8(%rbp), %rdi
callq 0x3f00
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x23f0
cmpl $0x0, %eax
je 0x3ef5
callq 0x2060
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: lockinit
static void
lockinit(Lock *lk)
{
	pthread_mutexattr_t attr;

	pthread_mutex_lock(&initmutex);
	if(lk->init == 0){
		pthread_mutexattr_init(&attr);
		pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
		pthread_mutex_init(&lk->mutex, &attr);
		pthread_mutexattr_destroy(&attr);
		lk->init = 1;
	}
	pthread_mutex_unlock(&initmutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xa935(%rip), %rdi      # 0xe848
callq 0x23f0
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3f59
leaq -0xc(%rbp), %rdi
callq 0x2390
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
callq 0x2120
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq -0xc(%rbp), %rsi
callq 0x23d0
leaq -0xc(%rbp), %rdi
callq 0x23e0
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
leaq 0xa8e8(%rip), %rdi      # 0xe848
callq 0x2230
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: canlock
int
canlock(Lock *lk)
{
	int r;

	if(!lk->init)
		lockinit(lk);
	r = pthread_mutex_trylock(&lk->mutex);
	if(r == 0)
		return 1;
	if(r == EBUSY)
		return 0;
	abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3f8e
movq -0x10(%rbp), %rdi
callq 0x3f00
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2170
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x3fad
movl $0x1, -0x4(%rbp)
jmp 0x3fc1
cmpl $0x10, -0x14(%rbp)
jne 0x3fbc
movl $0x0, -0x4(%rbp)
jmp 0x3fc1
callq 0x2060
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: rsleep
void
rsleep(Rendez *r)
{
	if(!r->init)
		rendinit(r);
	if(pthread_cond_wait(&r->cond, &r->l->mutex) != 0)
		abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x401e
movq -0x8(%rbp), %rdi
callq 0x4050
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
callq 0x20c0
cmpl $0x0, %eax
je 0x4041
callq 0x2060
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: rendinit
static void
rendinit(Rendez *r)
{
	pthread_condattr_t attr;

	pthread_mutex_lock(&initmutex);
	if(r->init == 0){
		pthread_condattr_init(&attr);
		pthread_cond_init(&r->cond, &attr);
		pthread_condattr_destroy(&attr);
		r->init = 1;
	}
	pthread_mutex_unlock(&initmutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xa7e5(%rip), %rdi      # 0xe848
callq 0x23f0
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x409e
leaq -0xc(%rbp), %rdi
callq 0x2290
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2210
leaq -0xc(%rbp), %rdi
callq 0x2150
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
leaq 0xa7a3(%rip), %rdi      # 0xe848
callq 0x2230
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: rwakeup
void
rwakeup(Rendez *r)
{
	if(!r->init)
		return;
	if(pthread_cond_signal(&r->cond) != 0)
		abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x40c7
jmp 0x40de
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0x21a0
cmpl $0x0, %eax
je 0x40de
callq 0x2060
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: rwakeupall
void
rwakeupall(Rendez *r)
{
	if(!r->init)
		return;
	if(pthread_cond_broadcast(&r->cond) != 0)
		abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x4107
jmp 0x411e
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0x2080
cmpl $0x0, %eax
je 0x411e
callq 0x2060
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: threadcreate
int
threadcreate(void *(*f)(void*), void *arg)
{
	struct ThreadArg *args;
	int id;

	lock(&idlock);
	id = addthreadid();
	args = malloc(sizeof(*args));
	args->id = id;
	args->f = f;
	args->arg = arg;
	pthread_create(&threads[id], nil, trampoline, args);
	unlock(&idlock);
	return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xa6c1(%rip), %rdi      # 0xe808
callq 0x3ec0
callq 0x41c0
movl %eax, -0x1c(%rbp)
movl $0x18, %edi
callq 0x2250
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0xa6ae(%rip), %rdi      # 0xe838
movslq -0x1c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0x9c(%rip), %rdx        # 0x4240
callq 0x22b0
leaq 0xa658(%rip), %rdi      # 0xe808
callq 0x3fd0
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: addthreadid
static int
addthreadid(void)
{
	int id;

	if(numthreads >= maxthreads){
		maxthreads += 64;
		threads = realloc(threads, maxthreads*sizeof(*threads));
	}
	id = numthreads++;
	threads[id] = 0;
	return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xa672(%rip), %eax      # 0xe840
cmpl 0xa69c(%rip), %eax      # 0xe870
jl 0x4203
movl 0xa694(%rip), %eax      # 0xe870
addl $0x40, %eax
movl %eax, 0xa68b(%rip)      # 0xe870
movq 0xa64c(%rip), %rdi      # 0xe838
movslq 0xa67d(%rip), %rsi      # 0xe870
shlq $0x3, %rsi
callq 0x2270
movq %rax, 0xa635(%rip)      # 0xe838
movl 0xa637(%rip), %eax      # 0xe840
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xa62c(%rip)      # 0xe840
movl %eax, -0x4(%rbp)
movq 0xa61a(%rip), %rax      # 0xe838
movslq -0x4(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: trampoline
static void*
trampoline(void *p)
{
	struct ThreadArg *args;
	void *(*f)(void*);
	void *arg;

	args = p;
	myid = args->id;
	f = args->f;
	arg = args->arg;
	free(args);
	return f(arg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq %fs:0x0, %rax
leaq -0x10(%rax), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2030
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rdi
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: gethandle
static pthread_t
gethandle(int id)
{
	pthread_t th;
	lock(&idlock);
	th = threads[id];
	unlock(&idlock);
	return th;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0xa496(%rip), %rdi      # 0xe808
callq 0x3ec0
movq 0xa4ba(%rip), %rax      # 0xe838
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
leaq 0xa477(%rip), %rdi      # 0xe808
callq 0x3fd0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chancreate
Channel*
chancreate(int elemsize, int bufsize)
{
	Channel *c;

	c = malloc(sizeof(Channel) + bufsize*elemsize);
	if(c == nil)
		return nil;
	memset(c, 0, sizeof(Channel));
	c->elemsize = elemsize;
	c->bufsize = bufsize;
	c->nbuf = 0;
	c->buf = (uchar*)(c+1);
	c->full.l = &c->lock;
	c->empty.l = &c->lock;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl -0x10(%rbp), %eax
imull -0xc(%rbp), %eax
movslq %eax, %rdi
addq $0xd0, %rdi
callq 0x2250
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4459
movq $0x0, -0x8(%rbp)
jmp 0x44c5
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0xd0, %edx
callq 0x2140
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rcx
addq $0xd0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
addq $0x20, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rcx
addq $0x20, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chanclose
void
chanclose(Channel *c)
{
	lock(&c->lock);
	c->closed = 1;
	rwakeupall(&c->full);
	rwakeupall(&c->empty);
	unlock(&c->lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x3ec0
movq -0x8(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0x40f0
movq -0x8(%rbp), %rdi
addq $0x90, %rdi
callq 0x40f0
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chansend
int
chansend(Channel *c, void *p)
{
	lock(&c->lock);
	while(!(c->closed || cansend(c)))
		rsleep(&c->full);
	/* closed or can send */
	if(c->closed){
		/* can never send to closed chan */
		unlock(&c->lock);
		return -1;
	}
	chansend_(c, p);
	rwakeup(&c->empty);
	unlock(&c->lock);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3ec0
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x18(%rcx)
movb %al, -0x19(%rbp)
jne 0x458e
movq -0x10(%rbp), %rdi
callq 0x4610
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4599
jmp 0x45a8
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x4000
jmp 0x456d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x45c8
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x45f9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4630
movq -0x10(%rbp), %rdi
addq $0x90, %rdi
callq 0x40b0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chansend_
static void
chansend_(Channel *c, void *p)
{
	uchar *pp;

	assert(cansend(c));
	pp = c->buf + (c->off+c->nbuf)%c->bufsize * c->elemsize;
	memmove(pp, p, c->elemsize);
	c->nbuf++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4610
cmpl $0x0, %eax
je 0x4650
jmp 0x466f
leaq 0x1c67(%rip), %rdi      # 0x62be
leaq 0x1c38(%rip), %rsi      # 0x6296
movl $0x10e, %edx            # imm = 0x10E
leaq 0x1c5f(%rip), %rcx      # 0x62c9
callq 0x2130
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x8(%rbp), %rcx
cltd
idivl (%rcx)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
imull 0x4(%rcx), %edx
movslq %edx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rdx
callq 0x22d0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chanrecv
int
chanrecv(Channel *c, void *p)
{
	lock(&c->lock);
	while(!(c->closed || canrecv(c)))
		rsleep(&c->empty);
	/* closed or can receive */
	if(canrecv(c)){
		/* can still receive from closed chan */
		chanrecv_(c, p);
		rwakeup(&c->full);
		unlock(&c->lock);
		return 1;
	}
	unlock(&c->lock);
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3ec0
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x18(%rcx)
movb %al, -0x19(%rbp)
jne 0x470e
movq -0x10(%rbp), %rdi
callq 0x4790
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4719
jmp 0x472b
movq -0x10(%rbp), %rdi
addq $0x90, %rdi
callq 0x4000
jmp 0x46ed
movq -0x10(%rbp), %rdi
callq 0x4790
cmpl $0x0, %eax
je 0x4769
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x47b0
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x40b0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x1, -0x4(%rbp)
jmp 0x477d
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: chanrecv_
static void
chanrecv_(Channel *c, void *p)
{
	uchar *pp;

	assert(canrecv(c));
	pp = c->buf + c->off*c->elemsize;
	memmove(p, pp, c->elemsize);
	c->nbuf--;
	if(++c->off == c->bufsize)
		c->off = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4790
cmpl $0x0, %eax
je 0x47d0
jmp 0x47ef
leaq 0x1b14(%rip), %rdi      # 0x62eb
leaq 0x1ab8(%rip), %rsi      # 0x6296
movl $0x119, %edx            # imm = 0x119
leaq 0x1b0c(%rip), %rcx      # 0x62f6
callq 0x2130
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x8(%rbp), %rdx
imull 0x4(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rdx
callq 0x22d0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x14(%rcx)
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x4852
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: channbsend
int
channbsend(Channel *c, void *p)
{
	lock(&c->lock);
	if(c->closed){
		/* can never send to closed chan */
		unlock(&c->lock);
		return -1;
	}
	if(cansend(c)){
		chansend_(c, p);
		rwakeup(&c->empty);
		unlock(&c->lock);
		return 1;
	}
	unlock(&c->lock);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3ec0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x489d
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48f2
movq -0x10(%rbp), %rdi
callq 0x4610
cmpl $0x0, %eax
je 0x48de
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4630
movq -0x10(%rbp), %rdi
addq $0x90, %rdi
callq 0x40b0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x1, -0x4(%rbp)
jmp 0x48f2
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/common/threading.c
// Function: channbrecv
int
channbrecv(Channel *c, void *p)
{
	lock(&c->lock);
	if(canrecv(c)){
		/* can still receive from closed chan */
		chanrecv_(c, p);
		rwakeup(&c->full);
		unlock(&c->lock);
		return 1;
	}
	if(c->closed){
		unlock(&c->lock);
		return -1;
	}
	unlock(&c->lock);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3ec0
movq -0x10(%rbp), %rdi
callq 0x4790
cmpl $0x0, %eax
je 0x495b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x47b0
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0x40b0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x1, -0x4(%rbp)
jmp 0x498f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x497b
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x498f
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3fd0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: depositreg
void
depositreg(int a, Word w)
{
	switch(a){
	case REG_PC: tx0.pc = w & ADDRMASK; break;
	case REG_AC: tx0.ac = w & WORDMASK; break;
	case REG_LR: tx0.lr = w & WORDMASK; break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x4a3a
jmp 0x4a26
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x4a4a
jmp 0x4a30
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x4a5a
jmp 0x4a68
movl -0x8(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x9e58(%rip)      # 0xe8a0
jmp 0x4a68
movl -0x8(%rbp), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, 0x9e38(%rip)      # 0xe890
jmp 0x4a68
movl -0x8(%rbp), %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, 0x9e2c(%rip)      # 0xe894
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: examinereg
Word
examinereg(int a)
{
	switch(a){
	case REG_PC: return tx0.pc;
	case REG_AC: return tx0.ac;
	case REG_LR: return tx0.lr;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x4a97
jmp 0x4a83
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x4aa2
jmp 0x4a8d
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x4aad
jmp 0x4ab8
movl 0x9e03(%rip), %eax      # 0xe8a0
movl %eax, -0x4(%rbp)
jmp 0x4abf
movl 0x9de8(%rip), %eax      # 0xe890
movl %eax, -0x4(%rbp)
jmp 0x4abf
movl 0x9de1(%rip), %eax      # 0xe894
movl %eax, -0x4(%rbp)
jmp 0x4abf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: handlemsg
void
handlemsg(TX0 *tx, Msg msg)
{
	switch(msg.cmd){
	case CMD_NONE:
		break;
	case CMD_SET_PC:
		tx->mar = tx->pc = msg.arg & ADDRMASK;
		break;
	case CMD_STEP:
		tx->sw_stop_c0 = 1;
		tx->sw_stop_c1 = 1;
		tx->pbs = 1;
		break;
	case CMD_RUN:
		tx->sw_stop_c0 = 0;
		tx->sw_stop_c1 = 0;
		tx->pbs = 1;
		break;
	case CMD_STOP:
		tx->pbs = 0;
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x50b9
movq -0x18(%rbp), %rax
leaq 0x12f0(%rip), %rcx      # 0x6328
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x50b9
movl -0x4(%rbp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x50b9
movq -0x10(%rbp), %rax
movl $0x1, 0x40034(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x40038(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x50b9
movq -0x10(%rbp), %rax
movl $0x0, 0x40034(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x40038(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x50b9
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: simthread
void*
simthread(void *arg)
{
	TX0 *tx = (TX0*)arg;
	Msg msg;
	for(;;){
		switch(channbrecv(cmdchan, &msg)){
		case -1:	// channel closed
			return nil;
		case 0:	break;	// nothing
		case 1:
			handlemsg(tx, msg);
			break;
		}

		// a cycle takes around 6μs
		cycle(tx);
		handleio(tx);
	}
	return nil;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x4986d(%rip), %rdi     # 0x4e948
leaq -0x18(%rbp), %rsi
callq 0x4900
movl %eax, %ecx
movl %ecx, -0x1c(%rbp)
subl $-0x1, %eax
je 0x5103
jmp 0x50f0
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x510b
jmp 0x50f9
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x510d
jmp 0x511a
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
jmp 0x511a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5010
movq -0x10(%rbp), %rdi
callq 0x5130
movq -0x10(%rbp), %rdi
callq 0x4d80
jmp 0x50d4
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: readmem
void
readmem(TX0 *tx, FILE *f)
{
	char buf[100], *s;
	Word a, w;

	a = 0;
	while(s = fgets(buf, 100, f)){
		while(*s){
			if(*s == ';')
				break;
			else if('0' <= *s && *s <= '7'){
				w = strtol(s, &s, 8);
				if(*s == ':'){
					a = w;
					s++;
				}else if(a < MAXMEM)
					tx->core[a++] = w & 0777777;
			}else
				s++;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x8c(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x64, %esi
callq 0x2190
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x5732
jmp 0x5642
movq -0x88(%rbp), %rax
cmpb $0x0, (%rax)
je 0x572d
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x5666
jmp 0x572d
movq -0x88(%rbp), %rax
movsbl (%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x5714
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x37, %eax
jg 0x5714
movq -0x88(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl $0x8, %edx
callq 0x21e0
movl %eax, -0x90(%rbp)
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x56dd
movl -0x90(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x5712
cmpl $0x10000, -0x8c(%rbp)   # imm = 0x10000
jae 0x5710
movl -0x90(%rbp), %edx
andl $0x3ffff, %edx          # imm = 0x3FFFF
movq -0x8(%rbp), %rax
movl -0x8c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x8c(%rbp)
movl %ecx, %ecx
movl %edx, 0x2c(%rax,%rcx,4)
jmp 0x5712
jmp 0x5726
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x5728
jmp 0x5642
jmp 0x561d
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: readsyms
void
readsyms(FILE *f)
{
	char buf[100], *s;
	Word w;

	while(s = fgets(buf, 100, f)){
		while(isspace(*s)) s++;
		while(!isspace(*s)) s++;
		*s++ = '\0';
		w = strtol(s, &s, 8);
		defsym(buf, w);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl $0x64, %esi
callq 0x2190
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x5810
jmp 0x5771
callq 0x2400
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x579f
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x5771
jmp 0x57a1
callq 0x2400
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x57ca
jmp 0x57d8
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x57a1
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x78(%rbp)
movb $0x0, (%rax)
movq -0x78(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x8, %edx
callq 0x21e0
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
movl -0x7c(%rbp), %esi
callq 0x2b00
jmp 0x574f
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: cpu_start
void
cpu_start(Addr a)
{
	Msg msg;
	msg.cmd = CMD_SET_PC;
	msg.arg = a;
	chansend(cmdchan, &msg);
	msg.cmd = CMD_RUN;
	chansend(cmdchan, &msg);
	dly();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x1, -0xc(%rbp)
movzwl -0x2(%rbp), %eax
movl %eax, -0x8(%rbp)
movq 0x49104(%rip), %rdi     # 0x4e948
leaq -0xc(%rbp), %rsi
callq 0x4550
movl $0x3, -0xc(%rbp)
movq 0x490ed(%rip), %rdi     # 0x4e948
leaq -0xc(%rbp), %rsi
callq 0x4550
callq 0x5870
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: dly
static void
dly(void)
{
	// force a few cycles to happen
	chansend(cmdchan, &msg_none);
	chansend(cmdchan, &msg_none);
	chansend(cmdchan, &msg_none);
	chansend(cmdchan, &msg_none);
	chansend(cmdchan, &msg_none);
	chansend(cmdchan, &msg_none);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x490cd(%rip), %rdi     # 0x4e948
leaq 0x490da(%rip), %rsi     # 0x4e95c
callq 0x4550
movq 0x490ba(%rip), %rdi     # 0x4e948
leaq 0x490c7(%rip), %rsi     # 0x4e95c
callq 0x4550
movq 0x490a7(%rip), %rdi     # 0x4e948
leaq 0x490b4(%rip), %rsi     # 0x4e95c
callq 0x4550
movq 0x49094(%rip), %rdi     # 0x4e948
leaq 0x490a1(%rip), %rsi     # 0x4e95c
callq 0x4550
movq 0x49081(%rip), %rdi     # 0x4e948
leaq 0x4908e(%rip), %rsi     # 0x4e95c
callq 0x4550
movq 0x4906e(%rip), %rdi     # 0x4e948
leaq 0x4907b(%rip), %rsi     # 0x4e95c
callq 0x4550
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/tx0/mach.c
// Function: cpu_nextinst
void
cpu_nextinst(void)
{
	Msg msg;
	msg.cmd = CMD_STEP;
	chansend(cmdchan, &msg);
	dly();
	while(tx0.c){
		chansend(cmdchan, &msg);
		dly();
	}
	// make sure we see the correct PC
	tx0.pc = tx0.mar;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x2, -0x8(%rbp)
movq 0x48fa2(%rip), %rdi     # 0x4e948
leaq -0x8(%rbp), %rsi
callq 0x4550
callq 0x5870
cmpl $0x0, 0x8ed1(%rip)      # 0xe88c
je 0x59d4
movq 0x48f84(%rip), %rdi     # 0x4e948
leaq -0x8(%rbp), %rsi
callq 0x4550
callq 0x5870
jmp 0x59b4
movl 0x8ec2(%rip), %eax      # 0xe89c
movl %eax, 0x8ec0(%rip)      # 0xe8a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)