LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kivaloo.c
// Function: kivaloo_open
void *
kivaloo_open(const char * addr, struct wire_requestqueue ** Q)
{
	struct kivaloo_cookie * K;

	/* Allocate a cookie. */
	if ((K = malloc(sizeof(struct kivaloo_cookie))) == NULL)
		goto err0;

	/* Resolve the target address. */
	if ((K->sas = sock_resolve(addr)) == NULL) {
		warnp("Error resolving socket address: %s", addr);
		goto err1;
	}
	if (K->sas[0] == NULL) {
		warn0("No addresses found for %s", addr);
		goto err2;
	}

	/* Open a connection to it. */
	if ((K->s = sock_connect(K->sas)) == -1)
		goto err2;

	/* Create a request queue. */
	if ((K->Q = wire_requestqueue_init(K->s)) == NULL) {
		warnp("Cannot create request queue");
		goto err3;
	}

	/* Return the request queue and cookie. */
	*Q = K->Q;
	return (K);

err3:
	if (close(K->s))
		warnp("close");
err2:
	sock_addr_freelist(K->sas);
err1:
	free(K);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r15
pushq $0x18
popq %rdi
callq 0x2230
testq %rax, %rax
je 0x3de7
movq %rax, %rbx
movq %r15, %rdi
callq 0x5460
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x3d87
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x3dab
movq %r14, %rdi
callq 0x5c39
movl %eax, 0x8(%rbx)
cmpl $-0x1, %eax
je 0x3dc4
movl %eax, %ebp
movl %eax, %edi
callq 0x74b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x3df5
movq %rax, (%r12)
jmp 0x3de9
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3dce
movq %rax, %r14
leaq 0x781f(%rip), %rdi      # 0xb5ba
movq %r15, %rsi
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r14)
jmp 0x3ddf
leaq 0x782b(%rip), %rdi      # 0xb5dd
movq %r15, %rsi
xorl %eax, %eax
callq 0x3a9c
callq 0x20a0
andl $0x0, (%rax)
movq %r14, %rdi
callq 0x5a5f
jmp 0x3ddf
leaq 0x77e5(%rip), %rdi      # 0xb5ba
movq %r15, %rsi
xorl %eax, %eax
callq 0x3a9c
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x20a0
movq %rax, %r15
cmpl $0x0, (%rax)
je 0x3e16
leaq 0x77ee(%rip), %rdi      # 0xb5f7
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r15)
jmp 0x3e24
leaq 0x77da(%rip), %rdi      # 0xb5f7
xorl %eax, %eax
callq 0x3a9c
movl %ebp, %edi
callq 0x21b0
testl %eax, %eax
je 0x3dc4
cmpl $0x0, (%r15)
je 0x3e4c
leaq 0x73da(%rip), %rdi      # 0xb216
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r15)
jmp 0x3dc4
leaq 0x73c3(%rip), %rdi      # 0xb216
xorl %eax, %eax
callq 0x3a9c
jmp 0x3dc4
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kivaloo.c
// Function: kivaloo_close
void
kivaloo_close(void * cookie)
{
	struct kivaloo_cookie * K = cookie;

	/* Shut down the request queue. */
	wire_requestqueue_destroy(K->Q);
	wire_requestqueue_free(K->Q);

	/* Close the socket. */
	if (close(K->s))
		warnp("close");

	/* Free socket addresses. */
	sock_addr_freelist(K->sas);

	/* Free our cookie. */
	free(K);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x7993
movq (%rbx), %rdi
callq 0x79a7
movl 0x8(%rbx), %edi
callq 0x21b0
testl %eax, %eax
je 0x3eb1
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3ea3
movq %rax, %r14
leaq 0x7380(%rip), %rdi      # 0xb216
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r14)
jmp 0x3eb1
leaq 0x736c(%rip), %rdi      # 0xb216
xorl %eax, %eax
callq 0x3a9c
movq 0x10(%rbx), %rdi
callq 0x5a5f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_multiset
int
kvlds_multiset(struct wire_requestqueue * Q,
    int (* callback_pair)(void *, struct kvldskey **, struct kvldskey **),
    void * cookie)
{
	struct multisetcookie C = {
		.Q = Q,
		.callback = callback_pair,
		.cookie = cookie,
		.inflight = 0,
		.eof = 0,
		.failed = 0,
		.done = 0
	};

	/* Start sending requests. */
	if (multiset_send(&C))
		goto err0;

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Did we succeed? */
	return (C.failed);

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

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
andl $0x0, 0x28(%rax)
movq %rax, %rdi
callq 0x3f4c
pushq $-0x1
popq %rbx
testl %eax, %eax
je 0x3f07
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x30(%rsp), %rdi
callq 0x4583
testl %eax, %eax
je 0x3f36
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3f3c
movq %rax, %r14
leaq 0x76ea(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r14)
jmp 0x3efd
movl 0x2c(%rsp), %ebx
jmp 0x3efd
leaq 0x76d0(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x3a9c
jmp 0x3efd
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: multiset_send
static int
multiset_send(struct multisetcookie * C)
{
	struct kvldskey * key;
	struct kvldskey * value;

	/* If we've hit EOF, there's nothing to do. */
	if (C->eof)
		goto done;

	/* If requests are failing, there's nothing to do. */
	if (C->failed)
		goto done;

	/* Send requests as long as we don't have too many in flight. */
	while (C->inflight < 4096) {
		if ((C->callback)(C->cookie, &key, &value)) {
			/* Failing to get more key-value pairs. */
			C->failed = 1;
			goto done;
		}

		/* Are we at EOF? */
		if (key == NULL) {
			C->eof = 1;
			goto done;
		}

		/* Store this key-value pair. */
		if (proto_kvlds_request_set(C->Q, key, value,
		    callback_multiset, C)) {
			warnp("proto_kvlds_request_set");
			C->failed = 1;
			goto err0;
		}

		/* Another request is in flight. */
		C->inflight += 1;

		/* Free the key and value. */
		kvldskey_free(key);
		kvldskey_free(value);
	}

done:
	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %ebp, %ebp
cmpl $0x0, 0x20(%rdi)
jne 0x3f69
movq %rdi, %rbx
cmpl $0x0, 0x24(%rdi)
je 0x3f78
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r14
movq %rsp, %r15
leaq 0x321(%rip), %r12       # 0x42a8
cmpq $0xfff, 0x18(%rbx)      # imm = 0xFFF
ja 0x3f69
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x8(%rbx)
testl %eax, %eax
jne 0x3fdb
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3fe4
movq (%rbx), %rdi
movq (%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x63d6
testl %eax, %eax
jne 0x3ff0
incq 0x18(%rbx)
movq 0x8(%rsp), %rdi
callq 0x2040
movq (%rsp), %rdi
callq 0x2040
jmp 0x3f87
movl $0x1, 0x24(%rbx)
jmp 0x3f69
movl $0x1, 0x20(%rbx)
jmp 0x3f69
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4011
movq %rax, %r14
leaq 0x7643(%rip), %rdi      # 0xb647
xorl %eax, %eax
callq 0x390d
andl $0x0, (%r14)
jmp 0x401f
leaq 0x762f(%rip), %rdi      # 0xb647
xorl %eax, %eax
callq 0x3a9c
movl $0x1, 0x24(%rbx)
pushq $-0x1
popq %rbp
jmp 0x3f69
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_range
int
kvlds_range(struct wire_requestqueue * Q, const struct kvldskey * start,
    const struct kvldskey * end, int (* callback)(void *,
        const struct kvldskey *, const struct kvldskey *),
    void * cookie)
{
	struct rangecookie C = {
		.callback = callback,
		.cookie = cookie,
		.C = { .done = 0 }
	};

	/* Start dumping key-value pairs. */
	if (proto_kvlds_request_range2(Q, start, end,
	    callback_range_item, callback_range_done, &C)) {
		warnp("proto_kvlds_request_range2");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Did we succeed? */
	return (C.C.failed);

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

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0x8(%rsp), %r9
movq %rcx, (%r9)
movq %r8, 0x8(%r9)
andq $0x0, 0x10(%r9)
leaq 0x7a(%rip), %rcx        # 0x40c5
leaq 0x7c(%rip), %r8         # 0x40ce
callq 0x70ec
testl %eax, %eax
je 0x4071
callq 0x20a0
cmpl $0x0, (%rax)
je 0x409f
movq %rax, %rbx
leaq 0x75bd(%rip), %rdi      # 0xb62c
jmp 0x4093
leaq 0x1c(%rsp), %rdi
callq 0x4583
testl %eax, %eax
je 0x40a8
callq 0x20a0
cmpl $0x0, (%rax)
je 0x40ae
movq %rax, %rbx
leaq 0x7580(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x390d
andl $0x0, (%rbx)
jmp 0x40bc
leaq 0x7586(%rip), %rdi      # 0xb62c
jmp 0x40b5
movl 0x18(%rsp), %eax
jmp 0x40bf
leaq 0x755e(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x3a9c
pushq $-0x1
popq %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_set
int
kvlds_set(struct wire_requestqueue * Q, const struct kvldskey * key,
    const struct kvldskey * value)
{
	struct donecookie C = {
		.done = 0,
		.failed = 0
	};

	/* Initiate the request. */
	if (proto_kvlds_request_set(Q, key, value, callback_done, &C)) {
		warnp("proto_kvlds_request_set");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %r8
andq $0x0, (%r8)
leaq 0x78(%rip), %rcx        # 0x4168
callq 0x63d6
testl %eax, %eax
je 0x410f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x413d
movq %rax, %rbx
leaq 0x753a(%rip), %rdi      # 0xb647
jmp 0x4131
leaq 0xc(%rsp), %rdi
callq 0x4583
testl %eax, %eax
je 0x4146
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4151
movq %rax, %rbx
leaq 0x74e2(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x390d
andl $0x0, (%rbx)
jmp 0x415f
leaq 0x7503(%rip), %rdi      # 0xb647
jmp 0x4158
cmpl $0x0, 0x8(%rsp)
jne 0x415f
xorl %eax, %eax
jmp 0x4162
leaq 0x74bb(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x3a9c
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_get
int
kvlds_get(struct wire_requestqueue * Q, const struct kvldskey * key,
    struct kvldskey ** value)
{
	struct getcookie C = {
		.done = 0,
		.failed = 0,
		.value = NULL
	};

	/* Initiate the request. */
	if (proto_kvlds_request_get(Q, key, callback_get, &C)) {
		warnp("proto_kvlds_request_get");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;
	*value = C.value;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
leaq 0x7f(%rip), %rdx        # 0x420b
callq 0x6ade
testl %eax, %eax
je 0x41ab
callq 0x20a0
cmpl $0x0, (%rax)
je 0x41d9
movq %rax, %rbx
leaq 0x74b6(%rip), %rdi      # 0xb65f
jmp 0x41cd
leaq 0x4(%rsp), %rdi
callq 0x4583
testl %eax, %eax
je 0x41e2
callq 0x20a0
cmpl $0x0, (%rax)
je 0x41f4
movq %rax, %rbx
leaq 0x7446(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x390d
andl $0x0, (%rbx)
jmp 0x4202
leaq 0x747f(%rip), %rdi      # 0xb65f
jmp 0x41fb
cmpl $0x0, (%rsp)
jne 0x4202
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x4205
leaq 0x7418(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x3a9c
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: kvlds_delete
int
kvlds_delete(struct wire_requestqueue * Q, const struct kvldskey * key)
{
	struct donecookie C = {
		.done = 0,
		.failed = 0
	};

	/* Initiate the request. */
	if (proto_kvlds_request_delete(Q, key, callback_done, &C)) {
		warnp("proto_kvlds_request_delete");
		goto err0;
	}

	/* Wait until we've finished. */
	if (events_spin(&C.done)) {
		warnp("Error running event loop");
		goto err0;
	}

	/* Interpret results. */
	if (C.failed)
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rcx
andq $0x0, (%rcx)
leaq -0xc8(%rip), %rdx       # 0x4168
callq 0x6935
testl %eax, %eax
je 0x424f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x427d
movq %rax, %rbx
leaq 0x742a(%rip), %rdi      # 0xb677
jmp 0x4271
leaq 0xc(%rsp), %rdi
callq 0x4583
testl %eax, %eax
je 0x4286
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4291
movq %rax, %rbx
leaq 0x73a2(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x390d
andl $0x0, (%rbx)
jmp 0x429f
leaq 0x73f3(%rip), %rdi      # 0xb677
jmp 0x4298
cmpl $0x0, 0x8(%rsp)
jne 0x429f
xorl %eax, %eax
jmp 0x42a2
leaq 0x737b(%rip), %rdi      # 0xb613
xorl %eax, %eax
callq 0x3a9c
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: main
int main(int argc, char **argv) {
    bool ok = true;
    bool show_res = false;
    bool shown = false;

    for (int i = 1; i < argc; i ++) {
        if (strlen(argv[i]) == 2 && argv[i][0] == '-') {
            switch (argv[i][1]) {
                case 'R':
                    show_res = true;
                    break;
                case 'r':
                    ok = ok && show(CLOCK_REALTIME, show_res);
                    shown = true;
                    break;
#ifdef CLOCK_TAI
                case 'T':
                    ok = ok && show(CLOCK_TAI, show_res);
                    shown = true;
                    break;
#endif
                case 'm':
                    ok = ok && show(CLOCK_MONOTONIC, show_res);
                    shown = true;
                    break;
#ifdef CLOCK_MONOTONIC_RAW
                case 'M':
                    ok = ok && show(CLOCK_MONOTONIC_RAW, show_res);
                    shown = true;
                    break;
#endif
                case 'p':
                    ok = ok && show(CLOCK_PROCESS_CPUTIME_ID, show_res);
                    shown = true;
                    break;
                case 't':
                    ok = ok && show(CLOCK_THREAD_CPUTIME_ID, show_res);
                    shown = true;
                    break;
                default:
                    usage();
                    break;
            }
        }
        else {
            usage();
        }
    }

    if (!shown) {
        ok = ok && show(CLOCK_REALTIME, show_res);
    }

    exit(ok ? EXIT_SUCCESS : EXIT_FAILURE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq %edi, %r13
movb $0x1, %bpl
pushq $0x1
popq %r15
movl $0x0, 0x4(%rsp)
xorl %r12d, %r12d
cmpq %r13, %r15
jge 0x1267
movq (%rbx,%r15,8), %r14
movq %r14, %rdi
callq 0x1050
cmpq $0x2, %rax
jne 0x1262
cmpb $0x2d, (%r14)
jne 0x1262
movzbl 0x1(%r14), %eax
leal -0x6d(%rax), %ecx
cmpl $0x7, %ecx
ja 0x1205
leaq 0xe0c(%rip), %rdx       # 0x2004
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
pushq $0x1
jmp 0x1226
cmpl $0x4d, %eax
je 0x1224
cmpl $0x52, %eax
je 0x1254
cmpl $0x54, %eax
jne 0x1262
pushq $0xb
jmp 0x1226
xorl %edi, %edi
jmp 0x1227
pushq $0x2
jmp 0x1226
pushq $0x3
jmp 0x1226
pushq $0x4
popq %rdi
testb $0x1, %bpl
je 0x124d
testb $0x1, 0x4(%rsp)
leaq 0x134(%rip), %rax       # 0x136d
leaq 0xe4(%rip), %rcx        # 0x1324
cmovneq %rcx, %rax
callq *%rax
movl %eax, %ebp
movb $0x1, %r12b
jmp 0x125a
movb $0x1, %r12b
xorl %ebp, %ebp
jmp 0x125a
movb $0x1, %al
movl %eax, 0x4(%rsp)
incq %r15
jmp 0x11bf
callq 0x12a4
testb $0x1, %r12b
jne 0x1294
testb $0x1, %bpl
je 0x1292
testb $0x1, 0x4(%rsp)
leaq 0xee(%rip), %rax        # 0x136d
leaq 0x9e(%rip), %rcx        # 0x1324
cmovneq %rcx, %rax
xorl %edi, %edi
callq *%rax
movl %eax, %ebp
jmp 0x1294
xorl %ebp, %ebp
notb %bpl
andb $0x1, %bpl
movzbl %bpl, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: usage
static void usage(void) {
    puts("Usage: clock_gettime [options]");
    puts("  -r    CLOCK_REALTIME, system-wide real-time clock (default)");
    puts("  -T    CLOCK_TAI, International Atomic Time (no leap seconds)");
#ifndef CLOCK_TAI
    puts("        CLOCK_TAI is not supported on this system");
#endif
    puts("  -m    CLOCK_MONOTONIC, monotonic time since some unspecified starting point");
    puts("  -M    CLOCK_MONOTONIC_RAW, hardware-based timer with no ntp adjustments");
#ifndef CLOCK_MONOTONIC_RAW
    puts("        CLOCK_MONOTONIC_RAW is not supported on this system");
#endif
    puts("  -p    CLOCK_PROCESS_CPUTIME_ID, high-resolution per-process timer from the CPU");
    puts("  -t    CLOCK_THREAD_CPUTIME_ID, thread-specific CPU-time clock");
    puts("(-p and -t are not particularly meaningful in this context.)");
    puts("  -R    Show resolution (calls clock_getres), may be followed by other options");
    puts("Multiple arguments may be given");
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rax
leaq 0xd9e(%rip), %rdi       # 0x204a
callq 0x1030
leaq 0xdb1(%rip), %rdi       # 0x2069
callq 0x1030
leaq 0xde3(%rip), %rdi       # 0x20a7
callq 0x1030
leaq 0xe16(%rip), %rdi       # 0x20e6
callq 0x1030
leaq 0xe58(%rip), %rdi       # 0x2134
callq 0x1030
leaq 0xe96(%rip), %rdi       # 0x217e
callq 0x1030
leaq 0xedb(%rip), %rdi       # 0x21cf
callq 0x1030
leaq 0xf0f(%rip), %rdi       # 0x220f
callq 0x1030
leaq 0xf40(%rip), %rdi       # 0x224c
callq 0x1030
leaq 0xf83(%rip), %rdi       # 0x229b
callq 0x1030
xorl %edi, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: show_res
static bool show_res(clockid_t clk_id) {
    struct timespec ts = { 0, 0 };
    if (clock_getres(clk_id, &ts) == 0) {
        printf("%ld.%09ld\n", (long)ts.tv_sec, (long)ts.tv_nsec);
        return true;
    }
    else {
        perror("clock_getres");
        return false;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
callq 0x1070
movl %eax, %ebx
testl %eax, %eax
jne 0x135f
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xcd7(%rip), %rdi       # 0x2024
xorl %eax, %eax
callq 0x1060
testl %ebx, %ebx
sete %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0xcc9(%rip), %rdi       # 0x202f
callq 0x1080
jmp 0x1354
// File: /workspace/github_c_makefile_star2_O2/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: show_time
static bool show_time(clockid_t clk_id) {
    struct timespec ts = { 0, 0 };
    if (clock_gettime(clk_id, &ts) == 0) {
        printf("%ld.%09ld\n", (long)ts.tv_sec, (long)ts.tv_nsec);
        return true;
    }
    else {
        perror("clock_gettime");
        return false;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
callq 0x1040
movl %eax, %ebx
testl %eax, %eax
jne 0x13a8
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xc8e(%rip), %rdi       # 0x2024
xorl %eax, %eax
callq 0x1060
testl %ebx, %ebx
sete %al
addq $0x10, %rsp
popq %rbx
retq
leaq 0xc8d(%rip), %rdi       # 0x203c
callq 0x1080
jmp 0x139d
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: main
static void readcmdline(char* argv[]) {
  int ap = 0, n = 0;
  unless(argv[ap] == NULL) ap++; /* skip program name */
  unless(argv[ap] != NULL && seq(argv[ap++], "-Av")) usage();
  lflag = false;
  until(argv[ap] == NULL) {
    char* s = argv[ap++];
    if (seq(s, "-l"))
      lflag = true;
    else if (n == 0) {
      numcoeffs = atoi(s);
      n++;
    } else
      usage();
  }
  unless(n == 1) usage();
  /* (num.zeros) = (num.coeffs) - 1 */
  if (numcoeffs < 1 || numcoeffs > MAXPZ + 1)
    giveup("filter length must be in range 1 .. %d", MAXPZ + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r14
xorl %eax, %eax
testq %r14, %r14
setne %al
movq (%rsi,%rax,8), %rdi
testq %rdi, %rdi
je 0x13b2
movq %rsi, %rbx
leaq 0xdbb(%rip), %rsi       # 0x2004
callq 0x1439
testb %al, %al
je 0x13b2
cmpq $0x1, %r14
pushq $0x1
popq %r12
sbbq $-0x1, %r12
movb $0x1, %r13b
xorl %ebp, %ebp
leaq 0xd9a(%rip), %r14       # 0x2008
movl %ebp, %ecx
movl %ecx, %ebp
movq (%rbx,%r12,8), %r15
testq %r15, %r15
je 0x12ac
incq %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x1439
movb $0x1, %cl
testb %al, %al
jne 0x1270
testb $0x1, %r13b
je 0x13b2
movq %r15, %rdi
callq 0x10d0
movl %eax, 0x2dfd(%rip)      # 0x40a4
xorl %r13d, %r13d
jmp 0x126e
testb $0x1, %r13b
jne 0x13b2
movl $0xfffffdfe, %eax       # imm = 0xFFFFFDFE
movl 0x2de3(%rip), %ecx      # 0x40a4
addl %eax, %ecx
cmpl %eax, %ecx
jbe 0x13b7
testb $0x1, %bpl
je 0x1305
xorl %r14d, %r14d
movq 0x2ced(%rip), %r15      # 0x3fc8
pushq $0x20
popq %rbp
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x1325
testq %r14, %r14
je 0x12f7
movl %ebp, %edi
callq 0x1090
movq (%rbx,%r14), %rdi
movq (%r15), %rsi
callq 0x1070
addq $0x8, %r14
jmp 0x12de
leaq 0xda3(%rip), %rbx       # 0x20af
movq %rbx, %rdi
callq 0x10c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %rdi
callq 0x1090
movl 0x2d71(%rip), %esi      # 0x40a4
leaq 0xd5a(%rip), %rdi       # 0x2094
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1030
movl 0x2d5b(%rip), %esi      # 0x40a4
decl %esi
leaq 0xd4b(%rip), %rdi       # 0x209d
xorl %eax, %eax
callq 0x1030
leaq 0xd54(%rip), %rbx       # 0x20b4
movl 0x2d3e(%rip), %esi      # 0x40a4
cmpl %esi, %ebp
jge 0x1376
movq %rbx, %rdi
callq 0x10c0
incl %ebp
jmp 0x1360
decl %esi
leaq 0xd27(%rip), %rdi       # 0x20a6
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1030
leaq 0xd24(%rip), %rbx       # 0x20b3
leaq 0xd20(%rip), %r14       # 0x20b6
movl 0x2d08(%rip), %eax      # 0x40a4
decl %eax
cmpl %eax, %ebp
jge 0x130c
movq %r14, %rdi
callq 0x10c0
incl %ebp
jmp 0x1396
callq 0x13fc
movq 0x2c22(%rip), %rbx      # 0x3fe0
movq (%rbx), %rcx
leaq 0xcc0(%rip), %rdi       # 0x2088
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x1110
movq (%rbx), %rdi
leaq 0xc2e(%rip), %rsi       # 0x200b
movl $0x201, %edx            # imm = 0x201
xorl %eax, %eax
callq 0x10b0
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/mkfilter/src/complex.C
// Function: eval(complex*, int, complex)
static complex eval(
    complex coeffs[],
    int npz,
    complex z) { /* evaluate polynomial in z, substituting for z */
  complex sum = complex(0.0);
  for (int i = npz; i >= 0; i--)
    sum = (sum * z) + coeffs[i];
  return sum;
}

// Assembly:
xorpd %xmm3, %xmm3
xorpd %xmm2, %xmm2
testl %esi, %esi
js 0x1527
movapd %xmm3, %xmm4
mulsd %xmm1, %xmm4
movapd %xmm2, %xmm5
mulsd %xmm0, %xmm5
subsd %xmm4, %xmm5
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
movl %esi, %eax
shlq $0x4, %rax
addsd (%rdi,%rax), %xmm5
addsd 0x8(%rdi,%rax), %xmm2
decl %esi
movapd %xmm2, %xmm3
movapd %xmm5, %xmm2
jmp 0x14e6
movapd %xmm2, %xmm0
movapd %xmm3, %xmm1
retq
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/mkfilter/src/complex.C
// Function: csqrt(complex)
global complex csqrt(complex x) {
  double r = hypot(x);
  complex z = complex(Xsqrt(0.5 * (r + x.re)), Xsqrt(0.5 * (r - x.re)));
  if (x.im < 0.0)
    z.im = -z.im;
  return z;
}

// Assembly:
subq $0x38, %rsp
movapd %xmm0, %xmm2
movsd %xmm0, (%rsp)
movapd %xmm1, 0x20(%rsp)
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
callq 0x1050
movsd (%rsp), %xmm5
movapd %xmm0, %xmm2
addsd %xmm5, %xmm0
mulsd 0xb53(%rip), %xmm0      # 0x20b8
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm0
xorpd %xmm3, %xmm3
jb 0x15a1
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1583
sqrtsd %xmm0, %xmm3
jmp 0x15a1
movsd %xmm2, 0x18(%rsp)
callq 0x1060
movsd (%rsp), %xmm5
movsd 0x18(%rsp), %xmm2
xorpd %xmm4, %xmm4
movapd %xmm0, %xmm3
subsd %xmm5, %xmm2
mulsd 0xb0b(%rip), %xmm2      # 0x20b8
ucomisd %xmm4, %xmm2
jb 0x15da
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x15c3
sqrtsd %xmm2, %xmm4
jmp 0x15da
movapd %xmm2, %xmm0
movapd %xmm3, (%rsp)
callq 0x1060
movapd (%rsp), %xmm3
movapd %xmm0, %xmm4
movapd 0xade(%rip), %xmm0      # 0x20c0
xorpd %xmm4, %xmm0
xorpd %xmm2, %xmm2
movapd 0x20(%rsp), %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm0
andnpd %xmm4, %xmm1
orpd %xmm0, %xmm1
movapd %xmm3, %xmm0
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/stack.c
// Function: push8
void
push8(stack8 st, uint8_t val)
{
	struct node8	*node;

	node = malloc(sizeof(struct node8));

	/* memory problems can only lead to more memory problems. */
	if (NULL == node)
		abort();

	node->val = val;
	node->next = st->st;
	st->st = node;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x1219
movb %bpl, (%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/stack.c
// Function: destroy8
void
destroy8(stack8 st)
{
	struct node8 *node = NULL;

	while (NULL != (node = st->st)) {
		st->st = node->next;
		free(node);
	}
	free(st);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1265
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
jmp 0x124f
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/stack.c
// Function: push16
void
push16(stack16 st, uint16_t val)
{
	struct node16	*node;

	node = malloc(sizeof(struct node16));

	/* memory problems can only lead to more memory problems. */
	if (NULL == node)
		abort();

	node->val = val;
	node->next = st->st;
	st->st = node;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x12ab
movw %bp, (%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/stack.c
// Function: destroy16
void
destroy16(stack16 st)
{
	struct node16 *node = NULL;

	while (NULL != (node = st->st)) {
		st->st = node->next;
		free(node);
	}
	free(st);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x12f8
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
jmp 0x12e2
movq %rbx, %rdi
popq %rbx
jmp 0x1030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/vm.c
// Function: vm_new
machine
vm_new(void)
{
	machine vm = NULL;

	vm = malloc(sizeof(struct s_vm));
	if (NULL == vm)
		return NULL;

	vm->vals = new_stack16();
	vm->opers = new_stack8();
	vm->pc = 0;

	if ((NULL == vm->vals) || (NULL == vm->opers)) {
		vm_destroy(vm);
		return NULL;
	}
	return vm;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x18
popq %rdi
callq 0x10b0
testq %rax, %rax
je 0x134b
movq %rax, %rbx
callq 0x126e
movq %rax, %r14
movq %rax, (%rbx)
callq 0x11dc
movq %rax, 0x8(%rbx)
andw $0x0, 0x10(%rbx)
testq %r14, %r14
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x134d
movq %rbx, %rdi
callq 0x1358
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/vm.c
// Function: vm_destroy
void
vm_destroy(machine vm)
{
	if (vm) {
		if (vm->vals)
			destroy16(vm->vals);
		if (vm->opers)
			destroy8(vm->opers);
		free(vm);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1385
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x136e
callq 0x12de
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x137c
callq 0x124b
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/vm.c
// Function: vm_peek
uint16_t
vm_peek(machine vm)
{
	uint16_t val;

	if (NULL == vm)
		return 0;
	if (NULL == vm->vals)
		return 0;
	if (empty16(vm->vals))
		return 0;

	val = pop16(vm->vals);
	push16(vm->vals, val);
	return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x155a
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x155a
callq 0x12d4
testl %eax, %eax
je 0x1566
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdi
callq 0x12b0
movl %eax, %ebx
movq (%r14), %rdi
movzwl %ax, %esi
callq 0x1282
jmp 0x155c
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kisom[P]kam/kamvm.c
// Function: main
int
main(int argc, const char *argv[])
{
	if (0 == argc)
		return interpreter();
	else
		return run(argv[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
testl %edi, %edi
je 0x16ad
movq 0x8(%rsi), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x10a0
pushq $0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1662
movq 0x30(%rsp), %r13
leaq 0xb11(%rip), %rdi       # 0x20d0
xorl %r12d, %r12d
movq %r13, %rsi
xorl %eax, %eax
callq 0x1080
movq %r13, %rdi
callq 0x10b0
testq %rax, %rax
je 0x1665
movq %rax, %r15
leaq 0xb04(%rip), %rsi       # 0x20eb
movq %r14, %rdi
callq 0x10c0
testq %rax, %rax
je 0x1672
movq %rax, %r14
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %rax, %rcx
callq 0x1060
cmpq %rax, %r13
jne 0x166d
callq 0x1304
testq %rax, %rax
je 0x166d
movq %rax, %r12
leaq 0xad3(%rip), %rdi       # 0x20f4
callq 0x1050
movzwl %r13w, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1519
testl %eax, %eax
je 0x1678
movq %r12, %rdi
callq 0x153d
movzwl %ax, %esi
leaq 0xaa3(%rip), %rdi       # 0x20ee
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
leaq 0xaa6(%rip), %rdi       # 0x2101
callq 0x1050
jmp 0x1678
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x1678
xorl %r12d, %r12d
jmp 0x1678
xorl %r12d, %r12d
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x1030
testq %r12, %r12
je 0x168d
movq %r12, %rdi
callq 0x1358
testq %r14, %r14
je 0x169a
movq %r14, %rdi
callq 0x1070
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x2944(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0x9e9(%rip), %rdi       # 0x20a7
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
pushq $0x1
popq %rbx
jmp 0x169a
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/bgzf.c
// Function: bgzf_mt
int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks)
{
	int i;
	mtaux_t *mt;
	pthread_attr_t attr;
	if (!fp->is_write || fp->mt || n_threads <= 1) return -1;
	mt = (mtaux_t*)calloc(1, sizeof(mtaux_t));
	mt->n_threads = n_threads;
	mt->n_blks = n_threads * n_sub_blks;
	mt->len = (int*)calloc(mt->n_blks, sizeof(int));
	mt->blk = (void**)calloc(mt->n_blks, sizeof(void*));
	for (i = 0; i < mt->n_blks; ++i)
		mt->blk[i] = malloc(BGZF_MAX_BLOCK_SIZE);
	mt->tid = (pthread_t*)calloc(mt->n_threads, sizeof(pthread_t)); // tid[0] is not used, as the worker 0 is launched by the master
	mt->w = (worker_t*)calloc(mt->n_threads, sizeof(worker_t));
	for (i = 0; i < mt->n_threads; ++i) {
		mt->w[i].i = i;
		mt->w[i].mt = mt;
		mt->w[i].fp = fp;
		mt->w[i].buf = malloc(BGZF_MAX_BLOCK_SIZE);
	}
	pthread_attr_init(&attr);
	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
	pthread_mutex_init(&mt->lock, 0);
	pthread_cond_init(&mt->cv, 0);
	for (i = 1; i < mt->n_threads; ++i) // worker 0 is effectively launched by the master thread
		pthread_create(&mt->tid[i], &attr, mt_worker, &mt->w[i]);
	fp->mt = mt;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
pushq $-0x1
popq %rax
movq %rdi, 0x8(%rsp)
testb $0x3, 0x2(%rdi)
je 0x3c9a
movl %esi, %ebp
cmpl $0x2, %esi
jl 0x3c9a
movq 0x8(%rsp), %rcx
cmpq $0x0, 0x38(%rcx)
jne 0x3c9a
movl %edx, %ebx
pushq $0x1
popq %rdi
movl $0x90, %esi
callq 0x21f0
movq %rax, %r15
movl %ebp, (%rax)
imull %ebp, %ebx
movl %ebx, 0x4(%rax)
movslq %ebx, %r12
pushq $0x4
popq %rsi
movq %r12, %rdi
callq 0x21f0
movq %rax, 0x20(%r15)
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x21f0
movq %rax, %rbx
movq %rax, 0x18(%r15)
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r13, %r12
je 0x3bc7
movl $0x10000, %edi          # imm = 0x10000
callq 0x22a0
movq %rax, (%rbx,%r13,8)
incq %r13
jmp 0x3baf
movl %ebp, %ebx
pushq $0x8
popq %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21f0
movq %rax, 0x30(%r15)
pushq $0x28
popq %r13
movq %rbx, %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21f0
movq %rax, %rbx
movq %rax, 0x28(%r15)
addq $0x18, %rbx
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x3c26
movl %ebp, (%rbx)
movq %r15, -0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, -0x18(%rbx)
movl $0x10000, %edi          # imm = 0x10000
callq 0x22a0
movq %rax, -0x8(%rbx)
incq %rbp
addq $0x28, %rbx
jmp 0x3bfb
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x21e0
movq %rbp, %rdi
xorl %esi, %esi
callq 0x2280
leaq 0x38(%r15), %rdi
xorl %esi, %esi
callq 0x23f0
movq %r15, %rdi
addq $0x60, %rdi
xorl %esi, %esi
callq 0x2270
leaq 0x4c(%rip), %rbx        # 0x3ca9
pushq $0x1
popq %r14
movslq (%r15), %rax
cmpq %rax, %r14
jge 0x3c8f
movq 0x30(%r15), %rdi
addq %r12, %rdi
movq 0x28(%r15), %rcx
addq %r13, %rcx
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2310
incq %r14
addq $0x28, %r13
addq $0x8, %r12
jmp 0x3c61
movq 0x8(%rsp), %rax
movq %r15, 0x38(%rax)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/bgzf.c
// Function: bgzf_flush
int bgzf_flush(BGZF *fp)
{
	if (!fp->is_write) return 0;
#ifdef BGZF_MT
	if (fp->mt) return mt_flush(fp);
#endif
	while (fp->block_offset > 0) {
		int block_length;
		block_length = deflate_block(fp, fp->block_offset);
		if (block_length < 0) return -1;
		if (fwrite(fp->compressed_block, 1, block_length, (FILE*)fp->fp) != (size_t)block_length) {
			fp->errcode |= BGZF_ERR_IO; // possibly truncated file
			return -1;
		}
		fp->block_address += block_length;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testb $0x3, 0x2(%rdi)
je 0x3d23
movq %rdi, %r14
cmpq $0x0, 0x38(%rdi)
je 0x3ce1
movq %r14, %rdi
callq 0x3d2e
jmp 0x3d23
pushq $-0x1
popq %rbp
pushq $0x1
popq %r15
movl 0xc(%r14), %esi
testl %esi, %esi
jle 0x3d23
movq %r14, %rdi
callq 0x3e1e
testl %eax, %eax
js 0x3d21
movl %eax, %r12d
movq 0x20(%r14), %rdi
movq 0x30(%r14), %rcx
movq %r15, %rsi
movq %r12, %rdx
callq 0x23c0
cmpq %r12, %rax
jne 0x3d1d
addq %r12, 0x10(%r14)
jmp 0x3ce8
orb $0x4, (%r14)
movl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/bgzf.c
// Function: bgzf_write
ssize_t bgzf_write(BGZF *fp, const void *data, ssize_t length)
{
	const uint8_t *input = (const uint8_t*)data;
	int block_length = BGZF_BLOCK_SIZE, bytes_written = 0;
	assert(fp->is_write);
#ifdef BGZF_MT
	if (fp->mt) return mt_write(fp, data, length);
#endif
	while (bytes_written < length) {
		uint8_t* buffer = (uint8_t*)fp->uncompressed_block;
		int copy_length = block_length - fp->block_offset < length - bytes_written? block_length - fp->block_offset : length - bytes_written;
		memcpy(buffer + fp->block_offset, input, copy_length);
		fp->block_offset += copy_length;
		input += copy_length;
		bytes_written += copy_length;
		if (fp->block_offset == block_length && bgzf_flush(fp)) break;
	}
	return bytes_written;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb $0x3, 0x2(%rdi)
je 0x3f9c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x38(%rdi)
je 0x3f42
movq %rbx, %r13
testq %r13, %r13
je 0x3f30
movslq 0xc(%r15), %rdi
movl $0xff00, %eax           # imm = 0xFF00
subq %rdi, %rax
cmpq %rax, %r13
movl %r13d, %ecx
cmovgl %eax, %ecx
addq 0x18(%r15), %rdi
movslq %ecx, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x2240
movl 0xc(%r15), %eax
addl %r12d, %eax
movl %eax, 0xc(%r15)
addq %r12, %r14
subq %r12, %r13
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x3ee2
movq %r15, %rdi
callq 0x3e80
jmp 0x3ee2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
movslq %ebp, %rax
movq %rbx, %rcx
subq %rax, %rcx
jle 0x3f33
movslq 0xc(%r15), %rdi
movl $0xff00, %eax           # imm = 0xFF00
subq %rdi, %rax
cmpq %rax, %rcx
cmovgl %eax, %ecx
addq 0x18(%r15), %rdi
movslq %ecx, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x2240
movl 0xc(%r15), %eax
addl %r12d, %eax
movl %eax, 0xc(%r15)
addq %r12, %r14
addl %r12d, %ebp
cmpl $0xff00, %eax           # imm = 0xFF00
jne 0x3f44
movq %r15, %rdi
callq 0x3cbd
testl %eax, %eax
je 0x3f44
movslq %ebp, %rax
jmp 0x3f33
leaq 0x82b6(%rip), %rdi      # 0xc259
leaq 0x821b(%rip), %rsi      # 0xc1c5
leaq 0x82b5(%rip), %rcx      # 0xc266
movl $0x23d, %edx            # imm = 0x23D
callq 0x2180
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/bgzf.c
// Function: bgzf_close
int bgzf_close(BGZF* fp)
{
	int ret, block_length;
	if (fp == 0) return -1;
	if (fp->is_write) {
		if (bgzf_flush(fp) != 0) return -1;
		fp->compress_level = -1;
		block_length = deflate_block(fp, 0); // write an empty block
		fwrite(fp->compressed_block, 1, block_length, (FILE*)fp->fp);
		if (fflush((FILE*)fp->fp) != 0) {
			fp->errcode |= BGZF_ERR_IO;
			return -1;
		}
#ifdef BGZF_MT
		if (fp->mt) mt_destroy((mtaux_t*)fp->mt);
#endif
	}
	ret = fp->is_write? fclose((FILE*)fp->fp) : _bgzf_close(fp->fp);
	if (ret != 0) return -1;
	free(fp->uncompressed_block);
	free(fp->compressed_block);
	free_cache(fp);
	free(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbp
testq %rdi, %rdi
je 0x412e
movq %rdi, %rbx
testb $0x3, 0x2(%rdi)
je 0x4105
movq %rbx, %rdi
callq 0x3cbd
testl %eax, %eax
jne 0x412e
orl $0xfff00000, (%rbx)     # imm = 0xFFF00000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3e1e
movslq %eax, %rdx
movq 0x20(%rbx), %rdi
movq 0x30(%rbx), %rcx
pushq $0x1
popq %r13
movq %r13, %rsi
callq 0x23c0
movq 0x30(%rbx), %rdi
callq 0x22b0
testl %eax, %eax
je 0x402b
orb $0x4, (%rbx)
jmp 0x412e
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x4105
leaq 0x38(%r14), %r15
movq %r15, %rdi
callq 0x2410
movl $0x1, 0xc(%r14)
movl $0x0, 0x10(%r14)
leaq 0x60(%r14), %rdi
movq %rdi, (%rsp)
callq 0x20d0
movq %r15, %rdi
callq 0x2290
movslq (%r14), %rax
cmpq %rax, %r13
jge 0x4085
movq 0x30(%r14), %rax
movq (%rax,%r13,8), %rdi
xorl %esi, %esi
callq 0x23d0
incq %r13
jmp 0x4069
xorl %r12d, %r12d
movslq 0x4(%r14), %rax
cmpq %rax, %r12
jge 0x40a3
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x2050
incq %r12
jmp 0x4088
pushq $0x10
popq %r13
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x40c8
movq 0x28(%r14), %rax
movq (%rax,%r13), %rdi
callq 0x2050
incq %r12
addq $0x28, %r13
jmp 0x40aa
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x20(%r14), %rdi
callq 0x2050
movq 0x28(%r14), %rdi
callq 0x2050
movq 0x30(%r14), %rdi
callq 0x2050
movq (%rsp), %rdi
callq 0x2340
movq %r15, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2140
testl %eax, %eax
jne 0x412e
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2050
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/bgzf.c
// Function: bgzf_check_EOF
int bgzf_check_EOF(BGZF *fp)
{
	uint8_t buf[28];
	off_t offset;
	offset = _bgzf_tell((_bgzf_file_t)fp->fp);
	if (_bgzf_seek(fp->fp, -28, SEEK_END) < 0) return 0;
	_bgzf_read(fp->fp, buf, 28);
	_bgzf_seek(fp->fp, offset, SEEK_SET);
	return (memcmp("\037\213\010\4\0\0\0\0\0\377\6\0\102\103\2\0\033\0\3\0\0\0\0\0\0\0\0\0", buf, 28) == 0)? 1 : 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq 0x30(%rbx), %rdi
pushq $-0x1c
popq %rsi
pushq $0x2
popq %rdx
callq 0x2350
testl %eax, %eax
js 0x41b9
movq 0x30(%rbx), %rcx
movq %rsp, %r15
pushq $0x1
popq %rsi
pushq $0x1c
popq %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x20e0
movq 0x30(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2350
leaq 0x812d(%rip), %rdi      # 0xc2d0
movq %r15, %rsi
movq %r12, %rdx
callq 0x22d0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x41bb
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/hts.c
// Function: hts_close
void hts_close(htsFile *fp)
{
	free(fp->fn);
	if (!fp->is_bin) {
		free(fp->line.s);
		if (!fp->is_write) {
			gzFile gzfp = ((kstream_t*)fp->fp)->f;
			ks_destroy((kstream_t*)fp->fp);
			gzclose(gzfp);
			free(fp->fn_aux);
		} else fclose((FILE*)fp->fp);
	} else bgzf_close((BGZF*)fp->fp);
	free(fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x2050
testb $0x1, (%rbx)
jne 0x51ae
movq 0x20(%rbx), %rdi
callq 0x2050
testb $0x2, (%rbx)
movq 0x38(%rbx), %rdi
jne 0x51b9
movq 0x10(%rdi), %r14
callq 0x4709
movq %r14, %rdi
callq 0x2040
movq 0x30(%rbx), %rdi
callq 0x2050
jmp 0x51be
movq 0x38(%rbx), %rdi
callq 0x3fbb
jmp 0x51be
callq 0x2140
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/hts.c
// Function: hts_idx_init
hts_idx_t *hts_idx_init(int n, int fmt, uint64_t offset0, int min_shift, int n_lvls)
{
	hts_idx_t *idx;
	idx = (hts_idx_t*)calloc(1, sizeof(hts_idx_t));
	idx->fmt = fmt;
	idx->min_shift = min_shift;
	idx->n_lvls = n_lvls;
	idx->n_bins = ((1<<(3 * n_lvls + 3)) - 1) / 7;
	idx->z.save_bin = idx->z.save_tid = idx->z.last_tid = idx->z.last_bin = 0xffffffffu;
	idx->z.save_off = idx->z.last_off = idx->z.off_beg = idx->z.off_end = offset0;
	idx->z.last_coor = 0xffffffffu;
	if (n) {
		idx->n = idx->m = n;
		idx->bidx = (bidx_t**)calloc(n, sizeof(void*));
		idx->lidx = (lidx_t*) calloc(n, sizeof(lidx_t));
	}
	return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %r13d
movl %edi, %ebp
pushq $0x1
popq %rdi
movl $0x88, %esi
callq 0x21f0
movq %rax, %rbx
movl %r13d, (%rax)
leal (%r15,%r15,2), %ecx
addb $0x3, %cl
pushq $-0x1
popq %rax
shll %cl, %eax
movl %r12d, 0x4(%rbx)
movl %r15d, 0x8(%rbx)
notl %eax
pushq $0x7
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, 0xc(%rbx)
orl $-0x1, 0x50(%rbx)
movq %r14, 0x70(%rbx)
movq %r14, 0x68(%rbx)
movq %r14, 0x58(%rbx)
movq %r14, 0x60(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x40(%rbx)
testl %ebp, %ebp
je 0x5933
movl %ebp, 0x18(%rbx)
movl %ebp, 0x14(%rbx)
movslq %ebp, %r14
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x28(%rbx)
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x21f0
movq %rax, 0x30(%rbx)
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_O2/DReichLab[P]adna/hts.c
// Function: insert_to_b
static inline void insert_to_b(bidx_t *b, int bin, uint64_t beg, uint64_t end)
{
	khint_t k;
	hts_bin_t *l;
	int absent;
	k = kh_put(bin, b, bin, &absent);
	l = &kh_value(b, k);
	if (absent) {
		l->m = 1; l->n = 0;
		l->list = (hts_pair64_t*)calloc(l->m, 16);
	}
	if (l->n == l->m) {
		l->m <<= 1;
		l->list = (hts_pair64_t*)realloc(l->list, l->m * 16);
	}
	l->list[l->n].u = beg;
	l->list[l->n++].v = end;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0xc(%rsp), %r12
movq %r12, %rdx
callq 0x7683
movl %eax, %eax
imulq $0x18, %rax, %r13
addq 0x20(%r15), %r13
cmpl $0x0, (%r12)
je 0x5dbe
movq $0x1, (%r13)
leaq 0x4(%r13), %r15
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x21f0
movq %rax, 0x10(%r13)
xorl %ecx, %ecx
jmp 0x5dee
leaq 0x4(%r13), %r15
movl (%r13), %eax
movl 0x4(%r13), %ecx
cmpl %eax, %ecx
jne 0x5dee
leal (%rax,%rax), %ecx
movl %ecx, (%r13)
movq 0x10(%r13), %rdi
shll $0x5, %eax
movslq %eax, %rsi
callq 0x22f0
movq %rax, 0x10(%r13)
movl 0x4(%r13), %ecx
jmp 0x5df2
movq 0x10(%r13), %rax
movslq %ecx, %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %r14, (%rax,%rdx)
incl %ecx
movl %ecx, (%r15)
movq %rbx, 0x8(%rax,%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/hts.c
// Function: update_loff
static void update_loff(hts_idx_t *idx, int i, int free_lidx)
{
	bidx_t *bidx = idx->bidx[i];
	lidx_t *lidx = &idx->lidx[i];
	khint_t k;
	int l;
	uint64_t offset0 = 0;
	if (bidx) {
		k = kh_get(bin, bidx, idx->n_bins + 1);
		if (k != kh_end(bidx))
			offset0 = kh_val(bidx, k).list[0].u;
		for (l = 0; l < lidx->n && lidx->offset[l] == (uint64_t)-1; ++l)
			lidx->offset[l] = offset0;
	} else l = 1;
	for (; l < lidx->n; ++l) // fill missing values
		if (lidx->offset[l] == (uint64_t)-1)
			lidx->offset[l] = lidx->offset[l-1];
	if (bidx == 0) return;
	for (k = kh_begin(bidx); k != kh_end(bidx); ++k) // set loff
		if (kh_exist(bidx, k))
			kh_val(bidx, k).loff = kh_key(bidx, k) < idx->n_bins? lidx->offset[hts_bin_bot(kh_key(bidx, k), idx->n_lvls)] : 0;
	if (free_lidx) {
		free(lidx->offset);
		lidx->m = lidx->n = 0;
		lidx->offset = 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movq 0x28(%rdi), %rax
movslq %esi, %r12
movq (%rax,%r12,8), %r15
shlq $0x4, %r12
addq 0x30(%rdi), %r12
testq %r15, %r15
je 0x5e57
movl 0xc(%r14), %esi
incl %esi
movq %r15, %rdi
callq 0x7063
xorl %ecx, %ecx
cmpl (%r15), %eax
jne 0x5e60
xorl %edx, %edx
jmp 0x5e72
movl (%r12), %eax
pushq $0x1
popq %rcx
jmp 0x5e9e
movq 0x20(%r15), %rdx
movl %eax, %eax
imulq $0x18, %rax, %rax
movq 0x10(%rdx,%rax), %rax
movq (%rax), %rdx
movl (%r12), %eax
testl %eax, %eax
movl $0x0, %esi
cmovgl %eax, %esi
cmpq %rcx, %rsi
je 0x5e9c
movq 0x8(%r12), %rdi
cmpq $-0x1, (%rdi,%rcx,8)
jne 0x5e9a
movq %rdx, (%rdi,%rcx,8)
incq %rcx
jmp 0x5e80
movl %ecx, %esi
movl %esi, %ecx
cltq
cmpq %rax, %rcx
jge 0x5ebf
movq 0x8(%r12), %rdx
cmpq $-0x1, (%rdx,%rcx,8)
jne 0x5eba
movq -0x8(%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
incq %rcx
jmp 0x5ea0
testq %r15, %r15
je 0x5f67
movl (%r15), %esi
xorl %edi, %edi
pushq $-0x1
popq %r8
pushq $0x7
popq %r9
cmpq %rsi, %rdi
je 0x5f51
movq 0x10(%r15), %rax
movl %edi, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
leal (%rdi,%rdi), %ecx
shrl %cl, %eax
testb $0x3, %al
jne 0x5f4c
movq 0x18(%r15), %rax
movl (%rax,%rdi,4), %r10d
cmpl 0xc(%r14), %r10d
jae 0x5f19
movq 0x8(%r12), %r11
movl 0x8(%r14), %r13d
xorl %ecx, %ecx
movl %r10d, %eax
testl %eax, %eax
je 0x5f1d
decl %eax
sarl $0x3, %eax
addl $0x3, %ecx
jmp 0x5f0b
xorl %eax, %eax
jmp 0x5f3f
movl %r8d, %eax
shll %cl, %eax
notl %eax
xorl %edx, %edx
divl %r9d
subl %eax, %r10d
leal (%r13,%r13,2), %eax
subl %ecx, %eax
movl %eax, %ecx
shll %cl, %r10d
movslq %r10d, %rax
movq (%r11,%rax,8), %rax
movq 0x20(%r15), %rcx
imulq $0x18, %rdi, %rdx
movq %rax, 0x8(%rcx,%rdx)
incq %rdi
jmp 0x5ed5
testl %ebx, %ebx
je 0x5f67
movq 0x8(%r12), %rdi
callq 0x2050
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/DReichLab[P]adna/hts.c
// Function: hts_idx_destroy
void hts_idx_destroy(hts_idx_t *idx)
{
	khint_t k;
	int i;
	if (idx == 0) return;
	for (i = 0; i < idx->m; ++i) {
		bidx_t *bidx = idx->bidx[i];
		free(idx->lidx[i].offset);
		if (bidx == 0) continue;
		for (k = kh_begin(bidx); k != kh_end(bidx); ++k)
			if (kh_exist(bidx, k))
				free(kh_value(bidx, k).list);
		kh_destroy(bin, bidx);
	}
	free(idx->bidx); free(idx->lidx); free(idx->meta);
	free(idx);
}

// Assembly:
testq %rdi, %rdi
je 0x6448
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x18(%rbx), %rax
movq 0x28(%rbx), %rdi
cmpq %rax, %r15
jge 0x6421
movq (%rdi,%r15,8), %r14
movq 0x30(%rbx), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdi
callq 0x2050
testq %r14, %r14
je 0x6419
xorl %ebp, %ebp
xorl %r12d, %r12d
cmpl (%r14), %r12d
je 0x63f6
movq 0x10(%r14), %rax
movl %r12d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %ebp, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x63ee
movq 0x20(%r14), %rax
movl %r12d, %ecx
imulq $0x18, %rcx, %rcx
movq 0x10(%rax,%rcx), %rdi
callq 0x2050
incl %r12d
addl $0x2, %ebp
jmp 0x63bc
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x10(%r14), %rdi
callq 0x2050
movq 0x20(%r14), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
incq %r15
jmp 0x6388
callq 0x2050
movq 0x30(%rbx), %rdi
callq 0x2050
movq 0x38(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2050
retq