LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_query_functions
int
test_encode_query_functions(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following set of values:
    *  Query Functions
          Query Operations
          Query Objects
    */
    uint8 expected[32] = {
        0x42, 0x00, 0x74, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x74, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
    };

    uint8 observed[32] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);

    LinkedList list = {0};
    LinkedListItem item_1 = {0};
    int32 funct_1 = KMIP_QUERY_OPERATIONS;
    item_1.data = &funct_1;

    LinkedListItem item_2 = {0};
    int32 funct_2 = KMIP_QUERY_OBJECTS;
    item_2.data = &funct_2;

    kmip_linked_list_enqueue(&list, &item_1);
    kmip_linked_list_enqueue(&list, &item_2);

    Functions qf = {0};
    qf.function_list = &list;

    int result = kmip_encode_query_functions(&ctx, &qf);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    kmip_destroy(&ctx);

    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x928, %rsp            # imm = 0x928
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x90(%rsp), %rbx
xorl %ebp, %ebp
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x20, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
leaq 0x50(%rsp), %r12
movq %rbp, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
leaq 0x30(%rsp), %rsi
movq %rbp, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x4(%rsp), %rax
movl $0x1, (%rax)
movq %rax, 0x10(%rsi)
leaq 0x10(%rsp), %r13
movq %rbp, 0x10(%r13)
movaps %xmm0, (%r13)
movq %rsp, %rax
movl $0x2, (%rax)
movq %rax, 0x10(%r13)
movq %r12, %rdi
callq 0x12ebd
movq %r12, %rdi
movq %r13, %rsi
callq 0x12ebd
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movq %rbx, %rdi
callq 0x1c05f
leaq 0x23a88(%rip), %rdx     # 0x34c00
leaq 0x20213(%rip), %r9      # 0x31392
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x928, %rsp            # imm = 0x928
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: print_help
void
print_help(const char *app)
{
    printf("Usage: %s [flag] ...\n\n", app);
    printf("Flags:\n");
    printf("-h : print this help info\n");
    printf("-i : run the test suite forever\n");
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x1e8f2(%rip), %rdi     # 0x3159b
xorl %eax, %eax
callq 0x1090
leaq 0x1eafa(%rip), %rdi     # 0x317b1
callq 0x1070
leaq 0x1eaf5(%rip), %rdi     # 0x317b8
callq 0x1070
leaq 0x1eb03(%rip), %rdi     # 0x317d2
popq %rax
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: parse_arguments
int
parse_arguments(int argc,
                char **argv,
                int *print_usage,
                int *run_forever)
{
    for(int i = 1; i < argc; i++)
    {
        if(strncmp(argv[i], "-h", 2) == 0)
        {
            *print_usage = 1;
        }
        else if(strncmp(argv[i], "-i", 2) == 0)
        {
            *run_forever = 1;
        }
        else
        {
            printf("Invalid option: '%s'\n", argv[i]);
            print_help(argv[0]);
            return(-1);
        }
    }
    
    return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0x2, %edi
setge %r13b
jl 0x12d8d
movq %rdx, %r15
movl %edi, %r12d
movl $0x1, %r14d
subq %r12, %r14
movl $0x2, %ebx
movq 0x8(%rsp), %rax
movq -0x8(%rax,%rbx,8), %rbp
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x1e88b(%rip), %rsi     # 0x315b2
callq 0x1060
movq %r15, %rcx
testl %eax, %eax
je 0x12d50
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x1e873(%rip), %rsi     # 0x315b5
callq 0x1060
movq 0x10(%rsp), %rcx
testl %eax, %eax
jne 0x12d6f
movl $0x1, (%rcx)
cmpq %r12, %rbx
setb %r13b
leaq (%r14,%rbx), %rax
incq %rax
incq %rbx
cmpq $0x2, %rax
jne 0x12d0e
jmp 0x12d8d
leaq 0x1e842(%rip), %rdi     # 0x315b8
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x12c9e
movzbl %r13b, %eax
andl $0x1, %eax
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yugecin[P]evilwm/client.c
// Function: client_raise
void client_raise(Client *c) {
	XRaiseWindow(dpy, c->parent);
	clients_stacking_order = list_to_tail(clients_stacking_order, c);
#ifdef ABOVE
	do_above();
#endif
	ewmh_set_net_client_list_stacking(c->screen);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8df0(%rip), %rax      # 0xc8e0
movq (%rax), %rdi
movq 0x8(%rbx), %rsi
callq 0x36d0
leaq 0x8d55(%rip), %r14      # 0xc858
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x5d1b
movq %rax, (%r14)
callq 0x3b26
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x58de
// File: /workspace/github_c_makefile_star2_O1/yugecin[P]evilwm/client.c
// Function: do_above
void do_above(void) {
	if (doabove) {
		// this may get heavy
		struct list *iter;
		for (iter = clients_stacking_order; iter; iter = iter->next) {
			Client *cur = iter->data;
			if (cur->isabove) {
				XRaiseWindow(dpy, cur->parent);
			}
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x88bb(%rip), %rax      # 0xc3ec
cmpl $0x0, (%rax)
sete %al
leaq 0x8d1a(%rip), %rcx      # 0xc858
movq (%rcx), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x3b73
leaq 0x8d8e(%rip), %r14      # 0xc8e0
movq 0x8(%rbx), %rax
cmpl $0x0, 0x84(%rax)
je 0x3b6b
movq (%r14), %rdi
movq 0x8(%rax), %rsi
callq 0x36d0
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x3b52
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yugecin[P]evilwm/ewmh.c
// Function: ewmh_set_net_wm_state
void ewmh_set_net_wm_state(Client *c) {
	Atom state[3];
	int i = 0;
	if (c->oldh)
		state[i++] = xa_net_wm_state_maximized_vert;
	if (c->oldw)
		state[i++] = xa_net_wm_state_maximized_horz;
#ifndef NOMAXIMISE
	if (c->oldh && c->oldw)
		state[i++] = xa_net_wm_state_fullscreen;
#endif
	XChangeProperty(dpy, c->window, xa_net_wm_state,
			XA_ATOM, 32, PropModeReplace,
			(unsigned char *)&state, i);
}

// Assembly:
subq $0x18, %rsp
cmpl $0x0, 0x48(%rdi)
je 0x5b43
movq 0x6c81(%rip), %rax      # 0xc7b8
movq %rax, (%rsp)
movl $0x1, %r10d
jmp 0x5b46
xorl %r10d, %r10d
cmpl $0x0, 0x44(%rdi)
je 0x5b5d
movq 0x6c6d(%rip), %rax      # 0xc7c0
movl %r10d, %ecx
incl %r10d
movq %rax, (%rsp,%rcx,8)
leaq 0x6d7c(%rip), %rax      # 0xc8e0
movq (%rax), %rax
movq (%rdi), %rsi
movq 0x6c3f(%rip), %rdx      # 0xc7b0
movq %rsp, %r11
movl $0x4, %ecx
movq %rax, %rdi
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %r11
callq 0x3460
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/yugecin[P]evilwm/main.c
// Function: set_gaps
static void set_gaps(const char *arg) {
	unsigned int gapidx;

	opt_numgaps = 0;
	gapidx = 0;
	while (*arg) {
		opt_gaps[gapidx] = atoi(arg);
		++gapidx;
		if (gapidx >= sizeof(opt_gaps)/sizeof(opt_gaps[0])) {
			printf("toobig\n");
			return;
		}
		if ((gapidx % 4) == 0) {
			opt_numgaps++;
		}
		while (*arg) {
			if (*(arg++) == ',') {
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, 0x62fd(%rip)      # 0xc870
cmpb $0x0, (%rdi)
je 0x65bc
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x62fb(%rip), %r15      # 0xc880
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3620
movl %eax, (%r15,%r14,4)
cmpq $0xf, %r14
je 0x65c7
incq %r14
testb $0x3, %r14b
jne 0x65aa
incl %ebp
movl %ebp, 0x62c6(%rip)      # 0xc870
movb (%rbx), %al
testb %al, %al
je 0x65b7
incq %rbx
cmpb $0x2c, %al
jne 0x65aa
cmpb $0x0, (%rbx)
jne 0x6587
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3203(%rip), %rdi      # 0x97d1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3130
// File: /workspace/github_c_makefile_star2_O1/gadget114514[P]fatfs-example/rf.c
// Function: main
void main()
{
  FIL f;
  int w;
  FATFS fs;
  char buf[1024];
  FCHK(f_mount(&fs, "", 1)); 
  if (f_open(&f, "/abc/a.txt", FA_OPEN_EXISTING|FA_READ) == FR_OK) {
    FCHK(f_read(&f, buf, 9, &w));
    printf("open & write %d %s\n", w, buf);
    FCHK(f_close(&f));
  } else {
    printf("open error\n");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
leaq 0x42d9(%rip), %rsi      # 0x5490
leaq -0x4d8(%rbp), %rdi
movl $0x1, %edx
callq 0x143c
movl %eax, %ebx
movl %eax, %edi
callq 0x12b3
leaq 0x3e2c(%rip), %rdi      # 0x5004
leaq 0x3e38(%rip), %rsi      # 0x5017
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1050
leaq 0x3e39(%rip), %rsi      # 0x502b
leaq -0x280(%rbp), %rdi
movl $0x1, %edx
callq 0x1836
testl %eax, %eax
je 0x1218
leaq 0x41e6(%rip), %rdi      # 0x53f4
callq 0x1030
jmp 0x12a1
leaq -0x280(%rbp), %rbx
leaq -0x8e0(%rbp), %r15
leaq -0x2c(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movl $0x9, %edx
movq %r12, %rcx
callq 0x2174
movl %eax, %r13d
movl %eax, %edi
callq 0x12b3
leaq 0x3db6(%rip), %r14      # 0x5004
leaq 0x3de1(%rip), %rsi      # 0x5036
movq %r14, %rdi
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1050
movl (%r12), %esi
leaq 0x3ddd(%rip), %rdi      # 0x504d
movq %r15, %rdx
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x2a77
movl %eax, %ebx
movl %eax, %edi
callq 0x12b3
leaq 0x3dcf(%rip), %rsi      # 0x5061
movq %r14, %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1050
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: fail
void fail(const char *fmt, ...)
{
  va_list ap;
  fflush(stdout);
  va_start(ap, fmt);
  vfprintf(stderr, fmt, ap);
  va_end(ap);
  fprintf(stderr, "\n");
  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x82fd
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x9ccc(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x3160
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq 0x9cc5(%rip), %r14      # 0x11ff8
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x31a0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x30d0
movl $0x1, %edi
callq 0x31c0
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: osword
int osword(M6502 *mpu, word address, byte data)
{
  byte *params= mpu->memory + mpu->registers->x + (mpu->registers->y << 8);

  switch (mpu->registers->a)
    {
    case 0x00: /* input line */
      /* On entry: XY+0,1=>string area,
       *	   XY+2=maximum line length,
       *	   XY+3=minimum acceptable ASCII value,
       *	   XY+4=maximum acceptable ASCII value.
       * On exit:  Y is the line length (excluding CR),
       *	   C is set if Escape terminated input.
       */
      {
	word  offset= params[0] + (params[1] << 8);
	byte *buffer= mpu->memory + offset;
	byte  length= params[2], minVal= params[3], maxVal= params[4], b= 0;
	if (!fgets(buffer, length, stdin))
	  {
	    putchar('\n');
	    longjmp(exit_6502_env, 1);
	  }
	for (b= 0;  b < length;  ++b)
	  if ((buffer[b] < minVal) || (buffer[b] > maxVal) || ('\n' == buffer[b]))
	    break;
	buffer[b]= 13;
	mpu->registers->y= b;
	mpu->registers->p &= 0xFE;
	break;
      }

    default:
      {
	char state[64];
	M6502_dump(mpu, state);
	fflush(stdout);
	fprintf(stderr, "\nOSWORD %s\n", state);
	fail("ABORT");
      }
      break;
    }
  
  rts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
cmpb $0x0, (%rax)
jne 0x8456
movq 0x8(%rbx), %rcx
movzbl 0x1(%rax), %edx
addq %rcx, %rdx
movzbl 0x2(%rax), %eax
shll $0x8, %eax
movzwl (%rax,%rdx), %r14d
addq %rcx, %r14
movzbl 0x2(%rax,%rdx), %r15d
movb 0x3(%rax,%rdx), %bpl
movb 0x4(%rax,%rdx), %r12b
movq 0x9c12(%rip), %rax      # 0x11fd8
movq (%rax), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x30e0
testq %rax, %rax
je 0x8461
xorl %eax, %eax
testq %r15, %r15
je 0x8402
movb (%r14,%rax), %cl
cmpb $0xa, %cl
je 0x8402
cmpb %bpl, %cl
jb 0x8402
cmpb %r12b, %cl
ja 0x8402
incq %rax
cmpb %al, %r15b
jne 0x83e4
movl %r15d, %eax
movzbl %al, %eax
movb $0xd, (%r14,%rax)
movq (%rbx), %rcx
movb %al, 0x2(%rcx)
andb $-0x2, 0x3(%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb 0x4(%rax), %dl
leal 0x1(%rdx), %esi
movb %sil, 0x4(%rax)
movzbl %sil, %esi
movzbl 0x100(%rcx,%rsi), %esi
addb $0x2, %dl
movb %dl, 0x4(%rax)
movzbl %dl, %eax
movzbl 0x100(%rcx,%rax), %eax
shll $0x8, %eax
addl %esi, %eax
incl %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x3200
movl $0xa, %edi
callq 0x3040
leaq 0x9cae(%rip), %rdi      # 0x12120
movl $0x1, %esi
callq 0x3170
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: oscli
int oscli(M6502 *mpu, word address, byte data)
{
  byte *params= mpu->memory + mpu->registers->x + (mpu->registers->y << 8);
  char  command[1024], *ptr= command;
  while (('*' == *params) || (' ' == *params))
    ++params;
  while (13 != *params)
    *ptr++= *params++;
  *ptr= '\0';
  system(command);
  rts;
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movq (%rdi), %rax
movzbl 0x1(%rax), %ecx
addq 0x8(%rdi), %rcx
movzbl 0x2(%rax), %eax
shll $0x8, %eax
addq %rcx, %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x8533
cmpl $0x2a, %ecx
jne 0x8538
incq %rax
jmp 0x8526
movb (%rax), %cl
cmpb $0xd, %cl
jne 0x8544
movq %rsp, %rax
jmp 0x8559
xorl %edx, %edx
movb %cl, (%rsp,%rdx)
movb 0x1(%rax,%rdx), %cl
incq %rdx
cmpb $0xd, %cl
jne 0x8546
leaq (%rsp,%rdx), %rax
movb $0x0, (%rax)
movq %rsp, %rdi
callq 0x3090
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb 0x4(%rax), %dl
leal 0x1(%rdx), %esi
movb %sil, 0x4(%rax)
movzbl %sil, %esi
movzbl 0x100(%rcx,%rsi), %esi
addb $0x2, %dl
movb %dl, 0x4(%rax)
movzbl %dl, %eax
movzbl 0x100(%rcx,%rax), %eax
shll $0x8, %eax
addl %esi, %eax
incl %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: oswrch
int oswrch(M6502 *mpu, word address, byte data)
{
  switch (mpu->registers->a)
    {
    case 0x0C:
      fputs("\033[2J\033[H", stdout);
      break;

    default:
      putchar(mpu->registers->a);
      break;
    }
  fflush(stdout);
  rts;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %edi
cmpl $0xc, %edi
jne 0x85c9
movq 0x9a18(%rip), %rax      # 0x11fd0
movq (%rax), %rsi
leaq 0x5a90(%rip), %rdi      # 0xe052
callq 0x30b0
jmp 0x85ce
callq 0x3040
movq 0x99fb(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x3160
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb 0x4(%rax), %dl
leal 0x1(%rdx), %esi
movb %sil, 0x4(%rax)
movzbl %sil, %esi
movzbl 0x100(%rcx,%rsi), %esi
addb $0x2, %dl
movb %dl, 0x4(%rax)
movzbl %dl, %eax
movzbl 0x100(%rcx,%rax), %eax
shll $0x8, %eax
addl %esi, %eax
incl %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: loadInterpreter
static int loadInterpreter(M6502 *mpu, word start, const char *path)
{
  FILE   *file= 0;
  int     count= 0;
  byte   *memory= mpu->memory + start;
  size_t  max= 0x10000 - start;
  int     c= 0;

  if ((!(file= fopen(path, "r"))) || ('#' != fgetc(file)) || ('!' != fgetc(file)))
    return 0;
  while ((c= fgetc(file)) >= ' ')
    ;
  while ((count= fread(memory, 1, max, file)) > 0)
    {
      memory += count;
      max -= count;
    }
  fclose(file);
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r12d
movq 0x8(%rdi), %rbx
addq %r12, %rbx
leaq 0x5fb6(%rip), %rsi      # 0xee0c
movq %rdx, %rdi
callq 0x3180
xorl %ebp, %ebp
testq %rax, %rax
je 0x8ec9
movq %rax, %r14
movq %rax, %rdi
callq 0x30c0
cmpl $0x23, %eax
jne 0x8ec9
movq %r14, %rdi
callq 0x30c0
cmpl $0x21, %eax
jne 0x8ec9
movl $0x10000, %r15d         # imm = 0x10000
subq %r12, %r15
movq %r14, %rdi
callq 0x30c0
cmpl $0x1f, %eax
jg 0x8e8b
jmp 0x8ea5
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %rbx
subq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3070
testl %eax, %eax
jg 0x8e9a
movq %r14, %rdi
callq 0x3080
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: load
static int load(M6502 *mpu, word address, const char *path)
{
  FILE  *file= 0;
  int    count= 0;
  size_t max= 0x10000 - address;
  if (!(file= fopen(path, "r")))
    return 0;
  while ((count= fread(mpu->memory + address, 1, max, file)) > 0)
    {
      address += count;
      max -= count;
    }
  fclose(file);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x5f24(%rip), %rsi      # 0xee0c
movq %rdx, %rdi
callq 0x3180
testq %rax, %rax
je 0x8f3a
movq %rax, %r15
movzwl %bx, %edi
movl $0x10000, %r12d         # imm = 0x10000
subq %rdi, %r12
jmp 0x8f13
addl %eax, %ebx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subq %rax, %r12
movzwl %bx, %edi
addq 0x8(%r14), %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %r15, %rcx
callq 0x3070
testl %eax, %eax
jg 0x8f06
movq %r15, %rdi
callq 0x3080
movl $0x1, %eax
jmp 0x8f3c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: doBtraps
static int doBtraps(int argc, char **argv, M6502 *mpu)
{
  unsigned addr;

  /* Acorn Model B ROM and memory-mapped IO */

  for (addr= 0x8000;  addr <= 0xFBFF;  ++addr)  mpu->callbacks->write[addr]= writeROM;
  for (addr= 0xFC00;  addr <= 0xFEFF;  ++addr)  mpu->memory[addr]= 0xFF;
  for (addr= 0xFE30;  addr <= 0xFE33;  ++addr)  mpu->callbacks->write[addr]= bankSelect;
  for (addr= 0xFE40;  addr <= 0xFE4F;  ++addr)  mpu->memory[addr]= 0x00;
  for (addr= 0xFF00;  addr <= 0xFFFF;  ++addr)  mpu->callbacks->write[addr]= writeROM;

  /* anything already loaded at 0x8000 appears in bank 0 */

  memcpy(bank[0x00], mpu->memory + 0x8000, 0x4000);

  /* fake a few interesting OS calls */

# define trap(vec, addr, func)   mpu->callbacks->call[addr]= (func)
  trap(0x020C, 0xFFF1, osword);
  trap(0x020A, 0xFFF4, osbyte);
//trap(0x0208, 0xFFF7, oscli );	/* enable this to send '*COMMAND's to system(3) :-) */
  trap(0x020E, 0xFFEE, oswrch);
  trap(0x020E, 0xE0A4, oswrch);	/* NVWRCH */
#undef trap

  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %ecx, %ecx
leaq 0x359(%rip), %rax       # 0x92ae
movq 0x10(%rbx), %rdx
movq %rax, 0xc0000(%rdx,%rcx,8)
incq %rcx
cmpq $0x7c00, %rcx           # imm = 0x7C00
jne 0x8f55
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb $-0x1, 0xfc00(%rdx,%rcx)
incq %rcx
cmpq $0x300, %rcx            # imm = 0x300
jne 0x8f6f
xorl %ecx, %ecx
leaq 0x321(%rip), %rdx       # 0x92b1
movq 0x10(%rbx), %rsi
movq %rdx, 0xff180(%rsi,%rcx,8)
incq %rcx
cmpq $0x4, %rcx
jne 0x8f90
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb $0x0, 0xfe40(%rdx,%rcx)
incq %rcx
cmpq $0x10, %rcx
jne 0x8fa7
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
movq %rax, 0xff800(%rdx,%rcx,8)
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x8fbe
movl $0x8000, %esi           # imm = 0x8000
addq 0x8(%rbx), %rsi
leaq 0x920a(%rip), %rdi      # 0x121f0
movl $0x4000, %edx           # imm = 0x4000
callq 0x3150
movq 0x10(%rbx), %rax
leaq -0xc81(%rip), %rcx      # 0x837a
movq %rcx, 0x17ff88(%rax)
movq 0x10(%rbx), %rax
leaq -0xb91(%rip), %rcx      # 0x847c
movq %rcx, 0x17ffa0(%rax)
movq 0x10(%rbx), %rax
leaq -0xa7d(%rip), %rcx      # 0x85a2
movq %rcx, 0x17ff70(%rax)
movq 0x10(%rbx), %rax
movq %rcx, 0x170520(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: doXtrap
static int doXtrap(int argc, char **argv, M6502 *mpu)
{
  unsigned addr= 0;
  if (argc < 2) usage(1);
  addr= htol(argv[1]);
  M6502_setCallback(mpu, call, addr, xTrap);
  return 1;
}

// Assembly:
pushq %rbx
cmpl $0x1, %edi
jle 0x905c
movq %rdx, %rbx
movq 0x8(%rsi), %rdi
callq 0x92dc
movq 0x10(%rbx), %rcx
movl %eax, %eax
leaq 0x356(%rip), %rdx       # 0x93a8
movq %rdx, 0x100000(%rcx,%rax,8)
popq %rbx
retq
movl $0x1, %edi
callq 0x9066
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/run6502.c
// Function: htol
static unsigned long htol(char *hex)
{
  char *end;
  unsigned long l= strtol(hex, &end, 16);
  if (*end) fail("bad hex number: %s", hex);
  return l;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
movl $0x10, %edx
callq 0x3140
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x9303
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4db8(%rip), %rdi      # 0xe0c2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x829c
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/lib6502.c
// Function: M6502_irq
void M6502_irq(M6502 *mpu)
{
  if (!(mpu->registers->p & flagI))
    {
      mpu->memory[0x0100 + mpu->registers->s--] = (byte)(mpu->registers->pc >> 8);
      mpu->memory[0x0100 + mpu->registers->s--] = (byte)(mpu->registers->pc & 0xff);
      mpu->memory[0x0100 + mpu->registers->s--] = mpu->registers->p;
      mpu->registers->p &= ~flagB;
      mpu->registers->p |=  flagI;
      mpu->registers->pc = M6502_getVector(mpu, IRQ);
    }
}

// Assembly:
movq (%rdi), %rax
testb $0x4, 0x3(%rax)
jne 0x9437
movb 0x7(%rax), %cl
movq 0x8(%rdi), %rdx
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %cl, 0x100(%rdx,%rsi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x6(%rax), %dl
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %dl, 0x100(%rcx,%rsi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x3(%rax), %dl
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %dl, 0x100(%rcx,%rsi)
movq (%rdi), %rax
movb 0x3(%rax), %cl
andb $-0x15, %cl
orb $0x4, %cl
movb %cl, 0x3(%rax)
movq 0x8(%rdi), %rcx
movzwl 0xfffe(%rcx), %ecx
movw %cx, 0x6(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/lib6502.c
// Function: M6502_nmi
void M6502_nmi(M6502 *mpu)
{
  mpu->memory[0x0100 + mpu->registers->s--] = (byte)(mpu->registers->pc >> 8);
  mpu->memory[0x0100 + mpu->registers->s--] = (byte)(mpu->registers->pc & 0xff);
  mpu->memory[0x0100 + mpu->registers->s--] = mpu->registers->p;
  mpu->registers->p &= ~flagB;
  mpu->registers->p |=  flagI;
  mpu->registers->pc = M6502_getVector(mpu, NMI);
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x7(%rax), %dl
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %dl, 0x100(%rcx,%rsi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x6(%rax), %dl
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %dl, 0x100(%rcx,%rsi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movb 0x3(%rax), %dl
movzbl 0x4(%rax), %esi
leal -0x1(%rsi), %r8d
movb %r8b, 0x4(%rax)
movb %dl, 0x100(%rcx,%rsi)
movq (%rdi), %rax
movb 0x3(%rax), %cl
andb $-0x15, %cl
orb $0x4, %cl
movb %cl, 0x3(%rax)
movq 0x8(%rdi), %rcx
movzwl 0xfffa(%rcx), %ecx
movw %cx, 0x6(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/lib6502.c
// Function: M6502_dump
void M6502_dump(M6502 *mpu, char buffer[64])
{
  M6502_Registers *r= mpu->registers;
  uint8_t p= r->p;
# define P(N,C) (p & (1 << (N)) ? (C) : '-')
  sprintf(buffer, "PC=%04X SP=%04X A=%02X X=%02X Y=%02X P=%02X %c%c%c%c%c%c%c%c",
	  r->pc, 0x0100 + r->s,
	  r->a, r->x, r->y, r->p,
	  P(7,'N'), P(6,'V'), P(5,'?'), P(4,'B'), P(3,'D'), P(2,'I'), P(1,'Z'), P(0,'C'));
# undef P
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq (%rdi), %rsi
movzbl 0x3(%rsi), %r10d
movzwl 0x6(%rsi), %edx
movzbl 0x4(%rsi), %ecx
orl $0x100, %ecx            # imm = 0x100
movzbl (%rsi), %r8d
testb %r10b, %r10b
movl $0x2d, %edi
movl $0x4e, %r9d
cmovnsl %edi, %r9d
movq %r9, 0x10(%rsp)
testb $0x40, %r10b
movl $0x56, %ebx
cmovel %edi, %ebx
testb $0x20, %r10b
movl $0x3f, %r14d
cmovel %edi, %r14d
testb $0x10, %r10b
movl $0x42, %r15d
cmovel %edi, %r15d
testb $0x8, %r10b
movl $0x44, %r13d
cmovel %edi, %r13d
testb $0x4, %r10b
movl $0x49, %ebp
cmovel %edi, %ebp
testb $0x2, %r10b
movl $0x5a, %r12d
cmovel %edi, %r12d
testb $0x1, %r10b
movl $0x43, %r11d
cmovel %edi, %r11d
movzbl 0x1(%rsi), %r9d
movzbl 0x2(%rsi), %esi
movq %rsi, 0x8(%rsp)
leaq 0x18ed(%rip), %rsi      # 0xeeec
movq %rax, %rdi
xorl %eax, %eax
pushq %r11
pushq %r12
pushq %rbp
pushq %r13
pushq %r15
pushq %r14
pushq %rbx
pushq 0x48(%rsp)
pushq %r10
pushq 0x50(%rsp)
callq 0x31b0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/lib6502.c
// Function: M6502_new
M6502 *M6502_new(M6502_Registers *registers, M6502_Memory memory, M6502_Callbacks *callbacks)
{
  M6502 *mpu= calloc(1, sizeof(M6502));
  if (!mpu) outOfMemory();

  if (!registers)  { registers = (M6502_Registers *)calloc(1, sizeof(M6502_Registers));  mpu->flags |= M6502_RegistersAllocated; }
  if (!memory   )  { memory    = (uint8_t         *)calloc(1, sizeof(M6502_Memory   ));  mpu->flags |= M6502_MemoryAllocated;    }
  if (!callbacks)  { callbacks = (M6502_Callbacks *)calloc(1, sizeof(M6502_Callbacks));  mpu->flags |= M6502_CallbacksAllocated; }

  if (!registers || !memory || !callbacks) outOfMemory();

  mpu->registers = registers;
  mpu->memory    = memory;
  mpu->callbacks = callbacks;
  mpu->ticks     = 0;

  return mpu;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x3100
testq %rax, %rax
je 0xd6d8
movq %rax, %rbx
testq %r12, %r12
jne 0xd675
movl $0x1, %edi
movl $0x8, %esi
callq 0x3100
movq %rax, %r12
orb $0x1, 0x18(%rbx)
testq %r15, %r15
jne 0xd690
movl $0x1, %edi
movl $0x10000, %esi          # imm = 0x10000
callq 0x3100
movq %rax, %r15
orb $0x2, 0x18(%rbx)
testq %r14, %r14
jne 0xd6ab
movl $0x1, %edi
movl $0x180000, %esi         # imm = 0x180000
callq 0x3100
movq %rax, %r14
orb $0x4, 0x18(%rbx)
testq %r12, %r12
je 0xd6d8
testq %r15, %r15
je 0xd6d8
testq %r14, %r14
je 0xd6d8
movq %r12, (%rbx)
movq %r15, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movb $0x0, 0x1c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xd6dd
// File: /workspace/github_c_makefile_star2_O1/ShonFrazier[P]lib6502/lib6502.c
// Function: M6502_delete
void M6502_delete(M6502 *mpu)
{
  if (mpu->flags & M6502_CallbacksAllocated) free(mpu->callbacks);
  if (mpu->flags & M6502_MemoryAllocated   ) free(mpu->memory);
  if (mpu->flags & M6502_RegistersAllocated) free(mpu->registers);

  free(mpu);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x18(%rdi)
je 0xd725
movq 0x10(%rbx), %rdi
callq 0x3030
testb $0x2, 0x18(%rbx)
je 0xd734
movq 0x8(%rbx), %rdi
callq 0x3030
testb $0x1, 0x18(%rbx)
je 0xd742
movq (%rbx), %rdi
callq 0x3030
movq %rbx, %rdi
popq %rbx
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_01/simple.c
// Function: main
int main(void)
{
	int n;
	char buf[BUFFSIZE];

	while ((n = read(STDIN_FILENO, buf, BUFFSIZE)) > 0)
		if (write(STDOUT_FILENO, buf, n) != n)
			err("write error\n");
	if (n < 0)
		err("read error\n");

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
callq 0x1040
movq %rax, %r15
testl %r15d, %r15d
jle 0x11be
movq %rsp, %rbx
leaq 0xe8b(%rip), %r14       # 0x2004
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl $0x1, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1030
cmpq %r15, %rax
je 0x11a7
movl $0xd, %edx
movl $0x2, %edi
movq %r14, %rsi
callq 0x1030
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
movq %rbx, %rsi
callq 0x1040
movq %rax, %r15
testl %r15d, %r15d
jg 0x1179
testl %r15d, %r15d
jns 0x11d9
leaq 0xe47(%rip), %rsi       # 0x2011
movl $0xc, %edx
movl $0x2, %edi
callq 0x1030
xorl %eax, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/subtptd.c
// Function: prv_set_prog_size
static void prv_set_prog_size(uint8_t *code, size_t bytes_written,
			      subtilis_error_t *err)
{
	if (bytes_written < 8) {
		subtilis_error_set_assertion_failed(err);
		return;
	}
	((uint32_t *)code)[1] =
	    SUBTILIS_PTD_PROGRAM_START + (int32_t)bytes_written;
}

// Assembly:
cmpq $0x7, %rsi
ja 0x116ea
leaq 0x6094d(%rip), %rax     # 0x72022
movq %rdx, %rdi
movl $0xf, %esi
movq %rax, %rdx
movl $0x22, %ecx
jmp 0x13604
addl $0xf000, %esi           # imm = 0xF000
movl %esi, 0x4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movr
void subtilis_vfp_gen_movr(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	src = subtilis_arm_ir_to_dreg(instr->operands[1].reg);

	subtilis_vfp_add_copy(arm_s, SUBTILIS_ARM_CCODE_AL,
			      SUBTILIS_VFP_INSTR_FCPYD, dest, src, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r12
movq 0x10(%r12), %rdi
callq 0x4e592
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4e592
movq %r14, %rdi
movl $0xe, %esi
movl $0x4b, %edx
movq %r15, %rcx
movq %rax, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5c698
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movir
void subtilis_vfp_gen_movir(subtilis_ir_section_t *s, size_t start,
			    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	double src;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	src = instr->operands[1].real;

	subtilis_vfp_add_copy_imm(arm_s, SUBTILIS_ARM_CCODE_AL, dest, src, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r15
movq 0x10(%r15), %rdi
callq 0x4e592
movsd 0x18(%r15), %xmm0
movq %r14, %rdi
movl $0xe, %esi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x5c6d0
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movri32
void subtilis_vfp_gen_movri32(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	subtilis_arm_reg_t tmp;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_arm_reg(instr->operands[0].reg);
	src = subtilis_arm_ir_to_dreg(instr->operands[1].reg);
	tmp = subtilis_arm_ir_to_dreg(s->freg_counter++);

	subtilis_vfp_add_tran(arm_s, SUBTILIS_VFP_INSTR_FTOSIZD,
			      SUBTILIS_ARM_CCODE_AL, true, tmp, src, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_cptran(arm_s, SUBTILIS_VFP_INSTR_FMRS,
				SUBTILIS_ARM_CCODE_AL, true, dest, tmp, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4e007
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4e592
movq %rax, %r13
movq 0x20(%r12), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r12)
callq 0x4e592
movq %rax, %r12
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0x58, %esi
movl $0xe, %edx
movl $0x1, %ecx
movq %rax, %r8
movq %r13, %r9
callq 0x5c93b
cmpl $0x0, (%r14)
jne 0x6ac59
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0x5e, %esi
movl $0xe, %edx
movl $0x1, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x5c97b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movi32r
void subtilis_vfp_gen_movi32r(subtilis_ir_section_t *s, size_t start,
			      void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	subtilis_arm_reg_t tmp;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	src = subtilis_arm_ir_to_arm_reg(instr->operands[1].reg);
	tmp = subtilis_arm_ir_to_dreg(s->freg_counter++);

	subtilis_vfp_add_cptran(arm_s, SUBTILIS_VFP_INSTR_FMSR,
				SUBTILIS_ARM_CCODE_AL, true, tmp, src, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_tran(arm_s, SUBTILIS_VFP_INSTR_FSITOD,
			      SUBTILIS_ARM_CCODE_AL, true, dest, tmp, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4e592
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4e007
movq %rax, %r13
movq 0x20(%r12), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r12)
callq 0x4e592
movq %rax, %r12
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0x5d, %esi
movl $0xe, %edx
movl $0x1, %ecx
movq %rax, %r8
movq %r13, %r9
callq 0x5c97b
cmpl $0x0, (%r14)
jne 0x6ae92
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0x51, %esi
movl $0xe, %edx
movl $0x1, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x5c93b
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_gen_callr
static void prv_gen_callr(subtilis_ir_section_t *s, size_t start,
			  void *user_data, bool indirect, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t op1;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_call_t *call = &s->ops[start]->op.call;

	subtilis_arm_gen_call_gen(s, start, user_data,
				  SUBTILIS_ARM_BR_LINK_REAL, indirect, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	dest = subtilis_arm_ir_to_dreg(call->reg);
	op1 = 0;

	subtilis_vfp_add_copy(arm_s, SUBTILIS_ARM_CCODE_AL,
			      SUBTILIS_VFP_INSTR_FCPYD, dest, op1, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movl %ecx, %r8d
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r15
movl $0x2, %ecx
movq %rbx, %r9
callq 0x50bd0
cmpl $0x0, (%rbx)
je 0x6aed5
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
callq 0x4e592
movq %r14, %rdi
movl $0xe, %esi
movl $0x4b, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
popq %rbx
popq %r14
popq %r15
jmp 0x5c698
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_data_simple
static void prv_data_simple(subtilis_ir_section_t *s,
			    subtilis_arm_instr_type_t itype, size_t start,
			    void *user_data, subtilis_error_t *err)
{
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	subtilis_arm_reg_t dest =
	    subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	subtilis_arm_reg_t op1 =
	    subtilis_arm_ir_to_dreg(instr->operands[1].reg);
	subtilis_arm_reg_t op2 =
	    subtilis_arm_ir_to_dreg(instr->operands[2].reg);
	subtilis_arm_section_t *arm_s = user_data;

	subtilis_vfp_add_data(arm_s, itype, SUBTILIS_ARM_CCODE_AL, dest, op1,
			      op2, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %esi, %ebp
movq 0x48(%rdi), %rax
movq (%rax,%rdx,8), %r13
movq 0x10(%r13), %rdi
callq 0x4e592
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4e592
movq %rax, %r12
movq 0x20(%r13), %rdi
callq 0x4e592
movq %rbx, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl $0xe, %edx
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
callq 0x5c9bb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_data_imm
static void prv_data_imm(subtilis_ir_section_t *s,
			 subtilis_arm_instr_type_t itype, size_t start,
			 void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t op2 = subtilis_arm_ir_to_dreg(s->freg_counter++);
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	subtilis_arm_reg_t dest =
	    subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	subtilis_arm_reg_t op1 =
	    subtilis_arm_ir_to_dreg(instr->operands[1].reg);
	subtilis_arm_section_t *arm_s = user_data;

	subtilis_vfp_add_copy_imm(arm_s, SUBTILIS_ARM_CCODE_AL, op2,
				  instr->operands[2].real, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_data(arm_s, itype, SUBTILIS_ARM_CCODE_AL, dest, op1,
			      op2, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r12
movl %esi, 0x14(%rsp)
movq %rdi, %r13
movq 0x20(%rdi), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r13)
callq 0x4e592
movq %rax, %r15
movq 0x48(%r13), %rax
movq (%rax,%r12,8), %rbp
movq 0x10(%rbp), %rdi
callq 0x4e592
movq %rax, %r12
movq 0x18(%rbp), %rdi
callq 0x4e592
movq %rax, %r13
movsd 0x20(%rbp), %xmm0
movq %rbx, %rdi
movl $0xe, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x5c6d0
cmpl $0x0, (%r14)
jne 0x6b01d
movq %r14, (%rsp)
movq %rbx, %rdi
movl 0x14(%rsp), %esi
movl $0xe, %edx
movq %r12, %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x5c9bb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_fma_right
void subtilis_vfp_gen_fma_right(subtilis_ir_section_t *s, size_t start,
				void *user_data, subtilis_error_t *err)
{
	subtilis_ir_inst_t *mul = &s->ops[start]->op.instr;
	subtilis_ir_inst_t *add = &s->ops[start + 1]->op.instr;
	subtilis_arm_reg_t dest = subtilis_arm_ir_to_dreg(add->operands[0].reg);
	subtilis_arm_reg_t op1 = subtilis_arm_ir_to_dreg(mul->operands[1].reg);
	subtilis_arm_reg_t op2 = subtilis_arm_ir_to_dreg(mul->operands[2].reg);
	subtilis_arm_reg_t op3 = subtilis_arm_ir_to_dreg(add->operands[1].reg);
	subtilis_arm_section_t *arm_s = user_data;

	subtilis_vfp_add_copy(arm_s, SUBTILIS_ARM_CCODE_AL,
			      SUBTILIS_VFP_INSTR_FCPYD, dest, op3, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_data(arm_s, SUBTILIS_VFP_INSTR_FMACD,
			      SUBTILIS_ARM_CCODE_AL, dest, op1, op2, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x8(%rax,%rsi,8), %rbp
movq 0x10(%rbp), %rdi
callq 0x4e592
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4e592
movq %rax, %r12
movq 0x20(%r13), %rdi
callq 0x4e592
movq %rax, %r13
movq 0x18(%rbp), %rdi
callq 0x4e592
movq %rbx, %rdi
movl $0xe, %esi
movl $0x4b, %edx
movq %r15, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x5c698
cmpl $0x0, (%r14)
jne 0x6b18a
movq %r14, (%rsp)
movq %rbx, %rdi
movl $0x60, %esi
movl $0xe, %edx
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0x5c9bb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_divr
void subtilis_vfp_gen_divr(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_error_t *err)
{
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	subtilis_arm_reg_t dest =
	    subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	subtilis_arm_section_t *arm_s = user_data;

	prv_data_simple(s, SUBTILIS_VFP_INSTR_FDIVD, start, user_data, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	prv_check_divbyzero(arm_s, s, dest, SUBTILIS_ERROR_CODE_DIV_BY_ZERO,
			    err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4e592
movq %r15, %rdi
movl $0x70, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x6af18
cmpl $0x0, (%rbx)
je 0x6b33f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6b355
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_rdivir
void subtilis_vfp_gen_rdivir(subtilis_ir_section_t *s, size_t start,
			     void *user_data, subtilis_error_t *err)
{
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	subtilis_arm_reg_t dest =
	    subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	subtilis_arm_section_t *arm_s = user_data;

	prv_data_imm_reversed(s, SUBTILIS_VFP_INSTR_FDIVD, start, user_data,
			      err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	prv_check_divbyzero(arm_s, s, dest, SUBTILIS_ERROR_CODE_DIV_BY_ZERO,
			    err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4e592
movq %r15, %rdi
movl $0x70, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x6b062
cmpl $0x0, (%rbx)
je 0x6b50f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6b355
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_stran_instr
static void prv_stran_instr(subtilis_arm_instr_type_t itype,
			    subtilis_ir_section_t *s, size_t start,
			    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t base;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	int32_t offset = instr->operands[2].integer;

	dest = subtilis_arm_ir_to_dreg(instr->operands[0].reg);
	base = subtilis_arm_ir_to_arm_reg(instr->operands[1].reg);

	subtilis_vfp_add_stran(arm_s, itype, SUBTILIS_ARM_CCODE_AL, dest, base,
			       offset, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edi, %ebp
movq 0x48(%rsi), %rax
movq (%rax,%rdx,8), %r13
movl 0x20(%r13), %r15d
movq 0x10(%r13), %rdi
callq 0x4e592
movq %rax, %r12
movq 0x18(%r13), %rdi
callq 0x4e007
movq %rbx, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl $0xe, %edx
movq %r12, %rcx
movq %rax, %r8
movl %r15d, %r9d
callq 0x5c718
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_retr
void subtilis_vfp_gen_retr(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *instr = &s->ops[start]->op.instr;
	subtilis_arm_reg_t op2;

	dest = 0;
	op2 = subtilis_arm_ir_to_dreg(instr->operands[0].reg);

	subtilis_vfp_add_copy(arm_s, SUBTILIS_ARM_CCODE_AL,
			      SUBTILIS_VFP_INSTR_FCPYD, dest, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_arm_gen_ret(s, start, user_data, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rax
movq 0x10(%rax), %rdi
callq 0x4e592
movq %r14, %rdi
movl $0xe, %esi
movl $0x4b, %edx
xorl %ecx, %ecx
movq %rax, %r8
movq %rbx, %r9
callq 0x5c698
cmpl $0x0, (%rbx)
je 0x6b5fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x51227
// File: /workspace/github_c_makefile_star2_O1/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_cmp_jmp_imm
static void prv_cmp_jmp_imm(subtilis_ir_section_t *s, size_t start,
			    void *user_data, subtilis_arm_ccode_type_t ccode,
			    subtilis_error_t *err)
{
	subtilis_arm_instr_t *instr;
	subtilis_arm_br_instr_t *br;
	subtilis_arm_reg_t op1;
	subtilis_arm_reg_t op2;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *cmp = &s->ops[start]->op.instr;
	subtilis_ir_inst_t *jmp = &s->ops[start + 1]->op.instr;

	op1 = subtilis_arm_ir_to_dreg(cmp->operands[1].reg);

	if (cmp->operands[2].real == 0.0) {
		subtilis_vfp_add_cmpz(arm_s, SUBTILIS_VFP_INSTR_FCMPZD,
				      SUBTILIS_ARM_CCODE_AL, op1, err);
	} else {
		op2 = subtilis_arm_ir_to_dreg(s->freg_counter++);
		subtilis_vfp_add_copy_imm(arm_s, SUBTILIS_ARM_CCODE_AL, op2,
					  cmp->operands[2].real, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_vfp_add_cmp(arm_s, SUBTILIS_VFP_INSTR_FCMPD,
				     SUBTILIS_ARM_CCODE_AL, op1, op2, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_sysreg(arm_s, SUBTILIS_VFP_INSTR_FMRX,
				SUBTILIS_ARM_CCODE_AL,
				SUBTILIS_VFP_SYSREG_FPSCR, 15, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	instr =
	    subtilis_arm_section_add_instr(arm_s, SUBTILIS_ARM_INSTR_B, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	br = &instr->operands.br;
	br->ccode = ccode;
	br->link = false;
	br->link_type = SUBTILIS_ARM_BR_LINK_VOID;
	br->target.label = jmp->operands[2].label;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rdi, %r13
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rbx
movq 0x8(%rax,%rsi,8), %rbp
movq 0x18(%rbx), %rdi
callq 0x4e592
movq %rax, %r12
movsd 0x20(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6b6f8
jp 0x6b6f8
movq %r15, %rdi
movl $0x76, %esi
movl $0xe, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x5ca30
cmpl $0x0, (%r14)
jne 0x6b72a
movl $0xf, %r8d
movq %r15, %rdi
movl $0x7c, %esi
movl $0xe, %edx
movl $0x1, %ecx
movq %r14, %r9
callq 0x5ca8c
cmpl $0x0, (%r14)
jne 0x6b72a
movq %r15, %rdi
movl $0x16, %esi
movq %r14, %rdx
callq 0x4e74a
cmpl $0x0, (%r14)
jne 0x6b72a
movl 0x4(%rsp), %ecx
movl %ecx, 0x8(%rax)
movb $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
movq 0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x6b72a
movq 0x20(%r13), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r13)
callq 0x4e592
movq %rax, %r13
movsd 0x20(%rbx), %xmm0
movq %r15, %rdi
movl $0xe, %esi
movq %rax, %rdx
movq %r14, %rcx
callq 0x5c6d0
cmpl $0x0, (%r14)
je 0x6b739
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl $0x72, %esi
movl $0xe, %edx
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x5c9fa
jmp 0x6b696