LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/veltzer[P]xmeltdown/src/dance.c
// Function: DrawTween
void DrawTween(double factor, int which, int curbuf)
/* what fraction the movement is completed
 * which player
 * which buffer not to draw into */
{
	RayPtr toray, fromray, tweenray;
	int bonesize=sizeof(Ray);
	int bone;
/*	int		stepctr, skelctr; */
	/* static int	lastbuf = 0; */
/*	int		flag1 = 1;
 * int		flag2 = 1;
 * int		flag3 = 1;
 * int		flag4 = 0; */
	for (bone=0; bone < 11; bone++) {
		fromray=(RayPtr) ((long) &(fromskel[which]->torso)+(long) (bone*bonesize));
		toray=(RayPtr) ((long) &(toskel[which]->torso)+(long) (bone*bonesize));
		tweenray=(RayPtr) ((long) &(tweenskel[which]->torso)+(long) (bone*bonesize));
/*
** Never rotate through an angle > PI. I.e., take the shortest path.
*/
		if ((fromray->t-toray->t) > M_PI)
			toray->t+=2*M_PI;
		else if ((toray->t-fromray->t) > M_PI)
			fromray->t+=2*M_PI;
		tweenray->t=(fromray->t*factor+toray->t*(1.0-factor));
		tweenray->r=(fromray->r*factor+toray->r*(1.0-factor));
	}
	tweenskel[which]->headradius=fromskel[which]->headradius*factor+toskel[which]->headradius*(1.0-factor);
	tweenskel[which]->waistx=fromskel[which]->waistx*factor+toskel[which]->waistx*(1.0-factor);
	tweenskel[which]->waisty=fromskel[which]->waisty*factor+toskel[which]->waisty*(1.0-factor);

	tweenskel[which]->waistx=OFFSET+(which*OFFSET);

	DrawSkel(tweenskel[which], unset_gc, buffer[!curbuf]);
}

// Assembly:
movl %edi, %eax
movslq %edi, %rdi
leaq 0x3a5e(%rip), %rcx      # 0x55d0
movq (%rcx,%rdi,8), %rcx
leaq 0x3a73(%rip), %rdx      # 0x55f0
movq (%rdx,%rdi,8), %rdx
leaq 0x3a08(%rip), %r8       # 0x5590
movq (%r8,%rdi,8), %rdi
movsd 0x14bc(%rip), %xmm1     # 0x3050
subsd %xmm0, %xmm1
movl $0x10, %r8d
movsd 0x14b2(%rip), %xmm2     # 0x3058
movsd 0x14b2(%rip), %xmm3     # 0x3060
movsd 0x8(%rcx,%r8), %xmm4
movsd 0x8(%rdx,%r8), %xmm5
movapd %xmm4, %xmm6
subsd %xmm5, %xmm6
ucomisd %xmm2, %xmm6
jbe 0x1bde
addsd %xmm3, %xmm5
movsd %xmm5, 0x8(%rdx,%r8)
movsd 0x8(%rcx,%r8), %xmm4
jmp 0x1bfe
movapd %xmm5, %xmm6
subsd %xmm4, %xmm6
ucomisd %xmm2, %xmm6
jbe 0x1bfe
addsd %xmm3, %xmm4
movsd %xmm4, 0x8(%rcx,%r8)
movsd 0x8(%rdx,%r8), %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm4
addsd %xmm5, %xmm4
movsd %xmm4, 0x8(%rdi,%r8)
xorps %xmm4, %xmm4
cvtsi2sdl (%rcx,%r8), %xmm4
xorps %xmm5, %xmm5
cvtsi2sdl (%rdx,%r8), %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm4
addsd %xmm5, %xmm4
cvttsd2si %xmm4, %r9d
movl %r9d, (%rdi,%r8)
addq $0x20, %r8
cmpq $0x170, %r8             # imm = 0x170
jne 0x1bae
xorps %xmm2, %xmm2
cvtsi2sdl (%rcx), %xmm2
xorps %xmm3, %xmm3
cvtsi2sdl (%rdx), %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %r8d
movl %r8d, (%rdi)
xorps %xmm2, %xmm2
cvtsi2sdl 0x8(%rcx), %xmm2
xorps %xmm3, %xmm3
cvtsi2sdl 0x8(%rdx), %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %ecx
movl %ecx, 0x8(%rdi)
imull $0x64, %eax, %eax
addl $0x64, %eax
movl %eax, 0x4(%rdi)
movq 0x3912(%rip), %rax      # 0x55b0
xorl %ecx, %ecx
testl %esi, %esi
sete %cl
leaq 0x39f4(%rip), %rdx      # 0x56a0
movq (%rdx,%rcx,8), %rdx
movq %rax, %rsi
jmp 0x1ee4
// File: /workspace/github_c_makefile_star2_O3/veltzer[P]xmeltdown/src/dance.c
// Function: HandleKeyPress
void HandleKeyPress(XKeyEvent* pevent)
{
	char charback;
	/* int	i; */

	XLookupString(pevent, &charback, 1, NULL, NULL);
	if (charback == 'q')
		exit(0);
	if (charback == '+') {
		steps++;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback == '-') {
		steps--;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback >= '1' && charback <= '9') {
		steps=(int) (charback-'1')+1;
		printf ("Dancing at speed %d\n", steps);
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xf(%rsp), %rbx
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1070
movzbl (%rbx), %eax
cmpl $0x2b, %eax
je 0x1d64
cmpl $0x71, %eax
jne 0x1d84
xorl %edi, %edi
callq 0x1090
movl 0x33c6(%rip), %esi      # 0x5130
incl %esi
movl %esi, 0x33be(%rip)      # 0x5130
leaq 0x131d(%rip), %rdi      # 0x3096
xorl %eax, %eax
callq 0x1030
movb 0xf(%rsp), %al
cmpb $0x2d, %al
jne 0x1da8
movl 0x33a2(%rip), %esi      # 0x5130
decl %esi
movl %esi, 0x339a(%rip)      # 0x5130
leaq 0x12f9(%rip), %rdi      # 0x3096
xorl %eax, %eax
callq 0x1030
movb 0xf(%rsp), %al
leal -0x31(%rax), %ecx
cmpb $0x8, %cl
ja 0x1dca
movzbl %al, %esi
addl $-0x30, %esi
movl %esi, 0x3374(%rip)      # 0x5130
leaq 0x12d3(%rip), %rdi      # 0x3096
xorl %eax, %eax
callq 0x1030
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/veltzer[P]xmeltdown/src/dance.c
// Function: RandomMove
void RandomMove()
{
	int i;
	int randnum;
	static int lastnum=999;
	do {
		randnum=rand()%numread;
	} while (randnum == lastnum);
	lastnum=randnum;
	for (i=0; i < PLAYERS; i++) {
		fromskel[i]=tweenskel[0];
		toskel[i]=skellist[randnum];
	}
}

// Assembly:
pushq %rax
callq 0x11b0
cltd
idivl 0x382b(%rip)            # 0x5608
cmpl 0x332d(%rip), %edx      # 0x5110
je 0x1dd1
movl %edx, 0x3325(%rip)      # 0x5110
movq 0x379e(%rip), %rax      # 0x5590
movq 0x37cf(%rip), %rcx      # 0x55c8
movslq %edx, %rdx
xorl %esi, %esi
leaq 0x37cb(%rip), %rdi      # 0x55d0
leaq 0x37e4(%rip), %r8       # 0x55f0
movq %rax, (%rsi,%rdi)
movq (%rcx,%rdx,8), %r9
movq %r9, (%rsi,%r8)
addq $0x8, %rsi
cmpq $0x18, %rsi
jne 0x1e0c
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/begriffs[P]pthread-test/backoff.c
// Function: lock_forward
void *lock_forward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 0; i < 3; i++)
		{
			if (i == 0 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (--i >= 0)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("F: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[2]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[0]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2ec2(%rip), %rbx      # 0x4090
leaq 0x2f0b(%rip), %r15      # 0x40e0
leaq 0x2edc(%rip), %r12      # 0x40b8
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %ebp, %ebp
movslq %r14d, %rax
testl %r14d, %r14d
je 0x1237
cmpb $0x0, 0x2e7d(%rip)      # 0x4070
je 0x1237
leaq (%rax,%rax,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x1256
incl %ebp
leal -0x1(%r14), %eax
testl %r14d, %r14d
jle 0x1253
movl %eax, %eax
shlq $0x3, %rax
leaq (%rax,%rax,4), %r14
leaq (%rbx,%r14), %rdi
callq 0x1060
addq $-0x28, %r14
cmpq $-0x28, %r14
jne 0x121c
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x1256
leaq (%rax,%rax,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x10b0
leal 0x1(%r14), %eax
cmpl $0x2, %r14d
movl %eax, %r14d
jl 0x11e4
jmp 0x1279
movl %eax, %r14d
movl 0x2eac(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x126d
cmpl $0x1, %eax
jne 0x1244
callq 0x1050
jmp 0x1244
movl $0x1, %edi
callq 0x10a0
jmp 0x1244
leaq 0xd84(%rip), %rdi       # 0x2004
movl %ebp, %esi
xorl %eax, %eax
callq 0x1030
movq %r15, %rdi
callq 0x1060
movq %r12, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1060
callq 0x1050
incl %r13d
cmpl $0xa, %r13d
jne 0x11df
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/begriffs[P]pthread-test/backoff.c
// Function: lock_backward
void *lock_backward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 2; i >= 0 ; i--)
		{
			if (i == 2 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (++i < 3)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("B: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[0]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[2]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2dba(%rip), %rbx      # 0x4090
xorl %r14d, %r14d
movl $0x2, %r13d
xorl %ebp, %ebp
movl %r13d, %r12d
cmpl $0x2, %r13d
je 0x133c
cmpb $0x0, 0x2d7f(%rip)      # 0x4070
je 0x133c
leaq (%r12,%r12,4), %r15
leaq (%rbx,%r15,8), %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x1354
incl %ebp
cmpl $0x1, %r13d
ja 0x1351
leaq (%rbx,%r15,8), %r13
addq $0x28, %r13
addq $0x2, %r12
movq %r12, %r15
movq %r13, %rdi
callq 0x1060
addq $0x28, %r13
incq %r15
cmpl $0x3, %r12d
movq %r15, %r12
jne 0x131c
movl $0x3, %r13d
jmp 0x1354
leaq (%r12,%r12,4), %rax
leaq (%rbx,%rax,8), %rdi
callq 0x10b0
subl $0x1, %r13d
jae 0x12e1
jmp 0x1377
incl %r13d
movl 0x2dae(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x136b
cmpl $0x1, %eax
jne 0x1349
callq 0x1050
jmp 0x1349
movl $0x1, %edi
callq 0x10a0
jmp 0x1349
leaq 0xc8d(%rip), %rdi       # 0x200b
movl %ebp, %esi
xorl %eax, %eax
callq 0x1030
movq %rbx, %rdi
callq 0x1060
leaq 0x2d22(%rip), %rdi      # 0x40b8
callq 0x1060
leaq 0x2d3e(%rip), %rdi      # 0x40e0
callq 0x1060
callq 0x1050
incl %r14d
cmpl $0xa, %r14d
jne 0x12d9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/begriffs[P]pthread-test/backoff.c
// Function: main
int main(int argc, const char **argv)
{
	pthread_t forward, backward;

	if (argc > 1)
		backoff = atoi(argv[1]);
	if (argc > 2)
		yf = atoi(argv[2]);

	pthread_create(&forward, NULL, lock_forward, NULL);
	pthread_create(&backward, NULL, lock_backward, NULL);

	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, %edi
jl 0x1400
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %rdi
callq 0x1090
testl %eax, %eax
setne 0x2c84(%rip)            # 0x4070
cmpl $0x2, %ebp
je 0x1400
movq 0x10(%rbx), %rdi
callq 0x1090
movl %eax, 0x2d08(%rip)      # 0x4108
leaq -0x24b(%rip), %rdx      # 0x11bc
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
leaq -0x158(%rip), %rdx      # 0x12c4
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
xorl %edi, %edi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/martin-decky[P]ichiglyph/interpreter/brainfuck/brainfuck.c
// Function: opcode_decode
static instruction_t opcode_decode(uint8_t opcode)
{
	switch (opcode) {
	case '>':
		return INST_DP_INC;
	case '<':
		return INST_DP_DEC;
	case '+':
		return INST_VAL_INC;
	case '-':
		return INST_VAL_DEC;
	case '.':
		return INST_VAL_OUTPUT;
	case ',':
		return INST_VAL_ACCEPT;
	case '[':
		return INST_JMP_FORWARD;
	case ']':
		return INST_JMP_BACK;
	default:
		return INST_NOP;
	}
}

// Assembly:
cmpl $0x3b, %edi
jg 0x167f
addl $-0x2b, %edi
cmpl $0x3, %edi
ja 0x16bf
leaq 0x9b4(%rip), %rax       # 0x2024
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x2, %eax
retq
cmpl $0x5a, %edi
jg 0x1691
cmpl $0x3c, %edi
je 0x16a1
xorl %eax, %eax
cmpl $0x3e, %edi
jne 0x16bf
retq
cmpl $0x5b, %edi
je 0x16a7
cmpl $0x5d, %edi
jne 0x16bf
movl $0x7, %eax
retq
movl $0x1, %eax
retq
movl $0x6, %eax
retq
movl $0x3, %eax
retq
movl $0x4, %eax
retq
movl $0x5, %eax
retq
movl $0x8, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/vi[P]simple_cbor_stream_parse/simple_example.c
// Function: main
int main() {
    
    struct scsp_callbacks cb;
    memset(&cb, 0, sizeof(cb));
    
    cb.array_opened = &array_opened;
    cb.array_closed = &array_closed;
    cb.integer = &integer;
    cb.string_chunk = &string_chunk;
    
    const char *cbor_data = 
        "\x9F"                        // [
            "\x1A" "\x00\x12\xD6\x87" //     1234567,
            "\x63" "ABC"              //     "ABC",
            "\x84"                    //     [
                "\x05"                //         5,
                "\x05"                //         5,
                "\x29"                //         -10,
                "\x29"                //         -10,
                                      //     ]
        "\xFF"                        // ]
    ;
    size_t cbor_data_len = 2+5+4+1+4;
    
    assert(scsp_parse_from_memory(cbor_data, cbor_data_len, &cb, (void*)0x5645) == 0);
    
    return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
leaq 0x8(%rsp), %rbx
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1060
leaq -0x113(%rip), %rax      # 0x119c
movq %rax, 0x30(%rbx)
leaq -0xef(%rip), %rax       # 0x11cb
movq %rax, 0x40(%rbx)
leaq -0xce(%rip), %rax       # 0x11f7
movq %rax, -0x8(%rbx)
leaq -0xa1(%rip), %rax       # 0x122f
movq %rax, 0x20(%rbx)
leaq 0xebb(%rip), %rdi       # 0x2196
movq %rsp, %rdx
movl $0x10, %esi
movl $0x5645, %ecx           # imm = 0x5645
callq 0x1ef3
testq %rax, %rax
jne 0x12fd
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
leaq 0xe3d(%rip), %rdi       # 0x2141
leaq 0xd13(%rip), %rsi       # 0x201e
leaq 0xe79(%rip), %rcx       # 0x218b
movl $0x33, %edx
callq 0x1050
// File: /workspace/github_c_makefile_star2_O3/seojangho[P]clee/sandbox.c
// Function: onSeccomp
void onSeccomp() {
    printf("[Detected] %s(%d)\n", clee_syscall_name(), clee_syscall_num());
    if (option_enforcing) {
        printf("No mercy!...\n");
        clee_behave(terminate, 0);
    } else {
        getchar();
    }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
callq 0x39ec
movq %rax, %rbx
xorl %eax, %eax
callq 0x39dc
leaq 0x198d(%rip), %rdi      # 0x717b
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3090
cmpb $0x1, 0x5aee(%rip)      # 0xb2f0
jne 0x581a
leaq 0x19af(%rip), %rdi      # 0x71ba
callq 0x3060
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x3ba9
popq %rbx
jmp 0x3120
// File: /workspace/github_c_makefile_star2_O3/seojangho[P]clee/sandbox.c
// Function: showpolicy
void showpolicy() {
    printf("List of forbidden system calls:\n");
    int i;
    for (i = 0;; i++)
    {
        if (forbidden[i] == -1) {
            break;
        }
        printf("%s(%d)\n", clee_syscall_num2name(forbidden[i]), forbidden[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x18e2(%rip), %rdi      # 0x72ac
callq 0x3060
leaq 0x142a(%rip), %r14      # 0x6e00
leaq 0x17a9(%rip), %rbx      # 0x7186
xorl %r15d, %r15d
movl (%r15,%r14), %ebp
movl %ebp, %edi
callq 0x3cd4
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3090
addq $0x4, %r15
cmpq $0x344, %r15            # imm = 0x344
jne 0x59e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_signal
static int on_signal(struct io_req *req, int err)
{
	int rc;
	struct signalfd_siginfo *siginfo;
	struct loop_ctx *ctx = req->data;

	if (err < 0)
		return err;
	assert(err == sizeof(struct signalfd_siginfo));
	siginfo = req->buf.iov[0].iov_base;
	if (siginfo->ssi_signo == SIGINT) {
		/* Graceful exit */
		ctx->shutdown = true;
		return err;
	}

	/* Repeat signal REQ_RD request */
	req->buf.pos.iov_off = 0;
	req->buf.pos.iov_ind = 0;
	rc = io_queue_submit(req);
	assert(rc == 0);

	actions[action_ind++](ctx);
	action_ind %= ARRAY_SIZE(actions);

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x16de
cmpl $0x80, %ebx
jne 0x16e8
movq 0x18(%rdi), %r14
movq 0x28(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x1689
movb $0x1, 0x2f0(%r14)
jmp 0x16de
xorps %xmm0, %xmm0
movups %xmm0, 0x128(%rdi)
callq 0x3db2
testl %eax, %eax
jne 0x1707
movslq 0x6aed(%rip), %rax      # 0x8190
leal 0x1(%rax), %ecx
movl %ecx, 0x6ae4(%rip)      # 0x8190
leaq 0x642d(%rip), %rcx      # 0x7ae0
movq %r14, %rdi
callq *(%rcx,%rax,8)
movslq 0x6ad0(%rip), %rcx      # 0x8190
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
movq %rcx, %rax
mulq %rdx
shrq %rdx
leal (%rdx,%rdx,2), %eax
subl %eax, %ecx
movl %ecx, 0x6ab2(%rip)      # 0x8190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x397b(%rip), %rdi      # 0x506a
leaq 0x3917(%rip), %rsi      # 0x500d
leaq 0x3994(%rip), %rcx      # 0x5091
movl $0x181, %edx            # imm = 0x181
callq 0x10a0
leaq 0x39a7(%rip), %rdi      # 0x50b5
leaq 0x38f8(%rip), %rsi      # 0x500d
leaq 0x3975(%rip), %rcx      # 0x5091
movl $0x18d, %edx            # imm = 0x18D
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: do_vari_len_req1
static void do_vari_len_req1(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *m_s_req1, *s_m_req1;

	/* Write master->slave, part1 */
	m_s_req1 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_1__master_to_slave);
	assert(m_s_req1);
	m_s_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "<msg>",
			.iov_len  = strlen("<msg>")
		},
		.iov[1] = {
			.iov_base = "1 vari length 1",
			.iov_len  = strlen("1 vari length 1")
		},
		.iov_num  = 2,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req1);
	assert(rc == 0);

	/* Read slave<-master, part1 */
	s_m_req1 = io_req_create(&ctx->slave, REQ_RD, ctx,
				 on_read_vari_len_req1_1__slave_from_master);
	s_m_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req1);
	assert(rc == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x2bf(%rip), %rcx       # 0x1c4f
movl $0x1, %esi
movq %rdi, %rdx
callq 0x4097
testq %rax, %rax
je 0x1a85
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x6127(%rip), %rsi      # 0x7af8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x2, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x3db2
testl %eax, %eax
jne 0x1aa4
leaq 0x178(%rbx), %rdi
leaq 0x346(%rip), %rcx       # 0x1d70
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4097
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x3db2
testl %eax, %eax
jne 0x1ac3
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3631(%rip), %rdi      # 0x50bd
leaq 0x357a(%rip), %rsi      # 0x500d
leaq 0x3748(%rip), %rcx      # 0x51e2
movl $0x11f, %edx            # imm = 0x11F
callq 0x10a0
leaq 0x360a(%rip), %rdi      # 0x50b5
leaq 0x355b(%rip), %rsi      # 0x500d
leaq 0x3729(%rip), %rcx      # 0x51e2
movl $0x12d, %edx            # imm = 0x12D
callq 0x10a0
leaq 0x35eb(%rip), %rdi      # 0x50b5
leaq 0x353c(%rip), %rsi      # 0x500d
leaq 0x370a(%rip), %rcx      # 0x51e2
movl $0x13b, %edx            # imm = 0x13B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: do_vari_len_req2
static void do_vari_len_req2(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *s_m_req;

	/*
	 * Here we test, that on the previous action
	 * something was stashed and here we submit
	 * new read request out of the IO loop, i.e.
	 * prewait actions should be called.
	 */

	/* Read slave<-master, reuse callback from do_vari_len_req1 */
	s_m_req = io_req_create(&ctx->slave, REQ_RD, ctx,
				on_read_vari_len_req2__slave_from_master);
	s_m_req->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req);
	assert(rc == 0);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
addq $0x178, %rdi            # imm = 0x178
leaq 0x5dc(%rip), %rcx       # 0x20d0
xorl %esi, %esi
callq 0x4097
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x3db2
testl %eax, %eax
jne 0x1b3f
popq %rbx
retq
leaq 0x356f(%rip), %rdi      # 0x50b5
leaq 0x34c0(%rip), %rsi      # 0x500d
leaq 0x38c7(%rip), %rcx      # 0x541b
movl $0x170, %edx            # imm = 0x170
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_read_fixed_len_req__slave_from_master
static int on_read_fixed_len_req__slave_from_master(struct io_req *req, int err)
{
	int len = buf_len(&req->buf);
	char msg[len];
	int nb;

	assert(strlen("fixed msg") == err);
	nb = buf_memcpy_to(&req->buf, 0, msg, len);
	assert(nb == len);

	printf("  FIXED LEN MSG: len=%d, msg='%.*s'\n", len, len, msg);
	io_req_put(req);

	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x28(%rdi), %r12
movq %r12, %rdi
callq 0x2ee8
movl %eax, %r14d
movl %eax, %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
cmpl $0x9, %r13d
jne 0x1c11
movslq %r14d, %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2f2f
cmpl %r14d, %eax
jne 0x1c30
leaq 0x35d8(%rip), %rdi      # 0x51bd
movl %r14d, %esi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x412a
movl $0x9, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x353d(%rip), %rdi      # 0x5155
leaq 0x33ee(%rip), %rsi      # 0x500d
leaq 0x354a(%rip), %rcx      # 0x5170
movl $0x4b, %edx
callq 0x10a0
leaq 0x357c(%rip), %rdi      # 0x51b3
leaq 0x33cf(%rip), %rsi      # 0x500d
leaq 0x352b(%rip), %rcx      # 0x5170
movl $0x4d, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_write_vari_len_req1_1__master_to_slave
static int on_write_vari_len_req1_1__master_to_slave(struct io_req *req, int len)
{
	int rc;
	struct io_req *m_s_req2;
	struct loop_ctx *ctx = req->data;

	assert(len > 0);
	io_req_put(req);

	/* Write master->slave, part2 */
	m_s_req2 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_2__master_to_slave);
	assert(m_s_req2);
	m_s_req2->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "</msg>",
			.iov_len  = strlen("</msg>")
		},
		.iov[1] = {
			.iov_base = "<msg>",
			.iov_len  = strlen("<msg>")
		},
		.iov_num  = 2,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req2);
	assert(rc == 0);

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
testl %esi, %esi
jle 0x1d13
movl %esi, %ebx
movq 0x18(%rdi), %r14
callq 0x412a
leaq 0x245(%rip), %rcx       # 0x1ebc
movq %r14, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x4097
testq %rax, %rax
je 0x1d32
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x5f3d(%rip), %rsi      # 0x7bf8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x2, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x3db2
testl %eax, %eax
jne 0x1d51
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x33f1(%rip), %rdi      # 0x510b
leaq 0x32ec(%rip), %rsi      # 0x500d
leaq 0x34f9(%rip), %rcx      # 0x5221
movl $0xc2, %edx
callq 0x10a0
leaq 0x33bd(%rip), %rdi      # 0x50f6
leaq 0x32cd(%rip), %rsi      # 0x500d
leaq 0x34da(%rip), %rcx      # 0x5221
movl $0xc8, %edx
callq 0x10a0
leaq 0x335d(%rip), %rdi      # 0x50b5
leaq 0x32ae(%rip), %rsi      # 0x500d
leaq 0x34bb(%rip), %rcx      # 0x5221
movl $0xd6, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_read_vari_len_req1_1__slave_from_master
static int on_read_vari_len_req1_1__slave_from_master(struct io_req *req, int len)
{
	int nb, rc, stashed;
	char msg[len], *str;
	struct io_req *s_m_req;
	struct loop_ctx *ctx = req->data;

	nb = buf_memcpy_to(&req->buf, 0, msg, len);
	assert(nb == len);

	str = memmem(msg, nb, "</msg>", 6);
	if (str == NULL)
		return 0;

	nb = str - msg + strlen("</msg>");
	stashed = len - nb;
	len = nb;
	printf(" VARI LEN MSG 1: stashed=%2d, len=%2d, msg='%.*s'\n",
	       stashed, len, len, msg);
	io_req_put(req);

	/* Read slave<-master, part2 */
	s_m_req = io_req_create(&ctx->slave, REQ_RD, ctx,
				on_read_vari_len_req1_2__slave_from_master);
	s_m_req->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req);
	assert(rc == 0);

	return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, %eax
movq %rsp, %r13
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq 0x18(%rdi), %rax
movq %rax, -0x30(%rbp)
addq $0x28, %rdi
movslq %esi, %r12
xorl %r14d, %r14d
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2f2f
cmpl %r12d, %eax
jne 0x1e7e
leaq 0x3518(%rip), %rdx      # 0x52de
movl $0x6, %ecx
movq %r13, %rdi
movq %r12, %rsi
callq 0x1120
testq %rax, %rax
je 0x1e6c
movq %rax, %r12
subl %r13d, %r12d
addl $0x6, %r12d
subl %r12d, %r15d
leaq 0x357b(%rip), %rdi      # 0x536e
movl %r15d, %esi
movl %r12d, %edx
movl %r12d, %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x412a
movq -0x30(%rbp), %rdx
leaq 0x178(%rdx), %rdi
leaq 0x1ec(%rip), %rcx       # 0x200c
xorl %esi, %esi
callq 0x4097
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x3db2
movl %r12d, %r14d
testl %eax, %eax
jne 0x1e9d
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x332e(%rip), %rdi      # 0x51b3
leaq 0x3181(%rip), %rsi      # 0x500d
leaq 0x3496(%rip), %rcx      # 0x5329
movl $0xf9, %edx
callq 0x10a0
leaq 0x3211(%rip), %rdi      # 0x50b5
leaq 0x3162(%rip), %rsi      # 0x500d
leaq 0x3477(%rip), %rcx      # 0x5329
movl $0x112, %edx            # imm = 0x112
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_write_vari_len_req1_2__master_to_slave
static int on_write_vari_len_req1_2__master_to_slave(struct io_req *req, int len)
{
	int rc;
	struct io_req *m_s_req3;
	struct loop_ctx *ctx = req->data;

	assert(len > 0);
	io_req_put(req);

	/* Write master->slave, part3 */
	m_s_req3 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_3__master_to_slave);
	assert(m_s_req3);
	m_s_req3->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "2 vari",
			.iov_len  = strlen("2 vari")
		},
		.iov[1] = {
			.iov_base = " length 2",
			.iov_len  = strlen(" length 2")
		},
		.iov[2] = {
			.iov_base = "</msg>",
			.iov_len  = strlen("</msg>")
		},
		/* Data for next action */
		.iov[3] = {
			.iov_base = "GARBAGE<msg>3 vari length 3</msg>",
			.iov_len  = strlen("GARBAGE<msg>3 vari length 3</msg>"),
		},
		.iov_num  = 4,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req3);
	assert(rc == 0);

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
testl %esi, %esi
jle 0x1f80
movl %esi, %ebx
movq 0x18(%rdi), %r14
callq 0x412a
leaq 0xf9(%rip), %rcx        # 0x1fdd
movq %r14, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x4097
testq %rax, %rax
je 0x1f9f
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x5dd0(%rip), %rsi      # 0x7cf8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x4, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x3db2
testl %eax, %eax
jne 0x1fbe
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3184(%rip), %rdi      # 0x510b
leaq 0x307f(%rip), %rsi      # 0x500d
leaq 0x32d0(%rip), %rcx      # 0x5265
movl $0x9a, %edx
callq 0x10a0
leaq 0x3303(%rip), %rdi      # 0x52a9
leaq 0x3060(%rip), %rsi      # 0x500d
leaq 0x32b1(%rip), %rcx      # 0x5265
movl $0xa0, %edx
callq 0x10a0
leaq 0x30f0(%rip), %rdi      # 0x50b5
leaq 0x3041(%rip), %rsi      # 0x500d
leaq 0x3292(%rip), %rcx      # 0x5265
movl $0xb7, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_read_vari_len_req1_2__slave_from_master
static int on_read_vari_len_req1_2__slave_from_master(struct io_req *req, int len)
{
	int nb, stashed;
	char msg[len + 1], *str;

	nb = buf_memcpy_to(&req->buf, 0, msg, len);
	assert(nb == len);

	str = memmem(msg, nb, "</msg>", 6);
	if (str == NULL)
		return 0;

	nb = str - msg + strlen("</msg>");
	stashed = len - nb;
	len = nb;
	printf("   VARI LEN MSG 2: stashed=%2d, len=%2d, msg='%.*s'\n",
	       stashed, len, len, msg);
	io_req_put(req);

	return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leal 0x1(%r14), %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
addq $0x28, %rdi
movslq %esi, %r13
xorl %r12d, %r12d
xorl %esi, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x2f2f
cmpl %r13d, %eax
jne 0x20b1
leaq 0x3286(%rip), %rdx      # 0x52de
movl $0x6, %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1120
testq %rax, %rax
je 0x209f
movq %rax, %r13
subl %r15d, %r13d
addl $0x6, %r13d
subl %r13d, %r14d
leaq 0x3365(%rip), %rdi      # 0x53e6
movl %r14d, %esi
movl %r13d, %edx
movl %r13d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x412a
movl %r13d, %r12d
movl %r12d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30fb(%rip), %rdi      # 0x51b3
leaq 0x2f4e(%rip), %rsi      # 0x500d
leaq 0x32db(%rip), %rcx      # 0x53a1
movl $0xe1, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/rouming[P]io/io-test.c
// Function: on_read_vari_len_req2__slave_from_master
static int on_read_vari_len_req2__slave_from_master(struct io_req *req, int len)
{
	int nb, stashed;
	char msg[len + 1], *beg, *end;

	nb = buf_memcpy_to(&req->buf, 0, msg, len);
	assert(nb == len);

	beg = memmem(msg, nb, "<msg>", 5);
	if (beg == NULL)
		return 0;

	end = memmem(msg, nb, "</msg>", 6);
	if (end == NULL)
		return 0;

	nb = end - msg + strlen("</msg>");
	stashed = len - nb;
	nb = end - beg + strlen("</msg>");
	printf(" VARI LEN MSG 3: stashed=%2d, len=%2d, msg='%.*s'\n",
	       stashed, nb, nb, beg);
	io_req_put(req);

	return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
leal 0x1(%rbx), %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %rdi, -0x30(%rbp)
addq $0x28, %rdi
movslq %esi, %r14
xorl %r12d, %r12d
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2f2f
cmpl %r14d, %eax
jne 0x2192
leaq 0x30f0(%rip), %rdx      # 0x520b
movl $0x5, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1120
testq %rax, %rax
je 0x2180
movq %rax, %r13
leaq 0x31a4(%rip), %rdx      # 0x52de
movl $0x6, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1120
testq %rax, %rax
je 0x2180
subl %eax, %r15d
leal (%rbx,%r15), %esi
addl $-0x6, %esi
subl %r13d, %eax
addl $0x6, %eax
leaq 0x3321(%rip), %rdi      # 0x5487
movl %eax, %edx
movl %eax, %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x1090
movq -0x30(%rbp), %rdi
callq 0x412a
movl %ebx, %r12d
movl %r12d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x301a(%rip), %rdi      # 0x51b3
leaq 0x2e6d(%rip), %rsi      # 0x500d
leaq 0x329d(%rip), %rcx      # 0x5444
movl $0x144, %edx            # imm = 0x144
callq 0x10a0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_output_tree
void
NJ_output_tree(NJ_ARGS *nj_args,
	       NJ_TREE *tree,
	       DMAT *dmat,
	       long int count) {

  FILE *fp;

  if(nj_args->stdout_flag) {
    fp = stdout;
  } else {

    if(count == 0) {
      fp = fopen(nj_args->outfilename, "w");  /* open for writing   */
    } else {
      fp = fopen(nj_args->outfilename, "a");  /* open for appending */
    }

    if(!fp) {
      fprintf(stderr, "Clearcut: Failed to open outfile %s\n", nj_args->outfilename);
      exit(-1);
    }
  }

  NJ_output_tree2(fp, nj_args, tree, tree, dmat);
  fprintf(fp, " ;\n");
  
  if(!nj_args->stdout_flag) {
    fclose(fp);
  }

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x2c(%rdi)
je 0x3d81
movq 0x9254(%rip), %rax      # 0xcfd0
movq (%rax), %r12
jmp 0x3da7
testq %rcx, %rcx
movq 0x8(%rbx), %rdi
leaq 0x44be(%rip), %rax      # 0x824d
leaq 0x4eae(%rip), %rsi      # 0x8c44
cmoveq %rax, %rsi
callq 0x2200
movq %rax, %r12
testq %rax, %rax
je 0x3df9
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x47f3
leaq 0x44b2(%rip), %rdi      # 0x8274
movl $0x3, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x2240
cmpl $0x0, 0x2c(%rbx)
je 0x3de6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20d0
movq %rbx, %rdi
callq 0x230b
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_free_dmat
void
NJ_free_dmat(DMAT *dmat) {
  
  long int i;
  
  if(dmat) {
    
    if(dmat->taxaname) {

      for(i=0;i<dmat->ntaxa;i++) {
	if(dmat->taxaname[i]) {
	  free(dmat->taxaname[i]);
	}
      }

      free(dmat->taxaname);
    }

    if(dmat->valhandle) {
      free(dmat->valhandle);
    }

    if(dmat->rhandle) {
      free(dmat->rhandle);
    }

    if(dmat->r2handle) {
      free(dmat->r2handle);
    }

    free(dmat);
  }
  
  return;
}

// Assembly:
testq %rdi, %rdi
je 0x3eae
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x3e75
movq (%rbx), %rax
testq %rax, %rax
jle 0x3e70
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x3e64
callq 0x2040
movq (%rbx), %rax
incq %r14
cmpq %rax, %r14
jl 0x3e4f
movq 0x10(%rbx), %rdi
callq 0x2040
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3e83
callq 0x2040
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3e91
callq 0x2040
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x3e9f
callq 0x2040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_init_r
void
NJ_init_r(DMAT *dmat) {

  long int i, j, size;
  long int index;
  float *r, *r2, *val;
  long int size1;
  float size2;
  
  r     = dmat->r;
  r2    = dmat->r2;
  val   = dmat->val;
  size  = dmat->size;
  size1 = size-1;
  size2 = (float)(size-2);

  index = 0;
  for(i=0;i<size1;i++) {
    index++;
    for(j=i+1;j<size;j++) {
      r[i] += val[index];
      r[j] += val[index];
      index++;
    }

    r2[i] = r[i]/size2;
  }
  
  return;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpq $0x2, %rax
jl 0x3f25
movq 0x28(%rdi), %rcx
leaq -0x2(%rax), %rdx
cvtsi2ss %rdx, %xmm0
movq 0x30(%rdi), %rsi
movq 0x18(%rdi), %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
leaq 0x1(%r8), %r10
incq %r9
movq %r10, %r11
movss (%rdi,%r9,4), %xmm1
addss (%rcx,%r8,4), %xmm1
movss %xmm1, (%rcx,%r8,4)
movss (%rdi,%r9,4), %xmm1
addss (%rcx,%r11,4), %xmm1
movss %xmm1, (%rcx,%r11,4)
incq %r11
incq %r9
cmpq %rax, %r11
jl 0x3ede
movss (%rcx,%r8,4), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%rsi,%r8,4)
cmpq %rdx, %r8
movq %r10, %r8
jne 0x3ed4
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_init_vertex
NJ_VERTEX *
NJ_init_vertex(DMAT *dmat) {
  
  long int i;
  NJ_VERTEX *vertex;
  
  /* allocate the vertex here */
  vertex = (NJ_VERTEX *)calloc(1, sizeof(NJ_VERTEX));
  
  /* allocate the nodes in the vertex */
  vertex->nodes        = (NJ_TREE **)calloc(dmat->ntaxa, sizeof(NJ_TREE *));
  vertex->nodes_handle = vertex->nodes;
  
  /* initialize our size and active variables */
  vertex->nactive = dmat->ntaxa;
  vertex->size    = dmat->ntaxa;
  
  /* initialize the nodes themselves */
  for(i=0;i<dmat->ntaxa;i++) {
    
    vertex->nodes[i] = (NJ_TREE *)calloc(1, sizeof(NJ_TREE));

    vertex->nodes[i]->left  = NULL;
    vertex->nodes[i]->right = NULL;
    
    vertex->nodes[i]->taxa_index = i;
  }

  return(vertex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x2160
movq %rax, %rbx
movq (%r14), %r14
movl $0x8, %esi
movq %r14, %rdi
callq 0x2160
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %r14, 0x18(%rbx)
testq %r14, %r14
jle 0x3f8c
movq %rax, %r15
xorl %r12d, %r12d
movl $0x1, %edi
movl $0x20, %esi
callq 0x2160
movq %rax, (%r15,%r12,8)
movq %r12, 0x18(%rax)
incq %r12
cmpq %r12, %r14
jne 0x3f6d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_min_transform
float
NJ_min_transform(DMAT *dmat,
		 long int *ret_i,
		 long int *ret_j) {

  long int i, j;   /* indices used for looping        */
  long int tmp_i = 0;/* to limit pointer dereferencing  */
  long int tmp_j = 0;/* to limit pointer dereferencing  */
  float smallest;  /* track the smallest trans. dist  */
  float curval;    /* the current trans. dist in loop */

  float *ptr;      /* pointer into distance matrix    */
  float *r2;       /* pointer to r2 matrix for computing transformed dists */
  
  smallest = (float)HUGE_VAL;

  /* track these here to limit pointer dereferencing in inner loop */
  ptr = dmat->val;
  r2  = dmat->r2;

  /* for every row */
  for(i=0;i<dmat->size;i++) {
    ptr++;  /* skip diagonal */
    for(j=i+1;j<dmat->size;j++) {   /* for every column */

      /* find transformed distance in matrix at i, j */
      curval = *(ptr++) - (r2[i] + r2[j]);

      /* if the transformed distanance is less than the known minimum */
      if(curval < smallest) {

	smallest = curval;
	tmp_i = i;
	tmp_j = j;
      }
    }
  }
  
  /* pass back (by reference) the coords of the min. transformed distance */
  *ret_i = tmp_i;
  *ret_j = tmp_j;
  
  return(smallest);  /* return the min transformed distance */
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
jle 0x4014
movq 0x30(%rdi), %r8
movq 0x18(%rdi), %r9
movss 0x40bb(%rip), %xmm1     # 0x8070
xorl %r10d, %r10d
xorl %edi, %edi
xorl %ecx, %ecx
movq %r10, %r11
incq %r10
addq $0x4, %r9
cmpq %rax, %r10
jge 0x4007
movss (%r8,%r11,4), %xmm2
movq %r10, %rbx
movss (%r9), %xmm0
movss (%r8,%rbx,4), %xmm3
addss %xmm2, %xmm3
subss %xmm3, %xmm0
ucomiss %xmm0, %xmm1
cmovaq %r11, %rcx
cmovaq %rbx, %rdi
minss %xmm1, %xmm0
incq %rbx
addq $0x4, %r9
movaps %xmm0, %xmm1
cmpq %rax, %rbx
jl 0x3fd4
jmp 0x400a
movaps %xmm1, %xmm0
movaps %xmm0, %xmm1
cmpq %rax, %r10
jne 0x3fbc
jmp 0x4020
movss 0x4054(%rip), %xmm0     # 0x8070
xorl %ecx, %ecx
xorl %edi, %edi
movq %rcx, (%rsi)
movq %rdi, (%rdx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_decompose
NJ_TREE *
NJ_decompose(DMAT *dmat,
	     NJ_VERTEX *vertex,
	     long int x,
	     long int y,
	     int last_flag) {

  NJ_TREE *new_node;
  float x2clade, y2clade;

  /* compute the distance from the clade components to the new node */
  if(last_flag) {
    x2clade = 
      (dmat->val[NJ_MAP(x, y, dmat->size)]);  
  } else {
    x2clade = 
      (dmat->val[NJ_MAP(x, y, dmat->size)])/2 +   
      ((dmat->r2[x] - dmat->r2[y])/2);
  }

  vertex->nodes[x]->dist = x2clade;

  if(last_flag) {
    y2clade = 
      (dmat->val[NJ_MAP(x, y, dmat->size)]);  
  } else {
    y2clade = 
      (dmat->val[NJ_MAP(x, y, dmat->size)])/2 +  
      ((dmat->r2[y] - dmat->r2[x])/2);
  }

  vertex->nodes[y]->dist = y2clade;

  /* allocate new node to connect two sub-clades */
  new_node = (NJ_TREE *)calloc(1, sizeof(NJ_TREE));

  new_node->left  = vertex->nodes[x];
  new_node->right = vertex->nodes[y];
  new_node->taxa_index = NJ_INTERNAL_NODE;  /* this is not a terminal node, no taxa index */
  
  if(last_flag) {
    return(new_node);
  }

  vertex->nodes[x] = new_node;
  vertex->nodes[y] = vertex->nodes[0];
  
  vertex->nodes = &(vertex->nodes[1]);
  
  vertex->nactive--;

  return(new_node);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %rbx
movq 0x8(%rdi), %rax
movq %rdx, %rcx
notq %rcx
leaq (%rcx,%rax,2), %rax
imulq %rdx, %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
andq $-0x2, %rcx
addq %rcx, %rcx
addq 0x18(%rdi), %rcx
movss (%rcx,%r14,4), %xmm0
testl %r8d, %r8d
je 0x4081
movq (%rbx), %rax
leaq (%rax,%rdx,8), %r15
movq (%r15), %r12
movss %xmm0, 0x10(%r12)
jmp 0x40d2
movss 0x3ff3(%rip), %xmm1     # 0x807c
mulss %xmm1, %xmm0
movq 0x30(%rdi), %rsi
movss (%rsi,%rdx,4), %xmm2
subss (%rsi,%r14,4), %xmm2
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
movq (%rbx), %rax
leaq (%rax,%rdx,8), %r15
movq (%r15), %r12
movss %xmm2, 0x10(%r12)
movss (%rcx,%r14,4), %xmm2
mulss %xmm1, %xmm2
movss (%rsi,%r14,4), %xmm0
subss (%rsi,%rdx,4), %xmm0
mulss %xmm1, %xmm0
addss %xmm2, %xmm0
movq (%rax,%r14,8), %r13
movss %xmm0, 0x10(%r13)
movl $0x1, %edi
movl $0x20, %esi
callq 0x2160
movq %r12, (%rax)
movq %r13, 0x8(%rax)
movq $-0x1, 0x18(%rax)
testl %ebp, %ebp
jne 0x4113
movq %rax, (%r15)
movq (%rbx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rcx,%r14,8)
addq $0x8, (%rbx)
decq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_free_vertex
void
NJ_free_vertex(NJ_VERTEX *vertex) {
  
  if(vertex) {
    if(vertex->nodes_handle) {
      free(vertex->nodes_handle);
    }
    free(vertex);
  }

  return;
}

// Assembly:
testq %rdi, %rdi
je 0x463f
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4636
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_print_distance_matrix
void
NJ_print_distance_matrix(DMAT *dmat) {

  long int i, j;

  printf("ntaxa: %ld\n", dmat->ntaxa);
  printf(" size: %ld\n", dmat->size);
  
  for(i=0;i<dmat->size;i++) {

    for(j=0;j<dmat->size;j++) {
      if(j>i) {
	printf("    %0.4f", dmat->val[NJ_MAP(i, j, dmat->size)]);  
      } else {
	printf("         -");
      }
    }


    if(dmat->r && dmat->r2) {
      printf("\t\t%0.4f", dmat->r[i]);    
      printf("\t%0.4f", dmat->r2[i]);


    
      printf("\n");

      for(j=0;j<dmat->size;j++) {
	if(j>i) {
	  printf("   %0.4f", dmat->val[NJ_MAP(i, j, dmat->size)] - (dmat->r2[i] + dmat->r2[j])); 
	} else {
	  printf("          ");
	}
      }
      
      printf("\n\n");
    }
  }
  
  printf("\n");
  
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x3bb5(%rip), %rdi      # 0x820d
xorl %eax, %eax
callq 0x2100
movq 0x8(%rbx), %rsi
leaq 0x3baf(%rip), %rdi      # 0x8219
xorl %eax, %eax
callq 0x2100
movq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x47db
leaq 0x3ba0(%rip), %r14      # 0x8225
leaq 0x3ba3(%rip), %r15      # 0x822f
xorl %r13d, %r13d
testq %rax, %rax
jle 0x46e8
movq %r13, %r12
notq %r12
xorl %ebp, %ebp
cmpq %r13, %rbp
jbe 0x46d2
leaq (%r12,%rax,2), %rax
imulq %r13, %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
andq $-0x2, %rcx
addq %rcx, %rcx
addq 0x18(%rbx), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rbp,4), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x2100
jmp 0x46dc
movq %r15, %rdi
xorl %eax, %eax
callq 0x2100
incq %rbp
movq 0x8(%rbx), %rax
cmpq %rax, %rbp
jl 0x469c
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x47cf
cmpq $0x0, 0x30(%rbx)
je 0x47cf
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%r13,4), %xmm0
leaq 0x3b2a(%rip), %rdi      # 0x823a
movb $0x1, %al
callq 0x2100
movq 0x30(%rbx), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r13,4), %xmm0
leaq 0x3b10(%rip), %rdi      # 0x823b
movb $0x1, %al
callq 0x2100
movl $0xa, %edi
callq 0x2050
movq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x47bf
movq %r13, %rbp
notq %rbp
xorl %r12d, %r12d
cmpq %r13, %r12
jbe 0x47a5
leaq (,%rax,2), %rax
addq %rbp, %rax
imulq %r13, %rax
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rax, %rcx
andq $-0x2, %rcx
addq %rcx, %rcx
addq 0x18(%rbx), %rcx
movss (%rcx,%r12,4), %xmm0
movq 0x30(%rbx), %rax
movss (%rax,%r13,4), %xmm1
addss (%rax,%r12,4), %xmm1
subss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3a8a(%rip), %rdi      # 0x8226
movb $0x1, %al
callq 0x2100
jmp 0x47b3
leaq 0x3a96(%rip), %rdi      # 0x8242
xorl %eax, %eax
callq 0x2100
incq %r12
movq 0x8(%rbx), %rax
cmpq %rax, %r12
jl 0x474e
leaq 0x46c3(%rip), %rdi      # 0x8e89
callq 0x20b0
movq 0x8(%rbx), %rax
incq %r13
cmpq %rax, %r13
jl 0x468f
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/clearcut.c
// Function: NJ_output_tree2
void
NJ_output_tree2(FILE *fp,
		NJ_ARGS *nj_args,
		NJ_TREE *tree,
		NJ_TREE *root,
		DMAT *dmat) {
  
  if(!tree) {
    return;
  }
	
  if(tree->taxa_index != NJ_INTERNAL_NODE) {

    if(nj_args->expblen) {
      fprintf(fp, "%s:%e", 
	      dmat->taxaname[tree->taxa_index],
	      tree->dist);
    } else {
      fprintf(fp, "%s:%f", 
	      dmat->taxaname[tree->taxa_index],
	      tree->dist);
    }
    
  } else {
    

    if(tree->left && tree->right) {
      fprintf(fp, "(");
    }
    if(tree->left) {
      NJ_output_tree2(fp, nj_args, tree->left, root, dmat);
    }

    if(tree->left && tree->right) {
      fprintf(fp, ",");
    }
    if(tree->right) {
      NJ_output_tree2(fp, nj_args, tree->right, root, dmat);
    }

    if(tree != root->left) { 
      if(tree->left && tree->right) {
	if(tree != root) {
	  if(nj_args->expblen) {
	    fprintf(fp, "):%e", tree->dist);
	  } else {
	    fprintf(fp, "):%f", tree->dist);
	  }
	} else {
	  fprintf(fp, ")");
	}
      }
    } else {
      fprintf(fp, ")");
    }
  }

  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x48da
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdx), %rax
cmpq $-0x1, %rax
je 0x4840
cmpl $0x0, 0x60(%r15)
movq 0x10(%r13), %rcx
movq (%rcx,%rax,8), %rdx
cvtss2sd 0x10(%r14), %xmm0
je 0x48e4
leaq 0x3a3d(%rip), %rsi      # 0x8278
jmp 0x48eb
movq %rcx, %r12
movq (%r14), %rdx
testq %rdx, %rdx
je 0x4892
cmpq $0x0, 0x8(%r14)
je 0x4867
movl $0x28, %edi
movq %rbx, %rsi
callq 0x2150
movq (%r14), %rdx
testq %rdx, %rdx
je 0x4892
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0x47f3
cmpq $0x0, (%r14)
je 0x4892
cmpq $0x0, 0x8(%r14)
je 0x4892
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x2150
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x48ac
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0x47f3
cmpq %r14, (%r12)
je 0x48fe
cmpq $0x0, (%r14)
je 0x48da
cmpq $0x0, 0x8(%r14)
je 0x48da
cmpq %r12, %r14
je 0x48fe
cmpl $0x0, 0x60(%r15)
cvtss2sd 0x10(%r14), %xmm0
je 0x4914
leaq 0x39ac(%rip), %rsi      # 0x8284
jmp 0x491b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3993(%rip), %rsi      # 0x827e
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2180
movl $0x29, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2150
leaq 0x396e(%rip), %rsi      # 0x8289
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2180