LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mijallen[P]SimpleHTTPServer/lib/libyaml/tests/run-scanner.c
// Function: main
int
main(int argc, char *argv[])
{
    int number;

    if (argc < 2) {
        printf("Usage: %s file1.yaml ...\n", argv[0]);
        return 0;
    }

    for (number = 1; number < argc; number ++)
    {
        FILE *file;
        yaml_parser_t parser;
        yaml_token_t token;
        int done = 0;
        int count = 0;
        int error = 0;

        printf("[%d] Scanning '%s': ", number, argv[number]);
        fflush(stdout);

        file = fopen(argv[number], "rb");
        assert(file);

        assert(yaml_parser_initialize(&parser));

        yaml_parser_set_input_file(&parser, file);

        while (!done)
        {
            if (!yaml_parser_scan(&parser, &token)) {
                error = 1;
                break;
            }

            done = (token.type == YAML_STREAM_END_TOKEN);

            yaml_token_delete(&token);

            count ++;
        }

        yaml_parser_delete(&parser);

        assert(!fclose(file));

        printf("%s (%d tokens)\n", (error ? "FAILURE" : "SUCCESS"), count);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
cmpl $0x2, %edi
jge 0x11fb
movq (%rbx), %rsi
leaq 0xe15(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x12f4
movl %edi, %eax
movq %rax, (%rsp)
movl $0x1, %r14d
leaq 0x68(%rsp), %r13
leaq 0x18(%rsp), %rbp
movq %rbx, 0x8(%rsp)
movq (%rbx,%r14,8), %rdx
leaq 0xdfd(%rip), %rdi       # 0x201e
movl %r14d, %esi
xorl %eax, %eax
callq 0x1060
movq 0x2dae(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x10a0
movq (%rbx,%r14,8), %rdi
leaq 0xdee(%rip), %rsi       # 0x2033
callq 0x10b0
testq %rax, %rax
je 0x1308
movq %rax, %r12
movq %r14, 0x10(%rsp)
movq %r13, %rdi
callq 0x1090
testl %eax, %eax
je 0x1327
movq %r13, %rdi
movq %r12, %rsi
callq 0x1030
xorl %r15d, %r15d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1040
movl %eax, %ebx
testl %eax, %eax
je 0x12a0
movl 0x18(%rsp), %r14d
movq %rbp, %rdi
callq 0x10c0
incl %r15d
cmpl $0x2, %r14d
jne 0x1279
movq %r13, %rdi
callq 0x1080
movq %r12, %rdi
callq 0x1050
testl %eax, %eax
jne 0x1346
testl %ebx, %ebx
leaq 0xde5(%rip), %rsi       # 0x20a6
leaq 0xdd6(%rip), %rax       # 0x209e
cmoveq %rax, %rsi
leaq 0xdbb(%rip), %rdi       # 0x208e
movl %r15d, %edx
xorl %eax, %eax
callq 0x1060
movq 0x10(%rsp), %r14
incq %r14
cmpq (%rsp), %r14
movq 0x8(%rsp), %rbx
jne 0x1216
xorl %eax, %eax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd27(%rip), %rdi       # 0x2036
leaq 0xd25(%rip), %rsi       # 0x203b
leaq 0xd2c(%rip), %rcx       # 0x2049
movl $0x22, %edx
callq 0x1070
leaq 0xd32(%rip), %rdi       # 0x2060
leaq 0xd06(%rip), %rsi       # 0x203b
leaq 0xd0d(%rip), %rcx       # 0x2049
movl $0x24, %edx
callq 0x1070
leaq 0xd33(%rip), %rdi       # 0x2080
leaq 0xce7(%rip), %rsi       # 0x203b
leaq 0xcee(%rip), %rcx       # 0x2049
movl $0x38, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/crossassemblers/macro8x/macro8x.c
// Function: punchObject
void punchObject( WORD32 val )
{
  val &= 0377;
  if( objectfile != NULL )
  {
    fputc( val, objectfile );
    checksum += val;
  }
  binary_data_output = TRUE;
}

// Assembly:
movq 0x6cbc(%rip), %rsi      # 0xd2e0
testq %rsi, %rsi
je 0x663c
pushq %rbx
movzbl %dil, %ebx
movl %ebx, %edi
callq 0x20e0
addl %ebx, 0x6c15(%rip)      # 0xd250
popq %rbx
movb $0x1, 0x4b4d(%rip)      # 0xb190
retq
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/crossassemblers/macro8x/macro8x.c
// Function: printLine
void printLine( char *line, WORD32 loc, WORD32 val, LINESTYLE_T linestyle )
{
  if( listfile == NULL )
  {
    save_error_count = 0;
    return;
  }

  printPageBreak();

  list_lineno++;
  page_lineno++;
  switch( linestyle )
  {
  default:
  case LINE:
    fprintf( listfile, "%5d             ", lineno );
    fputs( line, listfile );
    listed = TRUE;
    break;

  case LINE_VAL:
    if( !listed )
    {
      fprintf( listfile, "%5d       %4.4o  ", lineno, val );
      fputs( line, listfile );
      listed = TRUE;
    }
    else
    {
      fprintf( listfile, "            %4.4o\n", val );
    }
    break;

  case LINE_LOC_VAL:
    if( !listed )
    {
      if( indirect_generated && lgm_flag )
      {
        fprintf( listfile, "%5d %5.5o %4.4o@ ", lineno, loc, val );
      }
      else
      {
        fprintf( listfile, "%5d %5.5o %4.4o  ", lineno, loc, val );
      }
      fputs( line, listfile );
      listed = TRUE;
    }
    else
    {
      fprintf( listfile, "      %5.5o %4.4o\n", loc, val );
    }
    break;

  case LOC_VAL:
    fprintf( listfile, "      %5.5o %4.4o\n", loc, val );
    break;
  }
  printErrorMessages();
}

// Assembly:
cmpq $0x0, 0x95d8(%rip)      # 0xd370
je 0x3dee
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x6456
incl 0xa322(%rip)            # 0xe0d8
incl 0xa324(%rip)            # 0xe0e0
cmpl $0x1, %r15d
je 0x3e20
cmpl $0x2, %r15d
je 0x3df9
cmpl $0x3, %r15d
je 0x3e02
movq 0x959b(%rip), %rdi      # 0xd370
movl 0xa2f5(%rip), %edx      # 0xe0d0
leaq 0x3a3d(%rip), %rsi      # 0x781f
xorl %eax, %eax
callq 0x2120
jmp 0x3e97
movl $0x0, 0x9434(%rip)      # 0xd22c
retq
cmpl $0x0, 0xa2c8(%rip)      # 0xe0c8
je 0x3e42
movq 0x9567(%rip), %rdi      # 0xd370
leaq 0x3a69(%rip), %rsi      # 0x7879
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2120
jmp 0x3eb0
cmpl $0x0, 0xa2a1(%rip)      # 0xe0c8
movq 0x9542(%rip), %rdi      # 0xd370
je 0x3e81
leaq 0x3a0b(%rip), %rsi      # 0x7842
movl %ebx, %edx
xorl %eax, %eax
callq 0x2120
jmp 0x3eb0
cmpb $0x0, 0xa283(%rip)      # 0xe0cc
leaq 0x3a05(%rip), %rsi      # 0x7855
leaq 0x3a10(%rip), %rax      # 0x7867
cmoveq %rax, %rsi
cmpb $0x0, 0xa5b2(%rip)      # 0xe414
movq 0x9507(%rip), %rdi      # 0xd370
movl 0xa261(%rip), %edx      # 0xe0d0
cmoveq %rax, %rsi
movl %ebp, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x2120
jmp 0x3e97
movl 0xa249(%rip), %edx      # 0xe0d0
leaq 0x39a2(%rip), %rsi      # 0x7830
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2120
movq 0x94d2(%rip), %rsi      # 0xd370
movq %r14, %rdi
callq 0x20c0
movl $0x1, 0xa218(%rip)      # 0xe0c8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x64c3
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/crossassemblers/macro8x/macro8x.c
// Function: lexemeToName
char *lexemeToName( char *name, WORD32 from, WORD32 term )
{
  WORD32  to;

  to = 0;

  while( from < term && to < ( SYMLEN - 1 ))
  {
    name[to++] = toupper( line[from++] );
  }

  while( to < SYMLEN )
  {
    name[to++] = '\0';
  }
  return( name );
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %ecx, %ecx
cmpl %edx, %esi
jge 0x403b
movl %edx, %ebp
movl %esi, %r14d
callq 0x2030
movslq %r14d, %rdx
movslq %ebp, %rsi
leaq 0x1(%rdx), %rdi
xorl %r8d, %r8d
leaq 0xa0df(%rip), %r9       # 0xe0f0
movq (%rax), %rcx
leaq (%rdi,%r8), %r10
leaq (%rdx,%r8), %r11
movsbq (%r9,%r11), %r11
movb (%rcx,%r11,4), %r11b
leaq 0x1(%r8), %rcx
movb %r11b, (%rbx,%r8)
cmpq %rsi, %r10
jge 0x403b
cmpq $0x5, %r8
movq %rcx, %r8
jb 0x4011
movl %ecx, %edi
addq %rbx, %rdi
movl $0x7, %edx
subl %ecx, %edx
xorl %esi, %esi
callq 0x20d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/crossassemblers/macro8x/macro8x.c
// Function: errorMessage
void errorMessage( EMSG_T *mesg, WORD32 col )
{
  char   linecol[12];

  if( pass == 2 )
  {
    errors++;
    sprintf( linecol, "(%d:%d)", lineno, col + 1 );
    fprintf( errorfile, "%s%-9s : error:  %s at Loc = %5.5o\n",
                                         filename, linecol, mesg->file, clc );
    saveError( mesg->list, col );
  }
  error_in_line = TRUE;
}

// Assembly:
cmpl $0x2, 0x7b2d(%rip)      # 0xd230
jne 0x5775
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
incl 0x7b0f(%rip)            # 0xd228
movl 0x89b1(%rip), %edx      # 0xe0d0
leal 0x1(%rbx), %ecx
leaq 0x2239(%rip), %rsi      # 0x7962
leaq 0x4(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2160
movq 0x7ae1(%rip), %rdi      # 0xd220
movq 0x8(%r14), %r8
movl 0x7d56(%rip), %r9d      # 0xd4a0
leaq 0x2242(%rip), %rsi      # 0x7993
leaq 0x7cc8(%rip), %rdx      # 0xd420
movq %r15, %rcx
xorl %eax, %eax
callq 0x2120
movq (%r14), %rdi
movl %ebx, %esi
callq 0x6a5e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
movb $0x1, 0x8af8(%rip)      # 0xe274
retq
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/readseek3.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDONLY);
	unsigned long offset = getpagesize() * nr;

	assert(fd >= 0);

	while (1) {
		lseek(fd, offset, SEEK_SET);
		assert(read(fd, buf, BUFLEN) == BUFLEN);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2430(%rip), %rdi      # 0x51a0
xorl %esi, %esi
xorl %eax, %eax
callq 0x2230
movl %eax, %ebp
callq 0x22a0
testl %ebp, %ebp
js 0x2df6
movslq %eax, %r14
imulq %r15, %r14
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2120
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x2170
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2dd7
movq %rsp, %r15
incq (%rbx)
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2120
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r15, %rsi
callq 0x2170
cmpq $0x1000, %rax           # imm = 0x1000
je 0x2db1
leaq 0x56b(%rip), %rdi       # 0x3349
leaq 0x4f4(%rip), %rsi       # 0x32d9
leaq 0x52a(%rip), %rcx       # 0x3316
movl $0x28, %edx
callq 0x2130
leaq 0x4d4(%rip), %rdi       # 0x32d1
leaq 0x4d5(%rip), %rsi       # 0x32d9
leaq 0x50b(%rip), %rcx       # 0x3316
movl $0x24, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/map_test.c
// Function: kvmap_help_message
static void
kvmap_help_message(void)
{
  fprintf(stderr, "%s Usage: <stdout> <stderr> {api ... {rgen ... {pass ...}}}\n", __func__);
  kvmap_api_helper_message();
  maptest_passes_message();
  fprintf(stderr, "set MAP_TEST_PERF=y to enable perf recording\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x149bb(%rip), %rbx     # 0x1aff8
movq (%rbx), %rdi
leaq 0xda11(%rip), %rsi      # 0x14058
leaq 0xda47(%rip), %rdx      # 0x14095
xorl %eax, %eax
callq 0x62f0
callq 0x68bb
callq 0x6960
movq (%rbx), %rcx
leaq 0xda3f(%rip), %rdi      # 0x140a8
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6540
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/map_test.c
// Function: test_kvmap
static int
test_kvmap(const int argc, char ** const argv)
{
  struct oalloc * const oa = oalloc_create();
  debug_assert(oa);
  struct kvmap_mm mm = { .af = (kv_alloc_func)oalloc_alloc, .ap = oa, };
  //struct kvmap_mm mm = { .af = kv_alloc_malloc, .rf = kv_retire_free, };
  struct kvmap_api * api = NULL;
  const int n1 = kvmap_api_helper(argc, argv, &api, &mm, false);
  if (n1 < 0) {
    kvmap_help_message();
    oalloc_destroy(oa);
    return n1;
  }

  char *pref[64] = {};
  for (int i = 0; i < n1; i++) {
    pref[i] = argv[i];
  }
  pref[n1] = NULL;

  struct pass_info pi = {};
  pi.api = api;
  pi.vctr_size = 8;
  pi.wf = kvmap_worker;
  pi.af = kvmap_analyze;
  const int n2 = maptest_passes(argc - n1, argv + n1, pref, &pi);

  kvmap_api_destroy(api);
  oalloc_destroy(oa);
  if (n2 < 0) {
    kvmap_help_message();
    return n2;
  } else {
    return n1 + n2;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rsi, %r12
movl %edi, %r15d
callq 0x8397
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x7597
vxorps %xmm0, %xmm0, %xmm0
leaq -0xa8(%rbp), %rcx
vmovups %ymm0, 0x30(%rcx)
vmovups %ymm0, 0x10(%rcx)
leaq 0x158f(%rip), %rax      # 0x83e6
movq %rax, (%rcx)
movq %rbx, 0x8(%rcx)
leaq -0x30(%rbp), %rdx
movq $0x0, (%rdx)
movl %r15d, %edi
movq %r12, %rsi
xorl %r8d, %r8d
vzeroupper
callq 0xba96
movl %eax, %r14d
testl %eax, %eax
js 0x6f38
leaq -0x2b0(%rbp), %rdi
xorl %r13d, %r13d
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x6200
testl %r14d, %r14d
je 0x6eba
movl %r14d, %r13d
leaq (,%r13,8), %rdx
leaq -0x2b0(%rbp), %rdi
movq %r12, %rsi
callq 0x6330
xorl %eax, %eax
movq %rax, -0x2b0(%rbp,%r13,8)
leaq -0x58(%rbp), %rcx
movq %rax, (%rcx)
movq -0x30(%rbp), %rax
movq %rax, 0x8(%rcx)
movq $0x8, 0x10(%rcx)
leaq 0x6f(%rip), %rax        # 0x6f51
movq %rax, 0x18(%rcx)
leaq 0xfb(%rip), %rax        # 0x6fe8
movq %rax, 0x20(%rcx)
subl %r14d, %r15d
leaq (%r12,%r13,8), %rsi
leaq -0x2b0(%rbp), %rdx
movl %r15d, %edi
callq 0x13014
movl %eax, %r15d
movq -0x30(%rbp), %rdi
callq 0xba6d
movq %rbx, %rdi
callq 0x85fd
testl %r15d, %r15d
js 0x6f47
addl %r15d, %r14d
movl %r14d, %eax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6630
movq %rbx, %rdi
callq 0x85fd
jmp 0x6f23
callq 0x6630
movl %r15d, %r14d
jmp 0x6f23
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/map_test.c
// Function: kvmap_worker
static void *
kvmap_worker(void * const ptr)
{
  struct maptest_worker_info * const info = (typeof(info))ptr;
  const u64 end_magic = info->end_magic;
  info->priv = malloc(2048);
  srandom_u64(info->seed);
  if (info->end_type == MAPTEST_END_TIME) {
    do {
      kvmap_mix_batch(info, 4096);
    } while (time_nsec() < end_magic);
  } else if (info->end_type == MAPTEST_END_COUNT) {
    u64 count = 0;
    do {
      const u64 nr = (end_magic - count) > 4096 ? 4096 : (end_magic - count);
      kvmap_mix_batch(info, nr);
      count += nr;
    } while (count < end_magic);
  }
  free(info->priv);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %r15
movl $0x800, %edi            # imm = 0x800
callq 0x6390
movq %rax, 0x58(%rbx)
movq 0x20(%rbx), %rdi
callq 0x9b39
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x6fb7
cmpq $0x1, %rax
jne 0x6fce
xorl %r12d, %r12d
movl $0x1000, %r13d          # imm = 0x1000
movq %r15, %r14
subq %r12, %r14
cmpq %r13, %r14
cmovaeq %r13, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x70b5
addq %r14, %r12
cmpq %r15, %r12
jb 0x6f95
jmp 0x6fce
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x70b5
callq 0x73a4
cmpq %r15, %rax
jb 0x6fb7
movq 0x58(%rbx), %rdi
callq 0x6060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/map_test.c
// Function: kvmap_analyze
static bool
kvmap_analyze(struct vctr * const va, const double dt, struct damp * const damp, char * const out)
{
  u64 v[8];
  for (u64 i = 0; i < 8; i++) {
    v[i] = vctr_get(va, i);
  }

  const u64 nrop = v[XSA] + v[XDA] + v[XGA] + v[XPA];
  const double mops = ((double)nrop) / (dt * 1.0e6);
  const bool done = damp_add_test(damp, mops);
  const double havg = damp_average(damp);
  const char * const pat = " set %"PRIu64" %"PRIu64" del %"PRIu64" %"PRIu64
      " get %"PRIu64" %"PRIu64" pro %"PRIu64" %"PRIu64" mops %.4lf havg %.4lf\n";
  sprintf(out, pat, v[XSA], v[XSS], v[XDA], v[XDS], v[XGA], v[XGS], v[XPA], v[XPS], mops, havg);
  return done;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, %r14
vmovsd %xmm0, -0x30(%rbp)
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0x9a73
movq %rax, -0x80(%rbp,%r12,8)
incq %r12
cmpq $0x8, %r12
jne 0x700b
movq -0x80(%rbp), %r12
movq -0x70(%rbp), %r15
movq -0x60(%rbp), %rbx
movq -0x50(%rbp), %r13
leaq (%rbx,%r13), %rcx
addq %r15, %rcx
addq %r12, %rcx
vcvtusi2sd %rcx, %xmm1, %xmm0
vmovsd -0x30(%rbp), %xmm1
vmulsd 0xcfb7(%rip), %xmm1, %xmm1 # 0x14008
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rbp)
movq %r14, %rdi
callq 0x989b
movb %al, -0x30(%rbp)
movq %r14, %rdi
callq 0x97af
vmovapd %xmm0, %xmm1
movq -0x78(%rbp), %rcx
movq -0x68(%rbp), %r9
leaq 0xcf90(%rip), %rsi      # 0x14010
movq -0x40(%rbp), %rdi
movq %r12, %rdx
movq %r15, %r8
vmovsd -0x38(%rbp), %xmm0
movb $0x2, %al
pushq -0x48(%rbp)
pushq %r13
pushq -0x58(%rbp)
pushq %rbx
callq 0x6510
addq $0x20, %rsp
movb -0x30(%rbp), %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/map_test.c
// Function: kvmap_mix_batch
static void
kvmap_mix_batch(const struct maptest_worker_info * const info, const u64 nr)
{
  struct kvmap_api * const api = (typeof(api))info->api;
  struct kv * const kv = (typeof(kv))info->priv;
  struct kv * const out = (typeof(out))(((u8*)info->priv)+384);
  struct vctr * const v = info->vctr;
  rgen_next_func next = info->rgen_next;

  for (u64 i = 0; i < nr; i++) {
    const u64 x = next(info->gen);
    kv_refill(kv, &x, sizeof(x), "", 0);
    const u64 y = random_u64() % 100lu;
    if (y < info->pset) { // SET
      vctr_add1(v, XSA);
      kv->vlen = info->vlen;
      if (api->set(api->map, kv)) vctr_add1(v, XSS);
    } else if (y < info->pdel) { // DEL
      vctr_add1(v, XDA);
      if (api->del(api->map, kv)) vctr_add1(v, XDS);
    } else if (y < info->pget) { // GET
      vctr_add1(v, XGA);
      if (api->get(api->map, kv, out)) vctr_add1(v, XGS);
    } else { // PROBE
      vctr_add1(v, XPA);
      if (api->probe(api->map, kv)) vctr_add1(v, XPS);
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x7201
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
movq 0x58(%rdi), %r15
leaq 0x180(%r15), %rax
movq %rax, -0x30(%rbp)
movq 0x60(%rdi), %r13
movq 0x10(%r14), %rdi
callq *-0x38(%rbp)
movq %rax, -0x40(%rbp)
movq %r15, %rdi
leaq -0x40(%rbp), %rsi
movl $0x8, %edx
leaq 0xd69b(%rip), %rcx      # 0x147ad
xorl %r8d, %r8d
callq 0xb5fb
callq 0x858e
movq %rax, %rdx
shrq $0x2, %rdx
movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3
mulxq %rcx, %rcx, %rcx
shrq $0x2, %rcx
imulq $0x64, %rcx, %rcx
subq %rcx, %rax
cmpq 0x30(%r14), %rax
jae 0x716b
movq %r13, %rdi
xorl %esi, %esi
callq 0x9a31
movl 0x28(%r14), %eax
movl %eax, 0xc(%r15)
movq (%r12), %rdi
movq %r15, %rsi
callq *0x18(%r12)
movl $0x1, %esi
jmp 0x71de
cmpq 0x38(%r14), %rax
jae 0x7191
movl $0x2, %esi
movq %r13, %rdi
callq 0x9a31
movq (%r12), %rdi
movq %r15, %rsi
callq *0x20(%r12)
movl $0x3, %esi
jmp 0x71de
cmpq 0x40(%r14), %rax
jae 0x71c0
movl $0x4, %esi
movq %r13, %rdi
callq 0x9a31
movq (%r12), %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
callq *0x8(%r12)
movl $0x5, %esi
testq %rax, %rax
jne 0x71e2
jmp 0x71ea
movl $0x6, %esi
movq %r13, %rdi
callq 0x9a31
movq (%r12), %rdi
movq %r15, %rsi
callq *0x10(%r12)
movl $0x7, %esi
testb %al, %al
je 0x71ea
movq %r13, %rdi
callq 0x9a31
decq %rbx
jne 0x70f4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cktan[P]tomlc99/toml_sample.c
// Function: main
int main() {
  FILE *fp;
  char errbuf[200];

  // 1. Read and parse toml file
  fp = fopen("sample.toml", "r");
  if (!fp) {
    fatal("cannot open sample.toml - ", strerror(errno));
  }

  toml_table_t *conf = toml_parse_file(fp, errbuf, sizeof(errbuf));
  fclose(fp);

  if (!conf) {
    fatal("cannot parse - ", errbuf);
  }

  // 2. Traverse to a table.
  toml_table_t *server = toml_table_in(conf, "server");
  if (!server) {
    fatal("missing [server]", "");
  }

  // 3. Extract values
  toml_datum_t host = toml_string_in(server, "host");
  if (!host.ok) {
    fatal("cannot read server.host", "");
  }

  toml_array_t *portarray = toml_array_in(server, "port");
  if (!portarray) {
    fatal("cannot read server.port", "");
  }

  printf("host: %s\n", host.u.s);
  printf("port: ");
  for (int i = 0;; i++) {
    toml_datum_t port = toml_int_at(portarray, i);
    if (!port.ok)
      break;
    printf("%d ", (int)port.u.i);
  }
  printf("\n");

  // 4. Free memory
  free(host.u.s);
  toml_free(conf);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
leaq 0x3c22(%rip), %rdi      # 0x5004
leaq 0x4123(%rip), %rsi      # 0x550c
callq 0x1180
testq %rax, %rax
je 0x14ef
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
movl $0xc8, %edx
callq 0x2b2c
movq %rax, %rbx
movq %r14, %rdi
callq 0x1090
testq %rbx, %rbx
je 0x14f4
leaq 0x3c16(%rip), %rsi      # 0x503b
movq %rbx, %rdi
callq 0x2f73
testq %rax, %rax
je 0x14fc
movq %rax, %r15
leaq 0x3c26(%rip), %rsi      # 0x5066
movq %rax, %rdi
callq 0x3ed2
testl %eax, %eax
je 0x1501
movq %rdx, %r14
leaq 0x3c24(%rip), %rsi      # 0x507e
movq %r15, %rdi
callq 0x2f2c
testq %rax, %rax
je 0x1506
movq %rax, %r15
leaq 0x3c0e(%rip), %rdi      # 0x5083
movq %r14, %rsi
xorl %eax, %eax
callq 0x10c0
leaq 0x3c07(%rip), %rdi      # 0x508d
xorl %eax, %eax
callq 0x10c0
movq %r15, %rdi
xorl %esi, %esi
callq 0x3d44
testl %eax, %eax
je 0x14c3
movl $0x1, %ebp
leaq 0x3bed(%rip), %r12      # 0x5094
movq %r12, %rdi
movl %edx, %esi
xorl %eax, %eax
callq 0x10c0
movq %r15, %rdi
movl %ebp, %esi
callq 0x3d44
incl %ebp
testl %eax, %eax
jne 0x14a7
movl $0xa, %edi
callq 0x1040
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x2b27
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1298
movq %rsp, %rdi
callq 0x126d
callq 0x123e
callq 0x120f
callq 0x11e0
nop
// File: /workspace/github_c_makefile_star2_O3/aparrish[P]rwet-examples-c/forfinder.c
// Function: main
int main(int argc, char** argv) {
	char* target_pos;
	char* line = NULL;
	int len;

	if (argc != 2) {
		fprintf(stderr, "please supply target string\n");
		exit(-1);
	}

	while (!feof(stdin)) {
		len = ap_getline(&line, stdin);
		target_pos = strstr(line, argv[1]);
		if (target_pos) printf("%s", target_pos);
		free(line);
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq $0x0, 0x8(%rsp)
cmpl $0x2, %edi
jne 0x1283
movq %rsi, %rbx
movq 0x2dc7(%rip), %r13      # 0x3fd8
movq (%r13), %rdi
callq 0x1050
testl %eax, %eax
jne 0x1273
leaq 0x8(%rsp), %r14
leaq 0xdf7(%rip), %r15       # 0x2021
movq (%r13), %rsi
movq %r14, %rdi
callq 0x1288
movq 0x8(%rsp), %r12
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x10b0
testq %rax, %rax
je 0x125e
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1040
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x1030
movq (%r13), %rdi
callq 0x1050
testl %eax, %eax
je 0x122a
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/rmd160.c
// Function: MDfinish
void MDfinish(dword *MDbuf, byte *strptr, dword lswlen, dword mswlen)
{
   unsigned int i;                                 /* counter       */
   dword        X[16];                             /* message words */

   memset(X, 0, 16*sizeof(dword));

   /* put bytes from strptr into X */
   for (i=0; i<(lswlen&63); i++) {
      /* byte i goes into word X[i div 4] at pos.  8*(i mod 4)  */
      X[i>>2] ^= (dword) *strptr++ << (8 * (i&3));
   }

   /* append the bit m_n == 1 */
   X[(lswlen>>2)&15] ^= (dword)1 << (8*(lswlen&3) + 7);

   if ((lswlen & 63) > 55) {
      /* length goes to next block */
      compress(MDbuf, X);
      memset(X, 0, 16*sizeof(dword));
   }

   /* append length in bits*/
   X[14] = lswlen << 3;
   X[15] = (lswlen >> 29) | (mswlen << 3);
   compress(MDbuf, X);

   return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edx, %eax
andl $0x3f, %eax
je 0x3704
xorl %edx, %edx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movl %edx, %ecx
andb $0x18, %cl
shll %cl, %r8d
movl %edi, %ecx
andl $-0x4, %ecx
xorl %r8d, (%rsp,%rcx)
incq %rdi
addl $0x8, %edx
cmpl %edi, %eax
jne 0x36e4
leal (,%r15,8), %ebp
movl $0x80, %edx
movl %ebp, %ecx
shll %cl, %edx
movl %r15d, %ecx
andl $0x3c, %ecx
xorl %edx, (%rsp,%rcx)
cmpl $0x38, %eax
jb 0x374b
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x23be
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %rsp, %rsi
movl %ebp, 0x38(%rsi)
shldl $0x3, %r15d, %ebx
movl %ebx, 0x3c(%rsi)
movq %r14, %rdi
callq 0x23be
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/mp.c
// Function: mp96_mul
void
mp96_mul(byte *b,byte *b1,byte *b2)
/*
 * Computes b=b1*b2
 * overflow goes undetected
 */
{
	int i,j;
	unsigned int h,carry;
	byte b1copy[L],b2copy[L],bpart[L];

	/*
	 * Make copies of input in case one of the inputs is also output
	 */
	mp96_assign(b1copy, b1);
	mp96_assign(b2copy, b2);

	/*
	 * Here if an input is also output the input gets overwritten
	 */
	mp96_zero(b);

	for (i=L-1; i>=0; i--) {
		for (j=L-1; j>i; j--)
			bpart[j] = 0;
		carry=0;
		for (j=i; j>=0; j--) {
			h = b1copy[i]*b2copy[L-1+j-i]+carry;
			carry = h/256;
			bpart[j] = h;
		}
		(void) mp96_add(b,b,bpart);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rsp)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rsp)
movq (%rdx), %rax
leaq 0x23(%rsp), %r14
movq %rax, -0xb(%r14)
movl 0x8(%rdx), %eax
movl %eax, -0x3(%r14)
movl $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
leaq 0x17(%rsp), %r15
movl $0xb, %r12d
movl $0xc, %r13d
xorl %ebp, %ebp
cmpq $0xa, %r12
ja 0x3882
leal -0x1(%rbp), %edx
movq %r15, %rdi
subq %rdx, %rdi
incq %rdx
xorl %esi, %esi
callq 0x20f0
movzbl (%rsp,%r12), %eax
xorl %edx, %edx
movq %r14, %rcx
movq %r13, %rsi
movzbl (%rcx), %edi
imull %eax, %edi
addl %edx, %edi
movl %edi, %edx
shrl $0x8, %edx
movb %dil, 0xb(%rsp,%rsi)
decq %rcx
decq %rsi
jg 0x388f
xorl %ecx, %ecx
movl $0xb, %eax
movzbl (%rbx,%rax), %edx
addl %ecx, %edx
movzbl 0xc(%rsp,%rax), %esi
addl %edx, %esi
xorl %ecx, %ecx
cmpl $0x100, %esi            # imm = 0x100
setae %cl
movb %sil, (%rbx,%rax)
addq $-0x1, %rax
jb 0x38b0
decq %r12
incq %rbp
decq %r13
cmpq $0xc, %rbp
jne 0x3869
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/binomial.c
// Function: binomial_start
void
binomial_start(void)
/*
 * Precomputes all numbers (n over k) with k<=NCARDSPERHAND and
 * n<=NCARDSPERDECK.
 * Numbers are stored in pascal_triangle[][] with L bytes precision (96 bits)
 *
 * Calculation method is the addition from the top of the triangle
 * with the equation:
 * 	n_over_k(n,k) = n_over_k(n-1, k-1) + n_over_k(n-1, k)
 * except for some boundary condition situations
 */
{
	int i,j,min;

	for (i=0; i<=NCARDSPERDECK; i++) {
		if (i<NCARDSPERHAND)
			min = i;
		else
			min = NCARDSPERHAND;
		for (j=0; j<=min; j++) {
			if (i==j || j==0)
				mp96_one(pascal_triangle[i][j]);
			else
				mp96_add(pascal_triangle[i][j],
					   pascal_triangle[i-1][j],
					   pascal_triangle[i-1][j-1]);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x5fe0(%rip), %rbx      # 0x98e0
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq $0xd, %r15
movl $0xd, %eax
cmovbq %r15, %rax
leaq (%rax,%rax,2), %rax
leaq 0xc(,%rax,4), %r12
xorl %r13d, %r13d
cmpq %r13, %r14
setne %al
testq %r13, %r13
setne %cl
leaq (%rbx,%r13), %rdi
testb %cl, %al
jne 0x393d
callq 0x377f
jmp 0x3958
leaq (%rbx,%r13), %rsi
addq $-0xa8, %rsi
leaq (%rbx,%r13), %rdx
addq $-0xb4, %rdx
callq 0x379f
addq $0xc, %r13
cmpq %r13, %r12
jne 0x3922
incq %r15
addq $0xc, %r14
addq $0xa8, %rbx
cmpq $0x35, %r15
jne 0x3906
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/main.c
// Function: readline
static int
readline(FILE *ifile, char *buf, int len)
/*
 * Read line into buf
 * Check for length, discard trailing \n
 */
{
	char *eol;

	if(fgets(buf, len, ifile) == NULL)
		return 0;
	eol = strchr(buf, '\n');
	if (eol)
		*eol = 0;
	return 1;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x2140
testq %rax, %rax
je 0x3dea
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x3dec
movb $0x0, (%rcx)
jmp 0x3dec
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/main.c
// Function: read_init_file
void
read_init_file(char *ifname, int write_when_absent)
/*
 * Read init file
 */
{
	FILE *ifile;
	char buf[MESSLEN+LONGESTKEYWORD];
	char *eqptr;
	struct ifrecord *ifrp;

	ifile = fopen(ifname, "r");
	if (ifile == NULL) {
		if (write_when_absent)
			write_init_file(ifname);
		return;
	}
	while (readline(ifile, buf, MESSLEN+LONGESTKEYWORD)) {
		if (buf[0] == 0)
			continue;		/* empty line */
		if (strcmp(buf, init_header)==0)
			continue;		/* header for Windows routines */
		if (buf[0] == '[')
			break;			/* end of our stuff */
		eqptr = strchr(buf, '=');
		if (eqptr == 0) {
			fprintf(stderr, "Line '%s' does not contain =\n", buf);
			fprintf(stderr, "Suggest rerun program with -R flag\n");
			continue;
		}
		*eqptr++ = 0;
		for (ifrp=init_file; ifrp->if_keyword; ifrp++) {
			if (strcmp(ifrp->if_keyword, buf)==0) {
				strcpy(ifrp->if_value, eqptr);
				break;
			}
		}
		if (!ifrp->if_keyword) {
			fprintf(stderr, "Keyword %s in init_file unknown\n", buf);
			fprintf(stderr, "Suggest rerun program with -R flag\n");
		}
	}
	fclose(ifile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x2812(%rip), %rsi      # 0x661a
callq 0x21a0
testq %rax, %rax
je 0x3f14
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movl $0x78, %edx
callq 0x3db2
testl %eax, %eax
je 0x3efd
movq %rsp, %r14
leaq 0x5465(%rip), %r15      # 0x92a0
leaq 0x22d2(%rip), %rbp      # 0x6114
movb (%rsp), %r12b
testb %r12b, %r12b
je 0x3ee5
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
testl %eax, %eax
je 0x3ee5
cmpb $0x5b, %r12b
je 0x3efd
movq %r14, %rdi
movl $0x3d, %esi
callq 0x20b0
movq %rax, %r12
leaq 0x224f(%rip), %rax      # 0x60d2
testq %r12, %r12
je 0x3eda
movb $0x0, (%r12)
movq 0x53cc(%rip), %rdi      # 0x9260
movq %rbp, %rax
testq %rdi, %rdi
je 0x3eda
incq %r12
leaq 0x53ca(%rip), %r13      # 0x9270
movq %r14, %rsi
callq 0x2150
testl %eax, %eax
je 0x3ec4
movq (%r13), %rdi
addq $0x10, %r13
testq %rdi, %rdi
jne 0x3ea6
movq %rbp, %rax
jmp 0x3eda
movq -0x8(%r13), %rdi
movq %r12, %rsi
callq 0x2050
cmpq $0x0, -0x10(%r13)
movq %rbp, %rax
jne 0x3ee5
movq %rax, %rdi
movq %r14, %rsi
callq 0x2210
movq %rbx, %rdi
movq %r14, %rsi
movl $0x78, %edx
callq 0x3db2
testl %eax, %eax
jne 0x3e42
movq %rbx, %rdi
callq 0x2080
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
je 0x3f05
movq %r14, %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3bd4
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/main.c
// Function: setboards
void
setboards(char *a) {
	char *chptr;

	chptr =strchr(a,'-');
	if (chptr) {
		*chptr++ = 0;
		parameters.pp_lowboard = atoi(a);
		parameters.pp_highboard = atoi(chptr);
	} else {
		parameters.pp_lowboard = 1;
		parameters.pp_highboard = atoi(a);
	}
	parameters.pp_nboards =
	    parameters.pp_highboard - parameters.pp_lowboard + 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2d, %esi
callq 0x20b0
testq %rax, %rax
je 0x3f67
movq %rax, %r14
incq %r14
movb $0x0, (%rax)
movq %rbx, %rdi
callq 0x21c0
movl %eax, %ebx
movl %eax, 0x7c53(%rip)      # 0xbbb0
movq %r14, %rdi
callq 0x21c0
jmp 0x3f7e
movl $0x1, 0x7c3f(%rip)      # 0xbbb0
movq %rbx, %rdi
callq 0x21c0
movl $0x1, %ebx
movl %eax, 0x7c30(%rip)      # 0xbbb4
subl %ebx, %eax
incl %eax
movl %eax, 0x7c2a(%rip)      # 0xbbb8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/main.c
// Function: RMDhash
static byte *
RMDhash(byte *value, int length)
/*
 * Hashes value of length bytes using RIPEMD160
 *
 * Returns pointer to 20 bytes hashcode
 */
{
	dword         MDbuf[RMDdwords];		/* contains (A, B, C, D(, E)) */
	dword	      X[16];			/* current 16 word chunk      */
	static byte   hashcode[RMDbytes];	/* for final hash-value       */
	unsigned int  i;			/* counter                    */
	int	      nbytes;			/* bytes not yet processed    */

	/* initialize */
	MDinit(MDbuf);

	/* Process value in 16-word chunks */
	for (nbytes=length; nbytes>=64; nbytes-=64) {
		for (i=0; i<16; i++) {
			X[i] = BYTES_TO_DWORD(value);
			value += 4;
		}
		compress(MDbuf, X);
	}
		
	/* finish: */
	MDfinish(MDbuf, value, length, 0);

	for (i=0; i<RMDbytes; i+=4) {
		hashcode[i]   =  MDbuf[i>>2];        /* implicit cast to byte */
		hashcode[i+1] = (MDbuf[i>>2] >>  8); /*  extracts the 8 least */
		hashcode[i+2] = (MDbuf[i>>2] >> 16); /*  significant bits.    */
		hashcode[i+3] = (MDbuf[i>>2] >> 24);
	}

	return (byte *)hashcode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movq %rdi, %r12
leaq 0x10(%rsp), %rdi
callq 0x23ac
cmpl $0x40, %ebx
jl 0x447e
leaq 0x10(%rsp), %r14
leaq 0x30(%rsp), %r15
movl %ebx, 0xc(%rsp)
movl %ebx, %ebp
movq %r12, %r13
xorl %ebx, %ebx
movl (%r13,%rbx), %eax
movl %eax, 0x30(%rsp,%rbx)
addq $0x4, %rbx
cmpq $0x40, %rbx
jne 0x4448
movq %r14, %rdi
movq %r15, %rsi
callq 0x23be
leal -0x40(%rbp), %eax
leaq (%rbx,%r13), %r12
cmpl $0x7f, %ebp
movl %eax, %ebp
jg 0x4443
addq %rbx, %r13
movq %r13, %r12
movl 0xc(%rsp), %ebx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x36af
movq $-0x4, %rax
leaq 0x7763(%rip), %rcx      # 0xbc00
movl 0x14(%rsp,%rax), %edx
movl %edx, 0x4(%rax,%rcx)
addq $0x4, %rax
cmpq $0x10, %rax
jb 0x449d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/collect.c
// Function: collect_more
void
collect_more(byte *bp, int nbytes, int entropybits)
/*
 * Throw a bunch of information into the machine.
 * The user supplies a hopefully pessimistic estimate of the entropy
 */
{

	nrandombits += entropybits;
#ifdef BIGDEALX
	if (flog) {
		int i;

		fprintf(flog, "collect_more(");
		for (i=0; i < nbytes; i++)
			fprintf(flog, "%02x", bp[i]);
		fprintf(flog, ", %d, %d) -> %d\n", nbytes, entropybits, nrandombits);
	}
#endif
	while(nbytes > 0) {
		collect_byte(*bp);
		nbytes--;
		bp++;
	}
}

// Assembly:
addl %edx, 0x7753(%rip)      # 0xbc3c
testl %esi, %esi
jle 0x45a7
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl 0x772f(%rip), %eax      # 0xbc38
movl 0x7725(%rip), %ecx      # 0xbc34
incl %ebx
leaq 0x7728(%rip), %r13      # 0xbc40
leaq 0x7701(%rip), %r15      # 0xbc20
movq %rsp, %r12
movb (%r14), %sil
incl %eax
movl %eax, 0x770b(%rip)      # 0xbc38
leal 0x1(%rcx), %edx
movl %edx, 0x76fe(%rip)      # 0xbc34
movslq %ecx, %rcx
movb %sil, (%rcx,%r13)
cmpl $0x40, %edx
jne 0x458e
movaps 0x7727(%rip), %xmm0     # 0xbc70
movaps %xmm0, 0x30(%rsp)
movaps 0x770b(%rip), %xmm0     # 0xbc60
movaps %xmm0, 0x20(%rsp)
movaps 0x76ef(%rip), %xmm0     # 0xbc50
movaps %xmm0, 0x10(%rsp)
movaps 0x76d3(%rip), %xmm0     # 0xbc40
movaps %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x23be
movl $0x0, 0x76ae(%rip)      # 0xbc34
xorl %edx, %edx
movl 0x76aa(%rip), %eax      # 0xbc38
incq %r14
decl %ebx
movl %edx, %ecx
cmpl $0x1, %ebx
jg 0x4522
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/collect.c
// Function: collect_finish
void
collect_finish(byte *hash)
/*
 * Halt the hashing engine
 * Extract the result into hash[]
 */
{
	int i;

	MDfinish(MDbuf, variousbytes, nhashbytes, 0);
#ifdef BIGDEALX
	if (flog)
		fprintf(flog, "collected %d random bits, from %d bytes of data\n",
			nrandombits, nhashbytes);

#endif
	for (i=0; i<RMDbytes; i+=4) {
		hash[i]   =  MDbuf[i>>2];         /* implicit cast to byte  */
		hash[i+1] = (MDbuf[i>>2] >>  8);  /*  extracts the 8 least  */
		hash[i+2] = (MDbuf[i>>2] >> 16);  /*  significant bits.     */
		hash[i+3] = (MDbuf[i>>2] >> 24);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x7682(%rip), %edx      # 0xbc38
leaq 0x7663(%rip), %r14      # 0xbc20
leaq 0x767c(%rip), %rsi      # 0xbc40
xorl %r15d, %r15d
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x36af
movb (%r15,%r14), %al
movb %al, (%rbx,%r15)
movb 0x1(%r15,%r14), %al
movb %al, 0x1(%rbx,%r15)
movb 0x2(%r15,%r14), %al
movb %al, 0x2(%rbx,%r15)
movb 0x3(%r15,%r14), %al
movb %al, 0x3(%rbx,%r15)
leaq 0x4(%r15), %rax
cmpq $0x10, %r15
movq %rax, %r15
jb 0x45d1
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: init_kops
void
init_kops(FILE *out) {
    int nb = prparp->pp_nboards;

    putc(nb&0xff, out);
    putc((nb>>8)&0xff, out);
    out_fill(out, ' ', 11);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x7666(%rip), %rax      # 0xbc80
movl 0x8(%rax), %ebp
movl $0xff, %r14d
movl %ebp, %edi
andl %r14d, %edi
movq %rbx, %rsi
callq 0x2160
shrl $0x8, %ebp
andl %r14d, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2160
movl $0xb, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x2160
decl %ebp
jne 0x4645
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: output_help
void
output_help(void) {
	of_p ofp;

	printf("%-8s%8s    Explanation\n\n", "Name", "Suffix");
	/* For all formats: */
	for (ofp=output_formats; ofp->of_name; ofp++) {
		printf("%-8s%8s    %s\n",
			ofp->of_name,
			ofp->of_suffix? ofp->of_suffix : "",
			ofp->of_help);
	}
	printf("\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1e39(%rip), %rdi      # 0x64a0
leaq 0x1e4b(%rip), %rsi      # 0x64b9
leaq 0x1e49(%rip), %rdx      # 0x64be
xorl %eax, %eax
callq 0x20c0
movq 0x4c2d(%rip), %rsi      # 0x92b0
testq %rsi, %rsi
je 0x46c2
leaq 0x4c69(%rip), %r14      # 0x92f8
leaq 0x1d47(%rip), %r15      # 0x63dd
leaq 0x1e28(%rip), %rbx      # 0x64c5
movq -0x30(%r14), %rdx
movq -0x20(%r14), %rcx
testq %rdx, %rdx
cmoveq %r15, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20c0
movq (%r14), %rsi
addq $0x48, %r14
testq %rsi, %rsi
jne 0x469d
movl $0xa, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: output_specify_formats
int
output_specify_formats(char *format_string, int for_real)
/*
 * Comma separated list of output formats to use
 *
 * Return value is used to check validity of string
 */
{
	char **ofvector;
	of_p ofp;
	int found;
	int retval;

	retval = 1;	/* While all OK */
	for(ofvector = tokenize(format_string, ','); *ofvector; ofvector++) {
		found = 0;
		for (ofp=output_formats; ofp->of_name; ofp++) {
			if (strcmp(ofp->of_name, *ofvector) == 0) {
				if (suf_in_use(ofp->of_name, ofp->of_suffix)) {
					retval = 0;
				} else {
					ofp->of_flags |= OFF_USEIT;
				}
				found++;
				break;
			}
		}
		if (!found) {
			fprintf(stderr, "Format %s unknown\n", *ofvector);
			retval = 0;
		}
	}

	if (!for_real) {
		/*
		 * This was just a test, clean up
		 */
		for (ofp=output_formats; ofp->of_name; ofp++) {
			ofp->of_flags &= ~OFF_USEIT;
		}
	}

	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rax
leaq 0x75aa(%rip), %rbx      # 0xbc90
movl $0x1, %r14d
movl %esi, 0x4(%rsp)
movq %rax, (%rbx)
movq %rax, %rdi
movl $0x2c, %esi
callq 0x20b0
testq %rax, %rax
je 0x473c
movq %rax, %rcx
incq %rax
movb $0x0, (%rcx)
addq $0x8, %rbx
incq %r14
cmpq $0xb, %r14
jne 0x46f0
movq 0x48ce(%rip), %rcx      # 0x8ff0
movq (%rcx), %rdi
leaq 0x217e(%rip), %rsi      # 0x68aa
movq %rax, %rdx
xorl %eax, %eax
callq 0x2180
movl $0xa, %r14d
leaq 0x754d(%rip), %rbx      # 0xbc90
movq $0x0, (%rbx,%r14,8)
movq 0x753e(%rip), %r15      # 0xbc90
testq %r15, %r15
je 0x4846
movl $0x1, (%rsp)
movq 0x4b47(%rip), %r12      # 0x92b0
testq %r12, %r12
je 0x4794
leaq 0x4b43(%rip), %r14      # 0x92b8
movq %r12, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2150
testl %eax, %eax
je 0x47b8
movq 0x40(%r14), %r13
addq $0x48, %r14
testq %r13, %r13
jne 0x4778
movq 0x4855(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
movl $0x0, (%rsp)
leaq 0x1d28(%rip), %rsi      # 0x64d4
movq %r15, %rdx
xorl %eax, %eax
callq 0x2180
jmp 0x47fb
movq 0x10(%r14), %r15
leaq 0x4b35(%rip), %rbp      # 0x92f8
testb $0x1, -0x40(%rbp)
je 0x47ea
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x47e5
testq %r15, %r15
je 0x47ea
movq %r15, %rsi
callq 0x2150
testl %eax, %eax
jne 0x47ea
jmp 0x480e
testq %r15, %r15
je 0x480e
movq (%rbp), %r12
addq $0x48, %rbp
testq %r12, %r12
jne 0x47c3
orb $0x1, (%r14)
movq 0x8(%rbx), %r15
addq $0x8, %rbx
testq %r15, %r15
jne 0x4762
jmp 0x484d
testq %r15, %r15
movq 0x47d8(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x20d2(%rip), %rax      # 0x68f4
cmoveq %rax, %r15
movl $0x0, (%rsp)
leaq 0x2094(%rip), %rsi      # 0x68c8
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x2180
jmp 0x47fb
movl $0x1, (%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x4873
cmpq $0x0, 0x4a54(%rip)      # 0x92b0
je 0x4873
leaq 0x4a53(%rip), %rax      # 0x92b8
andb $-0x2, (%rax)
cmpq $0x0, 0x40(%rax)
leaq 0x48(%rax), %rax
jne 0x4865
movl (%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: output_createfiles
void
output_createfiles(char *fileprefix, progparams_p ppp)
/*
 * Create a file for every wanted output format
 * Set the formatset variable
 */
{
	char filename[100];
	of_p ofp;
	FILE *f;

	prparp = ppp;
	/* For all formats: */
	for (ofp=output_formats; ofp->of_name; ofp++) {
		/* If not in use forget it */
		if (!(ofp->of_flags&OFF_USEIT))
			continue;

		if (ofp->of_high_board &&
		    ppp->pp_highboard > ofp->of_high_board) {
			fprintf(stderr, "Format %s supports %d as high board, skipping\n", ofp->of_name, ofp->of_high_board);
			continue;
		}
		/* Make note of internal formats we have to make */
		formatset |= formatclosure[ofp->of_baseform];

		/* If no suffix use Standard Output */
		if (ofp->of_suffix) {
			if (strlen(fileprefix)+strlen(ofp->of_suffix)+1 >
					sizeof(filename)) {
				fprintf(stderr, "File name %s%s too long(cannot happen)\n", fileprefix, ofp->of_suffix);
				exit(-1);
			}
			strcpy(filename, fileprefix);
			strcat(filename, ofp->of_suffix);
			f = fopen(filename, ofp->of_flags&OFF_BINARY ? "wb" : "w");
			if (f == NULL) {
				fprintf(stderr, "Cannot create %s\n", filename);
				exit(-1);
			}
			ofp->of_file = f;
		} else {
			ofp->of_file = stdout;
		}
		/*
		 * If there is an init routine call it now
		 */
		if (ofp->of_init)
			(*ofp->of_init)(ofp->of_file);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x8(%rsp)
movq %rsi, 0x73e1(%rip)      # 0xbc80
movq 0x4a0a(%rip), %rdx      # 0x92b0
testq %rdx, %rdx
je 0x49ad
movq %rdi, %rbx
leaq 0x49ff(%rip), %r12      # 0x92b8
leaq 0x10(%rsp), %r15
movl (%r12), %r14d
testb $0x1, %r14b
je 0x497f
movl 0x1c(%r12), %ecx
testl %ecx, %ecx
je 0x48e3
movq 0x8(%rsp), %rax
cmpl %ecx, 0x4(%rax)
jg 0x4993
movslq 0x18(%r12), %rax
leaq 0x1b21(%rip), %rcx      # 0x6410
movl (%rcx,%rax,4), %eax
orl %eax, 0x7390(%rip)      # 0xbc88
movq 0x10(%r12), %r13
testq %r13, %r13
je 0x4961
movq %rbx, %rdi
callq 0x2090
movq %rax, %rbp
movq %r13, %rdi
callq 0x2090
addq %rbp, %rax
addq $-0x64, %rax
cmpq $-0x66, %rax
jbe 0x49c6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2050
movq %r15, %rdi
movq %r13, %rsi
callq 0x21d0
testb $0x2, %r14b
leaq 0x1bf7(%rip), %rsi      # 0x653e
leaq 0x1d8a(%rip), %rax      # 0x66d8
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x21a0
testq %rax, %rax
jne 0x496b
jmp 0x49bc
movq 0x4658(%rip), %rax      # 0x8fc0
movq (%rax), %rax
movq %rax, 0x8(%r12)
movq 0x28(%r12), %rcx
testq %rcx, %rcx
je 0x497f
movq %rax, %rdi
callq *%rcx
movq 0x40(%r12), %rdx
addq $0x48, %r12
testq %rdx, %rdx
jne 0x48be
jmp 0x49ad
movq 0x4656(%rip), %rax      # 0x8ff0
movq (%rax), %rdi
leaq 0x1b43(%rip), %rsi      # 0x64e7
xorl %eax, %eax
callq 0x2180
jmp 0x497f
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
callq 0x226d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2291
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: print_dlm
static void
print_dlm(FILE *out, int boardno, hr_p hrp)
/*
 * Writes out one DLM record, including "checksum"
 * Record is mainly one lower case character per two cards
 */
{
	dl_byc *dbcp = hrp->hr_value.hv_dbcp;
	int i;
	int c;
	int checksum;

	if (boardno>99)	/* Format cannot do more than 99 */
		return;
	fprintf(out, "Duplicates %02d=0\n", boardno);
	fprintf(out, "Board %02d=", boardno);
	checksum = boardno;
	for(i=0; i<NCARDSPERDECK/2; i++) {
		c = 'a';
		c += dbcp->dc_card[2*i+0]<<2;
		c += dbcp->dc_card[2*i+1]<<0;
		putc(c, out);
		checksum ^= c;
	}
	fprintf(out, "%03d\n", checksum);
}

// Assembly:
cmpl $0x63, %esi
jle 0x4c01
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdx), %r15
leaq 0x1b36(%rip), %rsi      # 0x674f
xorl %r12d, %r12d
movl %ebx, %edx
xorl %eax, %eax
callq 0x2180
leaq 0x1b61(%rip), %rsi      # 0x678d
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x2180
movzbl (%r15,%r12,2), %eax
movzbl 0x1(%r15,%r12,2), %ecx
leal (%rcx,%rax,4), %ebp
addl $0x61, %ebp
movl %ebp, %edi
movq %r14, %rsi
callq 0x2160
xorl %ebp, %ebx
incq %r12
cmpq $0x1a, %r12
jne 0x4c38
leaq 0x1b22(%rip), %rsi      # 0x6787
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2180
// File: /workspace/github_c_makefile_star2_O3/hansvanstaveren[P]BigDeal/output.c
// Function: print_bri
static void
print_bri(FILE *out, int boardno, hr_p hrp)
/*
 * Writes out "bri" format, including filler
 *
 * It is unknown whether the strange half space, half zero fill
 * is actually necessary. This is just the way I saw my first BRI file
 */
{
	dl_byh *dbhp = hrp->hr_value.hv_dbhp;

	out_bri(out, dbhp);
	out_fill(out, ' ', 32);
	out_fill(out, 0, 18);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdx), %r15
leaq 0x19ce(%rip), %r14      # 0x667b
xorl %r12d, %r12d
xorl %r13d, %r13d
movzbl (%r15,%r13), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2180
incq %r13
cmpq $0xd, %r13
jne 0x4cb3
incq %r12
addq $0xd, %r15
cmpq $0x3, %r12
jne 0x4cb0
movl $0x20, %ebp
movl $0x20, %edi
movq %rbx, %rsi
callq 0x2160
decl %ebp
jne 0x4ce0
movl $0x12, %ebp
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2160
decl %ebp
jne 0x4cf6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq