LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/LuaJIT[P]LuaJIT/src/host/buildvm_lib.c
// Function: libdef_uleb128
static uint8_t *libdef_uleb128(uint8_t *p, uint32_t *vv)
{
  uint32_t v = *p++;
  if (v >= 0x80) {
    int sh = 0; v &= 0x7f;
    do { v |= ((*p & 0x7f) << (sh += 7)); } while (*p++ >= 0x80);
  }
  *vv = v;
  return p;
}

// Assembly:
movq %rdi, %rax
movzbl (%rdi), %edx
incq %rax
testb %dl, %dl
jns 0xa189
andl $0x7f, %edx
pushq $0x7
popq %rcx
movzbl (%rax), %edi
movl %edi, %r8d
andl $0x7f, %r8d
shll %cl, %r8d
orl %r8d, %edx
incq %rax
addl $0x7, %ecx
testb %dil, %dil
js 0xa16e
movl %edx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/starius[P]dna-complement/make-int-table.c
// Function: main
int main() {
    initializeTranslate();
    unsigned x, y;
    for (x = 0; x < NCHARS * NCHARS; x++) {
        unsigned int buffer[NCHARS * NCHARS];
        for (y = 0; y < NCHARS * NCHARS; y++) {
            unsigned int in_xy = (x << 16) | y;
            unsigned int out_xy =
                ((unsigned int)(short_translate[x]) << 16) |
                (unsigned int)(short_translate[y]);
            buffer[y] = out_xy;
        }
        fwrite((char*)buffer, 1, sizeof(buffer), stdout);
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40000, %rsp          # imm = 0x40000
callq 0x113c
xorl %r15d, %r15d
leaq 0x2f50(%rip), %r12      # 0x4140
movq 0x2de9(%rip), %r13      # 0x3fe0
movq %rsp, %rbx
pushq $0x1
popq %r14
cmpq $0x10000, %r15          # imm = 0x10000
je 0x1243
movzwl (%r12,%r15,2), %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpq $0x20000, %rcx          # imm = 0x20000
je 0x122a
movzwl (%rcx,%r12), %edx
orl %eax, %edx
movl %edx, (%rsp,%rcx,2)
addq $0x2, %rcx
jmp 0x1211
movq (%r13), %rcx
movl $0x40000, %edx          # imm = 0x40000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030
incq %r15
jmp 0x11fe
xorl %eax, %eax
addq $0x40000, %rsp          # imm = 0x40000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_06/reopen.c
// Function: main
int main(void)
{
	int mode;
	FILE *fp;

	mode = fwide(stdout, 0);
	wprintf(L"by default stdout has mode=%d\n", mode);
	mode = fwide(stdout, 0);
	wprintf(L"now stdout has mode=%d\n", mode);

	fp = freopen(NULL, "a+", stdout);
	if (!fp) {
		perror("freopen");
		return -1;
	}

	mode = fwide(stdout, 0);
	wprintf(L"after freopen() stdout has mode=%d\n", mode);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2e69(%rip), %r14      # 0x3fe0
movq (%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1050
leaq 0xe7a(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1050
leaq 0xedc(%rip), %rdi       # 0x2080
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdx
leaq 0xfb9(%rip), %rsi       # 0x2170
xorl %edi, %edi
callq 0x1030
testq %rax, %rax
je 0x11e7
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1050
leaq 0xf0c(%rip), %rdi       # 0x20e0
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xf85(%rip), %rdi       # 0x2173
callq 0x1060
pushq $-0x1
popq %rbx
jmp 0x11dd
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dispatch_init
struct dispatch_state *
dispatch_init(const int * socks, size_t nsocks,
    struct wire_requestqueue * Q, size_t maxconn)
{
	struct dispatch_state * dstate;
	size_t i;

	/* Bake a cookie. */
	if ((dstate = malloc(sizeof(struct dispatch_state))) == NULL)
		goto err0;
	dstate->nsock_listen = nsocks;
	dstate->sock_active = NULL;
	dstate->nsock_active = 0;
	dstate->nsock_active_max = maxconn;
	dstate->Q = Q;
	dstate->failed = 0;

	/* Allocate an array of listeners. */
	if ((dstate->sock_listen =
	    malloc(nsocks * sizeof(struct sock_listen))) == NULL)
		goto err1;
	for (i = 0; i < nsocks; i++) {
		dstate->sock_listen[i].dstate = dstate;
		dstate->sock_listen[i].s = socks[i];
		dstate->sock_listen[i].accept_cookie = NULL;
	}

	/* Start accepting connections. */
	if (accept_start(dstate))
		goto err2;

	/* Success! */
	return (dstate);

err2:
	free(dstate->sock_listen);
err1:
	free(dstate);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
pushq $0x38
popq %rdi
callq 0x2270
testq %rax, %rax
je 0x2e44
movq %rax, %rbx
movq %r14, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r13, 0x20(%rax)
movq %r12, 0x28(%rax)
andl $0x0, 0x30(%rax)
imulq $0x18, %r14, %rdi
callq 0x2270
movq %rax, (%rbx)
testq %rax, %rax
je 0x2e3c
addq $0x10, %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x2e28
movq %rbx, -0x10(%rax)
movl (%r15,%rcx,4), %edx
movl %edx, -0x8(%rax)
andq $0x0, (%rax)
incq %rcx
addq $0x18, %rax
jmp 0x2e0b
movq %rbx, %rdi
callq 0x2e53
testl %eax, %eax
je 0x2e46
movq (%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: accept_start
static int
accept_start(struct dispatch_state * dstate)
{
	struct sock_listen * L;
	size_t i;

	/* Make sure we don't have any in-progress accepts. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if (L->accept_cookie != NULL) {
			warn0("Already trying to accept a connection!");
			goto err0;
		}
	}

	/* Try to accept connections. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if ((L->accept_cookie =
		    network_accept(L->s, callback_gotconn, L)) == NULL)
			goto err1;
	}

	/* Success! */
	return (0);

err1:
	/* Cancel the accepts we started. */
	accept_stop(dstate);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
incq %rax
pushq $0x10
popq %rcx
decq %rax
je 0x2e96
movq (%rbx), %rdx
cmpq $0x0, (%rdx,%rcx)
leaq 0x18(%rcx), %rcx
je 0x2e6b
leaq 0x7438(%rip), %rdi      # 0xa2bd
xorl %eax, %eax
callq 0x7c8c
callq 0x20a0
andl $0x0, (%rax)
jmp 0x2eda
pushq $-0x1
popq %r12
leaq 0xea(%rip), %r15        # 0x2f8b
xorl %r13d, %r13d
incq %r12
cmpq 0x8(%rbx), %r12
jae 0x2edf
leaq 0x18(%r13), %rbp
movq (%rbx), %r14
leaq (%r14,%r13), %rdx
movl 0x8(%r14,%r13), %edi
movq %r15, %rsi
callq 0x53b8
movq %rax, 0x10(%r14,%r13)
movq %rbp, %r13
testq %rax, %rax
jne 0x2ea4
movq %rbx, %rdi
callq 0x3150
pushq $-0x1
popq %rax
jmp 0x2ee1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dispatch_done
void
dispatch_done(struct dispatch_state * dstate)
{

	/* Sanity-check. */
	assert(dstate->failed == 1);
	assert(dstate->sock_active == NULL);
	assert(dstate->nsock_active == 0);

	/* Free memory. */
	free(dstate->sock_listen);
	free(dstate);
}

// Assembly:
pushq %rbx
cmpl $0x1, 0x30(%rdi)
jne 0x2f2e
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
jne 0x2f4d
cmpq $0x0, 0x18(%rbx)
jne 0x2f6c
movq (%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
leaq 0x7307(%rip), %rdi      # 0xa23c
leaq 0x7314(%rip), %rsi      # 0xa250
leaq 0x7318(%rip), %rcx      # 0xa25b
movl $0x20e, %edx            # imm = 0x20E
callq 0x21a0
leaq 0x7333(%rip), %rdi      # 0xa287
leaq 0x72f5(%rip), %rsi      # 0xa250
leaq 0x72f9(%rip), %rcx      # 0xa25b
movl $0x20f, %edx            # imm = 0x20F
callq 0x21a0
leaq 0x7330(%rip), %rdi      # 0xa2a3
leaq 0x72d6(%rip), %rsi      # 0xa250
leaq 0x72da(%rip), %rcx      # 0xa25b
movl $0x210, %edx            # imm = 0x210
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: mpool_forwardee_free
static void
accept_stop(struct dispatch_state * dstate)
{
	struct sock_listen * L;
	size_t i;

	/* Iterate through the sockets, cancelling any accepts. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if (L->accept_cookie != NULL) {
			network_accept_cancel(L->accept_cookie);
			L->accept_cookie = NULL;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3684
movq %rdi, %rbx
movq 0xcc43(%rip), %r12      # 0x10200
movq 0xcc44(%rip), %r13      # 0x10208
cmpq %r13, %r12
jae 0x35e5
movq 0xcc40(%rip), %rax      # 0x10210
leaq 0x1(%r12), %rcx
movq %rcx, 0xcc24(%rip)      # 0x10200
movq %rbx, (%rax,%r12,8)
jmp 0x3684
movq 0xcc2c(%rip), %rax      # 0x10218
shrq $0x8, %rax
cmpq %rax, 0xcc29(%rip)      # 0x10220
jbe 0x3672
testq %r13, %r13
je 0x368e
movq %r13, %rdi
shlq $0x4, %rdi
callq 0x2270
testq %rax, %rax
je 0x3672
movq %rax, %r14
movq 0xcbf3(%rip), %r15      # 0x10210
leaq (,%r13,8), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2250
cmpq 0xcbf9(%rip), %r15      # 0x10230
je 0x364f
movq %r15, %rdi
callq 0x2040
movq 0xcbc0(%rip), %r13      # 0x10208
movq 0xcbb1(%rip), %r12      # 0x10200
movq %r14, 0xcbba(%rip)      # 0x10210
addq %r13, %r13
movq %r13, 0xcba8(%rip)      # 0x10208
leaq 0x1(%r12), %rax
movq %rax, 0xcb94(%rip)      # 0x10200
movq %rbx, (%r14,%r12,8)
jmp 0x367a
movq %rbx, %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0xcb94(%rip)     # 0x10218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6d2d(%rip), %rdi      # 0xa3c2
leaq 0x6d37(%rip), %rsi      # 0xa3d3
leaq 0x6d52(%rip), %rcx      # 0xa3f5
pushq $0x5a
popq %rdx
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: readreq
static int
readreq(struct sock_active * S)
{

	/* We shouldn't be waiting yet. */
	assert(S->read_cookie == NULL);

	/* Wait for request packets to arrive. */
	if ((S->read_cookie =
	    wire_readpacket_wait(S->readq, callback_gotrequests, S)) == NULL) {
		warnp("Error waiting for requests to arrive");
		goto err0;
	}

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x31f2
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
leaq 0x68(%rip), %rsi        # 0x3211
movq %rbx, %rdx
callq 0x7f41
movq %rax, %rcx
movq %rax, 0x30(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x31f0
callq 0x20a0
cmpl $0x0, (%rax)
je 0x31df
movq %rax, %rbx
leaq 0x71ca(%rip), %rdi      # 0xa39d
xorl %eax, %eax
callq 0x7afd
andl $0x0, (%rbx)
jmp 0x31ed
leaq 0x71b7(%rip), %rdi      # 0xa39d
xorl %eax, %eax
callq 0x7c8c
pushq $-0x1
popq %rax
popq %rbx
retq
leaq 0x716b(%rip), %rdi      # 0xa364
leaq 0x7050(%rip), %rsi      # 0xa250
leaq 0x7174(%rip), %rcx      # 0xa37b
movl $0xd5, %edx
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: callback_gotrequests
static int
callback_gotrequests(void * cookie, int status)
{
	struct sock_active * S = cookie;
	struct dispatch_state * dstate = S->dstate;
	struct wire_packet P;
	struct forwardee * F;

	/* We're not waiting for a packet to be available any more. */
	S->read_cookie = NULL;

	/* If the wait failed, the connection is dying. */
	if (status)
		goto fail;

	/* Handle packets until there are no more or we encounter an error. */
	do {
		/* Grab a packet. */
		if (wire_readpacket_peek(S->readq, &P))
			goto fail;

		/* Exit the loop if no packet is available. */
		if (P.buf == NULL)
			break;

		/* Bake a cookie. */
		if ((F = mpool_forwardee_malloc()) == NULL)
			goto err0;
		F->ID = P.ID;
		F->conn = S;

		/* Send the request to the target. */
		if (wire_requestqueue_add(dstate->Q, P.buf, P.len,
		    callback_gotresponse, F))
			goto err1;

		/* We have an additional outstanding request. */
		S->nrequests++;

		/* Consume the packet. */
		wire_readpacket_consume(S->readq, &P);
	} while (1);

	/* Wait for more packets to arrive. */
	if (readreq(S))
		goto err0;

	/* Success! */
	return (0);

fail:
	/* If we have no requests in progress, drop the connection. */
	if (S->nrequests == 0) {
		if (dropconn(S))
			goto err0;
	}

	/* Return success; the connection will be reaped later. */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rbp
andq $0x0, 0x30(%rdi)
testl %esi, %esi
je 0x3250
xorl %ebp, %ebp
cmpq $0x0, 0x38(%rbx)
jne 0x3335
movq %rbx, %rdi
callq 0x3404
testl %eax, %eax
jne 0x3332
jmp 0x3335
movq %rsp, %r14
pushq $0x10
popq %r15
leaq 0xe8(%rip), %r12        # 0x3346
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x7e10
testl %eax, %eax
jne 0x322e
cmpq $0x0, 0x10(%rsp)
je 0x331a
incq 0xcf97(%rip)            # 0x10218
movq 0xcf78(%rip), %rax      # 0x10200
testq %rax, %rax
je 0x32a6
movq 0xcf7c(%rip), %rcx      # 0x10210
leaq -0x1(%rax), %rdx
movq %rdx, 0xcf61(%rip)      # 0x10200
movq -0x8(%rcx,%rax,8), %r13
jmp 0x32d7
incq 0xcf73(%rip)            # 0x10220
cmpl $0x0, 0xcf74(%rip)      # 0x10228
jne 0x32cc
movq 0xcf7b(%rip), %rdi      # 0x10238
callq 0x9750
movl $0x1, 0xcf5c(%rip)      # 0x10228
movq %r15, %rdi
callq 0x2270
movq %rax, %r13
testq %r13, %r13
je 0x3332
movq (%rsp), %rax
movq %rax, 0x8(%r13)
movq %rbx, (%r13)
movq 0x28(%rbp), %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0x86e5
testl %eax, %eax
jne 0x332a
incq 0x38(%rbx)
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x81d0
jmp 0x325e
movq %rbx, %rdi
callq 0x3193
testl %eax, %eax
jne 0x3332
xorl %ebp, %ebp
jmp 0x3335
movq %r13, %rdi
callq 0x2040
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: callback_gotresponse
static int
callback_gotresponse(void * cookie, uint8_t * buf, size_t buflen)
{
	struct forwardee * F = cookie;
	struct sock_active * S = F->conn;
	struct sock_active * S_next;
	struct dispatch_state * dstate = S->dstate;
	struct wire_packet P;

	/* Did this request fail? */
	if (buf == NULL)
		goto failed;

	/* Send the response back to the client. */
	P.ID = F->ID;
	P.buf = buf;
	P.len = buflen;
	if (wire_writepacket(S->writeq, &P))
		goto err1;

	/* Free the cookie. */
	mpool_forwardee_free(F);

	/* We've finished with a request. */
	if (reqdone(S))
		goto err0;

	/* Success! */
	return (0);

failed:
	/* Free our cookie. */
	mpool_forwardee_free(F);

	/* We've finished with a request. */
	if (reqdone(S))
		goto err0;

	/* Stop trying to accept connections. */
	accept_stop(dstate);

	/* The connection to the upstream server has failed. */
	dstate->failed = 1;

	/* Stop reading requests from connections. */
	for (S = dstate->sock_active; S != NULL; S = S_next) {
		S_next = S->next;
		if ((S->read_cookie != NULL) && readreq_cancel(S))
			goto err0;
	}

	/* The failed request has been successfully handled. */
	return (0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq (%rdi), %rbx
testq %rsi, %rsi
je 0x3397
movq 0x8(%r14), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
movq %rsi, 0x10(%rax)
movq %rdx, 0x8(%rax)
movq 0x28(%rbx), %rdi
movq %rax, %rsi
callq 0x8954
movl %eax, %ebp
movq %r14, %rdi
callq 0x35a1
testl %ebp, %ebp
jne 0x33ae
movq %rbx, %rdi
callq 0x36ab
testl %eax, %eax
jne 0x33ae
xorl %eax, %eax
jmp 0x33b1
movq (%rbx), %r15
movq %r14, %rdi
callq 0x35a1
movq %rbx, %rdi
callq 0x36ab
testl %eax, %eax
je 0x33bc
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x3150
movl $0x1, 0x30(%r15)
movq 0x10(%r15), %r14
testq %r14, %r14
je 0x3393
movq %r14, %rbx
movq 0x8(%r14), %r14
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x33d0
callq 0x80b4
andq $0x0, 0x30(%rbx)
cmpq $0x0, 0x38(%rbx)
jne 0x33d0
movq %rbx, %rdi
callq 0x3404
testl %eax, %eax
je 0x33d0
jmp 0x33ae
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dropconn
static int
dropconn(struct sock_active * S)
{
	struct dispatch_state * dstate = S->dstate;

	/* Sanity check. */
	assert(S->read_cookie == NULL);
	assert(S->nrequests == 0);

	/* Detach from the dispatcher. */
	if (S->prev == NULL)
		dstate->sock_active = S->next;
	else
		S->prev->next = S->next;
	if (S->next != NULL)
		S->next->prev = S->prev;
	if (dstate->nsock_active-- == dstate->nsock_active_max) {
		if (accept_start(dstate))
			goto err2;
	}

	/* Free the buffered reader. */
	netbuf_read_free(S->readq);

	/* Free the buffered writer. */
	netbuf_write_free(S->writeq);

	/* Close the socket. */
	while (close(S->s)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err1;
	}

	/* Free the connection state. */
	free(S);

	/* Success! */
	return (0);

err2:
	netbuf_read_free(S->readq);
	netbuf_write_free(S->writeq);
	if (close(S->s))
		warnp("close");
err1:
	free(S);

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x3516
movq %rdi, %rbx
cmpq $0x0, 0x38(%rdi)
jne 0x3535
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x8(%rcx), %rdx
leaq 0x10(%rdi), %rsi
testq %rcx, %rcx
cmoveq %rsi, %rdx
movq %rax, (%rdx)
testq %rax, %rax
je 0x3447
movq %rcx, 0x10(%rax)
movq 0x18(%rdi), %rax
leaq -0x1(%rax), %rcx
movq %rcx, 0x18(%rdi)
cmpq 0x20(%rdi), %rax
jne 0x34a4
callq 0x2e53
testl %eax, %eax
je 0x34a4
movq 0x20(%rbx), %rdi
callq 0x4e9f
movq 0x28(%rbx), %rdi
callq 0x5254
movl 0x18(%rbx), %edi
callq 0x21c0
pushq $-0x1
popq %rbp
testl %eax, %eax
je 0x34f7
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3506
movq %rax, %r14
leaq 0x77a5(%rip), %rdi      # 0xac3c
xorl %eax, %eax
callq 0x7afd
andl $0x0, (%r14)
jmp 0x34f7
movq 0x20(%rbx), %rdi
callq 0x4e9f
movq 0x28(%rbx), %rdi
callq 0x5254
movl 0x18(%rbx), %edi
callq 0x21c0
testl %eax, %eax
je 0x34e5
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x34b6
leaq 0x7764(%rip), %rdi      # 0xac3c
testl %eax, %eax
jne 0x34e9
xorl %eax, %eax
callq 0x7c8c
jmp 0x34f4
xorl %ebp, %ebp
jmp 0x34f7
xorl %eax, %eax
callq 0x7afd
andl $0x0, (%r14)
pushq $-0x1
popq %rbp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x772f(%rip), %rdi      # 0xac3c
xorl %eax, %eax
callq 0x7c8c
jmp 0x34f7
leaq 0x6e47(%rip), %rdi      # 0xa364
leaq 0x6d2c(%rip), %rsi      # 0xa250
leaq 0x6ef2(%rip), %rcx      # 0xa41d
movl $0x195, %edx            # imm = 0x195
callq 0x21a0
leaq 0x6f04(%rip), %rdi      # 0xa440
leaq 0x6d0d(%rip), %rsi      # 0xa250
leaq 0x6ed3(%rip), %rcx      # 0xa41d
movl $0x196, %edx            # imm = 0x196
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O2/stfwi[P]duktape-cc/build/duktape/mod/ext/app_attachment/././app_attachment.hh
// Function: std::vector<char, std::allocator<char>> sw::util::detail::basic_executable_attachment<void>::serialize<std::vector<char, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
static inline OutContainer serialize(const InContainer& in_data, const char* boundary_mark) // @sw todo: container instead of raw pointer.
    {
      static_assert(std::is_integral<typename InContainer::value_type>::value && std::is_integral<typename OutContainer::value_type>::value, "Container elements have to be integral.");
      static_assert(sizeof(typename InContainer::value_type) == sizeof(typename OutContainer::value_type),"Container elements have to have identical sizes.");
      using element_type = typename OutContainer::value_type;
      auto xo = element_type(0);
      auto out_data = OutContainer();
      out_data.reserve(in_data.size());
      for(size_t i=0; i<in_data.size(); ++i) {
        xo = element_type(xo<<8) | element_type(boundary_mark[i & 0xff]);
        out_data.push_back(element_type(in_data[i] ^ xo));
      }
      return out_data;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x3f06
xorl %r13d, %r13d
leaq -0x29(%rbp), %r12
cmpq 0x8(%r15), %r13
jae 0x407a
movzbl %r13b, %eax
movb (%r14,%rax), %al
movq (%r15), %rcx
xorb (%rcx,%r13), %al
movb %al, -0x29(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4598
incq %r13
jmp 0x4052
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x408e
movq %rax, %r14
movq %rbx, %rdi
callq 0x40f6
movq %r14, %rdi
callq 0x22b0
nop
// File: /workspace/github_c_makefile_star2_O2/carlitosmarin[P]Sistema-Ficheros-SOII/escribir.c
// Function: main
int main (int argc, char **argv) {
	if (argc != 4) {
		printf("Número de parametros incorrectos\n");
		return -1;
	}

	char *camino = argv[2];
    if(camino[strlen(camino)-1] == '/'){
        printf("ERROR: ( %s ) no es un fichero.\n",camino);
        return -1;
    }

	bmount(argv[1]);
	int offset = atoi(argv[3]);

    int bytes = 0;
    char buffer[1000];
    strcpy (buffer, "blablablablablablablablablablabla...\n");

    int nin = 0; //= reservar_inodo ('f', 6);

    int n = strlen(buffer);
    int m = 70;
    int i, offsetActual;
    int er;

   	for(i = 0, offsetActual = offset ; i < m; i++, offsetActual += n){
   		er = mi_write(camino,&buffer,offsetActual,n);
    	if(er < 0) {
            bumount();
    		return 0;
    	}
        bytes += er;
	}

	bumount();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3f0, %rsp            # imm = 0x3F0
cmpl $0x4, %edi
jne 0x3c09
movq %rsi, %r14
movq 0x10(%rsi), %rbx
movq %rbx, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x3c1a
leaq 0x92b(%rip), %rdi       # 0x4528
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
jmp 0x3c15
leaq 0x95f(%rip), %rdi       # 0x456f
callq 0x1060
pushq $-0x1
popq %rbx
jmp 0x3c8d
movq 0x8(%r14), %rdi
callq 0x128c
movq 0x18(%r14), %rdi
callq 0x1150
movl %eax, %ebp
movups 0x924(%rip), %xmm0      # 0x4559
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movups 0x905(%rip), %xmm0      # 0x4549
movaps %xmm0, (%r14)
movabsq $0xa2e2e2e616c62, %rax  # imm = 0xA2E2E2E616C62
movq %rax, 0x1e(%r14)
movq %r14, %rdi
callq 0x1080
movq %rax, %r15
pushq $0x46
popq %r12
subl $0x1, %r12d
jb 0x3c84
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x3a55
testl %eax, %eax
js 0x3c84
addl %r15d, %ebp
jmp 0x3c65
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x12c8
movl %ebx, %eax
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/fanf2[P]luajit-2/src/buildvm.c
// Function: sym_decorate
static const char *sym_decorate(BuildCtx *ctx,
				const char *prefix, const char *suffix)
{
  char name[256];
  char *p;
#if LJ_64
  const char *symprefix = ctx->mode == BUILD_machasm ? "_" : "";
#else
  const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : "";
#endif
  sprintf(name, "%s%s%s", symprefix, prefix, suffix);
  p = strchr(name, '@');
  if (p) {
    if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj))
      name[0] = '@';
    else
      *p = '\0';
  }
  p = (char *)malloc(strlen(name)+1);  /* MSVC doesn't like strdup. */
  strcpy(p, name);
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r8
movq %rsi, %rcx
cmpl $0x2, 0x8(%rdi)
leaq 0x9ef3(%rip), %rax      # 0xfa74
leaq 0x982c(%rip), %rdx      # 0xf3b4
cmoveq %rax, %rdx
leaq 0x8450(%rip), %rsi      # 0xdfe3
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41b0
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x40b0
testq %rax, %rax
je 0x5bb3
movb $0x0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x40a0
leaq 0x1(%rax), %rdi
callq 0x4150
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4060
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/fanf2[P]luajit-2/src/buildvm_asm.c
// Function: emit_asm_label
static void emit_asm_label(BuildCtx *ctx, const char *name, int size, int isfunc)
{
  switch (ctx->mode) {
  case BUILD_elfasm:
    fprintf(ctx->fp,
      "\n\t.globl %s\n"
      "\t.hidden %s\n"
      "\t.type %s, @%s\n"
      "\t.size %s, %d\n"
      "%s:\n",
      name, name, name, isfunc ? "function" : "object", name, size, name);
    break;
  case BUILD_coffasm:
    fprintf(ctx->fp, "\n\t.globl %s\n", name);
    if (isfunc)
      fprintf(ctx->fp, "\t.def %s; .scl 3; .type 32; .endef\n", name);
    fprintf(ctx->fp, "%s:\n", name);
    break;
  case BUILD_machasm:
    fprintf(ctx->fp,
      "\n\t.private_extern %s\n"
      "%s:\n", name, name);
    break;
  default:
    break;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x8438
movl %ecx, %ebp
cmpl $0x1, %eax
je 0x83f1
testl %eax, %eax
jne 0x83ec
movl %edx, %r10d
movq 0x10(%r14), %rdi
testl %ebp, %ebp
leaq 0x7486(%rip), %rax      # 0xf844
leaq 0x7163(%rip), %r9       # 0xf528
cmoveq %rax, %r9
subq $0x8, %rsp
leaq 0x7436(%rip), %rsi      # 0xf80a
movq %rbx, %rdx
movq %rbx, %rcx
movq %rbx, %r8
xorl %eax, %eax
pushq %rbx
pushq %r10
pushq %rbx
callq 0x4130
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%r14), %rdi
leaq 0x744f(%rip), %rsi      # 0xf84b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4130
testl %ebp, %ebp
je 0x841f
movq 0x10(%r14), %rdi
leaq 0x7443(%rip), %rsi      # 0xf858
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4130
movq 0x10(%r14), %rdi
leaq 0x7415(%rip), %rsi      # 0xf83f
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x4130
movq 0x10(%r14), %rdi
leaq 0x7439(%rip), %rsi      # 0xf87c
movq %rbx, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x4130
// File: /workspace/github_c_makefile_star2_O2/fanf2[P]luajit-2/src/buildvm_fold.c
// Function: nexttoken
static uint32_t nexttoken(char **pp, int allowlit, int allowany)
{
  char *p = *pp;
  if (p) {
    uint32_t i;
    char *q = strchr(p, ' ');
    if (q) *q++ = '\0';
    *pp = q;
    if (allowlit && !strncmp(p, "IRFPM_", 6)) {
      for (i = 0; irfpm_names[i]; i++)
	if (!strcmp(irfpm_names[i], p+6))
	  return i;
    } else if (allowlit && !strncmp(p, "IRFL_", 5)) {
      for (i = 0; irfield_names[i]; i++)
	if (!strcmp(irfield_names[i], p+5))
	  return i;
    } else if (allowlit && !strncmp(p, "IRCALL_", 7)) {
      for (i = 0; ircall_names[i]; i++)
	if (!strcmp(ircall_names[i], p+7))
	  return i;
    } else if (allowany && !strcmp("any", p)) {
      return 0xff;
    } else {
      for (i = 0; ir_names[i]; i++)
	if (!strcmp(ir_names[i], p))
	  return i;
    }
    fprintf(stderr, "Error: bad fold definition token \"%s\" at line %d\n", p, lineno);
    exit(1);
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x9b37
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x40b0
testq %rax, %rax
je 0x9b46
movq %rax, %rcx
incq %rcx
movb $0x0, (%rax)
jmp 0x9b48
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
movq %rcx, (%r15)
testl %r14d, %r14d
je 0x9b9a
leaq 0x6364(%rip), %rsi      # 0xfebb
pushq $0x6
popq %rdx
movq %rbx, %rdi
callq 0x4050
testl %eax, %eax
je 0x9be1
leaq 0x6355(%rip), %rsi      # 0xfec2
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x4050
testl %eax, %eax
je 0x9c0d
leaq 0x6341(%rip), %rsi      # 0xfec8
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x4050
testl %eax, %eax
je 0x9c43
testl %ebp, %ebp
je 0x9bb5
leaq 0x632b(%rip), %rdi      # 0xfed0
movq %rbx, %rsi
callq 0x4110
testl %eax, %eax
je 0x9c39
xorl %ebp, %ebp
leaq 0x95a2(%rip), %r14      # 0x13160
movl %ebp, %eax
movq (%r14,%rax,8), %rdi
testq %rdi, %rdi
je 0x9c6f
movq %rbx, %rsi
callq 0x4110
testl %eax, %eax
je 0x9b39
incl %ebp
jmp 0x9bbe
leaq 0x6(%rbx), %r14
xorl %ebp, %ebp
leaq 0x9802(%rip), %r15      # 0x133f0
movl %ebp, %eax
movq (%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x9c6f
movq %r14, %rsi
callq 0x4110
testl %eax, %eax
je 0x9b39
incl %ebp
jmp 0x9bee
leaq 0x5(%rbx), %r14
xorl %ebp, %ebp
leaq 0x9846(%rip), %r15      # 0x13460
movl %ebp, %eax
movq (%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x9c6f
movq %r14, %rsi
callq 0x4110
testl %eax, %eax
je 0x9b39
incl %ebp
jmp 0x9c1a
movl $0xff, %ebp
jmp 0x9b39
leaq 0x7(%rbx), %r14
xorl %ebp, %ebp
leaq 0x9870(%rip), %r15      # 0x134c0
movl %ebp, %eax
movq (%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x9c6f
movq %r14, %rsi
callq 0x4110
testl %eax, %eax
je 0x9b39
incl %ebp
jmp 0x9c50
movq 0xa382(%rip), %rax      # 0x13ff8
movq (%rax), %rdi
movl 0xc611(%rip), %ecx      # 0x16290
leaq 0x624e(%rip), %rsi      # 0xfed4
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4130
pushq $0x1
popq %rdi
callq 0x41c0
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/fcollect.c
// Function: main
int
main(void)
{
    int npes;
    int me;
    int *dst;
    int i;

    shmem_init();
    npes = shmem_n_pes();
    me = shmem_my_pe();

    dst = (int *) shmem_malloc(64);

    for (i = 0; i < 4; i++) {
        dst[i] = 10101;
    }
    src = me + 100;

    printf("%8s: dst[%d/%d] = %d, %d, %d, %d\n",
           "BEFORE", me, npes, dst[0], dst[1], dst[2], dst[3]);

    for (i = 0; i < SHMEM_BCAST_SYNC_SIZE; i += 1) {
        pSync[i] = SHMEM_SYNC_VALUE;
    }
    shmem_barrier_all();

    shmem_fcollect32(dst, &src, 1, 0, 0, npes, pSync);

    shmem_barrier_all();

    /*
     * end state of "dst" = 100, 101, 102, ...
     */

    printf("%8s: dst[%d/%d] = %d, %d, %d, %d\n",
           "AFTER", me, npes, dst[0], dst[1], dst[2], dst[3]);

    shmem_free(dst);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x10a0
callq 0x1040
movl %eax, %ebp
callq 0x1070
movl %eax, %r14d
pushq $0x40
popq %rdi
callq 0x1080
movq %rax, %rbx
xorl %eax, %eax
cmpq $0x4, %rax
je 0x11fa
movl $0x2775, (%rbx,%rax,4)  # imm = 0x2775
incq %rax
jmp 0x11e8
movl %r14d, %eax
addl $0x64, %eax
movl %eax, 0x2e7a(%rip)      # 0x4080
leaq 0x2e73(%rip), %r12      # 0x4080
movl (%rbx), %r8d
movl 0x4(%rbx), %r9d
movl 0x8(%rbx), %r10d
movl 0xc(%rbx), %r11d
leaq 0xde1(%rip), %r15       # 0x2004
leaq 0xdfc(%rip), %rsi       # 0x2026
movq %r15, %rdi
movl %r14d, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1030
addq $0x10, %rsp
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x2e43(%rip)     # 0x4090
leaq 0x2e3c(%rip), %r13      # 0x4090
callq 0x1090
subq $0x8, %rsp
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
pushq %r13
callq 0x1050
popq %rax
popq %rcx
callq 0x1090
movl (%rbx), %r8d
movl 0x4(%rbx), %r9d
movl 0x8(%rbx), %r10d
movl 0xc(%rbx), %r11d
leaq 0xd9b(%rip), %rsi       # 0x202d
movq %r15, %rdi
movl %r14d, %edx
movl %ebp, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1030
popq %rcx
popq %rdx
movq %rbx, %rdi
callq 0x10b0
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_int_atomic_compare_swap.c
// Function: shmem_int_atomic_compare_swap
int shmem_int_atomic_compare_swap( int* ptr, int cond, int val, int pe)
{
	int* remote_ptr = (int*)shmem_ptr((void*)ptr, pe ); 
	long* x = (long*)shmem_ptr((void*)&__shmem.lock_atomic_int, pe);
	__set_spin_lock(x);
	int r = *remote_ptr;
	if (r == cond) *remote_ptr = val;
	__clear_spin_lock(x);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %ebx
movl %esi, %r12d
movl %ecx, %esi
callq 0x1b78
movq %rax, %r14
leaq 0x33e8(%rip), %rdi      # 0x61f0
addq $0x10, %rdi
movl %ebp, %esi
callq 0x1b78
movq %rax, %r15
movq %rax, %rdi
callq 0x30a0
movl (%r14), %ebp
cmpl %r12d, %ebp
jne 0x2e29
movl %ebx, (%r14)
movq %r15, %rdi
callq 0x3090
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/main.c
// Function: getCompleteChecksum
short int getCompleteChecksum(ubx_message ptr_ubx){
  // Algorithme de Fletcher: voir page 86 de u-blox6 receiver description protocol

  unsigned char a, b;
  unsigned short int length = (ptr_ubx.message_length[1]<<8)|ptr_ubx.message_length[0];
  a = 0x00;
  b = 0x00;
  a = b + ptr_ubx.message_class;
  b = b + a;
  a = a + ptr_ubx.message_id;
  b = b + a;
  a = a + ptr_ubx.message_length[0];
  b = b + a;
  a = a + ptr_ubx.message_length[1];
  b = b + a;
  for(int i=0; i<length; i++){
    a = a + ptr_ubx.payload[i];
    b = b + a;
  }
  if(a == ptr_ubx.checksum_A && b == ptr_ubx.checksum_B){
    return 0;

  }else{
    return 1;
  }
  //checksum(ptr_ubx.id[0], ptr_ubx->checksum_A, ptr_ubx->checksum_B);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
movzbl 0x5(%rax), %esi
movzbl 0x4(%rax), %edi
movb 0x2(%rax), %cl
movb 0x3(%rax), %dl
addb %cl, %dl
addb %dl, %cl
addb %dil, %dl
addb %dl, %cl
addb %sil, %dl
shll $0x8, %esi
orq %rdi, %rsi
addb %dl, %cl
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x1328
addb 0x6(%rax,%rdi), %dl
addb %dl, %cl
incq %rdi
jmp 0x1318
xorb 0x3ee(%rax), %dl
xorb 0x3ef(%rax), %cl
xorl %eax, %eax
orb %dl, %cl
setne %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/main.c
// Function: displayHelp
void displayHelp(){
  printf("\nuBlox Lib Version 0.0.1\n\n");
  
  printf("Arguments :\n");
  printf("-h : display this help (optional)\n");
  printf("-i : set input file (mandatory)\n");
  printf("-m : parse a specific message (optional)\n");
  printf("-o : set output file (mandatory)\n");
  printf("-p : plot charts\n");
  printf("-r : generate a report after parsing the ubx file(optional)\n");
  printf("-v : get program version\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1f23(%rip), %rdi      # 0x326b
callq 0x1080
leaq 0x1f31(%rip), %rdi      # 0x3285
callq 0x1080
leaq 0x1f31(%rip), %rdi      # 0x3291
callq 0x1080
leaq 0x1f47(%rip), %rdi      # 0x32b3
callq 0x1080
leaq 0x1f5b(%rip), %rdi      # 0x32d3
callq 0x1080
leaq 0x1f78(%rip), %rdi      # 0x32fc
callq 0x1080
leaq 0x1f8d(%rip), %rdi      # 0x331d
callq 0x1080
leaq 0x1f92(%rip), %rdi      # 0x332e
callq 0x1080
leaq 0x1fc2(%rip), %rdi      # 0x336a
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_init
gnuplot_ctrl * gnuplot_init(void)
{
    gnuplot_ctrl *  handle ;
    int i;

#ifndef WIN32
    if (getenv("DISPLAY") == NULL) {
        fprintf(stderr, "cannot find DISPLAY variable: is it set?\n") ;
    }
#endif // #ifndef WIN32


    /*
     * Structure initialization:
     */
    handle = (gnuplot_ctrl*)malloc(sizeof(gnuplot_ctrl)) ;
    handle->nplots = 0 ;
    gnuplot_setstyle(handle, "points") ;
    handle->ntmp = 0 ;

    handle->gnucmd = popen("gnuplot", "w") ;
    if (handle->gnucmd == NULL) {
        fprintf(stderr, "error starting gnuplot, is gnuplot or gnuplot.exe in your path?\n") ;
        free(handle) ;
        return NULL ;
    }

    for (i=0;i<GP_MAX_TMP_FILES; i++)
    {
        handle->tmp_filename_tbl[i] = NULL;
    }
    return handle;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x17ec(%rip), %rdi      # 0x3411
callq 0x1030
testq %rax, %rax
je 0x1c84
movl $0x238, %edi            # imm = 0x238
callq 0x1150
movq %rax, %rbx
andl $0x0, 0x8(%rax)
leaq 0x1876(%rip), %rsi      # 0x34bd
movq %rax, %rdi
callq 0x1cd2
andl $0x0, 0x230(%rbx)
leaq 0x17e6(%rip), %rdi      # 0x3443
leaq 0x17e7(%rip), %rsi      # 0x344b
callq 0x1190
movq %rax, (%rbx)
testq %rax, %rax
je 0x1ca2
pushq $0x6
popq %rax
cmpq $0x46, %rax
je 0x1cc8
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x1c74
movq 0x336d(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x1784(%rip), %rdi      # 0x3419
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
jmp 0x1c2f
movq 0x334f(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x179a(%rip), %rdi      # 0x344d
pushq $0x40
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
movq %rbx, %rdi
callq 0x1040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_setstyle
void gnuplot_setstyle(gnuplot_ctrl * h, char * plot_style)
{
    if (strcmp(plot_style, "lines") &&
        strcmp(plot_style, "points") &&
        strcmp(plot_style, "linespoints") &&
        strcmp(plot_style, "impulses") &&
        strcmp(plot_style, "dots") &&
        strcmp(plot_style, "steps") &&
        strcmp(plot_style, "errorbars") &&
        strcmp(plot_style, "boxes") &&
        strcmp(plot_style, "boxerrorbars")) {
        fprintf(stderr, "warning: unknown requested style: using points\n") ;
        strcpy(h->pstyle, "points") ;
    } else {
        strcpy(h->pstyle, plot_style) ;
    }
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1516(%rip), %rsi      # 0x31fc
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x17c0(%rip), %rsi      # 0x34bd
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x17a4(%rip), %rsi      # 0x34b8
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x179d(%rip), %rsi      # 0x34c4
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x1793(%rip), %rsi      # 0x34cd
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x1785(%rip), %rsi      # 0x34d2
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x1781(%rip), %rsi      # 0x34e1
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x1765(%rip), %rsi      # 0x34d8
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
je 0x1d92
leaq 0x1758(%rip), %rsi      # 0x34de
movq %r14, %rdi
callq 0x1110
testl %eax, %eax
jne 0x1da5
addq $0xc, %rbx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1070
movq 0x324c(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x1735(%rip), %rdi      # 0x34eb
pushq $0x2f
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
movl $0x6e696f70, 0xc(%rbx)  # imm = 0x6E696F70
movl $0x73746e, 0xf(%rbx)    # imm = 0x73746E
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_close
void gnuplot_close(gnuplot_ctrl * handle)
{
    int     i ;

    if (pclose(handle->gnucmd) == -1) {
        fprintf(stderr, "problem closing communication to gnuplot\n") ;
        return ;
    }
    if (handle->ntmp) {
        for (i=0 ; i<handle->ntmp ; i++) {
            remove(handle->tmp_filename_tbl[i]) ;
            free(handle->tmp_filename_tbl[i]);
            handle->tmp_filename_tbl[i] = NULL;

        }
    }
    free(handle) ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x10d0
cmpl $-0x1, %eax
je 0x1e30
movl 0x230(%rbx), %eax
testl %eax, %eax
je 0x1e24
xorl %r14d, %r14d
cltq
cmpq %rax, %r14
jge 0x1e24
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1060
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1040
andq $0x0, 0x30(%rbx,%r14,8)
incq %r14
movl 0x230(%rbx), %eax
jmp 0x1df8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1040
movq 0x31c1(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x164d(%rip), %rdi      # 0x348e
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x11e0
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_cmd
void gnuplot_cmd(gnuplot_ctrl *  handle, char const *  cmd, ...)
{
    va_list ap ;

    va_start(ap, cmd);
    vfprintf(handle->gnucmd, cmd, ap);
    va_end(ap);

    fputs("\n", handle->gnucmd) ;
    fflush(handle->gnucmd) ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1ea0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%rbx), %rdi
callq 0x11c0
movq (%rbx), %rsi
leaq 0x13b4(%rip), %rdi      # 0x3283
callq 0x10f0
movq (%rbx), %rdi
callq 0x1160
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_resetplot
void gnuplot_resetplot(gnuplot_ctrl * h)
{
    int     i ;
    if (h->ntmp) {
        for (i=0 ; i<h->ntmp ; i++) {
            remove(h->tmp_filename_tbl[i]) ;
            free(h->tmp_filename_tbl[i]);
            h->tmp_filename_tbl[i] = NULL;

        }
    }
    h->ntmp = 0 ;
    h->nplots = 0 ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x230(%rdi), %eax
testl %eax, %eax
je 0x1f55
xorl %r14d, %r14d
cltq
cmpq %rax, %r14
jge 0x1f55
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1060
movq 0x30(%rbx,%r14,8), %rdi
callq 0x1040
andq $0x0, 0x30(%rbx,%r14,8)
incq %r14
movl 0x230(%rbx), %eax
jmp 0x1f29
andl $0x0, 0x230(%rbx)
andl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_x
void gnuplot_plot_x(
    gnuplot_ctrl    *   handle,
    double          *   d,
    int                 n,
    char            *   title
)
{
    int     i ;
    FILE*   tmpfd ;
    char const * tmpfname;

    if (handle==NULL || d==NULL || (n<1)) return ;

    /* Open temporary file for output   */
    tmpfname = gnuplot_tmpfile(handle);
    tmpfd = fopen(tmpfname, "w");

    if (tmpfd == NULL) {
        fprintf(stderr,"cannot create temporary file: exiting plot") ;
        return ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n ; i++) {
      fprintf(tmpfd, "%.18e\n", d[i]);
    }
    fclose(tmpfd) ;

    gnuplot_plot_atmpfile(handle,tmpfname,title);
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %edx, %edx
setle %al
orb %cl, %al
je 0x1f9f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
callq 0x204a
leaq 0x1498(%rip), %rsi      # 0x344b
movq %rax, -0x40(%rbp)
movq %rax, %rdi
callq 0x11a0
testq %rax, %rax
je 0x2020
movq %rax, %r13
movq %r12, -0x30(%rbp)
movq %r14, -0x38(%rbp)
movl %ebx, %r12d
xorl %r14d, %r14d
leaq 0x15e9(%rip), %rbx      # 0x35c5
cmpq %r14, %r12
je 0x1ff9
movsd (%r15,%r14,8), %xmm0
movq %r13, %rdi
movq %rbx, %rsi
movb $0x1, %al
callq 0x1130
incq %r14
jmp 0x1fdc
movq %r13, %rdi
callq 0x10a0
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f9
movq 0x2fd1(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x150a(%rip), %rdi      # 0x353b
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11e0
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_tmpfile
char const * gnuplot_tmpfile(gnuplot_ctrl * handle)
{
    static char const * tmp_filename_template = "gnuplot_tmpdatafile_XXXXXX";
    char *              tmp_filename = NULL;
    int                 tmp_filelen = strlen(tmp_filename_template);

#ifndef WIN32
    int                 unx_fd;
#endif // #ifndef WIN32

    assert(handle->tmp_filename_tbl[handle->ntmp] == NULL);

    /* Open one more temporary file? */
    if (handle->ntmp == GP_MAX_TMP_FILES - 1) {
        fprintf(stderr,
                "maximum # of temporary files reached (%d): cannot open more",
                GP_MAX_TMP_FILES) ;
        return NULL;
    }

    tmp_filename = (char*) malloc(tmp_filelen+1);
    if (tmp_filename == NULL)
    {
        return NULL;
    }
    strcpy(tmp_filename, tmp_filename_template);

#ifdef WIN32
    if (_mktemp(tmp_filename) == NULL)
    {
        return NULL;
    }
#else // #ifdef WIN32
    unx_fd = mkstemp(tmp_filename);
    if (unx_fd == -1)
    {
        return NULL;
    }
    //close(unx_fd);

#endif // #ifdef WIN32

    handle->tmp_filename_tbl[handle->ntmp] = tmp_filename;
    handle->ntmp ++;
    return tmp_filename;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq 0x230(%rdi), %rax
cmpq $0x0, 0x30(%rdi,%rax,8)
jne 0x20da
cmpl $0x3f, %eax
je 0x20bb
movq %rdi, %r14
pushq $0x1b
popq %rdi
callq 0x1150
testq %rax, %rax
je 0x20b1
movq %rax, %rbx
movups 0x1570(%rip), %xmm0     # 0x35ef
movups %xmm0, 0xb(%rax)
movups 0x155a(%rip), %xmm0     # 0x35e4
movups %xmm0, (%rax)
movq %rax, %rdi
callq 0x1170
cmpl $-0x1, %eax
je 0x20b1
movslq 0x230(%r14), %rax
movq %rbx, 0x30(%r14,%rax,8)
incl %eax
movl %eax, 0x230(%r14)
jmp 0x20b3
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2f36(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x159e(%rip), %rsi      # 0x366a
xorl %ebx, %ebx
pushq $0x40
popq %rdx
xorl %eax, %eax
callq 0x1130
jmp 0x20b3
leaq 0x151e(%rip), %rdi      # 0x35ff
leaq 0x1546(%rip), %rsi      # 0x362e
leaq 0x154f(%rip), %rcx      # 0x363e
movl $0x29c, %edx            # imm = 0x29C
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_atmpfile
void gnuplot_plot_atmpfile(gnuplot_ctrl * handle, char const* tmp_filename, char const* title)
{
    char const *    cmd    = (handle->nplots > 0) ? "replot" : "plot";
    title                  = (title == NULL)      ? "(none)" : title;
    gnuplot_cmd(handle, "%s \"%s\" title \"%s\" with %s", cmd, tmp_filename,
                  title, handle->pstyle) ;
    handle->nplots++ ;
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
leaq 0x1147(%rip), %rsi      # 0x3257
leaq 0x144a(%rip), %rax      # 0x3561
cmovgq %rsi, %rax
testq %rdx, %rdx
leaq 0x144e(%rip), %r8       # 0x3573
cmovneq %rdx, %r8
leaq 0xc(%rdi), %r9
leaq 0x1572(%rip), %rsi      # 0x36a6
movq %rax, %rdx
xorl %eax, %eax
callq 0x1e50
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mohamedamjad[P]UBLOXlib/src/gnuplot_i.c
// Function: gnuplot_plot_xy
void gnuplot_plot_xy(
    gnuplot_ctrl    *   handle,
    double          *   x,
    double          *   y,
    int                 n,
    char            *   title
)
{
    int     i ;
    FILE*   tmpfd ;
    char const * tmpfname;

    if (handle==NULL || x==NULL || y==NULL || (n<1)) return ;

    /* Open temporary file for output   */
    tmpfname = gnuplot_tmpfile(handle);
    tmpfd = fopen(tmpfname, "w");

    if (tmpfd == NULL) {
        fprintf(stderr,"cannot create temporary file: exiting plot") ;
        return ;
    }

    /* Write data to this file  */
    for (i=0 ; i<n; i++) {
        fprintf(tmpfd, "%.18e %.18e\n", x[i], y[i]) ;
    }
    fclose(tmpfd) ;

    gnuplot_plot_atmpfile(handle,tmpfname,title);
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r15
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testl %ebx, %ebx
setle %dl
orb %al, %dl
orb %cl, %dl
je 0x218c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %r14
movq %rsi, %r12
movq %rdi, -0x40(%rbp)
callq 0x204a
leaq 0x12a9(%rip), %rsi      # 0x344b
movq %rax, -0x38(%rbp)
movq %rax, %rdi
callq 0x11a0
testq %rax, %rax
je 0x220d
movq %rax, %r13
movq %r14, -0x30(%rbp)
movl %ebx, %r14d
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x21e6
movsd (%r12,%rbx,8), %xmm0
movsd (%r15,%rbx,8), %xmm1
movq %r13, %rdi
leaq 0x138c(%rip), %rsi      # 0x3566
movb $0x2, %al
callq 0x1130
incq %rbx
jmp 0x21bf
movq %r13, %rdi
callq 0x10a0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f9
movq 0x2de4(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x131d(%rip), %rdi      # 0x353b
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11e0