LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/parse.c
// Function: lair_atomize_token
struct _lair_type _lair_atomize_token(const struct _lair_token *token) {
	/* This is where we do parse-time type coersion into things that
	 * better represent the types we're eventually going to want out
	 * of whatever it is they are in.
	 */
	switch (token->token_type) {
		case LR_NUM: {
			struct _lair_type num = {
				.type = LR_NUM,
				.value = {
					.num = atoi(token->token_str)
				}
			};
			return num;
		}
		case LR_STRING: {
			struct _lair_type def = {
				.type = token->token_type,
				.value = {0}
			};
			if (token->token_str != NULL)
				def.value.str = _convert_str_token_to_str(token->token_str);
			return def;
		}
		default: {
			struct _lair_type def = {
				.type = token->token_type,
				.value = {0}
			};
			if (token->token_str != NULL) {
				def.value.str = calloc(1, strlen(token->token_str) + 1);
				memcpy(def.value.str, token->token_str, strlen(token->token_str));
			}
			return def;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rdi), %ebx
movq (%rdi), %r14
cmpl $0xa, %ebx
je 0x3393
cmpl $0xf, %ebx
jne 0x341a
movq %r14, %rdi
callq 0x11d0
movl %eax, %r15d
movl $0xf, %ebx
jmp 0x3455
movl $0xa, %ebx
testq %r14, %r14
je 0x344b
movq %r14, %rdi
callq 0x1080
movq %rax, %r12
leaq -0x1(%rax), %rdi
callq 0x1170
movq %rax, %r15
addq $-0x2, %r12
je 0x3450
movl $0x1, %ecx
xorl %eax, %eax
movslq %ecx, %rsi
movb (%r14,%rsi), %dl
cmpb $0x5c, %dl
jne 0x33f6
movzbl 0x1(%r14,%rsi), %edx
incq %rsi
movl %esi, %ecx
cmpl $0x74, %edx
je 0x340d
cmpl $0x72, %edx
je 0x3406
cmpl $0x6e, %edx
jne 0x3414
movb $0xa, (%r15,%rax)
jmp 0x33fa
movb %dl, (%r15,%rax)
incq %rax
incl %ecx
cmpq %rax, %r12
jne 0x33c9
jmp 0x3450
movb $0xd, (%r15,%rax)
jmp 0x33fa
movb $0x9, (%r15,%rax)
jmp 0x33fa
movb %dl, (%r15,%rax)
jmp 0x33fa
testq %r14, %r14
je 0x344b
movq %r14, %rdi
callq 0x1080
movq %rax, %r12
leaq 0x1(%rax), %rsi
movl $0x1, %edi
callq 0x1130
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1160
jmp 0x3455
xorl %r15d, %r15d
jmp 0x3455
movb $0x0, (%r15,%r12)
movl %ebx, %eax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/parse.c
// Function: lair_free_tokens
void _lair_free_tokens(struct _lair_token *tokens) {
	while (tokens != NULL) {
		struct _lair_token *to_free = (struct _lair_token *)tokens;
		tokens = tokens->next;
		_lair_free_token(to_free);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x3495
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
testq %r14, %r14
jne 0x3472
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/parse.c
// Function: lair_parse_from_tokens
struct _lair_ast *_lair_parse_from_tokens(
		struct _lair_runtime *r,
		struct _lair_token **tokens) {
	check(r, tokens != NULL, ERR_PARSE, "No tokens to parse.");
	struct _lair_ast *ast_root = calloc(1, sizeof(struct _lair_ast));
	struct _lair_ast *child_loc = ast_root->children;

	while ((*tokens) != NULL) {
		struct _lair_ast *to_append = _parse_from_token(tokens);

		struct _lair_token *unused = _pop_token(tokens);
		if (unused != NULL)
			_lair_free_token(unused);

		if (ast_root->children == NULL) {
			ast_root->children = to_append;
			child_loc = ast_root->children;
		} else {
			child_loc->sibling = to_append;
			child_loc = child_loc->sibling;
		}
	}

	/* The root node should never have any siblings. */
	check(r, ast_root->next == NULL, ERR_PARSE, "The tree got messed up somehow.");
	return ast_root;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
xorl %esi, %esi
testq %r14, %r14
setne %sil
leaq 0x1366(%rip), %rcx      # 0x481d
movq %rdi, 0x10(%rsp)
xorl %edx, %edx
callq 0x1608
movl $0x1, %edi
movl $0x38, %esi
callq 0x1130
movq %rax, 0x8(%rsp)
cmpq $0x0, (%r14)
je 0x3532
movq 0x8(%rsp), %rbp
addq $0x10, %rbp
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x355e
movq %rax, %r15
movq (%r14), %r13
testq %r13, %r13
je 0x3516
movq 0x10(%r13), %rax
movq %rax, (%r14)
movq (%r13), %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
addq $0x18, %r12
testq %rbx, %rbx
cmoveq %rbp, %r12
cmoveq %r15, %rbx
movq %r15, (%r12)
cmpq $0x0, (%r14)
movq %r15, %r12
jne 0x34eb
leaq 0x12f8(%rip), %rcx      # 0x4831
movq 0x10(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1608
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/parse.c
// Function: parse_from_token
static struct _lair_ast *_parse_from_token(struct _lair_token **tokens) {
	/* "pop" the token off of the top of the stack. */
	struct _lair_token *current_token = _pop_token(tokens);

	/* Atomize the function, stick it at the head of the list. */
	struct _lair_ast _stack_ast = {
		.atom = _lair_atomize_token(current_token),
		.indent_level = current_token->indent_level
	};

	if (current_token->token_type == LR_FUNCTION_CALL ||
			current_token->token_type == LR_FUNCTION_DEF ||
			current_token->token_type == LR_CALL) {
		struct _lair_ast *list = calloc(1, sizeof(struct _lair_ast));
		memcpy(list, &_stack_ast, sizeof(struct _lair_ast));

		/* We break out of the loop when we find an EOF or a DEDENT. */
		struct _lair_ast *cur_ast_item = list;
		struct _lair_ast *prev = NULL;
		while (current_token->token_type != LR_DEDENT &&
			   current_token->token_type != LR_EOF) {
			struct _lair_ast *to_append = _parse_from_token(tokens);
			cur_ast_item->next = to_append;
			cur_ast_item->prev = prev;

			/* Get the next token in line. */
			prev = cur_ast_item;
			cur_ast_item = cur_ast_item->next;
			current_token = (*tokens);
			if (current_token == NULL) {
				/* This happens sometimes if we have a statement like the following:
				 * ! print ! return 10<EOF>
				 */
				return list;
			}
		}

		if (current_token->token_type == LR_EOF) {
			struct _lair_ast *to_append = _parse_from_token(tokens);
			cur_ast_item->next = to_append;
			cur_ast_item->prev = prev;

			prev = cur_ast_item;
			cur_ast_item = cur_ast_item->next;
			current_token = (*tokens);
		}
		return list;
	} else {
		struct _lair_ast *to_return = calloc(1, sizeof(struct _lair_ast));
		memcpy(to_return, &_stack_ast, sizeof(struct _lair_ast));
		_lair_free_token(current_token);
		return to_return;
	}

	_lair_free_tokens(current_token);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x357b
movq 0x10(%r15), %rax
movq %rax, (%rbx)
movl 0xc(%r15), %r13d
movq %r15, %rdi
callq 0x3362
movl %eax, %ebp
movq %rdx, %r12
movl 0x8(%r15), %eax
cmpl $0xb, %eax
ja 0x3604
movl $0x806, %ecx            # imm = 0x806
btl %eax, %ecx
jae 0x3604
movl $0x1, %edi
movl $0x38, %esi
callq 0x1130
movq %rax, %r14
movl %r13d, 0x20(%rax)
movl %ebp, 0x28(%rax)
movq %r12, 0x30(%rax)
xorl %r12d, %r12d
movq %rax, %r13
movl 0x8(%r15), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x8, %ecx
je 0x35ed
movq %rbx, %rdi
callq 0x355e
movq %rax, 0x8(%r13)
movq %r12, (%r13)
movq (%rbx), %r15
movq %r13, %r12
testq %r15, %r15
jne 0x35bf
jmp 0x3631
cmpl $0x9, %eax
jne 0x3631
movq %rbx, %rdi
callq 0x355e
movq %rax, 0x8(%r13)
movq %r12, (%r13)
jmp 0x3631
movl $0x1, %edi
movl $0x38, %esi
callq 0x1130
movq %rax, %r14
movl %r13d, 0x20(%rax)
movl %ebp, 0x28(%rax)
movq %r12, 0x30(%rax)
movq (%r15), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/lair.c
// Function: lair_load_file
char *lair_load_file(const char *file_path, size_t *buf_size) {
	struct stat st = {0};
	if (stat(file_path, &st) == -1)
		return NULL;

	int fd = open(file_path, O_RDONLY);
	if (fd <= 0)
		return NULL;

	*buf_size = st.st_size;
	char *loaded = mmap(NULL, *buf_size, PROT_READ, MAP_PRIVATE, fd, 0);
	if (loaded == MAP_FAILED || loaded == NULL)
		return NULL;

	close(fd);

	return loaded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
xorl %ebx, %ebx
movl $0x90, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x10d0
movq %r15, %rdi
movq %r12, %rsi
callq 0x1150
cmpl $-0x1, %eax
je 0x36dc
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x11b0
testl %eax, %eax
jle 0x36dc
movl %eax, %ebp
movq 0x30(%rsp), %rsi
movq %rsi, (%r14)
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x1090
movq %rax, %r14
incq %rax
cmpq $0x2, %rax
jb 0x36dc
movl %ebp, %edi
callq 0x1100
movq %r14, %rbx
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/qpfiffer[P]lair/src/lair.c
// Function: lair_execute
int lair_execute(const char *program, const size_t len) {
	struct _lair_runtime *runtime = _lair_runtime_start();
	if (setjmp(runtime->exception_buffer)) {
		if (runtime->exception_msg) {
			print_error(runtime->exception_type, runtime->exception_msg);
		}
		goto error;
	}

	struct _lair_token *tokens = _lair_tokenize(runtime, program, len);
	if (tokens == NULL)
		goto error;

#ifdef DEBUG
	lair_print_tokens(tokens);
#endif
	const struct _lair_ast *ast = _lair_parse_from_tokens(runtime, &tokens);
	if (ast == NULL)
		return 1;

	_lair_eval(runtime, ast);
	_lair_free_tokens(tokens);
	_lair_runtime_end(runtime);
	return 0;

error:
	_lair_free_tokens(tokens);
	_lair_runtime_end(runtime);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0xd8, %esi
callq 0x1130
movq %rax, %rbx
leaq 0x10(%rax), %rdi
callq 0x1120
testl %eax, %eax
je 0x3732
movq 0x8(%rbx), %rsi
movl $0x1, %ebp
testq %rsi, %rsi
je 0x3771
movl (%rbx), %edi
callq 0x1663
jmp 0x3771
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2e05
movq %rax, (%rsp)
testq %rax, %rax
je 0x376c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3496
testq %rax, %rax
je 0x378f
movq %rax, %rsi
movq %rbx, %rdi
callq 0x25d9
xorl %ebp, %ebp
movq (%rsp), %rdi
jmp 0x3775
movl $0x1, %ebp
xorl %eax, %eax
movl %eax, %edi
callq 0x3466
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x3784
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ibperfcli.c
// Function: test_ibperf
int
test_ibperf(const int argc, char ** const argv)
{
  if (argc < 6 || (strcmp(argv[0], "api") != 0)) {
    return -1;
  }
  const u64 pid = strtoull(argv[1], NULL, 10);
  char * const host = argv[2];
  const int pn = atoi(argv[3]);
  const u64 depth = strtoull(argv[4], NULL, 10);
  const u64 unit = strtoull(argv[5], NULL, 10);

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

  struct worker_info wi = {};
  wi.port = ib_port_create(pid);
  wi.host = host;
  wi.pn = pn;
  wi.depth = depth;
  wi.unit = unit;

  struct pass_info pi = {};
  pi.api = &wi;
  pi.vctr_size = 1;
  pi.wf = ibperf_worker;
  pi.af = ibperf_analyze;

  const int n2 = maptest_passes(argc - 6, argv + 6, pref, &pi);
  ib_port_destroy(wi.port);
  if (n2 < 0) {
    return n2;
  }
  return 6 + n2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x6, %edi
jl 0x70ca
movq %rsi, %rbx
movl %edi, %r14d
movq (%rsi), %rdi
leaq 0xe061(%rip), %rsi      # 0x15010
callq 0x64b0
testl %eax, %eax
jne 0x70ca
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, -0x38(%rbp)
movq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movq 0x18(%rbx), %rdi
callq 0x63e0
movl %eax, -0x2c(%rbp)
movq 0x20(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, %r13
movq 0x28(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, %r15
leaq -0x260(%rbp), %r12
movl $0x1d0, %edx            # imm = 0x1D0
movq %r12, %rdi
xorl %esi, %esi
callq 0x6080
vmovups (%rbx), %ymm0
vmovups 0x10(%rbx), %ymm1
vmovups %ymm0, -0x30(%r12)
vmovups %ymm1, -0x20(%r12)
leaq -0x90(%rbp), %r12
xorl %eax, %eax
movq %rax, 0x10(%r12)
movq -0x38(%rbp), %rdi
vzeroupper
callq 0x13ef0
movq %rax, (%r12)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%r12)
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%r12)
movq %r13, 0x18(%r12)
movq %r15, 0x20(%r12)
leaq -0x68(%rbp), %rcx
xorl %eax, %eax
movq %rax, (%rcx)
movq %r12, 0x8(%rcx)
movq $0x1, 0x10(%rcx)
leaq 0x53(%rip), %rax        # 0x70df
movq %rax, 0x18(%rcx)
leaq 0x3c2(%rip), %rax       # 0x7459
movq %rax, 0x20(%rcx)
addl $-0x6, %r14d
addq $0x30, %rbx
leaq -0x290(%rbp), %rdx
movl %r14d, %edi
movq %rbx, %rsi
callq 0x13308
movl %eax, %ebx
movq (%r12), %rdi
callq 0x1403c
leal 0x6(%rbx), %r15d
testl %ebx, %ebx
cmovsl %ebx, %r15d
movl %r15d, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ibperfcli.c
// Function: ibperf_analyze
static bool
ibperf_analyze(struct vctr * const va, const double dt, struct damp * const damp, char * const out)
{
  const u64 nb = vctr_get(va, 0);
  const double mbps = ((double)nb) / (dt * (1024.0*1024.0));
  const bool done = damp_add_test(damp, mbps);
  const double havg = damp_average(damp);
  const char * const pat = " bytes %"PRIu64" mbps %.4lf havg %.4lf\n";
  sprintf(out, pat, nb, mbps, havg);
  return done;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
vmovsd %xmm0, -0x28(%rbp)
xorl %esi, %esi
callq 0x9d67
movq %rax, %r15
vcvtusi2sd %rax, %xmm1, %xmm0
vmovsd -0x28(%rbp), %xmm1
vmulsd 0xdb78(%rip), %xmm1, %xmm1 # 0x15008
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x28(%rbp)
movq %r14, %rdi
callq 0x9b8f
movl %eax, %r12d
movq %r14, %rdi
callq 0x9aa3
vmovapd %xmm0, %xmm1
leaq 0xdb5d(%rip), %rsi      # 0x15014
movq %rbx, %rdi
movq %r15, %rdx
vmovsd -0x28(%rbp), %xmm0
movb $0x2, %al
callq 0x6300
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_port_create
struct ib_port *
ib_port_create(const u64 index)
{
  int num = 0;
  struct ibv_device ** const list = ibv_get_device_list(&num);
  u64 base = 0;
  for (int i = 0; i < num; i++) {
    struct ibv_context * const ctx = ibv_open_device(list[i]);
    if (ctx == NULL) {
      ibv_free_device_list(list);
      return NULL;
    }
    struct ibv_device_attr attr = {};
    const int q = ibv_query_device(ctx, &attr);
    debug_assert(q == 0);

    const u8 np = attr.phys_port_cnt;
    if ((base + np) > index) {
      struct ib_port * const port = (typeof(port))malloc(sizeof(*port));
      debug_assert(port);
      port->ctx = ctx;
      port->port_id = index - base + 1;
      port->pd = ibv_alloc_pd(ctx);
      debug_assert(port->pd);
      ibv_free_device_list(list);
      return port;
    }
    ibv_close_device(ctx);
    base += np;
  }
  ibv_free_device_list(list);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %r14
leaq -0x34(%rbp), %r15
movl $0x0, (%r15)
movq %r15, %rdi
callq 0x6460
movq %rax, -0x30(%rbp)
cmpl $0x0, (%r15)
jle 0x13fcb
xorl %r12d, %r12d
xorl %ebx, %ebx
movq -0x30(%rbp), %rax
movq (%rax,%r12,8), %rdi
callq 0x6230
testq %rax, %rax
je 0x13fcb
movq %rax, %r15
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, -0x60(%rbp)
vmovups %ymm0, -0x80(%rbp)
vmovups %ymm0, -0xa0(%rbp)
vmovups %ymm0, -0xc0(%rbp)
vmovups %ymm0, -0xe0(%rbp)
vmovups %ymm0, -0x100(%rbp)
vmovups %ymm0, -0x120(%rbp)
movq $0x0, -0x40(%rbp)
movq %rax, %rdi
leaq -0x120(%rbp), %rsi
vzeroupper
callq 0x62c0
xorl %edi, %edi
testl %eax, %eax
sete %dil
callq 0x788b
movzbl -0x3d(%rbp), %r13d
addq %rbx, %r13
cmpq %r14, %r13
ja 0x13fd9
movq %r15, %rdi
callq 0x63b0
incq %r12
movslq -0x34(%rbp), %rax
movq %r13, %rbx
cmpq %rax, %r12
jl 0x13f2d
movq -0x30(%rbp), %rdi
callq 0x60e0
xorl %r12d, %r12d
jmp 0x14027
movl $0x18, %edi
callq 0x61b0
movq %rax, %r12
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x788b
movq %r15, (%r12)
subl %ebx, %r14d
incb %r14b
movb %r14b, 0x8(%r12)
movq %r15, %rdi
callq 0x6610
movq %rax, 0x10(%r12)
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x788b
movq -0x30(%rbp), %rdi
callq 0x60e0
movq %r12, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_sge_refill_ptr
u64
ib_sge_refill_ptr(struct ibv_sge * const sg, struct ibv_mr * const mr, void * const ptr, const size_t size)
{
  debug_assert((((u64)ptr) + size - ((u64)mr->addr)) <= mr->length);
  debug_assert(ptr >= mr->addr);
  sg->addr = (u64)ptr;
  sg->length = size;
  sg->lkey = mr->lkey;
  return ptr - mr->addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
leaq (%rdx,%rcx), %rax
subq 0x10(%rsi), %rax
movq %rdi, %r12
xorl %edi, %edi
cmpq 0x18(%rsi), %rax
setbe %dil
callq 0x788b
xorl %edi, %edi
cmpq %rbx, 0x10(%r14)
setbe %dil
callq 0x788b
movq %rbx, (%r12)
movl %r15d, 0x8(%r12)
movl 0x24(%r14), %eax
movl %eax, 0xc(%r12)
subq 0x10(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_create
struct ib_socket *
ib_socket_create(struct ib_port * const port, const u64 depth)
{
  struct ib_socket * const s = (typeof(s))calloc(1, sizeof(*s));
  debug_assert(s);
  s->port = port;

  struct ibv_cq * const cqs = ibv_create_cq(port->ctx, depth, NULL, NULL, 0);
  struct ibv_cq * const cqr = ibv_create_cq(port->ctx, depth, NULL, NULL, 0);
  debug_assert(cqs);
  debug_assert(cqr);
  s->cqs = cqs;
  s->cqr = cqr;

  // qp
  struct ibv_qp_init_attr iattr = {};
  iattr.send_cq = cqs;
  iattr.recv_cq = cqr;
  iattr.qp_type = IBV_QPT_RC;
  iattr.sq_sig_all = 0;

  iattr.cap.max_send_wr = depth;
  iattr.cap.max_recv_wr = depth;
  iattr.cap.max_send_sge = IB1_SGE_DEPTH;
  iattr.cap.max_recv_sge = IB1_SGE_DEPTH;
  iattr.cap.max_inline_data = 60;

  s->qp = ibv_create_qp(port->pd, &iattr);
  debug_assert(s->qp);

  // qp init state
  struct ibv_qp_attr qattr = {};
  qattr.qp_state = IBV_QPS_INIT;
  qattr.pkey_index = 0;
  qattr.port_num = port->port_id;
  qattr.qp_access_flags = IB1_MR_FLAGS;
  const int r = ibv_modify_qp(s->qp, &qattr, IB1_SOCKET_QP_INIT);
  debug_assert(r == 0);

  // wc
  s->wc = (typeof(s->wc))calloc(depth, sizeof(s->wc[0]));
  debug_assert(s->wc);

  // wr/sg
  s->swr.num_sge = 1;
  s->rwr.num_sge = 1;
  s->depth = depth;
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x1, %edi
movl $0xe8, %esi
callq 0x64f0
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x788b
movq %r15, (%r14)
movq (%r15), %rdi
movl %ebx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6170
movq %rax, %r12
movq (%r15), %rdi
movl %ebx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x6170
movq %rax, %r13
xorl %edi, %edi
testq %r12, %r12
setne %dil
callq 0x788b
xorl %edi, %edi
testq %r13, %r13
setne %dil
callq 0x788b
movq %r12, 0x10(%r14)
vxorps %xmm0, %xmm0, %xmm0
leaq -0x70(%rbp), %rsi
vmovups %ymm0, (%rsi)
movq %r13, 0x18(%r14)
vmovups %ymm0, 0x20(%rsi)
movq %r12, 0x8(%rsi)
movq %r13, 0x10(%rsi)
movl %ebx, 0x20(%rsi)
movl %ebx, 0x24(%rsi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x28(%rsi)
movabsq $0x20000003c, %rax      # imm = 0x20000003C
movq %rax, 0x30(%rsi)
movq 0x10(%r15), %rdi
vzeroupper
callq 0x6100
movq %rax, %r12
movq %rax, 0x8(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x788b
leaq -0x100(%rbp), %rsi
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, (%rsi)
vmovups %ymm0, 0x70(%rsi)
vmovups %ymm0, 0x60(%rsi)
vmovups %ymm0, 0x40(%rsi)
vmovups %ymm0, 0x20(%rsi)
movl $0x1, %r13d
movl %r13d, (%rsi)
movb 0x8(%r15), %al
movb %al, 0x81(%rsi)
movl $0xf, 0x20(%rsi)
movq %r12, %rdi
movl $0x39, %edx
vzeroupper
callq 0x62b0
xorl %edi, %edi
testl %eax, %eax
sete %dil
callq 0x788b
movl $0x30, %esi
movq %rbx, %rdi
callq 0x64f0
movq %rax, 0x20(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0x788b
movl %r13d, 0x40(%r14)
movl %r13d, 0xc0(%r14)
movq %rbx, 0xc8(%r14)
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_export
bool
ib_socket_export(struct ib_socket * const s, struct ib_remote * const r)
{
  struct ibv_port_attr attr = {};
  if (ibv_query_port(s->port->ctx, s->port->port_id, &attr) != 0) {
    return false;
  }
  r->lid = attr.lid;
  r->qpn = s->qp->qp_num;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, -0x3c(%rbp)
vmovups %ymm0, -0x50(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rdi
movb 0x8(%rax), %al
cmpq $-0x1, 0x140(%rdi)
jne 0x14303
cmpq $0x288, -0x8(%rdi)      # imm = 0x288
jb 0x14303
movq -0x140(%rdi), %r8
testq %r8, %r8
je 0x14303
movzbl %al, %esi
leaq -0x50(%rbp), %rdx
movl $0x34, %ecx
vzeroupper
callq *%r8
jmp 0x14312
movzbl %al, %esi
leaq -0x50(%rbp), %rdx
vzeroupper
callq 0x64c0
testl %eax, %eax
jne 0x14326
movzwl -0x2e(%rbp), %ecx
movl %ecx, (%rbx)
movq 0x8(%r14), %rcx
movl 0x34(%rcx), %ecx
movl %ecx, 0x4(%rbx)
testl %eax, %eax
sete %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_connect_stream2
bool
ib_socket_connect_stream2(struct ib_socket * const s, struct stream2 * const s2)
{
  struct ib_remote local = {};
  if (ib_socket_export(s, &local) == false) {
    fprintf(stderr, "export failed\n");
    return false;
  }
  fwrite(&local, sizeof(local), 1, s2->w);
  fflush(s2->w);

  struct ib_remote remote = {};
  if (1 != fread(&remote, sizeof(remote), 1, s2->r)) {
    fprintf(stderr, "read remote failed\n");
    return false;
  }

  const bool rc = ib_socket_connect(s, &remote);
  if (rc == false) {
    fprintf(stderr, "connect failed\n");
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x20(%rbp), %rsi
movq $0x0, (%rsi)
callq 0x142a7
testb %al, %al
je 0x14481
movq (%r14), %rcx
leaq -0x20(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x65d0
movq (%r14), %rdi
callq 0x66f0
leaq -0x18(%rbp), %rdi
movq $0x0, (%rdi)
movq 0x8(%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x6440
cmpq $0x1, %rax
jne 0x14488
leaq -0x18(%rbp), %rsi
movq %rbx, %rdi
callq 0x14334
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0x1448f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x6dfb
jmp 0x14494
callq 0x6e2a
jmp 0x14494
callq 0x6e59
xorl %eax, %eax
jmp 0x14478
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_post_send
bool
ib_socket_post_send(struct ib_socket * const s, struct ibv_sge * const sg, const bool signaled)
{
  if (s->nr_sending >= s->depth) return false;
  struct ibv_send_wr * const wr = &(s->swr);
  wr->wr_id = s->wid++;
  wr->sg_list = sg;
  wr->opcode = IBV_WR_SEND;
  wr->send_flags = signaled ? IBV_SEND_SIGNALED : 0;
  if (signaled) s->nr_sending++;
  struct ibv_send_wr * bad_wr = NULL;
  const int r = ibv_post_send(s->qp, wr, &bad_wr);
  return r == 0 ? true : false;
}

// Assembly:
movq 0xd8(%rdi), %rcx
cmpq 0xc8(%rdi), %rcx
jae 0x14512
movq %rsi, %rax
leaq 0x28(%rdi), %rsi
movq 0xd0(%rdi), %r8
leaq 0x1(%r8), %r9
movq %r9, 0xd0(%rdi)
movq %r8, 0x28(%rdi)
movq %rax, 0x38(%rdi)
movl $0x2, 0x44(%rdi)
movzbl %dl, %eax
leal (%rax,%rax), %edx
movl %edx, 0x48(%rdi)
testb %al, %al
je 0x144e7
incq %rcx
movq %rcx, 0xd8(%rdi)
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x8(%rbp), %rdx
movq $0x0, (%rdx)
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0xd0(%rax)
testl %eax, %eax
sete %al
addq $0x10, %rsp
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_flush_send
bool
ib_socket_flush_send(struct ib_socket * const s)
{
  while (s->nr_sending) {
    const int n = ibv_poll_cq(s->cqs, s->depth, s->wc);
    if (n < 0) {
      return false;
    }
    if (n == 0) continue;
    for (int i = 0; i < n; i++) {
      if (s->wc[i].status != IBV_WC_SUCCESS) {
        return false;
      }
    }
    s->nr_sending -= n;
  }
  return true;
}

// Assembly:
cmpq $0x0, 0xd8(%rdi)
je 0x14605
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc8(%rbx), %esi
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rdx
movq (%rdi), %rax
callq *0x60(%rax)
movl %eax, %ecx
testl %eax, %eax
setns %al
js 0x145fc
je 0x145ee
movq 0x20(%rbx), %rdx
movl %ecx, %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
cmpl $0x0, 0x8(%rdx,%rdi)
jne 0x145fc
addq $0x30, %rdi
cmpq %rdi, %rsi
jne 0x145cb
movq 0xd8(%rbx), %rdx
subq %rcx, %rdx
movq %rdx, 0xd8(%rbx)
jmp 0x145f5
movq 0xd8(%rbx), %rdx
testq %rdx, %rdx
jne 0x14599
jmp 0x145fe
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_flush_recv
bool
ib_socket_flush_recv(struct ib_socket * const s)
{
  while (s->nr_recving) {
    const int n = ibv_poll_cq(s->cqr, s->depth, s->wc);
    if (n < 0) {
      return false;
    }
    if (n == 0) continue;
    for (int i = 0; i < n; i++) {
      if (s->wc[i].status != IBV_WC_SUCCESS) {
        return false;
      }
    }
    s->nr_recving -= n;
  }
  return true;
}

// Assembly:
cmpq $0x0, 0xe0(%rdi)
je 0x14687
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc8(%rbx), %esi
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
movq (%rdi), %rax
callq *0x60(%rax)
movl %eax, %ecx
testl %eax, %eax
setns %al
js 0x1467e
je 0x14670
movq 0x20(%rbx), %rdx
movl %ecx, %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
cmpl $0x0, 0x8(%rdx,%rdi)
jne 0x1467e
addq $0x30, %rdi
cmpq %rdi, %rsi
jne 0x1464d
movq 0xe0(%rbx), %rdx
subq %rcx, %rdx
movq %rdx, 0xe0(%rbx)
jmp 0x14677
movq 0xe0(%rbx), %rdx
testq %rdx, %rdx
jne 0x1461b
jmp 0x14680
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_poll_send
bool
ib_socket_poll_send(struct ib_socket * const s, u64 * const nr)
{
  const int n = ibv_poll_cq(s->cqs, s->depth, s->wc);
  if (n >= 0) {
    *nr = n;
    s->nr_sending -= n;
    return true;
  } else {
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc8(%rdi), %esi
movq 0x10(%rdi), %rdi
movq 0x20(%rbx), %rdx
movq (%rdi), %rax
callq *0x60(%rax)
testl %eax, %eax
js 0x146bb
movl %eax, %ecx
movq %rcx, (%r14)
subq %rcx, 0xd8(%rbx)
testl %eax, %eax
setns %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ib1.c
// Function: ib_socket_poll_recv
bool
ib_socket_poll_recv(struct ib_socket * const s, u64 * const nr)
{
  const int n = ibv_poll_cq(s->cqr, s->depth, s->wc);
  if (n >= 0) {
    *nr = n;
    s->nr_recving -= n;
    return true;
  } else {
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc8(%rdi), %esi
movq 0x18(%rdi), %rdi
movq 0x20(%rbx), %rdx
movq (%rdi), %rax
callq *0x60(%rax)
testl %eax, %eax
js 0x146f6
movl %eax, %ecx
movq %rcx, (%r14)
subq %rcx, 0xe0(%rbx)
testl %eax, %eax
setns %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/test/test_tree.c
// Function: main
int main(void)
{
	MTREE_s *pTree = MTREE_create(NULL);

	for (int i = 0;i < DIM_OF(gArr);i++) {
		MTREE_addItem(pTree,gArr[i][0],gArr[i][1]);
	}

	printf("MTREE_forward:\n");
	MTREE_forward(pTree,forwardPrint);

	printf("MTREE_backward:\n");
	MTREE_backward(pTree,backwardPrint);

	MTREE_printByList(pTree);

	printf("MTREE_forward:\n");
	MTREE_forward(pTree,forwardPrint);

	printf("MTREE_backward:\n");
	MTREE_backward(pTree,backwardPrint);

	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x1268
movq %rax, %rbx
leaq 0xe61(%rip), %r15       # 0x2030
movl (%r15,%r14,8), %esi
movl 0x4(%r15,%r14,8), %edx
movq %rbx, %rdi
callq 0x1339
incq %r14
cmpq $0x1a, %r14
jne 0x11cf
leaq 0xe1d(%rip), %r14       # 0x200d
movq %r14, %rdi
callq 0x1080
leaq -0x73(%rip), %r15       # 0x118c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x165e
leaq 0xe0b(%rip), %r12       # 0x201c
movq %r12, %rdi
callq 0x1080
leaq -0x81(%rip), %r13       # 0x119f
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1913
movq %rbx, %rdi
callq 0x1808
movq %r14, %rdi
callq 0x1080
movq %rbx, %rdi
movq %r15, %rsi
callq 0x165e
movq %r12, %rdi
callq 0x1080
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1913
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/muti_tree.c
// Function: MTREE_create
MTREE_s *MTREE_create(void *usr)
{
	MTREE_s *pTree = (MTREE_s *)malloc(sizeof(MTREE_s));
	CHECK_EXPR_RET(pTree == NULL,NULL);
	memset(pTree,0,sizeof(MTREE_s));
	
	pTree->root = NULL;
	pTree->pQAdd = QUEUE_create(sizeof(MTREE_ITEM_s *),QUEUE_MAX_N);
	pTree->pQForward = QUEUE_create(sizeof(MTREE_ITEM_s *),QUEUE_MAX_N);
	pTree->pQBackward = QUEUE_create(sizeof(MTREE_ITEM_s *),QUEUE_MAX_N);
	pTree->num = 0;
	pTree->rootInverse = (MTREE_ITEM_s *)malloc(sizeof(MTREE_ITEM_s));
	CHECK_EXPR_RET(pTree->rootInverse == NULL,NULL);
	pTree->usr = usr;
	
	INIT_LIST_HEAD(&pTree->head);
	
	return pTree;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x90, %esi
callq 0x1040
testq %rax, %rax
je 0x12ed
movq %rax, %rbx
movl $0x8, %edi
movl $0x40, %esi
callq 0x1b50
movq %rax, 0x10(%rbx)
movl $0x8, %edi
movl $0x40, %esi
callq 0x1b50
movq %rax, 0x18(%rbx)
movl $0x8, %edi
movl $0x40, %esi
callq 0x1b50
movq %rax, 0x20(%rbx)
movl $0xa8, %edi
callq 0x1070
movq %rax, 0x78(%rbx)
testq %rax, %rax
je 0x130b
movq %r14, 0x70(%rbx)
movq %rbx, %rax
subq $-0x80, %rax
movq %rax, 0x80(%rbx)
movq %rax, 0x88(%rbx)
jmp 0x132e
leaq 0xe0c(%rip), %rdi       # 0x2100
leaq 0xe1b(%rip), %rsi       # 0x2116
leaq 0xe20(%rip), %rdx       # 0x2122
xorl %ebx, %ebx
movl $0xa, %ecx
jmp 0x1327
leaq 0xdee(%rip), %rdi       # 0x2100
leaq 0xdfd(%rip), %rsi       # 0x2116
leaq 0xe02(%rip), %rdx       # 0x2122
xorl %ebx, %ebx
movl $0x13, %ecx
xorl %eax, %eax
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/muti_tree.c
// Function: MTREE_printByList
int MTREE_printByList(MTREE_s *pTree)
{
	CHECK_EXPR_RET(pTree == NULL,-1);

	MTREE_ITEM_s *pItem = NULL;
	pTree->nEnd = 0;

	printf("MTREE_printByList:\n");
	list_for_each_entry(pItem,&pTree->head,list,MTREE_ITEM_s) {
		printf("curr:%d\n",pItem->valCurr);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x185e
movq %rdi, %rbx
movl $0x0, 0x68(%rdi)
leaq 0x994(%rip), %rdi       # 0x21b9
callq 0x1080
movq 0x80(%rbx), %r15
subq $-0x80, %rbx
cmpq %rbx, %r15
je 0x1886
leaq 0x7c3(%rip), %r14       # 0x2004
xorl %ebp, %ebp
movl -0x98(%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1030
movq (%r15), %r15
cmpq %rbx, %r15
jne 0x1843
jmp 0x1888
leaq 0x89b(%rip), %rdi       # 0x2100
leaq 0x8aa(%rip), %rsi       # 0x2116
leaq 0x915(%rip), %rdx       # 0x2188
movl $0xbd, %ecx
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1888
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/muti_tree.c
// Function: MTREE_getEndIds
int MTREE_getEndIds(MTREE_s *pTree,int *endId,int *n)
{
	CHECK_EXPR_RET(pTree == NULL,-1);
	CHECK_EXPR_RET(endId == NULL,-1);
	CHECK_EXPR_RET(n == NULL,-1);

	*n = 0;
	MTREE_ITEM_s *pItem = NULL;
	list_for_each_entry(pItem,&pTree->head,list,MTREE_ITEM_s) {
		if (pItem->nNext == 0) {
			endId[(*n)++] = pItem->valCurr;
		}
	}
	
	return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x18dd
testq %rsi, %rsi
je 0x18e4
testq %rdx, %rdx
je 0x18eb
movl $0x0, (%rdx)
movq 0x80(%rdi), %rcx
subq $-0x80, %rdi
xorl %eax, %eax
cmpq %rdi, %rcx
je 0x1911
cmpl $0x0, -0x50(%rcx)
jne 0x18d8
movl -0x98(%rcx), %r8d
movslq (%rdx), %r9
leal 0x1(%r9), %r10d
movl %r10d, (%rdx)
movl %r8d, (%rsi,%r9,4)
movq (%rcx), %rcx
jmp 0x18b8
movl $0xcc, %ecx
jmp 0x18f0
movl $0xcd, %ecx
jmp 0x18f0
movl $0xce, %ecx
leaq 0x809(%rip), %rdi       # 0x2100
leaq 0x818(%rip), %rsi       # 0x2116
leaq 0x895(%rip), %rdx       # 0x219a
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/Test/main.c
// Function: main
int main(void)
{
	srand((unsigned int)time(NULL));

	testCircularBuffer();
	testDynamicArray();
	testLinkedList();
	testQueue();
	testStack();

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x1080
movl %eax, %edi
callq 0x1060
callq 0x2448
callq 0x28a4
callq 0x2bc6
callq 0x2ff3
callq 0x2dcb
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/Enes1313[P]DataStructures/Test/main.c
// Function: testQueue
void testQueue()
{
	size_t i, x;
	eaDSQueue queue = NULL;

	if (NULL == (queue = eaDSQueueInit(intCreateAndCopy, free)))
	{
		puts("queue olusmadi!");
		return;
	}

	for(i = 0; i < 13; i++)
	{
		x = (unsigned int) rand() % 50;

		if(EXIT_SUCCESS == eaDSQueueEnqueue(queue, &x))
		{
			printf("Queue'e eleman eklendi : %d \n", (int)x);
		}
		else
		{
			puts("Queue'e eleman eklenemedi!");
		}
	}

	for(i = 0; !eaDSQueueIsEmpty(queue); i++)
	{
		void * data = eaDSQueueDequeue(queue);

		if(NULL != data)
		{
			printf("Queue'den %d. eleman alindi : %d\n", (int)i + 1, *(int *)data);
			free(data);
		}
		else
		{
			printf("Queue'den %d. eleman alma basarisiz\n", (int)i + 1);
		}
	}

	printf("Queue siliniyor.\n");
	eaDSQueueClear(queue);

	puts("********************************************");
	puts("Queue");
	puts("********************************************");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x788(%rip), %rdi      # 0x287d
movq 0x3fac(%rip), %rsi      # 0x6fb8
callq 0x1f40
testq %rax, %rax
je 0x3121
movq %rax, %rbx
movl $0xd, %r13d
movq %rsp, %r14
leaq 0x143c(%rip), %r15      # 0x4469
leaq 0x1453(%rip), %r12      # 0x4487
callq 0x10b0
movl %eax, %ecx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x24, %rcx
imull $0x32, %ecx, %ecx
subl %ecx, %eax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2075
testl %eax, %eax
je 0x3068
movq %r12, %rdi
callq 0x1030
jmp 0x3075
movl (%rsp), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1050
decq %r13
jne 0x3034
movq %rbx, %rdi
callq 0x200e
testl %eax, %eax
jne 0x30db
movl $0x1, %ebp
leaq 0x1432(%rip), %r14      # 0x44c4
leaq 0x1409(%rip), %r15      # 0x44a2
movq %rbx, %rdi
callq 0x2018
testq %rax, %rax
je 0x30c1
movq %rax, %r12
movl (%rax), %edx
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1050
movq %r12, %rdi
callq 0x10c0
jmp 0x30cd
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x200e
incl %ebp
testl %eax, %eax
je 0x3099
leaq 0x14f9(%rip), %rdi      # 0x45db
callq 0x1030
movq %rbx, %rdi
callq 0x1ffc
leaq 0xf79(%rip), %rbx       # 0x406f
movq %rbx, %rdi
callq 0x1030
leaq 0x13e4(%rip), %rdi      # 0x44e9
callq 0x1030
movq %rbx, %rdi
callq 0x1030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1331(%rip), %rdi      # 0x4459
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/attractivechaos[P]rb-eval/rb-map.cpp
// Function: test_int(int)
int test_int(int n)
{
	int i, cnt = 0;
	uint64_t x = 11;
	intmap_t *h = new intmap_t;

	for (i = 0; i < n; ++i) {
		unsigned y = x % (n>>1);
		x = kad_splitmix64(x);
		std::pair<intmap_t::iterator, bool> p = h->insert(std::pair<unsigned, int>(y, i));
		if (p.second == false) h->erase(p.first);
	}
	cnt = h->size();
	delete h;
	return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x30, %edi
callq 0x1080
movq %rax, %rbx
addq $0x8, %rax
movl $0x0, 0x8(%rbx)
xorl %r14d, %r14d
movq %r14, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %r14, 0x28(%rbx)
testl %ebp, %ebp
jle 0x130c
movl %ebp, %r12d
shrl %r12d
xorl %r13d, %r13d
movl $0xb, %r15d
movq %rsp, %r14
movq %r15, %rax
xorl %edx, %edx
divq %r12
movl %edx, (%rsp)
movl %r13d, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x138e
testb $0x1, %dl
jne 0x12b9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x14cc
movabsq $-0x61c8864680b583eb, %rax # imm = 0x9E3779B97F4A7C15
addq %rax, %r15
movq %r15, %rax
shrq $0x1e, %rax
xorq %r15, %rax
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movabsq $-0x6b2fb644ecceee15, %rax # imm = 0x94D049BB133111EB
imulq %rax, %rcx
movq %rcx, %r15
shrq $0x1f, %r15
xorq %rcx, %r15
incl %r13d
cmpl %r13d, %ebp
jne 0x128e
movl 0x28(%rbx), %r14d
movq %rbx, %rdi
callq 0x133e
movl $0x30, %esi
movq %rbx, %rdi
callq 0x1090
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/antonblanchard[P]will-it-scale/tests/eventfd1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	unsigned long long rbuf;
	unsigned long long wbuf;
	int fd = eventfd(0, 0);
	int ret;

	assert(fd >= 0);

	wbuf = 1;

	while (1) {
		do {
			ret = write(fd, &wbuf, sizeof(wbuf));
		} while (ret != sizeof(wbuf) && errno == EINTR);
		assert(ret == sizeof(wbuf));

		do {
			ret = read(fd, &rbuf, sizeof(rbuf));
		} while (ret != sizeof(rbuf) && errno == EINTR);
		assert(ret == sizeof(wbuf));

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1280
testl %eax, %eax
js 0x1d82
movl %eax, %ebp
leaq 0x8(%rsp), %r14
movq $0x1, (%r14)
leaq 0x10(%rsp), %r15
movl $0x8, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x10d0
cmpl $0x8, %eax
jne 0x1d71
movl $0x8, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x1170
cmpl $0x8, %eax
je 0x1d7d
callq 0x1070
cmpl $0x4, (%rax)
je 0x1d51
jmp 0x1da1
callq 0x1070
cmpl $0x4, (%rax)
je 0x1d3d
jmp 0x1dc0
incq (%rbx)
jmp 0x1d3d
leaq 0x51d(%rip), %rdi       # 0x22a6
leaq 0x51e(%rip), %rsi       # 0x22ae
leaq 0x528(%rip), %rcx       # 0x22bf
movl $0x11, %edx
callq 0x1130
leaq 0x54a(%rip), %rdi       # 0x22f2
leaq 0x4ff(%rip), %rsi       # 0x22ae
leaq 0x509(%rip), %rcx       # 0x22bf
movl $0x1e, %edx
callq 0x1130
leaq 0x52b(%rip), %rdi       # 0x22f2
leaq 0x4e0(%rip), %rsi       # 0x22ae
leaq 0x4ea(%rip), %rcx       # 0x22bf
movl $0x19, %edx
callq 0x1130
// File: /workspace/github_c_makefile_star2_O3/wuxb45[P]SLB/ibperfser.c
// Function: main
int
main(int argc, char ** argv)
{
  if (argc < 6) {
    fprintf(stderr, "Usage: %s <ib-port> <host> <port> <depth> <max-unit>\n", argv[0]);
    exit(0);
  }

  struct ib_port * const port = ib_port_create(atoi(argv[1]));
  if (port == NULL) {
    fprintf(stderr, "ib_port_create() failed\n");
    exit(0);
  }

  const char * const host = argv[2];
  const int pn = atoi(argv[3]);
  const u64 depth = strtoull(argv[4], NULL, 10);
  const u64 unit = strtoull(argv[5], NULL, 10);

  struct worker_info wi;
  wi.port = port;
  wi.depth = depth;
  wi.unit = unit;
  struct server * const ser = server_create(host, pn, perf_worker, &wi);
  if (ser == NULL) {
    fprintf(stderr, "server_create() failed\n");
    exit(0);
  }

  server_wait(ser);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpl $0x5, %edi
jle 0x7044
movq 0x8(%rbx), %rdi
callq 0x63e0
movslq %eax, %rdi
callq 0x13ce8
testq %rax, %rax
je 0x704c
movq %rax, %r14
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rdi
callq 0x63e0
movl %eax, %r12d
movq 0x20(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, %r13
movq 0x28(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
leaq -0x40(%rbp), %rcx
movq %r14, (%rcx)
movq %r13, 0x8(%rcx)
movq %rax, 0x10(%rcx)
leaq 0x3b(%rip), %rdx        # 0x7056
movq %r15, %rdi
movl %r12d, %esi
callq 0xb1be
testq %rax, %rax
je 0x7051
movq %rax, %rdi
callq 0xb443
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x676e
callq 0x6747
callq 0x6720
// File: /workspace/github_c_makefile_star2_O3/rroa[P]PUCMM_2D_Asteroids/Asteroids/Game.cpp
// Function: Engine::Game::Game(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int)
Game::Game(const std::string& title, const int width, const int height)
		: m_title(title),
		m_width(width),
		m_height(height),
		m_nUpdates(0),
		m_score(0)
	{
		m_mainWindow = nullptr;
		m_state = GameState::UNINITIALIZED;
		m_player = new Asteroids::Player();
		m_entities.push_back(m_player);
		m_dimensions[0] = width;
		m_dimensions[1] = height;

		m_timer = new TimeManager;
		m_lastFrameTime = m_timer->GetElapsedTimeInSeconds();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x55d0
leaq 0x55cf(%rip), %rax      # 0x8ae0
movq %rax, (%rbx)
movl %r12d, 0x8(%rbx)
movl %ebp, 0x4(%rsp)
movl %ebp, 0xc(%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x20(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rdi, 0x10(%rsp)
callq 0x439e
leaq 0x60(%rbx), %r14
movq %r14, 0x68(%rbx)
movq %r14, 0x60(%rbx)
xorl %eax, %eax
movq %rax, 0x70(%rbx)
leaq 0x78(%rbx), %rbp
movq %rbp, 0x80(%rbx)
movq %rbp, 0x78(%rbx)
movq %rax, 0x88(%rbx)
leaq 0x90(%rbx), %r15
movq %r15, 0x98(%rbx)
movq %r15, 0x90(%rbx)
movq %rax, 0xa0(%rbx)
movq %rax, 0x40(%rbx)
movl $0x0, 0x50(%rbx)
movl $0x50, %edi
callq 0x30c0
movq %rax, %r13
movq %rax, %rdi
callq 0x453c
movq %r13, 0x58(%rbx)
movl $0x18, %edi
callq 0x30c0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x30d0
incq 0xa0(%rbx)
movl %r12d, 0x5c05(%rip)     # 0x91e0
movl 0x4(%rsp), %eax
movl %eax, 0x5bff(%rip)      # 0x91e4
movl $0x38, %edi
callq 0x30c0
movq %rax, %r13
movq %rax, %rdi
callq 0x5c50
movq %r13, 0xa8(%rbx)
movq %r13, %rdi
callq 0x5cf4
movsd %xmm0, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movl $0x38, %esi
jmp 0x3631
jmp 0x3640
movq %rax, %r12
movl $0x50, %esi
movq %r13, %rdi
callq 0x30a0
jmp 0x3643
movq %rax, %r12
jmp 0x36ba
movq %rax, %r12
movq (%r15), %rdi
cmpq %r15, %rdi
je 0x3660
movq (%rdi), %r13
movl $0x18, %esi
callq 0x30a0
movq %r13, %rdi
cmpq %r15, %r13
jne 0x364b
movq (%rbp), %rdi
cmpq %rbp, %rdi
je 0x367e
movq (%rdi), %r15
movl $0x18, %esi
callq 0x30a0
movq %r15, %rdi
cmpq %rbp, %r15
jne 0x3669
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x369b
movq (%rdi), %r15
movl $0x18, %esi
callq 0x30a0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x3686
movq 0x10(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x36ba
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x30a0
movq %rbx, %rdi
callq 0x55dc
movq %r12, %rdi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O3/rroa[P]PUCMM_2D_Asteroids/Asteroids/Game.cpp
// Function: Engine::Game::OnExecute()
void Game::OnExecute()
	{
		if (m_state != GameState::INIT_SUCCESSFUL)
		{
			std::cerr << "Game INIT was not successful." << std::endl;
			return;
		}

		m_state = GameState::RUNNING;
		CreateAsteroid(Asteroids::Asteroid::AsteroidSize::BIG, 1);

		SDL_Event event;
		while (m_state == GameState::RUNNING)
		{
			// Input polling
			//
			while (SDL_PollEvent(&event))
			{
				OnEvent(&event);
			}

			//
			OnUpdate();
			OnRender();
		}
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
cmpl $0x2, 0x50(%rdi)
jne 0x3854
movq %rdi, %rbx
movl $0x4, 0x50(%rdi)
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorl %esi, %esi
movl $0x1, %edx
callq 0x389e
cmpl $0x4, 0x50(%rbx)
jne 0x384c
movq %rsp, %r14
movq %r14, %rdi
callq 0x3330
testl %eax, %eax
je 0x3836
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rax)
jmp 0x381c
movq %rbx, %rdi
callq 0x3ad4
movq %rbx, %rdi
callq 0x3bf2
cmpl $0x4, 0x50(%rbx)
je 0x381c
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0x5795(%rip), %rbx      # 0x8ff0
leaq 0x27fe(%rip), %rsi      # 0x6060
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x31e0
movq %rax, %rdi
addq $0x38, %rsp
popq %rbx
popq %r14
jmp 0x31a0
nop
// File: /workspace/github_c_makefile_star2_O3/rroa[P]PUCMM_2D_Asteroids/Asteroids/Game.cpp
// Function: Engine::Game::OnUpdate()
void Game::OnUpdate()
	{
		double startTime = m_timer->GetElapsedTimeInSeconds();

		// Updating the entities
		//
		std::list< Asteroids::Entity* >::iterator ait = m_entities.begin();
		while (ait != m_entities.end())
		{
			(*ait)->Update(DESIRED_FRAME_TIME, m_width, m_height);
			++ait;
		}

		if(m_player)
		{
			if (up)
				m_player->MoveUp();
			if (left)
				m_player->RotateLeft(DESIRED_FRAME_TIME);
			if (right)
				m_player->RotateRight(DESIRED_FRAME_TIME);

			m_player->Update(DESIRED_FRAME_TIME, m_width, m_height);

			// Checking collision between the entities
			//
			CheckCollision();

			// Checking for entities marked as collided or for deletion
			//
			CleanEntities();
		}

		double endTime = m_timer->GetElapsedTimeInSeconds();
		double nextTimeFrame = startTime + DESIRED_FRAME_TIME;

		while (endTime < nextTimeFrame)
		{
			// Spin lock
			endTime = m_timer->GetElapsedTimeInSeconds();
		}

		//double elapsedTime = endTime - startTime;        

		m_lastFrameTime = m_timer->GetElapsedTimeInSeconds();

		m_nUpdates++;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xa8(%rdi), %rdi
callq 0x5cf4
movsd %xmm0, 0x8(%rsp)
leaq 0x90(%rbx), %r14
movq 0x90(%rbx), %r15
cmpq %r14, %r15
je 0x3b22
movq 0x10(%r15), %rdi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
movq (%rdi), %rax
movss 0x251a(%rip), %xmm0     # 0x6034
callq *0x8(%rax)
movq (%r15), %r15
jmp 0x3b00
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x3b95
cmpb $0x1, 0x56ab(%rip)      # 0x91dd
jne 0x3b3d
callq 0x51c8
movq 0x58(%rbx), %rdi
cmpb $0x1, 0x569a(%rip)      # 0x91de
jne 0x3b57
movss 0x24e6(%rip), %xmm0     # 0x6034
callq 0x520e
movq 0x58(%rbx), %rdi
cmpb $0x1, 0x5681(%rip)      # 0x91df
jne 0x3b71
movss 0x24cc(%rip), %xmm0     # 0x6034
callq 0x51fa
movq 0x58(%rbx), %rdi
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
movq (%rdi), %rax
movss 0x24b2(%rip), %xmm0     # 0x6034
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x41b2
movq %rbx, %rdi
callq 0x3fc6
movq 0xa8(%rbx), %rdi
callq 0x5cf4
movsd 0x8(%rsp), %xmm1
addsd 0x2499(%rip), %xmm1     # 0x6048
ucomisd %xmm0, %xmm1
jbe 0x3bd3
movsd %xmm1, 0x8(%rsp)
movq 0xa8(%rbx), %rdi
callq 0x5cf4
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x3bbb
movq 0xa8(%rbx), %rdi
callq 0x5cf4
movsd %xmm0, 0x18(%rbx)
incl 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop