LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jflatow[P]jfdb/src/trie.c
// Function: JFT_cursor_merge_new
JFT *JFT_cursor_merge_new(JFT_Cursor *cursors,
                          JFT_Amount num,
                          JFT_Buffer *output,
                          int flags) {
  // perform a cursor merge to produce a new trie
  // if 'atoms' are the base case, this is the induction step
  JFT_Cons cons = (JFT_Cons) {.buffer = JFT_buffer_reset(output)};
  JFT_Status result = JFT_cursor_merge(cursors, num, splice_new, &cons, flags);
  free(cons.stem.data);
  free(cons.iters);
  if (cons.TLBs) {
    for (JFT_Amount k = 0; k < num; k++)
      free(cons.TLBs[k]);
    free(cons.TLBs);
  }
  free(cons.TLBSizes);
  if (result != Ok)
    return NULL;
  return (JFT *)output->data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r8d
movq %rdx, %rbx
movq %rsi, %r14
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, 0x60(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq $0x0, 0x10(%rdx)
movq %rdx, (%r15)
leaq 0x6c(%rip), %rdx        # 0x4678
movq %r15, %rcx
callq 0x4229
movl %eax, %ebp
movq 0x50(%r15), %rdi
callq 0x1030
movq 0x58(%r15), %rdi
callq 0x1030
cmpq $0x0, 0x60(%r15)
je 0x4657
testq %r14, %r14
je 0x464d
xorl %r15d, %r15d
movq 0x60(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x1030
incq %r15
cmpq %r15, %r14
jne 0x4637
movq 0x60(%rsp), %rdi
callq 0x1030
movq 0x68(%rsp), %rdi
callq 0x1030
testl %ebp, %ebp
je 0x4669
xorl %eax, %eax
jmp 0x466d
movq 0x18(%rbx), %rax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jflatow[P]jfdb/src/trie.c
// Function: JFT_membuf_ensure
int JFT_membuf_ensure(JFT_Buffer *buf, size_t more) {
  size_t minSize = buf->mark + more;
  if (buf->size < minSize) {
    size_t newSize = buf->factor * minSize;
    uint8_t *data = realloc(buf->data, newSize);
    if (data == NULL)
      return ENoMem;
    buf->size = newSize;
    buf->data = data;
  }
  return Ok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
addq 0x10(%rdi), %r14
xorl %ebx, %ebx
cmpq %r14, 0x8(%rdi)
jae 0x5a6d
movq %rdi, %r15
movslq (%rdi), %rax
imulq %rax, %r14
movq 0x18(%rdi), %rdi
movq %r14, %rsi
callq 0x1160
testq %rax, %rax
je 0x5a68
movq %r14, 0x8(%r15)
movq %rax, 0x18(%r15)
jmp 0x5a6d
movl $0x5, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jflatow[P]jfdb/src/trie.c
// Function: JFT_membuf
JFT_Buffer *JFT_membuf() {
  JFT_Buffer *buf = calloc(1, sizeof(JFT_Buffer));
  if (buf == NULL)
    return NULL;
  buf->factor = 2;
  buf->ensure = JFT_membuf_ensure;
  return buf;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x28, %esi
callq 0x1120
testq %rax, %rax
je 0x5a9d
movl $0x2, (%rax)
leaq -0x68(%rip), %rcx       # 0x5a2f
movq %rcx, 0x20(%rax)
jmp 0x5a9f
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_fetch_add.c
// Function: shmem_int_atomic_fetch_add
int shmem_int_atomic_fetch_add( int* ptr, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((const void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	int r = *remote_ptr;
	*remote_ptr = __sum(r,val);
	__clear_spin_lock(x);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edx, %esi
callq 0x1c28
movq %rax, %r14
leaq 0x3270(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebx, %esi
callq 0x1c28
movq %rax, %rbx
movq %rax, %rdi
callq 0x3233
movl (%r14), %r15d
addl %r15d, %ebp
movl %ebp, (%r14)
movq %rbx, %rdi
callq 0x3224
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x40b064
leaq 0x165c1(%rip), %r14     # 0x419000
movl $0x800, %edx            # imm = 0x800
movq %r14, %rdi
xorl %esi, %esi
callq 0x4010a0
movq 0x16dab(%rip), %rax     # 0x419800
xorl %ecx, %ecx
leaq (%rax,%rcx), %rdx
clflush (%rdx)
addq $0x400, %rcx            # imm = 0x400
cmpq $0x40000, %rcx          # imm = 0x40000
jne 0x402a57
mfence
movq 0x16d88(%rip), %rdi     # 0x419800
callq *%rbx
movq 0x16d7f(%rip), %rdi     # 0x419800
mfence
movl $0xd, %r8d
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 0x402ac0
incq (%r14,%r9,8)
addq $0xa7, %r8
cmpq $0xa70d, %r8            # imm = 0xA70D
jne 0x402a8a
incl %r15d
cmpl $0x2710, %r15d          # imm = 0x2710
jne 0x402a4e
leaq 0x16519(%rip), %rdi     # 0x419000
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x402128
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
leaq 0x10e(%rip), %rsi       # 0x402c22
movl $0xb, %edi
callq 0x4010e0
cmpq $-0x1, %rax
je 0x402c18
leaq 0x164d1(%rip), %rbx     # 0x419000
xorl %ebp, %ebp
movl $0x800, %edx            # imm = 0x800
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4010a0
leaq 0x16cc9(%rip), %r14     # 0x419810
movl %ebp, %r15d
movq 0x16caf(%rip), %rax     # 0x419800
movl %ebp, %ecx
leaq (%rax,%rcx), %rdx
clflush (%rdx)
movq %rcx, %rdx
addq $0x400, %rdx            # imm = 0x400
movq %rdx, %rcx
cmpq $0x40000, %rdx          # imm = 0x40000
jne 0x402b53
mfence
movq %r14, %rdi
callq 0x4010d0
testl %eax, %eax
jne 0x402b8b
movq 0x16c7a(%rip), %rdi     # 0x419800
callq 0x402db0
movq 0x16c6e(%rip), %rsi     # 0x419800
mfence
movl $0xd, %edi
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 0x402bd5
incq (%rbx,%r8,8)
movq %rdi, %rax
addq $0xa7, %rax
movq %rax, %rdi
cmpq $0xa70d, %rax           # imm = 0xA70D
jne 0x402b9a
movl %r15d, %eax
incl %eax
movl %eax, %r15d
cmpl $0x2710, %eax           # imm = 0x2710
jne 0x402b4a
leaq 0x163fd(%rip), %rdi     # 0x419000
movl $0x1, %esi
callq 0x402128
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x401150
// File: /workspace/github_c_makefile_star2_O1/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 0x46c5(%rip), %rax      # 0xa980
movq %rax, (%rdi)
movq 0x610(%rdi), %rdi
callq 0x4470
movq 0x618(%rbx), %rdi
callq 0x4470
movq 0x620(%rbx), %rdi
callq 0x4470
movq 0x628(%rbx), %rdi
callq 0x4470
movq 0x630(%rbx), %rdi
callq 0x4470
movq 0x638(%rbx), %rdi
callq 0x4470
movq 0x640(%rbx), %rdi
callq 0x4470
movq 0x648(%rbx), %rdi
callq 0x4470
movq 0x650(%rbx), %rdi
callq 0x4470
movq 0x658(%rbx), %rdi
callq 0x4470
movq 0x660(%rbx), %rdi
callq 0x4470
movq 0x668(%rbx), %rdi
callq 0x4470
movq 0x670(%rbx), %rdi
callq 0x4470
movq 0x678(%rbx), %rdi
callq 0x4470
movq 0x6b8(%rbx), %rdi
callq 0x4470
movq 0x6c0(%rbx), %rdi
callq 0x4470
movq 0x680(%rbx), %rdi
callq 0x4470
movq 0x688(%rbx), %rdi
callq 0x4470
movq 0x698(%rbx), %rdi
callq 0x4470
movq 0x6a0(%rbx), %rdi
callq 0x4470
movq 0x6a8(%rbx), %rdi
callq 0x4470
movq 0x6c8(%rbx), %rdi
callq 0x4470
movq 0x6d0(%rbx), %rdi
callq 0x4470
movq 0x6d8(%rbx), %rdi
callq 0x4470
movq 0x6e0(%rbx), %rdi
callq 0x4470
movq 0x6e8(%rbx), %rdi
callq 0x4470
movq 0x6f0(%rbx), %rdi
callq 0x4470
movq 0x6f8(%rbx), %rdi
callq 0x4470
movq 0x700(%rbx), %rdi
callq 0x4470
movq 0x5f0(%rbx), %rdi
callq 0x4470
movq 0x5f8(%rbx), %rdi
callq 0x4470
movq 0x600(%rbx), %rdi
callq 0x4470
movq 0x608(%rbx), %rdi
callq 0x4470
movq 0x5e8(%rbx), %rdi
callq 0x4470
movq 0x5d0(%rbx), %rdi
callq 0x4470
movq 0x5d8(%rbx), %rdi
callq 0x4470
movq 0x5e0(%rbx), %rdi
callq 0x4470
movq 0x5c8(%rbx), %rdi
callq 0x4470
movq 0x5c0(%rbx), %rdi
callq 0x4470
movq 0x5b8(%rbx), %rdi
callq 0x4470
movq %rbx, %rdi
popq %rbx
jmp 0x4280
movq %rax, %rdi
callq 0x69eb
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x11ee
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 0x3de6(%rip), %r12      # 0x4ff8
movq (%r12), %rdi
movq 0x4123(%rip), %rdx      # 0x5340
movl 0x3eb1(%rip), %ecx      # 0x50d4
leaq 0x1dda(%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 0x1260
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_O1/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 0x1500
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 0x3ad4(%rip), %rbx      # 0x4ff8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x1120
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1080
movl $0x1, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/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 0x1581
popq %rbp
retq
leaq 0x1a9b(%rip), %rdi      # 0x3023
xorl %eax, %eax
callq 0x14ac
// File: /workspace/github_c_makefile_star2_O1/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 0x1a94(%rip), %rdx      # 0x3031
cmovneq %rdi, %rdx
cmpb $0x0, 0x3da8(%rip)      # 0x5350
movq 0x3df1(%rip), %rdi      # 0x53a0
je 0x15ce
movl 0x3b21(%rip), %ecx      # 0x50d8
leaq 0x1a7f(%rip), %rsi      # 0x303d
leaq 0x3d8b(%rip), %r8       # 0x5350
xorl %eax, %eax
callq 0x10c0
jmp 0x15dc
leaq 0x1a75(%rip), %rsi      # 0x304a
xorl %eax, %eax
callq 0x10c0
movb $0x0, 0x3d6d(%rip)      # 0x5350
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3db0(%rip), %rbx      # 0x53b0
leaq -0x22(%rip), %rcx       # 0x15e5
movl $0xfa0, %esi            # imm = 0xFA0
movl $0x18, %edx
movq %rbx, %rdi
callq 0x1050
movq 0x3d80(%rip), %rcx      # 0x53a0
leaq 0x1a27(%rip), %rdi      # 0x304e
movl $0x12, %esi
movl $0x1, %edx
callq 0x1150
leaq 0x1a24(%rip), %r14      # 0x3061
xorl %r15d, %r15d
movl 0x8(%r15,%rbx), %eax
andl $0x7, %eax
cmpl $0x1, %eax
jne 0x1668
leaq (%rbx,%r15), %rdx
movq 0x3d48(%rip), %rdi      # 0x53a0
movzwl 0x10(%r15,%rbx), %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
leaq 0x18(%r15), %rax
cmpq $0x176e8, %r15          # imm = 0x176E8
movq %rax, %r15
jb 0x1640
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl 0x1b41c(%rip), %ebx     # 0x1cab0
testl %ebx, %ebx
je 0x16ad
movl $0x0, 0x1b40e(%rip)     # 0x1cab0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x1b400(%rip)     # 0x1cab4
je 0x176c
movl 0x3a18(%rip), %eax      # 0x50d8
cmpl 0x3a0e(%rip), %eax      # 0x50d4
je 0x176c
cmpb $0x0, 0x3c7d(%rip)      # 0x5350
je 0x16dc
xorl %edi, %edi
callq 0x158f
movq 0x1b3d5(%rip), %rdi     # 0x1cab8
callq 0x10d0
movq %rax, %rbx
xorl %r12d, %r12d
leaq 0x3c5b(%rip), %r14      # 0x5350
leaq 0x3ca2(%rip), %r15      # 0x539e
movq 0x1b3b5(%rip), %rdi     # 0x1cab8
callq 0x1160
cmpl $-0x1, %eax
je 0x1727
cmpl $0xa, %eax
je 0x1727
movb %al, (%r12,%r14)
incq %r12
cmpq $0x4e, %r12
jne 0x16fc
movl $0x1, %r12d
jmp 0x1731
leaq 0x3c22(%rip), %r15      # 0x5350
addq %r12, %r15
testq %r12, %r12
sete %cl
cmpl $-0x1, %eax
sete %al
testb %al, %cl
jne 0x174b
movb $0xa, (%r15)
incq %r15
movq %r15, %r14
movb $0x0, (%r14)
movq 0x1b362(%rip), %rdi     # 0x1cab8
movslq %ebx, %rsi
xorl %edx, %edx
callq 0x1100
movl 0x396e(%rip), %eax      # 0x50d4
movl %eax, 0x396c(%rip)      # 0x50d8
movq 0x1b345(%rip), %rdi     # 0x1cab8
callq 0x1160
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x16a2
cmpl $0xa, %ebx
jne 0x178e
incl 0x3946(%rip)            # 0x50d4
andl $0x7f, %ebx
movq 0x1b328(%rip), %rsi     # 0x1cac0
testq %rsi, %rsi
je 0x16a2
movl %ebx, %edi
callq 0x10b0
jmp 0x16a2
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq $-0x18, %r12
leaq 0x3b2a(%rip), %rbx      # 0x53b0
xorl %r15d, %r15d
leaq (%r12,%rbx), %rdi
addq $0x18, %rdi
movl $0x6, %edx
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x18b1
addq $0x18, %r12
cmpq $0x176e7, %r12          # imm = 0x176E7
jbe 0x1889
jmp 0x18c0
leaq 0x3af8(%rip), %rax      # 0x53b0
leaq (%r12,%rax), %r15
addq $0x18, %r15
testq %r15, %r15
jne 0x190f
movq $-0x18, %rax
cmpb $0x0, (%rbx)
je 0x18ef
addq $0x18, %rbx
addq $0x18, %rax
cmpq $0x176e7, %rax          # imm = 0x176E7
jbe 0x18cc
leaq 0x1785(%rip), %rdi      # 0x306d
xorl %eax, %eax
callq 0x14ac
movl $0x6, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030
movl $0x0, 0x8(%rbx)
movw $0x0, 0x10(%rbx)
movq %rbx, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
callq 0x1170
movq %rax, %r15
movq (%rax), %r12
callq 0x1683
movl %eax, %r14d
cltq
xorl %ebx, %ebx
testb $0x8, 0x1(%r12,%rax,2)
je 0x19a7
leal -0x30(%r14), %eax
cmpl 0x375e(%rip), %eax      # 0x50d0
jge 0x199e
imull 0x3755(%rip), %ebx      # 0x50d0
leal (%r14,%rbx), %eax
addl $0xffd0, %eax           # imm = 0xFFD0
movzwl %ax, %ebx
movq (%r15), %r12
callq 0x1683
movl %eax, %r14d
cltq
testb $0x8, 0x1(%r12,%rax,2)
jne 0x1968
jmp 0x19a5
callq 0x1268
jmp 0x1974
movl %ebx, %ebx
movl %r14d, 0x1b102(%rip)    # 0x1cab0
testl %r14d, %r14d
je 0x19cd
movsbl %r14b, %esi
leaq 0x16c1(%rip), %rdi      # 0x307f
movl $0x17, %edx
callq 0x1090
testq %rax, %rax
je 0x19de
movl $0x82, %eax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x127d
jmp 0x19cd
// File: /workspace/github_c_makefile_star2_O1/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
xorl %r14d, %r14d
movl %r14d, -0x15(%rbp)
movl %r14d, -0x18(%rbp)
callq 0x1683
movl %eax, %ebx
callq 0x1170
movq (%rax), %rax
movslq %ebx, %rcx
movzwl (%rax,%rcx,2), %eax
testb $0x8, %al
jne 0x1a54
cmpl $0x5f, %ebx
je 0x1a54
cmpl $0x2e, %ebx
jne 0x1a6d
cmpl $0x5, %r14d
ja 0x1a30
movl %ebx, %edi
callq 0x10e0
movl %r14d, %ecx
incl %r14d
movb %al, -0x18(%rbp,%rcx)
jmp 0x1a30
movl %ebx, 0x1b03d(%rip)     # 0x1cab0
leaq -0x18(%rbp), %rdi
callq 0x186a
movq %rax, %rdx
movl $0x81, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl 0x1b035(%rip), %eax     # 0x1cac8
testl %eax, %eax
je 0x1aa9
movq 0x1b032(%rip), %rdx     # 0x1cad0
movl $0x0, 0x1b020(%rip)     # 0x1cac8
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x162c(%rip), %rbx      # 0x30e6
movabsq $0x200005400, %r15      # imm = 0x200005400
callq 0x1683
movl %eax, %r14d
leal 0x1(%r14), %eax
cmpl $0x21, %eax
ja 0x1ae0
btq %rax, %r15
jb 0x1ac4
testq %rax, %rax
je 0x1b5d
callq 0x1170
movq (%rax), %rax
movslq %r14d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xb, %eax
jb 0x1b8f
btl $0xa, %eax
jb 0x1b9d
movl $0xf, %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1090
movq %rax, %rcx
movl %r14d, %eax
testq %rcx, %rcx
jne 0x1b84
cmpl $0x2d, %r14d
jle 0x1b38
cmpl $0x2e, %r14d
je 0x1b64
cmpl $0x3b, %r14d
je 0x1b5d
cmpl $0x2f, %r14d
je 0x1b53
jmp 0x1b49
movl $0x80, %eax
cmpl $0xa, %r14d
je 0x1b84
cmpl $0x22, %r14d
je 0x1b72
callq 0x12d5
jmp 0x1ac4
callq 0x1683
cmpl $0xa, %eax
jne 0x1b53
movl $0x80, %eax
jmp 0x1b84
movl $0x81, %eax
movq 0x1af68(%rip), %rdx     # 0x1cad8
jmp 0x1b84
callq 0x1683
orl $0x80, %eax
movzwl %ax, %edx
movl $0x82, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, 0x1af1a(%rip)    # 0x1cab0
callq 0x193e
jmp 0x1b7f
movl %r14d, 0x1af0c(%rip)    # 0x1cab0
callq 0x1a1a
movl $0x81, %eax
jmp 0x1b84
// File: /workspace/github_c_makefile_star2_O1/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, 0x1aefd(%rip)     # 0x1cab4
movq 0x1af1a(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
je 0x1c1d
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl %di, %ebx
leaq 0x1af0b(%rip), %r14     # 0x1cae0
leaq 0x1537(%rip), %rsi      # 0x3113
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x158f
movq 0x1af29(%rip), %rdi     # 0x1cb20
movq 0x1aeda(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %edx
leal 0x1(%rdx), %ecx
movw %cx, 0x10(%rax)
leaq 0x150f(%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 0x1af03(%rip), %rcx     # 0x1cb30
movw %di, (%rcx,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3759(%rip), %rcx      # 0x53a0
leaq 0x14d9(%rip), %rdi      # 0x3127
movl $0xe, %esi
movl $0x1, %edx
callq 0x1150
movzwl 0x1bf0c(%rip), %ebx     # 0x1db70
cmpq $0x7ff, %rbx            # imm = 0x7FF
ja 0x1cd2
leaq 0x1aebc(%rip), %rax     # 0x1cb30
leaq (%rax,%rbx,2), %r13
leaq 0x1beb1(%rip), %r14     # 0x1db30
leaq 0x148d(%rip), %r15      # 0x3113
leaq 0x1492(%rip), %r12      # 0x311f
movzwl (%r13), %ecx
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1130
movq %r14, %rdi
callq 0x158f
movq 0x1ae70(%rip), %rdi     # 0x1cb20
movzwl (%r13), %ecx
movq %r12, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10c0
incq %rbx
movzwl %bx, %eax
addq $0x2, %r13
cmpl $0x800, %eax            # imm = 0x800
jne 0x1c8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1be7f(%rip), %ecx     # 0x1db70
leaq 0x1ae38(%rip), %r14     # 0x1cb30
cmpq $0x7ff, %rcx            # imm = 0x7FF
ja 0x1d1f
leaq (%r14,%rcx,2), %rdx
movq %rcx, %rax
cmpw %bx, (%rdx)
je 0x1d3c
incq %rax
movzwl %ax, %esi
addq $0x2, %rdx
cmpl $0x800, %esi            # imm = 0x800
jne 0x1d08
testq %rcx, %rcx
je 0x1d41
movzwl 0x1be45(%rip), %eax     # 0x1db70
decl %eax
movw %ax, 0x1be3c(%rip)      # 0x1db70
movzwl %ax, %ecx
movw %bx, (%r14,%rcx,2)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x12f1
jmp 0x1d24
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x25, %edi
jg 0x1d5b
leal -0x20(%rax), %ecx
cmpl $0x2, %ecx
jae 0x1d6e
orl %esi, %edx
jmp 0x1d90
cmpl $0x26, %eax
je 0x1d8e
cmpl $0x2d, %eax
je 0x1d86
cmpl $0x2b, %eax
jne 0x1d72
addl %esi, %edx
jmp 0x1d90
testl %eax, %eax
je 0x1d90
pushq %rbp
movq %rsp, %rbp
leaq 0x13d2(%rip), %rdi      # 0x314f
movl %eax, %esi
xorl %eax, %eax
callq 0x14ac
notl %edx
addl %edx, %esi
movl %esi, %edx
jmp 0x1d90
andl %esi, %edx
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movl %edi, -0x2c(%rbp)
xorl %r15d, %r15d
movl $0x1421, %ebx           # imm = 0x1421
movabsq $0x1000000000000900, %r13 # imm = 0x1000000000000900
xorl %r14d, %r14d
callq 0x1a8d
cmpl $0x7f, %eax
jg 0x1e39
movl %eax, %ecx
addl $-0x21, %ecx
cmpl $0x3c, %ecx
ja 0x1dbc
btq %rcx, %rbx
jb 0x1e5f
btq %rcx, %r13
jb 0x1ed6
cmpq $0x7, %rcx
jne 0x1dbc
xorl %edi, %edi
callq 0x1d93
movzwl %ax, %edi
callq 0x1ce1
movzwl %r14w, %esi
movzwl %ax, %edx
movl %r15d, %edi
callq 0x1d48
movl %eax, %r14d
callq 0x1a8d
movl $0x20, %r15d
cmpl $0x29, %eax
je 0x1dbc
movl %eax, %r12d
cmpl $0x80, %eax
jne 0x1ebd
movl %r12d, 0x1ac98(%rip)    # 0x1cac8
movq %rdx, 0x1ac99(%rip)     # 0x1cad0
jmp 0x1dbc
cmpl $0x80, %eax
je 0x1ed6
cmpl $0x81, %eax
je 0x1e67
cmpl $0x82, %eax
jne 0x1dbc
movzwl %r14w, %esi
movzwl %dx, %edx
jmp 0x1e9a
movl %eax, %r15d
jmp 0x1dbc
movl 0x8(%rdx), %r12d
andl $0x7, %r12d
cmpl $0x1, %r12d
jne 0x1e7b
movzwl 0x10(%rdx), %eax
jmp 0x1e88
movl 0x1ac33(%rip), %eax     # 0x1cab4
orl %r12d, %eax
jne 0x1ecf
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
je 0x1e93
testl %r12d, %r12d
je 0x1eb0
movzwl %r14w, %esi
movzwl %ax, %edx
movl %r15d, %edi
callq 0x1d48
movl %eax, %r14d
movl $0x20, %r15d
jmp 0x1dbc
movl %eax, %r12d
callq 0x1339
movl %r12d, %eax
jmp 0x1e93
movq %rdx, -0x38(%rbp)
callq 0x1309
movq -0x38(%rbp), %rdx
jmp 0x1e29
callq 0x1321
jmp 0x1e86
movl %eax, 0x1abec(%rip)     # 0x1cac8
movq %rdx, 0x1abed(%rip)     # 0x1cad0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
leaq 0x1304(%rip), %rbx      # 0x320a
callq 0x1a8d
movl %eax, %r15d
movq %rdx, %r14
cmpl $0x7f, %eax
jg 0x1f31
cmpl $0x2a, %r15d
je 0x1f66
cmpl $0x2d, %r15d
je 0x1f47
cmpl $0x24, %r15d
je 0x2048
jmp 0x201d
cmpl $0x81, %r15d
je 0x1f7d
cmpl $0x82, %r15d
jne 0x2014
movl %r15d, 0x1ab7a(%rip)    # 0x1cac8
movq %r14, 0x1ab7b(%rip)     # 0x1cad0
xorl %edi, %edi
callq 0x1d93
movzwl %ax, %edi
callq 0x1bb0
jmp 0x1f06
movl $0x1, %edi
callq 0x1d93
movq 0x1ab61(%rip), %rcx     # 0x1cad8
movw %ax, 0x10(%rcx)
jmp 0x1f06
callq 0x1683
movl %eax, 0x1ab28(%rip)     # 0x1cab0
cmpl $0x2c, %eax
jne 0x1fd6
movl $0x0, 0x1ab19(%rip)     # 0x1cab0
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x1fb9
testb $0x8, %al
je 0x2034
movzwl 0x10(%r14), %eax
movq 0x1ab25(%rip), %rcx     # 0x1cad8
cmpw 0x10(%rcx), %ax
jne 0x2034
movl $0x9, 0x8(%r14)
movq 0x1ab10(%rip), %rax     # 0x1cad8
movzwl 0x10(%rax), %eax
movw %ax, 0x10(%r14)
jmp 0x1f06
callq 0x1683
movl %eax, 0x1aacf(%rip)     # 0x1cab0
cmpl $0x3d, %eax
jne 0x1f47
movl $0x0, 0x1aabc(%rip)     # 0x1cab0
xorl %edi, %edi
callq 0x1d93
testb $0x8, 0x8(%r14)
jne 0x203e
movl $0x1, 0x8(%r14)
movw %ax, 0x10(%r14)
jmp 0x1f06
cmpl $0x80, %r15d
je 0x2079
movl $0x1, %edi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1190
jmp 0x1f06
callq 0x1381
jmp 0x1f06
callq 0x1369
jmp 0x1f06
callq 0x1a8d
cmpl $0x81, %eax
je 0x2064
cmpl $0x82, %eax
jne 0x2084
movw %dx, 0x1bb10(%rip)      # 0x1db72
jmp 0x206f
movzwl 0x10(%rdx), %eax
movw %ax, 0x1bb03(%rip)      # 0x1db72
movl $0xffffffff, 0x1aa37(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1351
jmp 0x206f
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x0, 0x1aa2f(%rip)     # 0x1cac8
callq 0x1683
movl %eax, 0x1aa0c(%rip)     # 0x1cab0
cmpl $-0x1, %eax
je 0x20b0
callq 0x1ef5
jmp 0x2099
cmpl $0x0, 0x1a9fd(%rip)     # 0x1cab4
je 0x20ca
cmpb $0x0, 0x3290(%rip)      # 0x5350
je 0x20ca
xorl %edi, %edi
popq %rbp
jmp 0x158f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
leaq 0x32d3(%rip), %r14      # 0x53b0
leaq 0x1137(%rip), %rbx      # 0x321b
xorl %r15d, %r15d
xorl %eax, %eax
cmpb $0x0, (%r15,%r14)
je 0x20f8
cmpl $0x0, 0x8(%r15,%r14)
je 0x2107
addq $0x18, %r15
cmpq $0x17700, %r15          # imm = 0x17700
jne 0x20e9
jmp 0x211e
leaq (%r14,%r15), %rdx
xorl %edi, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1190
movl $0x1, %eax
jmp 0x20f8
testl %eax, %eax
jne 0x212d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1399
jmp 0x2122
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x2f9a(%rip), %rdi      # 0x50e0
testq %rdi, %rdi
je 0x2172
leaq 0x2f9e(%rip), %rbx      # 0x50f0
callq 0x186a
movl $0x1, 0x8(%rax)
movzwl -0x8(%rbx), %ecx
movw %cx, 0x10(%rax)
movq (%rbx), %rdi
addq $0x10, %rbx
testq %rdi, %rdi
jne 0x2152
movq $-0x18, %r15
leaq 0x3230(%rip), %r12      # 0x53b0
leaq 0x10bd(%rip), %rbx      # 0x3244
leaq (%r15,%r12), %r14
addq $0x18, %r14
movl $0x6, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1040
testl %eax, %eax
je 0x21b3
addq $0x18, %r15
cmpq $0x176e7, %r15          # imm = 0x176E7
jbe 0x2187
xorl %r14d, %r14d
movq %r14, 0x1a91e(%rip)     # 0x1cad8
movl $0x1, 0x8(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2df8(%rip), %rax      # 0x4fd8
movq (%rax), %rax
movq %rax, 0x1a8ce(%rip)     # 0x1cab8
leaq 0x10c4(%rip), %rax      # 0x32b5
movq %rax, 0x3148(%rip)      # 0x5340
leaq 0x10be(%rip), %r14      # 0x32bd
leaq 0x10be(%rip), %rbx      # 0x32c4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1546
movq %rax, 0x1a8a8(%rip)     # 0x1cac0
callq 0x2134
movw $0x800, %ax             # imm = 0x800
movw %ax, 0x1b948(%rip)      # 0x1db70
movq 0x1a8a9(%rip), %rax     # 0x1cad8
movw $0x20, %r12w
movw %r12w, 0x10(%rax)
xorl %r13d, %r13d
movl %r13d, 0x1a871(%rip)    # 0x1cab4
callq 0x208b
callq 0x20cc
movl $0x1, %r15d
movl %r15d, 0x1a85a(%rip)    # 0x1cab4
movq 0x1a85f(%rip), %rdi     # 0x1cac0
callq 0x1060
movq $0x0, 0x1a84f(%rip) # 0x1cac0
leaq 0x104f(%rip), %rsi      # 0x32c7
movq %r14, %rdi
callq 0x1546
movq %rax, 0x1a831(%rip)     # 0x1cab8
leaq 0x103c(%rip), %rdi      # 0x32ca
movq %rbx, %rsi
callq 0x1546
movq %rax, 0x1a883(%rip)     # 0x1cb20
leaq 0x102e(%rip), %rdi      # 0x32d2
leaq 0x102f(%rip), %rsi      # 0x32da
callq 0x1546
movq %rax, 0x30e9(%rip)      # 0x53a0
movw $0x800, %ax             # imm = 0x800
movw %ax, 0x1b8ae(%rip)      # 0x1db70
movq 0x1a80f(%rip), %rax     # 0x1cad8
movw %r12w, 0x10(%rax)
movl %r15d, 0x2dff(%rip)     # 0x50d4
movl %r13d, 0x1a7d4(%rip)    # 0x1cab0
callq 0x208b
callq 0x1c32
movq 0x1a7cb(%rip), %rdi     # 0x1cab8
callq 0x1060
movq 0x1a827(%rip), %rdi     # 0x1cb20
callq 0x1060
callq 0x15ef
movzwl 0x1b868(%rip), %esi     # 0x1db72
leaq 0xfcb(%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_O1/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 0x10dc5(%rip), %rsi     # 0x7769c
callq 0x73a0
leaq 0x10df3(%rip), %rsi     # 0x776d6
movq %rax, %rdi
callq 0x73a0
movq %rbx, %rdi
callq 0x6b018
movl $0x1, %edi
callq 0x7480
// File: /workspace/github_c_makefile_star2_O1/back1127[P]linkedge-thing-access-websocket_client_sdk/demo/linux/demo.c
// Function: get_device_index
int get_device_index(const char *pk, const char *dn)
{
    int i;
    
    for (i = 0; i < g_devices_count; i++) {
        if (strcmp(g_devices[i].dn, dn) == 0) {
            return i;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x2e42(%rip), %r12d     # 0x41a0
testl %r12d, %r12d
jle 0x1394
movq %rsi, %rbx
movq 0x2e3b(%rip), %r15      # 0x41a8
addq $0x10, %r15
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x11b0
testl %eax, %eax
je 0x1397
incq %r14
addq $0x3c, %r15
cmpq %r14, %r12
jne 0x1374
movl %r12d, %r14d
jmp 0x1397
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1150
movq %rax, %rdi
callq 0x11a0
cmpl $0x0, 0x2cd9(%rip)      # 0x4138
je 0x14ec
movl 0x2d34(%rip), %r15d     # 0x41a0
imulq $0x3c, %r15, %r12
leaq 0x2d01(%rip), %rbx      # 0x4178
leaq 0x2cca(%rip), %r14      # 0x4148
movq %rbx, %rdi
callq 0x1230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11f0
testl %r15d, %r15d
jle 0x14db
xorl %r13d, %r13d
cmpl $0x0, 0x2d04(%rip)      # 0x41a4
movq 0x2d01(%rip), %rdi      # 0x41a8
je 0x14cb
leaq (%rdi,%r13), %rsi
addq $0x10, %rsi
addq %r13, %rdi
callq 0x1190
testl %eax, %eax
jne 0x14d2
movl $0x1, %eax
movq 0x2cdf(%rip), %rdi      # 0x41a8
jmp 0x14cd
xorl %eax, %eax
movl %eax, 0x30(%rdi,%r13)
addq $0x3c, %r13
cmpq %r13, %r12
jne 0x1499
movq %rbx, %rdi
callq 0x1240
cmpl $0x0, 0x2c4e(%rip)      # 0x4138
jne 0x147e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1150
movq %rax, %rdi
callq 0x11a0
movl 0x2c7d(%rip), %r13d     # 0x41a0
movabsq $0x656e746867697262, %rax # imm = 0x656E746867697262
movq %rax, -0x10bc(%rbp)
movl $0x737365, -0x10b5(%rbp) # imm = 0x737365
movl $0x0, -0x10c0(%rbp)
movw $0x72, -0x874(%rbp)
movabsq $0x65776f7000000001, %rax # imm = 0x65776F7000000001
movq %rax, -0x87c(%rbp)
cmpl $0x0, 0x2bcf(%rip)      # 0x4138
je 0x1668
imulq $0x3c, %r13, %r14
movq %r14, -0x30(%rbp)
testl %r13d, %r13d
jle 0x1651
xorl %r15d, %r15d
movq 0x2c1e(%rip), %r12      # 0x41a8
cmpl $0x1, 0x30(%r12,%r15)
jne 0x1633
leaq (%r12,%r15), %rbx
leaq (%r12,%r15), %r14
addq $0x10, %r14
movq %r14, %rsi
callq 0x134c
cltq
imulq $0x3c, %rax, %rax
movl 0x38(%r12,%rax), %ecx
movl $0x800, %esi            # imm = 0x800
leaq -0x107c(%rbp), %rdi
leaq 0xa4d(%rip), %r12       # 0x2015
movq %r12, %rdx
xorl %eax, %eax
callq 0x1050
movq %r14, %rsi
callq 0x134c
movq 0x2bc7(%rip), %rcx      # 0x41a8
cltq
imulq $0x3c, %rax, %rax
movl 0x34(%rcx,%rax), %ecx
movl $0x800, %esi            # imm = 0x800
leaq -0x838(%rbp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x10c0(%rbp), %rdx
movl $0x2, %ecx
callq 0x11e0
movq %rbx, %rdi
movq %r14, %rsi
movq -0x30(%rbp), %r14
leaq 0x9ef(%rip), %rdx       # 0x2018
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1120
movl $0x989680, %eax         # imm = 0x989680
xorl %edx, %edx
divl %r13d
movl %eax, %edi
callq 0x1160
addq $0x3c, %r15
cmpq %r15, %r14
jne 0x1583
movl $0x1, %edi
callq 0x1140
cmpl $0x0, 0x2ad6(%rip)      # 0x4138
jne 0x1577
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x2ab3(%rip)      # 0x4138
je 0x16a9
callq 0x10b0
leaq 0x98f(%rip), %rdi       # 0x2022
movq %rax, %rsi
xorl %eax, %eax
callq 0x1030
movl $0x0, 0x2a91(%rip)      # 0x4138
popq %rbp
retq
leaq 0xa34(%rip), %rdi       # 0x20e4
callq 0x1070
xorl %edi, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/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 0x94c(%rip), %rsi       # 0x2052
callq 0x10d0
testq %rax, %rax
je 0x17eb
movq %rax, %rbx
movq $-0x78, %r15
xorl %r13d, %r13d
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
movl $0x80, %esi
movq %rbx, %rdx
callq 0x10e0
decq %r13
addq $0x3c, %r15
testq %rax, %rax
jne 0x1728
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1080
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %r13d, %eax
movl %eax, 0x2a42(%rip)      # 0x41a0
movq %r15, %rdi
callq 0x10c0
movq %rax, 0x2a3b(%rip)      # 0x41a8
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1040
cmpl $-0x1, %r13d
je 0x17df
notq %r13
movq $-0x3c, %r15
leaq -0xb0(%rbp), %r12
xorl %r14d, %r14d
subq $0x1, %r14
jae 0x17b0
movq %rbx, %rdi
leaq 0x919(%rip), %rsi       # 0x20bd
movq %r12, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x17d6
movq 0x29f1(%rip), %r8       # 0x41a8
leaq (%r8,%r15), %rdx
addq $0x10, %rdx
addq %r15, %r8
movq %rbx, %rdi
leaq 0x89e(%rip), %rsi       # 0x206a
movq %r12, %rcx
xorl %eax, %eax
callq 0x1060
addq $0x3c, %r15
decq %r13
jne 0x1794
movq %rbx, %rdi
callq 0x1200
xorl %eax, %eax
jmp 0x1801
leaq 0x863(%rip), %rdi       # 0x2055
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x298e(%rip), %rdi      # 0x41a8
testq %rdi, %rdi
je 0x1834
pushq %rbp
movq %rsp, %rbp
callq 0x1100
movq $0x0, 0x2975(%rip) # 0x41a8
popq %rbp
movl $0x0, 0x2962(%rip)      # 0x41a0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5ae(%rip), %rax       # 0x20c4
leaq 0x5a4(%rip), %rsi       # 0x20c1
cmoveq %rax, %rsi
leaq 0x583(%rip), %rdi       # 0x20ab
xorl %eax, %eax
callq 0x1030
movl %ebx, 0x266f(%rip)      # 0x41a4
leaq 0x263c(%rip), %rbx      # 0x4178
movq %rbx, %rdi
callq 0x1230
leaq 0x25fd(%rip), %rdi      # 0x4148
callq 0x1090
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1240