LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/vusec[P]fpvi-scsb/leak_rate_win_size/exception_suppression.c
// Function: win_size_run
void win_size_run(win_size_func_t win_size_func)
{
    /* Setup */
    set_cpu(EXECUTER_CORE);
    memset(results, 0, sizeof(results));

    for(int j=0; j<ITER; j++)
    {
        flush(reload_buf);
        win_size_func(reload_buf);
        reload(reload_buf, results);
    }

    print_results(results, 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x40b064
leaq 0x16c51(%rip), %r14     # 0x419000
movl $0x800, %edx            # imm = 0x800
movq %r14, %rdi
xorl %esi, %esi
callq 0x4010a0
pushq $0xd
popq %r12
cmpl $0x2710, %r15d          # imm = 0x2710
je 0x40245a
movq 0x1742a(%rip), %rax     # 0x419800
xorl %ecx, %ecx
cmpq $0x40000, %rcx          # imm = 0x40000
je 0x4023f1
leaq (%rax,%rcx), %rdx
clflush (%rdx)
addq $0x400, %rcx            # imm = 0x400
jmp 0x4023d8
mfence
movq 0x17405(%rip), %rdi     # 0x419800
callq *%rbx
movq 0x173fc(%rip), %rdi     # 0x419800
mfence
movq %r12, %r8
cmpq $0xa70d, %r8            # imm = 0xA70D
je 0x402452
movzbl %r8b, %r9d
movl %r9d, %r10d
shll $0xa, %r10d
rdtscp
movq %rdx, %rsi
shlq $0x20, %rsi
orq %rax, %rsi
movb (%rdi,%r10), %al
rdtscp
shlq $0x20, %rdx
orq %rax, %rdx
subq %rsi, %rdx
cmpq $0x9f, %rdx
ja 0x402449
incq (%r14,%r9,8)
addq $0xa7, %r8
jmp 0x40240a
incl %r15d
jmp 0x4023c2
leaq 0x16b9f(%rip), %rdi     # 0x419000
pushq $0x1
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4020e8
// File: /workspace/github_c_makefile_star2_O2/vusec[P]fpvi-scsb/leak_rate_win_size/exception_suppression.c
// Function: fault_win_size_run
void fault_win_size_run()
{
    if (signal(SIGSEGV, segfault_handler) == SIG_ERR)
    {
        exit(1);
    }

    memset(results, 0, sizeof(results));
    for(int j=0; j<ITER; j++)
    {
        flush(reload_buf);
        if (!setjmp(buf)) {
            fault_win_size(reload_buf);
        }
        reload(reload_buf, results);
    }

    print_results(results, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x104(%rip), %rsi       # 0x402597
pushq $0xb
popq %rdi
callq 0x4010e0
cmpq $-0x1, %rax
je 0x40258f
leaq 0x16b54(%rip), %rbx     # 0x419000
xorl %ebp, %ebp
movl $0x800, %edx            # imm = 0x800
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4010a0
leaq 0x1734c(%rip), %r14     # 0x419810
pushq $0xd
popq %r15
movl %ebp, %r12d
cmpl $0x2710, %r12d          # imm = 0x2710
je 0x402577
movq 0x17321(%rip), %rax     # 0x419800
movl %ebp, %ecx
cmpq $0x40000, %rcx          # imm = 0x40000
je 0x4024fa
leaq (%rax,%rcx), %rdx
clflush (%rdx)
addq $0x400, %rcx            # imm = 0x400
jmp 0x4024e1
mfence
movq %r14, %rdi
callq 0x4010d0
testl %eax, %eax
jne 0x402515
movq 0x172f0(%rip), %rdi     # 0x419800
callq 0x402db0
movq 0x172e4(%rip), %rsi     # 0x419800
mfence
movq %r15, %rdi
cmpq $0xa70d, %rdi           # imm = 0xA70D
je 0x40256f
movzbl %dil, %eax
movl %eax, %r8d
movl %r8d, %eax
shll $0xa, %eax
movl %eax, %r9d
rdtscp
shlq $0x20, %rdx
movq %rdx, %r10
orq %rax, %r10
movb (%rsi,%r9), %al
rdtscp
shlq $0x20, %rdx
orq %rax, %rdx
subq %r10, %rdx
cmpq $0x9f, %rdx
ja 0x402566
incq (%rbx,%r8,8)
addq $0xa7, %rdi
jmp 0x402522
incl %r12d
jmp 0x4024cb
leaq 0x16a82(%rip), %rdi     # 0x419000
pushq $0x1
popq %rsi
callq 0x4020e8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x401150
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/samples/test/test.cpp
// Function: Test::~Test()
Test::~Test()
{
	DeleteObject(text_arrows);
	DeleteObject(widget_arrows);
	DeleteObject(text_arrows_value);

	DeleteObject(text_activearea);
	DeleteObject(widget_activearea);

	DeleteObject(text_button);
	DeleteObject(widget_button);

	DeleteObject(text_hyperlink);
	DeleteObject(widget_hyperlink);

	DeleteObject(text_scrollbar);
	DeleteObject(widget_scrollbar);
	DeleteObject(text_scrollbar_value);

	DeleteObject(text_progressbar);
	DeleteObject(widget_progressbar);

	DeleteObject(text_slider);
	DeleteObject(widget_slider);

	DeleteObject(text_checkbox);
	DeleteObject(widget_checkbox);

	DeleteObject(text_optionbox);
	DeleteObject(widget_optionbox1);
	DeleteObject(widget_optionbox2);

	DeleteObject(text_editbox);
	DeleteObject(widget_editbox);

	DeleteObject(text_combobox);
	DeleteObject(widget_combobox);

	DeleteObject(button_show);
	DeleteObject(button_hide);
	DeleteObject(button_activate);
	DeleteObject(button_deactivate);

	DeleteObject(menu_file);
	DeleteObject(menu_dialogs);
	DeleteObject(menu_menus);
	DeleteObject(menu_2ndlevel);

	DeleteObject(mainWnd_menubar);

	DeleteObject(mainWnd_divider1);
	DeleteObject(mainWnd_divider2);
	DeleteObject(mainWnd_client);

	DeleteObject(mainWnd_statusbar);
	DeleteObject(mainWnd_titlebar);
	DeleteObject(mainWnd);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4701(%rip), %rax      # 0xa980
movq %rax, (%rdi)
movq 0x610(%rdi), %rdi
callq 0x4480
movq 0x618(%rbx), %rdi
callq 0x4480
movq 0x620(%rbx), %rdi
callq 0x4480
movq 0x628(%rbx), %rdi
callq 0x4480
movq 0x630(%rbx), %rdi
callq 0x4480
movq 0x638(%rbx), %rdi
callq 0x4480
movq 0x640(%rbx), %rdi
callq 0x4480
movq 0x648(%rbx), %rdi
callq 0x4480
movq 0x650(%rbx), %rdi
callq 0x4480
movq 0x658(%rbx), %rdi
callq 0x4480
movq 0x660(%rbx), %rdi
callq 0x4480
movq 0x668(%rbx), %rdi
callq 0x4480
movq 0x670(%rbx), %rdi
callq 0x4480
movq 0x678(%rbx), %rdi
callq 0x4480
movq 0x6b8(%rbx), %rdi
callq 0x4480
movq 0x6c0(%rbx), %rdi
callq 0x4480
movq 0x680(%rbx), %rdi
callq 0x4480
movq 0x688(%rbx), %rdi
callq 0x4480
movq 0x698(%rbx), %rdi
callq 0x4480
movq 0x6a0(%rbx), %rdi
callq 0x4480
movq 0x6a8(%rbx), %rdi
callq 0x4480
movq 0x6c8(%rbx), %rdi
callq 0x4480
movq 0x6d0(%rbx), %rdi
callq 0x4480
movq 0x6d8(%rbx), %rdi
callq 0x4480
movq 0x6e0(%rbx), %rdi
callq 0x4480
movq 0x6e8(%rbx), %rdi
callq 0x4480
movq 0x6f0(%rbx), %rdi
callq 0x4480
movq 0x6f8(%rbx), %rdi
callq 0x4480
movq 0x700(%rbx), %rdi
callq 0x4480
movq 0x5f0(%rbx), %rdi
callq 0x4480
movq 0x5f8(%rbx), %rdi
callq 0x4480
movq 0x600(%rbx), %rdi
callq 0x4480
movq 0x608(%rbx), %rdi
callq 0x4480
movq 0x5e8(%rbx), %rdi
callq 0x4480
movq 0x5d0(%rbx), %rdi
callq 0x4480
movq 0x5d8(%rbx), %rdi
callq 0x4480
movq 0x5e0(%rbx), %rdi
callq 0x4480
movq 0x5c8(%rbx), %rdi
callq 0x4480
movq 0x5c0(%rbx), %rdi
callq 0x4480
movq 0x5b8(%rbx), %rdi
callq 0x4480
movq %rbx, %rdi
popq %rbx
jmp 0x4280
movq %rax, %rdi
callq 0x690f
nop
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: err
void
err(int n, char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	fprintf(stderr, "%s:%d: ", filename, lineno);
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, "\n");
	va_end(ap);

	if(n)
		exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq -0xf0(%rbp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x12da
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
leaq -0x40(%rbp), %r15
movq %rsi, 0x10(%r15)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
movq 0x3cfa(%rip), %r12      # 0x4ff8
movq (%r12), %rdi
movq 0x4037(%rip), %rdx      # 0x5340
movl 0x3dc5(%rip), %ecx      # 0x50d4
leaq 0x1cee(%rip), %rsi      # 0x3004
xorl %eax, %eax
callq 0x10c0
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1120
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x1080
testl %ebx, %ebx
jne 0x134c
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: panic
void
panic(char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, "\n");
	va_end(ap);
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r10
leaq -0xd0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x13a8
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)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x3c2c(%rip), %rbx      # 0x4ff8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x1120
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x1080
pushq $0x1
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: mustmalloc
void*
mustmalloc(size_t size)
{
	void *p;
	p = malloc(size);
	if(p == nil)
		panic("out of memory");
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x10f0
testq %rax, %rax
je 0x1425
popq %rbp
retq
leaq 0x1bf7(%rip), %rdi      # 0x3023
xorl %eax, %eax
callq 0x1354
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: list
void
list(char *left)
{
	if(left == nil)
		left = "          \t";
	if(line[0])
		fprintf(lstfp, "%s%05d    %s", left, lastlistline, line);
	else
		fprintf(lstfp, "%s\n", left);
	line[0] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
leaq 0x1bf0(%rip), %rdx      # 0x3031
cmovneq %rdi, %rdx
cmpb $0x0, 0x3f04(%rip)      # 0x5350
movq 0x3f4d(%rip), %rdi      # 0x53a0
je 0x1472
movl 0x3c7d(%rip), %ecx      # 0x50d8
leaq 0x1bdb(%rip), %rsi      # 0x303d
leaq 0x3ee7(%rip), %r8       # 0x5350
xorl %eax, %eax
callq 0x10c0
jmp 0x1480
leaq 0x1bd1(%rip), %rsi      # 0x304a
xorl %eax, %eax
callq 0x10c0
movb $0x0, 0x3ec9(%rip)      # 0x5350
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: listsyms
void
listsyms(void)
{
	Sym *s;

	qsort(symtab, MAXSYM, sizeof(Sym), cmpsym);
	fprintf(lstfp, "\n    SYMBOL TABLE\n");
	for(s = symtab; s < &symtab[MAXSYM]; s++){
		if((s->type&7) != SymValue)
			continue;
		fprintf(lstfp, "%-07s %06o\n", s->name, s->val);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3f0c(%rip), %rbx      # 0x53b0
leaq -0x22(%rip), %rcx       # 0x1489
pushq $0x18
popq %rdx
movl $0xfa0, %esi            # imm = 0xFA0
movq %rbx, %rdi
callq 0x1050
movq 0x3ede(%rip), %rcx      # 0x53a0
leaq 0x1b85(%rip), %rdi      # 0x304e
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x1150
leaq 0x1b86(%rip), %r14      # 0x3061
xorl %r15d, %r15d
cmpq $0x176ff, %r15          # imm = 0x176FF
ja 0x1515
movl 0x8(%r15,%rbx), %eax
andl $0x7, %eax
cmpl $0x1, %eax
jne 0x150f
leaq (%rbx,%r15), %rdx
movq 0x3ea1(%rip), %rdi      # 0x53a0
movzwl 0x10(%r15,%rbx), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
addq $0x18, %r15
jmp 0x14de
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: ch
int
ch(void)
{
	int c;

tail:
	if(peekc){
		c = peekc;
		peekc = 0;
		return c;
	}

	/* listing */
	if(pass2 && lastlistline != lineno){
		/* if line hasn't been printed yet, do it now */
		if(line[0])
			list(nil);

		int pos = ftell(infp);
		char *p;
		for(p = line; p < &line[80-2]; p++){
			c = getc(infp);
			if(c == '\n' || c == EOF)
				break;
			*p = c;
		}
		if(!(p == line && c == EOF))
			*p++ = '\n';
		*p++ = '\0';
		fseek(infp, pos, SEEK_SET);
		lastlistline = lineno;
	}

	c = getc(infp);
	if(c == EOF)
		return EOF;
	if(c == '\n')
		lineno++;
	// We only want ASCII!!
	c &= 0177;
	if(tmpfp)
		putc(c, tmpfp);

	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x1b580(%rip), %ebx     # 0x1cab0
testl %ebx, %ebx
je 0x1548
andl $0x0, 0x1b575(%rip)     # 0x1cab0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x1b565(%rip)     # 0x1cab4
je 0x15f9
movl 0x3b7d(%rip), %eax      # 0x50d8
cmpl 0x3b73(%rip), %eax      # 0x50d4
je 0x15f9
cmpb $0x0, 0x3de2(%rip)      # 0x5350
je 0x1577
xorl %edi, %edi
callq 0x1433
movq 0x1b53a(%rip), %rdi     # 0x1cab8
callq 0x10d0
movq %rax, %rbx
xorl %r14d, %r14d
leaq 0x3dc0(%rip), %r15      # 0x5350
cmpq $0x4e, %r14
je 0x15c5
movq 0x1b51b(%rip), %rdi     # 0x1cab8
callq 0x1160
cmpl $-0x1, %eax
je 0x15b5
cmpl $0xa, %eax
je 0x15b5
movb %al, (%r14,%r15)
incq %r14
jmp 0x1590
testq %r14, %r14
sete %cl
cmpl $-0x1, %eax
sete %al
testb %al, %cl
jne 0x15d8
leaq 0x3d84(%rip), %rax      # 0x5350
leaq (%r14,%rax), %r15
incq %r15
movb $0xa, -0x1(%r15)
movb $0x0, (%r15)
movq 0x1b4d5(%rip), %rdi     # 0x1cab8
movslq %ebx, %rsi
xorl %edx, %edx
callq 0x1100
movl 0x3ae1(%rip), %eax      # 0x50d4
movl %eax, 0x3adf(%rip)      # 0x50d8
movq 0x1b4b8(%rip), %rdi     # 0x1cab8
callq 0x1160
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x153b
cmpl $0xa, %ebx
jne 0x161b
incl 0x3ab9(%rip)            # 0x50d4
andl $0x7f, %ebx
movq 0x1b49b(%rip), %rsi     # 0x1cac0
testq %rsi, %rsi
je 0x153b
movl %ebx, %edi
callq 0x10b0
jmp 0x153b
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: findsym
Sym*
findsym(char *name)
{
	Sym *s;
	for(s = symtab; s < &symtab[MAXSYM]; s++)
		if(strncmp(s->name, name, SYMLEN) == 0)
			return s;
	return nil;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
leaq 0x3d11(%rip), %r12      # 0x53b0
pushq $0x6
popq %r15
xorl %r13d, %r13d
cmpq $0x176ff, %r13          # imm = 0x176FF
ja 0x16ce
leaq (%r12,%r13), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1040
addq $0x18, %r13
testl %eax, %eax
jne 0x16a6
leaq (%r12,%r13), %rbx
addq $-0x18, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: getsym
Sym*
getsym(char *name)
{
	Sym *s;
	s = findsym(name);
	if(s == nil){
		for(s = symtab; s < &symtab[MAXSYM]; s++)
			if(s->name[0] == 0)
				goto found;
		panic("symbol table full");
found:
		strncpy(s->name, name, SYMLEN);
		s->type = None;
		s->val = 0;
	}
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1685
movq %rax, %r14
testq %rax, %rax
jne 0x1733
leaq 0x3c9a(%rip), %rax      # 0x5398
xorl %ecx, %ecx
cmpq $0x176ff, %rcx          # imm = 0x176FF
ja 0x173b
leaq 0x18(%rax), %r14
addq $0x18, %rcx
cmpb $0x0, 0x18(%rax)
movq %r14, %rax
jne 0x1700
pushq $0x6
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1030
andl $0x0, 0x8(%r14)
andw $0x0, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x192b(%rip), %rdi      # 0x306d
xorl %eax, %eax
callq 0x1354
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: number
Token
number(void)
{
	int c;
	Token t;

	t.type = TokWord;
	t.w = 0;
	while(isdigit(c = ch())){
		if(c-'0' >= radix)
			err(0, "warning: invalid digit in current base");
		t.w = t.w*radix + c-'0';
	}
	peekc = c;
	if(c && !ispunc(c)){
		err(0, "warning: ignored characters after number");
		while(c = ch(), c != EOF && !ispunc(c));
		peekc = c;
	}
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x1170
movq %rax, %r14
leaq 0x190f(%rip), %r15      # 0x3096
xorl %ebx, %ebx
movq (%r14), %r13
callq 0x1520
movl %eax, %r12d
cltq
testb $0x8, 0x1(%r13,%rax,2)
je 0x17dc
leal -0x30(%r12), %ecx
movl 0x3927(%rip), %eax      # 0x50d0
cmpl %eax, %ecx
jl 0x17bf
xorl %edi, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x127c
movl 0x3911(%rip), %eax      # 0x50d0
movl %ebx, %ecx
imull %eax, %ecx
leal (%r12,%rcx), %eax
addl $0xffd0, %eax           # imm = 0xFFD0
movzwl %ax, %eax
andq $-0x10000, %rbx         # imm = 0xFFFF0000
orq %rax, %rbx
jmp 0x1789
movl %r12d, 0x1b2cd(%rip)    # 0x1cab0
testl %r12d, %r12d
je 0x1826
movsbl %r12b, %edi
callq 0x1749
testl %eax, %eax
jne 0x1826
leaq 0x18c1(%rip), %rsi      # 0x30bd
xorl %edi, %edi
xorl %eax, %eax
callq 0x127c
callq 0x1520
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x181f
movsbl %r14b, %edi
callq 0x1749
testl %eax, %eax
je 0x1805
movl %r14d, 0x1b28a(%rip)    # 0x1cab0
movl $0x82, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: symbol
Token
symbol(void)
{
	char symbuf[SYMLEN+1];
	int c;
	Token t;
	int len;

	len = 0;
	memset(symbuf, 0, sizeof(symbuf));
	while(c = ch(), issymchar(c))
		if(len<SYMLEN)
			symbuf[len++] = tolower(c);
	peekc = c;
	t.type = TokSymbol;
	t.sym = getsym(symbuf);
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
andl $0x0, -0x15(%rbp)
andl $0x0, -0x18(%rbp)
xorl %r14d, %r14d
callq 0x1520
movl %eax, %ebx
movl %eax, %edi
callq 0x183d
testl %eax, %eax
je 0x18b3
cmpl $0x5, %r14d
ja 0x1888
movl %ebx, %edi
callq 0x10e0
movl %r14d, %ecx
incl %r14d
movb %al, -0x18(%rbp,%rcx)
jmp 0x1888
movl %ebx, 0x1b1f7(%rip)     # 0x1cab0
leaq -0x18(%rbp), %rdi
callq 0x16e0
movq %rax, %rdx
movl $0x81, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: token
Token
token(void)
{
	static char *self = "+-!,=$*&()[]<>";
	int c;
	Token t;

tail:
	if(peekt.type != None){
		t = peekt;
		peekt.type = None;
		return t;
	}

	while(c = chsp(), c != EOF){
		if(isdigit(c)){
			peekc = c;
			return number();
		}else if(isalpha(c)){
			peekc = c;
			t = symbol();
			return t;
		}else if(strchr(self, c)){
			t.type = c;
			return t;
		}else switch(c){
		case '.':
			t.type = TokSymbol;
			t.sym = dot;
			return t;
		case ';':
		case '\n':
			t.type = TokEol;
			return t;
		case '"':
			t.type = TokWord;
			t.w = ch() | 0200;
			return t;
		case '/':
			while(ch() != '\n');
			t.type = TokEol;
			return t;
		default:
			err(0, "warning: ignored character %c", ch());
		}
	}
	t.type = TokEol;
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x1b1e4(%rip), %ebx     # 0x1cac8
testl %ebx, %ebx
je 0x18fb
movq 0x1b1e1(%rip), %rdx     # 0x1cad0
andl $0x0, 0x1b1d2(%rip)     # 0x1cac8
jmp 0x19c4
leaq 0x17e4(%rip), %r14      # 0x30e6
pushq $0xf
popq %r15
leaq 0x17e8(%rip), %r12      # 0x30f5
callq 0x164b
cmpl $-0x1, %eax
je 0x197e
movl %eax, %ebx
callq 0x1170
movq (%rax), %rax
movslq %ebx, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xb, %eax
jb 0x1985
btl $0xa, %eax
jb 0x1992
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x1090
testq %rax, %rax
jne 0x19c4
cmpl $0xa, %ebx
je 0x197e
cmpl $0x22, %ebx
je 0x19b2
cmpl $0x2e, %ebx
je 0x19a4
cmpl $0x3b, %ebx
je 0x197e
cmpl $0x2f, %ebx
je 0x1974
callq 0x1520
xorl %edi, %edi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x127c
jmp 0x190d
callq 0x1520
cmpl $0xa, %eax
jne 0x1974
movl $0x80, %ebx
jmp 0x19c4
movl %ebx, 0x1b125(%rip)     # 0x1cab0
callq 0x176a
jmp 0x19bf
movl %ebx, 0x1b118(%rip)     # 0x1cab0
callq 0x1872
movl $0x81, %ebx
jmp 0x19c4
movl $0x81, %ebx
movq 0x1b128(%rip), %rdx     # 0x1cad8
jmp 0x19c4
callq 0x1520
orl $0x80, %eax
movzwl %ax, %edx
movl $0x82, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: putword
void
putword(word w)
{
	static char left[64];

	if(pass2){
		/* listing */
		sprintf(left, "%04o  %06o\t", dot->val, w);
		list(left);

		fprintf(outfp, "%o: %o\n", dot->val++, w);
	}else{
		// this is probably useless...
		memory[dot->val++] = w;
	}
	dot->val &= W;
}

// Assembly:
cmpl $0x0, 0x1b0de(%rip)     # 0x1cab4
movq 0x1b0fb(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
je 0x1a3c
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl %di, %ebx
leaq 0x1b0ec(%rip), %r14     # 0x1cae0
leaq 0x1718(%rip), %rsi      # 0x3113
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x1433
movq 0x1b10a(%rip), %rdi     # 0x1cb20
movq 0x1b0bb(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
leal 0x1(%rdx), %ecx
movw %cx, 0x10(%rax)
leaq 0x16f0(%rip), %rsi      # 0x311f
movl %ebx, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x10c0
leal 0x1(%rdx), %ecx
movw %cx, 0x10(%rax)
movl %edx, %eax
leaq 0x1b0e4(%rip), %rcx     # 0x1cb30
movw %di, (%rcx,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: writelits
void
writelits(void)
{
	word a;
	static char left[64];

	fprintf(lstfp, "\n    LITERALS\n");
	for(a = litdot; a < 04000; a++){
		/* listing */
		sprintf(left, "%04o  %06o\t", a, memory[a]);
		list(left);

		fprintf(outfp, "%o: %o\n", a, memory[a]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x393a(%rip), %rcx      # 0x53a0
leaq 0x16ba(%rip), %rdi      # 0x3127
pushq $0xe
popq %rsi
pushq $0x1
popq %rdx
callq 0x1150
movzwl 0x1c0f1(%rip), %ebx     # 0x1db70
leaq 0x1b0aa(%rip), %rax     # 0x1cb30
leaq (%rax,%rbx,2), %r13
leaq 0x1c09f(%rip), %r14     # 0x1db30
leaq 0x167b(%rip), %r15      # 0x3113
leaq 0x1680(%rip), %r12      # 0x311f
cmpq $0x7ff, %rbx            # imm = 0x7FF
ja 0x1ae5
movzwl (%r13), %ecx
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x1433
movq 0x1b055(%rip), %rdi     # 0x1cb20
movzwl (%r13), %ecx
movq %r12, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10c0
incq %rbx
addq $0x2, %r13
jmp 0x1a9f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: putlit
word
putlit(word w)
{
	word a;

	for(a = litdot; a < 04000; a++)
		if(memory[a] == w)
			return a;
	if(litdot == 0)
		err(1, "error: too many literals");
	a = --litdot;
	memory[a] = w;
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movzwl 0x1c06c(%rip), %eax     # 0x1db70
leaq 0x1b025(%rip), %r14     # 0x1cb30
leaq (%r14,%rax,2), %rdx
movq %rax, %rcx
cmpq $0x7ff, %rcx            # imm = 0x7FF
ja 0x1b29
cmpw %bx, (%rdx)
je 0x1b59
incq %rcx
addq $0x2, %rdx
jmp 0x1b12
testw %ax, %ax
jne 0x1b46
leaq 0x1601(%rip), %rsi      # 0x3136
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x127c
movzwl 0x1c02a(%rip), %eax     # 0x1db70
decl %eax
movw %ax, 0x1c021(%rip)      # 0x1db70
movzwl %ax, %ecx
movw %bx, (%r14,%rcx,2)
jmp 0x1b5b
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: combine
word
combine(int op, word w1, word w2)
{
	switch(op){
	case 0:
		return w2;
	case '+':
		w1 += w2;
		if(w1 & 0200000)
			w1 += 1;
		return w1 & W;
	case '-':
		w1 += ~w2 & W;
		if(w1 & 0200000)
			w1 += 1;
		return w1 & W;
	case ' ':
	case '!':
		return (w1 | w2) & W;
	case '&':
		return (w1 & w2) & W;
	default:
		panic("unknown operator %c", op);
	}
	return 0;
}

// Assembly:
movl %edi, %eax
leal -0x20(%rax), %ecx
cmpl $0x2, %ecx
jb 0x1b81
testl %eax, %eax
je 0x1b8f
cmpl $0x26, %eax
je 0x1b8d
cmpl $0x2d, %eax
je 0x1b85
cmpl $0x2b, %eax
jne 0x1b92
addl %esi, %edx
jmp 0x1b8f
orl %esi, %edx
jmp 0x1b8f
notl %edx
addl %edx, %esi
movl %esi, %edx
jmp 0x1b8f
andl %esi, %edx
movl %edx, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x15b2(%rip), %rdi      # 0x314f
movl %eax, %esi
xorl %eax, %eax
callq 0x1354
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: expr
word
expr(int mustdef)
{
	word w, v;
	Token t;
	int op;
	int stype;

	/* operators:
	 * + add
	 * - sub
	 * ! or
	 * & and
	 * space combine */

	op = 0;
	w = 0;
	// not quite sure about expression delimiter here...
	while(t = token(), t.type != TokEol &&
	      t.type != ')' && t.type != ']' && t.type != ','){
		switch(t.type){
		case TokWord:
			w = combine(op, w, t.w);
			op = ' ';
			break;

		case TokSymbol:
			stype = t.sym->type & 7;
			v = 0;
			if(stype == SymValue)
				v = t.sym->val;
			else if(stype != None || pass2)
				err(1, "error: bad symbol in expression");
			if(mustdef && stype == None)
				err(1, "error: undefined symbol");
			w = combine(op, w, v);
			op = ' ';
			break;

		case '(':
			v = expr(0);
			v = putlit(v);
			w = combine(op, w, v);
			op = ' ';
			t = token();
			if(t.type != ')' && t.type != TokEol)
				err(1, "err: literal not closed");
			if(t.type != ')')
				peekt = t;
			break;

		case '+':
		case '-':
		case '!':
		case '&':
			op = t.type;
			break;
		}
	}
	peekt = t;
	return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, -0x2c(%rbp)
movl $0x1421, %ebx           # imm = 0x1421
movabsq $0x1000000000000900, %r15 # imm = 0x1000000000000900
xorl %r14d, %r14d
xorl %r13d, %r13d
callq 0x18d3
leal -0x21(%rax), %ecx
movzwl %r13w, %r12d
cmpl $0x3c, %ecx
ja 0x1bf3
btq %rcx, %rbx
jb 0x1c14
btq %rcx, %r15
jb 0x1ce9
cmpq $0x7, %rcx
je 0x1c19
cmpl $0x80, %eax
je 0x1ce9
cmpl $0x81, %eax
je 0x1c7f
cmpl $0x82, %eax
jne 0x1bcc
movzwl %dx, %edx
jmp 0x1cd2
movl %eax, %r14d
jmp 0x1bcc
xorl %edi, %edi
callq 0x1ba6
movzwl %ax, %edi
callq 0x1af4
movzwl %ax, %edx
movl %r14d, %edi
movl %r12d, %esi
callq 0x1b60
movl %eax, %r13d
callq 0x18d3
pushq $0x20
popq %r14
cmpl $0x29, %eax
je 0x1bcc
movl %eax, %r12d
cmpl $0x80, %eax
je 0x1c68
pushq $0x1
popq %rdi
leaq 0x1540(%rip), %rsi      # 0x319b
xorl %eax, %eax
movq %rdx, %r14
callq 0x127c
movq %r14, %rdx
movl %r12d, 0x1ae59(%rip)    # 0x1cac8
movq %rdx, 0x1ae5a(%rip)     # 0x1cad0
pushq $0x20
popq %r14
jmp 0x1bcc
movl 0x8(%rdx), %r13d
andl $0x7, %r13d
cmpl $0x1, %r13d
jne 0x1c93
movzwl 0x10(%rdx), %eax
jmp 0x1ccf
movl 0x1ae1b(%rip), %eax     # 0x1cab4
orl %r13d, %eax
je 0x1caf
pushq $0x1
popq %rdi
leaq 0x14bb(%rip), %rsi      # 0x3163
xorl %eax, %eax
callq 0x127c
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
je 0x1ccf
testl %r13d, %r13d
jne 0x1ccf
pushq $0x1
popq %rdi
leaq 0x14bd(%rip), %rsi      # 0x3183
xorl %eax, %eax
callq 0x127c
xorl %eax, %eax
movzwl %ax, %edx
movl %r14d, %edi
movl %r12d, %esi
callq 0x1b60
movl %eax, %r13d
pushq $0x20
popq %r14
jmp 0x1bcc
movl %eax, 0x1add9(%rip)     # 0x1cac8
movq %rdx, 0x1adda(%rip)     # 0x1cad0
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: statement
void
statement(void)
{
	Token t;
	Sym *s;
	word w;

	while(t = token(), t.type != TokEol){
		switch(t.type){
		case TokSymbol:
			s = t.sym;
			if(peek() == ','){
				peekc = 0;
				if(s->type == None ||
				   s->type & SymLabel && s->val == dot->val){
					s->type = SymValue | SymLabel;
					s->val = dot->val;
				}else{
					err(1, "error: redefinition by label");
				}
			}else if(peek() == '='){
				peekc = 0;
				w = expr(0);
				if(s->type == None || (s->type & SymLabel) == 0){
					s->type = SymValue;
					s->val = w;
				}else
					err(1, "error: redefinition by equ");
			}else{
				peekt = t;
				w = expr(0);
				putword(w);
			}
			break;
		case '-':
		case TokWord:
			peekt = t;
			w = expr(0);
			putword(w);
			break;

		case '$':
			t = token();
			if(t.type == TokWord)
				startaddr = t.w;
			else if(t.type == TokSymbol){
				startaddr = t.sym->val;
			}else
				err(1, "error: expected word or symbol");
			// end assembly
			peekc = EOF;
			return;

		case '*':
			w = expr(1);
			dot->val = w;
			break;

		default:
			err(1, "unknown token %c", t.type);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
leaq 0x1493(%rip), %r14      # 0x31b3
leaq 0x14a9(%rip), %r15      # 0x31d0
leaq 0x14dc(%rip), %r12      # 0x320a
callq 0x18d3
cmpl $0x2a, %eax
je 0x1dca
movq %rdx, %r13
cmpl $0x2d, %eax
je 0x1d76
cmpl $0x81, %eax
je 0x1d94
cmpl $0x82, %eax
je 0x1d76
cmpl $0x24, %eax
je 0x1e4f
cmpl $0x80, %eax
je 0x1e90
movl %ebx, %edi
movq %r12, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x127c
jmp 0x1d2e
movl %eax, 0x1ad4c(%rip)     # 0x1cac8
movq %r13, 0x1ad4d(%rip)     # 0x1cad0
xorl %edi, %edi
callq 0x1ba6
movzwl %ax, %edi
callq 0x19cf
jmp 0x1d2e
callq 0x163a
cmpl $0x2c, %eax
jne 0x1de1
andl $0x0, 0x1ad0b(%rip)     # 0x1cab0
movl 0x8(%r13), %eax
testl %eax, %eax
je 0x1e21
testb $0x8, %al
je 0x1dc3
movzwl 0x10(%r13), %ecx
movq 0x1ad1b(%rip), %rax     # 0x1cad8
cmpw 0x10(%rax), %cx
je 0x1e28
movl %ebx, %edi
movq %r14, %rsi
jmp 0x1e43
movl %ebx, %edi
callq 0x1ba6
movq 0x1ad00(%rip), %rcx     # 0x1cad8
movw %ax, 0x10(%rcx)
jmp 0x1d2e
callq 0x163a
cmpl $0x3d, %eax
jne 0x1e12
andl $0x0, 0x1acbe(%rip)     # 0x1cab0
xorl %edi, %edi
callq 0x1ba6
testb $0x8, 0x8(%r13)
jne 0x1e3e
movl $0x1, 0x8(%r13)
movw %ax, 0x10(%r13)
jmp 0x1d2e
movl $0x81, 0x1acac(%rip)    # 0x1cac8
jmp 0x1d7c
movq 0x1acb0(%rip), %rax     # 0x1cad8
movl $0x9, 0x8(%r13)
movzwl 0x10(%rax), %eax
movw %ax, 0x10(%r13)
jmp 0x1d2e
movl %ebx, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x127c
jmp 0x1d2e
callq 0x18d3
cmpl $0x81, %eax
je 0x1e6b
cmpl $0x82, %eax
jne 0x1e78
movw %dx, 0x1bd09(%rip)      # 0x1db72
jmp 0x1e89
movzwl 0x10(%rdx), %eax
movw %ax, 0x1bcfc(%rip)      # 0x1db72
jmp 0x1e89
leaq 0x136c(%rip), %rsi      # 0x31eb
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x127c
orl $-0x1, 0x1ac20(%rip)    # 0x1cab0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: assemble
void
assemble(void)
{
	peekt.type = None;
	while(peek() != EOF)
		statement();

	// list last line
	if(pass2 && line[0])
		list(nil);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x1ac1e(%rip)     # 0x1cac8
callq 0x163a
cmpl $-0x1, %eax
je 0x1ebb
callq 0x1d08
jmp 0x1eaa
cmpl $0x0, 0x1abf2(%rip)     # 0x1cab4
je 0x1ed5
cmpb $0x0, 0x3485(%rip)      # 0x5350
je 0x1ed5
xorl %edi, %edi
popq %rbp
jmp 0x1433
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: checkundef
void
checkundef(void)
{
	int i;
	int e;

	e = 0;
	for(i = 0; i < MAXSYM; i++)
		if(symtab[i].name[0] && symtab[i].type == None){
			err(0, "error: %s undefined", symtab[i].name);
			e = 1;
		}
	if(e)
		err(1, "errors in first pass");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x34c7(%rip), %r14      # 0x53b0
leaq 0x132b(%rip), %rbx      # 0x321b
pushq $0x1
popq %r15
xorl %r12d, %r12d
xorl %eax, %eax
cmpq $0x17700, %r12          # imm = 0x17700
je 0x1f2a
cmpb $0x0, (%r12,%r14)
je 0x1f24
cmpl $0x0, 0x8(%r12,%r14)
jne 0x1f24
leaq (%r14,%r12), %rdx
xorl %edi, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x127c
movl %r15d, %eax
addq $0x18, %r12
jmp 0x1ef9
testl %eax, %eax
je 0x1f47
leaq 0x12fa(%rip), %rsi      # 0x322f
pushq $0x1
popq %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x127c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: initsymtab
void
initsymtab(void)
{
	int i;
	Sym *s;

	for(i = 0; valtab[i].sym; i++){
		s = getsym(valtab[i].sym);
		s->type = SymValue;
		s->val = valtab[i].val;
	}
/*
	for(i = 0; pseudtab[i].sym; i++){
		s = getsym(sixbit(pseudtab[i].sym));
		s->type = SymPseudo;
		s->f = pseudtab[i].f;
	}
*/
	dot = findsym(".");
	dot->type = SymValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x318b(%rip), %rbx      # 0x50e8
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1f7f
callq 0x16e0
movl $0x1, 0x8(%rax)
movzwl (%rbx), %ecx
movw %cx, 0x10(%rax)
addq $0x10, %rbx
jmp 0x1f5d
leaq 0x12be(%rip), %rdi      # 0x3244
callq 0x1685
movq %rax, 0x1ab46(%rip)     # 0x1cad8
movl $0x1, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aap[P]rx-0/misc/wwas.c
// Function: main
int
main(int argc, char *argv[])
{
	int i;

	infp = stdin;
	filename = "<stdin>";
	tmpfp = mustopen("tmptmp", "wb");

	initsymtab();

	litdot = 04000;
	dot->val = 040;
	pass2 = 0;
	assemble();

	checkundef();

	pass2 = 1;
	fclose(tmpfp);
	tmpfp = nil;
	infp = mustopen("tmptmp", "rb");
	outfp = mustopen("out.mem", "wb");

	lstfp = mustopen("out.lst", "w");
	litdot = 04000;
	dot->val = 040;
	lineno = 1;
	peekc = 0;
	assemble();

	writelits();

	fclose(infp);
	fclose(outfp);

	listsyms();

	printf("start: %o\n", startaddr);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x3023(%rip), %rax      # 0x4fd8
movq (%rax), %rax
movq %rax, 0x1aaf9(%rip)     # 0x1cab8
leaq 0x12ef(%rip), %rax      # 0x32b5
movq %rax, 0x3373(%rip)      # 0x5340
leaq 0x12e9(%rip), %r14      # 0x32bd
leaq 0x12e9(%rip), %rbx      # 0x32c4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13ea
movq %rax, 0x1aad3(%rip)     # 0x1cac0
callq 0x1f50
movw $0x800, %r15w           # imm = 0x800
movw %r15w, 0x1bb71(%rip)    # 0x1db70
movq 0x1aad2(%rip), %rax     # 0x1cad8
movw $0x20, %r12w
movw %r12w, 0x10(%rax)
andl $0x0, 0x1aa9d(%rip)     # 0x1cab4
callq 0x1e9f
callq 0x1ed7
pushq $0x1
popq %r13
movl %r13d, 0x1aa88(%rip)    # 0x1cab4
movq 0x1aa8d(%rip), %rdi     # 0x1cac0
callq 0x1060
andq $0x0, 0x1aa80(%rip)     # 0x1cac0
leaq 0x1280(%rip), %rsi      # 0x32c7
movq %r14, %rdi
callq 0x13ea
movq %rax, 0x1aa62(%rip)     # 0x1cab8
leaq 0x126d(%rip), %rdi      # 0x32ca
movq %rbx, %rsi
callq 0x13ea
movq %rax, 0x1aab4(%rip)     # 0x1cb20
leaq 0x125f(%rip), %rdi      # 0x32d2
leaq 0x1260(%rip), %rsi      # 0x32da
callq 0x13ea
movq %rax, 0x331a(%rip)      # 0x53a0
movw %r15w, 0x1bae2(%rip)    # 0x1db70
movq 0x1aa43(%rip), %rax     # 0x1cad8
movw %r12w, 0x10(%rax)
movl %r13d, 0x3033(%rip)     # 0x50d4
andl $0x0, 0x1aa08(%rip)     # 0x1cab0
callq 0x1e9f
callq 0x1a51
movq 0x1a9ff(%rip), %rdi     # 0x1cab8
callq 0x1060
movq 0x1aa5b(%rip), %rdi     # 0x1cb20
callq 0x1060
callq 0x1493
movzwl 0x1ba9c(%rip), %esi     # 0x1db72
leaq 0x11ff(%rip), %rdi      # 0x32dc
xorl %eax, %eax
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/_ash_log.cpp
// Function: usage(std::ostream&)
void usage(ostream & out) {
  out << "\n\nThis program is not intended to be executed manually.\n\n"
      << "NOTE: See the man page for more details.\n";
  Flag::show_help(out);
  exit(1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xff25(%rip), %rsi      # 0x6a6bc
callq 0x7370
leaq 0xff53(%rip), %rsi      # 0x6a6f6
movq %rax, %rdi
callq 0x7370
movq %rbx, %rdi
callq 0x5e348
pushq $0x1
popq %rdi
callq 0x7450
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: thread_online
void* thread_online(void *arg)
{
    int count, i;
    char *pk, *dn;

    pthread_detach(pthread_self());

    count = g_devices_count;

    while (g_running) {
        pthread_mutex_lock(&g_mtx_online);
        pthread_cond_wait(&g_cond_conn_state_changed, &g_mtx_online);
        for (i = 0; i < count; i++) {
            if (g_is_connected) {
                if (LE_SUCCESS == leda_online(g_devices[i].pk, g_devices[i].dn)) {
                    g_devices[i].online = 1;
                }                
            } else {
                g_devices[i].online = 0; 
            }
        }
        pthread_mutex_unlock(&g_mtx_online);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x1140
movq %rax, %rdi
callq 0x1190
movl 0x2d46(%rip), %eax      # 0x41a0
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
imulq $0x3c, %rax, %r15
leaq 0x2d0c(%rip), %rbx      # 0x4178
leaq 0x2cd5(%rip), %r14      # 0x4148
pushq $0x1
popq %r12
cmpl $0x0, 0x2cba(%rip)      # 0x4138
je 0x14e2
movq %rbx, %rdi
callq 0x1230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11e0
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x14d8
cmpl $0x0, 0x2d02(%rip)      # 0x41a4
movq 0x2cff(%rip), %rdi      # 0x41a8
je 0x14cb
leaq (%rdi,%r13), %rsi
addq $0x10, %rsi
addq %r13, %rdi
callq 0x1180
testl %eax, %eax
jne 0x14d2
movq 0x2ce2(%rip), %rdi      # 0x41a8
movl %r12d, %eax
jmp 0x14cd
xorl %eax, %eax
movl %eax, 0x30(%rdi,%r13)
addq $0x3c, %r13
jmp 0x1496
movq %rbx, %rdi
callq 0x1240
jmp 0x1477
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: thread_report
void *thread_report(void *arg) {
    int count, i;
    char *pk, *dn;
    leda_device_data_t property[2];

    pthread_detach(pthread_self());
    
    count = g_devices_count;
    
    snprintf(property[0].key, MAX_PARAM_NAME_LENGTH, "brightness");
    property[0].type = LEDA_TYPE_INT;
    snprintf(property[1].key, MAX_PARAM_NAME_LENGTH, "power");
    property[1].type = LEDA_TYPE_BOOL;
    
    while (g_running) {
        for (i = 0; i < count; i++) {
            pk = g_devices[i].pk;
            dn = g_devices[i].dn;
            if (g_devices[i].online == 1) {
                snprintf(property[0].value, MAX_PARAM_VALUE_LENGTH, "%d", get_led_brightness(pk, dn));
                snprintf(property[1].value, MAX_PARAM_VALUE_LENGTH, "%d", get_led_power(pk, dn));
                leda_report_properties(pk, dn, property, 2);
                leda_report_event(pk, dn, "ledBroken", NULL, 0);
            }
            usleep(10*1000000/count);
        }
        sleep(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
callq 0x1140
movq %rax, %rdi
callq 0x1190
movabsq $0x656e746867697262, %rax # imm = 0x656E746867697262
leaq -0x107c(%rbp), %rcx
movq %rax, -0x40(%rcx)
movl $0x737365, -0x39(%rcx)  # imm = 0x737365
andl $0x0, -0x44(%rcx)
movl 0x2c67(%rip), %r15d     # 0x41a0
movw $0x72, 0x808(%rcx)
movabsq $0x65776f7000000001, %rax # imm = 0x65776F7000000001
movq %rax, 0x800(%rcx)
testl %r15d, %r15d
movl $0x0, %eax
cmovgl %r15d, %eax
imulq $0x3c, %rax, %rbx
movq %rbx, -0x30(%rbp)
cmpl $0x0, 0x2bca(%rip)      # 0x4138
je 0x1642
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1635
movq 0x2c21(%rip), %r14      # 0x41a8
cmpl $0x1, 0x30(%r14,%r12)
jne 0x161b
leaq (%r14,%r12), %r13
addq $0x10, %r13
addq %r12, %r14
movq %r13, %rsi
callq 0x141d
movl $0x800, %esi            # imm = 0x800
leaq -0x107c(%rbp), %rdi
movl %r15d, %ebx
leaq 0xa59(%rip), %r15       # 0x2015
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
movq %r13, %rsi
callq 0x13d0
movl $0x800, %esi            # imm = 0x800
leaq -0x838(%rbp), %rdi
movq %r15, %rdx
movl %ebx, %r15d
movq -0x30(%rbp), %rbx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
movq %r14, %rdi
movq %r13, %rsi
leaq -0x10c0(%rbp), %rdx
pushq $0x2
popq %rcx
callq 0x11d0
movq %r14, %rdi
movq %r13, %rsi
leaq 0xa07(%rip), %rdx       # 0x2018
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1110
movl $0x989680, %eax         # imm = 0x989680
xorl %edx, %edx
idivl %r15d
movl %eax, %edi
callq 0x1150
addq $0x3c, %r12
jmp 0x1577
pushq $0x1
popq %rdi
callq 0x1130
jmp 0x1567
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: sigint_handler
void sigint_handler(int sig)
{
    if (!g_running) {
        printf("force exit!\n");
        exit(0);
    }
    printf("caught signal: %s, device will exit in 30s ...\n", strsignal(sig));
    g_running = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x2ad9(%rip)      # 0x4138
je 0x1680
callq 0x10b0
leaq 0x9b5(%rip), %rdi       # 0x2022
movq %rax, %rsi
xorl %eax, %eax
callq 0x1030
andl $0x0, 0x2aba(%rip)      # 0x4138
popq %rbp
retq
leaq 0xa5d(%rip), %rdi       # 0x20e4
callq 0x1070
xorl %edi, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: load_device_from_csv
int load_device_from_csv(char *path)
{
    FILE *fp;
    char ch;
    int line = 0, i;
    device_t invalid = {0};
    char tmp[128] = {0};
    
    fp = fopen(path, "r+");
    if (!fp) {
        printf("open file:%s error!\n", path);
        return -1;
    }
    
    while (NULL != fgets(&tmp[0], sizeof(tmp), fp)) {
       line++;
    }
    fseek(fp, 0, SEEK_SET);
    
    g_devices_count = line - 1;
    g_devices = malloc(g_devices_count * sizeof(device_t));
    memset(g_devices, 0, g_devices_count * sizeof(device_t));
    for (i = 0; i < line; i++) {
        if (i == 0) {
            fscanf(fp, "%s\n", &tmp[0]);
        } else {
            fscanf(fp, "%[^','],%[^','],%s\n", &g_devices[i - 1].dn[0], &tmp[0], &g_devices[i - 1].pk[0]);
        }        
    }
    fclose(fp);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
leaq 0x975(%rip), %rsi       # 0x2052
callq 0x10c0
testq %rax, %rax
je 0x17a9
movq %rax, %rbx
pushq $-0x1
popq %r13
pushq $-0x78
popq %r14
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
movl $0x80, %esi
movq %rbx, %rdx
callq 0x10d0
incq %r13
addq $0x3c, %r14
testq %rax, %rax
jne 0x16fd
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1080
leal -0x1(%r13), %eax
movl %eax, 0x2a71(%rip)      # 0x41a0
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x11f0
movq %rax, 0x2a67(%rip)      # 0x41a8
pushq $-0x3c
popq %r14
leaq -0xb0(%rbp), %r15
xorl %r12d, %r12d
subq $0x1, %r13
jb 0x179d
subq $0x1, %r12
jae 0x1771
movq %rbx, %rdi
leaq 0x958(%rip), %rsi       # 0x20bd
movq %r15, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x1797
movq 0x2a30(%rip), %r8       # 0x41a8
leaq (%r8,%r14), %rdx
addq $0x10, %rdx
addq %r14, %r8
movq %rbx, %rdi
leaq 0x8dd(%rip), %rsi       # 0x206a
movq %r15, %rcx
xorl %eax, %eax
callq 0x1060
addq $0x3c, %r14
jmp 0x174f
movq %rbx, %rdi
callq 0x1200
xorl %eax, %eax
jmp 0x17bd
leaq 0x8a5(%rip), %rdi       # 0x2055
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: unload_device_list
void unload_device_list()
{
    if (g_devices) {
        free(g_devices);
        g_devices = NULL;
    }
    g_devices_count = 0;
}

// Assembly:
movq 0x29d2(%rip), %rdi      # 0x41a8
testq %rdi, %rdi
je 0x17ed
pushq %rbp
movq %rsp, %rbp
callq 0x10f0
andq $0x0, 0x29bc(%rip)      # 0x41a8
popq %rbp
andl $0x0, 0x29ac(%rip)      # 0x41a0
retq
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: cb_state_changed
static void cb_state_changed(leda_conn_state_e state, void *usr)
{
    int ret = -1;
    printf("connection state: %s\n", !state ? "connected" : "disconnected");
    if (LEDA_WS_CONNECTED == state) {
        g_is_connected = 1;
    } else {
        g_is_connected = 0;
    }
    pthread_mutex_lock(&g_mtx_online);
    pthread_cond_signal(&g_cond_conn_state_changed);
    pthread_mutex_unlock(&g_mtx_online);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %edi, %edi
sete %bl
leaq 0x639(%rip), %rax       # 0x20c4
leaq 0x62f(%rip), %rsi       # 0x20c1
cmoveq %rax, %rsi
leaq 0x60e(%rip), %rdi       # 0x20ab
xorl %eax, %eax
callq 0x1030
movl %ebx, 0x26fa(%rip)      # 0x41a4
leaq 0x26c7(%rip), %rbx      # 0x4178
movq %rbx, %rdi
callq 0x1230
leaq 0x2688(%rip), %rdi      # 0x4148
callq 0x1090
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1240
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: cb_get_property
static int cb_get_property(const char *pk, const char *dn,
                                       leda_device_data_t properties[], 
                                       int properties_count, 
                                       void *usr_data)
{
    int i;
    for (i = 0; i < properties_count; i++) {
        if (strcmp(properties[i].key, "power") == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_led_power(pk, dn));
            properties[i].type = LEDA_TYPE_BOOL;
        } else if (strcmp(properties[i].key, "brightness") == 0) {
            snprintf(properties[i].value, MAX_PARAM_VALUE_LENGTH, "%d", get_led_brightness(pk, dn));
            properties[i].type = LEDA_TYPE_INT;
        } else {
            return LEDA_ERROR_PROPERTY_NOT_EXIST;
        }
    }

    return LE_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %r14d
addq $0x44, %r15
leaq 0x512(%rip), %r13       # 0x200f
subq $0x1, %r14
jb 0x1b7d
leaq -0x40(%r15), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11a0
testl %eax, %eax
je 0x1b4d
movq %rbx, %rdi
leaq 0x4e4(%rip), %rsi       # 0x2004
callq 0x11a0
testl %eax, %eax
jne 0x1b81
movq %r12, %rsi
callq 0x141d
xorl %ebx, %ebx
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x4d3(%rip), %rdx       # 0x2015
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
jmp 0x1b70
movq %r12, %rsi
callq 0x13d0
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
leaq 0x4b1(%rip), %rdx       # 0x2015
movl %eax, %ecx
xorl %eax, %eax
callq 0x1050
pushq $0x1
popq %rbx
movl %ebx, -0x44(%r15)
addq $0x844, %r15            # imm = 0x844
jmp 0x1afd
xorl %eax, %eax
jmp 0x1b86
movl $0x1a9ca, %eax          # imm = 0x1A9CA
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: cb_set_property
static int cb_set_property(const char *pk, const char *dn,
                                       const leda_device_data_t properties[], 
                                       int properties_count, 
                                       void *usr_data)
{
    int ret = LE_ERROR_UNKNOWN, i;

    for (i = 0; i < properties_count; i++) {
        if (0 == strcmp("brightness", properties[i].key)) {
            ret = set_led_brightness(pk, dn, atoi(properties[i].value));
        } else if (0 == strcmp("power", properties[i].key)) {
            ret = set_led_power(pk, dn, atoi(properties[i].value));
        } else {
            return LEDA_ERROR_PROPERTY_NOT_EXIST;
        }
        if (ret != LE_SUCCESS) {
            break;
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
xorl %r12d, %r12d
testl %ecx, %ecx
cmovgl %ecx, %r12d
incq %r12
addq $0x44, %rbx
movl $0x186a0, %ecx          # imm = 0x186A0
leaq 0x43f(%rip), %r15       # 0x2004
movl %ecx, %eax
decq %r12
je 0x1c2c
leaq -0x40(%rbx), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x11a0
testl %eax, %eax
je 0x1c06
leaq 0x429(%rip), %rdi       # 0x200f
movq %r13, %rsi
callq 0x11a0
testl %eax, %eax
jne 0x1c27
movq %rbx, %rdi
callq 0x1170
movq %r14, %rsi
movl %eax, %edx
callq 0x139f
jmp 0x1c18
movq %rbx, %rdi
callq 0x1170
movq %r14, %rsi
movl %eax, %edx
callq 0x13ec
addq $0x844, %rbx            # imm = 0x844
xorl %ecx, %ecx
testl %eax, %eax
je 0x1bc5
jmp 0x1c2c
movl $0x1a9ca, %eax          # imm = 0x1A9CA
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq