LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/md5.c
// Function: md5_one
static void md5_one(const char *fn)
{
	unsigned char buf[4096], digest[16];
	MD5_CTX md5;
	int l;
	FILE *fp;

	fp = strcmp(fn, "-")? fopen(fn, "r") : stdin;
	if (fp == 0) {
		fprintf(stderr, "md5sum: %s: No such file or directory\n", fn);
		exit(1);
	}
	MD5Init(&md5);
	while ((l = fread(buf, 1, 4096, fp)) > 0)
		MD5Update(&md5, buf, l);
	MD5Final(digest, &md5);
	if (fp != stdin) fclose(fp);
	for (l = 0; l < 16; ++l)
		printf("%c%c", HEX_STR[digest[l]>>4&0xf], HEX_STR[digest[l]&0xf]);
	printf("  %s\n", fn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1078, %rsp           # imm = 0x1078
movq %rdi, %rbx
cmpb $0x2d, (%rdi)
jne 0x1afc
cmpb $0x0, 0x1(%rbx)
je 0x1bf2
leaq 0x51f(%rip), %rsi       # 0x2022
movq %rbx, %rdi
callq 0x1090
movq %rax, %r14
testq %r14, %r14
je 0x1c01
movaps 0x4f2(%rip), %xmm0      # 0x2010
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x70(%rsp), %rdi
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rcx
callq 0x1030
testl %eax, %eax
jle 0x1b77
leaq 0x10(%rsp), %r15
leaq 0x70(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x11ef
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rdi
movq %r14, %rcx
callq 0x1030
testl %eax, %eax
jg 0x1b51
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1a0b
movq 0x244d(%rip), %rax      # 0x3fd8
cmpq (%rax), %r14
je 0x1b98
movq %r14, %rdi
callq 0x1040
leaq 0x4b1(%rip), %r15       # 0x2050
leaq 0x4a5(%rip), %r14       # 0x204b
xorl %r12d, %r12d
movzbl (%rsp,%r12), %eax
movl %eax, %ecx
shrl $0x4, %ecx
movsbl (%rcx,%r15), %esi
andl $0xf, %eax
movsbl (%rax,%r15), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
incq %r12
cmpq $0x10, %r12
jne 0x1ba9
leaq 0x487(%rip), %rdi       # 0x2061
movq %rbx, %rsi
xorl %eax, %eax
addq $0x1078, %rsp           # imm = 0x1078
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1050
movq 0x23df(%rip), %rax      # 0x3fd8
movq (%rax), %r14
jmp 0x1b0e
movq %rbx, %rdi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_imm8_to_r0
void vm_insn_divb_imm8_imm8_to_r0(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_IMM8_TO_R0);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r0->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r0->val =
      !vm->regs->gp->r0->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x4c, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rdx
movslq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rax
movl %eax, 0x8(%rbx)
movb 0x1(%rdx,%rsi), %cl
leaq 0x2(%rsi), %rax
movl %eax, 0x8(%rbx)
movzbl 0x2(%rdx,%rsi), %eax
leaq 0x3(%rsi), %rdi
movl %edi, 0x8(%rbx)
movb 0x3(%rdx,%rsi), %dil
leaq 0x4(%rsi), %r8
movl %r8d, 0x8(%rbx)
movzbl 0x4(%rdx,%rsi), %esi
movl %esi, %edx
negl %edx
cmpb $-0x1, %dil
cmovel %edx, %esi
testw %si, %si
je 0x2235
movzwl %ax, %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %cl
cmovel %edx, %eax
cwtd
idivw %si
movzwl %ax, %ecx
movl %ecx, %edx
shrl $0xf, %edx
movq 0x18(%rbx), %rsi
movq (%rsi), %rsi
movq (%rsi), %rsi
movl %edx, 0x4(%rsi)
movzbl %al, %eax
movl $0x100, %edx            # imm = 0x100
subl %eax, %edx
testw %cx, %cx
cmovnsl %eax, %edx
movw %dx, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x116a
jmp 0x222e
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_imm8_to_r1
void vm_insn_divb_imm8_imm8_to_r1(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_IMM8_TO_R1);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r1->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r1->val =
      !vm->regs->gp->r1->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x4d, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rdx
movslq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rax
movl %eax, 0x8(%rbx)
movb 0x1(%rdx,%rsi), %cl
leaq 0x2(%rsi), %rax
movl %eax, 0x8(%rbx)
movzbl 0x2(%rdx,%rsi), %eax
leaq 0x3(%rsi), %rdi
movl %edi, 0x8(%rbx)
movb 0x3(%rdx,%rsi), %dil
leaq 0x4(%rsi), %r8
movl %r8d, 0x8(%rbx)
movzbl 0x4(%rdx,%rsi), %esi
movl %esi, %edx
negl %edx
cmpb $-0x1, %dil
cmovel %edx, %esi
testw %si, %si
je 0x22e0
movzwl %ax, %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %cl
cmovel %edx, %eax
cwtd
idivw %si
movzwl %ax, %ecx
movl %ecx, %edx
shrl $0xf, %edx
movq 0x18(%rbx), %rsi
movq (%rsi), %rsi
movq 0x8(%rsi), %rsi
movl %edx, 0x4(%rsi)
movzbl %al, %eax
movl $0x100, %edx            # imm = 0x100
subl %eax, %edx
testw %cx, %cx
cmovnsl %eax, %edx
movw %dx, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1199
jmp 0x22d9
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_imm8_to_r2
void vm_insn_divb_imm8_imm8_to_r2(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_IMM8_TO_R2);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r2->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r2->val =
      !vm->regs->gp->r2->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x4e, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rdx
movslq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rax
movl %eax, 0x8(%rbx)
movb 0x1(%rdx,%rsi), %cl
leaq 0x2(%rsi), %rax
movl %eax, 0x8(%rbx)
movzbl 0x2(%rdx,%rsi), %eax
leaq 0x3(%rsi), %rdi
movl %edi, 0x8(%rbx)
movb 0x3(%rdx,%rsi), %dil
leaq 0x4(%rsi), %r8
movl %r8d, 0x8(%rbx)
movzbl 0x4(%rdx,%rsi), %esi
movl %esi, %edx
negl %edx
cmpb $-0x1, %dil
cmovel %edx, %esi
testw %si, %si
je 0x238b
movzwl %ax, %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %cl
cmovel %edx, %eax
cwtd
idivw %si
movzwl %ax, %ecx
movl %ecx, %edx
shrl $0xf, %edx
movq 0x18(%rbx), %rsi
movq (%rsi), %rsi
movq 0x10(%rsi), %rsi
movl %edx, 0x4(%rsi)
movzbl %al, %eax
movl $0x100, %edx            # imm = 0x100
subl %eax, %edx
testw %cx, %cx
cmovnsl %eax, %edx
movw %dx, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x11c8
jmp 0x2384
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_imm8_to_r3
void vm_insn_divb_imm8_imm8_to_r3(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_IMM8_TO_R3);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r3->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r3->val =
      !vm->regs->gp->r3->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x4f, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rdx
movslq 0x8(%rbx), %rsi
leaq 0x1(%rsi), %rax
movl %eax, 0x8(%rbx)
movb 0x1(%rdx,%rsi), %cl
leaq 0x2(%rsi), %rax
movl %eax, 0x8(%rbx)
movzbl 0x2(%rdx,%rsi), %eax
leaq 0x3(%rsi), %rdi
movl %edi, 0x8(%rbx)
movb 0x3(%rdx,%rsi), %dil
leaq 0x4(%rsi), %r8
movl %r8d, 0x8(%rbx)
movzbl 0x4(%rdx,%rsi), %esi
movl %esi, %edx
negl %edx
cmpb $-0x1, %dil
cmovel %edx, %esi
testw %si, %si
je 0x2436
movzwl %ax, %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %cl
cmovel %edx, %eax
cwtd
idivw %si
movzwl %ax, %ecx
movl %ecx, %edx
shrl $0xf, %edx
movq 0x18(%rbx), %rsi
movq (%rsi), %rsi
movq 0x18(%rsi), %rsi
movl %edx, 0x4(%rsi)
movzbl %al, %eax
movl $0x100, %edx            # imm = 0x100
subl %eax, %edx
testw %cx, %cx
cmovnsl %eax, %edx
movw %dx, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x11f7
jmp 0x242f
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r0_to_r0
void vm_insn_divb_imm8_r0_to_r0(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R0_TO_R0);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r0->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r0->val)
                  : vm->regs->gp->r0->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r0->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r0->val =
      !vm->regs->gp->r0->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x5c, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq (%rcx), %rcx
movzwl (%rcx), %r8d
movzbl %r8b, %edi
negl %edi
cmpl $0x0, 0x4(%rcx)
cmovel %r8d, %edi
testw %di, %di
je 0x2bb1
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1226
jmp 0x2baa
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r0_to_r1
void vm_insn_divb_imm8_r0_to_r1(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R0_TO_R1);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r0->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r0->val)
                  : vm->regs->gp->r0->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r1->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r1->val =
      !vm->regs->gp->r1->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x5d, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq (%rcx), %r8
movzwl (%r8), %r9d
movzbl %r9b, %edi
negl %edi
cmpl $0x0, 0x4(%r8)
cmovel %r9d, %edi
testw %di, %di
je 0x2c4c
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movq 0x8(%rcx), %rcx
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1255
jmp 0x2c45
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r0_to_r2
void vm_insn_divb_imm8_r0_to_r2(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R0_TO_R2);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r0->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r0->val)
                  : vm->regs->gp->r0->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r2->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r2->val =
      !vm->regs->gp->r2->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x5e, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq (%rcx), %r8
movzwl (%r8), %r9d
movzbl %r9b, %edi
negl %edi
cmpl $0x0, 0x4(%r8)
cmovel %r9d, %edi
testw %di, %di
je 0x2ce7
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movq 0x10(%rcx), %rcx
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1284
jmp 0x2ce0
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r0_to_r3
void vm_insn_divb_imm8_r0_to_r3(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R0_TO_R3);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r0->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r0->val)
                  : vm->regs->gp->r0->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r3->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r3->val =
      !vm->regs->gp->r3->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x5f, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq (%rcx), %r8
movzwl (%r8), %r9d
movzbl %r9b, %edi
negl %edi
cmpl $0x0, 0x4(%r8)
cmovel %r9d, %edi
testw %di, %di
je 0x2d82
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movq 0x18(%rcx), %rcx
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x12b3
jmp 0x2d7b
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r1_to_r1
void vm_insn_divb_imm8_r1_to_r1(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R1_TO_R1);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r1->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r1->val)
                  : vm->regs->gp->r1->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r1->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r1->val =
      !vm->regs->gp->r1->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x6d, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
movzwl (%rcx), %r8d
movzbl %r8b, %edi
negl %edi
cmpl $0x0, 0x4(%rcx)
cmovel %r8d, %edi
testw %di, %di
je 0x35a2
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1311
jmp 0x359b
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r2_to_r0
void vm_insn_divb_imm8_r2_to_r0(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R2_TO_R0);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r2->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r2->val)
                  : vm->regs->gp->r2->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r0->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r0->val =
      !vm->regs->gp->r0->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x7c, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq 0x10(%rcx), %r8
movzwl (%r8), %r9d
movzbl %r9b, %edi
negl %edi
cmpl $0x0, 0x4(%r8)
cmovel %r9d, %edi
testw %di, %di
je 0x3e63
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movq (%rcx), %rcx
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x139e
jmp 0x3e5c
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_divb_imm8_r2_to_r3
void vm_insn_divb_imm8_r2_to_r3(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_DIVB_IMM8_R2_TO_R3);

  short op1 = vm_insn_read_byte(vm) == 0xff
                  ? VM_NEGATE_BYTE(vm_insn_read_byte(vm))
                  : vm_insn_read_byte(vm);

  short op2 = vm->regs->gp->r2->is_negative
                  ? VM_NEGATE_BYTE(vm->regs->gp->r2->val)
                  : vm->regs->gp->r2->val;

  if (!op2) {
    fprintf(stderr, "Division by zero.\n");
    return;
  }

  short res = op1 / op2;

  vm->regs->gp->r3->is_negative = ((short)res < 0) ? 1 : 0;
  vm->regs->gp->r3->val =
      !vm->regs->gp->r3->is_negative
          ? VM_ALIGN_TO_BYTE((unsigned short)res)
          : 0xff - (VM_ALIGN_TO_BYTE((unsigned short)res) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x7f, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movslq 0x8(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movl %esi, 0x8(%rbx)
movb 0x1(%rax,%rdx), %sil
addq $0x2, %rdx
movl %edx, 0x8(%rbx)
movq (%rcx), %rcx
movq 0x10(%rcx), %r8
movzwl (%r8), %r9d
movzbl %r9b, %edi
negl %edi
cmpl $0x0, 0x4(%r8)
cmovel %r9d, %edi
testw %di, %di
je 0x4032
movzbl (%rax,%rdx), %eax
movl %eax, %edx
negl %edx
cmpb $-0x1, %sil
cmovel %edx, %eax
cwtd
idivw %di
movzwl %ax, %edx
movl %edx, %esi
shrl $0xf, %esi
movq 0x18(%rcx), %rcx
movl %esi, 0x4(%rcx)
movzbl %al, %eax
movl $0x100, %esi            # imm = 0x100
subl %eax, %esi
testw %dx, %dx
cmovnsl %eax, %esi
movw %si, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x142b
jmp 0x402b
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_print_imm8
void vm_insn_print_imm8(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_PRINT_IMM8);

  vm_value_t *val = vm_value_create();
  val->is_negative = vm_insn_read_byte(vm) == 0xff ? 1 : 0;
  val->val = VM_ALIGN_TO_BYTE(vm_insn_read_byte(vm));

  printf("%d\n", !val->is_negative ? val->val : VM_NEGATE_BYTE(val->val));
  vm_value_destroy(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movl $0x20, %esi
callq 0x45c3
movq %rax, 0x20(%r14)
callq 0x4540
movq %rax, %rbx
movq (%r14), %rax
movslq 0x8(%r14), %rcx
leaq 0x1(%rcx), %rdx
movl %edx, 0x8(%r14)
movb 0x1(%rax,%rcx), %dl
xorl %esi, %esi
cmpb $-0x1, %dl
sete %sil
movl %esi, 0x4(%rbx)
leaq 0x2(%rcx), %rsi
movl %esi, 0x8(%r14)
movzbl 0x2(%rax,%rcx), %eax
movzwl %ax, %eax
movl %eax, %esi
xorl $0xff, %esi
addl $0xffffff01, %esi       # imm = 0xFFFFFF01
cmpb $-0x1, %dl
movw %ax, (%rbx)
cmovnel %eax, %esi
leaq 0xd1b(%rip), %rdi       # 0x5017
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4579
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_print_r0
void vm_insn_print_r0(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_PRINT_R0);

  printf("%d\n", !vm->regs->gp->r0->is_negative
                     ? vm->regs->gp->r0->val
                     : (vm->regs->gp->r0->val <= 0xff)
                           ? VM_NEGATE_BYTE(vm->regs->gp->r0->val)
                           : VM_NEGATE_WORD(vm->regs->gp->r0->val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x21, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rax
movzwl (%rax), %ecx
movl %ecx, %esi
negl %esi
cmpl $0x0, 0x4(%rax)
cmovel %ecx, %esi
leaq 0xcce(%rip), %rdi       # 0x5017
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_print_r1
void vm_insn_print_r1(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_PRINT_R1);

  printf("%d\n", !vm->regs->gp->r1->is_negative
                     ? vm->regs->gp->r1->val
                     : (vm->regs->gp->r1->val <= 0xff)
                           ? VM_NEGATE_BYTE(vm->regs->gp->r1->val)
                           : VM_NEGATE_WORD(vm->regs->gp->r1->val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x22, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movzwl (%rax), %ecx
movl %ecx, %esi
negl %esi
cmpl $0x0, 0x4(%rax)
cmovel %ecx, %esi
leaq 0xc86(%rip), %rdi       # 0x5017
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_print_r2
void vm_insn_print_r2(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_PRINT_R2);

  printf("%d\n", !vm->regs->gp->r2->is_negative
                     ? vm->regs->gp->r2->val
                     : (vm->regs->gp->r2->val <= 0xff)
                           ? VM_NEGATE_BYTE(vm->regs->gp->r2->val)
                           : VM_NEGATE_WORD(vm->regs->gp->r2->val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x23, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movzwl (%rax), %ecx
movl %ecx, %esi
negl %esi
cmpl $0x0, 0x4(%rax)
cmovel %ecx, %esi
leaq 0xc3e(%rip), %rdi       # 0x5017
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/insn.c
// Function: vm_insn_print_r3
void vm_insn_print_r3(vm_t *vm) {
  vm->state = vm_state_insert(vm->state, VM_INSN_PRINT_R3);

  printf("%d\n", !vm->regs->gp->r3->is_negative
                     ? vm->regs->gp->r3->val
                     : (vm->regs->gp->r3->val <= 0xff)
                           ? VM_NEGATE_BYTE(vm->regs->gp->r3->val)
                           : VM_NEGATE_WORD(vm->regs->gp->r3->val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl $0x24, %esi
callq 0x45c3
movq %rax, 0x20(%rbx)
movq 0x18(%rbx), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movzwl (%rax), %ecx
movl %ecx, %esi
negl %esi
cmpl $0x0, 0x4(%rax)
cmovel %ecx, %esi
leaq 0xbf6(%rip), %rdi       # 0x5017
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1050
nop
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/regs.c
// Function: vm_regs_init
vm_regs_t *vm_regs_init(void) {
  vm_regs_t *regs = calloc(1, sizeof(vm_regs_t));
  assert(regs != NULL);

  regs->gp = vm_gp_regs_init();
  return regs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movl $0x8, %esi
callq 0x10a0
testq %rax, %rax
je 0x445f
movq %rax, %rbx
callq 0x447e
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xbcd(%rip), %rdi       # 0x5033
leaq 0xbd3(%rip), %rsi       # 0x5040
leaq 0xbd7(%rip), %rcx       # 0x504b
movl $0x8, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/regs.c
// Function: vm_gp_regs_init
vm_gp_regs_t *vm_gp_regs_init(void) {
  vm_gp_regs_t *gp = calloc(1, sizeof(vm_gp_regs_t));
  assert(gp != NULL);

  gp->r0 = vm_value_create();
  gp->r1 = vm_value_create();
  gp->r2 = vm_value_create();
  gp->r3 = vm_value_create();
  return gp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
testq %rax, %rax
je 0x44c8
movq %rax, %rbx
callq 0x4540
movq %rax, (%rbx)
callq 0x4540
movq %rax, 0x8(%rbx)
callq 0x4540
movq %rax, 0x10(%rbx)
callq 0x4540
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xb9a(%rip), %rdi       # 0x5069
leaq 0xb6a(%rip), %rsi       # 0x5040
leaq 0xb97(%rip), %rcx       # 0x5074
movl $0x15, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/value.c
// Function: vm_value_create
vm_value_t *vm_value_create(void) {
  vm_value_t *ret = calloc(1, sizeof(vm_value_t));
  assert(ret != NULL);

  ret->val = 0;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
movl $0x8, %esi
callq 0x10a0
testq %rax, %rax
je 0x455a
popq %rbp
retq
leaq 0xb37(%rip), %rdi       # 0x5098
leaq 0xb3c(%rip), %rsi       # 0x50a4
leaq 0xb41(%rip), %rcx       # 0x50b0
movl $0x8, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_state_create
vm_state_t *vm_state_create(void) {
  vm_state_t *ret = calloc(1, sizeof(vm_state_t));
  assert(ret != NULL);

  ret->opcode = -1;
  ret->next = NULL;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
movl $0x10, %esi
callq 0x10a0
testq %rax, %rax
je 0x45a4
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
popq %rbp
retq
leaq 0xaed(%rip), %rdi       # 0x5098
leaq 0xf62(%rip), %rsi       # 0x5514
leaq 0xf64(%rip), %rcx       # 0x551d
movl $0xa, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_state_insert
vm_state_t *vm_state_insert(vm_state_t *state, int opcode) {
  if (state == NULL) {
    return NULL;
  }

  vm_state_t *tmp = (vm_state_t *)state;
  vm_state_t *new;

  while (tmp->next != NULL) {
    tmp = tmp->next;
  }

  new = vm_state_create();
  new->opcode = opcode;
  new->next = tmp->next;
  tmp->next = new;
  return state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x45fb
movl %esi, %r14d
movq %rbx, %rax
movq %rax, %r15
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x45db
callq 0x4584
movl %r14d, (%rax)
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x8(%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_stack_create
vm_stack_t *vm_stack_create(void) {
  vm_stack_t *ret = calloc(1, sizeof(vm_stack_t));
  assert(ret != NULL);

  ret->value = NULL;
  ret->next = NULL;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
movl $0x10, %esi
callq 0x10a0
testq %rax, %rax
je 0x4649
popq %rbp
retq
leaq 0xa48(%rip), %rdi       # 0x5098
leaq 0xebd(%rip), %rsi       # 0x5514
leaq 0xee1(%rip), %rcx       # 0x553f
movl $0x2f, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_stack_push
vm_stack_t *vm_stack_push(vm_stack_t *stack, vm_value_t *value) {
  if (stack == NULL) {
    return NULL;
  }

  vm_stack_t *new = vm_stack_create();
  new->next = stack->next;
  new->value = value;
  stack->next = new;
  return stack;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x468e
movq %rsi, %r14
callq 0x462f
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %r14, (%rax)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_init
vm_t *vm_init(char *buf, size_t len) {
  vm_t *vm = calloc(1, sizeof(vm_t));
  assert(vm != NULL);

  vm->buf = strdup(buf);
  vm->ip = -1;
  vm->is_error = 0;
  vm->buflen = len;
  vm->regs = vm_regs_init();
  vm->state = vm_state_create();
  vm->stack = vm_stack_create();
  return vm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x30, %esi
callq 0x10a0
testq %rax, %rax
je 0x473d
movq %rax, %rbx
movq %r15, %rdi
callq 0x1100
movq %rax, (%rbx)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq %r14, 0x10(%rbx)
callq 0x4430
movq %rax, 0x18(%rbx)
callq 0x4584
movq %rax, 0x20(%rbx)
callq 0x462f
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe1d(%rip), %rdi       # 0x5561
leaq 0xdc9(%rip), %rsi       # 0x5514
leaq 0xe1a(%rip), %rcx       # 0x556c
movl $0x52, %edx
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/src/vm.c
// Function: vm_destroy
void vm_destroy(vm_t *vm) {
  vm_stack_destroy(vm->stack);
  vm_state_destroy(vm->state);
  vm_regs_destroy(vm->regs);

  vm->ip = -1;

  free(vm->buf);
  free(vm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x1030
movq 0x20(%rbx), %rdi
callq 0x4609
movq 0x18(%rbx), %rdi
callq 0x44e7
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/plvhx[P]dummy-vm/dispatcher.c
// Function: main
int main(int argc, char **argv) {
  int opt;

  if (argc == 1) {
    fprintf(stderr, "Usage: %s -f <filename>.cplx\n", argv[0]);
    return 1;
  }

  while ((opt = getopt(argc, argv, "f:")) != -1) {
    switch (opt) {
    case 'f':
      vm_runner_run_file(optarg);
      break;
    default:
      fprintf(stderr, "Usage: %s -f <filename>.cplx\n", argv[0]);
      return 1;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
cmpl $0x1, %edi
je 0x4fb0
movl %edi, %r14d
movl %r14d, %edi
movq %rbx, %rsi
leaq 0x710(%rip), %rdx       # 0x55a8
callq 0x10e0
cmpl $0x66, %eax
jne 0x4f97
movq 0x312b(%rip), %rax      # 0x7fd8
movq (%rax), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10c0
testl %eax, %eax
js 0x4f53
movl %eax, %r12d
movl $0x90, %edx
leaq -0xb8(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movl %r12d, %edi
movq %r15, %rsi
callq 0x1110
testl %eax, %eax
js 0x4f64
movq -0x88(%rbp), %r13
movl $0x1, %esi
movq %r13, %rdi
callq 0x10a0
testq %rax, %rax
je 0x4f75
movq %rax, %r15
movl %r12d, %edi
movq %rax, %rsi
movq %r13, %rdx
callq 0x1090
testq %rax, %rax
js 0x4f86
movq %r15, %rdi
callq 0x1040
movq %r15, %rdi
movq %rax, %rsi
callq 0x46d7
movq %rax, %r13
movq %rax, %rdi
callq 0x475c
movq %r13, %rdi
callq 0x4e27
movq %r15, %rdi
callq 0x1030
movl %r12d, %edi
callq 0x1080
jmp 0x4e8b
leaq 0x651(%rip), %rdi       # 0x55ab
callq 0x10d0
jmp 0x4e8b
leaq 0x64e(%rip), %rdi       # 0x55b9
callq 0x10d0
jmp 0x4e8b
leaq 0x64c(%rip), %rdi       # 0x55c8
callq 0x10d0
jmp 0x4e8b
leaq 0x64b(%rip), %rdi       # 0x55d8
callq 0x10d0
jmp 0x4e8b
cmpl $-0x1, %eax
jne 0x4fb0
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x145a
movl $0x1, %eax
jmp 0x4f9e
// File: /workspace/github_c_makefile_star2_O3/nilyang[P]redis-tdd-annotation/src/redis-benchmark.c
// Function: showThroughput
int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData) {
    REDIS_NOTUSED(eventLoop);
    REDIS_NOTUSED(id);
    REDIS_NOTUSED(clientData);

    if (config.csv) return 250;
    float dt = (float)(mstime()-config.start)/1000.0;
    float rps = (float)config.requests_finished/dt;
    printf("%s: %.2f\r", config.title, rps);
    fflush(stdout);
    return 250; /* every 250ms */
}

// Assembly:
cmpl $0x0, 0x2af9f(%rip)     # 0x36444
jne 0xb533
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x91f0
imulq $0x3e8, (%rbx), %rcx    # imm = 0x3E8
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%rbx)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
addq %rcx, %rdx
subq 0x2af2e(%rip), %rdx     # 0x36418
cvtsi2ss %rdx, %xmm0
divss 0x1dcbd(%rip), %xmm0    # 0x291b4
cvtsi2ssl 0x2aef9(%rip), %xmm1 # 0x363f8
divss %xmm0, %xmm1
movq 0x2af26(%rip), %rsi     # 0x36430
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x1dd00(%rip), %rdi     # 0x29218
movb $0x1, %al
callq 0x91b0
movq 0x2aa8a(%rip), %rax     # 0x35fb0
movq (%rax), %rdi
callq 0x9390
addq $0x10, %rsp
popq %rbx
movl $0xfa, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/nilyang[P]redis-tdd-annotation/src/redis-benchmark.c
// Function: createMissingClients
static void createMissingClients(client c) {
    int n = 0;
    char *buf = c->obuf;
    size_t buflen = sdslen(c->obuf);

    /* If we are cloning from a client with a SELECT prefix, skip it since the
     * client will be created with the prefixed SELECT if needed. */
    if (c->selectlen) {
        buf += c->selectlen;
        buflen -= c->selectlen;
    }

    while(config.liveclients < config.numclients) {
        createClient(NULL,0,c);

        /* Listen backlog is quite limited on most systems */
        if (++n > 64) {
            usleep(50000);
            n = 0;
        }
    }
}

// Assembly:
movl 0x2a4d7(%rip), %eax     # 0x363ec
cmpl 0x2a4cd(%rip), %eax     # 0x363e8
jge 0xbf60
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xbc8e
cmpl $0x40, %r14d
jge 0xbf3e
incl %r14d
jmp 0xbf4b
movl $0xc350, %edi           # imm = 0xC350
callq 0x95e0
xorl %r14d, %r14d
movl 0x2a49b(%rip), %eax     # 0x363ec
cmpl 0x2a491(%rip), %eax     # 0x363e8
jl 0xbf27
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/ipc_sync/main.c
// Function: main
int
main(int argc, char * argv[])
{
	int num;

	WARNP_INIT;

	/* Parse command-line argument. */
	if (argc != 2) {
		fprintf(stderr, "usage: test_ipc_sync NUM\n");
		exit(1);
	}
	if (PARSENUM(&num, argv[1], 0, sizeof(tests) / sizeof(tests[0]) - 1)) {
		warnp("parsenum");
		goto err0;
	}

	/* Run the specified test. */
	if (check(&tests[num]))
		goto err0;

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x143a
callq 0x1c28
cmpl $0x2, %ebx
jne 0x1472
callq 0x1070
movl $0x0, (%rax)
movq 0x8(%r14), %r15
testq %r15, %r15
jne 0x1494
leaq 0xbcd(%rip), %rdi       # 0x2027
leaq 0xbd0(%rip), %rsi       # 0x2031
leaq 0xbdf(%rip), %rcx       # 0x2047
movl $0xa7, %edx
callq 0x10d0
movq 0x2b7f(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xb81(%rip), %rdi       # 0x2004
movl $0x19, %esi
movl $0x1, %edx
callq 0x11c0
jmp 0x14de
movq %rax, %rbx
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1040
movq %rax, %r14
movq (%r12), %rcx
movl $0x16, %eax
cmpq %r15, %rcx
je 0x14c8
cmpb $0x0, (%rcx)
jne 0x14c8
movl $0x22, %eax
cmpq $0x8, %r14
jb 0x14e8
movl %eax, (%rbx)
leaq 0xb4d(%rip), %rdi       # 0x201e
xorl %eax, %eax
callq 0x1ca8
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x11b0
cmpl $0x0, (%rbx)
jne 0x14ca
callq 0x1834
testq %rax, %rax
je 0x14de
movq %rax, %rbx
leaq (%r14,%r14,2), %rax
leaq 0xbfb(%rip), %rcx       # 0x2100
leaq (%rcx,%rax,4), %r14
movq %rsp, %rsi
movq %rbx, 0x8(%rsi)
movl (%r14), %eax
movl 0x8(%r14), %ecx
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
leaq 0x6d(%rip), %rdi        # 0x1590
callq 0x172c
cmpl $-0x1, %eax
je 0x14de
movl %eax, %ebp
callq 0x10b0
movslq %eax, %rsi
leaq 0xb4e(%rip), %rdi       # 0x208c
leaq 0xb4f(%rip), %rdx       # 0x2094
xorl %eax, %eax
callq 0x10c0
xorl %esi, %esi
cmpl $0x0, (%r14)
sete %sil
movl 0x4(%r14), %edx
movq %rbx, %rdi
callq 0x1625
testl %eax, %eax
jne 0x14de
movl %ebp, %edi
callq 0x178e
testl %eax, %eax
jne 0x14de
movq %rbx, %rdi
callq 0x1a72
testl %eax, %eax
jne 0x14de
xorl %edi, %edi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/ipc_sync/main.c
// Function: child
static int
child(void * cookie)
{
	struct child_info * ci = cookie;

	PRINT_PID("post-fork child");

	/* Wait or signal, optionally with a prep. */
	if (wait_or_signal(ci->IS, ci->wait, ci->prep))
		goto err1;

	/* Clean up. */
	if (ipc_sync_done(ci->IS))
		goto err0;

	/* Ensure that we've finished writing to stdout. */
	if (fflush(stdout)) {
		warnp("fflush");
		goto err0;
	}

	/* Success! */
	return (0);

err1:
	if (ipc_sync_done(ci->IS))
		goto err0;
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x10b0
movslq %eax, %rsi
leaq 0xae6(%rip), %rdi       # 0x208c
leaq 0xaf8(%rip), %rdx       # 0x20a5
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10c0
movq 0x8(%r14), %rdi
movl (%r14), %esi
movl 0x4(%r14), %edx
callq 0x1625
movl %eax, %ebp
movq 0x8(%r14), %rdi
callq 0x1a72
orl %ebp, %eax
jne 0x1619
movq 0x29fc(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x1160
testl %eax, %eax
je 0x161e
callq 0x1070
cmpl $0x0, (%rax)
je 0x160b
movq %rax, %rbx
leaq 0xab9(%rip), %rdi       # 0x20b5
xorl %eax, %eax
callq 0x1ca8
movl $0x0, (%rbx)
jmp 0x1619
leaq 0xaa3(%rip), %rdi       # 0x20b5
xorl %eax, %eax
callq 0x1dc7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/ipc_sync/main.c
// Function: wait_or_signal
static int
wait_or_signal(struct ipc_sync * ip, int which, int prep)
{

	/* Are we going to wait, or signal? */
	if (which) {
		/* If desired, prep for a wait. */
		if (prep) {
			PRINT_PID("_wait_prep");
			if (ipc_sync_wait_prep(ip))
				goto err0;
		}

		/* Wait. */
		PRINT_PID("_wait");
		if (ipc_sync_wait(ip))
			goto err0;
		PRINT_PID("finished _wait");
	} else {
		/* If desired, prep for a signal. */
		if (prep) {
			PRINT_PID("_signal_prep");
			if (ipc_sync_signal_prep(ip))
				goto err0;
		}

		/* Signal. */
		PRINT_PID("_signal");
		if (ipc_sync_signal(ip))
			goto err0;
		PRINT_PID("finished _signal");
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x16a0
testl %edx, %edx
je 0x1665
callq 0x10b0
movslq %eax, %rsi
leaq 0xa4a(%rip), %rdi       # 0x208c
leaq 0xa73(%rip), %rdx       # 0x20bc
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rdi
callq 0x1a61
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1722
callq 0x10b0
movslq %eax, %rsi
leaq 0xa18(%rip), %rdi       # 0x208c
leaq 0xa55(%rip), %rdx       # 0x20d0
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rdi
callq 0x18d5
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1722
leaq 0xa29(%rip), %rbx       # 0x20c7
jmp 0x1707
testl %edx, %edx
je 0x16d2
callq 0x10b0
movslq %eax, %rsi
leaq 0x9d9(%rip), %rdi       # 0x208c
leaq 0xa1c(%rip), %rdx       # 0x20d6
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rdi
callq 0x1a6b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1722
callq 0x10b0
movslq %eax, %rsi
leaq 0x9ab(%rip), %rdi       # 0x208c
leaq 0xa04(%rip), %rdx       # 0x20ec
xorl %eax, %eax
callq 0x10c0
movq %rbx, %rdi
callq 0x19ed
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1722
leaq 0x9dc(%rip), %rbx       # 0x20e3
callq 0x10b0
movslq %eax, %rsi
leaq 0x976(%rip), %rdi       # 0x208c
xorl %ebp, %ebp
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10c0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nbb.c
// Function: nbb_nameserver_connect
int nbb_nameserver_connect(const char* request, char** ret, int* ret_len)
{
  int nameserver_pid = 0;
  FILE* pFile;
  int retval;
  char* recv;
  size_t recv_len;

  // Sanity check to isolate errors faster
  assert(request != NULL && ret != NULL && ret_len != NULL);
  *ret = NULL;
  *ret_len = 0;

  // Should be reversed since what's written by service is read by nameserver
  if(nbb_open_channel(NULL, NAMESERVER_WRITE, NAMESERVER_READ, !IPC_CREAT)) {
    return -1;
  }

  pFile = fopen(NAMESERVER_PID_FILE, "r+"); 
  fscanf(pFile,"%d",&nameserver_pid); 
  fclose(pFile); 

  nbb_insert_item(0, request, strlen(request));
  kill(nameserver_pid, SIGUSR1);

  // Poll until we get something
  do{ 
    retval = nbb_read_item(0, (void**)&recv, &recv_len);
  } while (retval == BUFFER_EMPTY || retval == BUFFER_EMPTY_PRODUCER_INSERTING);

  // Set return values
  *ret = recv;
  *ret_len = recv_len;

  // No errors, we're happy
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl $0x0, 0xc(%rsp)
testq %rdi, %rdi
je 0x171b
movq %rsi, %r14
testq %rsi, %rsi
je 0x171b
movq %rdx, %rbx
testq %rdx, %rdx
je 0x171b
movq %rdi, %r15
movq $0x0, (%r14)
movl $0x0, (%rbx)
xorl %edi, %edi
movl $0xfa0, %esi            # imm = 0xFA0
movl $0xfa1, %edx            # imm = 0xFA1
xorl %ecx, %ecx
callq 0x173a
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x170d
leaq 0x2405(%rip), %rdi      # 0x3a90
leaq 0x1b42(%rip), %rsi      # 0x31d4
callq 0x11a0
movq %rax, %r12
leaq 0x197c(%rip), %rsi      # 0x301d
leaq 0xc(%rsp), %r13
movq %rax, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1050
movq %r12, %rdi
callq 0x10a0
movq %r15, %rdi
callq 0x10b0
xorl %edi, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x190b
movl (%r13), %edi
movl $0xa, %esi
callq 0x1150
leaq 0x18(%rsp), %r15
leaq 0x10(%rsp), %r12
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ace
addl $-0x3, %eax
cmpl $0x2, %eax
jb 0x16e8
movq 0x18(%rsp), %rax
movq %rax, (%r14)
movl 0x10(%rsp), %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a41(%rip), %rdi      # 0x3163
leaq 0x1a6c(%rip), %rsi      # 0x3195
leaq 0x1a6b(%rip), %rcx      # 0x319b
movl $0x1c, %edx
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/umbrant[P]Non-blocking-Buffers/nbb.c
// Function: nbb_read_item
int nbb_read_item(int channel_id, void** ptr_to_item, size_t* size)
{
	struct buffer *buf = channel_list[channel_id].read;
	unsigned char *data_buf = channel_list[channel_id].read_data;
  unsigned short temp_uc = buf->update_counter;

  assert(channel_id >= 0 && channel_id < SERVICE_MAX_CHANNELS);
  assert(ptr_to_item != NULL && size != NULL);

  *ptr_to_item = NULL;
  *size = 0;

  if(channel_id < 0) {
    printf("! nbb_read_item(): invalid channel_id %d\n", channel_id);
    return -1;
  }

  if(size < 0) {
    printf("! nbb_read_item(): invalid size %lu\n", *size);
    return -1;
  }

  if (temp_uc == buf->last_ack_counter) {
    return BUFFER_EMPTY; 
  }

  if ((temp_uc - buf->last_ack_counter) == 1) {
    return BUFFER_EMPTY_PRODUCER_INSERTING;
  }

  buf->ack_counter = buf->last_ack_counter + 1;

  // Copy out the value to malloc'd mem in our address space
  struct channel_item* tmp = 
				&(buf->items[((buf->last_ack_counter / 2) % BUFFER_SIZE)]);
  *ptr_to_item = malloc(tmp->size);
  memcpy(*ptr_to_item, data_buf+tmp->offset, tmp->size);
	*size = tmp->size;

  //printf("nbb_read_item ret pointer %x\n", ref_to_item);
  //printf("nbb_read_item ret pointer %x -> %d\n", ref_to_item, *ref_to_item);
  buf->ack_counter = buf->last_ack_counter + 2;
  buf->last_ack_counter = buf->ack_counter;

  return OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0xf, %edi
jae 0x1b99
movq %rsi, %r14
testq %rsi, %rsi
je 0x1bb8
movq %rdx, %rbx
testq %rdx, %rdx
je 0x1bb8
movslq %edi, %rax
imulq $0x58, %rax, %rax
leaq 0x4638(%rip), %rcx      # 0x6140
movq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %r15
movzwl 0x4(%r13), %ecx
xorl %eax, %eax
movq %rax, (%r14)
movq %rax, (%rbx)
movzwl 0x2(%r13), %ebp
movl $0x3, %eax
cmpw %bp, %cx
je 0x1b8a
subl %ebp, %ecx
movl $0x4, %eax
cmpl $0x1, %ecx
je 0x1b8a
leal 0x1(%rbp), %eax
movw %ax, (%r13)
movl %ebp, %r12d
andl $0x1fe, %r12d           # imm = 0x1FE
movzwl 0x10(%r13,%r12,2), %edi
movq %rdi, (%rsp)
callq 0x1160
movq %rax, (%r14)
movzwl 0xe(%r13,%r12,2), %ecx
addq %rcx, %r15
movq %rax, %rdi
movq %r15, %rsi
movq (%rsp), %r14
movq %r14, %rdx
callq 0x1130
movq %r14, (%rbx)
leal 0x2(%rbp), %eax
movw %ax, (%r13)
movw %ax, 0x2(%r13)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c92(%rip), %rdi      # 0x3832
leaq 0x15ee(%rip), %rsi      # 0x3195
leaq 0x1d31(%rip), %rcx      # 0x38df
movl $0x2ab, %edx            # imm = 0x2AB
callq 0x10d0
leaq 0x1d4a(%rip), %rdi      # 0x3909
leaq 0x15cf(%rip), %rsi      # 0x3195
leaq 0x1d12(%rip), %rcx      # 0x38df
movl $0x2ac, %edx            # imm = 0x2AC
callq 0x10d0