LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_decode_char
static int cram_byte_array_stop_decode_char(cram_slice *slice, cram_codec *c,
					    cram_block *in, char *out,
					    int *out_size) {
    cram_block *b = NULL;
    char *cp, ch;

    b = cram_get_block_by_id(slice, c->byte_array_stop.content_id);
    if (!b)
        return *out_size?-1:0;

    if (b->idx >= b->uncomp_size)
	return -1;

    cp = (char *)b->data + b->idx;
    if (out) {
	while ((ch = *cp) != (char)c->byte_array_stop.stop) {
	    if (cp - (char *)b->data >= b->uncomp_size)
		return -1;
	    *out++ = ch;
	    cp++;
	}
    } else {
	// Consume input, but produce no output
	while ((ch = *cp) != (char)c->byte_array_stop.stop) {
	    if (cp - (char *)b->data >= b->uncomp_size)
		return -1;
	    cp++;
	}
    }

    *out_size = cp - (char *)(b->data + b->idx);
    b->idx = cp - (char *)b->data + 1;

    return 0;
}

// Assembly:
pushq %rbx
movl 0x34(%rsi), %eax
cmpq $0x400, %rax            # imm = 0x400
setb %r9b
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
setne %r10b
testb %r10b, %r9b
je 0x4c73e
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
je 0x4c771
movslq 0x1c(%rdx), %r10
movslq 0x14(%rdx), %r11
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r11d, %r10d
jge 0x4c778
movq 0x20(%rdx), %rdi
leaq (%rdi,%r10), %r9
testq %rcx, %rcx
je 0x4c77a
movb (%r9), %r11b
cmpb 0x30(%rsi), %r11b
je 0x4c79a
addq %r10, %rdi
movq %rdi, %r10
subq 0x20(%rdx), %r10
movslq 0x14(%rdx), %rbx
cmpq %rbx, %r10
jge 0x4c778
movb %r11b, (%rcx)
incq %rcx
movb 0x1(%r9), %r11b
incq %r9
incq %rdi
cmpb 0x30(%rsi), %r11b
jne 0x4c70e
movq 0x20(%rdx), %rdi
movslq 0x1c(%rdx), %r10
jmp 0x4c79a
movq (%rdi), %rdx
movslq 0x20(%rdx), %r9
testq %r9, %r9
jle 0x4c771
movq 0x10(%rdi), %rdi
xorl %r10d, %r10d
movq (%rdi,%r10,8), %rdx
testq %rdx, %rdx
je 0x4c769
cmpl $0x4, 0x8(%rdx)
jne 0x4c769
cmpl %eax, 0xc(%rdx)
je 0x4c6db
incq %r10
cmpq %r10, %r9
jne 0x4c751
xorl %eax, %eax
cmpl (%r8), %eax
sbbl %eax, %eax
popq %rbx
retq
movb 0x30(%rsi), %cl
cmpb %cl, (%r9)
je 0x4c79a
movq %r10, %rsi
cmpq %r11, %rsi
jge 0x4c778
leaq 0x1(%rsi), %r9
cmpb %cl, 0x1(%rdi,%rsi)
movq %r9, %rsi
jne 0x4c785
addq %rdi, %r9
addl %edi, %r10d
movl %r9d, %eax
subl %r10d, %eax
movl %eax, (%r8)
subl %edi, %r9d
incl %r9d
movl %r9d, 0x1c(%rdx)
xorl %eax, %eax
jmp 0x4c778
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode_init
cram_codec *cram_byte_array_stop_encode_init(cram_stats *st,
					     enum cram_external_type option,
					     void *dat,
					     int version) {
    cram_codec *c;

    c = malloc(sizeof(*c));
    if (!c)
	return NULL;
    c->codec = E_BYTE_ARRAY_STOP;
    c->free = cram_byte_array_stop_encode_free;
    c->encode = cram_byte_array_stop_encode;
    c->store = cram_byte_array_stop_encode_store;

    c->e_byte_array_stop.stop = ((int *)dat)[0];
    c->e_byte_array_stop.content_id = ((int *)dat)[1];

    return c;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movl $0x240, %edi            # imm = 0x240
callq 0x4700
testq %rax, %rax
je 0x4ccbf
movl $0x5, (%rax)
leaq -0x362(%rip), %rcx      # 0x4c938
movq %rcx, 0x10(%rax)
leaq -0x4f1(%rip), %rcx      # 0x4c7b4
movq %rcx, 0x20(%rax)
leaq -0x36e(%rip), %rcx      # 0x4c942
movq %rcx, 0x28(%rax)
movb (%rbx), %cl
movb %cl, 0x30(%rax)
movl 0x4(%rbx), %ecx
movl %ecx, 0x34(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/cram_codecs.c
// Function: cram_codec_to_id
int cram_codec_to_id(cram_codec *c, int *id2) {
    int bnum1, bnum2 = -2;

    switch (c->codec) {
    case E_HUFFMAN:
	bnum1 = c->huffman.ncodes == 1 ? -2 : -1;
	break;
    case E_GOLOMB:
    case E_BETA:
    case E_SUBEXP:
    case E_GOLOMB_RICE:
    case E_GAMMA:
	bnum1 = -1;
	break;
    case E_EXTERNAL:
	bnum1 = c->external.content_id;
	break;
    case E_BYTE_ARRAY_LEN:
	bnum1 = cram_codec_to_id(c->byte_array_len.len_codec, NULL);
	bnum2 = cram_codec_to_id(c->byte_array_len.val_codec, NULL);
	break;
    case E_BYTE_ARRAY_STOP:
	bnum1 = c->byte_array_stop.content_id;
	break;
    case E_NULL:
	bnum1 = -2;
	break;
    default:
	fprintf(stderr, "Unknown codec type %d\n", c->codec);
	bnum1 = -1;
    }

    if (id2)
	*id2 = bnum2;
    return bnum1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rdi), %edx
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x9, %rdx
ja 0x4cd60
movq %rdi, %r15
leaq 0x7acd(%rip), %rax      # 0x547d0
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %rbx, %rbx
je 0x4cd14
movl %r14d, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x4cd0c
movl 0x34(%r15), %ebp
jmp 0x4cd0c
xorl %ebp, %ebp
cmpl $0x1, 0x30(%r15)
sete %bpl
notl %ebp
jmp 0x4cd0c
movl 0x30(%r15), %ebp
jmp 0x4cd0c
movq 0x30(%r15), %rdi
xorl %esi, %esi
callq 0x4ccdc
movl %eax, %ebp
movq 0x38(%r15), %rdi
xorl %esi, %esi
callq 0x4ccdc
movl %eax, %r14d
jmp 0x4cd0c
movq 0x15261(%rip), %rax     # 0x61fc8
movq (%rax), %rdi
leaq 0x7de3(%rip), %rsi      # 0x54b54
xorl %eax, %eax
callq 0x4770
jmp 0x4cd0c
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/pooled_alloc.c
// Function: pool_create
pool_alloc_t *pool_create(size_t dsize) {
    pool_alloc_t *p;

    if (NULL == (p = (pool_alloc_t *)malloc(sizeof(*p))))
	return NULL;

    /* Minimum size is a pointer, for free list */
    dsize = (dsize + sizeof(void *) - 1) & ~(sizeof(void *)-1);
    if (dsize < sizeof(void *))
	dsize = sizeof(void *);
    p->dsize = dsize;
    p->psize = MIN(PSIZE, next_power_2(p->dsize*1024));

    p->npools = 0;
    p->pools = NULL;
    p->free  = NULL;

    return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x28, %edi
callq 0x4700
testq %rax, %rax
je 0x4d047
addq $0x7, %rbx
movq %rbx, %rcx
andq $-0x8, %rcx
cmpq $0x8, %rbx
movl $0x8, %edx
cmovaeq %rcx, %rdx
movq %rdx, (%rax)
shll $0xa, %edx
decl %edx
movl %edx, %ecx
shrl %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x4, %ecx
orl %edx, %ecx
movl %ecx, %edx
shrl $0x8, %edx
orl %ecx, %edx
movl %edx, %ecx
shrl $0x10, %ecx
orl %edx, %ecx
incl %ecx
movl $0x100000, %edx         # imm = 0x100000
cmpl %edx, %ecx
cmovgel %edx, %ecx
movslq %ecx, %rcx
movq %rcx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/pooled_alloc.c
// Function: pool_destroy
void pool_destroy(pool_alloc_t *p) {
    size_t i;

    for (i = 0; i < p->npools; i++) {
        free(p->pools[i].pool);
    }
    free(p->pools);
    free(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x4d078
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x4610
incq %r15
addq $0x10, %r14
cmpq 0x10(%rbx), %r15
jb 0x4d05e
movq 0x18(%rbx), %rdi
callq 0x4610
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4610
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/cram/pooled_alloc.c
// Function: pool_alloc
void *pool_alloc(pool_alloc_t *p) {
    pool_t *pool;
    void *ret;

    /* Look on free list */
    if (NULL != p->free) {
        ret = p->free;
	p->free = *((void **)p->free);
	return ret;
    }

    /* Look for space in the last pool */
    if (p->npools) {
        pool = &p->pools[p->npools - 1];
        if (pool->used + p->dsize < p->psize) {
	    ret = ((char *) pool->pool) + pool->used;
	    pool->used += p->dsize;
	    return ret;
	}
    }

    /* Need a new pool */
    pool = new_pool(p);
    if (NULL == pool) return NULL;

    pool->used = p->dsize;
    return pool->pool;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
testq %r14, %r14
je 0x4d0be
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x4d0f4
movq 0x18(%rbx), %rdi
movq %rsi, %rax
shlq $0x4, %rax
movq -0x8(%rdi,%rax), %r14
movq (%rbx), %r13
movq 0x8(%rbx), %r12
leaq (%r14,%r13), %rcx
cmpq %r12, %rcx
jae 0x4d0ff
addq %rax, %rdi
addq -0x10(%rdi), %r14
movq %rcx, -0x8(%rdi)
jmp 0x4d0ac
movq (%rbx), %r13
movq 0x8(%rbx), %r12
movq 0x18(%rbx), %rdi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x48d0
testq %rax, %rax
je 0x4d160
movq %rax, %r15
xorl %r14d, %r14d
movq %r12, %rax
xorl %edx, %edx
divq %r13
movq %r15, 0x18(%rbx)
movq (%rbx), %r12
movq 0x10(%rbx), %r13
movq %r13, %rbp
shlq $0x4, %rbp
imulq %r12, %rax
movq %rax, %rdi
callq 0x4700
movq %rax, (%r15,%rbp)
testq %rax, %rax
je 0x4d0ac
addq %rbp, %r15
incq %r13
movq %r13, 0x10(%rbx)
movq %r12, 0x8(%r15)
movq %rax, %r14
jmp 0x4d0ac
xorl %r14d, %r14d
jmp 0x4d0ac
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: socket_connect
static int socket_connect(const char *host, const char *port)
{
#define __err_connect(func) do { perror(func); freeaddrinfo(res); return -1; } while (0)

	int ai_err, on = 1, fd;
	struct linger lng = { 0, 0 };
	struct addrinfo hints, *res = 0;
	memset(&hints, 0, sizeof(struct addrinfo));
	hints.ai_family = AF_UNSPEC;
	hints.ai_socktype = SOCK_STREAM;
	/* In Unix/Mac, getaddrinfo() is the most convenient way to get
	 * server information. */
	if ((ai_err = getaddrinfo(host, port, &hints, &res)) != 0) { fprintf(stderr, "can't resolve %s:%s: %s\n", host, port, gai_strerror(ai_err)); return -1; }
	if ((fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) __err_connect("socket");
	/* The following two setsockopt() are used by ftplib
	 * (http://nbpfaus.net/~pfau/ftplib/). I am not sure if they
	 * necessary. */
	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) __err_connect("setsockopt");
	if (setsockopt(fd, SOL_SOCKET, SO_LINGER, &lng, sizeof(lng)) == -1) __err_connect("setsockopt");
	if (connect(fd, res->ai_addr, res->ai_addrlen) != 0) __err_connect("connect");
	freeaddrinfo(res);
	return fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %eax
movl %eax, 0x14(%rsp)
xorl %edx, %edx
movq %rdx, 0x18(%rsp)
leaq 0x8(%rsp), %rcx
movq %rdx, (%rcx)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movl %eax, 0x8(%rdx)
callq 0x46a0
testl %eax, %eax
jne 0x4d2a9
movq 0x8(%rsp), %rax
movl 0x4(%rax), %edi
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
callq 0x4130
cmpl $-0x1, %eax
je 0x4d2d6
movl %eax, %ebx
leaq 0x14(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x4990
cmpl $-0x1, %eax
je 0x4d2e2
leaq 0x18(%rsp), %rcx
movl %ebx, %edi
movl $0x1, %esi
movl $0xd, %edx
movl $0x8, %r8d
callq 0x4990
cmpl $-0x1, %eax
je 0x4d2ee
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movl 0x10(%rax), %edx
movl %ebx, %edi
callq 0x4430
testl %eax, %eax
jne 0x4d2fa
movq 0x8(%rsp), %rdi
callq 0x46e0
jmp 0x4d309
movq 0x14d18(%rip), %rcx     # 0x61fc8
movq (%rcx), %r15
movl %eax, %edi
callq 0x4730
leaq 0x7a10(%rip), %rsi      # 0x54cd1
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x4770
jmp 0x4d304
leaq 0x8(%rsp), %rdi
callq 0x62cf
jmp 0x4d304
leaq 0x8(%rsp), %rdi
callq 0x62b5
jmp 0x4d304
leaq 0x8(%rsp), %rdi
callq 0x629b
jmp 0x4d304
leaq 0x8(%rsp), %rdi
callq 0x6281
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: kftp_send_cmd
static int kftp_send_cmd(knetFile *ftp, const char *cmd, int is_get)
{
	if (socket_wait(ftp->ctrl_fd, 0) <= 0) return -1; // socket is not ready for writing
    int len = strlen(cmd);
	if ( netwrite(ftp->ctrl_fd, cmd, len) != len ) return -1;
	return is_get? kftp_get_response(ftp) : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x20(%rdi), %edi
xorl %esi, %esi
callq 0x4dea0
testl %eax, %eax
jle 0x4d489
movq %r14, %rdi
callq 0x4230
movl 0x20(%rbx), %edi
movslq %eax, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x41f0
cmpq %r15, %rax
setne %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
je 0x4d494
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4d315
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: kftp_parse_url
knetFile *kftp_parse_url(const char *fn, const char *mode)
{
	knetFile *fp;
	char *p;
	int l;
	if (strstr(fn, "ftp://") != fn) return 0;
	for (p = (char*)fn + 6; *p && *p != '/'; ++p);
	if (*p != '/') return 0;
	l = p - fn - 6;
	fp = (knetFile*)calloc(1, sizeof(knetFile));
	fp->type = KNF_TYPE_FTP;
	fp->fd = -1;
	/* the Linux/Mac version of socket_connect() also recognizes a port
	 * like "ftp", but the Windows version does not. */
	fp->port = strdup("21");
	fp->host = (char*)calloc(l + 1, 1);
	if (strchr(mode, 'c')) fp->no_reconnect = 1;
	strncpy(fp->host, fn + 6, l);
	fp->retr = (char*)calloc(strlen(p) + 8, 1);
	sprintf(fp->retr, "RETR %s\r\n", p);
    fp->size_cmd = (char*)calloc(strlen(p) + 8, 1);
    sprintf(fp->size_cmd, "SIZE %s\r\n", p);
	fp->seek_offset = 0;
	return fp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
leaq 0x76cd(%rip), %rsi      # 0x54bbb
movl $0x6, %edx
callq 0x4280
testl %eax, %eax
je 0x4d511
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x100000000, %rbp      # imm = 0x100000000
addq $0x6, %r15
xorl %r13d, %r13d
movq %r15, %rbx
movzbl (%rbx), %eax
testl %eax, %eax
je 0x4d4fc
cmpl $0x2f, %eax
je 0x4d539
incq %rbx
addq %rbp, %r13
jmp 0x4d525
movl $0x1, %edi
movl $0x80, %esi
callq 0x4360
movq %rax, %r14
movabsq $-0xfffffffe, %rax      # imm = 0xFFFFFFFF00000002
movq %rax, (%r14)
leaq 0x7663(%rip), %rdi      # 0x54bc2
callq 0x49c0
movq %rax, 0x18(%r14)
addq %r13, %rbp
sarq $0x20, %rbp
movl $0x1, %esi
movq %rbp, %rdi
callq 0x4360
movq %rax, %rbp
movq %rax, 0x10(%r14)
movq %r12, %rdi
movl $0x63, %esi
callq 0x4200
testq %rax, %rax
je 0x4d59d
movl $0x1, 0x3c(%r14)
sarq $0x20, %r13
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x42b0
movq %rbx, %rdi
callq 0x4230
leaq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x4360
movq %rax, 0x50(%r14)
leaq 0x75f5(%rip), %rsi      # 0x54bc5
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4110
movq %rbx, %rdi
callq 0x4230
leaq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x4360
movq %rax, 0x58(%r14)
leaq 0x75d1(%rip), %rsi      # 0x54bcf
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4110
jmp 0x4d4ff
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: my_netread
static off_t my_netread(int fd, void *buf, off_t len)
{
	off_t rest = len, curr, l = 0;
	/* recv() and read() may not read the required length of data with
	 * one call. They have to be called repeatedly. */
	while (rest) {
		if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
		curr = netread(fd, (void*)((char*)buf + l), rest);
		/* According to the glibc manual, section 13.2, a zero returned
		 * value indicates end-of-file (EOF), which should mean that
		 * read() will not return zero if EOF has not been met but data
		 * are not immediately available. */
		if (curr == 0) break;
		l += curr; rest -= curr;
	}
	return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x4dbd5
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
xorl %ebx, %ebx
movl %ebp, %edi
movl $0x1, %esi
callq 0x4dea0
testl %eax, %eax
jle 0x4dbd7
leaq (%r15,%rbx), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x4780
testq %rax, %rax
je 0x4dbd7
addq %rax, %rbx
subq %rax, %r14
jne 0x4dba8
jmp 0x4dbd7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: knet_read
ssize_t knet_read(knetFile *fp, void *buf, size_t len)
{
	off_t l = 0;
	if (fp->fd == -1) return 0;
	if (fp->type == KNF_TYPE_FTP) {
		if (fp->is_ready == 0) {
			if (!fp->no_reconnect) kftp_reconnect(fp);
			kftp_connect_file(fp);
		}
	} else if (fp->type == KNF_TYPE_HTTP) {
		if (fp->is_ready == 0)
			khttp_connect_file(fp);
	}
	if (fp->type == KNF_TYPE_LOCAL) { // on Windows, the following block is necessary; not on UNIX
		size_t rest = len;
		ssize_t curr;
		while (rest) {
			do {
				curr = read(fp->fd, (void*)((char*)buf + l), rest);
			} while (curr < 0 && EINTR == errno);
			if (curr < 0) return -1;
			if (curr == 0) break;
			l += curr; rest -= curr;
		}
	} else l = my_netread(fp->fd, buf, len);
	fp->offset += l;
	return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
cmpl $-0x1, %edi
je 0x4dd92
movq %rdx, %r14
movq %rsi, %r15
movl (%rbx), %eax
cmpl $0x3, %eax
je 0x4dd97
cmpl $0x2, %eax
jne 0x4dda7
cmpl $0x0, 0x40(%rbx)
jne 0x4dde6
cmpl $0x0, 0x3c(%rbx)
jne 0x4dd88
movq %rbx, %rdi
callq 0x4d4a6
movq %rbx, %rdi
callq 0x4d610
jmp 0x4dda5
xorl %r12d, %r12d
jmp 0x4ddf8
cmpl $0x0, 0x40(%rbx)
jne 0x4dde6
movq %rbx, %rdi
callq 0x4d960
movl (%rbx), %eax
cmpl $0x1, %eax
jne 0x4dde3
xorl %r12d, %r12d
testq %r14, %r14
je 0x4ddf4
leaq (%r15,%r12), %r13
movl 0x4(%rbx), %edi
movq %r13, %rsi
movq %r14, %rdx
callq 0x4780
testq %rax, %rax
jns 0x4ddd7
callq 0x4070
cmpl $0x4, (%rax)
je 0x4ddb8
jmp 0x4de05
je 0x4ddf4
addq %rax, %r12
subq %rax, %r14
jne 0x4ddb4
jmp 0x4ddf4
movl 0x4(%rbx), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4db92
movq %rax, %r12
addq %r12, 0x8(%rbx)
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq $-0x1, %r12
jmp 0x4ddf8
// File: /workspace/github_cpp_makefile_star2_O3/karel-brinda[P]ococo/ext/htslib/knetfile.c
// Function: knet_seek
off_t knet_seek(knetFile *fp, off_t off, int whence)
{
	if (whence == SEEK_SET && off == fp->offset) return 0;
	if (fp->type == KNF_TYPE_LOCAL) {
		/* Be aware that lseek() returns the offset after seeking, while fseek() returns zero on success. */
		off_t offset = lseek(fp->fd, off, whence);
		if (offset == -1) return -1;
		fp->offset = offset;
		return fp->offset;
	} else if (fp->type == KNF_TYPE_FTP) {
		if (whence == SEEK_CUR) fp->offset += off;
		else if (whence == SEEK_SET) fp->offset = off;
		else if (whence == SEEK_END) fp->offset = fp->file_size + off;
		else return -1;
		fp->is_ready = 0;
		return fp->offset;
	} else if (fp->type == KNF_TYPE_HTTP) {
		if (whence == SEEK_END) { // FIXME: can we allow SEEK_END in future?
			fprintf(stderr, "[knet_seek] SEEK_END is not supported for HTTP. Offset is unchanged.\n");
			errno = ESPIPE;
			return -1;
		}
		if (whence == SEEK_CUR) fp->offset += off;
		else if (whence == SEEK_SET) fp->offset = off;
		else return -1;
		fp->is_ready = 0;
		return fp->offset;
	}
	errno = EINVAL;
	fprintf(stderr,"[knet_seek] %s\n", strerror(errno));
	return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
jne 0x4de20
cmpq %rsi, 0x8(%rbx)
jne 0x4de20
xorl %eax, %eax
jmp 0x4de9e
movl (%rbx), %eax
cmpl $0x3, %eax
je 0x4de45
cmpl $0x2, %eax
je 0x4de5c
cmpl $0x1, %eax
jne 0x4de8b
movl 0x4(%rbx), %edi
callq 0x49e0
cmpq $-0x1, %rax
je 0x4de97
movq %rax, 0x8(%rbx)
jmp 0x4de9e
cmpl $0x1, %edx
je 0x4de61
cmpl $0x2, %edx
je 0x4de92
movq $-0x1, %rax
testl %edx, %edx
jne 0x4de9e
jmp 0x4de65
cmpl $0x1, %edx
jne 0x4de75
addq 0x8(%rbx), %rsi
movq %rsi, 0x8(%rbx)
movl $0x0, 0x40(%rbx)
movq %rsi, %rax
jmp 0x4de9e
testl %edx, %edx
je 0x4de65
movq $-0x1, %rax
cmpl $0x2, %edx
jne 0x4de9e
addq 0x68(%rbx), %rsi
jmp 0x4de65
callq 0x6382
jmp 0x4de97
callq 0x6355
movq $-0x1, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/grdview/grdview.cpp
// Function: GLUTMotion(int, int)
void GLUTMotion(int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;

  // Compute mouse movement
  int dx = x - GLUTmouse[0];
  int dy = y - GLUTmouse[1];
  
  // World in hand navigation 
  R3Point origin = grid->GridBox().Centroid();
  if (GLUTbutton[0]) viewer->RotateWorld(1.0, origin, x, y, dx, dy);
  else if (GLUTbutton[1]) viewer->ScaleWorld(1.0, origin, x, y, dx, dy);
  else if (GLUTbutton[2]) viewer->TranslateWorld(1.0, origin, x, y, dx, dy);
  if (GLUTbutton[0] || GLUTbutton[1] || GLUTbutton[2]) glutPostRedisplay();

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edi, %ebp
movl 0xfe708(%rip), %ebx     # 0x121880
subl %esi, %ebx
movl %edi, %r14d
subl 0x1036b4(%rip), %r14d   # 0x126838
movl %ebx, %r15d
subl 0x1036ae(%rip), %r15d   # 0x12683c
movq 0x10360b(%rip), %rax    # 0x1267a0
movl 0x238(%rax), %ecx
decl %ecx
cvtsi2sd %ecx, %xmm3
movl 0x23c(%rax), %ecx
decl %ecx
cvtsi2sd %ecx, %xmm4
movl 0x240(%rax), %eax
decl %eax
cvtsi2sd %eax, %xmm5
leaq 0x18(%rsp), %r12
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r12, %rdi
callq 0x2c140
movq %rsp, %rdi
movq %r12, %rsi
callq 0x2c8b6
leaq 0x18(%rsp), %rdi
callq 0x2cec0
movl $0x58, %eax
cmpl $0x0, 0x103650(%rip)    # 0x126840
jne 0x2320e
movl $0x50, %eax
cmpl $0x0, 0x103646(%rip)    # 0x126844
jne 0x2320e
movl $0x48, %eax
cmpl $0x0, 0x10363c(%rip)    # 0x126848
je 0x23231
movq 0x10357b(%rip), %rdi    # 0x126790
movq (%rdi), %r10
movsd 0xa0e20(%rip), %xmm0    # 0xc4040
movq %rsp, %rsi
movl %ebp, %edx
movl %ebx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
callq *(%r10,%rax)
cmpl $0x0, 0x103608(%rip)    # 0x126840
jne 0x2324c
cmpl $0x0, 0x103603(%rip)    # 0x126844
jne 0x2324c
cmpl $0x0, 0x1035fe(%rip)    # 0x126848
je 0x23251
callq 0x879cc
movl %ebp, 0x1035e1(%rip)    # 0x126838
movl %ebx, 0x1035df(%rip)    # 0x12683c
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2cec0
movq %rbx, %rdi
callq 0x1fe30
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/grdview/grdview.cpp
// Function: GLUTMouse(int, int, int, int)
void GLUTMouse(int button, int state, int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;
  
  // Process mouse button event

  // Remember button state 
  int b = (button == GLUT_LEFT_BUTTON) ? 0 : ((button == GLUT_MIDDLE_BUTTON) ? 1 : 2);
  GLUTbutton[b] = (state == GLUT_DOWN) ? 1 : 0;

  // Remember modifiers 
  GLUTmodifiers = glutGetModifiers();

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;

  // Redraw
  glutPostRedisplay();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
movl 0xfe5f6(%rip), %ebp     # 0x121880
xorl %eax, %eax
cmpl $0x1, %edi
setne %al
incl %eax
subl %ecx, %ebp
xorl %ecx, %ecx
testl %esi, %esi
sete %cl
testl %edi, %edi
cmovel %edi, %eax
leaq 0x103597(%rip), %rdx    # 0x126840
movl %ecx, (%rdx,%rax,4)
callq 0x8c885
movl %ebx, 0x103581(%rip)    # 0x126838
movl %ebp, 0x10357f(%rip)    # 0x12683c
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x879cc
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/grdview/grdview.cpp
// Function: GLUTMainLoop()
void GLUTMainLoop(void)
{
  // Set default values
  if (grid_threshold == -98765) {
    RNScalar max_threshold = grid->Maximum() - 1.0E-20;
    grid_threshold = grid->Mean() + 3 * grid->StandardDeviation();
    if (grid_threshold > max_threshold) grid_threshold = max_threshold;
  }

  // Set slice coords to middle of grid
  grid_slice_coords[RN_X] = grid->XResolution()/2;
  grid_slice_coords[RN_Y] = grid->YResolution()/2;
  grid_slice_coords[RN_Z] = grid->ZResolution()/2;

  // Run main loop -- never returns 
  glutMainLoop();
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss 0xfdf9c(%rip), %xmm0    # 0x121870
ucomiss 0xa0739(%rip), %xmm0    # 0xc4014
jne 0x239a4
jp 0x239a4
movq 0x102eb2(%rip), %rsi    # 0x1267a0
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x33dae
movsd 0x8(%rbx), %xmm1
movq 0x102e99(%rip), %rbx    # 0x1267a0
cmpl $0x0, 0x24c(%rbx)
je 0x2393d
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x33e14
movsd (%rsp), %xmm1
cvtsi2sdl 0x24c(%rbx), %xmm2
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x102e65(%rip), %rbx    # 0x1267a0
jmp 0x23947
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
addsd 0xa0721(%rip), %xmm1    # 0xc4070
movsd %xmm1, (%rsp)
movq %rbx, %rdi
callq 0x33c94
ucomisd 0xa06fc(%rip), %xmm0    # 0xc4060
jb 0x2396c
sqrtsd %xmm0, %xmm0
jmp 0x23971
callq 0x1f590
mulsd 0xa06ff(%rip), %xmm0    # 0xc4078
addsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
movsd (%rsp), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x2399c
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movss %xmm0, 0xfdecc(%rip)    # 0x121870
movq 0x102df5(%rip), %rax    # 0x1267a0
movl 0x238(%rax), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movl %edx, 0x102df8(%rip)    # 0x1267b8
movl 0x23c(%rax), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movl %edx, 0x102de7(%rip)    # 0x1267bc
movl 0x240(%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, 0x102dd6(%rip)    # 0x1267c0
callq 0x8ac87
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/boomanaiden154[P]HTTPClientHPP/./client.hpp
// Function: HTTPClient::initalizeSocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
static int initalizeSocket(std::string address, int port)
    {
        int sockfd;

        struct addrinfo hints;
        struct addrinfo* servinfo;
        struct addrinfo* p;

        memset(&hints, 0, sizeof(hints));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;

        getaddrinfo(address.c_str(), std::to_string(port).c_str(), &hints, &servinfo);

        for(p = servinfo; p != NULL; p = p->ai_next)
        {
            if((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
            {
                continue;
            }
            if(connect(sockfd, p->ai_addr, p->ai_addrlen) == -1)
            {
                close(sockfd);
                continue;
            }
            break;
        }

        if(p == NULL)
        {
            return -1;
        }

        freeaddrinfo(servinfo);

        return sockfd;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
movl $0x1, -0x88(%rbp)
movq (%rdi), %rax
movq %rax, -0x38(%rbp)
movl %esi, %r15d
negl %r15d
cmovsl %esi, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x3147
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x313e
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3144
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3147
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x310b
addl $-0x3, %r12d
jmp 0x3147
addl $-0x2, %r12d
jmp 0x3147
decl %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq -0x48(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x2230
addq (%r13), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x42de
movq (%r13), %rsi
leaq -0x90(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdi
callq 0x2240
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0x31a7
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq -0x30(%rbp), %r14
testq %r14, %r14
je 0x31e9
movl 0x4(%r14), %edi
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
callq 0x2080
cmpl $-0x1, %eax
je 0x31e3
movl %eax, %ebx
movq 0x18(%r14), %rsi
movl 0x10(%r14), %edx
movl %eax, %edi
callq 0x2190
cmpl $-0x1, %eax
jne 0x31f0
movl %ebx, %edi
callq 0x2330
movq 0x28(%r14), %r14
jmp 0x31ab
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x31f9
movq -0x30(%rbp), %rdi
callq 0x2250
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3222
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/boomanaiden154[P]HTTPClientHPP/./client.hpp
// Function: HTTPHeader::parseData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void parseData(const std::string& input)
    {
        if(headers.find("transfer-encoding") != headers.end() && headers.find("transfer-encoding")->second == "chunked")
        {
            parseChunk(input);
        }
        else
        {
            body += input;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xa9d(%rip), %rsi       # 0x508a
leaq 0xaa7(%rip), %rdx       # 0x509b
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x4a42
movq %r14, %rdi
movq %r15, %rsi
callq 0x4ae0
leaq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x466f
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xa67(%rip), %rsi       # 0x508a
leaq 0xa71(%rip), %rdx       # 0x509b
leaq -0x48(%rbp), %rdi
callq 0x4a42
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x4ae0
addq $0x40, %rax
leaq 0xa52(%rip), %rsi       # 0x509c
movq %rax, %rdi
callq 0x20a0
testl %eax, %eax
sete %r13b
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x4672
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x4672
xorl %r13d, %r13d
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4687
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21f0
testb %r13b, %r13b
je 0x4699
movq %r14, %rdi
movq %rbx, %rsi
callq 0x46fa
jmp 0x46af
addq $0x98, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x20b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x46dd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x46dd
jmp 0x46da
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x46f2
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/include/tinyopt/tinyopt.h
// Function: to::sink to::action<void (*)(char const*), to::keyword_parser<char const*>>(void (*)(char const*), to::keyword_parser<char const*>)
sink action(F f, P parser) {
    return sink(sink::action,
        [f = std::move(f), parser = std::move(parser)](const char* arg) -> bool {
            return static_cast<bool>(f << parser(arg));
        });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq (%rdx), %r12
movq %r12, (%rbx)
movq 0x8(%rdx), %r13
movq %r13, 0x8(%rbx)
movq 0x10(%rdx), %rbp
movq %rbp, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x20, %edi
callq 0x2160
movq %r15, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rbp, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rax, (%r14)
leaq 0xf3e(%rip), %rax       # 0x3d7a
movq %rax, 0x18(%r14)
leaq 0xf6b(%rip), %rax       # 0x3db2
movq %rax, 0x10(%r14)
movq %rbx, %rdi
callq 0x35e0
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x35e0
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU1::ALU1(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int>>*, bool*, ALU2*, ALU3*, Flusher*, int*, int*)
ALU1::ALU1(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int> >* out, bool* b,
			ALU2 *a, ALU3* a3, Flusher *f, int* p, int* pa){
	this->in = in; this->out = out; this->b = b; this->a = a; this->f = f;
	this->predict = p; this->predict_addr = pa; this->a3 = a3;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sub"]] = LATENCY_SUB;
	latencies[0] = 1;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x183dd(%rip), %rax     # 0x1bbb0
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7a5a
leaq 0x80(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r14, 0xc8(%rbx)
movq %rbp, 0xd0(%rbx)
movq %r13, 0xd8(%rbx)
movq %r12, 0xe0(%rbx)
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0xf0(%rbx)
movq 0x70(%rsp), %rax
movq %rax, 0x100(%rbx)
movq %r15, 0xe8(%rbx)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1279f(%rip), %rsi     # 0x16004
leaq 0x1279b(%rip), %rdx     # 0x16007
movq %rsp, %rdi
callq 0x530a
leaq 0x189c5(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
movq 0x20(%rsp), %r15
callq 0x5136
movq %r15, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x38af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x1274c(%rip), %rsi     # 0x16008
leaq 0x12748(%rip), %rdx     # 0x1600b
callq 0x530a
leaq 0x18971(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r15, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x38fe
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
callq 0x51b2
movl $0x1, (%rax)
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3939
jmp 0x3939
movq %rax, %r15
jmp 0x3959
jmp 0x3940
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3959
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x20(%rsp), %rdi
callq 0x5224
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x397b
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU1::tock()
void ALU1::tock(void){
	if(stall_cycles > 0)
		stall_cycles--;
	else {
		if(i.is_valid()){
			if(out->valid()){
				read = false;	// previous data has not been read; stall
			}else{
				read = true;
				out->write(std::make_tuple(i, res));
				Instruction reset; i = reset;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl 0xb0(%rdi), %eax
testl %eax, %eax
jle 0x4028
decl %eax
movl %eax, 0xb0(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0xc(%rbx)
je 0x4016
cmpl $-0x1, 0x8(%rbx)
je 0x4016
movq 0xd0(%rbx), %r13
cmpb $0x1, 0x80(%r13)
jne 0x404e
movb $0x0, 0xc0(%rbx)
jmp 0x4016
leaq 0x8(%rbx), %r14
movb $0x1, %al
movb %al, 0xc0(%rbx)
movl 0xbc(%rbx), %eax
leaq 0x10(%rsp), %r15
movl %eax, -0x8(%r15)
movl $0xa, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5274
movq 0x78(%rbx), %rax
movq %rax, 0x10(%rbp)
movb $0x1, %al
movb %al, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r12, %rsi
callq 0x3140
leaq 0x58(%rbx), %r15
movq 0x80(%rsp), %rax
movq %rax, 0x78(%r13)
movl 0x8(%rsp), %eax
movl %eax, (%r13)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x40f3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7a5a
movl $0xa, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4016
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4016
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4179
movq 0x68(%rsp), %rsi
jmp 0x4171
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4179
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::ALU2(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int, int>>*, bool*)
ALU2::ALU2(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int, int> >* out, bool* b){
	this->in = in; this->out = out; this->b = b;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sub"]] = LATENCY_SUB;
	latencies[FUNCT["mult"]] = LATENCY_MULT;
	latencies[FUNCT["div"]] = LATENCY_DIV;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x17a36(%rip), %rax     # 0x1bbd8
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7a5a
leaq 0x80(%rbx), %r14
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r13, 0xc8(%rbx)
movq %r12, 0xd0(%rbx)
movq %r15, 0xd8(%rbx)
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x11dfa(%rip), %rsi     # 0x16004
leaq 0x11df6(%rip), %rdx     # 0x16007
movq %rsp, %rdi
callq 0x530a
leaq 0x18020(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x424f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x11dac(%rip), %rsi     # 0x16008
leaq 0x11da8(%rip), %rdx     # 0x1600b
callq 0x530a
leaq 0x17fd1(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x429e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x11d69(%rip), %rsi     # 0x16014
leaq 0x11d66(%rip), %rdx     # 0x16018
callq 0x530a
leaq 0x17f82(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x6, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x42ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x11d1f(%rip), %rsi     # 0x16019
leaq 0x11d1b(%rip), %rdx     # 0x1601c
callq 0x530a
leaq 0x17f33(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x23, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x433c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc4(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4361
jmp 0x4361
jmp 0x4361
movq %rax, %r15
jmp 0x4385
jmp 0x436c
jmp 0x436c
jmp 0x436c
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4385
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x5224
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x43a5
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::operate()
void ALU2::operate(void){
	int funct = std::get<1>(i.type());
	if(funct == FUNCT["add"]){
		lo = in1 + in2; hi = 0;
	}else if(funct == FUNCT["sub"]){
		lo = in1 - in2; hi = 0;
	}else if(funct == FUNCT["mult"]){
		lo = (long)((long)in1 * (long)in2) % (long)pow(2, 32); 
		hi = (long)(((long)in1 * (long)in2) / (long)pow(2, 32)); 
	}else if(funct == FUNCT["div"]){
		lo = in1 % in2; hi = (long)(in1 / in2);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xa8b8
movl (%r14), %ebp
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x11c25(%rip), %rsi     # 0x16004
leaq 0x11c21(%rip), %rdx     # 0x16007
leaq 0x8(%rsp), %rdi
callq 0x530a
leaq 0x17e49(%rip), %rdi     # 0x1c240
leaq 0x8(%rsp), %rsi
callq 0x5136
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x441b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x442e
movl 0xb8(%rbx), %eax
addl 0xb4(%rbx), %eax
jmp 0x4485
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x11bcb(%rip), %rsi     # 0x16008
leaq 0x11bc7(%rip), %rdx     # 0x1600b
callq 0x530a
leaq 0x17df0(%rip), %rdi     # 0x1c240
leaq 0x8(%rsp), %rsi
callq 0x5136
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4474
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x449e
movl 0xb4(%rbx), %eax
subl 0xb8(%rbx), %eax
movl %eax, 0xc0(%rbx)
xorl %eax, %eax
movl %eax, 0xbc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x11b67(%rip), %rsi     # 0x16014
leaq 0x11b64(%rip), %rdx     # 0x16018
callq 0x530a
leaq 0x17d80(%rip), %rdi     # 0x1c240
leaq 0x8(%rsp), %rsi
callq 0x5136
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x44e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x4519
movslq 0xb4(%rbx), %rax
movslq 0xb8(%rbx), %rcx
imulq %rax, %rcx
movl %ecx, 0xc0(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %rcx, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
shrq $0x20, %rax
jmp 0x448d
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x11af1(%rip), %rsi     # 0x16019
leaq 0x11aed(%rip), %rdx     # 0x1601c
callq 0x530a
leaq 0x17d05(%rip), %rdi     # 0x1c240
leaq 0x8(%rsp), %rsi
callq 0x5136
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x455f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x4493
movl 0xb4(%rbx), %eax
cltd
idivl 0xb8(%rbx)
movl %edx, 0xc0(%rbx)
jmp 0x448d
jmp 0x458c
jmp 0x45a8
jmp 0x458c
jmp 0x45a8
jmp 0x458c
jmp 0x45a8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x45ab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x45ab
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::tock()
void ALU2::tock(void){
	if(stall_cycles > 0)
		stall_cycles--;
	else {
		if(i.is_valid()){
			if(out->valid()){
				read = false;	// previous data has not been read; stall
			}else{
				read = true;
				out->write(std::make_tuple(i, lo, hi));
				Instruction reset; i = reset;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl 0xb0(%rdi), %eax
testl %eax, %eax
jle 0x48c4
decl %eax
movl %eax, 0xb0(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0xc(%rbx)
je 0x48b2
cmpl $-0x1, 0x8(%rbx)
je 0x48b2
movq 0xd0(%rbx), %r13
cmpb $0x1, 0x80(%r13)
jne 0x48ea
movb $0x0, 0xc4(%rbx)
jmp 0x48b2
leaq 0x8(%rbx), %r14
movb $0x1, %al
movb %al, 0xc4(%rbx)
movq 0xbc(%rbx), %rax
leaq 0x10(%rsp), %r15
movq %rax, -0x8(%r15)
movl $0xa, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5274
movq 0x78(%rbx), %rax
movq %rax, 0x10(%rbp)
movb $0x1, %al
movb %al, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r12, %rsi
callq 0x3140
leaq 0x58(%rbx), %r15
movq 0x80(%rsp), %rax
movq %rax, 0x78(%r13)
movq 0x8(%rsp), %rax
movq %rax, (%r13)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4991
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7a5a
movl $0xa, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48b2
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x48b2
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a17
movq 0x68(%rsp), %rsi
jmp 0x4a0f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4a17
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::flush(int)
void ALU2::flush(int id){
	if(i.get_id() > id){
		Instruction reset;
		i = reset;
		stall_cycles = 0;
		read = true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
cmpl %esi, 0x8(%rdi)
jle 0x4a95
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7a5a
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rbx), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc4(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a95
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ac0
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O3/ys1998[P]spsim/src/alu.cpp
// Function: ALU3::ALU3(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int>>*, bool*)
ALU3::ALU3(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int> >* out, bool* b){
	this->in = in; this->out = out; this->b = b;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sw"]] = LATENCY_SW;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x17118(%rip), %rax     # 0x1bc00
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7a5a
leaq 0x80(%rbx), %r14
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r13, 0xc8(%rbx)
movq %r12, 0xd0(%rbx)
movq %r15, 0xd8(%rbx)
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x114b4(%rip), %rsi     # 0x16004
leaq 0x114b0(%rip), %rdx     # 0x16007
movq %rsp, %rdi
callq 0x530a
leaq 0x176da(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4b95
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1147b(%rip), %rsi     # 0x1601d
leaq 0x11476(%rip), %rdx     # 0x1601f
callq 0x530a
leaq 0x1768b(%rip), %rdi     # 0x1c240
movq %rsp, %rsi
callq 0x5136
movq %r14, %rdi
movq %rax, %rsi
callq 0x50d0
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4be4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc0(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4c05
movq %rax, %r15
jmp 0x4c25
jmp 0x4c0c
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4c25
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x5224
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x4c45
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop