LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/WalterLuong[P]push_swap/srcs/push_swap/sort_hundred_utils.c
// Function: ra_or_rra_hundred
void	ra_or_rra_hundred(t_lists *l, int ra_nb, int rra_nb, int rb_nb)
{
	if (ra_nb < rra_nb)
	{
		if (rb_nb <= ft_lstsize(l->list_b) / 2)
			ranbrbnb_hundred(l, ra_nb, rb_nb);
		else if (rb_nb > ft_lstsize(l->list_b) / 2)
			ranbrrbnb_hundred(l, ra_nb, rb_nb);
	}
	else
	{
		if (rb_nb <= ft_lstsize(l->list_b) / 2)
			rranbrbnb_hundred(l, rra_nb, rb_nb);
		else if (rb_nb > ft_lstsize(l->list_b) / 2)
			rranbrrbnb_hundred(l, rra_nb, rb_nb);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x3359
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ebp, %r15d
jge 0x3110
cmpl %ebx, %ecx
jge 0x3140
movq 0x8(%r14), %rdi
callq 0x3359
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ebx, %ecx
jge 0x316d
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2fc1
cmpl %ebx, %ecx
jge 0x3157
movq 0x8(%r14), %rdi
callq 0x3359
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ebx, %ecx
jge 0x316d
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3044
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2f44
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x300a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/WalterLuong[P]push_swap/srcs/push_swap/how_many_rotate.c
// Function: how_many_rotate
int		how_many_rotate(t_list *la, int index)
{
	t_list	*cursor;
	t_data	*this;
	int		ret;

	cursor = la;
	this = cursor->content;
	ret = 0;
	if (index == -1)
		index = bigger(la);
	while (this->index != index && cursor)
	{
		this = cursor->content;
		ret++;
		cursor = cursor->next;
	}
	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $-0x1, %esi
jne 0x3191
movq %rbx, %rdi
callq 0x2378
movl %eax, %esi
xorl %eax, %eax
cmpl %esi, 0x4(%r14)
je 0x31ae
xorl %eax, %eax
incl %eax
movq (%rbx), %rcx
cmpl %esi, 0x4(%rcx)
je 0x31ae
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x319b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/WalterLuong[P]push_swap/srcs/push_swap/main_ps.c
// Function: which_sort
void	which_sort(int ac, t_lists *l)
{
	if (ac <= 4 && ac > 1)
		sorting_three(l);
	if (ac > 4 && ac <= 6)
		sorting_five(l);
	if (ac > 6 && ac <= 251)
		sorting_hundred(l);
	if (ac > 251)
		sorting_five_hundred(l);
}

// Assembly:
leal -0x2(%rdi), %eax
cmpl $0x2, %eax
ja 0x31c8
movq %rsi, %rdi
jmp 0x25cd
leal -0x5(%rdi), %eax
cmpl $0x1, %eax
ja 0x31d8
movq %rsi, %rdi
jmp 0x27fd
leal -0x7(%rdi), %eax
cmpl $0xf4, %eax
ja 0x31ea
movq %rsi, %rdi
jmp 0x2b19
cmpl $0xfc, %edi
jl 0x31fa
movq %rsi, %rdi
jmp 0x2e19
retq
// File: /workspace/github_c_makefile_star2_O3/WalterLuong[P]push_swap/srcs/push_swap/main_ps.c
// Function: main
int		main(int ac, char **av)
{
	int		i;
	t_lists lists;

	i = 1;
	init_list(&lists);
	if (ac < 2)
		exit_success_ps(&lists);
	else
	{
		while (i < ac)
		{
			if (parsing_ac(av[i]) == -1)
				exit_failure_ps(&lists);
			if (check_existant(av, i) == 1)
				exit_failure_ps(&lists);
			if (is_an_int(av[i]) == -1)
				exit_failure_ps(&lists);
			ft_lstadd_back(&lists.list_a, fill_list_a(av[i]));
			i++;
		}
	}
	get_index(lists.list_a);
	if (check_sort_ps(&lists) != 0)
		which_sort(ac, &lists);
	exit_success_ps(&lists);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq %rsp, %rdi
callq 0x1268
cmpl $0x2, %ebx
jge 0x3224
movq %rsp, %rdi
callq 0x1fdf
jmp 0x3290
movl %ebx, %r13d
movl $0x1, %r15d
movq %rsp, %r12
movq (%r14,%r15,8), %rdi
callq 0x12e5
cmpl $-0x1, %eax
jne 0x3246
movq %r12, %rdi
callq 0x1fa6
movq %r14, %rdi
movl %r15d, %esi
callq 0x126f
cmpl $0x1, %eax
jne 0x325e
movq %r12, %rdi
callq 0x1fa6
movq (%r14,%r15,8), %rdi
callq 0x1314
cmpl $-0x1, %eax
jne 0x3274
movq %r12, %rdi
callq 0x1fa6
movq (%r14,%r15,8), %rdi
callq 0x132b
movq %r12, %rdi
movq %rax, %rsi
callq 0x33be
incq %r15
cmpq %r15, %r13
jne 0x3230
movq %rsp, %r14
movq (%r14), %rdi
callq 0x1f57
movq %r14, %rdi
callq 0x22c4
testl %eax, %eax
je 0x32b1
movq %rsp, %rsi
movl %ebx, %edi
callq 0x31b8
movq %rsp, %rdi
callq 0x1fdf
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/contents.c
// Function: randomContents
CONTENTS *randomContents(const size_t size) {
  CONTENTS *result;
  result = calloc(1, sizeof(CONTENTS));
  assert(result);

  result->body = (unsigned char*)malloc(size);
  assert(result->body);
  result->size = size;

  int fd = open("/dev/urandom", O_RDONLY);
  assert(fd >= 0);
  ssize_t ret = read(fd, result->body, result->size);
  assert(ret == result->size);
  close(fd);

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x21a0
testq %rax, %rax
je 0x377d
movq %rax, %rbx
movq %r14, %rdi
callq 0x2430
movq %rax, (%rbx)
testq %rax, %rax
je 0x379c
movq %rax, %r15
movq %r14, 0x8(%rbx)
leaq 0x4b1d(%rip), %rdi      # 0x8264
xorl %esi, %esi
xorl %eax, %eax
callq 0x21b0
testl %eax, %eax
js 0x37bb
movl %eax, %ebp
movl %eax, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2300
cmpq %r14, %rax
jne 0x37da
movl %ebp, %edi
callq 0x2410
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ba4(%rip), %rdi      # 0x8328
leaq 0x4ba4(%rip), %rsi      # 0x832f
leaq 0x4ba8(%rip), %rcx      # 0x833a
movl $0x46, %edx
callq 0x2190
leaq 0x4bbe(%rip), %rdi      # 0x8361
leaq 0x4b85(%rip), %rsi      # 0x832f
leaq 0x4b89(%rip), %rcx      # 0x833a
movl $0x49, %edx
callq 0x2190
leaq 0x4aaf(%rip), %rdi      # 0x8271
leaq 0x4b66(%rip), %rsi      # 0x832f
leaq 0x4b6a(%rip), %rcx      # 0x833a
movl $0x4d, %edx
callq 0x2190
leaq 0x4b8d(%rip), %rdi      # 0x836e
leaq 0x4b47(%rip), %rsi      # 0x832f
leaq 0x4b4b(%rip), %rcx      # 0x833a
movl $0x4f, %edx
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/contents.c
// Function: getContents
CONTENTS *getContents(const char *url) {
  CONTENTS *result = NULL;

  FILE *f = fopen(url, "r");
  if (f) {
    result = calloc(1, sizeof(CONTENTS));
    assert(result);

    fseek(f, 0, SEEK_END);
    result->size = ftell(f);
    fseek(f, 0, SEEK_SET);

    result->body = (unsigned char *)malloc(result->size );
    assert(result->body);
    size_t readSize = fread(result->body, 1, result->size, f);
    assert(readSize == result->size);

    fclose(f);
  } else {
    result = getContentsUrl(url);
  }

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x4c5d(%rip), %rsi      # 0x8465
callq 0x2280
movq %rax, %r14
movl $0x1, %edi
movl $0x10, %esi
callq 0x21a0
movq %rax, %rbx
testq %r14, %r14
je 0x3897
testq %rbx, %rbx
je 0x3949
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2260
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
movq %rax, 0x8(%rbx)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2260
movq %r15, %rdi
callq 0x2430
movq %rax, (%rbx)
testq %rax, %rax
je 0x3968
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2320
cmpq %r15, %rax
jne 0x3987
movq %r14, %rdi
callq 0x2230
jmp 0x3940
testq %rbx, %rbx
je 0x39a6
movl $0x3, %edi
callq 0x20b0
callq 0x22c0
movq %rax, %r14
movq %rax, %rdi
movl $0x2712, %esi           # imm = 0x2712
movq %r15, %rdx
xorl %eax, %eax
callq 0x2270
movl $0x1, %edx
movq %r14, %rdi
movl $0x34, %esi
xorl %eax, %eax
callq 0x2270
leaq 0x1f2(%rip), %rdx       # 0x3ad1
movq %r14, %rdi
movl $0x4e2b, %esi           # imm = 0x4E2B
xorl %eax, %eax
callq 0x2270
movq %r14, %rdi
movl $0x2711, %esi           # imm = 0x2711
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2270
leaq 0x4b4a(%rip), %rdx      # 0x8451
movq %r14, %rdi
movl $0x2722, %esi           # imm = 0x2722
xorl %eax, %eax
callq 0x2270
movq %r14, %rdi
callq 0x22d0
testl %eax, %eax
je 0x3933
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x392f
callq 0x2428
xorl %ebx, %ebx
jmp 0x3940
movq %r14, %rdi
callq 0x22b0
callq 0x20d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x49d8(%rip), %rdi      # 0x8328
leaq 0x49d8(%rip), %rsi      # 0x832f
leaq 0x4a24(%rip), %rcx      # 0x8382
movl $0x5b, %edx
callq 0x2190
leaq 0x49f2(%rip), %rdi      # 0x8361
leaq 0x49b9(%rip), %rsi      # 0x832f
leaq 0x4a05(%rip), %rcx      # 0x8382
movl $0x62, %edx
callq 0x2190
leaq 0x4a18(%rip), %rdi      # 0x83a6
leaq 0x499a(%rip), %rsi      # 0x832f
leaq 0x49e6(%rip), %rcx      # 0x8382
movl $0x64, %edx
callq 0x2190
leaq 0x497b(%rip), %rdi      # 0x8328
leaq 0x497b(%rip), %rsi      # 0x832f
leaq 0x4a6f(%rip), %rcx      # 0x842a
movl $0x25, %edx
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/contents.c
// Function: destroyContents
int destroyContents(CONTENTS *file) {
  if (file != NULL) {
    if (file->body != NULL) {
      free(file->body);
    }
  }
  return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x39dc
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x39dc
pushq %rax
callq 0x2428
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/contents.c
// Function: cloneContents
CONTENTS* cloneContents(CONTENTS *source) {
  assert(source != NULL);

  CONTENTS *result = NULL;
  result = calloc(1, sizeof(CONTENTS));
  assert(result);
  result->body = (unsigned char*) malloc(source->size);
  memcpy(result->body, source->body, source->size);
  result->size = source->size;

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3a2d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x21a0
testq %rax, %rax
je 0x3a4c
movq %rax, %r14
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x2430
movq %rax, (%r14)
movq (%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x21d0
movq %r15, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x498b(%rip), %rdi      # 0x83bf
leaq 0x48f4(%rip), %rsi      # 0x832f
leaq 0x498c(%rip), %rcx      # 0x83ce
movl $0x79, %edx
callq 0x2190
leaq 0x48d5(%rip), %rdi      # 0x8328
leaq 0x48d5(%rip), %rsi      # 0x832f
leaq 0x496d(%rip), %rcx      # 0x83ce
movl $0x7d, %edx
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/contents.c
// Function: WriteMemoryCallback
static size_t WriteMemoryCallback(void *contents, size_t size, size_t nmemb,
                                  void *userp) {
  size_t realsize = size * nmemb;
  CONTENTS *mem = (CONTENTS *)userp;

  unsigned char *ptr =
      (unsigned char *)realloc(mem->body, mem->size + realsize + 1);
  assert(ptr);

  mem->body = ptr;
  memcpy(&(mem->body[mem->size]), contents, realsize);
  mem->size += realsize;
  mem->body[mem->size] = 0;

  return realsize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
imulq %rdx, %rbx
movq (%rcx), %rdi
movq 0x8(%rcx), %rax
leaq (%rbx,%rax), %rsi
incq %rsi
callq 0x2438
testq %rax, %rax
je 0x3b33
movq %rax, %r12
movq %rax, (%r14)
movq 0x8(%r14), %r13
movq %rax, %rdi
addq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x21d0
addq %rbx, %r13
movq %r13, 0x8(%r14)
movb $0x0, (%r12,%r13)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4929(%rip), %rdi      # 0x8463
leaq 0x47ee(%rip), %rsi      # 0x832f
leaq 0x491f(%rip), %rcx      # 0x8467
movl $0x16, %edx
callq 0x2190
nop
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/misc.c
// Function: timevalSubtract
int timevalSubtract(struct timeval *result, const struct timeval *x,
                            const struct timeval *ya) {
  struct timeval yb;
  memcpy(&yb, ya, sizeof(yb));
  struct timeval *y = &yb;

  /* Perform the carry for the later subtraction by updating y. */
  if (x->tv_usec < y->tv_usec) {
    int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
    y->tv_usec -= 1000000 * nsec;
    y->tv_sec += nsec;
  }
  if (x->tv_usec - y->tv_usec > 1000000) {
    int nsec = (x->tv_usec - y->tv_usec) / 1000000;
    y->tv_usec += 1000000 * nsec;
    y->tv_sec -= nsec;
  }

  /* Compute the time remaining to wait.
     tv_usec is certainly positive. */
  result->tv_sec = x->tv_sec - y->tv_sec;
  result->tv_usec = x->tv_usec - y->tv_usec;

  /* Return 1 if result is negative. */
  return x->tv_sec < y->tv_sec;
}

// Assembly:
movq (%rdx), %rcx
movq 0x8(%rdx), %r9
movq 0x8(%rsi), %r8
movq %r9, %rax
movabsq $0x431bde82d7b634db, %r10 # imm = 0x431BDE82D7B634DB
subq %r8, %rax
jle 0x3c06
imulq %r10
movq %rdx, %rax
shrq $0x12, %rax
shrq $0x3f, %rdx
addl %edx, %eax
incl %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
movslq %edx, %rdx
subq %rdx, %r9
cltq
addq %rax, %rcx
movq %r8, %rax
subq %r9, %rax
cmpq $0xf4241, %rax          # imm = 0xF4241
jl 0x3c3c
mulq %r10
shrq $0x12, %rdx
movabsq $0xf424000000000, %rax  # imm = 0xF424000000000
imulq %rdx, %rax
sarq $0x20, %rax
addq %r9, %rax
movslq %edx, %rdx
subq %rdx, %rcx
subq %rax, %r8
movq %r8, %rax
movq (%rsi), %rdx
subq %rcx, %rdx
movq %rdx, (%rdi)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
cmpq %rcx, (%rsi)
setl %al
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/misc.c
// Function: timevalBeforeTimeout
int timevalBeforeTimeout(const struct timeval *timeout,
                          const struct timeval *x, const struct timeval *y) {
  struct timeval r;

  timevalSubtract(&r, x, y);

  if (r.tv_sec < timeout->tv_sec) {
    return 1;
  } else if (r.tv_usec < timeout->tv_usec) {
    return 1;
  }

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3bc6
movq (%r14), %rcx
movl $0x1, %eax
cmpq (%rbx), %rcx
jl 0x3c84
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq 0x8(%rbx), %rcx
setl %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/misc.c
// Function: timevalBefore
int timevalBefore(const struct timeval *x, const struct timeval *y) {
  struct timeval e;

  e.tv_sec = 0;
  e.tv_usec = 0;

  return timevalBeforeTimeout(&e, x, y);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x3bc6
movq 0x8(%rbx), %rcx
shrq $0x3f, %rcx
cmpq $0x0, (%rbx)
movl $0x1, %eax
cmovnsl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/misc.c
// Function: parseHumanSize
uintmax_t parseHumanSize (const char* s) {
  char *endp = (char *)s;
  int sh;
  errno = 0;

  uintmax_t x = strtoumax(s, &endp, 10);
  if (errno || endp == s) {
    errno = EINVAL;
    goto ERROR;
  }

  switch (*endp) {
  case 'k':
  case 'K':
    sh = 10;
    break;
  case 'M':
  case 'm':
    sh = 20;
    break;
  case 'g':
  case 'G':
    sh = 30;
    break;
  case 0:
    sh = 0;
    break;
  default:
    goto ERROR;
  }
  if (sh && endp[1]) {
    errno = EINVAL;
    goto ERROR;
  }

  if (x > SIZE_MAX>>sh) {
    errno = ERANGE;
    goto ERROR;
  }

  x <<= sh; 

  return x;
ERROR:
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %rdi, (%r15)
callq 0x2040
movq %rax, %rbx
movl $0x0, (%rax)
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2210
cmpl $0x0, (%rbx)
je 0x3d05
movl $0x16, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%rsp), %rdx
cmpq %r14, %rdx
je 0x3cf3
movzbl (%rdx), %esi
leal -0x47(%rsi), %edi
cmpl $0x26, %edi
ja 0x3d56
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rdi, %rcx
jb 0x3d5f
movl $0xa, %ecx
movabsq $0x1000000010, %r8      # imm = 0x1000000010
btq %rdi, %r8
jb 0x3d64
movabsq $0x4000000040, %rcx     # imm = 0x4000000040
btq %rdi, %rcx
jae 0x3d56
movl $0x14, %ecx
jmp 0x3d64
testl %esi, %esi
jne 0x3cf9
movq %rsi, %rcx
jmp 0x3d6a
movl $0x1e, %ecx
cmpb $0x0, 0x1(%rdx)
jne 0x3cf3
movq $-0x1, %rdx
shrq %cl, %rdx
cmpq %rdx, %rax
jbe 0x3d84
movl $0x22, (%rbx)
jmp 0x3cf9
shlq %cl, %rax
jmp 0x3cfb
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: testAddRun
void testAddRun(TEST *t, CONTENTS* (*run)(const CONTENTS*)) {
  t->run = realloc(t->run, sizeof(run) * (t->runCount + 1));
  assert(t->run);

  t->run[t->runCount] = run;
  t->runCount ++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x20(%rbx), %esi
incl %esi
shlq $0x3, %rsi
callq 0x2438
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3e07
movl 0x20(%rbx), %ecx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x46fe(%rip), %rdi      # 0x850c
leaq 0x46db(%rip), %rsi      # 0x84f0
leaq 0x46f7(%rip), %rcx      # 0x8513
movl $0x1f, %edx
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: resultDestory
void resultDestory(RESULT *result) {
  RESULT *fre;

  for (RESULT *re = result; re; ) {
    loopDestory(re->loops);

    fre = re;
    re = re->next;
    free(fre);
  }
  return;
}

// Assembly:
testq %rdi, %rdi
je 0x3e8c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %r14
testq %r14, %r14
je 0x3e73
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3e5f
movq 0x28(%rdi), %r15
callq 0x2428
movq %r15, %rdi
testq %r15, %r15
jne 0x3e4e
movq 0x10(%r14), %r15
movq %r14, %rdi
callq 0x2428
movq %r15, %r14
testq %r15, %r15
jne 0x3e46
movq 0x8(%rbx), %r14
movq %rbx, %rdi
callq 0x2428
movq %r14, %rbx
testq %r14, %r14
jne 0x3e3e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: testRun
RESULT *testRun(TEST *t) {
  assert(t->run);
  assert(t->threads);

  pthread_t *pids = malloc(sizeof(pthread_t) * t->threads);
  assert(pids);

  for (unsigned int i = 0; i < t->threads; i ++) {
    pthread_create(pids+i, NULL, loopThread, t);
  }

  RESULT *headResult, *result, *newResult;
  headResult = result = NULL;

  for (unsigned int i = 0; i < t->threads; i ++) {
    LOOP* loops = NULL;
    pthread_join(pids[i], (void *)&loops);

    newResult = (RESULT *)calloc(1, sizeof(RESULT));
    assert(newResult);
    if (!headResult) headResult = newResult;
    if (result) result->next = newResult;
    result = newResult;

    result->loops = loops;
  }

  return headResult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x18(%rdi)
je 0x3f85
movq %rdi, %rbx
movl 0x10(%rdi), %edi
testq %rdi, %rdi
je 0x3fa4
shlq $0x3, %rdi
callq 0x2430
testq %rax, %rax
je 0x3fc3
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x111(%rip), %r15       # 0x3fe2
movq %rax, %r12
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x23d0
incq %r13
movl 0x10(%rbx), %eax
addq $0x8, %r12
cmpq %rax, %r13
jb 0x3ed4
testl %eax, %eax
je 0x3f51
xorl %r13d, %r13d
movq %rsp, %r12
xorl %ebp, %ebp
xorl %r15d, %r15d
movq $0x0, (%rsp)
movq (%r14,%r13,8), %rdi
movq %r12, %rsi
callq 0x21f0
movl $0x1, %edi
movl $0x10, %esi
callq 0x21a0
testq %rax, %rax
je 0x3f66
testq %r15, %r15
cmoveq %rax, %r15
testq %rbp, %rbp
je 0x3f3a
movq %rax, 0x8(%rbp)
movq (%rsp), %rcx
movq %rcx, (%rax)
incq %r13
movl 0x10(%rbx), %ecx
movq %rax, %rbp
cmpq %rcx, %r13
jb 0x3f02
jmp 0x3f54
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4607(%rip), %rdi      # 0x8574
leaq 0x457c(%rip), %rsi      # 0x84f0
leaq 0x45d1(%rip), %rcx      # 0x854c
movl $0x259, %edx            # imm = 0x259
callq 0x2190
leaq 0x4580(%rip), %rdi      # 0x850c
leaq 0x455d(%rip), %rsi      # 0x84f0
leaq 0x45b2(%rip), %rcx      # 0x854c
movl $0x247, %edx            # imm = 0x247
callq 0x2190
leaq 0x45b9(%rip), %rdi      # 0x8564
leaq 0x453e(%rip), %rsi      # 0x84f0
leaq 0x4593(%rip), %rcx      # 0x854c
movl $0x248, %edx            # imm = 0x248
callq 0x2190
leaq 0x45a5(%rip), %rdi      # 0x856f
leaq 0x451f(%rip), %rsi      # 0x84f0
leaq 0x4574(%rip), %rcx      # 0x854c
movl $0x24b, %edx            # imm = 0x24B
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: resultAvgLoop
static unsigned long resultTotalLoops(const RESULT* result) {
  unsigned long total = 0;
  for (const RESULT *re = result; re; re = re->next) {
    total += getLoops(re->loops);
  }
  return total;
}

// Assembly:
testq %rdi, %rdi
je 0x4b8f
xorl %eax, %eax
movq %rdi, %rcx
movq (%rcx), %rdx
xorl %esi, %esi
testq %rdx, %rdx
je 0x4b6e
incq %rsi
movq 0x10(%rdx), %rdx
jmp 0x4b60
addq %rsi, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x4b5b
xorl %ecx, %ecx
incl %ecx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x4b7c
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
retq
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: resultAvgIntervalByRun
static double resultAvgIntervalByRun(const RESULT* results, const unsigned int run) {
  struct timeval t;
  unsigned long total = 0;
  unsigned long loops = 0;
  unsigned int id = 0;

  for (const RESULT* r = results; r; r = r->next) {
    total += loopTotalTime(r->loops, run, &t);
    loops += resultThreadLoops(results, id);
  }

  return (double)total / (double)loops;
}

// Assembly:
testq %rdi, %rdi
je 0x4c36
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
movq %rdi, %rbp
xorl %r12d, %r12d
movq (%rbp), %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x4df6
addq %rax, %r13
movq %r14, %rdi
xorl %esi, %esi
callq 0x4e81
addq %rax, %r12
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
jne 0x4bba
movq %r13, %xmm1
movq 0x38c2(%rip), %xmm2     # 0x84b0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x38c6(%rip), %xmm3     # 0x84c0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r12, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x38a2(%rip), %xmm0     # 0x84e0
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: resultStdevIntervalByRun
static double resultStdevIntervalByRun(const RESULT* results, unsigned int run) {
  unsigned long avg = resultAvgIntervalByRun(results, run);
  unsigned long sumPow = 0;
  unsigned long loops = 0;
  unsigned int id = 0;

  for (const RESULT* r = results; r; r = r->next) {
    sumPow += loopSumPow(r->loops, run, avg);
    loops += resultThreadLoops(results, id);
    id++;
  }

  return sqrt((double)sumPow/(double)loops);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x4b90
testq %rbx, %rbx
je 0x4d96
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3873(%rip), %xmm0     # 0x84e8
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x28(%rsp)
xorl %r15d, %r15d
leaq 0x30(%rsp), %r12
movq %rbx, %rcx
xorl %eax, %eax
xorl %r13d, %r13d
movq %rbx, (%rsp)
movq %r13, 0x8(%rsp)
movq %r15, 0x18(%rsp)
movq (%rcx), %r15
testq %r15, %r15
movq %rax, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
je 0x4d13
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq (%r15), %r13
testq %r13, %r13
je 0x4cf4
movl %r14d, %ebx
cmpl $-0x1, %r14d
sete %al
subl $0x1, %ebx
setb %cl
orb %al, %cl
testb $0x1, %cl
je 0x4ceb
movq %r12, %rdi
movq %r13, %rsi
callq 0x3b93
movq 0x28(%r13), %r13
testq %r13, %r13
jne 0x4ccc
movq %r12, %rdi
callq 0x3b54
subq 0x28(%rsp), %rax
imulq %rax, %rax
addq %rax, %rbp
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x4cb7
jmp 0x4d15
xorl %ebp, %ebp
movq 0x8(%rsp), %r13
addq %rbp, %r13
movq (%rsp), %rdi
movq 0x18(%rsp), %r15
movl %r15d, %esi
callq 0x4e81
movq 0x20(%rsp), %rcx
addq %rax, %rcx
movq %rcx, %rax
incl %r15d
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x4c99
movq %r13, %xmm1
movq 0x3755(%rip), %xmm2     # 0x84b0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x3759(%rip), %xmm3     # 0x84c0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rax, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
jmp 0x4d9e
movsd 0x3742(%rip), %xmm0     # 0x84e0
sqrtsd %xmm0, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: runOutputSample
static size_t *runOutputSample(const RUN* runs) {
  size_t *samples = NULL;
  unsigned int count = 0;

  for (const RUN* r = runs; r; r = r->next) {
    samples = (size_t*)realloc(samples, sizeof(size_t) * (count + 1));
    samples[count] = r->outputBytes;
    count ++;
  }

  return samples;
}

// Assembly:
testq %rdi, %rdi
je 0x4df3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r14d
xorl %eax, %eax
leal -0x1(%r14), %r15d
movl %r14d, %esi
shlq $0x3, %rsi
movq %rax, %rdi
callq 0x2438
movq 0x20(%rbx), %rcx
movq %rcx, (%rax,%r15,8)
movq 0x28(%rbx), %rbx
incl %r14d
testq %rbx, %rbx
jne 0x4dc6
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: loopTotalTime
static unsigned long loopTotalTime(const LOOP* loops, const unsigned int run, 
                          struct timeval *totalTime) {
  assert(totalTime);
  totalTime->tv_sec = 0;
  totalTime->tv_usec = 0;

  for (const LOOP* l = loops; l; l = l->next) {
    runTotalTime(l->runs, run, totalTime);
  }

  return timevalToUsec(totalTime);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x4e62
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
testq %rdi, %rdi
je 0x4e52
movl %esi, %ebp
movq (%r14), %r15
testq %r15, %r15
je 0x4e49
movl %ebp, %r12d
cmpl $-0x1, %ebp
sete %al
subl $0x1, %r12d
setb %cl
orb %al, %cl
testb $0x1, %cl
je 0x4e40
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b93
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x4e21
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4e16
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3b54
leaq 0x38ef(%rip), %rdi      # 0x8758
leaq 0x3680(%rip), %rsi      # 0x84f0
leaq 0x38eb(%rip), %rcx      # 0x8762
movl $0xbc, %edx
callq 0x2190
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/benchmark.c
// Function: resultThreadLoops
static unsigned long resultThreadLoops(const RESULT* result, const unsigned int thread) {
  unsigned int currentThread = 0;

  for (const RESULT *re = result; re; re = re->next) {
    if (currentThread == thread) {
      return getLoops(re->loops);
    }

    currentThread ++;
  }
  assert(0);
  return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x4e96
incl %esi
decl %esi
je 0x4eb5
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x4e89
leaq 0x33da(%rip), %rdi      # 0x8277
leaq 0x364c(%rip), %rsi      # 0x84f0
leaq 0x39f9(%rip), %rcx      # 0x88a4
movl $0x65, %edx
callq 0x2190
movq (%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4ec8
incq %rax
movq 0x10(%rcx), %rcx
jmp 0x4eba
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_Delete
CJSON_PUBLIC(void) cJSON_Delete(cJSON *item)
{
    cJSON *next = NULL;
    while (item != NULL)
    {
        next = item->next;
        if (!(item->type & cJSON_IsReference) && (item->child != NULL))
        {
            cJSON_Delete(item->child);
        }
        if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL))
        {
            global_hooks.deallocate(item->valuestring);
        }
        if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
        {
            global_hooks.deallocate(item->string);
        }
        global_hooks.deallocate(item);
        item = next;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x5015
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %r14
movq (%rbx), %rbx
movl 0x18(%r14), %eax
btl $0x8, %eax
jb 0x4fd2
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x4fd2
callq 0x4fa4
movl 0x18(%r14), %eax
btl $0x8, %eax
jb 0x4feb
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x4feb
callq *0x7241(%rip)           # 0xc228
movl 0x18(%r14), %eax
btl $0x9, %eax
jb 0x5000
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x5000
callq *0x7228(%rip)           # 0xc228
movq %r14, %rdi
callq *0x721f(%rip)           # 0xc228
testq %rbx, %rbx
jne 0x4fb0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: buffer_skip_whitespace
static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer)
{
    if ((buffer == NULL) || (buffer->content == NULL))
    {
        return NULL;
    }

    while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32))
    {
       buffer->offset++;
    }

    if (buffer->offset == buffer->length)
    {
        buffer->offset--;
    }

    return buffer;
}

// Assembly:
testq %rdi, %rdi
je 0x5520
movq %rdi, %rax
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x5520
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
cmpq %rcx, %rdx
jae 0x5523
cmpb $0x20, (%rsi,%rdx)
ja 0x5523
incq %rdx
movq %rdx, 0x10(%rax)
cmpq %rdx, %rcx
jne 0x550c
jmp 0x5528
xorl %eax, %eax
retq
cmpq %rcx, %rdx
jne 0x5522
decq %rcx
movq %rcx, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: print
static unsigned char *print(const cJSON * const item, cJSON_bool format, const internal_hooks * const hooks)
{
    static const size_t default_buffer_size = 256;
    printbuffer buffer[1];
    unsigned char *printed = NULL;

    memset(buffer, 0, sizeof(buffer));

    /* create buffer */
    buffer->buffer = (unsigned char*) hooks->allocate(default_buffer_size);
    buffer->length = default_buffer_size;
    buffer->format = format;
    buffer->hooks = *hooks;
    if (buffer->buffer == NULL)
    {
        goto fail;
    }

    /* print the value */
    if (!print_value(item, buffer))
    {
        goto fail;
    }
    update_offset(buffer);

    /* check if reallocate is available */
    if (hooks->reallocate != NULL)
    {
        printed = (unsigned char*) hooks->reallocate(buffer->buffer, buffer->offset + 1);
        if (printed == NULL) {
            goto fail;
        }
        buffer->buffer = NULL;
    }
    else /* otherwise copy the JSON over to a new buffer */
    {
        printed = (unsigned char*) hooks->allocate(buffer->offset + 1);
        if (printed == NULL)
        {
            goto fail;
        }
        memcpy(printed, buffer->buffer, cjson_min(buffer->length, buffer->offset + 1));
        printed[buffer->offset] = '\0'; /* just to be sure */

        /* free the buffer */
        hooks->deallocate(buffer->buffer);
    }

    return printed;

fail:
    if (buffer->buffer != NULL)
    {
        hooks->deallocate(buffer->buffer);
    }

    if (printed != NULL)
    {
        hooks->deallocate(printed);
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x100, %edi            # imm = 0x100
callq *0x6cbb(%rip)           # 0xc220
movq %rax, (%rsp)
movq $0x100, 0x8(%rsp)       # imm = 0x100
movl %ebp, 0x24(%rsp)
movups 0x6ca3(%rip), %xmm0     # 0xc220
movups %xmm0, 0x28(%rsp)
movq 0x6ca7(%rip), %rcx      # 0xc230
movq %rcx, 0x38(%rsp)
testq %rax, %rax
je 0x5637
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x56e0
testl %eax, %eax
je 0x5637
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x55c9
movq 0x10(%rsp), %r14
leaq (%rbx,%r14), %rdi
callq 0x20e0
addq %r14, %rax
movq %rax, 0x10(%rsp)
movq 0x6c60(%rip), %rax      # 0xc230
testq %rax, %rax
je 0x55ec
movq 0x10(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq *%rax
movq %rax, %rbx
testq %rax, %rax
jne 0x5648
jmp 0x5637
movq 0x10(%rsp), %rdi
incq %rdi
callq *0x6c26(%rip)           # 0xc220
testq %rax, %rax
je 0x5637
movq %rax, %rbx
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
incq %rdx
cmpq %rdx, %rax
cmovbq %rax, %rdx
movq %rbx, %rdi
callq 0x21d0
movq 0x10(%rsp), %rax
movb $0x0, (%rbx,%rax)
movq (%rsp), %rdi
callq *0x6bf3(%rip)           # 0xc228
jmp 0x5648
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5646
callq *0x6be2(%rip)           # 0xc228
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_PrintBuffered
CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt)
{
    printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };

    if (prebuffer < 0)
    {
        return NULL;
    }

    p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer);
    if (!p.buffer)
    {
        return NULL;
    }

    p.length = (size_t)prebuffer;
    p.offset = 0;
    p.noalloc = false;
    p.format = fmt;
    p.hooks = global_hooks;

    if (!print_value(item, &p))
    {
        global_hooks.deallocate(p.buffer);
        return NULL;
    }

    return (char*)p.buffer;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq $0x0, 0x18(%rsp)
testl %esi, %esi
js 0x56d5
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rdi
callq *0x6b9f(%rip)           # 0xc220
movq %rax, (%rsp)
testq %rax, %rax
je 0x56d5
movq %rsp, %rsi
movq %r14, 0x8(%rsi)
movq $0x0, 0x10(%rsi)
movl $0x0, 0x20(%rsi)
movl %ebp, 0x24(%rsi)
movups 0x6b76(%rip), %xmm0     # 0xc220
movups %xmm0, 0x28(%rsi)
movq 0x6b7b(%rip), %rax      # 0xc230
movq %rax, 0x38(%rsi)
movq %rbx, %rdi
callq 0x56e0
testl %eax, %eax
je 0x56cb
movq (%rsp), %rax
jmp 0x56d7
movq (%rsp), %rdi
callq *0x6b53(%rip)           # 0xc228
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_PrintPreallocated
CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cJSON_bool fmt)
{
    printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };

    if ((len < 0) || (buf == NULL))
    {
        return false;
    }

    p.buffer = (unsigned char*)buf;
    p.length = (size_t)len;
    p.offset = 0;
    p.noalloc = true;
    p.format = fmt;
    p.hooks = global_hooks;

    return print_value(item, &p);
}

// Assembly:
subq $0x48, %rsp
movq $0x0, 0x20(%rsp)
testl %edx, %edx
sets %r8b
testq %rsi, %rsi
sete %r9b
xorl %eax, %eax
orb %r8b, %r9b
jne 0x5c14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl %edx, %edx
movq %rdx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movl $0x1, 0x20(%rax)
movl %ecx, 0x24(%rax)
movups 0x6623(%rip), %xmm0     # 0xc220
movups %xmm0, 0x28(%rax)
movq 0x6628(%rip), %rcx      # 0xc230
movq %rcx, 0x38(%rax)
movq %rax, %rsi
callq 0x56e0
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: get_object_item
static cJSON *get_object_item(const cJSON * const object, const char * const name, const cJSON_bool case_sensitive)
{
    cJSON *current_element = NULL;

    if ((object == NULL) || (name == NULL))
    {
        return NULL;
    }

    current_element = object->child;
    if (case_sensitive)
    {
        while ((current_element != NULL) && (current_element->string != NULL) && (strcmp(name, current_element->string) != 0))
        {
            current_element = current_element->next;
        }
    }
    else
    {
        while ((current_element != NULL) && (case_insensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0))
        {
            current_element = current_element->next;
        }
    }

    if ((current_element == NULL) || (current_element->string == NULL)) {
        return NULL;
    }

    return current_element;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x5c87
xorl %ebx, %ebx
jmp 0x5d26
movq %rsi, %r14
movq 0x10(%rdi), %r12
testl %edx, %edx
je 0x5cbd
testq %r12, %r12
je 0x5c80
xorl %ebx, %ebx
movq 0x38(%r12), %r15
testq %r15, %r15
je 0x5d1c
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f0
testl %eax, %eax
je 0x5d1c
movq (%r12), %r12
testq %r12, %r12
jne 0x5c99
jmp 0x5d26
testq %r12, %r12
je 0x5c80
xorl %ebx, %ebx
movq 0x38(%r12), %r15
testq %r15, %r15
je 0x5d11
cmpq %r14, %r15
je 0x5d23
callq 0x2070
movq (%rax), %rax
movzbl (%r14), %ecx
movl (%rax,%rcx,4), %esi
movzbl (%r15), %edx
movl (%rax,%rdx,4), %edi
cmpl %edi, %esi
jne 0x5d0d
movl $0x1, %edx
testb %cl, %cl
je 0x5d23
movzbl (%r14,%rdx), %ecx
movl (%rax,%rcx,4), %esi
movzbl (%r15,%rdx), %edi
movl (%rax,%rdi,4), %edi
incq %rdx
cmpl %edi, %esi
je 0x5cf2
cmpl %edi, %esi
je 0x5d23
movq (%r12), %r12
testq %r12, %r12
jne 0x5cc4
jmp 0x5d26
testq %r15, %r15
cmoveq %r15, %r12
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: add_item_to_object
static cJSON_bool add_item_to_object(cJSON * const object, const char * const string, cJSON * const item, const internal_hooks * const hooks, const cJSON_bool constant_key)
{
    char *new_key = NULL;
    int new_type = cJSON_Invalid;

    if ((object == NULL) || (string == NULL) || (item == NULL))
    {
        return false;
    }

    if (constant_key)
    {
        new_key = (char*)cast_away_const(string);
        new_type = item->type | cJSON_StringIsConst;
    }
    else
    {
        new_key = (char*)cJSON_strdup((const unsigned char*)string, hooks);
        if (new_key == NULL)
        {
            return false;
        }

        new_type = item->type & ~cJSON_StringIsConst;
    }

    if (!(item->type & cJSON_StringIsConst) && (item->string != NULL))
    {
        hooks->deallocate(item->string);
    }

    item->string = new_key;
    item->type = new_type;

    return add_item_to_array(object, item);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %dl
orb %al, %dl
testq %rbx, %rbx
sete %al
xorl %ebp, %ebp
orb %dl, %al
jne 0x5e48
movq %rsi, %r15
movq %rdi, %r14
testl %ecx, %ecx
je 0x5dcb
movl 0x18(%rbx), %eax
movl %eax, %ebp
orl $0x200, %ebp            # imm = 0x200
jmp 0x5e06
movq %r15, %rdi
callq 0x20e0
movq %rax, %r12
incq %r12
movq %r12, %rdi
callq *0x643e(%rip)           # 0xc220
testq %rax, %rax
je 0x5e48
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
movl 0x18(%rbx), %eax
movl %eax, %ebp
andl $0xfffffdff, %ebp       # imm = 0xFFFFFDFF
movq %r13, %r15
btl $0x9, %eax
jb 0x5e1b
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x5e1b
callq *0x640d(%rip)           # 0xc228
movq %r15, 0x38(%rbx)
movl %ebp, 0x18(%rbx)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x5e3f
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x5e2b
movq %rbx, (%rcx)
movq %rcx, 0x8(%rbx)
jmp 0x5e43
movq %rbx, 0x10(%r14)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_AddNullToObject
CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name)
{
    cJSON *null = cJSON_CreateNull();
    if (add_item_to_object(object, name, null, &global_hooks, false))
    {
        return null;
    }

    cJSON_Delete(null);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq *0x6293(%rip)           # 0xc220
movq %rax, %rbx
testq %rax, %rax
je 0x5fae
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movl $0x4, 0x18(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d88
testl %eax, %eax
jne 0x5fcc
movq %rbx, %rdi
callq 0x4fa4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_CreateNull
CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_NULL;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0x623f(%rip)           # 0xc220
testq %rax, %rax
je 0x5fff
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x4, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_AddTrueToObject
CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name)
{
    cJSON *true_item = cJSON_CreateTrue();
    if (add_item_to_object(object, name, true_item, &global_hooks, false))
    {
        return true_item;
    }

    cJSON_Delete(true_item);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq *0x6209(%rip)           # 0xc220
movq %rax, %rbx
testq %rax, %rax
je 0x6038
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movl $0x2, 0x18(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d88
testl %eax, %eax
jne 0x6056
movq %rbx, %rdi
callq 0x4fa4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_CreateTrue
CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_True;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0x61b5(%rip)           # 0xc220
testq %rax, %rax
je 0x6089
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x2, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_AddFalseToObject
CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name)
{
    cJSON *false_item = cJSON_CreateFalse();
    if (add_item_to_object(object, name, false_item, &global_hooks, false))
    {
        return false_item;
    }

    cJSON_Delete(false_item);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq *0x617f(%rip)           # 0xc220
movq %rax, %rbx
testq %rax, %rax
je 0x60c2
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movl $0x1, 0x18(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d88
testl %eax, %eax
jne 0x60e0
movq %rbx, %rdi
callq 0x4fa4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_CreateFalse
CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_False;
    }

    return item;
}

// Assembly:
pushq %rax
movl $0x40, %edi
callq *0x612b(%rip)           # 0xc220
testq %rax, %rax
je 0x6113
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movl $0x1, 0x18(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_AddBoolToObject
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean)
{
    cJSON *bool_item = cJSON_CreateBool(boolean);
    if (add_item_to_object(object, name, bool_item, &global_hooks, false))
    {
        return bool_item;
    }

    cJSON_Delete(bool_item);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq *0x60f1(%rip)           # 0xc220
movq %rax, %rbx
testq %rax, %rax
je 0x6157
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, %ebp
movl $0x2, %eax
sbbl $0x0, %eax
movl %eax, 0x18(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d88
testl %eax, %eax
jne 0x6175
movq %rbx, %rdi
callq 0x4fa4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_CreateBool
CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = b ? cJSON_True : cJSON_False;
    }

    return item;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x40, %edi
callq *0x608f(%rip)           # 0xc220
testq %rax, %rax
je 0x61b6
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
cmpl $0x1, %ebx
movl $0x2, %ecx
sbbl $0x0, %ecx
movl %ecx, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_AddNumberToObject
CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number)
{
    cJSON *number_item = cJSON_CreateNumber(number);
    if (add_item_to_object(object, name, number_item, &global_hooks, false))
    {
        return number_item;
    }

    cJSON_Delete(number_item);
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl $0x40, %edi
callq *0x6048(%rip)           # 0xc220
movq %rax, %rbx
testq %rax, %rax
je 0x6232
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, (%rbx)
movl $0x8, 0x18(%rbx)
movsd 0x8(%rsp), %xmm1
movsd %xmm1, 0x30(%rbx)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
ucomisd 0x26d2(%rip), %xmm1     # 0x88e8
jae 0x622f
movl $0x80000000, %eax       # imm = 0x80000000
movsd 0x26cb(%rip), %xmm0     # 0x88f0
ucomisd %xmm1, %xmm0
jae 0x622f
cvttsd2si %xmm1, %eax
movl %eax, 0x28(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d88
testl %eax, %eax
jne 0x6250
movq %rbx, %rdi
callq 0x4fa4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: cJSON_CreateNumber
CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num)
{
    cJSON *item = cJSON_New_Item(&global_hooks);
    if(item)
    {
        item->type = cJSON_Number;
        item->valuedouble = num;

        /* use saturation in case of overflow */
        if (num >= INT_MAX)
        {
            item->valueint = INT_MAX;
        }
        else if (num <= (double)INT_MIN)
        {
            item->valueint = INT_MIN;
        }
        else
        {
            item->valueint = (int)num;
        }
    }

    return item;
}

// Assembly:
pushq %rax
movsd %xmm0, (%rsp)
movl $0x40, %edi
callq *0x5fb2(%rip)           # 0xc220
testq %rax, %rax
je 0x62c4
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movl $0x8, 0x18(%rax)
movsd (%rsp), %xmm1
movsd %xmm1, 0x30(%rax)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x2640(%rip), %xmm1     # 0x88e8
jae 0x62c1
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x2639(%rip), %xmm0     # 0x88f0
ucomisd %xmm1, %xmm0
jae 0x62c1
cvttsd2si %xmm1, %ecx
movl %ecx, 0x28(%rax)
popq %rcx
retq