LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_growth_derivs
int hmcode_growth_derivs(
                         double a,
                         double *y,
                         double *dy,
                         void *parameters_and_workspace,
                         ErrorMsg error_message
                         ){

  struct hmcode_growth *phg;
  double Om_norad;
  double AH_norad, H2_norad;

  //phg = parameters_and_workspace;
  phg = (struct hmcode_growth *)parameters_and_workspace;

  class_call(hmcode_norad(phg, a),
             phg->error_message,
             phg->error_message);

  H2_norad = phg->pvecnorad[phg->index_norad_H2];
  AH_norad = phg->pvecnorad[phg->index_norad_AH];
  Om_norad = phg->pvecnorad[phg->index_norad_Om];

  dy[phg->index_fg_g] = y[phg->index_fg_dg];
  dy[phg->index_fg_dg] = 1.5*Om_norad*y[phg->index_fg_g]/(a*a) - (2.+AH_norad/H2_norad)*y[phg->index_fg_dg]/a;

  return _SUCCESS_;
}

// Assembly:
subq $0x858, %rsp            # imm = 0x858
movsd %xmm0, 0x848(%rsp)
movq %rdi, 0x840(%rsp)
movq %rsi, 0x838(%rsp)
movq %rdx, 0x830(%rsp)
movq %rcx, 0x828(%rsp)
movq 0x830(%rsp), %rax
movq %rax, 0x820(%rsp)
movq 0x820(%rsp), %rdi
movsd 0x848(%rsp), %xmm0
callq 0x1c30d0
cmpl $0x1, %eax
jne 0x1c355e
movq %rsp, %rdi
movq 0x820(%rsp), %rcx
addq $0x100, %rcx            # imm = 0x100
leaq 0xeec4(%rip), %rsi      # 0x1d23d8
leaq 0x4f4b0(%rip), %rdx     # 0x2129cb
movb $0x0, %al
callq 0x5b9c0
movq 0x820(%rsp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq %rsp, %r8
leaq 0xeaf9(%rip), %rsi      # 0x1d2034
leaq 0x4f49e(%rip), %rdx     # 0x2129e0
movl $0xa2c, %ecx            # imm = 0xA2C
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x854(%rsp)
jmp 0x1c36cb
movq 0x820(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x820(%rsp), %rcx
movslq 0xd4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x808(%rsp)
movq 0x820(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x820(%rsp), %rcx
movslq 0xd8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x810(%rsp)
movq 0x820(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x820(%rsp), %rcx
movslq 0xdc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x818(%rsp)
movq 0x840(%rsp), %rax
movq 0x820(%rsp), %rcx
movslq 0xcc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x838(%rsp), %rax
movq 0x820(%rsp), %rcx
movslq 0xc8(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0xf62e(%rip), %xmm0     # 0x1d2c50
mulsd 0x818(%rsp), %xmm0
movq 0x840(%rsp), %rax
movq 0x820(%rsp), %rcx
movslq 0xc8(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd 0x848(%rsp), %xmm1
mulsd 0x848(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x810(%rsp), %xmm2
divsd 0x808(%rsp), %xmm2
movsd 0xf609(%rip), %xmm1     # 0x1d2c80
addsd %xmm2, %xmm1
movq 0x840(%rsp), %rax
movq 0x820(%rsp), %rcx
movslq 0xcc(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm1
divsd 0x848(%rsp), %xmm1
subsd %xmm1, %xmm0
movq 0x838(%rsp), %rax
movq 0x820(%rsp), %rcx
movslq 0xcc(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x854(%rsp)
movl 0x854(%rsp), %eax
addq $0x858, %rsp            # imm = 0x858
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_growth_sources
int hmcode_growth_sources(
                          double a,
                          double *y,
                          double *dy,
                          int index_a,
                          void *parameters_and_workspace,
                          ErrorMsg error_message
                          ) {

  struct hmcode_growth *phg;

  //phg = parameters_and_workspace;
  phg = (struct hmcode_growth *)parameters_and_workspace;

  phg->a_table[index_a] = a;
  phg->growth_table[index_a*phg->gt_size+phg->index_gt_g] = y[phg->index_fg_g]/a; //It is actually g(a)/a
  phg->normgrowth_table[index_a] = y[phg->index_fg_g];

  class_call(hmcode_norad(phg, a),
             phg->error_message,
             phg->error_message);

  phg->growth_table[index_a*phg->gt_size+phg->index_gt_Omnorad] = phg->pvecnorad[phg->index_norad_Om];

  return _SUCCESS_;
}

// Assembly:
subq $0x848, %rsp            # imm = 0x848
movsd %xmm0, 0x838(%rsp)
movq %rdi, 0x830(%rsp)
movq %rsi, 0x828(%rsp)
movl %edx, 0x824(%rsp)
movq %rcx, 0x818(%rsp)
movq %r8, 0x810(%rsp)
movq 0x818(%rsp), %rax
movq %rax, 0x808(%rsp)
movsd 0x838(%rsp), %xmm0
movq 0x808(%rsp), %rax
movq (%rax), %rax
movslq 0x824(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x830(%rsp), %rax
movq 0x808(%rsp), %rcx
movslq 0xc8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x838(%rsp), %xmm0
movq 0x808(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x824(%rsp), %ecx
movq 0x808(%rsp), %rdx
imull 0x30(%rdx), %ecx
movq 0x808(%rsp), %rdx
addl 0x34(%rdx), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x830(%rsp), %rax
movq 0x808(%rsp), %rcx
movslq 0xc8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x808(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x824(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x808(%rsp), %rdi
movsd 0x838(%rsp), %xmm0
callq 0x1c30d0
cmpl $0x1, %eax
jne 0x1c384f
movq %rsp, %rdi
movq 0x808(%rsp), %rcx
addq $0x100, %rcx            # imm = 0x100
leaq 0xebd0(%rip), %rsi      # 0x1d23d8
leaq 0x4f1bc(%rip), %rdx     # 0x2129cb
movb $0x0, %al
callq 0x5b9c0
movq 0x808(%rsp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq %rsp, %r8
leaq 0xe805(%rip), %rsi      # 0x1d2034
leaq 0x4f1bf(%rip), %rdx     # 0x2129f5
movl $0xa5e, %ecx            # imm = 0xA5E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x844(%rsp)
jmp 0x1c38af
movq 0x808(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x808(%rsp), %rcx
movslq 0xdc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x808(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x824(%rsp), %ecx
movq 0x808(%rsp), %rdx
imull 0x30(%rdx), %ecx
movq 0x808(%rsp), %rdx
addl 0x44(%rdx), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x844(%rsp)
movl 0x844(%rsp), %eax
addq $0x848, %rsp            # imm = 0x848
retq
nop
// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_one_line_of_pk
int output_one_line_of_pk(
                          FILE * pkfile,
                          double one_k,
                          double one_pk
                          ) {

  fprintf(pkfile," ");
  class_fprintf_double(pkfile,one_k,_TRUE_);
  class_fprintf_double(pkfile,one_pk,_TRUE_);
  fprintf(pkfile,"\n");

  return _SUCCESS_;

}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x1f6c0(%rip), %rsi     # 0x1f0a80
movb $0x0, %al
callq 0x84e0
movq 0x10(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x43d96(%rip), %rsi     # 0x21516f
movl $0x18, %edx
movl $0xc, %ecx
movb $0x1, %al
callq 0x84e0
movq 0x10(%rsp), %rdi
movsd (%rsp), %xmm0
leaq 0x43d74(%rip), %rsi     # 0x21516f
movl $0x18, %edx
movl $0xc, %ecx
movb $0x1, %al
callq 0x84e0
movq 0x10(%rsp), %rdi
leaq 0x1ee2c(%rip), %rsi     # 0x1f0244
movb $0x0, %al
callq 0x84e0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OhYee[P]computer_application_programming_experiment/utils/radix_tree/test/test_radix_tree.c
// Function: main
int main() {
    mp_init(1 << 30, mp_exit);
    boolean pass = T;

    radix_tree *rt = rt_init(2);
    rt_print(rt);
    rt_add(rt, "Oh", 2); // 01001111 01101000
    rt_print(rt);
    rt_add(rt, "My", 2); // 01001101 01111001
    rt_print(rt);
    rt_add(rt, "God", 3); // 01000111 01101111 01100100
    rt_print(rt);
    rt_add(rt, "My", 2); // 01001101 01111001
    rt_print(rt);

    if (rt_exist(rt, "Va", 2) == T) {
        print_err("want F got T\n");
        pass = F;
    }
    printf("==\n");

    if (rt_exist(rt, "God", 3) == F) {
        print_err("want T got F\n");
        pass = F;
    }

    /*

    1111001000010110
    1011001010011110
    111000101111011000100110
    1011001010011110



    */

    if (pass) {
        print_ok("All testcases passed\n");
    } else {
        print_err("Some errors!\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl $0x40000000, %edi       # imm = 0x40000000
leaq -0x130b(%rip), %rsi     # 0x1190
callq 0x11a0
leaq 0xcf1(%rip), %rax       # 0x3198
movl (%rax), %eax
movl %eax, -0x8(%rbp)
movl $0x2, %edi
callq 0x1580
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16b0
movq -0x10(%rbp), %rdi
leaq 0xd1a(%rip), %rsi       # 0x31e8
movl $0x2, %edx
callq 0x15c0
movq -0x10(%rbp), %rdi
callq 0x16b0
movq -0x10(%rbp), %rdi
leaq 0xcff(%rip), %rsi       # 0x31eb
movl $0x2, %edx
callq 0x15c0
movq -0x10(%rbp), %rdi
callq 0x16b0
movq -0x10(%rbp), %rdi
leaq 0xce4(%rip), %rsi       # 0x31ee
movl $0x3, %edx
callq 0x15c0
movq -0x10(%rbp), %rdi
callq 0x16b0
movq -0x10(%rbp), %rdi
leaq 0xcc3(%rip), %rsi       # 0x31eb
movl $0x2, %edx
callq 0x15c0
movq -0x10(%rbp), %rdi
callq 0x16b0
movq -0x10(%rbp), %rdi
leaq 0xcac(%rip), %rsi       # 0x31f2
movl $0x2, %edx
callq 0x1640
leaq 0xc41(%rip), %rcx       # 0x3198
cmpl (%rcx), %eax
jne 0x2575
leaq 0xc93(%rip), %rdi       # 0x31f5
movb $0x0, %al
callq 0x1e20
leaq 0xc2c(%rip), %rax       # 0x319c
movl (%rax), %eax
movl %eax, -0x8(%rbp)
leaq 0xc87(%rip), %rdi       # 0x3203
movb $0x0, %al
callq 0x1030
movq -0x10(%rbp), %rdi
leaq 0xc60(%rip), %rsi       # 0x31ee
movl $0x3, %edx
callq 0x1640
leaq 0xbfd(%rip), %rcx       # 0x319c
cmpl (%rcx), %eax
jne 0x25bd
leaq 0xc5d(%rip), %rdi       # 0x3207
movb $0x0, %al
callq 0x1e20
leaq 0xbe4(%rip), %rax       # 0x319c
movl (%rax), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x25d3
leaq 0xc4b(%rip), %rdi       # 0x3215
movb $0x0, %al
callq 0x1ee0
jmp 0x25e1
leaq 0xc51(%rip), %rdi       # 0x322b
movb $0x0, %al
callq 0x1e20
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Mikejmoffitt[P]romtools/binpad/binpad.c
// Function: main
int main(int argc, char **argv)
{
	if (argc < 2)
	{
		printf("Pads a file to the next highest power of two.\n"
		        "Specification of a minimum size, in bytes, is optional.\n");
		printf("Usage: %s unpadded_file [min_bytes]\n", argv[0]);
		return 0;
	}

	FILE *f = fopen(argv[1], "r+");
	if (!f)
	{
		fprintf(stderr, "Couldn't open \"%s\"\n", argv[1]);
		return -1;
	}

	const size_t min_bytes = (argc >= 3) ? strtoul(argv[2], NULL, 0) : 0;

	// 0xFF is the value that Flash and EPROM memory assume in the erased state,
	// so padding with it will result in a faster burn as it can be skipped.
	const uint8_t pad_value = 0xFF;

	fseek(f, 0, SEEK_END);
	const size_t original_size = ftell(f);
	printf("Original filesize is $%X (%lu) bytes.\n",
	       (int)original_size, original_size);
	size_t next_size = 1;
	do
	{
		next_size = next_size * 2;
	} while (next_size < original_size);

	if (next_size < min_bytes) next_size = min_bytes;

	printf("New target size of $%X (%lu) bytes.\n",
	       (int)next_size, next_size);

	for (size_t i = 0; i < next_size - original_size; i++)
	{
		fputc(pad_value, f);
	}

	fclose(f);

	return 0;
}

// Assembly:
subq $0x48, %rsp
movl $0x0, 0x44(%rsp)
movl %edi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
cmpl $0x2, 0x40(%rsp)
jge 0x11fd
leaq 0xe31(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
movq 0x38(%rsp), %rax
movq (%rax), %rsi
leaq 0xe82(%rip), %rdi       # 0x206b
movb $0x0, %al
callq 0x1040
movl $0x0, 0x44(%rsp)
jmp 0x1360
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0xe83(%rip), %rsi       # 0x2090
callq 0x1090
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x124d
movq 0x2dd2(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0xe5a(%rip), %rsi       # 0x2093
movb $0x0, %al
callq 0x1060
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x1360
cmpl $0x3, 0x40(%rsp)
jl 0x126e
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x10a0
movq %rax, (%rsp)
jmp 0x1276
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x1276
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
movb $-0x1, 0x27(%rsp)
movq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1080
movq 0x30(%rsp), %rdi
callq 0x1070
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl %eax, %esi
movq 0x18(%rsp), %rdx
leaq 0xdee(%rip), %rdi       # 0x20a7
movb $0x0, %al
callq 0x1040
movq $0x1, 0x10(%rsp)
movq 0x10(%rsp), %rax
shlq %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jb 0x12c9
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x12f8
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl %eax, %esi
movq 0x10(%rsp), %rdx
leaq 0xdc3(%rip), %rdi       # 0x20ce
movb $0x0, %al
callq 0x1040
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rcx, %rax
jae 0x134e
movq 0x30(%rsp), %rsi
movl $0xff, %edi
callq 0x1050
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x131b
movq 0x30(%rsp), %rdi
callq 0x1030
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/Keith-S-Thompson[P]kst-time-utils/nanosleep-until.c
// Function: main
int main(int argc, char **argv) {
    if (argc < 2) {
        usage_error(argv[0]);
    }
    const int seconds = atoi(argv[1]);
    if (seconds <= 0) {
        usage_error(argv[0]);
    }

    struct timespec ts;
    int result = clock_gettime(CLOCK_REALTIME, &ts);
    if (result != 0) {
        perror("clock_gettime");
        exit(EXIT_FAILURE);
    }

    time_t sleep_sec = seconds - ts.tv_sec % seconds - 1;
    long sleep_nsec = ONE_BILLION - ts.tv_nsec;
    if (sleep_nsec == ONE_BILLION) {
        sleep_nsec = 0;
        sleep_sec ++;
    }

    const struct timespec how_long = {
        .tv_sec  = sleep_sec,
        .tv_nsec = sleep_nsec
    };

    nanosleep(&how_long, NULL);

    if (argc > 2) {
        execvp(argv[2], argv+2);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x11c8
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x12b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1080
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x11ea
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x12b0
xorl %edi, %edi
leaq -0x28(%rbp), %rsi
callq 0x1030
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1214
leaq 0xdff(%rip), %rdi       # 0x2004
callq 0x1060
movl $0x1, %edi
callq 0x1090
movslq -0x14(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
cqto
idivq %rcx
movq -0x58(%rbp), %rax
subq %rdx, %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movl $0x3b9aca00, %eax       # imm = 0x3B9ACA00
subq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x3b9aca00, -0x40(%rbp) # imm = 0x3B9ACA00
jne 0x1263
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1040
cmpl $0x2, -0x8(%rbp)
jle 0x129b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
callq 0x1070
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: main
int main(int argc, char **argv)
{
	struct string_list *filelist = NULL;
	char *file;

	examine_symbol_list(sparse_initialize(argc, argv, &filelist));
	FOR_EACH_PTR(filelist, file) {
		sparse(file);
		examine_symbol_list(file_scope->symbols);
	} END_FOR_EACH_PTR(file);
	examine_symbol_list(global_scope->symbols);
	sort_list((struct ptr_list **)&taglist, cmp_sym);
	show_tags(taglist);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x125d0
movq %rax, %rdi
callq 0x11580
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x114ba
jmp 0x11545
jmp 0x114bc
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x30(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1152d
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x11507
cmpq $0x0, -0x20(%rbp)
jne 0x11507
jmp 0x11522
movq -0x20(%rbp), %rdi
callq 0x12a40
leaq 0x785b1(%rip), %rax     # 0x89ac8
movq (%rax), %rax
movq (%rax), %rdi
callq 0x11580
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x114c3
jmp 0x1152f
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq -0x28(%rbp), %rax
jne 0x114bc
leaq 0x78584(%rip), %rax     # 0x89ad0
movq (%rax), %rax
movq (%rax), %rdi
callq 0x11580
leaq 0x7b33a(%rip), %rdi     # 0x8c898
leaq 0xdb(%rip), %rsi        # 0x11640
callq 0x27170
movq 0x7b327(%rip), %rdi     # 0x8c898
callq 0x11770
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: examine_symbol_list
static inline void examine_symbol_list(struct symbol_list *list)
{
	struct symbol *sym;

	if (!list)
		return;
	FOR_EACH_PTR(list, sym) {
		examine_namespace(sym);
	} END_FOR_EACH_PTR(sym);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x11598
jmp 0x11630
jmp 0x1159a
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x115bb
jmp 0x11630
jmp 0x115bd
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1161c
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x11608
cmpq $0x0, -0x10(%rbp)
jne 0x11608
jmp 0x11611
movq -0x10(%rbp), %rdi
callq 0x11940
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x115c4
jmp 0x1161e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x115bd
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: cmp_sym
static int cmp_sym(const void *m, const void *n)
{
	const struct ident *a = ((const struct symbol *)m)->ident;
	const struct ident *b = ((const struct symbol *)n)->ident;
	int ret = strncmp(a->name, b->name, MAX(a->len, b->len));
	if (!ret) {
		const struct position a_pos = ((const struct symbol *)m)->pos;
		const struct position b_pos = ((const struct symbol *)n)->pos;

		ret = strcmp(stream_name(a_pos.stream),
		             stream_name(b_pos.stream));
		if (!ret)
			return a_pos.line < b_pos.line;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jle 0x116a1
movq -0x20(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x116ac
movq -0x28(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %eax
movslq %eax, %rdx
callq 0x11080
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x11755
movq -0x10(%rbp), %rax
movq 0x4(%rax), %rax
movq %rax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq 0x4(%rax), %rax
movq %rax, -0x3c(%rbp)
movq -0x34(%rbp), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %edi
callq 0x2c590
movq %rax, -0x60(%rbp)
movq -0x3c(%rbp), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %edi
callq 0x2c590
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x111c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x11753
movq -0x34(%rbp), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq -0x3c(%rbp), %rcx
shrq $0x20, %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x1175b
jmp 0x11755
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: show_tags
static void show_tags(struct symbol_list *list)
{
	struct symbol *sym;
	struct ident *ident = NULL;
	struct position pos = {};
	static const char *filename;
	FILE *fp;

	if (!list)
		return;

	fp = fopen("tags", "w");
	if (!fp) {
		perror("open tags file");
		return;
	}
	show_tag_header(fp);
	FOR_EACH_PTR(list, sym) {
		if (ident == sym->ident && pos.line == sym->pos.line &&
		    !strcmp(filename, stream_name(sym->pos.stream)))
			continue;

		show_symbol_tag(fp, sym);
		ident = sym->ident;
		pos = sym->pos;
		filename = stream_name(sym->pos.stream);
	} END_FOR_EACH_PTR(sym);
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x11140
cmpq $0x0, -0x8(%rbp)
jne 0x117a0
jmp 0x1192e
leaq 0x508d5(%rip), %rdi     # 0x6207c
leaq 0x53ae0(%rip), %rsi     # 0x6528e
callq 0x112b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x117cf
leaq 0x508bc(%rip), %rdi     # 0x62081
callq 0x112c0
jmp 0x1192e
movq -0x28(%rbp), %rdi
callq 0x11d40
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x117fc
jmp 0x11925
jmp 0x117fe
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x38(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x1190d
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x11850
cmpq $0x0, -0x10(%rbp)
jne 0x11850
jmp 0x118ff
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x118ba
movq -0x20(%rbp), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rcx
movq 0x4(%rcx), %rcx
shrq $0x20, %rcx
andq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x118ba
movq 0x7b016(%rip), %rax     # 0x8c8a0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x4(%rax), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %edi
callq 0x2c590
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x111c0
cmpl $0x0, %eax
jne 0x118ba
jmp 0x118ff
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11dc0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x4(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x4(%rax), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %edi
callq 0x2c590
movq %rax, 0x7afa1(%rip)     # 0x8c8a0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x11805
jmp 0x1190f
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq -0x30(%rbp), %rax
jne 0x117fe
movq -0x28(%rbp), %rdi
callq 0x110c0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: examine_namespace
static void examine_namespace(struct symbol *sym)
{
	if (sym->visited)
		return;
	if (sym->ident && sym->ident->reserved)
		return;

	switch(sym->namespace) {
	case NS_KEYWORD:
	case NS_PREPROCESSOR:
		return;
	case NS_LABEL:
		sym->kind = 'l';
		break;
	case NS_MACRO:
	case NS_UNDEF:
		sym->kind = 'd';
		break;
	case NS_TYPEDEF:
		sym->kind = 't';
	case NS_SYMBOL:
	case NS_STRUCT:
		examine_symbol(sym);
		break;
	default:
		die("unknown namespace %d symbol:%s type:%d\n", sym->namespace,
		    show_ident(sym->ident), sym->type);
	}
	add_tag(sym);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb 0xd1(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
je 0x11961
jmp 0x11a63
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x11988
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb 0x11(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x11988
jmp 0x11a63
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0x119f9
jmp 0x119a0
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x11a06
jmp 0x119aa
movl -0xc(%rbp), %eax
subl $0x4, %eax
je 0x11a11
jmp 0x119b4
movl -0xc(%rbp), %eax
subl $0x8, %eax
je 0x119ec
jmp 0x119be
movl -0xc(%rbp), %eax
subl $0x10, %eax
je 0x11a11
jmp 0x119c8
movl -0xc(%rbp), %eax
subl $0x40, %eax
je 0x119ea
jmp 0x119d2
movl -0xc(%rbp), %eax
subl $0x80, %eax
je 0x119f9
jmp 0x119de
movl -0xc(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
jne 0x11a1c
jmp 0x119ea
jmp 0x11a63
movq -0x8(%rbp), %rax
movb $0x6c, 0xd0(%rax)
jmp 0x11a5a
movq -0x8(%rbp), %rax
movb $0x64, 0xd0(%rax)
jmp 0x11a5a
movq -0x8(%rbp), %rax
movb $0x74, 0xd0(%rax)
movq -0x8(%rbp), %rdi
callq 0x11a70
jmp 0x11a5a
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2c6b0
movl -0x10(%rbp), %esi
movq %rax, %rdx
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
leaq 0x505d9(%rip), %rdi     # 0x6202c
movb $0x0, %al
callq 0x12400
movq -0x8(%rbp), %rdi
callq 0x11c20
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: examine_symbol
static void examine_symbol(struct symbol *sym)
{
	struct symbol *base = sym;

	if (!sym || sym->visited)
		return;
	if (sym->ident && sym->ident->reserved)
		return;
	if (sym->type == SYM_KEYWORD || sym->type == SYM_PREPROCESSOR)
		return;

	add_tag(sym);
	base = sym->ctype.base_type;

	switch (sym->type) {
	case SYM_NODE:
		if (base && base->type == SYM_FN)
			sym->kind = 'f';
		examine_symbol(base);
		break;
	case SYM_STRUCT:
		sym->kind = 's';
		examine_members(sym->symbol_list);
		break;
	case SYM_UNION:
		sym->kind = 'u';
		examine_members(sym->symbol_list);
		break;
	case SYM_ENUM:
		sym->kind = 'e';
	case SYM_PTR:
	case SYM_TYPEOF:
	case SYM_BITFIELD:
	case SYM_FN:
	case SYM_ARRAY:
		examine_symbol(sym->ctype.base_type);
		break;
	case SYM_BASETYPE:
		break;

	default:
		die("unknown symbol %s namespace:%d type:%d\n", show_ident(sym->ident),
		    sym->namespace, sym->type);
	}
	if (!sym->kind)
		sym->kind = 'v';
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x11a9f
movq -0x8(%rbp), %rax
movb 0xd1(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x11aa4
jmp 0x11c0b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x11acb
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb 0x11(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x11acb
jmp 0x11c0b
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0xf, %eax
je 0x11aeb
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1, %eax
jne 0x11af0
jmp 0x11c0b
movq -0x8(%rbp), %rdi
callq 0x11c20
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x9, %eax
ja 0x11bb8
movq -0x18(%rbp), %rax
leaq 0x504db(%rip), %rcx     # 0x62004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, -0x10(%rbp)
je 0x11b54
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x5, %eax
jne 0x11b54
movq -0x8(%rbp), %rax
movb $0x66, 0xd0(%rax)
movq -0x10(%rbp), %rdi
callq 0x11a70
jmp 0x11bf1
movq -0x8(%rbp), %rax
movb $0x73, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x11c80
jmp 0x11bf1
movq -0x8(%rbp), %rax
movb $0x75, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x11c80
jmp 0x11bf1
movq -0x8(%rbp), %rax
movb $0x65, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x11a70
jmp 0x11bf1
jmp 0x11bf1
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2c6b0
movq %rax, %rsi
movq -0x8(%rbp), %rax
movl (%rax), %edx
shrl $0x8, %edx
andl $0x1ff, %edx            # imm = 0x1FF
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
leaq 0x5046a(%rip), %rdi     # 0x62054
movb $0x0, %al
callq 0x12400
movq -0x8(%rbp), %rax
cmpb $0x0, 0xd0(%rax)
jne 0x11c09
movq -0x8(%rbp), %rax
movb $0x76, 0xd0(%rax)
jmp 0x11c0b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: examine_members
static inline void examine_members(struct symbol_list *list)
{
	struct symbol *sym;

	FOR_EACH_PTR(list, sym) {
		sym->kind = 'm';
		examine_symbol(sym);
	} END_FOR_EACH_PTR(sym);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x11cb0
jmp 0x11d30
jmp 0x11cb2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x11d1c
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x11cfd
cmpq $0x0, -0x10(%rbp)
jne 0x11cfd
jmp 0x11d11
movq -0x10(%rbp), %rax
movb $0x6d, 0xd0(%rax)
movq -0x10(%rbp), %rdi
callq 0x11a70
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x11cb9
jmp 0x11d1e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x11cb2
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ctags.c
// Function: show_tag_header
static void show_tag_header(FILE *fp)
{
	fprintf(fp, "!_TAG_FILE_FORMAT\t2\t/extended format; --format=1 will not append ;\" to lines/\n");
	fprintf(fp, "!_TAG_FILE_SORTED\t0\t/0=unsorted, 1=sorted, 2=foldcase/\n");
	fprintf(fp, "!_TAG_PROGRAM_AUTHOR\tChristopher Li\t/sparse@chrisli.org/\n");
	fprintf(fp, "!_TAG_PROGRAM_NAME\tSparse Ctags\t//\n");
	fprintf(fp, "!_TAG_PROGRAM_URL\thttp://www.kernel.org/pub/software/devel/sparse/\t/official site/\n");
	fprintf(fp, "!_TAG_PROGRAM_VERSION\t0.01\t//\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x50339(%rip), %rsi     # 0x62090
movb $0x0, %al
callq 0x111d0
movq -0x8(%rbp), %rdi
leaq 0x50376(%rip), %rsi     # 0x620df
movb $0x0, %al
callq 0x111d0
movq -0x8(%rbp), %rdi
leaq 0x5039c(%rip), %rsi     # 0x62117
movb $0x0, %al
callq 0x111d0
movq -0x8(%rbp), %rdi
leaq 0x503c4(%rip), %rsi     # 0x62151
movb $0x0, %al
callq 0x111d0
movq -0x8(%rbp), %rdi
leaq 0x503d6(%rip), %rsi     # 0x62175
movb $0x0, %al
callq 0x111d0
movq -0x8(%rbp), %rdi
leaq 0x50418(%rip), %rsi     # 0x621c9
movb $0x0, %al
callq 0x111d0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/keithnoguchi[P]pearls-in-action/0x4/bsearch.c
// Function: _bsearch
static int __bsearch(int v, const int a[], int n, int *try)
{
	int l, h;

	l = 0, h = n-1;
	while (l <= h) {
		int m = (l+h)/2;

		if (try)
			(*try)++;
		if (v < a[m])
			h = m-1;
		else if (v > a[m])
			l = m+1;
		else
			return m;
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jg 0x244f
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x240d
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x2428
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x244d
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x2443
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x244b
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2456
jmp 0x244d
jmp 0x23e2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/keithnoguchi[P]pearls-in-action/0x4/bsearch.c
// Function: _bsearch_recursive
static int __bsearch_recursive(int v, const int a[], int l, int h, int *try)
{
	int m;

	if (l > h)
		return -1; /* base case */

	if (try)
		(*try)++;

	m = (l+h)/2;
	if (v < a[m])
		return __bsearch_recursive(v, a, l, m-1, try);
	else if (v > a[m])
		return __bsearch_recursive(v, a, m+1, h, try);
	else
		return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x250d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2592
cmpq $0x0, -0x20(%rbp)
je 0x251f
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x255e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movq -0x20(%rbp), %r8
callq 0x24e0
movl %eax, -0x4(%rbp)
jmp 0x2592
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x258c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
addl $0x1, %edx
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %r8
callq 0x24e0
movl %eax, -0x4(%rbp)
jmp 0x2592
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/keithnoguchi[P]pearls-in-action/0x4/bsearch_test.c
// Function: test_bsearch_0
int test_bsearch_0(int *i)
{
	const struct test {
		const char	*name;
		const int	array[1];
		int		value;
		int		want;
	} tests[] = {
		{
			.name	= "no entry",
			.array	= {},
			.value	= 10,
			.want	= -1,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

	for (t = tests; t->name; t++) {
		int got;

		print_title(i, "test_bsearch_0", t->name);
		got = bsearch(t->value, t->array, 0);
		if (got != t->want) {
			printf("FAIL: %d!=%d\n", got, t->want);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x3399(%rip), %rsi      # 0x59a0
movl $0x30, %edx
callq 0x2050
movl $0x0, -0x4c(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x0, (%rax)
je 0x26a8
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rdx
leaq 0x1a13(%rip), %rsi      # 0x404f
callq 0x26c0
movq -0x48(%rbp), %rax
movl 0xc(%rax), %edi
movq -0x48(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x2390
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x2689
movl -0x50(%rbp), %esi
movq -0x48(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x19e7(%rip), %rdi      # 0x405e
movb $0x0, %al
callq 0x2040
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2695
leaq 0x19dc(%rip), %rdi      # 0x406c
callq 0x2030
jmp 0x2697
movq -0x48(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
jmp 0x2620
movl -0x4c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/keithnoguchi[P]pearls-in-action/0x4/bsearch_test.c
// Function: test_bsearch_with_try_0
int test_bsearch_with_try_0(int *i)
{
	const struct test {
		const char	*name;
		const int	array[1];
		int		value;
		int		want;
		int		try;
	} tests[] = {
		{
			.name	= "no entry",
			.array	= {},
			.value	= 10,
			.want	= -1,
			.try	= 0,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

	for (t = tests; t->name; t++) {
		int got;
		int try;

		print_title(i, "test_bsearch_with_try_0", t->name);
		got = bsearch_with_try(t->value, t->array, 0, &try);
		if (got != t->want) {
			printf("FAIL: %d!=%d\n", got, t->want);
			fail++;
		} else if (try != t->try) {
			printf("FAIL: try(%d)!=%d\n", try, t->try);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x32d9(%rip), %rsi      # 0x5e80
movl $0x30, %edx
callq 0x2050
movl $0x0, -0x4c(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2c81
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq (%rax), %rdx
leaq 0x14f5(%rip), %rsi      # 0x40d5
callq 0x26c0
movq -0x48(%rbp), %rax
movl 0xc(%rax), %edi
movq -0x48(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
leaq -0x54(%rbp), %rcx
callq 0x2460
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x2c31
movl -0x50(%rbp), %esi
movq -0x48(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x143f(%rip), %rdi      # 0x405e
movb $0x0, %al
callq 0x2040
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2c6e
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x14(%rcx), %eax
je 0x2c60
movl -0x54(%rbp), %esi
movq -0x48(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0x149f(%rip), %rdi      # 0x40ed
movb $0x0, %al
callq 0x2040
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2c6c
leaq 0x1405(%rip), %rdi      # 0x406c
callq 0x2030
jmp 0x2c6e
jmp 0x2c70
movq -0x48(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
jmp 0x2bc0
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_init
void hg_hashset_init(struct hg_hashset* set, size_t capacity, hg_hash_hashfunc hash, hg_hash_eqfunc eq) {
    if (capacity < HG_HASHSET_MIN_CAPACITY) {
        capacity = HG_HASHSET_MIN_CAPACITY;
    }

    set->capacity = capacity;
    set->len      = 0;
    set->tomb_cnt = 0;
    set->hash     = hash;
    set->eq       = eq;
    set->buckets  = hg_alloc(capacity * sizeof(struct hg_hashset_bucket));

    // TODO: use calloc
    memset(set->buckets, 0, capacity * sizeof(struct hg_hashset_bucket));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x8, -0x18(%rbp)
jae 0x1217
movq $0x8, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
shlq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x1090
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_put
void hg_hashset_put(struct hg_hashset* set, void* item) {
    hashset_adjust(set);

    struct hg_hashset_bucket* bucket = hashset_find(set, item);

    switch (bucket->state) {
    case HG_HASHSET_BUCKET_EMPTY:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->len++;
        break;
    case HG_HASHSET_BUCKET_OCCUPIED:
        bucket->item = item;
        break;
    case HG_HASHSET_BUCKET_TOMBSTONE:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->tomb_cnt--;
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1390
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x13d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x132e
jmp 0x131a
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x1356
jmp 0x1324
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x1363
jmp 0x1389
movq -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x1389
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1389
movq -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hashset_find
static struct hg_hashset_bucket* hashset_find(struct hg_hashset* set, void* item) {
    uint32_t hash = set->hash(item) % set->capacity;

    struct hg_hashset_bucket* tombstone = NULL;
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[hash];
        switch (bucket->state) {
        case HG_HASHSET_BUCKET_EMPTY:
            // If we found an empty bucket, we can stop searching, because we know the item is not in the set.
            return tombstone ? tombstone : bucket;
        case HG_HASHSET_BUCKET_OCCUPIED:
            if (set->eq(bucket->item, item))
                return bucket;
            break;
        case HG_HASHSET_BUCKET_TOMBSTONE:
            if (!tombstone)
                tombstone = bucket;
            break;
        }

        hash = (hash + 1) % set->capacity;
    }
    unreachable_();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x418(%rbp)
movq %rsi, -0x420(%rbp)
movq -0x418(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x420(%rbp), %rdi
callq *%rax
movl %eax, %eax
movq -0x418(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movl %edx, %eax
movl %eax, -0x424(%rbp)
movq $0x0, -0x430(%rbp)
movq $0x0, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq -0x418(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1556
movq -0x418(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x424(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x440(%rbp)
movq -0x440(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x444(%rbp)
testl %eax, %eax
je 0x1492
jmp 0x1475
movl -0x444(%rbp), %eax
subl $0x1, %eax
je 0x14cd
jmp 0x1482
movl -0x444(%rbp), %eax
subl $0x2, %eax
je 0x1506
jmp 0x1520
cmpq $0x0, -0x430(%rbp)
je 0x14ac
movq -0x430(%rbp), %rax
movq %rax, -0x450(%rbp)
jmp 0x14ba
movq -0x440(%rbp), %rax
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rax
movq %rax, -0x410(%rbp)
jmp 0x15b5
movq -0x418(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x440(%rbp), %rcx
movq (%rcx), %rdi
movq -0x420(%rbp), %rsi
callq *%rax
testb $0x1, %al
jne 0x14f1
jmp 0x1504
movq -0x440(%rbp), %rax
movq %rax, -0x410(%rbp)
jmp 0x15b5
jmp 0x1520
cmpq $0x0, -0x430(%rbp)
jne 0x151e
movq -0x440(%rbp), %rax
movq %rax, -0x430(%rbp)
jmp 0x1520
movl -0x424(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movq -0x418(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movl %edx, %eax
movl %eax, -0x424(%rbp)
movq -0x438(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x438(%rbp)
jmp 0x1429
jmp 0x1558
movq 0x3a99(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1abe(%rip), %rsi      # 0x3027
leaq 0x1ad3(%rip), %rdx      # 0x3043
movb $0x0, %al
callq 0x10a0
leaq -0x400(%rbp), %rdi
movl $0x80, %esi
callq 0x1060
cltq
movq %rax, -0x408(%rbp)
movq -0x408(%rbp), %rax
movl %eax, %esi
leaq -0x400(%rbp), %rdi
movl $0x2, %edx
callq 0x1040
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10e0
movq -0x410(%rbp), %rax
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_remove
void* hg_hashset_remove(struct hg_hashset* set, void* item) {
    struct hg_hashset_bucket* bucket = hashset_find(set, item);
    if (bucket->state != HG_HASHSET_BUCKET_OCCUPIED)
        return NULL;

    bucket->state = HG_HASHSET_BUCKET_TOMBSTONE;
    set->tomb_cnt++;
    return bucket->item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x13d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, 0x8(%rax)
je 0x1685
movq $0x0, -0x8(%rbp)
jmp 0x16ab
movq -0x20(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_clear
void hg_hashset_clear(struct hg_hashset* set) {
    for (size_t i = 0; i < set->capacity; i++) {
        set->buckets[i].state = HG_HASHSET_BUCKET_EMPTY;
    }

    set->len      = 0;
    set->tomb_cnt = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1705
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x16d0
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_foreach
void hg_hashset_foreach(struct hg_hashset* set, void (*fn)(void*)) {
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[i];
        if (bucket->state == HG_HASHSET_BUCKET_OCCUPIED)
            fn(bucket->item);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1783
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x1773
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
jmp 0x1775
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1738
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/yangtau[P]hedgehog/src/test/../hashset.c
// Function: compute_new_cap
static inline size_t compute_new_cap(struct hg_hashset* set) {
    size_t cap = set->capacity;

    // load factor is 0.75
    if ((cap - (cap >> 2)) < set->len) { // cap*0.75 < len
        return cap * 2;
    }

    // tomb factor is 0.25
    if ((cap >> 2) < set->tomb_cnt) { // cap*0.25 < tomb_cnt
        return cap;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
shrq $0x2, %rcx
subq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x17c9
movq -0x18(%rbp), %rax
shlq %rax
movq %rax, -0x8(%rbp)
jmp 0x17ed
movq -0x18(%rbp), %rax
shrq $0x2, %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x17e5
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x17ed
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)