LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x21b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xb9(%rip), %rcx        # 0x4ff0
leaq -0x28(%rbp), %r8
callq 0x8f00
cmpl $0x0, %eax
je 0x4f7e
jmp 0x4f47
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4f6c
leaq 0xb71f(%rip), %rdi      # 0x10677
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4f7a
leaq 0xb704(%rip), %rdi      # 0x10677
movb $0x0, %al
callq 0x4490
jmp 0x4f7c
jmp 0x4fda
leaq -0x28(%rbp), %rdi
addq $0x4, %rdi
callq 0x5580
cmpl $0x0, %eax
je 0x4fc9
jmp 0x4f92
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4fb7
leaq 0xb6a0(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4fc5
leaq 0xb685(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4490
jmp 0x4fc7
jmp 0x4fda
cmpl $0x0, -0x28(%rbp)
je 0x4fd1
jmp 0x4fda
movl $0x0, -0x4(%rbp)
jmp 0x4fe1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: callback_done
static int
callback_done(void * cookie, int failed)
{
	struct donecookie * C = cookie;

	C->failed = failed;
	C->done = 1;

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x21b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0xcd(%rip), %rdx        # 0x5120
leaq -0x30(%rbp), %rcx
callq 0x9a70
cmpl $0x0, %eax
je 0x509a
jmp 0x5063
callq 0x20a0
cmpl $0x0, (%rax)
je 0x5088
leaq 0xb61b(%rip), %rdi      # 0x1068f
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x5096
leaq 0xb600(%rip), %rdi      # 0x1068f
movb $0x0, %al
callq 0x4490
jmp 0x5098
jmp 0x5101
leaq -0x30(%rbp), %rdi
addq $0x4, %rdi
callq 0x5580
cmpl $0x0, %eax
je 0x50e5
jmp 0x50ae
callq 0x20a0
cmpl $0x0, (%rax)
je 0x50d3
leaq 0xb584(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x50e1
leaq 0xb569(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4490
jmp 0x50e3
jmp 0x5101
cmpl $0x0, -0x30(%rbp)
je 0x50ed
jmp 0x5101
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x5108
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: callback_get
static int
callback_get(void * cookie, int failed, struct kvldskey * value)
{
	struct getcookie * C = cookie;

	C->failed = failed;
	C->done = 1;

	/* Save the value passed by the GET request. */
	C->value = value;

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x21b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x19f(%rip), %rdx      # 0x4ff0
leaq -0x20(%rbp), %rcx
callq 0x97e0
cmpl $0x0, %eax
je 0x51d6
jmp 0x519f
callq 0x20a0
cmpl $0x0, (%rax)
je 0x51c4
leaq 0xb4f7(%rip), %rdi      # 0x106a7
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x51d2
leaq 0xb4dc(%rip), %rdi      # 0x106a7
movb $0x0, %al
callq 0x4490
jmp 0x51d4
jmp 0x5232
leaq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x5580
cmpl $0x0, %eax
je 0x5221
jmp 0x51ea
callq 0x20a0
cmpl $0x0, (%rax)
je 0x520f
leaq 0xb448(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4240
callq 0x20a0
movl $0x0, (%rax)
jmp 0x521d
leaq 0xb42d(%rip), %rdi      # 0x10643
movb $0x0, %al
callq 0x4490
jmp 0x521f
jmp 0x5232
cmpl $0x0, -0x20(%rbp)
je 0x5229
jmp 0x5232
movl $0x0, -0x4(%rbp)
jmp 0x5239
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../lib/util/kvlds.c
// Function: callback_multiset
static int
callback_multiset(void * cookie, int failed)
{
	struct multisetcookie * C = cookie;

	/* This request is no longer in flight. */
	C->inflight -= 1;

	/* Did we fail? */
	if (failed)
		C->failed = 1;

	/* Can we send more requests? */
	if (multiset_send(C))
		goto err0;

	/* Are we finished? */
	if (C->inflight == 0)
		C->done = 1;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x18(%rax)
cmpl $0x0, -0x14(%rbp)
je 0x5288
movq -0x20(%rbp), %rax
movl $0x1, 0x24(%rax)
movq -0x20(%rbp), %rdi
callq 0x4c50
cmpl $0x0, %eax
je 0x5298
jmp 0x52b7
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x52ae
movq -0x20(%rbp), %rax
movl $0x1, 0x28(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x52be
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 0xc72(%rip), %rdi       # 0x20ca
callq 0x1030
leaq 0xc85(%rip), %rdi       # 0x20e9
callq 0x1030
leaq 0xcb7(%rip), %rdi       # 0x2127
callq 0x1030
leaq 0xcea(%rip), %rdi       # 0x2166
callq 0x1030
leaq 0xd2c(%rip), %rdi       # 0x21b4
callq 0x1030
leaq 0xd6a(%rip), %rdi       # 0x21fe
callq 0x1030
leaq 0xdaf(%rip), %rdi       # 0x224f
callq 0x1030
leaq 0xde3(%rip), %rdi       # 0x228f
callq 0x1030
leaq 0xe14(%rip), %rdi       # 0x22cc
callq 0x1030
leaq 0xe57(%rip), %rdi       # 0x231b
callq 0x1030
xorl %edi, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1070
movl 0x10(%rsp), %edi
movq %rsp, %rsi
callq 0x1080
cmpl $0x0, %eax
jne 0x1516
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb9c(%rip), %rdi       # 0x20a4
movb $0x0, %al
callq 0x1060
movb $0x1, 0x17(%rsp)
jmp 0x1527
leaq 0xb92(%rip), %rdi       # 0x20af
callq 0x1090
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1070
movl 0x10(%rsp), %edi
movq %rsp, %rsi
callq 0x1040
cmpl $0x0, %eax
jne 0x1586
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xb2c(%rip), %rdi       # 0x20a4
movb $0x0, %al
callq 0x1060
movb $0x1, 0x17(%rsp)
jmp 0x1597
leaq 0xb2f(%rip), %rdi       # 0x20bc
callq 0x1090
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: main
global int main(int argc, char* argv[]) {
  readcmdline(argv);
  if (lflag)
    printresults(argv);
  else
    printf("OK!\n");
  return 0;
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1250
testb $0x1, 0x2e6e(%rip)      # 0x4094
je 0x1234
movq 0x8(%rsp), %rdi
callq 0x1390
jmp 0x1242
leaq 0xdc9(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: readcmdline(char**)
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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1285
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x12bf
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd53(%rip), %rsi       # 0x2009
callq 0x1590
testb $0x1, %al
jne 0x12c4
callq 0x1460
movb $0x0, 0x2dc9(%rip)      # 0x4094
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x12e5
jmp 0x1350
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq (%rsp), %rdi
leaq 0xd00(%rip), %rsi       # 0x200d
callq 0x1590
testb $0x1, %al
jne 0x1318
jmp 0x1321
movb $0x1, 0x2d75(%rip)      # 0x4094
jmp 0x134b
cmpl $0x0, 0x8(%rsp)
jne 0x1344
movq (%rsp), %rdi
callq 0x10c0
movl %eax, 0x2d61(%rip)      # 0x4098
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1349
callq 0x1460
jmp 0x134b
jmp 0x12cb
cmpl $0x1, 0x8(%rsp)
je 0x135c
callq 0x1460
cmpl $0x1, 0x2d35(%rip)      # 0x4098
jl 0x1371
cmpl $0x201, 0x2d29(%rip)    # imm = 0x201
jle 0x1382
leaq 0xc98(%rip), %rdi       # 0x2010
movl $0x201, %esi            # imm = 0x201
callq 0x14b0
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: printresults(char**)
static void printresults(char* argv[]) {
  int i;
  printcmdline(argv);
  printf("G  = %d\n", numcoeffs);
  printf("NZ = %d\n", numcoeffs - 1);
  for (i = 0; i < numcoeffs; i++)
    printf("1\n");
  printf("NP = %d\n", numcoeffs - 1);
  for (i = 0; i < numcoeffs - 1; i++)
    printf("0\n");
  printf("-1\n");
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1510
movl 0x2cef(%rip), %esi      # 0x4098
leaq 0xce9(%rip), %rdi       # 0x2099
movb $0x0, %al
callq 0x1030
movl 0x2cdb(%rip), %esi      # 0x4098
subl $0x1, %esi
leaq 0xcdb(%rip), %rdi       # 0x20a2
movb $0x0, %al
callq 0x1030
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x2cb8(%rip), %eax      # 0x4098
jge 0x13fd
leaq 0xccf(%rip), %rdi       # 0x20b8
movb $0x0, %al
callq 0x1030
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x13d6
movl 0x2c95(%rip), %esi      # 0x4098
subl $0x1, %esi
leaq 0xc9e(%rip), %rdi       # 0x20ab
movb $0x0, %al
callq 0x1030
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0x2c72(%rip), %ecx      # 0x4098
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x1448
leaq 0xc80(%rip), %rdi       # 0x20b4
movb $0x0, %al
callq 0x1030
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x141c
leaq 0xc68(%rip), %rdi       # 0x20b7
movb $0x0, %al
callq 0x1030
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: giveup(char const*, int)
static void giveup(const char* msg, int p1) {
  fprintf(stderr, "mkaverage: ");
  fprintf(stderr, msg, p1);
  putc('\n', stderr);
  exit(1);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x2b1c(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
leaq 0xbbf(%rip), %rsi       # 0x208d
movb $0x0, %al
callq 0x10b0
movq 0x2b04(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edx
movb $0x0, %al
callq 0x10b0
movq 0x2aea(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x10f0
movl $0x1, %edi
callq 0x1080
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/randyrossi[P]fisher-modem/mkfilter/src/mkaverage.C
// Function: printcmdline(char**)
static void printcmdline(char* argv[]) {
  int k = 0;
  until(argv[k] == NULL) {
    if (k > 0)
      putchar(' ');
    fputs(argv[k++], stdout);
  }
  putchar('\n');
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x153b
jmp 0x1576
cmpl $0x0, 0xc(%rsp)
jle 0x154c
movl $0x20, %edi
callq 0x1090
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq 0x2a5c(%rip), %rax      # 0x3fc8
movq (%rax), %rsi
callq 0x1070
jmp 0x1521
movl $0xa, %edi
callq 0x1090
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
movsd %xmm0, 0x68(%rsp)
movsd %xmm1, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
leaq 0x78(%rsp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x1ad0
movl 0x5c(%rsp), %eax
movl %eax, 0x58(%rsp)
cmpl $0x0, 0x58(%rsp)
jl 0x1835
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
callq 0x1a30
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x40(%rsp)
movq 0x60(%rsp), %rax
movslq 0x58(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
callq 0x1b60
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x58(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x1764
movsd 0x78(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
addq $0x88, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 $0x48, %rsp
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x1aa0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm1
addsd 0x28(%rsp), %xmm1
movsd 0x821(%rip), %xmm0      # 0x20c0
mulsd %xmm1, %xmm0
callq 0x1920
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm1
subsd 0x28(%rsp), %xmm1
movsd 0x7fe(%rip), %xmm0      # 0x20c0
mulsd %xmm1, %xmm0
callq 0x1920
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
leaq 0x38(%rsp), %rdi
callq 0x1ad0
xorps %xmm0, %xmm0
ucomisd 0x30(%rsp), %xmm0
jbe 0x190c
movsd 0x40(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/stack.c
// Function: new_stack8
stack8
new_stack8()
{
	stack8 st = NULL;

	st = malloc(sizeof(struct s_stack8));
	if (NULL == st)
		return NULL;
	st->st = NULL;
	return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x10(%rbp)
movl $0x8, %edi
callq 0x10a0
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x11f0
movq $0x0, -0x8(%rbp)
jmp 0x1203
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x10, %edi
callq 0x10a0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x123d
callq 0x1040
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/stack.c
// Function: pop8
uint8_t
pop8(stack8 st)
{
	uint8_t	val;
	struct node8 *node;

	if (NULL == st->st)
		abort();

	node = st->st;
	st->st = st->st->next;

	val = node->val;
	free(node);
	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x128c
callq 0x1040
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
movb -0x9(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1330
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x1030
jmp 0x1304
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl $0x10, %edi
callq 0x10a0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x13be
callq 0x1040
movw -0xa(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/stack.c
// Function: pop16
uint16_t
pop16(stack16 st)
{
	uint16_t	val;
	struct node16 *node;

	if (NULL == st->st)
		abort();

	node = st->st;
	st->st = st->st->next;

	val = node->val;
	free(node);
	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x140c
callq 0x1040
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movw (%rax), %ax
movw %ax, -0xa(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1030
movw -0xa(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x14b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x1030
jmp 0x1484
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x10(%rbp)
movl $0x18, %edi
callq 0x10a0
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x14f0
movq $0x0, -0x8(%rbp)
jmp 0x154b
callq 0x1340
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
callq 0x11c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x10(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
je 0x1530
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rcx), %rax
jne 0x1543
movq -0x10(%rbp), %rdi
callq 0x1560
movq $0x0, -0x8(%rbp)
jmp 0x154b
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x15aa
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1589
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1470
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x15a1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x12f0
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/vm.c
// Function: eval
static int
eval(machine vm)
{
	uint16_t a, b;
	uint8_t	oper;

	b = pop16(vm->vals);
	a = pop16(vm->vals);
	oper = pop8(vm->opers);

	switch (oper) {
	case INSTR_ADD:
		push16(vm->vals, a + b);
		break;
	case INSTR_SUB:
		push16(vm->vals, a - b);
		break;
	case INSTR_MUL:
		push16(vm->vals, a * b);
		break;
	case INSTR_DIV:
		push16(vm->vals, a / b);
		break;
	default:
		abort(); /* illegal instruction trap ;) */
	}
	return VM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x13f0
movw %ax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x13f0
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1270
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0x1863
movq -0x18(%rbp), %rax
leaq 0x834(%rip), %rcx       # 0x2020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
addl %ecx, %eax
movzwl %ax, %esi
callq 0x1390
jmp 0x1868
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
subl %ecx, %eax
movzwl %ax, %esi
callq 0x1390
jmp 0x1868
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
imull %ecx, %eax
movzwl %ax, %esi
callq 0x1390
jmp 0x1868
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
cltd
idivl %ecx
movzwl %ax, %esi
callq 0x1390
jmp 0x1868
callq 0x1040
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
jne 0x18dc
movw $0x0, -0x2(%rbp)
jmp 0x1930
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq (%rcx), %rax
jne 0x18ef
movw $0x0, -0x2(%rbp)
jmp 0x1930
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1450
cmpl $0x0, %eax
je 0x1908
movw $0x0, -0x2(%rbp)
jmp 0x1930
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x13f0
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movzwl -0x12(%rbp), %esi
callq 0x1390
movw -0x12(%rbp), %ax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kisom[P]kam/kamvm.c
// Function: run
static int
run(const char *filespec)
{
	struct stat	 st;
	int		 status = EXIT_FAILURE;
	machine		 vm = NULL;
	FILE		*bin = NULL;
	uint8_t		*prog = NULL;

	if (-1 == stat(filespec, &st))
		goto exit;

	printf("Loading %lu byte program.\n", st.st_size);
	prog = malloc(st.st_size);
	if (NULL == prog)
		goto exit;

	if (NULL == (bin = fopen(filespec, "rb")))
		goto exit;

	if (st.st_size != (off_t)fread(prog, sizeof(uint8_t), st.st_size, bin))
		goto exit;

	vm = vm_new();
	if (NULL == vm)
		goto exit;

	printf("Starting VM.\n");
	if (VM_ERR == vm_run(vm, prog, st.st_size))
		goto exit;

	printf("> %d\n", vm_peek(vm));
	printf("OK\n");
	status = EXIT_SUCCESS;

exit:
	if (prog)
		free(prog);
	if (vm)
		vm_destroy(vm);
	if (bin)
		fclose(bin);
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, -0x9c(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x1090
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x1a0a
jmp 0x1b1d
movq -0x68(%rbp), %rsi
leaq 0x6bb(%rip), %rdi       # 0x20d0
movb $0x0, %al
callq 0x1070
movq -0x68(%rbp), %rdi
callq 0x10a0
movq %rax, -0xb8(%rbp)
xorl %eax, %eax
cmpq -0xb8(%rbp), %rax
jne 0x1a3c
jmp 0x1b1d
movq -0x8(%rbp), %rdi
leaq 0x6a4(%rip), %rsi       # 0x20eb
callq 0x10b0
movq %rax, %rcx
movq %rcx, -0xb0(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1a62
jmp 0x1b1d
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
movq -0x68(%rbp), %rdx
movq -0xb0(%rbp), %rcx
movl $0x1, %esi
callq 0x1050
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
je 0x1a9d
jmp 0x1b1d
callq 0x14c0
movq %rax, -0xa8(%rbp)
xorl %eax, %eax
cmpq -0xa8(%rbp), %rax
jne 0x1ab6
jmp 0x1b1d
leaq 0x631(%rip), %rdi       # 0x20ee
movb $0x0, %al
callq 0x1070
movq -0xa8(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0x68(%rbp), %rax
movzwl %ax, %edx
callq 0x1880
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1ae8
jmp 0x1b1d
movq -0xa8(%rbp), %rdi
callq 0x18c0
movzwl %ax, %esi
leaq 0x5fe(%rip), %rdi       # 0x20fc
movb $0x0, %al
callq 0x1070
leaq 0x5f6(%rip), %rdi       # 0x2102
movb $0x0, %al
callq 0x1070
movl $0x0, -0x9c(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0x1b33
movq -0xb8(%rbp), %rdi
callq 0x1030
cmpq $0x0, -0xa8(%rbp)
je 0x1b49
movq -0xa8(%rbp), %rdi
callq 0x1560
cmpq $0x0, -0xb0(%rbp)
je 0x1b5f
movq -0xb0(%rbp), %rdi
callq 0x1060
movl -0x9c(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/bgzf.c
// Function: inflate_block
static int inflate_block(BGZF* fp, int block_length)
{
	z_stream zs;
	zs.zalloc = NULL;
	zs.zfree = NULL;
	zs.next_in = (Bytef*)fp->compressed_block + 18;
	zs.avail_in = block_length - 16;
	zs.next_out = (Bytef*)fp->uncompressed_block;
	zs.avail_out = BGZF_MAX_BLOCK_SIZE;

	if (inflateInit2(&zs, -15) != Z_OK) {
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	if (inflate(&zs, Z_FINISH) != Z_STREAM_END) {
		inflateEnd(&zs);
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	if (inflateEnd(&zs) != Z_OK) {
		fp->errcode |= BGZF_ERR_ZLIB;
		return -1;
	}
	return zs.total_out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x12, %rax
movq %rax, -0x88(%rbp)
movl -0x14(%rbp), %eax
subl $0x10, %eax
movl %eax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movl $0x10000, -0x68(%rbp)   # imm = 0x10000
leaq -0x88(%rbp), %rdi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
leaq 0xe3b4(%rip), %rdx      # 0x13278
movl $0x70, %ecx
callq 0x2370
cmpl $0x0, %eax
je 0x4f00
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4f8e
leaq -0x88(%rbp), %rdi
movl $0x4, %esi
callq 0x20b0
cmpl $0x1, %eax
je 0x4f4c
leaq -0x88(%rbp), %rdi
callq 0x2260
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4f8e
leaq -0x88(%rbp), %rdi
callq 0x2260
cmpl $0x0, %eax
je 0x4f87
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x1, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4f8e
movq -0x60(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
jne 0x5409
movl $0x0, -0x4(%rbp)
jmp 0x54c4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x5425
movq -0x10(%rbp), %rdi
callq 0x54d0
movl %eax, -0x4(%rbp)
jmp 0x54c4
jmp 0x5427
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x54bd
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0x5680
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x5457
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x54c4
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x14(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
callq 0x23d0
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
je 0x54a8
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x4, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x54c4
movslq -0x14(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x5427
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/bgzf.c
// Function: bgzf_flush_try
int bgzf_flush_try(BGZF *fp, ssize_t size)
{
	if (fp->block_offset + size > BGZF_BLOCK_SIZE) {
#ifdef BGZF_MT
		if (fp->mt) return mt_lazy_flush(fp);
		else return bgzf_flush(fp);
#else
		return bgzf_flush(fp);
#endif
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq -0x18(%rbp), %rax
cmpq $0xff00, %rax           # imm = 0xFF00
jle 0x575b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x574d
movq -0x10(%rbp), %rdi
callq 0x5770
movl %eax, -0x4(%rbp)
jmp 0x5762
movq -0x10(%rbp), %rdi
callq 0x53e0
movl %eax, -0x4(%rbp)
jmp 0x5762
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0xff00, -0x2c(%rbp)    # imm = 0xFF00
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
je 0x580d
jmp 0x582c
leaq 0xda25(%rip), %rdi      # 0x13239
leaq 0xd98a(%rip), %rsi      # 0x131a5
movl $0x23d, %edx            # imm = 0x23D
leaq 0xda1f(%rip), %rcx      # 0x13246
callq 0x2180
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x5851
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5930
movq %rax, -0x8(%rbp)
jmp 0x591d
jmp 0x5853
movslq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x5915
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cltq
movq -0x20(%rbp), %rcx
movslq -0x30(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jge 0x589b
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cltq
movq %rax, -0x48(%rbp)
jmp 0x58aa
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x2250
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0x2c(%rbp), %eax
jne 0x5910
movq -0x10(%rbp), %rdi
callq 0x53e0
cmpl $0x0, %eax
je 0x5910
jmp 0x5915
jmp 0x5853
movslq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DReichLab[P]adna/bgzf.c
// Function: mt_write
static ssize_t mt_write(BGZF *fp, const void *data, ssize_t length)
{
	const uint8_t *input = (const uint8_t*)data;
	ssize_t rest = length;
	while (rest) {
		int copy_length = BGZF_BLOCK_SIZE - fp->block_offset < rest? BGZF_BLOCK_SIZE - fp->block_offset : rest;
		memcpy((uint8_t*)fp->uncompressed_block + fp->block_offset, input, copy_length);
		fp->block_offset += copy_length; input += copy_length; rest -= copy_length;
		if (fp->block_offset == BGZF_BLOCK_SIZE) mt_lazy_flush(fp);
	}
	return length - rest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x59fe
movq -0x8(%rbp), %rcx
movl $0xff00, %eax           # imm = 0xFF00
subl 0xc(%rcx), %eax
cltq
cmpq -0x28(%rbp), %rax
jge 0x5987
movq -0x8(%rbp), %rcx
movl $0xff00, %eax           # imm = 0xFF00
subl 0xc(%rcx), %eax
cltq
movq %rax, -0x38(%rbp)
jmp 0x598f
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x2250
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movslq -0x2c(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0xff00, 0xc(%rax)      # imm = 0xFF00
jne 0x59f9
movq -0x8(%rbp), %rdi
callq 0x5770
jmp 0x5954
movq -0x18(%rbp), %rax
subq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x5a2f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b72
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
je 0x5af7
movq -0x10(%rbp), %rdi
callq 0x53e0
cmpl $0x0, %eax
je 0x5a5e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b72
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
orl $0xfff00000, %ecx       # imm = 0xFFF00000
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5680
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
callq 0x23d0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x22c0
cmpl $0x0, %eax
je 0x5add
movq -0x10(%rbp), %rax
movl (%rax), %edx
shll $0x10, %edx
sarl $0x10, %edx
orl $0x4, %edx
movl (%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b72
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x5af5
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x5b80
jmp 0x5af7
movq -0x10(%rbp), %rax
movl (%rax), %eax
shll $0xe, %eax
sarl $0x1e, %eax
cmpl $0x0, %eax
je 0x5b1a
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2140
movl %eax, -0x1c(%rbp)
jmp 0x5b2a
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2140
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x5b3f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b72
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x10(%rbp), %rdi
callq 0x5cd0
movq -0x10(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x20a0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq $-0x1c, %rsi
movl $0x2, %edx
callq 0x2350
cmpl $0x0, %eax
jge 0x5d44
movl $0x0, -0x4(%rbp)
jmp 0x5d99
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movl $0x1, %esi
movl $0x1c, %edx
callq 0x20e0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x2350
leaq -0x30(%rbp), %rsi
leaq 0xd533(%rip), %rdi      # 0x132b0
movl $0x1c, %edx
callq 0x21e0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x7af8
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x7ae9
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x6820
movq -0x10(%rbp), %rdi
callq 0x2030
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2040
jmp 0x7af6
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2140
jmp 0x7b05
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x5a10
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)