LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal.c
// Function: fesital
void fesital(FILE *ifile, FILE *ofile, int op)
{
  uint32_t keys[ROUNDS] = { 0xDEAD, 0xBEEF, 0xBAAD, 0xF00D, 0xFEED, 0xFACE, 0xCAFE, 0xBABE, 0xDEAD, 0xBABE, 0xD15, 0xEA5E, 0xDECE, 0xA5ED, 0xBAAD, 0xAC1D };
  char *key = getKey();
  if(!generateSubKeys(key, keys)){
    help();
    printf("Error: key generation getting failed\n");
    return;
  }
  switch(op){
    case 0:
      encrypt_ecb(ifile, ofile, keys);
      printf("Encrypted file is generated\n");
      break;
    case 1:
      decrypt_ecb(ifile, ofile, keys);
      printf("Decrypted file is generated\n");
      break;
    default:
      printf("Invalid option\n");
      break;
  }
  free(key);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movaps 0xf91(%rip), %xmm0      # 0x21e0
leaq 0x20(%rsp), %r12
movaps %xmm0, 0x30(%r12)
movaps 0xf6f(%rip), %xmm0      # 0x21d0
movaps %xmm0, 0x20(%r12)
movaps 0xf52(%rip), %xmm0      # 0x21c0
movaps %xmm0, 0x10(%r12)
movaps 0xf35(%rip), %xmm0      # 0x21b0
movaps %xmm0, (%r12)
pushq $0x1
popq %rdi
pushq $0xa
popq %rsi
callq 0x10a0
leaq 0x18(%rsp), %r13
movq %rax, (%r13)
leaq 0x10(%rsp), %rbx
movq $0xa, (%rbx)
leaq 0xd8f(%rip), %rdi       # 0x2036
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1080
movq 0x2d28(%rip), %rax      # 0x3fe0
movq (%rax), %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x10d0
movq (%r13), %rbx
movq %rbx, %rdi
callq 0x1070
cmpq $0x9, %rax
cmoveq %rbx, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x14d8
testl %eax, %eax
je 0x130d
cmpl $0x1, %ebp
je 0x1320
testl %ebp, %ebp
jne 0x133b
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x1360
leaq 0xe6b(%rip), %rdi       # 0x2176
jmp 0x1342
callq 0x11fc
leaq 0xe1c(%rip), %rdi       # 0x2135
callq 0x1040
jmp 0x134f
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x141c
leaq 0xe21(%rip), %rdi       # 0x215a
jmp 0x1342
leaq 0xe50(%rip), %rdi       # 0x2192
callq 0x1040
movq %r14, %rdi
callq 0x1030
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal_encrypt.c
// Function: encrypt_ecb
void encrypt_ecb(FILE *infile, FILE *outfile, uint32_t keys[])
{
  uint32_t left, right;
  size_t ret;
  uint64_t sblock;
  memset(&sblock,0,sizeof(sblock));
  while(fread(&sblock, sizeof(sblock), 1, infile)){    
    left = (sblock>>32);
    right = ((sblock<<32)>>32);
    sblock = encrypt(left, right, keys);
    fwrite(&sblock,1,sizeof(sblock), outfile);
    memset(&sblock,0,sizeof(sblock));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsp, %r14
pushq $0x8
popq %r15
pushq $0x1
popq %rbp
andq $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
callq 0x1050
testq %rax, %rax
je 0x140b
movq %r14, %r15
movq (%rsp), %r14
movq %r14, %r12
shrq $0x20, %r12
pushq $-0x10
popq %r13
testq %r13, %r13
je 0x13de
movl 0x40(%rbx,%r13,4), %esi
movl %r14d, %edi
callq 0x14ff
xorl %r12d, %eax
incq %r13
movl %eax, %ecx
cmovel %r14d, %ecx
cmovnel %r14d, %eax
movl %ecx, %r14d
movl %eax, %r12d
jmp 0x13b4
shlq $0x20, %r12
movl %r14d, %eax
orq %r12, %rax
movq %rax, (%rsp)
movq %r15, %r14
movq %r15, %rdi
movq %rbp, %rsi
pushq $0x8
popq %r15
movq %r15, %rdx
movq 0x8(%rsp), %rcx
callq 0x10e0
jmp 0x1385
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/feistal_decrypt.c
// Function: decrypt_ecb
void decrypt_ecb(FILE *infile, FILE *outfile, uint32_t keys[])
{
  uint32_t left, right;
  size_t ret;
  uint64_t sblock;
  memset(&sblock, 0, sizeof(sblock));
  while(fread(&sblock, sizeof(sblock), 1, infile)){
    left = (sblock>>32);
    right = (sblock<<32)>>32;
    sblock = decrypt(left, right, keys);
    fwrite(&sblock, 1, sizeof(sblock), outfile);
    memset(&sblock, 0, sizeof(sblock));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsp, %r14
pushq $0x8
popq %r15
pushq $0x1
popq %rbp
andq $0x0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
callq 0x1050
testq %rax, %rax
je 0x14c8
movq %r14, %r15
movq (%rsp), %r14
movq %r14, %r12
shrq $0x20, %r12
pushq $0xf
popq %r13
cmpq $-0x1, %r13
je 0x149b
movl (%rbx,%r13,4), %esi
movl %r14d, %edi
callq 0x14ff
xorl %r12d, %eax
subq $0x1, %r13
movl %eax, %ecx
cmovbl %r14d, %ecx
cmovael %r14d, %eax
movl %ecx, %r14d
movl %eax, %r12d
jmp 0x1470
shlq $0x20, %r12
movl %r14d, %eax
orq %r12, %rax
movq %rax, (%rsp)
movq %r15, %r14
movq %r15, %rdi
movq %rbp, %rsi
pushq $0x8
popq %r15
movq %r15, %rdx
movq 0x8(%rsp), %rcx
callq 0x10e0
jmp 0x1441
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/keymgmt.c
// Function: generateSubKeys
int generateSubKeys(char *key, uint32_t keys[]){
  int k=0;
  if(key==NULL)
    return 0;
  for(int i=0;(i<ROUNDS) &&((key[k] != '\0')||(key[k] != '\n'));i+=2, k++){
    keys[i] = (uint32_t)key[k]^keys[i];
    keys[i+1] = (uint32_t)key[k]^keys[i+1];
  }
  return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x14fc
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpq $0x8, %rcx
je 0x14fe
movsbl (%rdi,%rcx), %edx
xorl %edx, (%rsi,%rcx,8)
movsbl (%rdi,%rcx), %edx
xorl %edx, 0x4(%rsi,%rcx,8)
incq %rcx
jmp 0x14e2
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/keymgmt.c
// Function: generateKey
void generateKey(){
  int i=0;
  srand(time(0));
  char key[10]={'\0'};
  while(i!=8){
    key[i] =(char)rand()%256;
    if(inRange(key[i]))
      i++;
  }
  printf("Generated Key: %s\n", key);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10b0
movl %eax, %edi
callq 0x1090
andw $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
cmpl $0x8, %ebx
je 0x153c
callq 0x10f0
movl %ebx, %ecx
movb %al, (%rsp,%rcx)
addb $-0x21, %al
cmpb $0x5e, %al
adcl $0x0, %ebx
jmp 0x1524
leaq 0xcad(%rip), %rdi       # 0x21f0
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1080
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/dubeyalok7[P]crypto-algo/des/feistal_algo/main.c
// Function: main
int main(int argc, char *argv[])
{
  FILE *infile, *outfile;
  char *key;
  int op;
  if((argc==2)&&(!strcmp(argv[1],"-g"))){
    generateKey();
    return 0;
  }

  if((argc < 5)){
    help();
    return 0;
  }

  for(int i=1; i< argc ; i+=2){
    if(!strcmp(argv[i],"-i")){
      printf("Input file: %s\n", argv[i+1]);
      infile = fopen(argv[i+1],"r");
      if(!infile){
        printf("Error: in-valid file name\n");
        help();
        return 0;
      }
    }
    else if(!strcmp(argv[i],"-o")){
      printf("Output File: %s\n",argv[i+1]);
      outfile = fopen(argv[i+1],"w+");
    }
    else if(!strcmp(argv[i],"-e")|| !strcmp(argv[i],"-d")){
      if(argv[i][1] =='e'){
        printf("Encrypting the file...\n");
        op = ENCRYPT;
      }else if(argv[i][1] =='d'){
        op = DECRYPT;
        printf("Decrypting the file...\n");
      }else{
        help();
        return 0;
      }
    }
  }
  fesital(infile, outfile, op);
  fclose(infile);
  fclose(outfile);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x1586
movq 0x8(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x158b
cmpb $0x67, 0x1(%rax)
jne 0x158b
cmpb $0x0, 0x2(%rax)
jne 0x158b
callq 0x1504
jmp 0x1699
cmpl $0x5, %edi
jge 0x1597
xorl %eax, %eax
callq 0x11fc
jmp 0x1699
movl %edi, %r14d
pushq $0x1
popq %r15
cmpq %r14, %r15
jae 0x167b
movq (%rbx,%r15,8), %rax
cmpb $0x2d, (%rax)
jne 0x1672
cmpb $0x69, 0x1(%rax)
jne 0x15c0
cmpb $0x0, 0x2(%rax)
je 0x160b
cmpb $0x6f, 0x1(%rax)
jne 0x15cc
cmpb $0x0, 0x2(%rax)
je 0x1639
cmpb $0x65, 0x1(%rax)
jne 0x15d8
cmpb $0x0, 0x2(%rax)
je 0x15ec
cmpb $0x64, 0x1(%rax)
jne 0x1672
cmpb $0x0, 0x2(%rax)
jne 0x1672
movzbl 0x1(%rax), %eax
cmpl $0x64, %eax
je 0x1662
cmpl $0x65, %eax
jne 0x158b
leaq 0xc59(%rip), %rdi       # 0x225a
callq 0x1040
xorl %r13d, %r13d
jmp 0x1672
movq 0x8(%rbx,%r15,8), %rsi
leaq 0xbec(%rip), %rdi       # 0x2203
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx,%r15,8), %rdi
leaq 0xbe9(%rip), %rsi       # 0x2213
callq 0x10c0
movq %rax, %r12
testq %rax, %rax
jne 0x1672
jmp 0x16aa
movq 0x8(%rbx,%r15,8), %rsi
leaq 0xbd0(%rip), %rdi       # 0x2215
xorl %eax, %eax
callq 0x1080
movq 0x8(%rbx,%r15,8), %rdi
leaq 0xbce(%rip), %rsi       # 0x2226
callq 0x10c0
movq %rax, %rbp
jmp 0x1672
leaq 0xbda(%rip), %rdi       # 0x2243
callq 0x1040
pushq $0x1
popq %r13
addq $0x2, %r15
jmp 0x159e
movq %r12, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x1230
movq %r12, %rdi
callq 0x1060
movq %rbp, %rdi
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb78(%rip), %rdi       # 0x2229
callq 0x1040
jmp 0x158b
// File: /workspace/github_c_makefile_star2_O2/chrispanag[P]operating-systems-scheduler/sigchld-example.c
// Function: child
void child(void)
{
	pid_t pid = getpid();

	for (;;) {
		printf("I am child %ld, sleeping for %d sec...\n",
			(long)pid, SLEEP_SEC);
		sleep(SLEEP_SEC);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x1040
movslq %eax, %rbx
leaq 0xda5(%rip), %r14       # 0x2004
pushq $0x1
popq %rbp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1070
movl %ebp, %edi
callq 0x1130
jmp 0x1262
// File: /workspace/github_c_makefile_star2_O2/chrispanag[P]operating-systems-scheduler/sigchld-example.c
// Function: sigalrm_handler
void sigalrm_handler(int signum)
{
	if (signum != SIGALRM) {
		fprintf(stderr, "Internal error: Called for signum %d, not SIGALRM\n",
			signum);
		exit(1);
	}

	printf("ALARM! %d seconds have passed.\n", ALARM_SEC);

	/* Setup the alarm again */
	if (alarm(ALARM_SEC) < 0) {
		perror("alarm");
		exit(1);
	}
}

// Assembly:
pushq %rbx
cmpl $0xe, %edi
jne 0x129b
leaq 0xdd8(%rip), %rdi       # 0x205f
pushq $0x2
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
movl %ebx, %edi
popq %rbx
jmp 0x1090
movl %edi, %edx
movq 0x2d54(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd7e(%rip), %rsi       # 0x202c
xorl %eax, %eax
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O2/chrispanag[P]operating-systems-scheduler/sigchld-example.c
// Function: sigchld_handler
void sigchld_handler(int signum)
{
	pid_t p;
	int status;

	if (signum != SIGCHLD) {
		fprintf(stderr, "Internal error: Called for signum %d, not SIGCHLD\n",
			signum);
		exit(1);
	}

	/*
	 * Something has happened to one of the children.
	 * We use waitpid() with the WUNTRACED flag, instead of wait(), because
	 * SIGCHLD may have been received for a stopped, not dead child.
	 *
	 * A single SIGCHLD may be received if many processes die at the same time.
	 * We use waitpid() with the WNOHANG flag in a loop, to make sure all
	 * children are taken care of before leaving the handler.
	 */

	for (;;) {
		p = waitpid(-1, &status, WUNTRACED | WNOHANG);
		if (p < 0) {
			perror("waitpid");
			exit(1);
		}
		if (p == 0)
			break;

		explain_wait_status(p, status);

		if (WIFEXITED(status) || WIFSIGNALED(status)) {
			/* A child has died */
			printf("Parent: Received SIGCHLD, child is dead. Exiting.\n");
			exit(0);
		}
		if (WIFSTOPPED(status)) {
			/* A child has stopped due to SIGSTOP/SIGTSTP, etc... */
			printf("Parent: Child has been stopped. Moving right along...\n");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x11, %edi
jne 0x135c
pushq $-0x1
popq %rbx
leaq 0x4(%rsp), %r14
pushq $0x3
popq %rbp
leaq 0xe26(%rip), %r15       # 0x2105
movl %ebx, %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x10f0
testl %eax, %eax
js 0x1348
je 0x132a
movl 0x4(%rsp), %esi
movl %eax, %edi
callq 0x1446
movl 0x4(%rsp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
je 0x1335
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jge 0x1335
movzbl %al, %eax
cmpl $0x7f, %eax
jne 0x12df
movq %r15, %rdi
callq 0x1030
jmp 0x12df
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdff(%rip), %rdi       # 0x213b
callq 0x1030
xorl %edi, %edi
callq 0x1120
leaq 0xd63(%rip), %rdi       # 0x20b2
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1120
movl %edi, %edx
movq 0x2c93(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd10(%rip), %rsi       # 0x207f
xorl %eax, %eax
callq 0x10b0
jmp 0x1354
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/stack_queue.c
// Function: main
int main(void)
{
	struct tt_stack stack = {
		.cap	= LEN,
		.esize	= sizeof(int),
	};

	printf("Testing static stack...\n");
	tt_stack_init(&stack);
	test_stack(&stack);
	tt_stack_free(&stack);
	printf("\n");

	printf("Testing dynamic stack...\n");
	stack.cap = 0;
	tt_stack_init(&stack);
	test_stack(&stack);
	tt_stack_free(&stack);
	printf("\n");

	struct tt_queue queue = {
		.cap	= LEN,
		.esize	= sizeof(int),
	};

	printf("Testing static queue...\n");
	tt_queue_init(&queue);
	test_queue(&queue);
	tt_queue_free(&queue);
	printf("\n");

	printf("Testing dynamic queue...\n");
	queue.cap = 0;
	tt_queue_init(&queue);
	test_queue(&queue);
	tt_queue_free(&queue);
	printf("\n");

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r14
andq $0x0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movabsq $0x400000010, %r15      # imm = 0x400000010
movq %r15, (%r14)
leaq 0x2d78(%rip), %rdi      # 0x4008
callq 0x1060
movq %r14, %rdi
callq 0x2270
movq %r14, %rdi
callq 0x1366
movq %r14, %rdi
callq 0x2461
pushq $0xa
popq %rbx
movl %ebx, %edi
callq 0x1040
leaq 0x2d62(%rip), %rdi      # 0x4020
callq 0x1060
andl $0x0, (%r14)
movq %r14, %rdi
callq 0x2270
movq %r14, %rdi
callq 0x1366
movq %r14, %rdi
callq 0x2461
movl %ebx, %edi
callq 0x1040
leaq 0x38(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movq %r15, (%r14)
leaq 0x2d32(%rip), %rdi      # 0x4039
callq 0x1060
movq %r14, %rdi
callq 0x24b8
movq %r14, %rdi
callq 0x13cf
movq %r14, %rdi
callq 0x26db
movl %ebx, %edi
callq 0x1040
leaq 0x2d1f(%rip), %rdi      # 0x4051
callq 0x1060
andl $0x0, (%r14)
movq %r14, %rdi
callq 0x24b8
movq %r14, %rdi
callq 0x13cf
movq %r14, %rdi
callq 0x26db
movl %ebx, %edi
callq 0x1040
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/stack_queue.c
// Function: test_stack
static void test_stack(struct tt_stack *stack)
{
	for (int i = 0; i < LEN + 1; i++) {
		int t = i + 1;
		tt_stack_push(stack, &t);
	}
	for (int i = 0; i < LEN + 1; i++) {
		int t;
		if (tt_stack_pop(stack, &t) == 0)
			printf("%d ", t);
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
leaq 0x4(%rsp), %r14
cmpl $0x12, %ebp
je 0x138e
movl %ebp, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x20(%rbx)
incl %ebp
jmp 0x1378
pushq $0x11
popq %rbp
movq %rsp, %r14
leaq 0x2c69(%rip), %r15      # 0x4004
subl $0x1, %ebp
jb 0x13bc
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28(%rbx)
testl %eax, %eax
jne 0x139b
movl (%rsp), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b0
jmp 0x139b
pushq $0xa
popq %rdi
callq 0x1040
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/stack_queue.c
// Function: test_queue
static void test_queue(struct tt_queue *queue)
{
	int t;
	for (int i = 0; i < LEN + 1; i++) {
		t = i + 1;
		tt_queue_enque(queue, &t);
	}
	for (int i = 0; i < LEN - 1; i++)
		tt_queue_deque(queue, &t);
	for (int i = LEN - 2; i >= 0; i--) {
		t = i + 1;
		tt_queue_enque(queue, &t);
	}

	for (int i = 0; i < LEN + 1; i++) {
		if (tt_queue_deque(queue, &t) == 0)
			printf("%d ", t);
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
leaq 0x4(%rsp), %r14
cmpl $0x12, %ebp
je 0x13f7
movl %ebp, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28(%rbx)
incl %ebp
jmp 0x13e1
pushq $0xf
popq %rbp
leaq 0x4(%rsp), %r14
subl $0x1, %ebp
jb 0x140f
movq %rbx, %rdi
movq %r14, %rsi
callq *0x30(%rbx)
jmp 0x13ff
pushq $0xe
popq %r15
leaq 0x4(%rsp), %r14
testl %r15d, %r15d
js 0x1433
leal 0x1(%r15), %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x28(%rbx)
decl %r15d
jmp 0x1418
pushq $0x11
popq %rbp
leaq 0x4(%rsp), %r14
leaq 0x2bc2(%rip), %r15      # 0x4004
subl $0x1, %ebp
jb 0x1464
movq %rbx, %rdi
movq %r14, %rsi
callq *0x30(%rbx)
testl %eax, %eax
jne 0x1442
movl 0x4(%rsp), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10b0
jmp 0x1442
pushq $0xa
popq %rdi
callq 0x1040
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: handle_sig
static void handle_sig(int sig) {
  if (flow_pid != -1) kill(flow_pid,SIGTERM);
  if (exec_pid != -1) kill(exec_pid,SIGTERM);
  outf("+++ Fuzzing stopped on signal %d +++\n", sig);
  fclose(outfile);
  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0x9b80(%rip), %edi      # 0x10234
cmpl $-0x1, %edi
je 0x66c1
pushq $0xf
popq %rsi
callq 0x22c0
movl 0x9b71(%rip), %edi      # 0x10238
cmpl $-0x1, %edi
je 0x66d4
pushq $0xf
popq %rsi
callq 0x22c0
leaq 0x50ed(%rip), %rdi      # 0xb7c8
xorl %r14d, %r14d
movl %ebx, %esi
xorl %eax, %eax
callq 0x2030
movq 0x9b7a(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x670a
leaq 0x50ce(%rip), %rsi      # 0xb7c8
movl %ebx, %edx
xorl %eax, %eax
callq 0x22d0
movq 0x9b5e(%rip), %r14      # 0x10268
movq %r14, %rdi
callq 0x21d0
pushq $0x1
popq %rdi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: par_atou
static _u32 par_atou(_u8* txt,_u8 opt,_u8 takezero) {
  _u32 ret;
  if (sscanf(txt,"%u",&ret) != 1) fatal("malformed -%c option",opt);
  if (!takezero && !ret) fatal("-%c option must not be zero",opt);
  /* A crude sanity check - 100M oughta be enough for everyone */
  if (ret > 100000000) fatal("excessive -%c value",opt);
  return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
leaq 0x4d55(%rip), %rsi      # 0xb47d
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x21c0
cmpl $0x1, %eax
jne 0x6762
testb %bpl, %bpl
setne %cl
movl 0x4(%rsp), %eax
testl %eax, %eax
setne %dl
orb %cl, %dl
je 0x67e2
cmpl $0x5f5e101, %eax        # imm = 0x5F5E101
jae 0x685f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movzbl %bl, %ebx
leaq 0x5082(%rip), %rdi      # 0xb7ee
movl %ebx, %esi
xorl %eax, %eax
callq 0x2030
movq 0x9aec(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x6791
leaq 0x5066(%rip), %rsi      # 0xb7ee
movl %ebx, %edx
xorl %eax, %eax
callq 0x22d0
leaq 0x4aa5(%rip), %rdi      # 0xb23d
leaq 0x507b(%rip), %rsi      # 0xb81a
leaq 0x4aa7(%rip), %rdx      # 0xb24d
movl $0x716, %ecx            # imm = 0x716
xorl %eax, %eax
callq 0x2030
movq 0x9aaf(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x68dd
leaq 0x4a74(%rip), %rsi      # 0xb23d
leaq 0x504a(%rip), %rdx      # 0xb81a
leaq 0x4a76(%rip), %rcx      # 0xb24d
movl $0x716, %r8d            # imm = 0x716
jmp 0x68d6
movzbl %bl, %ebx
leaq 0x5037(%rip), %rdi      # 0xb823
movl %ebx, %esi
xorl %eax, %eax
callq 0x2030
movq 0x9a6c(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x6811
leaq 0x501b(%rip), %rsi      # 0xb823
movl %ebx, %edx
xorl %eax, %eax
callq 0x22d0
leaq 0x4a25(%rip), %rdi      # 0xb23d
leaq 0x4ffb(%rip), %rsi      # 0xb81a
leaq 0x4a27(%rip), %rdx      # 0xb24d
movl $0x717, %ecx            # imm = 0x717
xorl %eax, %eax
callq 0x2030
movq 0x9a2f(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x68dd
leaq 0x49f4(%rip), %rsi      # 0xb23d
leaq 0x4fca(%rip), %rdx      # 0xb81a
leaq 0x49f6(%rip), %rcx      # 0xb24d
movl $0x717, %r8d            # imm = 0x717
jmp 0x68d6
movzbl %bl, %ebx
leaq 0x4fed(%rip), %rdi      # 0xb856
movl %ebx, %esi
xorl %eax, %eax
callq 0x2030
movq 0x99ef(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x688e
leaq 0x4fd1(%rip), %rsi      # 0xb856
movl %ebx, %edx
xorl %eax, %eax
callq 0x22d0
leaq 0x49a8(%rip), %rdi      # 0xb23d
leaq 0x4f7e(%rip), %rsi      # 0xb81a
leaq 0x49aa(%rip), %rdx      # 0xb24d
movl $0x719, %ecx            # imm = 0x719
xorl %eax, %eax
callq 0x2030
movq 0x99b2(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x68dd
leaq 0x497b(%rip), %rsi      # 0xb23d
leaq 0x4f51(%rip), %rdx      # 0xb81a
leaq 0x497d(%rip), %rcx      # 0xb24d
movl $0x719, %r8d            # imm = 0x719
xorl %eax, %eax
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: N
static _u8* N(_u8* dir, _u8* file) {
  static _u8* fn = 0;
  
  if (fn) free(fn);
  fn = malloc(strlen(dir) + strlen(file) + 2);
  if (!fn) fatal("out of memory");
  
  sprintf(fn,"%s/%s",dir,file);

  return fn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x3981a(%rip), %rdi     # 0x40370
callq 0x2220
movq %r14, %rdi
callq 0x20e0
movq %rax, %r15
movq %rbx, %rdi
callq 0x20e0
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
callq 0x2270
movq %rax, 0x397ee(%rip)     # 0x40370
testq %rax, %rax
je 0x6bab
leaq 0x5879(%rip), %rsi      # 0xc407
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2050
movq 0x397cb(%rip), %rax     # 0x40370
popq %rbx
popq %r14
popq %r15
retq
leaq 0x49e6(%rip), %rdi      # 0xb598
xorl %eax, %eax
callq 0x2030
movq 0x96a8(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0x6bd7
leaq 0x49cc(%rip), %rdi      # 0xb598
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x23b0
leaq 0x465f(%rip), %rdi      # 0xb23d
leaq 0x6ace(%rip), %rsi      # 0xd6b3
leaq 0x4661(%rip), %rdx      # 0xb24d
movl $0x100, %ecx            # imm = 0x100
xorl %eax, %eax
callq 0x2030
movq 0x9669(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x6c26
leaq 0x4632(%rip), %rsi      # 0xb23d
leaq 0x6aa1(%rip), %rdx      # 0xd6b3
leaq 0x4634(%rip), %rcx      # 0xb24d
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: discard_context
static void discard_context(struct bunny_traceitem* t, _u8 free_t) {
  _u32 i;

  if (!t->param_data) fatal("context freed more than once");

  free(t->param_data);
  free(t->param_range);
  free(t->param_chgmap);
    
  /* To detect access... */
  t->param_data  = 0;
  t->param_range = 0;

  for (i=0;i<t->param_count;i++) FREEINT2(t->eff[i]);

  free(t->eff);
  t->eff = 0;

  FREEINT(t->has_eff);

  if (t->fault_loc) free(t->fault_loc);

  if (free_t) free(t);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x824d
movl %esi, %ebp
callq 0x2220
movq 0x40(%rbx), %rdi
callq 0x2220
movq 0x48(%rbx), %rdi
callq 0x2220
andq $0x0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
xorl %r15d, %r15d
xorl %r12d, %r12d
movl 0x28(%rbx), %eax
movq 0x58(%rbx), %r14
cmpq %rax, %r12
jae 0x8207
movq (%r14,%r15), %rdi
callq 0x2220
movq 0x8(%r14,%r15), %rdi
callq 0x2220
incq %r12
xorps %xmm0, %xmm0
movups %xmm0, (%r14,%r15)
andl $0x0, 0x10(%r14,%r15)
addq $0x18, %r15
jmp 0x81d1
movq %r14, %rdi
callq 0x2220
andq $0x0, 0x58(%rbx)
movq 0x60(%rbx), %rdi
callq 0x2220
andq $0x0, 0x60(%rbx)
andl $0x0, 0x68(%rbx)
movq 0x20(%rbx), %rdi
callq 0x2220
testb %bpl, %bpl
je 0x8244
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4df8(%rip), %rdi      # 0xd04c
xorl %eax, %eax
callq 0x2030
movq 0x8006(%rip), %rcx      # 0x10268
testq %rcx, %rcx
je 0x8279
leaq 0x4dde(%rip), %rdi      # 0xd04c
pushq $0x33
popq %rsi
pushq $0x1
popq %rdx
callq 0x23b0
leaq 0x2fbd(%rip), %rdi      # 0xb23d
leaq 0x4df9(%rip), %rsi      # 0xd080
leaq 0x2fbf(%rip), %rdx      # 0xb24d
movl $0x31b, %ecx            # imm = 0x31B
xorl %eax, %eax
callq 0x2030
movq 0x7fc7(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x82c8
leaq 0x2f90(%rip), %rsi      # 0xb23d
leaq 0x4dcc(%rip), %rdx      # 0xd080
leaq 0x2f92(%rip), %rcx      # 0xb24d
movl $0x31b, %r8d            # imm = 0x31B
xorl %eax, %eax
callq 0x22d0
pushq $0x1
popq %rdi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: free_input
static void free_input(_u8* dir,_u8 deldir) {
  DIR* d;
  struct dirent* dent;

  if (!strcmp(in_dir,dir) || !dir[0]) return;

  d = opendir(dir);
  if (!d) pfatal("cannot open '%s' for reading",dir);

  while ((dent = readdir(d))) {
    if (dent->d_name[0] == '.') continue;
    unlink(N(dir,dent->d_name));
  }

  closedir(d);
  if (deldir) {
    _u8* x = strrchr(dir,'/');
    rmdir(dir);
    if (x) { *x = 0; rmdir(dir); }
  }

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x6c84(%rip), %rdi      # 0x10260
movq %rbx, %rsi
callq 0x22a0
testl %eax, %eax
je 0x9661
cmpb $0x0, (%rbx)
je 0x9661
movq %rbx, %rdi
callq 0x2300
testq %rax, %rax
je 0x9666
movq %rax, %r14
movq %r14, %rdi
callq 0x2320
testq %rax, %rax
je 0x9629
cmpb $0x2e, 0x13(%rax)
je 0x95fd
addq $0x13, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6b44
movq %rax, %rdi
callq 0x2100
jmp 0x95fd
movq %r14, %rdi
callq 0x2350
testb %bpl, %bpl
je 0x9661
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
testq %r14, %r14
je 0x9661
movb $0x0, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3ad5(%rip), %rdi      # 0xd142
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x6bea(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x9694
leaq 0x3ab8(%rip), %rsi      # 0xd142
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22d0
leaq 0x1ba2(%rip), %rdi      # 0xb23d
leaq 0x4006(%rip), %rsi      # 0xd6a8
leaq 0x1ba4(%rip), %rdx      # 0xb24d
movl $0x33b, %ecx            # imm = 0x33B
xorl %eax, %eax
callq 0x2030
movq 0x6bac(%rip), %rdi      # 0x10268
testq %rdi, %rdi
je 0x96e3
leaq 0x1b75(%rip), %rsi      # 0xb23d
leaq 0x3fd9(%rip), %rdx      # 0xd6a8
leaq 0x1b77(%rip), %rcx      # 0xb24d
movl $0x33b, %r8d            # imm = 0x33B
xorl %eax, %eax
callq 0x22d0
leaq 0x2952(%rip), %rdi      # 0xc03c
callq 0x2170
pushq $0x1
popq %rdi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-main.c
// Function: lookup_exec
static struct bunny_traceitem* lookup_exec(_u64 cksum) {
  _u32 pos = cksum & 0xFFF;
  _u32 i;

  for (i=0;i<known_exec[pos].c;i++)
    if (known_exec[pos].v[i] == cksum) 
      return (struct bunny_traceitem*)known_exti[pos].v[i];
  
  return 0;
}

// Assembly:
movl %edi, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movl %ecx, %eax
shll $0x4, %eax
leaq 0x69cf(%rip), %rsi      # 0x10360
leaq (%rsi,%rax), %rdx
movl 0x8(%rax,%rsi), %esi
xorl %eax, %eax
xorl %r9d, %r9d
cmpq %r9, %rsi
je 0x99c6
movq (%rdx), %r10
leaq 0x1(%r9), %r8
cmpq %rdi, (%r10,%r9,8)
movq %r8, %r9
jne 0x999e
shll $0x4, %ecx
leaq 0x169a3(%rip), %rax     # 0x20360
movq (%rcx,%rax), %rax
movq -0x8(%rax,%r8,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/./range.h
// Function: RANGE64
static inline _u64 RANGE64(_s32 num) {
  _u32 i = 30;

  if (!num) return (1LL << 31);

  if (num < 0) {
    if (num == -0x80000000) return (1LL << 0);
      while (--i && !((-num) & (1 << i)));
    return (1LL << (31 - i));
  }

  if (num == 0x7FFFFFFF) return (1LL << 62);
  while (--i && !(num & (1 << i)));
  return (1LL << (32 + i));

  /* Bit 63 is not used / reserved for RANGE64_VOLATILE */

}

// Assembly:
testl %edi, %edi
je 0x99e0
js 0x99e6
cmpl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jne 0x99ee
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
retq
movl $0x80000000, %eax       # imm = 0x80000000
retq
negl %edi
jno 0x9a08
pushq $0x1
popq %rax
retq
pushq $0x3d
popq %rax
movq %rax, %rcx
cmpl $0x20, %ecx
je 0x9a22
leaq -0x20(%rcx), %rdx
leaq -0x1(%rcx), %rax
btl %edx, %edi
jae 0x99f1
jmp 0x9a22
pushq $-0x2
popq %rax
movq %rax, %rcx
cmpl $-0x1f, %ecx
je 0x9a20
leaq 0x1f(%rcx), %rdx
leaq -0x1(%rcx), %rax
btl %edx, %edi
jae 0x9a0b
negb %cl
pushq $0x1
popq %rax
shlq %cl, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/./range.h
// Function: RANGE8
static inline _u64 RANGE8(_s32 num) {

  if (num < 0) return (1LL << 0);
  if (!num) return (1LL << 1);
  if (num < 128) return (1LL << 2);
  if (num < 256) return (1LL << 3);
  if (num < 32768) return (1LL << 4);
  if (num < 65536) return (1LL << 5);
  return (1LL << 6);

}

// Assembly:
testl %edi, %edi
js 0x9a3b
je 0x9a3f
cmpl $0x80, %edi
jae 0x9a43
pushq $0x4
jmp 0x9a59
pushq $0x1
jmp 0x9a59
pushq $0x2
jmp 0x9a59
cmpl $0x100, %edi            # imm = 0x100
jae 0x9a4f
pushq $0x8
jmp 0x9a59
cmpl $0x8000, %edi           # imm = 0x8000
jae 0x9a5b
pushq $0x10
popq %rax
retq
xorl %eax, %eax
cmpl $0x10000, %edi          # imm = 0x10000
setae %al
shll $0x5, %eax
addq $0x20, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/isort1.c
// Function: isort1
void isort1(int x[], unsigned int nr)
{
	unsigned int i, j;

	for (i = 1; i < nr; i++)
		for (j = i; j && x[j-1] > x[j]; j--)
			swap(x, j-1, j);
}

// Assembly:
pushq $0x1
popq %rax
cmpl %esi, %eax
jae 0x2512
movl %eax, %edx
movl %eax, %ecx
subl $0x1, %ecx
jb 0x250e
movl %ecx, %r8d
movl (%rdi,%r8,4), %r9d
movl %edx, %edx
movl (%rdi,%rdx,4), %r10d
cmpl %r10d, %r9d
jle 0x250e
movl %r10d, (%rdi,%r8,4)
movl %r9d, (%rdi,%rdx,4)
movl %ecx, %edx
jmp 0x24eb
incl %eax
jmp 0x24e3
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/isort1_test.c
// Function: generate_random_array
static void generate_random_array(int x[], int nr)
{
	int i;

	init_array(x, nr, 0);
	srand(time(0));
	for (i = 0; i < nr/2; i++) {
		int j = rand()%nr;
		swap(x, i, j);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x26e4
xorl %edi, %edi
callq 0x2080
movl %eax, %edi
callq 0x2070
pushq $0x2
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movslq %eax, %r12
cmpq %r12, %r15
jge 0x26a9
callq 0x2090
cltd
idivl %ebx
movl (%r14,%r15,4), %eax
movslq %edx, %rcx
movl (%r14,%rcx,4), %edx
movl %edx, (%r14,%r15,4)
movl %eax, (%r14,%rcx,4)
incq %r15
jmp 0x2684
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/isort1_test.c
// Function: init_array
static void init_array(int x[], int nr, int v)
{
	int i;

	for (i = 0; i < nr; i++) {
		if (v)
			x[i] = v;
		else
			x[i] = i;
	}
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
pushq $0x1
popq %rcx
cmpq %rax, %rsi
je 0x2705
testl %edx, %edx
movl %ecx, %r8d
cmovel %eax, %r8d
movl %r8d, (%rdi,%rax,4)
incq %rax
jmp 0x26ee
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/isort2.c
// Function: isort2
void isort2(int x[], unsigned int nr)
{
	unsigned int i, j;

	for (i = 1; i < nr; i++)
		for (j = i; j && x[j-1] > x[j]; j--) {
			/* see how much we can get from swap() call */
			int tmp = x[j-1];
			x[j-1] = x[j];
			x[j] = tmp;
		}
}

// Assembly:
pushq $0x1
popq %rax
cmpl %esi, %eax
jae 0x273a
movl %eax, %edx
movl %eax, %ecx
subl $0x1, %ecx
jb 0x2736
movl %ecx, %r8d
movl (%rdi,%r8,4), %r9d
movl %edx, %edx
movl (%rdi,%rdx,4), %r10d
cmpl %r10d, %r9d
jle 0x2736
movl %r10d, (%rdi,%r8,4)
movl %r9d, (%rdi,%rdx,4)
movl %ecx, %edx
jmp 0x2713
incl %eax
jmp 0x270b
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/isort3.c
// Function: isort3
void isort3(int x[], unsigned int nr)
{
	unsigned int i, j;

	for (i = 1; i < nr; i++) {
		int tmp = x[i];
		for (j = i; j && x[j-1] > tmp; j--)
			x[j] = x[j-1];
		x[j] = tmp;
	}
}

// Assembly:
movl %esi, %eax
pushq $0x1
popq %rcx
cmpq %rax, %rcx
jae 0x2965
movl (%rdi,%rcx,4), %edx
movq %rcx, %rsi
testq %rsi, %rsi
je 0x295b
leal -0x1(%rsi), %r8d
movl (%rdi,%r8,4), %r8d
cmpl %edx, %r8d
jle 0x295b
movl %r8d, (%rdi,%rsi,4)
decq %rsi
jmp 0x2940
movl %esi, %esi
movl %edx, (%rdi,%rsi,4)
incq %rcx
jmp 0x2935
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/qsort1.c
// Function: _qsort
static void __qsort(int x[], unsigned int l, unsigned int u)
{
	unsigned int m;
	int i;

	if (u-l <= 1)
		return;
	m = l;
	for (i = l+1; i < u; i++)
		if (x[i] < x[l])
			swap(x, ++m, i);
	swap(x, l, m);
	__qsort(x, l, m);
	__qsort(x, m+1, u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movl %ebx, %eax
subl %esi, %eax
cmpl $0x2, %eax
jb 0x2bd5
movl %esi, %eax
movl %esi, %r15d
movl %esi, %edx
incl %edx
leaq -0x1(%rdx), %rcx
cmpl %ebx, %edx
jae 0x2baf
movslq %edx, %rdi
movl (%r14,%rdi,4), %edi
incq %rcx
incl %edx
cmpl (%r14,%rax,4), %edi
jge 0x2b82
incl %r15d
movl (%r14,%r15,4), %edx
movl (%r14,%rcx,4), %edi
movl %edi, (%r14,%r15,4)
movl %edx, (%r14,%rcx,4)
movl %ecx, %edx
jmp 0x2b7c
movl (%r14,%rax,4), %ecx
movl %r15d, %edx
movl (%r14,%rdx,4), %edi
movl %edi, (%r14,%rax,4)
movl %ecx, (%r14,%rdx,4)
movq %r14, %rdi
movl %r15d, %edx
callq 0x2b62
incl %r15d
movl %r15d, %esi
jmp 0x2b6c
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/qsort2.c
// Function: _qsort
static void __qsort(int x[], unsigned int l, unsigned int u)
{
	unsigned int i, m;

	if (u-l <= 1)
		return;

	m = l;
	for (i = l+1; i < u; i++)
		if (x[i] < x[l]) {
			/* see how much faster than swap() */
			int tmp = x[++m]; x[m] = x[i]; x[i] = tmp;
		}
	swap(x, l, m);
	__qsort(x, l, m);
	__qsort(x, m+1, u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movl %ebx, %eax
subl %esi, %eax
cmpl $0x2, %eax
jb 0x2e39
movl %esi, %eax
movl %esi, %r15d
movl %esi, %ecx
incl %ecx
cmpl %ebx, %ecx
jae 0x2e13
movl %ecx, %edx
movl (%r14,%rdx,4), %edi
cmpl (%r14,%rax,4), %edi
jge 0x2df0
incl %r15d
movl (%r14,%r15,4), %r8d
movl %edi, (%r14,%r15,4)
movl %r8d, (%r14,%rdx,4)
jmp 0x2df0
movl (%r14,%rax,4), %ecx
movl %r15d, %edx
movl (%r14,%rdx,4), %edi
movl %edi, (%r14,%rax,4)
movl %ecx, (%r14,%rdx,4)
movq %r14, %rdi
movl %r15d, %edx
callq 0x2dd6
incl %r15d
movl %r15d, %esi
jmp 0x2de0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/qsort3.c
// Function: _qsort
static void __qsort(int x[], unsigned int l, unsigned int u)
{
	unsigned int i, m;

	if (u-l <= 1)
		return;

	/* pick the random pivot */
	swap(x, l, l+rand()%(u-l));
	m = l;
	for (i = l+1; i < u; i++)
		if (x[i] < x[l]) {
			int tmp = x[++m]; x[m] = x[i]; x[i] = tmp;
		}
	swap(x, l, m);
	__qsort(x, l, m);
	__qsort(x, m+1, u);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ebx, %r15d
subl %ebp, %r15d
cmpl $0x2, %r15d
jb 0x30e3
callq 0x2090
xorl %edx, %edx
divl %r15d
addl %ebp, %edx
movl %ebp, %eax
movl (%r14,%rax,4), %ecx
movl (%r14,%rdx,4), %esi
movl %esi, (%r14,%rax,4)
movl %ecx, (%r14,%rdx,4)
movl %ebp, %r15d
movl %ebp, %ecx
incl %ecx
cmpl %ebx, %ecx
jae 0x30bb
movl %ecx, %edx
movl (%r14,%rdx,4), %esi
cmpl (%r14,%rax,4), %esi
jge 0x3098
incl %r15d
movl (%r14,%r15,4), %edi
movl %esi, (%r14,%r15,4)
movl %edi, (%r14,%rdx,4)
jmp 0x3098
movl (%r14,%rax,4), %ecx
movl %r15d, %edx
movl (%r14,%rdx,4), %esi
movl %esi, (%r14,%rax,4)
movl %ecx, (%r14,%rdx,4)
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x305b
incl %r15d
movl %r15d, %ebp
jmp 0x3069
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/qsort4.c
// Function: _qsort
static void __qsort(int x[], unsigned int l, unsigned int u)
{
	int i, j;

	if (u-l <= 1)
		return;

	i = l+1, j = u-1;
	while (1) {
		while (i < u && x[i] < x[l]) i++;
		while (j > l && x[j] > x[l]) j--;
		if (i >= j) break;
		swap(x, i++, j--);
	}
	swap(x, l, j);
	__qsort(x, l, j);
	__qsort(x, j+1, u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movl %ebx, %eax
subl %esi, %eax
cmpl $0x2, %eax
jb 0x3385
movl %esi, %eax
movl %esi, %ecx
movl %ebx, %edx
leal 0x1(%rcx), %edi
cmpl %edi, %ebx
cmoval %ebx, %edi
incl %ecx
cmpl %ebx, %ecx
jae 0x3324
movslq %ecx, %r8
movl (%r14,%r8,4), %r8d
cmpl (%r14,%rax,4), %r8d
jl 0x330f
jmp 0x3326
movl %edi, %ecx
leal -0x1(%rdx), %edi
cmpl %edi, %esi
cmovbl %esi, %edi
movl %edx, %r15d
leal -0x1(%r15), %edx
cmpl %esi, %edx
jbe 0x3348
movslq %edx, %r8
movl (%r14,%r8,4), %r8d
cmpl (%r14,%rax,4), %r8d
jg 0x332e
jmp 0x334a
movl %edi, %edx
movl %edx, %edi
cmpl %edx, %ecx
jge 0x3365
movl %ecx, %r8d
movl (%r14,%r8,4), %r9d
movl (%r14,%rdi,4), %r10d
movl %r10d, (%r14,%r8,4)
movl %r9d, (%r14,%rdi,4)
jmp 0x3307
movl (%r14,%rax,4), %ecx
movl (%r14,%rdi,4), %r8d
movl %r8d, (%r14,%rax,4)
movl %ecx, (%r14,%rdi,4)
movq %r14, %rdi
callq 0x32ea
movl %r15d, %esi
jmp 0x32f4
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/qsort6.c
// Function: _qsort
static void __qsort(int x[], unsigned int l, unsigned int u)
{
	int i, j;

	if (u-l <= 1)
		return;

	/* pick the random pivot */
	swap(x, l, l+rand()%(u-l));
	i = l+1, j = u-1;
	while (1) {
		int tmp;
		while (i < u && x[i] < x[l]) i++;
		while (j > l && x[j] > x[l]) j--;
		if (i >= j) break;
		tmp = x[i];
		x[i++] = x[j];
		x[j--] = tmp;
	}
	swap(x, l, j);
	__qsort(x, l, j);
	__qsort(x, j+1, u);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ebx, %r15d
subl %ebp, %r15d
cmpl $0x2, %r15d
jb 0x38fd
callq 0x2090
xorl %edx, %edx
divl %r15d
movl %edx, %eax
addl %ebp, %eax
movl %ebp, %ecx
leaq (%r14,%rcx,4), %rcx
movq %rcx, %rdi
movl %ebx, %edx
movl %ebp, %esi
movl (%rdi), %r8d
movl (%r14,%rax,4), %r9d
movl %r9d, (%rdi)
movl %r8d, (%r14,%rax,4)
leal 0x1(%rsi), %eax
cmpl %eax, %ebx
cmoval %ebx, %eax
incl %esi
cmpl %ebx, %esi
jae 0x38a9
movslq %esi, %rdi
movl (%r14,%rdi,4), %edi
cmpl (%rcx), %edi
jl 0x3896
jmp 0x38ab
movl %eax, %esi
leal -0x1(%rdx), %eax
cmpl %eax, %ebp
cmovbl %ebp, %eax
movl %edx, %r15d
leal -0x1(%r15), %edx
cmpl %ebp, %edx
jbe 0x38cb
movslq %edx, %rdi
movl (%r14,%rdi,4), %edi
cmpl (%rcx), %edi
jg 0x38b3
jmp 0x38cd
movl %eax, %edx
cmpl %edx, %esi
jge 0x38dd
movslq %esi, %rax
leaq (%r14,%rax,4), %rdi
movslq %edx, %rax
jmp 0x3880
movl (%rcx), %eax
movl %edx, %esi
movl (%r14,%rsi,4), %edi
movl %edi, (%rcx)
movl %eax, (%r14,%rsi,4)
movq %r14, %rdi
movl %ebp, %esi
callq 0x3847
movl %r15d, %ebp
jmp 0x3855
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Patch/patch.c
// Function: checksig
int checksig(FILE *infile)
{
	char buf[0x100];

	fseek(infile, 0x8FCA0, SEEK_SET);
	fread(buf, 0x20, 1, infile);
	if (strcmp(buf, "\\HEROES\\SOUND\\"))
	{
		fprintf(stderr, "[-] Sig fail\n");
		return 0;
	}
	fseek(infile, 0x8FB40, SEEK_SET);
	fread(buf, 0x20, 1, infile);
	if (strcmp(buf, "\\HEROES\\ANIM\\"))
	{
		fprintf(stderr, "[-] Sig fail\n");
		return 0;
	}
	fseek(infile, 0, SEEK_SET);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %r14
xorl %ebx, %ebx
movl $0x8fca0, %esi          # imm = 0x8FCA0
xorl %edx, %edx
callq 0x1090
movq %rsp, %r15
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1040
leaq 0xdf0(%rip), %rsi       # 0x2004
pushq $0xf
popq %rdx
movq %r15, %rdi
callq 0x1080
testl %eax, %eax
jne 0x127c
xorl %ebx, %ebx
movl $0x8fb40, %esi          # imm = 0x8FB40
movq %r14, %rdi
xorl %edx, %edx
callq 0x1090
movq %rsp, %r15
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1040
leaq 0xdd2(%rip), %rsi       # 0x2021
pushq $0xe
popq %rdx
movq %r15, %rdi
callq 0x1080
testl %eax, %eax
jne 0x127c
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1090
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
movq 0x2d75(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xd86(%rip), %rdi       # 0x2013
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
jmp 0x126d
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Patch/patch.c
// Function: copyfile
void copyfile(FILE *infile, FILE *outfile)
{
	int numr, numw;
	char buffer[100];

	while (feof(infile) == 0)
	{
		if ((numr = fread(buffer, 1, 100, infile)) != 100)
		{
			if (ferror(infile) != 0)
			{
				fprintf(stderr, "[-] Read file error.\n");
				exit(EXIT_FAILURE);
			}
		}
		if ((numw = fwrite(buffer, 1, numr, outfile)) != numr)
		{
			fprintf(stderr, "[-] Write file error.\n");
			exit(EXIT_FAILURE);
		}
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
pushq $0x1
popq %r12
pushq $0x64
popq %r13
movq %r14, %rdi
callq 0x1070
testl %eax, %eax
jne 0x1314
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1040
movq %rax, %rbp
cmpl $0x64, %ebp
je 0x12ea
movq %r14, %rdi
callq 0x1030
testl %eax, %eax
jne 0x1323
movslq %ebp, %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x10d0
cmpl %ebp, %eax
je 0x12b9
movq 0x2cf2(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xd35(%rip), %rdi       # 0x2045
pushq $0x16
jmp 0x1336
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2cce(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xcfb(%rip), %rdi       # 0x202f
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Patch/patch.c
// Function: patch
void patch(FILE *patchfile, FILE *outfile)
{
	unsigned char CallPatchFunc[] = {0xE8, 0xD7, 0xAF, 0x03, 0x00};
	unsigned char JmpRest[] = {0xEB, 0x25};

	fseek(outfile, 0x8A4A0, SEEK_SET);
	copyfile(patchfile, outfile);
	fseek(outfile, 0x4F4C4, SEEK_SET);
	if (fwrite(CallPatchFunc, 1, sizeof (CallPatchFunc), outfile) != sizeof (CallPatchFunc))
	{
		fprintf(stderr, "[-] Write file error.\n");
		exit(EXIT_FAILURE);
	}
	if (fwrite(JmpRest, 1, sizeof (JmpRest), outfile) != sizeof (JmpRest))
	{
		fprintf(stderr, "[-] Write file error.\n");
		exit(EXIT_FAILURE);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movb $0x0, 0x4(%r15)
movl $0x3afd7e8, (%r15)      # imm = 0x3AFD7E8
movw $0x25eb, 0x6(%rsp)      # imm = 0x25EB
movl $0x8a4a0, %esi          # imm = 0x8A4A0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1090
movq %r14, %rdi
movq %rbx, %rsi
callq 0x129a
movl $0x4f4c4, %esi          # imm = 0x4F4C4
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1090
pushq $0x1
popq %rsi
pushq $0x5
popq %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x10d0
cmpq $0x5, %rax
jne 0x13d1
leaq 0x6(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rcx
callq 0x10d0
cmpq $0x2, %rax
jne 0x13d1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x2c20(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xc63(%rip), %rdi       # 0x2045
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Patch/main.c
// Function: main
int main(int argc, char *argv[])
{
        char *s = NULL;
        FILE *infile;
        FILE *patchfile;
        FILE *outfile;

        if (argc != 4)
        {
                fprintf(stderr, "%s <HEROES.EXE> <PATCH.BIN> <OUTPUT.EXE>\n", argv[0]);
                return EXIT_FAILURE;
        }
        if ((s = argv[1], (infile  = fopen(s, "rb")) == NULL)
         || (s = argv[2], (patchfile = fopen(s, "rb")) == NULL)
         || (s = argv[3], (outfile = fopen(s, "wb")) == NULL))
        {
                perror("fopen()");
                return EXIT_FAILURE;
        }
        if (checksig(infile))
        {
                copyfile(infile, outfile);
                patch(patchfile, outfile);
        }
        fclose(infile);
        fclose(patchfile);
        fclose(outfile);
        return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
cmpl $0x4, %edi
jne 0x149d
movq 0x8(%r15), %rdi
leaq 0xc77(%rip), %rsi       # 0x208b
callq 0x10a0
testq %rax, %rax
je 0x148f
movq %rax, %rbx
movq 0x10(%r15), %rdi
leaq 0xc5f(%rip), %rsi       # 0x208b
callq 0x10a0
testq %rax, %rax
je 0x148f
movq %rax, %r14
movq 0x18(%r15), %rdi
leaq 0xc4a(%rip), %rsi       # 0x208e
callq 0x10a0
testq %rax, %rax
je 0x148f
movq %rax, %r15
movq %rbx, %rdi
callq 0x11dc
testl %eax, %eax
je 0x1473
movq %rbx, %rdi
movq %r15, %rsi
callq 0x129a
movq %r14, %rdi
movq %r15, %rsi
callq 0x1347
movq %rbx, %rdi
callq 0x1050
movq %r14, %rdi
callq 0x1050
movq %r15, %rdi
callq 0x1050
xorl %eax, %eax
jmp 0x14bb
leaq 0xbfb(%rip), %rdi       # 0x2091
callq 0x10b0
jmp 0x14b8
movq 0x2b54(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%r15), %rdx
leaq 0xbb0(%rip), %rsi       # 0x2061
xorl %eax, %eax
callq 0x1060
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_kfunc.c
// Function: test_fisher
void test_fisher(int n11, int n12, int n21, int n22,
                 double eleft, double eright, double etwo, double eprob)
{
    double prob, left, right, two;
    prob = kt_fisher_exact(n11, n12, n21, n22, &left, &right, &two);
    if (differ(left, eleft)) fail("LEFT", left, eleft, n11, n12, n21, n22);
    if (differ(right, eright)) fail("RIGHT", right, eright, n11, n12, n21, n22);
    if (differ(two, etwo)) fail("TWO-TAIL", two, etwo, n11, n12, n21, n22);
    if (differ(prob, eprob)) fail("RESULT", prob, eprob, n11, n12, n21, n22);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movsd %xmm3, 0x30(%rsp)
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0x38(%rsp), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %r12
leaq 0x40(%rsp), %r9
movq %r12, %r8
callq 0x1d92
movsd 0x10(%rsp), %xmm1
movsd (%r12), %xmm3
movapd %xmm3, %xmm2
subsd %xmm1, %xmm2
andpd 0x1df3(%rip), %xmm2     # 0x3010
movsd %xmm0, 0x20(%rsp)
ucomisd 0x1df5(%rip), %xmm2     # 0x3020
jbe 0x1248
leaq 0x1e8a(%rip), %rdi      # 0x30be
movapd %xmm3, %xmm0
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x1186
movsd 0x40(%rsp), %xmm0
movapd %xmm0, %xmm2
movsd 0x18(%rsp), %xmm1
subsd %xmm1, %xmm2
andpd 0x1dac(%rip), %xmm2     # 0x3010
ucomisd 0x1db4(%rip), %xmm2     # 0x3020
jbe 0x1285
leaq 0x1e4e(%rip), %rdi      # 0x30c3
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x1186
movsd 0x38(%rsp), %xmm0
movapd %xmm0, %xmm2
movsd 0x28(%rsp), %xmm1
subsd %xmm1, %xmm2
andpd 0x1d6f(%rip), %xmm2     # 0x3010
ucomisd 0x1d77(%rip), %xmm2     # 0x3020
jbe 0x12c2
leaq 0x1e17(%rip), %rdi      # 0x30c9
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x1186
movsd 0x20(%rsp), %xmm0
movapd %xmm0, %xmm2
movsd 0x30(%rsp), %xmm1
subsd %xmm1, %xmm2
andpd 0x1d32(%rip), %xmm2     # 0x3010
ucomisd 0x1d3a(%rip), %xmm2     # 0x3020
jbe 0x12ff
leaq 0x1de3(%rip), %rdi      # 0x30d2
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x1186
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq