LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x348d
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 0xcbd8(%rip), %rax      # 0xffd8
movq (%rax), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x30e0
testq %rax, %rax
je 0x34d3
xorl %eax, %eax
cmpq %rax, %r15
je 0x3436
movb (%r14,%rax), %cl
cmpb $0xa, %cl
je 0x343b
cmpb %bpl, %cl
jb 0x343b
cmpb %r12b, %cl
ja 0x343b
incq %rax
jmp 0x3419
movq %r15, %rax
jmp 0x343e
movl %eax, %r15d
movb $0xd, (%r14,%rax)
movq (%rbx), %rax
movb %r15b, 0x2(%rax)
andb $-0x2, 0x3(%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, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbb86
movq 0xcb2e(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3150
movq 0xcb47(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x8b79(%rip), %rsi      # 0xc034
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
leaq 0x8b74(%rip), %rdi      # 0xc040
xorl %eax, %eax
callq 0x32dc
pushq $0xa
popq %rdi
callq 0x3040
leaq 0xcc3e(%rip), %rdi      # 0x10120
pushq $0x1
popq %rsi
callq 0x3160
// File: /workspace/github_c_makefile_star2_O2/ShonFrazier[P]lib6502/run6502.c
// Function: osbyte
int osbyte(M6502 *mpu, word address, byte data)
{
  switch (mpu->registers->a)
    {
    case 0x7A:	/* perform keyboard scan */
      mpu->registers->x= 0x00;
      break;

    case 0x7E:	/* acknowledge detection of escape condition */
      return 1;
      break;

    case 0x82:	/* read machine higher order address */
      mpu->registers->y= 0x00;
      mpu->registers->x= 0x00;
      break;

    case 0x83:	/* read top of OS ram address (OSHWM) */
      mpu->registers->y= 0x0E;
      mpu->registers->x= 0x00;
      break;

    case 0x84:	/* read bottom of display ram address */
      mpu->registers->y= 0x80;
      mpu->registers->x= 0x00;
      break;

    case 0x89:	/* motor control */
      break;

    case 0xDA:	/* read/write number of items in vdu queue (stored at 0x026A) */
      return 0;
      break;

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

  rts;
}

// Assembly:
movq (%rdi), %rax
movzbl (%rax), %ecx
leal -0x7e(%rcx), %edx
cmpl $0xb, %edx
ja 0x350c
leaq 0x8b05(%rip), %rcx      # 0xc004
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
pushq $0x1
popq %rax
retq
cmpl $0x7a, %ecx
je 0x3529
cmpl $0xda, %ecx
jne 0x3560
xorl %eax, %eax
retq
xorl %ecx, %ecx
jmp 0x3526
movb $0xe, %cl
jmp 0x3526
movb $-0x80, %cl
movb %cl, 0x2(%rax)
movb $0x0, 0x1(%rax)
movq 0x8(%rdi), %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
retq
pushq %rbx
subq $0x40, %rsp
movq %rsp, %rbx
movq %rbx, %rsi
callq 0xbb86
movq 0xca59(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3150
movq 0xca72(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x8ab6(%rip), %rsi      # 0xc046
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3120
leaq 0x8a9f(%rip), %rdi      # 0xc040
xorl %eax, %eax
callq 0x32dc
// File: /workspace/github_c_makefile_star2_O2/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
movq 0x8(%rdi), %rcx
movzwl 0x1(%rax), %eax
addq %rcx, %rax
incq %rax
movzbl -0x1(%rax), %ecx
cmpl $0x20, %ecx
je 0x35d2
cmpl $0x2a, %ecx
jne 0x35d7
incq %rax
jmp 0x35c4
xorl %edx, %edx
cmpb $0xd, %cl
je 0x35e9
movb %cl, (%rsp,%rdx)
movb (%rax,%rdx), %cl
incq %rdx
jmp 0x35d9
movb $0x0, (%rsp,%rdx)
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_O2/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 0x365a
movq 0xc987(%rip), %rax      # 0xffd0
movq (%rax), %rsi
leaq 0x89ff(%rip), %rdi      # 0xc052
callq 0x30b0
jmp 0x365f
callq 0x3040
movq 0xc96a(%rip), %rax      # 0xffd0
movq (%rax), %rdi
callq 0x3150
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_O2/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 0x900e(%rip), %rsi      # 0xcddc
movq %rdx, %rdi
callq 0x3170
xorl %ebp, %ebp
testq %rax, %rax
je 0x3e41
movq %rax, %r14
movq %rax, %rdi
callq 0x30c0
cmpl $0x23, %eax
jne 0x3e41
movq %r14, %rdi
callq 0x30c0
cmpl $0x21, %eax
jne 0x3e41
movl $0x10000, %r15d         # imm = 0x10000
subq %r12, %r15
movq %r14, %rdi
callq 0x30c0
cmpl $0x1f, %eax
jg 0x3e03
pushq $0x1
popq %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3070
testl %eax, %eax
jle 0x3e36
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %rbx
subq %rax, %r15
jmp 0x3e14
movq %r14, %rdi
callq 0x3080
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8f7b(%rip), %rsi      # 0xcddc
movq %rdx, %rdi
callq 0x3170
testq %rax, %rax
je 0x3eb3
movq %rax, %r15
movzwl %bx, %eax
movl $0x10000, %r12d         # imm = 0x10000
subq %rax, %r12
pushq $0x1
popq %r13
movzwl %bx, %edi
addq 0x8(%r14), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x3070
testl %eax, %eax
jle 0x3ea6
addl %eax, %ebx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
subq %rax, %r12
jmp 0x3e81
movq %r15, %rdi
callq 0x3080
pushq $0x1
popq %rax
jmp 0x3eb5
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2fd(%rip), %rax       # 0x41c9
cmpq $0x7c00, %rcx           # imm = 0x7C00
je 0x3ee6
movq 0x10(%rbx), %rdx
movq %rax, 0xc0000(%rdx,%rcx,8)
incq %rcx
jmp 0x3ecc
movq $-0x300, %rcx           # imm = 0xFD00
testq %rcx, %rcx
je 0x3f03
movq 0x8(%rbx), %rdx
movb $-0x1, 0xff00(%rdx,%rcx)
incq %rcx
jmp 0x3eed
xorl %ecx, %ecx
leaq 0x2c0(%rip), %rdx       # 0x41cc
cmpq $0x4, %rcx
je 0x3f23
movq 0x10(%rbx), %rsi
movq %rdx, 0xff180(%rsi,%rcx,8)
incq %rcx
jmp 0x3f0c
xorl %ecx, %ecx
cmpq $0x10, %rcx
je 0x3f3c
movq 0x8(%rbx), %rdx
movb $0x0, 0xfe40(%rdx,%rcx)
incq %rcx
jmp 0x3f25
xorl %ecx, %ecx
cmpq $0x100, %rcx            # imm = 0x100
je 0x3f58
movq 0x10(%rbx), %rdx
movq %rax, 0xff800(%rdx,%rcx,8)
incq %rcx
jmp 0x3f3e
movl $0x8000, %esi           # imm = 0x8000
addq 0x8(%rbx), %rsi
leaq 0xc288(%rip), %rdi      # 0x101f0
movl $0x4000, %edx           # imm = 0x4000
callq 0x3140
movq 0x10(%rbx), %rax
leaq -0xbc9(%rip), %rcx      # 0x33b4
movq %rcx, 0x17ff88(%rax)
movq 0x10(%rbx), %rax
leaq -0xaa5(%rip), %rcx      # 0x34ea
movq %rcx, 0x17ffa0(%rax)
movq 0x10(%rbx), %rax
leaq -0x96e(%rip), %rcx      # 0x3633
movq %rcx, 0x17ff70(%rax)
movq 0x10(%rbx), %rax
movq %rcx, 0x170520(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x3130
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x421c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7e6f(%rip), %rdi      # 0xc092
movq %rbx, %rsi
xorl %eax, %eax
callq 0x32dc
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2d
popq %rdi
pushq $0x4e
popq %r9
cmovnsl %edi, %r9d
movq %r9, 0x10(%rsp)
testb $0x40, %r10b
pushq $0x56
popq %rbx
cmovel %edi, %ebx
testb $0x20, %r10b
pushq $0x3f
popq %r14
cmovel %edi, %r14d
testb $0x10, %r10b
pushq $0x42
popq %r15
cmovel %edi, %r15d
testb $0x8, %r10b
pushq $0x44
popq %r13
cmovel %edi, %r13d
testb $0x4, %r10b
pushq $0x49
popq %rbp
cmovel %edi, %ebp
testb $0x2, %r10b
pushq $0x5a
popq %r12
cmovel %edi, %r12d
testb $0x1, %r10b
pushq $0x43
popq %r11
cmovel %edi, %r11d
movzbl 0x1(%rsi), %r9d
movzbl 0x2(%rsi), %esi
movq %rsi, 0x8(%rsp)
leaq 0x1293(%rip), %rsi      # 0xcebc
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 0x31a0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x3100
testq %rax, %rax
je 0xbcfe
movq %rax, %r14
xorl %ebp, %ebp
testq %r12, %r12
jne 0xbca0
pushq $0x1
popq %rdi
pushq $0x8
popq %rsi
callq 0x3100
movq %rax, %r12
movl $0x1, 0x18(%r14)
pushq $0x1
popq %rbp
testq %r15, %r15
jne 0xbcbc
pushq $0x1
popq %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0x3100
movq %rax, %r15
orl $0x2, %ebp
movl %ebp, 0x18(%r14)
testq %rbx, %rbx
jne 0xbcd8
pushq $0x1
popq %rdi
movl $0x180000, %esi         # imm = 0x180000
callq 0x3100
movq %rax, %rbx
orl $0x4, %ebp
movl %ebp, 0x18(%r14)
testq %r12, %r12
je 0xbcfe
testq %r15, %r15
je 0xbcfe
testq %rbx, %rbx
je 0xbcfe
movq %r12, (%r14)
movq %r15, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xbd03
// File: /workspace/github_c_makefile_star2_O2/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
movl 0x18(%rdi), %eax
testb $0x4, %al
je 0xbd4b
movq 0x10(%rbx), %rdi
callq 0x3030
movl 0x18(%rbx), %eax
testb $0x2, %al
je 0xbd5b
movq 0x8(%rbx), %rdi
callq 0x3030
movl 0x18(%rbx), %eax
testb $0x1, %al
je 0xbd67
movq (%rbx), %rdi
callq 0x3030
movq %rbx, %rdi
popq %rbx
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rsp, %rbx
pushq $0x1
popq %rbp
leaq 0xe9c(%rip), %r14       # 0x2004
pushq $0xd
popq %r15
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
movq %rbx, %rsi
callq 0x1040
movq %rax, %r12
testl %r12d, %r12d
jle 0x11a9
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1030
cmpq %r12, %rax
je 0x116c
movq %r14, %rdi
movq %r15, %rsi
callq 0x11cc
jmp 0x116c
jns 0x11ba
leaq 0xe5f(%rip), %rdi       # 0x2011
pushq $0xc
popq %rsi
callq 0x11cc
xorl %eax, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1167b
leaq 0x5a9b8(%rip), %rax     # 0x6c022
pushq $0xf
popq %rsi
pushq $0x22
popq %rcx
movq %rdx, %rdi
movq %rax, %rdx
jmp 0x132ae
addl $0xf000, %esi           # imm = 0xF000
movl %esi, 0x4(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4b78a
pushq $0xe
popq %rsi
pushq $0x4b
popq %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %rax, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x58580
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movsd 0x18(%r15), %xmm0
pushq $0xe
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x585b8
// File: /workspace/github_c_makefile_star2_O2/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 0x4b224
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4b78a
movq %rax, %r13
movq 0x20(%r12), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r12)
callq 0x4b78a
movq %rax, %r12
movq %r14, (%rsp)
pushq $0x58
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %r8
movq %r13, %r9
callq 0x58813
cmpl $0x0, (%r14)
jne 0x6556b
movq %r14, (%rsp)
pushq $0x5e
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r15, %r8
movq %r12, %r9
callq 0x58853
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4b224
movq %rax, %r13
movq 0x20(%r12), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r12)
callq 0x4b78a
movq %rax, %r12
movq %r14, (%rsp)
pushq $0x5d
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rax, %r8
movq %r13, %r9
callq 0x58853
cmpl $0x0, (%r14)
jne 0x65767
movq %r14, (%rsp)
pushq $0x51
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r15, %r8
movq %r12, %r9
callq 0x58813
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rcx
movq %rbx, %r9
callq 0x4d7d3
cmpl $0x0, (%rbx)
je 0x657a8
popq %rbx
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
callq 0x4b78a
pushq $0xe
popq %rsi
pushq $0x4b
popq %rdx
movq %r14, %rdi
movq %rax, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
popq %rbx
popq %r14
popq %r15
jmp 0x58580
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4b78a
movq %rax, %r12
movq 0x20(%r13), %rdi
callq 0x4b78a
movq %rbx, (%rsp)
pushq $0xe
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
callq 0x58893
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r15
movq 0x48(%r13), %rax
movq (%rax,%r12,8), %rbp
movq 0x10(%rbp), %rdi
callq 0x4b78a
movq %rax, %r12
movq 0x18(%rbp), %rdi
callq 0x4b78a
movq %rax, %r13
movsd 0x20(%rbp), %xmm0
pushq $0xe
popq %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x585b8
cmpl $0x0, (%r14)
jne 0x658e0
movq %r14, (%rsp)
pushq $0xe
popq %rdx
movq %rbx, %rdi
movl 0x14(%rsp), %esi
movq %r12, %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x58893
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4b78a
movq %rax, %r12
movq 0x20(%r13), %rdi
callq 0x4b78a
movq %rax, %r13
movq 0x18(%rbp), %rdi
callq 0x4b78a
pushq $0xe
popq %rsi
pushq $0x4b
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %rax, %r8
movq %r14, %r9
callq 0x58580
cmpl $0x0, (%r14)
jne 0x65a3b
movq %r14, (%rsp)
pushq $0x60
popq %rsi
pushq $0xe
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0x58893
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
pushq $0x70
popq %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x657e3
cmpl $0x0, (%rbx)
je 0x65bda
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 0x65bf0
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
pushq $0x70
popq %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x6591f
cmpl $0x0, (%rbx)
je 0x65d88
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 0x65bf0
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r12
movq 0x18(%r13), %rdi
callq 0x4b224
movq %rbx, (%rsp)
pushq $0xe
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rcx
movq %rax, %r8
movl %r15d, %r9d
callq 0x585fe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
pushq $0xe
popq %rsi
pushq $0x4b
popq %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movq %rax, %r8
movq %rbx, %r9
callq 0x58580
cmpl $0x0, (%rbx)
je 0x65e6c
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 0x4dda2
// File: /workspace/github_c_makefile_star2_O2/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 0x4b78a
movq %rax, %r12
movsd 0x20(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x65f4e
jp 0x65f4e
pushq $0x76
popq %rsi
pushq $0xe
popq %rdx
movq %r15, %rdi
movq %r12, %rcx
movq %r14, %r8
callq 0x58908
cmpl $0x0, (%r14)
jne 0x65f7e
pushq $0x7c
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
pushq $0xf
popq %r8
movq %r15, %rdi
movq %r14, %r9
callq 0x58964
cmpl $0x0, (%r14)
jne 0x65f7e
pushq $0x16
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x4b93b
cmpl $0x0, (%r14)
jne 0x65f7e
movl 0x4(%rsp), %ecx
movl %ecx, 0x8(%rax)
movb $0x0, 0xc(%rax)
andl $0x0, 0x10(%rax)
movq 0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x65f7e
movq 0x20(%r13), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r13)
callq 0x4b78a
movq %rax, %r13
movsd 0x20(%rbx), %xmm0
pushq $0xe
popq %rsi
movq %r15, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x585b8
cmpl $0x0, (%r14)
je 0x65f8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x72
popq %rsi
pushq $0xe
popq %rdx
movq %r15, %rdi
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x588d2
jmp 0x65efd
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: prv_cmp_imm
static void prv_cmp_imm(subtilis_ir_section_t *s, size_t start, void *user_data,
			subtilis_arm_ccode_type_t ok,
			subtilis_arm_ccode_type_t nok, subtilis_error_t *err)
{
	subtilis_arm_reg_t op1;
	subtilis_arm_reg_t op2;
	subtilis_arm_reg_t dest;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *cmp = &s->ops[start]->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;

	dest = subtilis_arm_ir_to_arm_reg(cmp->operands[0].reg);
	subtilis_arm_add_mov_imm(arm_s, ok, false, dest, -1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_arm_add_mov_imm(arm_s, nok, false, dest, 0, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movl %r8d, 0x14(%rsp)
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r13
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %rbx
movq 0x18(%rbx), %rdi
callq 0x4b78a
movq %rax, %r12
movsd 0x20(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x66157
jp 0x66157
pushq $0x76
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
movq %r12, %rcx
movq %r15, %r8
callq 0x58908
cmpl $0x0, (%r15)
jne 0x66187
pushq $0x7c
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
pushq $0xf
popq %r8
movq %r14, %rdi
movq %r15, %r9
callq 0x58964
cmpl $0x0, (%r15)
jne 0x66187
movq 0x10(%rbx), %rdi
callq 0x4b224
movq %rax, %r12
movq %r15, 0x8(%rsp)
orl $-0x1, (%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
movq %r14, %rdi
movl %ebp, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4c223
cmpl $0x0, (%r15)
jne 0x66187
movq %r15, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
movq %r14, %rdi
movl 0x14(%rsp), %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x4c223
jmp 0x66187
movq 0x20(%r13), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x20(%r13)
callq 0x4b78a
movq %rax, %r13
movsd 0x20(%rbx), %xmm0
pushq $0xe
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %r15, %rcx
callq 0x585b8
cmpl $0x0, (%r15)
je 0x66196
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x72
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
movq %r12, %rcx
movq %r13, %r8
movq %r15, %r9
callq 0x588d2
jmp 0x660d7
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_sqr
void subtilis_vfp_gen_sqr(subtilis_ir_section_t *s, size_t start,
			  void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	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_sqrt(arm_s, SUBTILIS_VFP_INSTR_FSQRTD,
			      SUBTILIS_ARM_CCODE_AL, 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 0x4b78a
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4b78a
pushq $0x79
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %rax, %r8
movq %rbx, %r9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5892e
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_absr
void subtilis_vfp_gen_absr(subtilis_ir_section_t *s, size_t start,
			   void *user_data, subtilis_error_t *err)
{
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_arm_reg_t dest;
	subtilis_arm_reg_t src;
	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_tran(arm_s, SUBTILIS_VFP_INSTR_FABSD,
			      SUBTILIS_ARM_CCODE_AL, true, 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 0x4b78a
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4b78a
movq %rbx, (%rsp)
pushq $0x4f
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %r8
movq %rax, %r9
callq 0x58813
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_preamble
void subtilis_vfp_gen_preamble(subtilis_arm_section_t *arm_s,
			       subtilis_error_t *err)
{
	subtilis_arm_reg_t status;

	status = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);

	subtilis_arm_add_mov_imm(arm_s, SUBTILIS_ARM_CCODE_AL, false, status, 0,
				 err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_vfp_add_sysreg(arm_s, SUBTILIS_VFP_INSTR_FMXR,
				SUBTILIS_ARM_CCODE_AL,
				SUBTILIS_VFP_SYSREG_FPSCR, status, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%r14)
callq 0x4b224
movq %rax, %r15
movq %rbx, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0xd
popq %rsi
pushq $0xf
popq %rdx
pushq $0xe
popq %rcx
movq %r14, %rdi
xorl %r8d, %r8d
movq %rax, %r9
callq 0x4c223
cmpl $0x0, (%rbx)
je 0x664b4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x7b
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %r8
movq %rbx, %r9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x58964
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movi8tofp
void subtilis_vfp_gen_movi8tofp(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_reg_t tmp1;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *signx = &s->ops[start]->op.instr;

	dest = subtilis_arm_ir_to_dreg(signx->operands[0].reg);
	src = subtilis_arm_ir_to_arm_reg(signx->operands[1].reg);
	tmp = subtilis_arm_ir_to_arm_reg(arm_s->reg_counter++);
	tmp1 = subtilis_arm_ir_to_dreg(arm_s->freg_counter++);

	subtilis_arm_add_signx(arm_s, SUBTILIS_ARM_INSTR_SXTB,
			       SUBTILIS_ARM_CCODE_AL, tmp, src,
			       SUBTILIS_ARM_SIGNX_ROR_NONE, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	subtilis_vfp_add_tran(arm_s, SUBTILIS_VFP_INSTR_FSITOD,
			      SUBTILIS_ARM_CCODE_AL, true, dest, tmp1, 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), %r12
movq 0x10(%r12), %rdi
callq 0x4b78a
movq %rax, %r15
movq 0x18(%r12), %rdi
callq 0x4b224
movq %rax, %rbp
movq (%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, (%rbx)
callq 0x4b224
movq %rax, %r13
movq 0x8(%rbx), %rdi
leaq 0x1(%rdi), %rax
movq %rax, 0x8(%rbx)
callq 0x4b78a
movq %rax, %r12
movq %r14, (%rsp)
pushq $0xe
popq %rdx
movq %rbx, %rdi
movl $0xa9, %esi
movq %r13, %rcx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0x4cd40
cmpl $0x0, (%r14)
jne 0x6658c
movq %r14, (%rsp)
pushq $0x5d
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r12, %r8
movq %r13, %r9
callq 0x58853
cmpl $0x0, (%r14)
jne 0x6658c
movq %r14, (%rsp)
pushq $0x51
popq %rsi
pushq $0xe
popq %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r15, %r8
movq %r12, %r9
callq 0x58813
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_gen_movfptoi32i32
void subtilis_vfp_gen_movfptoi32i32(subtilis_ir_section_t *s, size_t start,
				    void *user_data, subtilis_error_t *err)
{
	subtilis_arm_reg_t dest1;
	subtilis_arm_reg_t dest2;
	subtilis_arm_reg_t src;
	subtilis_arm_section_t *arm_s = user_data;
	subtilis_ir_inst_t *mov = &s->ops[start]->op.instr;

	dest1 = subtilis_arm_ir_to_arm_reg(mov->operands[0].reg);
	dest2 = subtilis_arm_ir_to_arm_reg(mov->operands[1].reg);
	src = subtilis_arm_ir_to_dreg(mov->operands[2].reg);

	subtilis_vfp_add_tran_dbl(arm_s, SUBTILIS_VFP_INSTR_FMRRD,
				  SUBTILIS_ARM_CCODE_AL, dest1, dest2, src, 0,
				  err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq 0x48(%rdi), %rax
movq (%rax,%rsi,8), %r13
movq 0x10(%r13), %rdi
callq 0x4b224
movq %rax, %r15
movq 0x18(%r13), %rdi
callq 0x4b224
movq %rax, %r12
movq 0x20(%r13), %rdi
callq 0x4b78a
pushq $0x7e
popq %rsi
pushq $0xe
popq %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
pushq %rbx
pushq $0x0
callq 0x5899a
popq %rax
popq %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markdryan[P]subtilis/arch/arm32/vfp_gen.c
// Function: subtilis_vfp_preserve_regs
size_t subtilis_vfp_preserve_regs(subtilis_arm_section_t *arm_s,
				  int save_real_start, subtilis_error_t *err)
{
	int i;
	subtilis_arm_instr_t *instr;
	subtilis_vfp_stran_instr_t *stran;
	size_t stf_site = INT_MAX;

	for (i = save_real_start; i < SUBTILIS_ARM_REG_MAX_VFP_DBL_REGS; i++) {
		instr = subtilis_arm_section_add_instr(
		    arm_s, SUBTILIS_VFP_INSTR_FSTD, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return INT_MAX;

		stran = &instr->operands.vfp_stran;
		stran->ccode = SUBTILIS_ARM_CCODE_NV;
		stran->dest = i;
		stran->base = 13;
		stran->offset = 2;
		stran->pre_indexed = true;
		stran->write_back = true;
		stran->subtract = true;
		if (stf_site == INT_MAX)
			stf_site = arm_s->last_op;
	}

	return stf_site;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rdi, %r15
movslq %esi, %r12
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
pushq $0x48
popq %rbp
cmpq $0xf, %r12
jg 0x6665c
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x4b93b
cmpl $0x0, (%r14)
jne 0x66657
movl $0xf, 0x8(%rax)
movq %r12, 0x10(%rax)
movq $0xd, 0x18(%rax)
movl $0x1010102, 0x20(%rax)  # imm = 0x1010102
cmpq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
jne 0x66652
movq 0x28(%r15), %rbx
incq %r12
jmp 0x66612
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq