LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_info_audio
char smk_info_audio(const smk object, unsigned char * track_mask, unsigned char channels[7], unsigned char bitdepth[7], unsigned long audio_rate[7])
{
	unsigned char i;

	/* null check */
	if (object == NULL) {
		fputs("libsmacker::smk_info_audio() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	if (!track_mask && !channels && !bitdepth && !audio_rate) {
		fputs("libsmacker::smk_info_audio(object,track_mask,channels,bitdepth,audio_rate) - ERROR: Request for info with all-NULL return references\n", stderr);
		return -1;
	}

	if (track_mask) {
		*track_mask = ((object->audio[0].exists) |
				((object->audio[1].exists) << 1) |
				((object->audio[2].exists) << 2) |
				((object->audio[3].exists) << 3) |
				((object->audio[4].exists) << 4) |
				((object->audio[5].exists) << 5) |
				((object->audio[6].exists) << 6));
	}

	if (channels) {
		for (i = 0; i < 7; i ++)
			channels[i] = object->audio[i].channels;
	}

	if (bitdepth) {
		for (i = 0; i < 7; i ++)
			bitdepth[i] = object->audio[i].bitdepth;
	}

	if (audio_rate) {
		for (i = 0; i < 7; i ++)
			audio_rate[i] = object->audio[i].rate;
	}

	return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f2a5
movq %rsi, %rax
orq %rdx, %rax
orq %rcx, %rax
orq %r8, %rax
je 0x2f2ae
testq %rsi, %rsi
je 0x2f23b
movb 0x428(%rdi), %al
addb %al, %al
orb 0x3f8(%rdi), %al
movb 0x458(%rdi), %r9b
shlb $0x2, %r9b
movb 0x488(%rdi), %r10b
shlb $0x3, %r10b
orb %r9b, %r10b
movb 0x4b8(%rdi), %r9b
shlb $0x4, %r9b
orb %r10b, %r9b
movb 0x4e8(%rdi), %r10b
shlb $0x5, %r10b
orb %r9b, %r10b
movb 0x518(%rdi), %r9b
shlb $0x6, %r9b
orb %r10b, %r9b
orb %al, %r9b
movb %r9b, (%rsi)
testq %rdx, %rdx
je 0x2f25d
leaq 0x3fa(%rdi), %rax
xorl %esi, %esi
movb (%rax), %r9b
movb %r9b, (%rdx,%rsi)
incq %rsi
addq $0x30, %rax
cmpq $0x7, %rsi
jne 0x2f249
testq %rcx, %rcx
je 0x2f27f
leaq 0x3fb(%rdi), %rax
xorl %edx, %edx
movb (%rax), %sil
movb %sil, (%rcx,%rdx)
incq %rdx
addq $0x30, %rax
cmpq $0x7, %rdx
jne 0x2f26b
testq %r8, %r8
je 0x2f2a1
addq $0x400, %rdi            # imm = 0x400
xorl %eax, %eax
movq (%rdi), %rcx
movq %rcx, (%r8,%rax,8)
incq %rax
addq $0x30, %rdi
cmpq $0x7, %rax
jne 0x2f28d
xorl %eax, %eax
popq %rcx
retq
leaq 0x71194(%rip), %rdi     # 0xa0440
jmp 0x2f2b5
leaq 0x711be(%rip), %rdi     # 0xa0473
callq 0x9a3a
movb $-0x1, %al
jmp 0x2f2a3
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_enable_all
char smk_enable_all(smk object, const unsigned char mask)
{
	unsigned char i;

	/* null check */
	if (object == NULL) {
		fputs("libsmacker::smk_enable_all() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	/* set video-enable */
	object->video.enable = (mask & 0x80);

	for (i = 0; i < 7; i ++) {
		if (object->audio[i].exists)
			object->audio[i].enable = (mask & (1 << i));
	}

	return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f2f7
movl %esi, %eax
andb $-0x80, %al
movb %al, 0x50(%rdi)
addq $0x3f9, %rdi            # imm = 0x3F9
xorl %ecx, %ecx
cmpb $0x0, -0x1(%rdi)
je 0x2f2e6
movl $0x1, %eax
shll %cl, %eax
andb %sil, %al
movb %al, (%rdi)
incq %rcx
addq $0x30, %rdi
cmpq $0x7, %rcx
jne 0x2f2d4
xorl %eax, %eax
popq %rcx
retq
callq 0x9a49
movb $-0x1, %al
jmp 0x2f2f5
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_first
char smk_first(smk s)
{
	/* null check */
	if (s == NULL) {
		fputs("libsmacker::smk_first() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	s->cur_frame = 0;

	if (smk_render(s) < 0) {
		fprintf(stderr, "libsmacker::smk_first(s) - Warning: frame %lu: smk_render returned errors.\n", s->cur_frame);
		return -1;
	}

	if (s->f == 1) return SMK_LAST;

	return SMK_MORE;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2f3e8
movq %rdi, %rbx
movq $0x0, 0x20(%rdi)
callq 0x2f3ff
testb %al, %al
js 0x2f3ef
cmpq $0x1, 0x10(%rbx)
sete %al
incb %al
popq %rbx
retq
callq 0x9b01
jmp 0x2f3fb
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x9ae3
movb $-0x1, %al
jmp 0x2f3e6
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_next
char smk_next(smk s)
{
	/* null check */
	if (s == NULL) {
		fputs("libsmacker::smk_next() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	if (s->cur_frame + 1 < (s->f + s->ring_frame)) {
		s->cur_frame ++;

		if (smk_render(s) < 0) {
			fprintf(stderr, "libsmacker::smk_next(s) - Warning: frame %lu: smk_render returned errors.\n", s->cur_frame);
			return -1;
		}

		if (s->cur_frame + 1 == (s->f + s->ring_frame))
			return SMK_LAST;

		return SMK_MORE;
	} else if (s->ring_frame) {
		s->cur_frame = 1;

		if (smk_render(s) < 0) {
			fprintf(stderr, "libsmacker::smk_next(s) - Warning: frame %lu: smk_render returned errors.\n", s->cur_frame);
			return -1;
		}

		if (s->cur_frame + 1 == (s->f + s->ring_frame))
			return SMK_LAST;

		return SMK_MORE;
	}

	return SMK_DONE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2ffda
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq 0x20(%rdi), %rax
incq %rax
movzbl 0x18(%rdi), %ecx
movq 0x10(%rdi), %rdx
addq %rcx, %rdx
cmpq %rdx, %rax
jae 0x2ff9f
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
callq 0x2f3ff
testb %al, %al
jns 0x2ffb7
movq %r14, %rdi
callq 0x9c45
jmp 0x2ffe9
testb %cl, %cl
je 0x2ffd6
movq $0x1, 0x20(%rbx)
movq %rbx, %rdi
callq 0x2f3ff
testb %al, %al
js 0x2ffe1
movq 0x20(%rbx), %rax
movzbl 0x18(%rbx), %ecx
addq 0x10(%rbx), %rcx
incq %rax
cmpq %rcx, %rax
sete %al
incb %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x2ffce
callq 0x9c63
jmp 0x2ffe9
movq %r14, %rdi
callq 0x9c27
movb $-0x1, %al
jmp 0x2ffce
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_seek_keyframe
char smk_seek_keyframe(smk s, unsigned long f)
{
	/* null check */
	if (s == NULL) {
		fputs("libsmacker::smk_seek_keyframe() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	/* rewind (or fast forward!) exactly to f */
	s->cur_frame = f;

	/* roll back to previous keyframe in stream, or 0 if no keyframes exist */
	while (s->cur_frame > 0 && !(s->keyframe[s->cur_frame]))
		s->cur_frame --;

	/* render the frame: we're ready */
	if (smk_render(s) < 0) {
		fprintf(stderr, "libsmacker::smk_seek_keyframe(s,%lu) - Warning: frame %lu: smk_render returned errors.\n", f, s->cur_frame);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x30034
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x20(%rdi)
testq %rsi, %rsi
je 0x3001e
movq 0x40(%r14), %rax
leaq -0x1(%rbx), %rcx
cmpb $0x0, 0x1(%rax,%rcx)
jne 0x3001e
movq %rcx, 0x20(%r14)
addq $-0x1, %rcx
jb 0x3000d
movq %r14, %rdi
callq 0x2f3ff
testb %al, %al
js 0x3003b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x9c79
jmp 0x3005a
movq 0x9df5e(%rip), %rax     # 0xcdfa0
movq (%rax), %rdi
movq 0x20(%r14), %rcx
leaq 0x7073d(%rip), %rsi     # 0xa078d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8290
movb $-0x1, %al
jmp 0x3002c
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker_jftekwar.c
// Function: smk_render_frame
char smk_render_frame(smk s, unsigned long f)
{
    /* null check */
    if (s == NULL) {
        fputs("libsmacker::smk_render_frame() - ERROR: smk is NULL\n", stderr);
        return -1;
    }
    
    /* rewind (or fast forward!) exactly to f */
    s->cur_frame = f;
    
    /* render the frame: we're ready */
    if ( smk_render(s) < 0) {
        fprintf(stderr, "libsmacker::smk_render_frame(s,%lu) - Warning: frame %lu: smk_render returned errors.\n", f, s->cur_frame);
        goto error;
    }
    
    return 0;
    
error:
    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x30084
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x20(%rdi)
callq 0x2f3ff
testb %al, %al
js 0x3008b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x9c8f
jmp 0x300aa
movq 0x9df0e(%rip), %rax     # 0xcdfa0
movq (%rax), %rdi
movq 0x20(%r14), %rcx
leaq 0x7077a(%rip), %rsi     # 0xa081a
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8290
movb $-0x1, %al
jmp 0x3007c
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_read_file
static char smk_read_file(void * buf, const size_t size, FILE * fp)
{
	/* don't bother checking buf or fp, fread does it for us */
	size_t bytesRead = fread(buf, 1, size, fp);

	if (bytesRead != size) {
		fprintf(stderr, "libsmacker::smk_read_file(buf,%lu,fp) - ERROR: Short read, %lu bytes returned\n", (unsigned long)size, (unsigned long)bytesRead);
		perror("\tReason");
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbx
movq %rdx, %rcx
movq %rsi, %rbx
movl $0x1, %esi
movq %rbx, %rdx
callq 0x87a0
cmpq %rbx, %rax
jne 0x300cb
xorl %eax, %eax
popq %rbx
retq
movq 0x9dece(%rip), %rcx     # 0xcdfa0
movq (%rcx), %rdi
leaq 0x70ff3(%rip), %rsi     # 0xa10cf
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x8290
leaq 0x7102e(%rip), %rdi     # 0xa111e
callq 0x83f0
movb $-0x1, %al
jmp 0x300c9
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_bs_read_1
static int smk_bs_read_1(struct smk_bit_t * const bs)
{
	int ret;
	/* null check */
	assert(bs);

	/* don't die when running out of bits, but signal */
	if (bs->buffer >= bs->end) {
		fputs("libsmacker::smk_bs_read_1(): ERROR: bitstream exhausted.\n", stderr);
		return -1;
	}

	/* get next bit and store for return */
	ret = (*bs->buffer >> bs->bit_num) & 1;

	/* advance to next bit */
	if (bs->bit_num >= 7) {
		/* Out of bits in this byte: next! */
		bs->buffer ++;
		bs->bit_num = 0;
	} else
		bs->bit_num ++;

	return ret;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3013a
movq (%rdi), %rsi
cmpq 0x8(%rdi), %rsi
jae 0x3012e
movzbl (%rsi), %ecx
movl 0x10(%rdi), %edx
xorl %eax, %eax
btl %edx, %ecx
setb %cl
cmpl $0x7, %edx
jb 0x30125
incq %rsi
movq %rsi, (%rdi)
xorl %edx, %edx
jmp 0x30127
incl %edx
movb %cl, %al
movl %edx, 0x10(%rdi)
popq %rcx
retq
callq 0x9ca5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3012c
leaq 0x72121(%rip), %rdi     # 0xa2262
leaq 0x7011b(%rip), %rsi     # 0xa0263
leaq 0x7132d(%rip), %rcx     # 0xa147c
movl $0x33, %edx
callq 0x8240
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_huff8_build
static int smk_huff8_build(struct smk_huff8_t * const t, struct smk_bit_t * const bs)
{
	int bit;
	/* null check */
	assert(t);
	assert(bs);

	/* Smacker huff trees begin with a set-bit. */
	if ((bit = smk_bs_read_1(bs)) < 0) {
		fputs("libsmacker::smk_huff8_build() - ERROR: initial get_bit returned -1\n", stderr);
		return 0;
	}

	/* OK to fill out the struct now */
	t->size = 0;

	/* First bit indicates whether a tree is present or not. */
	/*  Very small or audio-only files may have no tree. */
	if (bit) {
		if (! _smk_huff8_build_rec(t, bs)) {
			fputs("libsmacker::smk_huff8_build() - ERROR: tree build failed\n", stderr);
			return 0;
		}
	} else
		t->tree[0] = 0;

	/* huff trees end with an unset-bit */
	if ((bit = smk_bs_read_1(bs)) < 0) {
		fputs("libsmacker::smk_huff8_build() - ERROR: final get_bit returned -1\n", stderr);
		return 0;
	}

	/* a 0 is expected here, a 1 generally indicates a problem! */
	if (bit) {
		fputs("libsmacker::smk_huff8_build() - ERROR: final get_bit returned 1\n", stderr);
		return 0;
	}

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x301e6
movq %rsi, %rbx
testq %rsi, %rsi
je 0x30205
movq %rdi, %r14
movq %rbx, %rdi
callq 0x300f9
testl %eax, %eax
js 0x301c4
movq $0x0, (%r14)
je 0x301a2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3042d
testl %eax, %eax
jne 0x301a9
leaq 0x713cd(%rip), %rdi     # 0xa156d
jmp 0x301dd
movw $0x0, 0x8(%r14)
movq %rbx, %rdi
callq 0x300f9
testl %eax, %eax
js 0x301cd
movl $0x1, %eax
jne 0x301d6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7135e(%rip), %rdi     # 0xa1529
jmp 0x301dd
leaq 0x713d3(%rip), %rdi     # 0xa15a7
jmp 0x301dd
leaq 0x7140c(%rip), %rdi     # 0xa15e9
callq 0x9cbb
xorl %eax, %eax
jmp 0x301bc
leaq 0x5da5c(%rip), %rdi     # 0x8dc49
leaq 0x7006f(%rip), %rsi     # 0xa0263
leaq 0x712e6(%rip), %rcx     # 0xa14e1
movl $0xb3, %edx
callq 0x8240
leaq 0x72056(%rip), %rdi     # 0xa2262
leaq 0x70050(%rip), %rsi     # 0xa0263
leaq 0x712c7(%rip), %rcx     # 0xa14e1
movl $0xb4, %edx
callq 0x8240
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_bs_read_8
static int smk_bs_read_8(struct smk_bit_t * const bs)
{
	/* null check */
	assert(bs);

	/* don't die when running out of bits, but signal */
	if (bs->buffer + (bs->bit_num > 0) >= bs->end) {
		fputs("libsmacker::smk_bs_read_8(): ERROR: bitstream exhausted.\n", stderr);
		return -1;
	}

	if (bs->bit_num) {
		/* unaligned read */
		int ret = *bs->buffer >> bs->bit_num;
		bs->buffer ++;
		return ret | (*bs->buffer << (8 - bs->bit_num) & 0xFF);
	}

	/* aligned read */
	return *bs->buffer++;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3027c
movq (%rdi), %rax
movl 0x10(%rdi), %ecx
cmpl $0x1, %ecx
movq %rax, %rdx
sbbq $-0x1, %rdx
cmpq 0x8(%rdi), %rdx
jae 0x30270
testl %ecx, %ecx
je 0x30264
movzbl (%rax), %edx
shrl %cl, %edx
leaq 0x1(%rax), %rsi
movq %rsi, (%rdi)
movzbl 0x1(%rax), %esi
movb $0x8, %al
subb %cl, %al
movl %eax, %ecx
shll %cl, %esi
movzbl %sil, %eax
orl %edx, %eax
jmp 0x3026e
leaq 0x1(%rax), %rcx
movq %rcx, (%rdi)
movzbl (%rax), %eax
popq %rcx
retq
callq 0x9cca
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3026e
leaq 0x71fdf(%rip), %rdi     # 0xa2262
leaq 0x6ffd9(%rip), %rsi     # 0xa0263
leaq 0x714ee(%rip), %rcx     # 0xa177f
movl $0x4e, %edx
callq 0x8240
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_huff8_build_rec
static int _smk_huff8_build_rec(struct smk_huff8_t * const t, struct smk_bit_t * const bs)
{
	int bit, value;
	assert(t);
	assert(bs);

	/* Make sure we aren't running out of bounds */
	if (t->size >= 511) {
		fputs("libsmacker::_smk_huff8_build_rec() - ERROR: size exceeded\n", stderr);
		return 0;
	}

	/* Read the next bit */
	if ((bit = smk_bs_read_1(bs)) < 0) {
		fputs("libsmacker::_smk_huff8_build_rec() - ERROR: get_bit returned -1\n", stderr);
		return 0;
	}

	if (bit) {
		/* Bit set: this forms a Branch node.
			what we have to do is build the left-hand branch,
			assign the "jump" address,
			then build the right hand branch from there.
		*/
		/* track the current index */
		value = t->size ++;

		/* go build the left branch */
		if (! _smk_huff8_build_rec(t, bs)) {
			fputs("libsmacker::_smk_huff8_build_rec() - ERROR: failed to build left sub-tree\n", stderr);
			return 0;
		}

		/* now go back to our current location, and
			mark our location as a "jump" */
		t->tree[value] = SMK_HUFF8_BRANCH | t->size;

		/* continue building the right side */
		if (! _smk_huff8_build_rec(t, bs)) {
			fputs("libsmacker::_smk_huff8_build_rec() - ERROR: failed to build right sub-tree\n", stderr);
			return 0;
		}
	} else {
		/* Bit unset signifies a Leaf node. */
		/* Attempt to read value */
		if ((value = smk_bs_read_8(bs)) < 0) {
			fputs("libsmacker::_smk_huff8_build_rec() - ERROR: get_byte returned -1\n", stderr);
			return 0;
		}

		/* store to tree */
		t->tree[t->size ++] = value;
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x1ff, (%rdi)          # imm = 0x1FF
jae 0x304b6
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x300f9
testl %eax, %eax
js 0x304bd
je 0x30494
movq (%rbx), %r15
leaq 0x1(%r15), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3042d
testl %eax, %eax
je 0x304c4
movl $0x8000, %eax           # imm = 0x8000
orl (%rbx), %eax
movslq %r15d, %rcx
movw %ax, 0x8(%rbx,%rcx,2)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3042d
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x304d2
callq 0x9d64
jmp 0x304d0
movq %r14, %rdi
callq 0x30224
testl %eax, %eax
js 0x304cb
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movw %ax, 0x8(%rbx,%rcx,2)
movl $0x1, %eax
jmp 0x304d2
callq 0x9dbc
jmp 0x304d0
callq 0x9da6
jmp 0x304d0
callq 0x9d7a
jmp 0x304d0
callq 0x9d90
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_huff8_lookup
static int smk_huff8_lookup(const struct smk_huff8_t * const t, struct smk_bit_t * const bs)
{
	int bit, index = 0;
	/* null check */
	assert(t);
	assert(bs);

	while (t->tree[index] & SMK_HUFF8_BRANCH) {
		if ((bit = smk_bs_read_1(bs)) < 0) {
			fputs("libsmacker::smk_huff8_lookup() - ERROR: get_bit returned -1\n", stderr);
			return -1;
		}

		if (bit) {
			/* take the right branch */
			index = t->tree[index] & SMK_HUFF8_LEAF_MASK;
		} else {
			/* take the left branch */
			index ++;
		}
	}

	/* at leaf node.  return the value at this point. */
	return t->tree[index];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x30547
movq %rsi, %rbx
testq %rsi, %rsi
je 0x30566
movq %rdi, %r14
movzwl 0x8(%rdi), %eax
testw %ax, %ax
jns 0x3052d
addq $0x8, %r14
xorl %ebp, %ebp
movq %r14, %r15
movq %rbx, %rdi
callq 0x300f9
testl %eax, %eax
js 0x3053b
je 0x3051b
movzwl (%r15), %ebp
andl $0x7fff, %ebp           # imm = 0x7FFF
jmp 0x3051d
incl %ebp
movslq %ebp, %rax
leaq (%r14,%rax,2), %r15
movzwl (%r15), %eax
testw %ax, %ax
js 0x30501
movzwl %ax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x9dd2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x30530
leaq 0x5d6fb(%rip), %rdi     # 0x8dc49
leaq 0x6fd0e(%rip), %rsi     # 0xa0263
leaq 0x714d8(%rip), %rcx     # 0xa1a34
movl $0xde, %edx
callq 0x8240
leaq 0x71cf5(%rip), %rdi     # 0xa2262
leaq 0x6fcef(%rip), %rsi     # 0xa0263
leaq 0x714b9(%rip), %rcx     # 0xa1a34
movl $0xdf, %edx
callq 0x8240
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_huff16_lookup
static int smk_huff16_lookup(struct smk_huff16_t * const t, struct smk_bit_t * const bs)
{
	int bit, value, index = 0;
	/* null check */
	assert(t);
	assert(bs);

	while (t->tree[index] & SMK_HUFF16_BRANCH) {
		if ((bit = smk_bs_read_1(bs)) < 0) {
			fputs("libsmacker::smk_huff16_lookup() - ERROR: get_bit returned -1\n", stderr);
			return -1;
		}

		if (bit) {
			/* take the right branch */
			index = t->tree[index] & SMK_HUFF16_LEAF_MASK;
		} else {
			/* take the left branch */
			index ++;
		}
	}

	/* Get the value at this point */
	value = t->tree[index];

	if (value & SMK_HUFF16_CACHE) {
		/* uses cached value instead of actual value */
		value = t->cache[value & SMK_HUFF16_LEAF_MASK];
	}

	if (t->cache[0] != value) {
		/* Update the cache, by moving val to the front of the queue,
			if it isn't already there. */
		t->cache[2] = t->cache[1];
		t->cache[1] = t->cache[0];
		t->cache[0] = value;
	}

	return value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x30622
movq %rsi, %r14
testq %rsi, %rsi
je 0x30641
movq %rdi, %rbx
movq (%rdi), %rax
movl (%rax), %eax
testl %eax, %eax
jns 0x305e4
xorl %r12d, %r12d
movl $0x3fffffff, %ebp       # imm = 0x3FFFFFFF
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x300f9
testl %eax, %eax
js 0x30616
je 0x305d3
movq (%rbx), %rax
movl (%rax,%r12,4), %r15d
andl %ebp, %r15d
jmp 0x305d6
incl %r15d
movq (%rbx), %rax
movslq %r15d, %r12
movl (%rax,%r12,4), %eax
testl %eax, %eax
js 0x305b9
cmpl $0x40000000, %eax       # imm = 0x40000000
jb 0x305f5
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movzwl 0x10(%rbx,%rax,2), %eax
movzwl 0x10(%rbx), %ecx
cmpl %ecx, %eax
je 0x3060d
movzwl 0x12(%rbx), %edx
movw %dx, 0x14(%rbx)
movw %cx, 0x12(%rbx)
movw %ax, 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x9de8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3060d
leaq 0x5d620(%rip), %rdi     # 0x8dc49
leaq 0x6fc33(%rip), %rsi     # 0xa0263
leaq 0x71b1f(%rip), %rcx     # 0xa2156
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x8240
leaq 0x71c1a(%rip), %rdi     # 0xa2262
leaq 0x6fc14(%rip), %rsi     # 0xa0263
leaq 0x71b00(%rip), %rcx     # 0xa2156
movl $0x1c5, %edx            # imm = 0x1C5
callq 0x8240
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/startgtk_game.c
// Function: setup_messages_mode
static void setup_messages_mode(gboolean allowcancel)
{
    gtk_notebook_set_current_page(GTK_NOTEBOOK(controls.tabs), TAB_MESSAGES);

    // Disable all the controls on the Configuration page.
    gtk_container_foreach(GTK_CONTAINER(controls.configbox),
            foreach_gtk_widget_set_sensitive, (gpointer)FALSE);
    gtk_widget_set_sensitive(controls.alwaysshowcheck, FALSE);

    gtk_widget_set_sensitive(controls.chooseimportbutton, FALSE);
    gtk_widget_set_sensitive(controls.importinfobutton, FALSE);

    gtk_widget_set_sensitive(controls.cancelbutton, allowcancel);
    gtk_widget_set_sensitive(controls.startbutton, FALSE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x2fb3e5(%rip), %r14    # 0x32be70
callq 0x8fd0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
movl $0x1, %esi
callq 0x9230
movq 0x2fb3c9(%rip), %r14    # 0x32be78
callq 0x8b90
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0xdc1(%rip), %rsi       # 0x31887
movq %rax, %rdi
xorl %edx, %edx
callq 0x8bb0
movq 0x2fb3a9(%rip), %rdi    # 0x32be80
xorl %esi, %esi
callq 0x91a0
movq 0x2fb3e3(%rip), %rdi    # 0x32bec8
xorl %esi, %esi
callq 0x91a0
movq 0x2fb3dd(%rip), %rdi    # 0x32bed0
xorl %esi, %esi
callq 0x91a0
movq 0x2fb367(%rip), %rdi    # 0x32be68
movl %ebx, %esi
callq 0x91a0
movq 0x2fb351(%rip), %rdi    # 0x32be60
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x91a0
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/startgtk_game.c
// Function: startwin_puts_inner
static gboolean startwin_puts_inner(gpointer str)
{
    GtkTextBuffer *textbuffer;
    GtkTextIter enditer;
    GtkTextMark *mark;
    const char *aptr, *bptr;

    textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(controls.messagestext));

    gtk_text_buffer_get_end_iter(textbuffer, &enditer);
    for (aptr = bptr = (const char *)str; *aptr != 0; ) {
        switch (*bptr) {
            case '\b':
                if (bptr > aptr) {
                    // Insert any normal characters seen so far.
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr)-1);
                }
                gtk_text_buffer_backspace(textbuffer, &enditer, FALSE, TRUE);
                aptr = ++bptr;
                break;
            case 0:
                if (bptr > aptr) {
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr));
                }
                aptr = bptr;
                break;
            default:
                bptr++;
                break;
        }
    }

    mark = gtk_text_buffer_create_mark(textbuffer, NULL, &enditer, 1);
    gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(controls.messagestext), mark, 0.0, FALSE, 0.0, 1.0);
    gtk_text_buffer_delete_mark(textbuffer, mark);

    free(str);
    return FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x2fb2ac(%rip), %r14    # 0x32be88
callq 0x8990
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8350
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x8f00
cmpb $0x0, (%rbx)
je 0x30c7f
movq %rsp, %r12
movq %rbx, %r13
movq %rbx, %rdx
movzbl (%r13), %eax
testl %eax, %eax
je 0x30c4f
cmpl $0x8, %eax
jne 0x30c69
cmpq %rdx, %r13
jbe 0x30c38
movl %edx, %ecx
notl %ecx
addl %r13d, %ecx
movq %r14, %rdi
movq %r12, %rsi
callq 0x8c60
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x87f0
incq %r13
jmp 0x30c64
cmpq %rdx, %r13
jbe 0x30c64
movl %r13d, %ecx
subl %edx, %ecx
movq %r14, %rdi
movq %r12, %rsi
callq 0x8c60
movq %r13, %rax
jmp 0x30c72
movq %r13, %rax
incq %rax
movq %rdx, %r13
movq %r13, %rdx
cmpb $0x0, (%r13)
movq %rax, %r13
jne 0x30c13
movq %rsp, %rdx
movq %r14, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x8e50
movq %rax, %r12
movq 0x2fb1ed(%rip), %rdi    # 0x32be88
movq %r15, %rsi
callq 0x8160
movsd 0x71535(%rip), %xmm2    # 0xa21e0
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x8030
movq %r14, %rdi
movq %r12, %rsi
callq 0x8050
movq %rbx, %rdi
callq 0x8270
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/startgtk_game.c
// Function: on_importinfobutton_clicked
static void on_importinfobutton_clicked(GtkButton *button, gpointer user_data)
{
    GtkWidget *dialog;

    (void)button; (void)user_data;

    dialog = gtk_message_dialog_new(startwin, GTK_DIALOG_DESTROY_WITH_PARENT,
        GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
        "JFTekWar can scan locations of your choosing for TekWar game data");
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog),
        "Click the 'Choose a location...' button, then locate a folder to scan.\n\n"
        "Common locations to check include:\n"
        " • CD/DVD drives\n"
        " • Unzipped data from copies of the full DOS game");
    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
}

// Assembly:
pushq %rbx
movq 0x2fa933(%rip), %rdi    # 0x32be50
leaq 0x70eae(%rip), %r8      # 0xa23d2
movl $0x2, %esi
xorl %edx, %edx
movl $0x2, %ecx
xorl %eax, %eax
callq 0x8d30
movq %rax, %rbx
callq 0x8d80
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x70ec3(%rip), %rsi     # 0xa2414
movq %rax, %rdi
xorl %eax, %eax
callq 0x8ec0
callq 0x8980
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8360
movq %rbx, %rdi
popq %rbx
jmp 0x81e0
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mmulti.c
// Function: initmultiplayers_reset
static void initmultiplayers_reset(void)
{
	int i;

	initcrc16();
	memset(icnt0,0,sizeof(icnt0));
	memset(ocnt0,0,sizeof(ocnt0));
	memset(ocnt1,0,sizeof(ocnt1));
	memset(ipak,0,sizeof(ipak));
	//memset(opak,0,sizeof(opak)); //Don't need to init opak
	//memset(pakmem,0,sizeof(pakmem)); //Don't need to init pakmem
#if (SIMLAG > 1)
	memset(simlagcnt,0,sizeof(simlagcnt));
#endif

	lastsendtims[0] = GetTickCount();
	for(i=0;i<MAXPLAYERS;i++) {
		lastsendtims[i] = lastsendtims[0];
		lastrecvtims[i] = prevlastrecvtims[i] = 0;
		connectpoint2[i] = -1;
		playerslive[i] = 0;
	}
	connecthead = 0;
	numplayers = 1; myconnectindex = 0;

	memset(otherhost,0,sizeof(otherhost));
}

// Assembly:
xorl %eax, %eax
leaq 0xb5857c(%rip), %rcx    # 0xbb2e10
movl %eax, %edx
shll $0x8, %edx
movl $0xfffffff8, %esi       # imm = 0xFFFFFFF8
xorl %edi, %edi
movl %edi, %r8d
addl %edi, %r8d
movzwl %r8w, %r8d
movl %r8d, %r9d
xorl $0x1021, %r9d           # imm = 0x1021
movl %edx, %r10d
xorw %di, %r10w
movl %r9d, %edi
cmovnsl %r8d, %edi
addl %edx, %edx
andl $0xfe00, %edx           # imm = 0xFE00
incl %esi
jne 0x5a8a0
movl %edi, (%rcx,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x5a894
pushq %rbx
pxor %xmm0, %xmm0
movdqa %xmm0, 0x748487(%rip)   # 0x7a2d70
movdqa %xmm0, 0x74846f(%rip)   # 0x7a2d60
movdqa %xmm0, 0x748457(%rip)   # 0x7a2d50
movdqa %xmm0, 0x74843f(%rip)   # 0x7a2d40
movdqa %xmm0, 0x750477(%rip)   # 0x7aad80
movdqa %xmm0, 0x75047f(%rip)   # 0x7aad90
movdqa %xmm0, 0x750487(%rip)   # 0x7aada0
movdqa %xmm0, 0x75048f(%rip)   # 0x7aadb0
movdqa %xmm0, 0x750497(%rip)   # 0x7aadc0
movdqa %xmm0, 0x75049f(%rip)   # 0x7aadd0
movdqa %xmm0, 0x7504a7(%rip)   # 0x7aade0
movdqa %xmm0, 0x7504af(%rip)   # 0x7aadf0
leaq 0x748438(%rip), %rdi    # 0x7a2d80
xorl %ebx, %ebx
movl $0x8000, %edx           # imm = 0x8000
xorl %esi, %esi
callq 0x8440
callq 0x5ba97
movl %eax, 0x74829f(%rip)    # 0x7a2c00
pxor %xmm0, %xmm0
movdqa %xmm0, 0x748243(%rip)   # 0x7a2bb0
movdqa %xmm0, 0x74824b(%rip)   # 0x7a2bc0
movdqa %xmm0, 0x748253(%rip)   # 0x7a2bd0
movdqa %xmm0, 0x74825b(%rip)   # 0x7a2be0
movdqa %xmm0, 0x7481e3(%rip)   # 0x7a2b70
movdqa %xmm0, 0x7481eb(%rip)   # 0x7a2b80
movdqa %xmm0, 0x7481f3(%rip)   # 0x7a2b90
movdqa %xmm0, 0x7481fb(%rip)   # 0x7a2ba0
xorps %xmm1, %xmm1
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x74816c(%rip)   # 0x7a2b20
movdqa %xmm0, 0x748174(%rip)   # 0x7a2b30
movdqa %xmm0, 0x74817c(%rip)   # 0x7a2b40
movdqa %xmm0, 0x748184(%rip)   # 0x7a2b50
movaps %xmm1, 0x74821d(%rip)   # 0x7a2bf0
leaq 0x748226(%rip), %rax    # 0x7a2c00
movl 0x748220(%rip), %ecx    # 0x7a2c00
movl %ecx, (%rbx,%rax)
addq $0x4, %rbx
cmpq $0x40, %rbx
jne 0x5a9da
xorl %eax, %eax
movl %eax, 0x74811b(%rip)    # 0x7a2b10
movl $0x1, 0x74810d(%rip)    # 0x7a2b0c
movl %eax, 0x7480ff(%rip)    # 0x7a2b04
leaq 0x747724(%rip), %rdi    # 0x7a2130
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
popq %rbx
jmp 0x8440
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mmulti.c
// Function: presentaddress
static const char *presentaddress(struct sockaddr *a) {
	static char str[128+32];
	char addr[128];
	int port;

	if (a->sa_family == AF_INET) {
		struct sockaddr_in *s = (struct sockaddr_in *)a;
		inet_ntop(AF_INET, &s->sin_addr, addr, sizeof(addr));
		port = ntohs(s->sin_port);
	} else if (a->sa_family == AF_INET6) {
		struct sockaddr_in6 *s = (struct sockaddr_in6 *)a;
		strcpy(addr, "[");
		inet_ntop(AF_INET6, &s->sin6_addr, addr+1, sizeof(addr)-2);
		strcat(addr, "]");
		port = ntohs(s->sin6_port);
	} else {
		return NULL;
	}

	strcpy(str, addr);
	sprintf(addr, ":%d", port);
	strcat(str, addr);

	return str;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movzwl (%rdi), %eax
cmpl $0xa, %eax
je 0x5b0e4
cmpl $0x2, %eax
jne 0x5b150
leaq 0x4(%rbx), %rsi
movq %rsp, %rdx
movl $0x2, %edi
movl $0x80, %ecx
callq 0x82c0
jmp 0x5b110
leaq 0x1(%rsp), %rdx
movw $0x5b, -0x1(%rdx)
leaq 0x8(%rbx), %rsi
movl $0xa, %edi
movl $0x7e, %ecx
callq 0x82c0
movq %rsp, %rdi
callq 0x85a0
movw $0x5d, (%rsp,%rax)
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %ebp
leaq 0xb580ee(%rip), %rbx    # 0xbb3210
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x85b0
leaq 0x489e2(%rip), %rsi     # 0xa3b19
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x8f20
movq %rbx, %rdi
movq %r14, %rsi
callq 0x89e0
jmp 0x5b152
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mmulti.c
// Function: sendpacket
void sendpacket (int other, unsigned char *bufptr, int messleng)
{
	if (numplayers < 2) return;

	if (pakmemi+messleng+2 > (int)sizeof(pakmem)) pakmemi = 1;
	opak[other][ocnt1[other]&(FIFSIZ-1)] = pakmemi;
	*(short *)&pakmem[pakmemi] = messleng;
	memcpy(&pakmem[pakmemi+2],bufptr,messleng); pakmemi += messleng+2;
	ocnt1[other]++;

	dosendpackets(other);
}

// Assembly:
cmpl $0x2, 0x746e13(%rip)    # 0x7a2b0c
jge 0x5bcfc
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl 0x84b64(%rip), %eax     # 0xe0870
addl %edx, %eax
cmpl $0x3fffff, %eax         # imm = 0x3FFFFF
jl 0x5bd1f
movl $0x1, 0x84b51(%rip)     # 0xe0870
movslq 0x84b4a(%rip), %r15     # 0xe0870
movslq %edi, %r14
leaq 0x74f090(%rip), %r12    # 0x7aadc0
movl (%r12,%r14,4), %ebp
movl %ebp, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movq %r14, %rcx
shlq $0xb, %rcx
leaq 0x74f0b7(%rip), %rdx    # 0x7aae00
addq %rcx, %rdx
movl %r15d, (%rdx,%rax,4)
leaq 0x7570a9(%rip), %rax    # 0x7b2e00
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
movw %bx, -0x2(%rdi)
movslq %ebx, %rdx
callq 0x80e0
leal (%rbx,%r15), %eax
addl $0x2, %eax
movl %eax, 0x84af8(%rip)     # 0xe0870
incl %ebp
movl %ebp, (%r12,%r14,4)
movl %r14d, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5baef
// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/test-dissect.c
// Function: r_symbol
static void r_symbol(unsigned mode, struct position *pos, struct symbol *sym)
{
	print_usage(pos, sym, mode);

	if (!sym->ident)
		sym->ident = built_in_ident("__asm__");

	printf("%c %c %-32.*s %s\n",
		symscope(sym), sym->kind, sym->ident->len, sym->ident->name,
		show_typename(sym->ctype.base_type));

	switch (sym->kind) {
	case 'd':
		break;
	case 's':
		if (sym->type == SYM_STRUCT || sym->type == SYM_UNION)
			break;
		goto err;
	case 't':
		break;
	case 'f':
		if (sym->type != SYM_BAD && sym->ctype.base_type->type != SYM_FN)
			goto err;
	case 'v':
		if (sym->type == SYM_NODE || sym->type == SYM_BAD)
			break;
		goto err;
	default:
		goto err;
	}

	return;
err:
	warning(*pos, "r_symbol bad sym type=%d kind=%d", sym->type, sym->kind);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %esi
movq %rbx, %rdi
callq 0xec32
cmpq $0x0, 0x18(%r14)
jne 0xea20
leaq 0x335ed(%rip), %rdi     # 0x42004
callq 0x20b30
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0xed00
movzbl %al, %ebp
movsbl 0xd0(%r14), %r15d
movq 0x18(%r14), %r12
movq 0x60(%r14), %rdi
movzbl 0x10(%r12), %r13d
addq $0x12, %r12
callq 0x1c05c
leaq 0x335bb(%rip), %rdi     # 0x4200c
movl %ebp, %esi
movl %r15d, %edx
movl %r13d, %ecx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xe0f0
movzbl 0xd0(%r14), %eax
cmpl $0x72, %eax
jle 0xea90
cmpl $0x76, %eax
je 0xeaa9
cmpl $0x74, %eax
je 0xeab7
cmpl $0x73, %eax
jne 0xeac6
movzbl (%r14), %ecx
addl $-0x7, %ecx
cmpl $0x2, %ecx
jb 0xeab7
jmp 0xeac6
cmpl $0x64, %eax
je 0xeab7
cmpl $0x66, %eax
jne 0xeac6
cmpb $0x10, (%r14)
je 0xeaa9
movq 0x60(%r14), %rcx
cmpb $0x5, (%rcx)
jne 0xeac6
movzbl (%r14), %ecx
cmpl $0x3, %ecx
je 0xeab7
cmpl $0x10, %ecx
jne 0xeac6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %ecx
movzbl (%r14), %edx
movq (%rbx), %rdi
leaq 0x33547(%rip), %rsi     # 0x4201e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x102f4
// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/test-dissect.c
// Function: r_member
static void r_member(unsigned mode, struct position *pos, struct symbol *sym, struct symbol *mem)
{
	struct ident *ni, *si, *mi;

	print_usage(pos, sym, mode);

	ni = built_in_ident("?");
	si = sym->ident ?: ni;
	/* mem == NULL means entire struct accessed */
	mi = mem ? (mem->ident ?: ni) : built_in_ident("*");

	printf("%c m %.*s.%-*.*s %s\n",
		symscope(sym), si->len, si->name,
		32-1 - si->len, mi->len, mi->name,
		show_typename(mem ? mem->ctype.base_type : sym));

	if (sym->ident && sym->kind != 's')
		warning(*pos, "r_member bad sym type=%d kind=%d", sym->type, sym->kind);
	if (mem && mem->kind != 'm')
		warning(*pos, "r_member bad mem->kind = %d", mem->kind);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rax
movl %edi, %esi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0xec32
leaq 0x3d343(%rip), %rdi     # 0x4be5c
callq 0x20b30
movq 0x18(%r15), %r12
testq %r12, %r12
cmoveq %rax, %r12
testq %r14, %r14
je 0xeb3e
movq %rax, %r13
movq 0x18(%r14), %rax
testq %rax, %rax
cmovneq %rax, %r13
jmp 0xeb4d
leaq 0x3d60b(%rip), %rdi     # 0x4c150
callq 0x20b30
movq %rax, %r13
movq %r15, %rdi
callq 0xed00
movzbl 0x10(%r12), %ebp
addq $0x12, %r12
movl $0x1f, %ebx
subl %ebp, %ebx
leaq 0x12(%r13), %rcx
movq %rcx, 0x18(%rsp)
movzbl %al, %eax
movl %eax, 0xc(%rsp)
movzbl 0x10(%r13), %r13d
movq %r15, %rdi
testq %r14, %r14
je 0xeb87
movq 0x60(%r14), %rdi
movq %r14, 0x20(%rsp)
callq 0x1c05c
movq %rax, %r10
leaq 0x334d5(%rip), %rdi     # 0x42070
movl 0xc(%rsp), %esi
movl %ebp, %edx
movq %r12, %rcx
movl %ebx, %r8d
movl %r13d, %r9d
xorl %eax, %eax
pushq %r10
pushq 0x20(%rsp)
callq 0xe0f0
addq $0x10, %rsp
cmpq $0x0, 0x18(%r15)
je 0xebe9
movsbl 0xd0(%r15), %ecx
cmpl $0x73, %ecx
je 0xebe9
movzbl (%r15), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x334a3(%rip), %rsi     # 0x42085
xorl %eax, %eax
callq 0x102f4
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xebff
movsbl 0xd0(%rax), %edx
cmpl $0x6d, %edx
jne 0xec0e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x33489(%rip), %rsi     # 0x420a6
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x102f4
// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/test-dissect.c
// Function: print_usage
static void print_usage(struct position *pos, struct symbol *sym, unsigned mode)
{
	static unsigned curr_stream = -1;
	static struct ident null;
	struct ident *ctx = &null;

	if (curr_stream != pos->stream) {
		curr_stream = pos->stream;
		printf("\nFILE: %s\n\n", stream_name(curr_stream));
	}

	if (dissect_ctx)
		ctx = dissect_ctx->ident;

	printf("%4d:%-3d %-16.*s %s ",
		pos->line, pos->pos, ctx->len, ctx->name, show_mode(mode));

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %edi
shrl $0x6, %edi
andl $0x3fff, %edi           # imm = 0x3FFF
cmpl %edi, 0x54574(%rip)     # 0x631c0
je 0xec6a
movl %edi, 0x5456c(%rip)     # 0x631c0
callq 0x20120
leaq 0x333df(%rip), %rdi     # 0x4203f
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
leaq 0x5993f(%rip), %rax     # 0x685b0
movq (%rax), %rax
testq %rax, %rax
je 0xec7f
movq 0x18(%rax), %r8
jmp 0xec86
leaq 0x59902(%rip), %r8      # 0x68588
movq (%r14), %rsi
movzbl 0x10(%r8), %ecx
cmpl $-0x1, %ebx
je 0xecd1
movl %ebx, %eax
andl $0x3, %eax
leaq 0x333c1(%rip), %rdx     # 0x42060
movb (%rax,%rdx), %al
movb %al, 0x598f8(%rip)      # 0x685a0
leaq 0x598f1(%rip), %r9      # 0x685a0
movl %ebx, %eax
shrl $0x2, %eax
andl $0x3, %eax
movb (%rax,%rdx), %al
movb %al, 0x598e1(%rip)      # 0x685a1
shrl $0xa, %ebx
andl $0x3, %ebx
movb (%rbx,%rdx), %al
movb %al, 0x598d3(%rip)      # 0x685a2
jmp 0xecd8
leaq 0x34be4(%rip), %r9      # 0x438bc
addq $0x12, %r8
movl %esi, %edx
shrl $0x16, %edx
shrq $0x20, %rsi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0x33359(%rip), %rdi     # 0x4204b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe0f0
// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/test-dissect.c
// Function: symscope
static char symscope(struct symbol *sym)
{
	if (sym_is_local(sym)) {
		if (!dissect_ctx)
			warning(sym->pos, "no context");
		return '.';
	}
	return ' ';
}

// Assembly:
pushq %rbx
movq 0x30(%rdi), %rax
leaq 0x57e0c(%rip), %rcx     # 0x66b18
movb $0x20, %bl
cmpq %rax, (%rcx)
je 0xed40
leaq 0x57e06(%rip), %rcx     # 0x66b20
cmpq %rax, (%rcx)
je 0xed40
leaq 0x5988a(%rip), %rax     # 0x685b0
movb $0x2e, %bl
cmpq $0x0, (%rax)
jne 0xed40
movq 0x4(%rdi), %rdi
leaq 0x3332c(%rip), %rsi     # 0x42065
xorl %eax, %eax
callq 0x102f4
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/parsenum/../../util/parsenum.h
// Function: parsenum_float
static inline double
parsenum_float(const char * s, double min, double max, int trailing)
{
	char * eptr;
	double val;

	/* Sanity check. */
	assert(s != NULL);

	val = strtod(s, &eptr);
	if (eptr == s || (!trailing && (*eptr != '\0')))
		errno = EINVAL;
	else if ((val < min) || (val > max))
		errno = ERANGE;
	return (val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
testq %rdi, %rdi
je 0x3a09
movl %esi, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x10a0
movq (%r15), %rax
movl $0x16, %ebp
cmpq %r14, %rax
je 0x39ed
testl %ebx, %ebx
je 0x39e8
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
movl $0x22, %ebp
ja 0x39ed
ucomisd 0x8(%rsp), %xmm0
jbe 0x39fe
jmp 0x39ed
cmpb $0x0, (%rax)
je 0x39ce
movsd %xmm0, (%rsp)
callq 0x1080
movsd (%rsp), %xmm0
movl %ebp, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1420(%rip), %rdi      # 0x4e30
leaq 0x1423(%rip), %rsi      # 0x4e3a
leaq 0x1432(%rip), %rcx      # 0x4e50
movl $0x95, %edx
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/parsenum/main.c
// Function: parsenum_equal
static int
parsenum_equal(double x, double y)
{

#if defined(__clang__)
	_Pragma("clang diagnostic push")
	_Pragma("clang diagnostic ignored \"-Wconversion\"")
	_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"")
#endif

	/* Check special status. */
	if (fpclassify(x) != fpclassify(y))
		return (0);

	/* Deal with NANs. */
	if (isnan(x) && isnan(y))
		return (1);

	/* If signs do not match, the numbers are not equal. */
	if (signbit(x) != signbit(y))
		return (0);

	/* Deal with infinities. */
	if (isinf(x) && isinf(y))
		return (1);

	/* Deal with zeros. */
	if ((fpclassify(x) == FP_ZERO) && (fpclassify(y) == FP_ZERO))
		return (1);

#if defined(__clang__)
	_Pragma("clang diagnostic pop")
#endif

	/* Deal with real numbers. */
	if ((fabs(x - y) < 1) && (fabs(x - y) <= fabs(x + y) * 1e-6))
		return (1);

	/* Not equal. */
	return (0);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x10c0
movl %eax, %ebx
movsd 0x8(%rsp), %xmm0
callq 0x10c0
cmpl %eax, %ebx
jne 0x3c1a
movl %eax, %ecx
movapd 0x10(%rsp), %xmm2
ucomisd %xmm2, %xmm2
movl $0x1, %eax
movsd 0x8(%rsp), %xmm3
jnp 0x3ba7
ucomisd %xmm3, %xmm3
jp 0x3c1c
movq %xmm2, %rdx
movq %xmm3, %rsi
movq %rsi, %rdi
xorq %rdx, %rdi
js 0x3c1a
btrq $0x3f, %rdx
movabsq $0x7ff0000000000000, %rdi # imm = 0x7FF0000000000000
xorq %rdi, %rdx
btrq $0x3f, %rsi
xorq %rdi, %rsi
orq %rdx, %rsi
je 0x3c1c
xorl $0x2, %ebx
xorl $0x2, %ecx
orl %ebx, %ecx
je 0x3c1c
movapd %xmm2, %xmm0
subsd %xmm3, %xmm0
andpd 0x52e(%rip), %xmm0      # 0x4120
movsd 0x4f6(%rip), %xmm1      # 0x40f0
ucomisd %xmm0, %xmm1
jbe 0x3c1a
addsd %xmm3, %xmm2
andpd 0x514(%rip), %xmm2      # 0x4120
mulsd 0x4e4(%rip), %xmm2      # 0x40f8
ucomisd %xmm0, %xmm2
jae 0x3c1c
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/bench/hotspot_read/main.c
// Function: hotspotread
static int
hotspotread(struct wire_requestqueue * Q, uint64_t N)
{
	struct hotspotread_state C;
	uint8_t buf[40];	/* dummy */

	/* Initialize. */
	C.Q = Q;
	C.Nip = 0;
	C.Xmax = N / 65536;
	C.X = 0;
	C.Y = 65536;
	C.failed = 0;
	C.done = 0;

	/* Allocate key structure. */
	memset(buf, 0, 40);
	if ((C.key = kvldskey_create(buf, 40)) == NULL)
		goto err0;

	/* Prepare benchmark time handling. */
	if ((C.B = bench_init(BENCHMARK_START, BENCHMARK_SECONDS)) == NULL) {
		warn0("bench_init");
		goto err1;
	}

	/* Send an initial batch of 4096 requests. */
	if (sendbatch(&C))
		goto err2;

	/* Wait until we've finished. */
	if (events_spin(&C.done) || C.failed) {
		warnp("SET request failed");
		goto err2;
	}

	/* Print median number of reads performed in a single second. */
	printf("%" PRIu64 "\n", bench_median(C.B));

	/* Free the key structure. */
	bench_free(C.B);
	kvldskey_free(C.key);

	/* Success! */
	return (0);

err2:
	bench_free(C.B);
err1:
	kvldskey_free(C.key);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
shrq $0x10, %rsi
movq %rsi, 0x30(%rsp)
movq $0x10000, 0x28(%rsp)    # imm = 0x10000
xorl %eax, %eax
movq %rax, 0x38(%rsp)
leaq 0x50(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movl $0x28, %esi
callq 0x5800
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x2772
movl $0x32, %edi
movl $0xa, %esi
callq 0x5298
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x2779
leaq 0x8(%rsp), %rdi
callq 0x281d
testl %eax, %eax
je 0x27ac
movq 0x48(%rsp), %rdi
callq 0x55d0
jmp 0x2792
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x27a1
leaq 0xa9a2(%rip), %rdi      # 0xd122
xorl %eax, %eax
callq 0x5173
callq 0x2090
movl $0x0, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x40(%rsp), %rdi
callq 0x2040
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
retq
leaq 0x3c(%rsp), %rbx
movq %rbx, %rdi
callq 0x2c01
orl -0x4(%rbx), %eax
je 0x27e1
callq 0x2090
cmpl $0x0, (%rax)
je 0x280a
movq %rax, %rbx
leaq 0xa95b(%rip), %rdi      # 0xd12d
xorl %eax, %eax
callq 0x5054
movl $0x0, (%rbx)
jmp 0x2766
movq 0x48(%rsp), %rdi
callq 0x5565
leaq 0xa94e(%rip), %rdi      # 0xd140
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movq 0x48(%rsp), %rdi
callq 0x55d0
jmp 0x2797
leaq 0xa91c(%rip), %rdi      # 0xd12d
xorl %eax, %eax
callq 0x5173
jmp 0x2766
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/bench/hotspot_read/main.c
// Function: sendbatch
static int
sendbatch(struct hotspotread_state * C)
{

	while (C->Nip < 4096) {
		/* Do we need to pick a new batch? */
		if (C->Y == 65536) {
			C->X = (size_t)random() % C->Xmax;
			C->Y = 0;
		}

		/* Generate a key. */
		mkkey(C->X, C->Y++, C->key->buf);

		/* Send the request. */
		if (proto_kvlds_request_get(C->Q, C->key,
		    callback_get, C))
			goto err0;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

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

// Assembly:
cmpq $0xfff, 0x10(%rdi)      # imm = 0xFFF
ja 0x289f
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7a(%rip), %r14        # 0x28af
cmpq $0x10000, 0x20(%rbx)    # imm = 0x10000
jne 0x2856
callq 0x2200
xorl %edx, %edx
divq 0x28(%rbx)
movq %rdx, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
leaq 0x1(%rsi), %rax
movq %rax, 0x20(%rbx)
movq 0x38(%rbx), %rdx
incq %rdx
callq 0x55f8
movq (%rbx), %rdi
movq 0x38(%rbx), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6356
testl %eax, %eax
jne 0x28a2
movq 0x10(%rbx), %rax
incq %rax
movq %rax, 0x10(%rbx)
cmpq $0x1000, %rax           # imm = 0x1000
jb 0x2835
xorl %eax, %eax
jmp 0x28a7
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/pattern_match/ac_auto/ac_auto.c
// Function: compare
int compare(void *args, int i, int j) {
    char **        args_patterns = (char **)(((void **)args)[0]);
    ac_tree_node **args_nodes = (ac_tree_node **)(((void **)args)[1]);

    int res = args_nodes[j]->match_number - args_nodes[i]->match_number;
    if (res == 0) {
        res = compare_string(args_patterns[i], args_patterns[j]);
    }
    return res;
}

// Assembly:
movq 0x8(%rdi), %r8
movslq %edx, %rcx
movq (%r8,%rcx,8), %rax
movl 0x1c(%rax), %eax
movslq %esi, %rdx
movq (%r8,%rdx,8), %rsi
subl 0x1c(%rsi), %eax
je 0x3413
retq
movq (%rdi), %rax
movq (%rax,%rdx,8), %rdi
movq (%rax,%rcx,8), %rsi
jmp 0x2468
// File: /workspace/github_c_makefile_star2_O1/OhYee[P]computer_application_programming_experiment/pattern_match/ac_auto/ac_auto.c
// Function: swap
void swap(void *args, int i, int j) {
    char **        args_patterns = (char **)(((void **)args)[0]);
    ac_tree_node **args_nodes = (ac_tree_node **)(((void **)args)[1]);

    char *temp_parrtern = args_patterns[i];
    args_patterns[i] = args_patterns[j];
    args_patterns[j] = temp_parrtern;

    ac_tree_node *temp_nodes = args_nodes[i];
    args_nodes[i] = args_nodes[j];
    args_nodes[j] = temp_nodes;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq %esi, %rsi
movq (%rax,%rsi,8), %rdi
movslq %edx, %rdx
movq (%rax,%rdx,8), %r8
movq %r8, (%rax,%rsi,8)
movq %rdi, (%rax,%rdx,8)
movq (%rcx,%rsi,8), %rax
movq (%rcx,%rdx,8), %rdi
movq %rdi, (%rcx,%rsi,8)
movq %rax, (%rcx,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_04/celsius_fahrenheit.c
// Function: main
int main(void)
{
  float celsius, fahr;
  int lower, upper, step;

  lower = 0;
  upper = 300;
  step = 20;

  printf("Celsius\tFahr\n");
  printf("---------------\n");

  celsius = lower;
  while (celsius <= upper)
  {
    fahr = (9.0 / 5.0) * celsius + 32.0f;
    printf("%3.0f\t\t%6.1f\n", celsius, fahr);
    celsius = celsius + step;
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xed0(%rip), %rdi       # 0x2026
callq 0x1030
leaq 0xed1(%rip), %rdi       # 0x2033
callq 0x1030
movl $0xffffffec, %ebp       # imm = 0xFFFFFFEC
leaq 0xea5(%rip), %rbx       # 0x2018
addl $0x14, %ebp
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
cvtss2sd %xmm0, %xmm0
movaps %xmm0, %xmm1
mulsd 0xe7c(%rip), %xmm1      # 0x2008
addsd 0xe7c(%rip), %xmm1      # 0x2010
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
movq %rbx, %rdi
movb $0x2, %al
callq 0x1040
cmpl $0x119, %ebp            # imm = 0x119
jb 0x1173
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq