LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/heap.c
// Function: popscored
struct scoredmove popscored(struct moveheap * heap)
{
    struct scoredmove move = heap->moves[0];

    heap->moves[0] = heap->moves[--heap->used];
    heapdown(heap, 0);

    return move;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movl (%rax), %ebx
movq 0x8(%rax), %r14
movslq (%rdi), %rcx
decq %rcx
movl %ecx, (%rdi)
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movups %xmm0, (%rax)
xorl %esi, %esi
callq 0x3bd3
movl %ebx, %eax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/mcts.c
// Function: montecarlo
struct move montecarlo(struct thudboard * board, int searchtime) {
    time_t stoptime = time(NULL) + searchtime;

    if (! root) {
        root = malloc(sizeof(struct mctreenode));
        initmctree(root, board);
    }

    deepest = curdepth = 0;
    visited = 1;

    jmp_buf stopsearch;
    if (setjmp(stopsearch) == 0) while (time(NULL) < stoptime)
    {
        mcts_step(root);
    }

    printf("visited %d nodes with max depth %d\n", visited, deepest);

    // choose most visited child as move to make
    struct move bestmove = root->allmoves.moves[0];
    int bestvisited = root->children[0].visits;
    for (int ix=1 ; ix<root->allmoves.used ; ix+=1) {
        if (root->children[ix].visits > bestvisited) {
            bestmove = root->allmoves.moves[ix];
            bestvisited = root->children[ix].visits;
        }
    }
    printf("chose "); showmove(& bestmove);

    printf("freeing tree\n"); fflush(stdout);
    closemctree(root); //TODO reuse relevant subtree
    printf("freed tree\n"); fflush(stdout);

    return bestmove;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movl %r12d, %edi
callq 0x11d0
movq %rax, %r14
cmpq $0x0, 0x44eb(%rip)      # 0x8280
jne 0x3db3
movl $0xb0, %edi
callq 0x1090
movq %rax, 0x44d8(%rip)      # 0x8280
movq %rax, %rdi
movq %r15, %rsi
callq 0x423c
movl %r12d, 0x44ce(%rip)     # 0x8288
movl %r12d, 0x44cb(%rip)     # 0x828c
movl $0x1, 0x44c5(%rip)      # 0x8290
movq %rsp, %rdi
callq 0x1050
testl %eax, %eax
jne 0x3e0c
movslq %ebp, %rax
movq %r14, %r15
addq %rax, %r15
xorl %eax, %eax
movl %eax, %edi
callq 0x11d0
cmpq %r15, %rax
jge 0x3e0c
xorl %eax, %eax
movl %eax, %r14d
movq 0x4486(%rip), %rdi      # 0x8280
callq 0x3f1b
movq %r14, %rdi
callq 0x11d0
cmpq %r15, %rax
jl 0x3df3
movq %rbx, %r14
movl 0x447b(%rip), %esi      # 0x8290
movl 0x4471(%rip), %edx      # 0x828c
leaq 0x1446(%rip), %rdi      # 0x5268
xorl %eax, %eax
callq 0x1030
movq 0x4450(%rip), %r8       # 0x8280
movq 0x88(%r8), %rax
movl $0x16, %ecx
movq %rbx, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movslq 0x80(%r8), %rdx
cmpq $0x2, %rdx
jl 0x3eb7
movq 0x98(%r8), %r8
cvttsd2si 0xa8(%r8), %ecx
movq %rax, %r9
addq $0x58, %r9
movl $0x1, %r11d
xorl %eax, %eax
movl %eax, %r10d
movl $0x16, %eax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x158(%r8,%r10,2), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3ea5
leaq (%r9,%r10), %rsi
movq %rax, %rcx
movq %rbx, %rdi
rep  movsl (%rsi), %es:(%rdi)
cvttsd2si 0x158(%r8,%r10,2), %ecx
movq %r11, %rsi
incq %rsi
addq $0x58, %r10
movq %rsi, %r11
cmpq %rdx, %rsi
jb 0x3e78
leaq 0x13ce(%rip), %rdi      # 0x528c
xorl %eax, %eax
callq 0x1030
movq %rbx, %rdi
callq 0x3a1e
leaq 0x13bf(%rip), %rdi      # 0x5293
callq 0x1040
movq 0x4118(%rip), %rbx      # 0x7ff8
movq (%rbx), %rdi
callq 0x11e0
movq 0x4391(%rip), %rdi      # 0x8280
callq 0x428f
leaq 0x13a5(%rip), %rdi      # 0x52a0
callq 0x1040
movq (%rbx), %rdi
callq 0x11e0
movq %r14, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/mctree.c
// Function: initmctree
void initmctree(struct mctreenode * node, struct thudboard * board) {
    node->boardstate = * board;
    node->allmoves = allmoves(board);
    int movecount = node->allmoves.used;
    node->unexplored_moves = movecount;
    node->children = malloc(movecount * sizeof(struct mctreenode));
    node->scoreguess = 0;
    node->visits = 1;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movl $0x10, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x2047
movq %rax, 0x80(%rbx)
movq %rdx, 0x88(%rbx)
movl %eax, 0x90(%rbx)
cltq
imulq $0xb0, %rax, %rdi
callq 0x1090
movq %rax, 0x98(%rbx)
xorps %xmm0, %xmm0
movhps 0xfba(%rip), %xmm0      # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, 0xa0(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/mctree.c
// Function: closemctree
void closemctree(struct mctreenode * node) {
    for (int ix=0 ; ix<node->allmoves.used ; ix+=1) {
        closemctree(& node->children[ix]);
    }
    free(node->children);

    closelist(& (node->allmoves));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x80(%rdi), %rbx
cmpl $0x0, 0x80(%rdi)
jle 0x42d5
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x98(%r14), %rdi
addq %r15, %rdi
callq 0x428f
incq %r12
movslq 0x80(%r14), %rax
addq $0xb0, %r15
cmpq %rax, %r12
jl 0x42b0
movq 0x98(%r14), %rdi
callq 0x10e0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3d55
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/ttable.c
// Function: inithash
void inithash(void)
{
    // hashes should be "random" yet must be the same every run
    // otherwise the opening book file will be unusable
    srandom(1);

    turnhash = randomhash();

    for (int i=0; i < SIZE*SIZE; ++i)
    {
        dwarfhash[i] = randomhash();
        trollhash[i] = randomhash();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x10b0
callq 0x1150
movq %rax, %rbx
shlq $0x20, %rbx
callq 0x1150
xorq %rbx, %rax
movq %rax, 0x3f68(%rip)      # 0x82a0
xorl %r14d, %r14d
leaq 0x3f6e(%rip), %r15      # 0x82b0
leaq 0x4677(%rip), %r12      # 0x89c0
callq 0x1150
movq %rax, %rbx
shlq $0x20, %rbx
callq 0x1150
xorq %rbx, %rax
movq %rax, (%r14,%r15)
callq 0x1150
movq %rax, %rbx
shlq $0x20, %rbx
callq 0x1150
xorq %rbx, %rax
movq %rax, (%r14,%r12)
addq $0x8, %r14
cmpq $0x708, %r14            # imm = 0x708
jne 0x4349
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/ttable.c
// Function: initttable
void initttable(int memuse)
{
    TTABLESIZE = memuse / sizeof(struct tableentry);

    // allocate memory for table
    void * mem = mmap(NULL, memuse, PROT_READ | PROT_WRITE,
                      MAP_ANON | MAP_PRIVATE, -1, 0);
    ttable = (struct tableentry *) mem;

    // read in table data if present
    FILE * book = fopen(BOOKFILENAME, "r");
    if (book)
    {
        //printf("Reading opening book...");
        //fflush(stdout);
        struct tableentry temp;
        while (fread(& temp, sizeof(struct tableentry), 1, book))
        {
            int index = ttindex(temp.hash);
            ttable[index] = temp;
        }
        //printf(" done.\n");
        //fflush(stdout);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movslq %edi, %rsi
movl %esi, %eax
sarl $0x5, %eax
movl %eax, 0x4cbe(%rip)      # 0x90c8
xorl %edi, %edi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x11c0
movq %rax, 0x4ca5(%rip)      # 0x90d0
leaq 0xe7b(%rip), %rdi       # 0x52ad
leaq 0xe72(%rip), %rsi       # 0x52ab
callq 0x10a0
testq %rax, %rax
je 0x44b3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movl $0x20, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x1120
testq %rax, %rax
je 0x44b3
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rax
movslq 0x4c55(%rip), %rcx      # 0x90c8
xorl %edx, %edx
divq %rcx
movq 0x4c51(%rip), %rax      # 0x90d0
movslq %edx, %rcx
shlq $0x5, %rcx
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movl $0x20, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x1120
testq %rax, %rax
jne 0x4467
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/ttable.c
// Function: ttput
void ttput(struct tableentry newentry)
{
    int index = ttindex(newentry.hash);
    struct tableentry * entry = & ttable[index];

    if (newentry.worth >= entry->worth) * entry = newentry;
    else entry->worth -= newentry.worth;
}

// Assembly:
movq 0x8(%rsp), %rax
movslq 0x4c01(%rip), %rcx      # 0x90c8
xorl %edx, %edx
divq %rcx
movq 0x4bfd(%rip), %rcx      # 0x90d0
movslq %edx, %rdx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %rax
movl 0xc(%rcx,%rdx), %ecx
subl 0x14(%rsp), %ecx
jle 0x44ec
movl %ecx, 0xc(%rax)
retq
leaq 0x8(%rsp), %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/icarroll[P]clunk/ttable.c
// Function: ttget
struct tableentry * ttget(hash_t hash)
{
    struct tableentry * entry = & ttable[ttindex(hash)];

    if (entry->hash == hash)
    {
      entry->worth = entry->depth;
      return entry;
    }
    else return NULL;
}

// Assembly:
movq 0x4bc9(%rip), %rsi      # 0x90d0
movslq 0x4bba(%rip), %r8       # 0x90c8
xorl %ecx, %ecx
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movslq %edx, %rax
shlq $0x5, %rax
cmpq %rdi, (%rsi,%rax)
jne 0x4531
addq %rax, %rsi
movl 0x8(%rsi), %eax
movl %eax, 0xc(%rsi)
movq %rsi, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/deoxyseq256128v13/ref/tweakableBC.c
// Function: multi
uint8_t multi (uint8_t x, uint8_t alpha) {
  if( 1 == alpha ) return x;
  if( 2 == alpha ) return mul2[x];
  if( 4 == alpha ) return mul2[mul2[x]];

  printf("Incorrect alpha (%d) passed to the function g in the tweakey schedule. Exiting...\n", alpha); exit(2);
}

// Assembly:
cmpl $0x1, %esi
je 0x20c1
cmpl $0x2, %esi
je 0x20b2
cmpl $0x4, %esi
jne 0x20c4
movzbl %dil, %eax
leaq 0x30f2(%rip), %rcx      # 0x51a0
movb (%rax,%rcx), %dil
movzbl %dil, %eax
leaq 0x30e3(%rip), %rcx      # 0x51a0
movb (%rax,%rcx), %dil
movl %edi, %eax
retq
pushq %rax
movzbl %sil, %esi
leaq 0x59f0(%rip), %rdi      # 0x7ac0
xorl %eax, %eax
callq 0x1030
movl $0x2, %edi
callq 0x1060
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: send_input
static int
send_input(void * cookie)
{
	struct senddata * send = (struct senddata *)cookie;
	size_t len = 0;

	/* Read data from stdin. */
	if ((send->nchars = getline(&send->buffer, &len, stdin)) != -1) {
		/* Send data to server. */
		if ((send->write_cookie = network_write(send->socket,
		    (uint8_t *)send->buffer, (size_t)send->nchars,
		    (size_t)send->nchars, callback_wrote, cookie)) == NULL) {
			warn0("network_write failure");
			goto err0;
		}
	} else {
		/* If we didn't get an EOF, then there was an error. */
		if (!feof(stdin)) {
			warn0("getline(..., ..., stdin)");
			goto err0;
		}

		/* We're not going to send anything else. */
		if (shutdown(send->socket, SHUT_WR)) {
			warnp("shutdown");
			goto err0;
		}

		/*
		 * The server should not send any data back, but attempting to
		 * read will detect when the other end of the socket is closed.
		 */
		if ((send->read_cookie = network_read(send->socket,
		    send->dummybuf, 1, 1, callback_stopping, cookie))
		    == NULL) {
			warn0("network_read initialize");
			goto err0;
		}

	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rsi
movq $0x0, (%rsi)
movq 0x88ba(%rip), %r14      # 0xafd8
movq (%r14), %rdx
callq 0x22a0
movq %rax, 0x8(%rbx)
cmpq $-0x1, %rax
je 0x2758
movl 0x10(%rbx), %edi
movq (%rbx), %rsi
leaq 0xd0(%rip), %r8         # 0x280d
movq %rax, %rdx
movq %rax, %rcx
movq %rbx, %r9
callq 0x468c
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x2798
xorl %eax, %eax
jmp 0x27bf
movq (%r14), %rdi
callq 0x21d0
testl %eax, %eax
je 0x27a1
movl 0x10(%rbx), %edi
movl $0x1, %esi
callq 0x20f0
testl %eax, %eax
je 0x27c7
callq 0x2090
cmpl $0x0, (%rax)
je 0x27fd
movq %rax, %rbx
leaq 0x492f(%rip), %rdi      # 0x70b8
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%rbx)
jmp 0x27ba
leaq 0x48ea(%rip), %rdi      # 0x7089
jmp 0x27a8
leaq 0x48f7(%rip), %rdi      # 0x709f
xorl %eax, %eax
callq 0x5fbf
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x10(%rbx), %edi
leaq 0x30(%rbx), %rsi
leaq 0xbf(%rip), %r8         # 0x2894
movl $0x1, %edx
movl $0x1, %ecx
movq %rbx, %r9
callq 0x4160
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x2754
leaq 0x48c6(%rip), %rdi      # 0x70c1
jmp 0x27a8
leaq 0x48b4(%rip), %rdi      # 0x70b8
xorl %eax, %eax
callq 0x5fbf
jmp 0x27ba
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: callback_wrote
static int
callback_wrote(void * cookie, ssize_t lenwrit)
{
	struct senddata * send = (struct senddata *)cookie;

	/* We are no longer writing. */
	send->write_cookie = NULL;

	/* Check results. */
	if (lenwrit == -1) {
		warnp("network_write send");
		goto err0;
	} else {
		/* We should have sent everything. */
		assert(lenwrit == send->nchars);
	}

	/* Clear the buffer that was used. */
	free(send->buffer);
	send->buffer = NULL;

	return send_input(cookie);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
movq $0x0, 0x20(%rdi)
cmpq $-0x1, %rsi
je 0x283d
movq %rdi, %rbx
cmpq %rsi, 0x8(%rdi)
jne 0x2875
movq (%rbx), %rdi
callq 0x2040
movq $0x0, (%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2706
callq 0x2090
cmpl $0x0, (%rax)
je 0x2860
movq %rax, %rbx
leaq 0x4888(%rip), %rdi      # 0x70d9
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%rbx)
jmp 0x286e
leaq 0x4872(%rip), %rdi      # 0x70d9
xorl %eax, %eax
callq 0x5fbf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
leaq 0x4870(%rip), %rdi      # 0x70ec
leaq 0x4881(%rip), %rsi      # 0x7104
leaq 0x4881(%rip), %rcx      # 0x710b
movl $0x7c, %edx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: callback_stopping
static int
callback_stopping(void * cookie, ssize_t lenread)
{
	struct senddata * send = (struct senddata *)cookie;

	/* We are no longer reading. */
	send->read_cookie = NULL;

	/* Check results. */
	if (lenread == -1) {
		warnp("network_read received");
		goto err0;
	} else {
		/* We should have received nothing. */
		if (lenread != 0) {
			warn0("network_read received non-zero data");
			goto err0;
		}
	}

	/* Close connection. */
	send->conndone = 1;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
movq $0x0, 0x28(%rdi)
testq %rsi, %rsi
je 0x28cb
pushq %rbx
cmpq $-0x1, %rsi
jne 0x28d5
callq 0x2090
cmpl $0x0, (%rax)
je 0x28f0
movq %rax, %rbx
leaq 0x4873(%rip), %rdi      # 0x712f
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%rbx)
jmp 0x28fe
movl $0x1, 0x14(%rdi)
xorl %eax, %eax
retq
leaq 0x4869(%rip), %rdi      # 0x7145
xorl %eax, %eax
callq 0x5fbf
callq 0x2090
movl $0x0, (%rax)
jmp 0x28fe
leaq 0x4838(%rip), %rdi      # 0x712f
xorl %eax, %eax
callq 0x5fbf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: network_connect_internal
static void *
network_connect_internal(struct sock_addr * const * sas,
    const struct sock_addr * sa_b, const struct timeval * timeo,
    int (* callback)(void *, int), void * cookie)
{
	struct connect_cookie * C;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct connect_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->sas = sas;
	C->sa_b = sa_b;
	C->cookie_immediate = NULL;
	C->cookie_timeo = NULL;
	C->s = -1;

	/* Do we have a timeout? */
	if (timeo != NULL) {
		memcpy(&C->timeo, timeo, sizeof(struct timeval));
		C->timeo_enabled = 1;
	} else {
		C->timeo_enabled = 0;
	}

	/* Try to connect to the first address. */
	if (tryconnect(C))
		goto err0;

	/* Success! */
	return (C);

err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbp
movl $0x48, %edi
callq 0x2200
testq %rax, %rax
je 0x3ddd
movq %rax, %rbx
movq %r13, (%rax)
movq %r15, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %r12, 0x18(%rax)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x40(%rbx)
movl $0xffffffff, 0x38(%rbx) # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x3dce
movups (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movl $0x1, %eax
movl %eax, 0x3c(%rbx)
movq %rbx, %rdi
callq 0x3ee7
testl %eax, %eax
je 0x3ddf
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: network_connect_cancel
void
network_connect_cancel(void * cookie)
{
	struct connect_cookie * C = cookie;

	/* We should have either an immediate callback or a socket. */
	assert((C->cookie_immediate != NULL) || (C->s != -1));
	assert((C->cookie_immediate == NULL) || (C->s == -1));

	/* Cancel any timer. */
	if (C->cookie_timeo != NULL)
		events_timer_cancel(C->cookie_timeo);

	/* Cancel any immediate callback. */
	if (C->cookie_immediate != NULL)
		events_immediate_cancel(C->cookie_immediate);

	/* Close any socket. */
	if (C->s != -1) {
		events_network_cancel(C->s, EVENTS_NETWORK_OP_WRITE);
		if (close(C->s))
			warnp("close");
	}

	/* Free the cookie. */
	free(C);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movl 0x38(%rbx), %eax
testq %rdi, %rdi
je 0x3e45
cmpl $-0x1, %eax
je 0x3e4a
leaq 0x3616(%rip), %rdi      # 0x7443
leaq 0x35c2(%rip), %rsi      # 0x73f6
leaq 0x35e4(%rip), %rcx      # 0x741f
movl $0x11f, %edx            # imm = 0x11F
callq 0x2150
cmpl $-0x1, %eax
je 0x3ec8
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x3e5f
movq %rax, %rdi
callq 0x3bea
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3e69
callq 0x2e5a
movl 0x38(%rbx), %edi
cmpl $-0x1, %edi
je 0x3eb9
movl $0x1, %esi
callq 0x3505
movl 0x38(%rbx), %edi
callq 0x2170
testl %eax, %eax
je 0x3eb9
callq 0x2090
cmpl $0x0, (%rax)
je 0x3eab
movq %rax, %r14
leaq 0x35d6(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%r14)
jmp 0x3eb9
leaq 0x35bf(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5fbf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
leaq 0x34f9(%rip), %rdi      # 0x73c8
leaq 0x3520(%rip), %rsi      # 0x73f6
leaq 0x3542(%rip), %rcx      # 0x741f
movl $0x11e, %edx            # imm = 0x11E
callq 0x2150
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: tryconnect
static int
tryconnect(struct connect_cookie * C)
{

	/* Try addresses until we find one which doesn't fail immediately. */
	for (; C->sas[0] != NULL; C->sas++) {
		/* Can we try to connect to this address? */
		if ((C->s = sock_connect_bind_nb(C->sas[0], C->sa_b)) != -1)
			break;
	}

	/* Did we run out of addresses to try? */
	if (C->sas[0] == NULL)
		goto failed;

	/* If we've been asked to have a timeout, set one. */
	if (C->timeo_enabled) {
		if ((C->cookie_timeo = events_timer_register(callback_timeo,
		    C, &C->timeo)) == NULL)
			goto err1;
	} else {
		C->cookie_timeo = NULL;
	}

	/* Wait until this socket connects or fails to do so. */
	if (events_network_register(callback_connect, C, C->s,
	    EVENTS_NETWORK_OP_WRITE))
		goto err2;

	/* Success! */
	return (0);

failed:
	/* Schedule a callback. */
	if ((C->cookie_immediate =
	    events_immediate_register(docallback, C, 0)) == NULL)
		goto err1;

	/* Failure successfully handled. */
	return (0);

err2:
	if (C->cookie_timeo != NULL)
		events_timer_cancel(C->cookie_timeo);
err1:
	if ((C->s != -1) && close(C->s))
		warnp("close");
	free(C);

	/* Fatal error. */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3f47
movq 0x18(%rbx), %rsi
callq 0x5874
movl %eax, 0x38(%rbx)
movq 0x10(%rbx), %rcx
cmpl $-0x1, %eax
jne 0x3f1d
leaq 0x8(%rcx), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rcx), %rdi
jmp 0x3ef5
cmpq $0x0, (%rcx)
je 0x3f47
cmpl $0x0, 0x3c(%rbx)
je 0x3f9c
leaq 0x20(%rbx), %rdx
leaq 0xc1(%rip), %rdi        # 0x3ff5
movq %rbx, %rsi
callq 0x3a70
movq %rax, 0x40(%rbx)
testq %rax, %rax
jne 0x3fa4
jmp 0x3f67
leaq 0x190(%rip), %rdi       # 0x40de
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2d68
movq %rax, 0x30(%rbx)
testq %rax, %rax
jne 0x3fea
movl 0x38(%rbx), %edi
cmpl $-0x1, %edi
je 0x3fdd
callq 0x2170
testl %eax, %eax
je 0x3fdd
callq 0x2090
cmpl $0x0, (%rax)
je 0x3fcf
movq %rax, %r14
leaq 0x34e5(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%r14)
jmp 0x3fdd
movq $0x0, 0x40(%rbx)
movl 0x38(%rbx), %edx
leaq 0x69(%rip), %rdi        # 0x4017
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x3164
testl %eax, %eax
je 0x3ff1
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x3f67
callq 0x3bea
jmp 0x3f67
leaq 0x349b(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5fbf
movq %rbx, %rdi
callq 0x2040
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3fea
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: callback_connect
static int
callback_connect(void * cookie)
{
	struct connect_cookie * C = cookie;
	int sockerr;
	socklen_t sockerrlen = sizeof(int);

	/* Stop waiting for the timer callback. */
	if (C->cookie_timeo != NULL) {
		events_timer_cancel(C->cookie_timeo);
		C->cookie_timeo = NULL;
	}

	/* Did we succeed? */
	if (getsockopt(C->s, SOL_SOCKET, SO_ERROR, &sockerr, &sockerrlen))
		goto err1;
	if (sockerr != 0)
		return (dofailed(C));

	/*
	 * Perform the callback (this can be done here rather than being
	 * scheduled as an immediate callback, as we're already running from
	 * callback context).
	 */
	return (docallback(C));

err1:
	if (close(C->s))
		warnp("close");
	free(C);

	/* Fatal error! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x4, 0x8(%rsp)
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x4040
callq 0x3bea
movq $0x0, 0x40(%rbx)
movl 0x38(%rbx), %edi
leaq 0xc(%rsp), %rcx
leaq 0x8(%rsp), %r8
movl $0x1, %esi
movl $0x4, %edx
callq 0x21a0
testl %eax, %eax
je 0x4090
movl 0x38(%rbx), %edi
callq 0x2170
testl %eax, %eax
je 0x40b1
callq 0x2090
cmpl $0x0, (%rax)
je 0x40a3
movq %rax, %r14
leaq 0x33f1(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%r14)
jmp 0x40b1
cmpl $0x0, 0xc(%rsp)
je 0x40c9
movq %rbx, %rdi
callq 0x4100
movl %eax, %ebp
jmp 0x40be
leaq 0x33c7(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5fbf
movq %rbx, %rdi
callq 0x2040
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rdi
movl 0x38(%rbx), %esi
callq *(%rbx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2040
jmp 0x40be
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: dofailed
static int
dofailed(struct connect_cookie * C)
{

	/* Close the socket which failed to connect. */
	if (close(C->s))
		warnp("close");

	/* We don't have an open socket any more. */
	C->s = -1;

	/* This address didn't work. */
	C->sas++;

	/* Try other addresses until we run out of options. */
	return (tryconnect(C));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %edi
callq 0x2170
testl %eax, %eax
je 0x4145
callq 0x2090
cmpl $0x0, (%rax)
je 0x4137
movq %rax, %r14
leaq 0x334a(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5ea0
movl $0x0, (%r14)
jmp 0x4145
leaq 0x3333(%rip), %rdi      # 0x7471
xorl %eax, %eax
callq 0x5fbf
movl $0xffffffff, 0x38(%rbx) # imm = 0xFFFFFFFF
addq $0x8, 0x10(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3ee7
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x8/scan_test.c
// Function: test_max_subtree_n
int test_max_subtree_n(int *i)
{
	const struct test {
		const char	*name;
		const int	array[10];
		int		want;
	} tests[] = {
		{
			.name	= "31,-41,59,26,-53,58,97,-93,-23,84",
			.array	= {31, -41, 59, 26, -53, 58, 97, -93, -23, 84},
			.want	= 187,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

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

		printf("%3d) %-25s: %-45s", ++(*i), "test_max_subtree_n", t->name);
		got = max_subtree_n(t->array, 10);
		if (got != t->want) {
			printf("FAIL, got(%d)!=want(%d)\n", got, t->want);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x2b7c(%rip), %rsi      # 0x3d10
movq %rsp, %rdi
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
leaq 0xe5e(%rip), %rcx       # 0x2004
leaq 0x38(%rsp), %r12
leaq 0xe74(%rip), %r14       # 0x2026
leaq 0xe7f(%rip), %r15       # 0x2038
leaq 0xe8b(%rip), %r13       # 0x204b
xorl %ebp, %ebp
movl (%rbx), %esi
incl %esi
movl %esi, (%rbx)
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1040
leaq -0x30(%r12), %rdi
movl $0xa, %esi
callq 0x114c
movl -0x8(%r12), %edx
cmpl %edx, %eax
jne 0x11fb
leaq 0xe70(%rip), %rdi       # 0x2064
callq 0x1030
jmp 0x1209
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
incl %ebp
movq (%r12), %rcx
addq $0x38, %r12
testq %rcx, %rcx
jne 0x11c2
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x8/bisect.c
// Function: _max_subtree_logn
static int __max_subtree_logn(const int a[], int l, int u)
{
	int left, right, sum;
	int m;
	int i;

	if (l > u)
		return -1;
	else if (l == u)
		return a[l];

	/* get the middle max */
	m = (l+u)/2;
	left = sum = 0;
	for (i = m; i >= l; i--) {
		sum += a[i];
		left = max(left, sum);
	}
	right = sum = 0;
	for (i = m+1; i <= u; i++) {
		sum += a[i];
		right = max(right, sum);
	}

	return max3(left+right, __max_subtree_logn(a, l, m), __max_subtree_logn(a, m+1, u));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x80000000, %ebx       # imm = 0x80000000
cmpl %edx, %esi
jg 0x12df
movl %edx, %r15d
movq %rdi, %r14
leaq 0x4(%rdi), %rax
movq %rax, (%rsp)
cmpl %r15d, %esi
je 0x12e6
leal (%rsi,%r15), %eax
movl %eax, %r12d
shrl %r12d
xorl %ebp, %ebp
movl $0x0, %ecx
cmpl %esi, %r12d
jl 0x1292
xorl %edx, %edx
movl %r12d, %edi
xorl %ecx, %ecx
movl %edi, %r8d
addl (%r14,%r8,4), %edx
cmpl %edx, %ecx
cmovlel %edx, %ecx
leal -0x1(%rdi), %r8d
cmpl %esi, %edi
movl %r8d, %edi
jg 0x127b
cmpl %r15d, %r12d
jge 0x12b7
shrl %eax
movq (%rsp), %rdx
leaq (%rdx,%rax,4), %rdx
xorl %edi, %edi
xorl %ebp, %ebp
addl (%rdx), %edi
cmpl %edi, %ebp
cmovlel %edi, %ebp
incl %eax
addq $0x4, %rdx
cmpl %r15d, %eax
jl 0x12a5
addl %ecx, %ebp
leal 0x1(%r12), %r13d
movq %r14, %rdi
movl %r12d, %edx
callq 0x122f
cmpl %eax, %ebp
cmovlel %eax, %ebp
cmpl %ebx, %ebp
cmovgl %ebp, %ebx
movl %r13d, %esi
cmpl %r15d, %r12d
jl 0x1255
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x12ed
movl %r15d, %eax
movl (%r14,%rax,4), %eax
cmpl %ebx, %eax
cmovgl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x8/bisect_test.c
// Function: test_max_subtree_logn
int test_max_subtree_logn(int *i)
{
	const struct test {
		const char	*name;
		const int	array[10];
		int		want;
	} tests[] = {
		{
			.name	= "31,-41,59,26,-53,58,97,-93,-23,84",
			.array	= {31, -41, 59, 26, -53, 58, 97, -93, -23, 84},
			.want	= 187,
		},
		{ /* sentry */ },
	};
	const struct test *t;
	int fail = 0;

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

		printf("%3d) %-25s: %-45s", ++(*i), "test_max_subtree_logn", t->name);
		got = max_subtree_logn(t->array, 10);
		if (got != t->want) {
			printf("FAIL, got(%d)!=want(%d)\n", got, t->want);
			fail++;
		} else
			puts("PASS");
	}
	return fail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x2a64(%rip), %rsi      # 0x3d80
movq %rsp, %rdi
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
leaq 0xcd6(%rip), %rcx       # 0x2004
leaq 0x38(%rsp), %r12
leaq 0xcec(%rip), %r14       # 0x2026
leaq 0xd28(%rip), %r15       # 0x2069
leaq 0xd03(%rip), %r13       # 0x204b
xorl %ebp, %ebp
movl (%rbx), %esi
incl %esi
movl %esi, (%rbx)
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1040
leaq -0x30(%r12), %rdi
movl $0xa, %esi
callq 0x1228
movl -0x8(%r12), %edx
cmpl %edx, %eax
jne 0x1383
leaq 0xce8(%rip), %rdi       # 0x2064
callq 0x1030
jmp 0x1391
movq %r13, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
incl %ebp
movq (%r12), %rcx
addq $0x38, %r12
testq %rcx, %rcx
jne 0x134a
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/keithnoguchi[P]pearls-in-action/0x8/main_test.c
// Function: main
int main(void)
{
	int fail = 0;
	int i = 0;

	printf("===============================\n");
	printf("Programming Pearls, Chapter 0x8\n");
	printf("===============================\n");

	if (test_max_subtree_n(&i))
		fail++;
	if (test_max_subtree_logn(&i))
		fail++;

	return fail;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rsp), %rbx
movl $0x0, (%rbx)
leaq 0xcd9(%rip), %r14       # 0x209f
movq %r14, %rdi
callq 0x1030
leaq 0xcaa(%rip), %rdi       # 0x207f
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x117c
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x1304
leal 0x1(%r14), %ecx
testl %eax, %eax
cmovel %r14d, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/stack_list/stack.c
// Function: popStack
void popStack(Stack s)
{
    assert(s!=NULL);
    PStackNode node=s->next;
    s->next=s->next->next;
    free(node);
}

// Assembly:
testq %rdi, %rdi
je 0x126b
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, %rdi
jmp 0x1030
pushq %rax
leaq 0xda6(%rip), %rdi       # 0x2019
leaq 0xda7(%rip), %rsi       # 0x2021
leaq 0xdd8(%rip), %rcx       # 0x2059
movl $0x41, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/stack_list/stack.c
// Function: pushStack
void pushStack(int value, Stack s)
{
	PStackNode newNode;
    newNode=(PStackNode)malloc(sizeof(StackNode));
    if(newNode==NULL)
    {
        fatal("new node malloc failed");
    }
    newNode->value=value;
    newNode->next=s->next;
    s->next=newNode;

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x1080
testq %rax, %rax
je 0x12b7
movl %ebp, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xddf(%rip), %rdi       # 0x209d
leaq 0xd7d(%rip), %rsi       # 0x2042
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/stack_list/stack.c
// Function: printStack
void printStack(Stack s){
    assert(s!=NULL);
    if(isEmptyStack(s)){
        printf("stack is empty.\n");
        return;
    }
    
    printf("stack: ");
    PStackNode node=s->next;
    while(node!=NULL){
        printf("%d ", node->value);
        node=node->next;
    }
    printf("\n");
    
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1367
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x1354
leaq 0xd7b(%rip), %rdi       # 0x2091
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1343
leaq 0xd6c(%rip), %rbx       # 0x2099
movl (%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x132d
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
leaq 0xd52(%rip), %rdi       # 0x20ad
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
leaq 0xcab(%rip), %rdi       # 0x2019
leaq 0xcac(%rip), %rsi       # 0x2021
leaq 0xcfe(%rip), %rcx       # 0x207a
movl $0x53, %edx
callq 0x1070
nop
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/stack_list/main.c
// Function: main
int main(int argc, char** argv)
{
    
    Stack s;
    s=createStack(0);
    int i;
    for(i=0;i<10;i++){
        pushStack(rand()%100,s);
    }
    
    printStack(s);
    printf("Top: %d\n",topStack(s));
    popStack(s);
    popStack(s);
    printStack(s);
    printf("Top: %d\n",topStack(s));
    clearStack(s);
    printStack(s);
    exit(0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %edi, %edi
callq 0x11ac
movq %rax, %rbx
movl $0xa, %ebp
callq 0x10a0
movslq %eax, %rdi
imulq $0x51eb851f, %rdi, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
subl %eax, %edi
movq %rbx, %rsi
callq 0x128b
decl %ebp
jne 0x139b
movq %rbx, %rdi
callq 0x12fc
movq %rbx, %rdi
callq 0x12d3
leaq 0xcde(%rip), %r14       # 0x20bd
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1252
movq %rbx, %rdi
callq 0x1252
movq %rbx, %rdi
callq 0x12fc
movq %rbx, %rdi
callq 0x12d3
movq %r14, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x122b
movq %rbx, %rdi
callq 0x12fc
xorl %edi, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: insert
static struct node *insert(struct node *t, void *data, ftype dup,
                           ftype comp, jmp_buf env)
{
    if (t == NULL) {
        if ((t = malloc(sizeof(struct node))) == NULL) {
            longjmp(env, 2);
        }

        t->data = data;
        t->level = 1;
        t->left = NULL;
        t->right = NULL;
        return t;
    } else if (comp(data, t->data) == -1) {
        t->left = insert(t->left, data, dup, comp, env);
    } else if (comp(data, t->data) == 1) {
        t->right = insert(t->right, data, dup, comp, env);
    } else if (dup == NULL) {
        longjmp(env, 3);
    } else {
        if (dup(t->data, data) == 0) {
            return t;
        } else {
            longjmp(env, 4);
        }
    }

    t = skew(t);
    t = split(t);
    return t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rsi, %r15
testq %rdi, %rdi
je 0x1594
movq %rcx, %r13
movq %rdx, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq %r15, %rdi
callq *%rcx
cmpl $-0x1, %eax
je 0x15b9
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq *%r13
cmpl $0x1, %eax
jne 0x15ff
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x1537
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rdi
jmp 0x15d5
movl $0x20, %edi
callq 0x1130
testq %rax, %rax
je 0x161f
movq %rax, %rbx
movq %r15, 0x8(%rax)
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
jmp 0x1612
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x1537
movq %rax, %rdi
movq %rax, 0x10(%rbx)
testq %rdi, %rdi
je 0x15ee
movl (%rdi), %eax
cmpl (%rbx), %eax
jne 0x15ee
movq 0x18(%rdi), %rax
movq %rax, 0x10(%rbx)
movq %rbx, 0x18(%rdi)
jmp 0x15f1
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1cdb
testq %r12, %r12
je 0x162c
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%r12
testl %eax, %eax
jne 0x1639
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movl $0x2, %esi
callq 0x1150
movq %r14, %rdi
movl $0x3, %esi
callq 0x1150
movq %r14, %rdi
movl $0x4, %esi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: aa_traverse
int aa_traverse(aa * tree, void *(*func) (void *data), trav t)
{
    if (tree == NULL) {
        return 1;
    }

    switch (t) {
    case TRAV_IN:
        inorder(tree->root, func);
        break;
    case TRAV_POST:
        postorder(tree->root, func);
        break;
    case TRAV_PRE:
        preorder(tree->root, func);
        break;
    default:
        return 2;
        break;
    }

    return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1930
cmpl $0x2, %edx
je 0x1941
cmpl $0x1, %edx
je 0x1937
movl $0x2, %eax
testl %edx, %edx
jne 0x194b
movq (%rdi), %rdi
callq 0x194d
jmp 0x1949
movl $0x1, %eax
jmp 0x194b
movq (%rdi), %rdi
callq 0x1988
jmp 0x1949
movq (%rdi), %rdi
callq 0x19cc
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: inorder
static void inorder(struct node *node, void *(*func) (void *data))
{
    if (node == NULL)
        return;

    if (node->left)
        inorder(node->left, func);

    node->data = func(node->data);

    if (node->right)
        inorder(node->right, func);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x1980
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x196d
movq %rbx, %rsi
callq 0x194d
movq 0x8(%r14), %rdi
callq *%rbx
movq %rax, 0x8(%r14)
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x1957
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: postorder
static void postorder(struct node *node, void *(*func) (void *data))
{
    if (node == NULL)
        return;

    if (node->left)
        postorder(node->left, func);

    if (node->right)
        postorder(node->right, func);

    node->data = func(node->data);
}

// Assembly:
testq %rdi, %rdi
je 0x19cb
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x19a8
movq %r14, %rsi
callq 0x1988
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x19b9
movq %r14, %rsi
callq 0x1988
movq 0x8(%rbx), %rdi
callq *%r14
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: preorder
static void preorder(struct node *node, void *(*func) (void *data))
{
    if (node == NULL)
        return;

    node->data = func(node->data);

    if (node->left)
        preorder(node->left, func);

    if (node->right)
        preorder(node->right, func);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x19ff
movq 0x8(%r14), %rdi
callq *%rbx
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x19f6
movq %rbx, %rsi
callq 0x19cc
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x19d6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: freetree
static void freetree(struct node *node)
{
    if (node == NULL)
        return;

    if (node->left)
        freetree(node->left);

    if (node->right)
        freetree(node->right);

    free(node);
}

// Assembly:
testq %rdi, %rdi
je 0x1a6c
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x1a55
callq 0x1a3e
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1a63
callq 0x1a3e
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: aa_set_here
int aa_set_here(aa * tree, void *data, int (*dup) (void *orig, void *data))
{
    if (tree == NULL) {
        return 1;
    }

    if (tree->cursor == NULL) {
        return 2;
    }

    if (tree->comp(data, tree->cursor->data) == 0) {
        if (dup != NULL) {
            if (dup(tree->cursor->data, data) == 0) {
                return 0;
            } else {
                return 4;
            }

        } else {
            return 3;
        }

    } else {
        tree->cursor->data = data;
        return 0;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1aba
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1ac0
movq %rdx, %r14
movq %rsi, %rbx
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq *0x10(%r15)
testl %eax, %eax
je 0x1ac7
movq 0x8(%r15), %rax
movq %rbx, 0x8(%rax)
xorl %eax, %eax
jmp 0x1aed
movl $0x1, %eax
retq
movl $0x2, %eax
jmp 0x1aed
testq %r14, %r14
je 0x1ae8
movq 0x8(%r15), %rax
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq *%r14
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
shll $0x2, %eax
jmp 0x1aed
movl $0x3, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: aa_print
int aa_print(aa * tree, FILE * fp, void (*printer) (FILE *, void *))
{
    if (!tree)
        return -1;

    if (tree->root == NULL)
        return -2;

    fprintf(fp, "digraph aa_tree {\n");
    fprintf(fp, "node [shape = record];\n");
    tree_print(tree->root, 1, printer, fp);
    fprintf(fp, "}\n");

    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x1c07
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
cmpq $0x0, (%rdi)
je 0x1c0d
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x1468(%rip), %rdi      # 0x3014
movl $0x12, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0x1462(%rip), %rdi      # 0x3027
movl $0x17, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1c18
leaq 0x144e(%rip), %rdi      # 0x303f
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
xorl %eax, %eax
jmp 0x1c12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: tree_print
static void tree_print(struct node *node, unsigned long long int n,
                       void (*printer) (FILE *, void *), FILE * fp)
{
    unsigned long long int pn = n / 2;

    fprintf(fp, "node%llu [label = \"<f0> | <f1> ", n);
    printer(fp, node->data);
    fprintf(fp, "|<f2> \"];\n");

    if (pn != 0) {
        if (n % 2 == 0) {
            fprintf(fp, "\"node%llu\":f0 -> \"node%llu\":f1;\n", pn, n);
        } else {
            fprintf(fp, "\"node%llu\":f2 -> \"node%llu\":f1;\n", pn, n);
        }
    }

    if (node->left)
        tree_print(node->left, 2 * n, printer, fp);

    if (node->right)
        tree_print(node->right, 2 * n + 1, printer, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x140c(%rip), %r13      # 0x3042
leaq 0x1425(%rip), %rbp      # 0x3062
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1110
movq 0x8(%r12), %rsi
movq %rbx, %rdi
callq *%r14
movl $0xa, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x1190
cmpq $0x2, %r15
jb 0x1c9c
movq %r15, %rdx
shrq %rdx
testb $0x1, %r15b
leaq 0x140a(%rip), %rsi      # 0x308e
leaq 0x13e2(%rip), %rax      # 0x306d
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1110
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x1cb5
leaq (%r15,%r15), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1c18
movq 0x18(%r12), %r12
testq %r12, %r12
je 0x1ccc
leaq 0x1(,%r15,2), %r15
jmp 0x1c3d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/aa-tree.c
// Function: split
static struct node *split(struct node *t)
{
    struct node *r;

    if (t == NULL)
        return NULL;

    if ((t->right == NULL) || (t->right->right == NULL))
        return t;

    if (t->level == t->right->right->level) {
        r = t->right;
        t->right = r->left;
        r->left = t;
        r->level++;
        return r;
    } else {
        return t;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1d0b
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x1d07
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x1d07
movl (%rdi), %edx
cmpl (%rcx), %edx
jne 0x1d07
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rdi)
movq %rdi, 0x10(%rax)
incl (%rax)
retq
movq %rdi, %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/asprintf.c
// Function: vasprintf
int vasprintf(char **ret, const char *fmt, va_list ap)
{
    int n;
    va_list ap2;

    va_copy(ap2, ap);

    if ((n = vsnprintf(NULL, 0, fmt, ap2)) < 0)
        goto error;

    va_end(ap2);

    if ((*ret = malloc(n + 1)) == NULL)
        goto error;

    if ((n = vsnprintf(*ret, n + 1, fmt, ap)) < 0) {
        free(*ret);
        goto error;
    }

    return n;

  error:
    *ret = NULL;
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdx), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
movups (%rdx), %xmm0
movaps %xmm0, (%rcx)
xorl %edi, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1070
testl %eax, %eax
js 0x1d78
movl %eax, %r12d
incl %r12d
movq %r12, %rdi
callq 0x1130
movq %rax, (%rbx)
testq %rax, %rax
je 0x1d78
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1070
testl %eax, %eax
jns 0x1d84
movq (%rbx), %rdi
callq 0x1030
movq $0x0, (%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/ll3.c
// Function: new_node
ll *new_node(int tag, void *data, ll * next)
{
    ll *new;

    if (!(new = malloc(sizeof(ll))))
        return NULL;

    new->tag = tag;
    new->data = data;
    new->nxt = next;

    return new;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x1130
testq %rax, %rax
je 0x1ef1
movl %ebp, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/ll3.c
// Function: map
ll *map(ll * beg, void *(proc) (int, void *))
{
    ll *tmp = beg;

    if (!beg)
        return NULL;

    while (beg) {
        beg->data = proc(beg->tag, beg->data);
        beg = beg->nxt;
    }

    return tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1f20
movq %rsi, %r14
movq %rbx, %r15
movl (%r15), %edi
movq 0x8(%r15), %rsi
callq *%r14
movq %rax, 0x8(%r15)
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x1f09
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/ll3.c
// Function: free_all_data
ll *free_all_data(ll * beg)
{
    ll *tmp = beg;

    if (!beg)
        return NULL;

    while (beg) {
        free(beg->data);
        beg->data = NULL;
        beg = beg->nxt;
    }

    return tmp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1f83
movq %rbx, %r14
movq 0x8(%r14), %rdi
callq 0x1030
movq $0x0, 0x8(%r14)
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1f69
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chbarts[P]aa-tree/sort2.c
// Function: comparator
static int comparator(void *left, void *right)
{
    char *cl, *cr;
    int r;

    cl = (char *) get_data((ll *) left);
    cr = (char *) get_data((ll *) right);

    r = strcmp(cl, cr);

    if (r > 0) {
        r = 1;
    } else if (r < 0) {
        r = -1;
    }

    return (rev * r);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x1e47
movq %rax, %r14
movq %rbx, %rdi
callq 0x1e47
movq %r14, %rdi
movq %rax, %rsi
callq 0x10f0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
negl %ecx
testl %eax, %eax
movl $0x1, %eax
cmovlel %ecx, %eax
imull 0x3e2b(%rip), %eax      # 0x60ec
addq $0x8, %rsp
popq %rbx
popq %r14
retq