LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: de_tar_close_file
void de_tar_close_file(deark *c)
{
	struct tar_ctx *tctx = (struct tar_ctx *)c->tar_data;

	if(!tctx) return;
	if(tctx->outf) {
		dbuf_write_zeroes(tctx->outf, 512*2);
		dbuf_close(tctx->outf);
		de_crcobj_destroy(tctx->crco_cksum);
	}
	destroy_md(c, tctx->md);
	de_free(c, tctx);
	c->tar_data = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x140(%rdi), %r14
testq %r14, %r14
je 0xe3181
movq %rdi, %rbx
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xe3162
movl $0x400, %esi            # imm = 0x400
callq 0xe5d20
movq 0x8(%r14), %rdi
callq 0xe5591
movq 0x10(%r14), %rdi
callq 0xe0e8d
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0xe3189
movq %rbx, %rdi
movq %r14, %rsi
callq 0xded32
andq $0x0, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: prepare_timestamp_exthdr
static void prepare_timestamp_exthdr(deark *c, struct tar_md *md, int tsidx)
{
	i64 unix_time;
	i64 subsec = 0;
	int is_high_prec = 0;
	struct timestamp_data *tsd = &md->tsdata[tsidx];

	if(!tsd->timestamp.is_valid) return;

	unix_time = tsd->timestamp_unix;

	if(unix_time>=0 && tsd->timestamp.precision>DE_TSPREC_1SEC) {
		subsec = de_timestamp_get_subsec(&tsd->timestamp);
		if(subsec!=0) is_high_prec = 1;
	}

	if(tsidx!=DE_TIMESTAMPIDX_MODIFY || is_high_prec || unix_time<0 || unix_time>0x1ffffffffLL) {
		tsd->need_exthdr = 1;
	}
	else {
		return;
	}

	if(is_high_prec) {
		de_snprintf(tsd->exthdr_sz, sizeof(tsd->exthdr_sz),
			"%"I64_FMT".%07"I64_FMT, unix_time, subsec);
	}
	else {
		de_snprintf(tsd->exthdr_sz, sizeof(tsd->exthdr_sz),
			"%"I64_FMT, unix_time);
	}

	// Max length for this item is around 29, so we allow 2 bytes for the
	// length field.
	// E.g. "28 mtime=1222333444.5555555\n"
	md->extdata_nbytes_needed += 2 + 1 + 5 + 1 + (i64)de_strlen(tsd->exthdr_sz) + 1;
}

// Assembly:
movl %esi, %eax
shlq $0x6, %rax
cmpb $0x0, 0x40(%rdi,%rax)
je 0xe34e0
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq (%rdi,%rax), %r14
addq $0x40, %r14
movq 0x10(%r14), %r15
testq %r15, %r15
js 0xe3461
cmpb $0x1f, 0x2(%r14)
jb 0xe3461
movq %r14, %rdi
callq 0xe00c9
testq %rax, %rax
setne %cl
jmp 0xe3465
xorl %ecx, %ecx
xorl %eax, %eax
testl %ebp, %ebp
setne %dl
movq %r15, %rsi
shrq $0x21, %rsi
setne %sil
orb %cl, %dl
orb %sil, %dl
cmpb $0x1, %dl
jne 0xe34d6
movb $0x1, 0x18(%r14)
addq $0x19, %r14
testb %cl, %cl
je 0xe34a8
leaq 0x587a2(%rip), %rdx     # 0x13bc35
pushq $0x20
popq %rsi
movq %r14, %rdi
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0xde40c
jmp 0xe34bf
leaq 0x390f2(%rip), %rdx     # 0x11c5a1
pushq $0x20
popq %rsi
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0xde40c
movq %r14, %rdi
callq 0x180e0
movq 0x28(%rbx), %rcx
addq %rcx, %rax
addq $0xa, %rax
movq %rax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: set_common_header_fields
static void set_common_header_fields(deark *c, struct tar_ctx *tctx,
	dbuf *hdr)
{
	struct tar_md *md = tctx->md;

	// uid
	format_and_write_ascii_octal_field(c, tctx, 0, 8, hdr, 108);
	// gid
	format_and_write_ascii_octal_field(c, tctx, 0, 8, hdr, 116);
	// mtime
	format_and_write_ascii_octal_field(c, tctx, md->tsdata[DE_TIMESTAMPIDX_MODIFY].timestamp_unix, 12, hdr, 136);
	// magic/version
	dbuf_write_at(hdr, 257, (const u8*)"ustar\0" "00", 8);
	format_and_write_ascii_field(c, tctx, "root", 32, hdr, 265); // uname
	format_and_write_ascii_field(c, tctx, "root", 32, hdr, 297); // gname
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x20(%rdi), %r15
pushq $0x8
popq %r14
pushq $0x6c
popq %rcx
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe39eb
pushq $0x74
popq %rcx
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe39eb
movq 0x50(%r15), %rdi
pushq $0xc
popq %rsi
movl $0x88, %ecx
movq %rbx, %rdx
callq 0xe39eb
leaq 0x582ef(%rip), %rdx     # 0x13bc5b
movl $0x101, %esi            # imm = 0x101
movq %rbx, %rdi
movq %r14, %rcx
callq 0xe5bfe
leaq 0x294c3(%rip), %r14     # 0x10ce46
pushq $0x20
popq %r15
movl $0x109, %ecx            # imm = 0x109
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe39af
movl $0x129, %ecx            # imm = 0x129
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xe39af
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: set_checksum_field
static void set_checksum_field(deark *c, struct tar_ctx *tctx,
	dbuf *hdr)
{
	u8 buf[8];

	calc_checksum(c, tctx, hdr);
	format_ascii_octal_field(c, tctx, tctx->checksum_calc, buf, 7);
	buf[6] = 0x00;
	buf[7] = 0x20;
	dbuf_write_at(hdr, 148, buf, 8);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0xe3a52
movq %rax, %rdi
callq 0xe0e44
movq 0x10(%r14), %rdi
jmp 0xe3a61
pushq $0x30
popq %rsi
callq 0xe0ae9
movq %rax, %rdi
movq %rax, 0x10(%r14)
movl $0x94, %ecx
movq %rbx, %rsi
xorl %edx, %edx
callq 0xe0f33
movq 0x10(%r14), %rdi
pushq $0x20
popq %rsi
pushq $0x8
popq %r15
movq %r15, %rdx
callq 0xe0ee0
movq 0x10(%r14), %rdi
movl $0x9c, %edx
movl $0x164, %ecx            # imm = 0x164
movq %rbx, %rsi
callq 0xe0f33
movq 0x10(%r14), %rdi
callq 0xe0e95
movl %eax, %edi
movq %rdi, 0x18(%r14)
leaq 0x8(%rsp), %r14
pushq $0x7
popq %rdx
movq %r14, %rsi
callq 0xe3adc
movw $0x2000, 0x6(%r14)      # imm = 0x2000
movl $0x94, %esi
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0xe5bfe
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: format_ascii_octal_field
static int format_ascii_octal_field(deark *c, struct tar_ctx *tctx,
	i64 val, u8 *buf2, size_t buf2len)
{
	char buf1[32]; // The largest field we need to support is 12 bytes
	size_t k;
	size_t len_in_octal;

	de_zeromem(buf2, buf2len);
	if(buf2len>12) return 0;
	if(val<0) val = 0;

	de_snprintf(buf1, sizeof(buf1), "%"U64_FMTo, (u64)val);
	len_in_octal = de_strlen(buf1);
	if(len_in_octal > buf2len) {
		for(k=0; k<buf2len; k++) {
			buf2[k] = '7';
		}
	}
	else if(len_in_octal == buf2len) {
		de_memcpy(buf2, buf1, buf2len);
	}
	else {
		size_t num_leading_0s = buf2len - 1 - len_in_octal;

		for(k=0; k<buf2len; k++) {
			if(k < num_leading_0s) {
				buf2[k] = '0';
			}
			else if(k < buf2len - 1) {
				buf2[k] = buf1[k-num_leading_0s];
			}
			else {
				buf2[k] = '\0';
			}
		}
	}

	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
callq 0x18140
testq %r12, %r12
cmovleq %r15, %r12
leaq 0x58134(%rip), %rdx     # 0x13bc3f
movq %rsp, %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0xde40c
movq %r15, %rdi
callq 0x180e0
movq %rax, %rsi
subq %rbx, %rsi
jbe 0xe3b3f
xorl %eax, %eax
cmpq %rax, %rbx
je 0xe3b4f
movb $0x37, (%r14,%rax)
incq %rax
jmp 0xe3b30
jne 0xe3b5b
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x181e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq -0x1(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq (%rsi,%r15), %rax
incq %rax
xorl %esi, %esi
cmpq %rsi, %rbx
je 0xe3b4f
movb $0x30, %dil
cmpq %rdx, %rsi
jb 0xe3b88
cmpq %rcx, %rsi
jae 0xe3b86
movb (%rax,%rsi), %dil
jmp 0xe3b88
xorl %edi, %edi
movb %dil, (%r14,%rsi)
incq %rsi
jmp 0xe3b6e
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-tar.c
// Function: add_exthdr_item
static void add_exthdr_item(deark *c, struct tar_ctx *tctx,
	dbuf *extdata, const char *name, const char *val, i64 *ppos)
{
	i64 len1;
	i64 item_len = 0;
	char *tmps = NULL;

	len1 = (i64)de_strlen(name) + (i64)de_strlen(val) + 3;
	// This size of the size field depends on itself. Ugh.
	if(len1<=8) item_len = len1+1;
	else if(len1<=97) item_len = len1+2;
	else if(len1<=996) item_len = len1+3;
	else if(len1<=9995) item_len = len1+4;
	else if(len1<=99994) item_len = len1+5;
	else if(len1<=999993) item_len = len1+6;
	else { // Error
		(*ppos)++;
		goto done;
	}

	tmps = de_malloc(c, item_len+1);
	de_snprintf(tmps, (size_t)(item_len+1), "%"I64_FMT" %s=%s\n", item_len, name, val);
	dbuf_write_at(extdata, *ppos, (const u8*)tmps, item_len);
	(*ppos) += item_len;

done:
	de_free(c, tmps);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movq %rdx, %rdi
callq 0x180e0
movq %rax, %r15
movq %r12, %rdi
callq 0x180e0
addq %r15, %rax
cmpq $0x6, %rax
movq %rbx, 0x10(%rsp)
movq %rbp, 0x8(%rsp)
jge 0xe3bd8
pushq $0x4
jmp 0xe3c10
cmpq $0x5f, %rax
jae 0xe3be2
pushq $0x5
jmp 0xe3c10
cmpq $0x3e2, %rax            # imm = 0x3E2
jae 0xe3bee
pushq $0x6
jmp 0xe3c10
cmpq $0x2709, %rax           # imm = 0x2709
jae 0xe3bfa
pushq $0x7
jmp 0xe3c10
cmpq $0x18698, %rax          # imm = 0x18698
jae 0xe3c06
pushq $0x8
jmp 0xe3c10
cmpq $0xf4236, %rax          # imm = 0xF4236
ja 0xe3c7b
pushq $0x9
popq %rcx
leaq (%rax,%rcx), %rbp
leaq (%rax,%rcx), %rbx
incq %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdecaf
movq %rax, %r15
leaq 0x5801f(%rip), %rdx     # 0x13bc50
movq %rax, %rdi
movq %rbx, %rsi
movq %rbp, %rcx
movq %r13, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0xde40c
movq 0x10(%rsp), %rbx
movq (%rbx), %rsi
movq 0x8(%rsp), %rdi
movq %r15, %rdx
movq %rbp, %rcx
callq 0xe5bfe
addq %rbp, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xded32
pushq $0x1
popq %rbp
xorl %r15d, %r15d
jmp 0xe3c5f
nop
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_standard_read
i64 dbuf_standard_read(dbuf *f, u8 *buf, i64 n, i64 *fpos)
{
	i64 amt_to_read;

	if(*fpos < 0 || *fpos >= f->len) return 0;

	amt_to_read = n;
	if(*fpos + amt_to_read > f->len) amt_to_read = f->len - *fpos;
	dbuf_read(f, buf, *fpos, amt_to_read);
	*fpos += amt_to_read;
	return amt_to_read;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movq (%rcx), %rdx
testq %rdx, %rdx
js 0xe3ea7
movq %rcx, %r14
movq 0x18(%rdi), %rcx
movq %rcx, %rbx
subq %rdx, %rbx
jle 0xe3ea7
leaq (%rdx,%rax), %r8
cmpq %rcx, %r8
cmovleq %rax, %rbx
movq %rbx, %rcx
callq 0xe3cb7
addq %rbx, (%r14)
jmp 0xe3ea9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getbyte
u8 dbuf_getbyte(dbuf *f, i64 pos)
{
	u8 b;

	if(pos<0 || pos>=f->len) return 0x00;

	if(pos<f->rcache_bytes_used) {
		return f->rcache[pos];
	}
	if(f->btype==DBUF_TYPE_MEMBUF) {
		return f->membuf_buf[pos];
	}

	dbuf_read(f, &b, pos, 1);
	return b;
}

// Assembly:
testq %rsi, %rsi
js 0xe3ed4
movq %rsi, %rdx
cmpq %rsi, 0x18(%rdi)
jle 0xe3ed4
cmpq %rdx, 0xc0(%rdi)
jle 0xe3ed7
movq 0xc8(%rdi), %rax
jmp 0xe3ee0
xorl %eax, %eax
retq
cmpl $0x3, (%rdi)
jne 0xe3ee4
movq 0x78(%rdi), %rax
movb (%rax,%rdx), %al
retq
pushq %rbx
subq $0x10, %rsp
leaq 0xf(%rsp), %rbx
pushq $0x1
popq %rcx
movq %rbx, %rsi
callq 0xe3cb7
movb (%rbx), %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getu16be_p
i64 dbuf_getu16be_p(dbuf *f, i64 *ppos)
{
	u8 m[2];
	dbuf_read(f, m, *ppos, 2);
	(*ppos) += 2;
	return de_getu16be_direct(m);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdx
leaq 0x6(%rsp), %r14
pushq $0x2
popq %rcx
movq %r14, %rsi
callq 0xe3cb7
addq $0x2, (%rbx)
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getu16le_p
i64 dbuf_getu16le_p(dbuf *f, i64 *ppos)
{
	u8 m[2];
	dbuf_read(f, m, *ppos, 2);
	(*ppos) += 2;
	return de_getu16le_direct(m);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdx
leaq 0x6(%rsp), %r14
pushq $0x2
popq %rcx
movq %r14, %rsi
callq 0xe3cb7
addq $0x2, (%rbx)
movzwl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getu32be_p
i64 dbuf_getu32be_p(dbuf *f, i64 *ppos)
{
	u8 m[4];
	dbuf_read(f, m, *ppos, 4);
	(*ppos) += 4;
	return de_getu32be_direct(m);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rcx
movq %r14, %rsi
callq 0xe3cb7
addq $0x4, (%rbx)
movl (%r14), %eax
bswapl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getu32le_p
i64 dbuf_getu32le_p(dbuf *f, i64 *ppos)
{
	u8 m[4];
	dbuf_read(f, m, *ppos, 4);
	(*ppos) += 4;
	return de_getu32le_direct(m);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rcx
movq %r14, %rsi
callq 0xe3cb7
addq $0x4, (%rbx)
movl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: de_getu64be_direct
u64 de_getu64be_direct(const u8 *m)
{
	unsigned int i;
	u64 val = 0;

	for(i=0; i<8; i++) {
		val |= ((u64)m[i])<<((7-i)*8);
	}
	return val;
}

// Assembly:
pushq $0x38
popq %rcx
xorl %eax, %eax
cmpq $-0x8, %rcx
je 0xe413d
movzbl (%rdi), %edx
shlq %cl, %rdx
orq %rdx, %rax
addq $-0x8, %rcx
incq %rdi
jmp 0xe4125
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: de_getu64le_direct
u64 de_getu64le_direct(const u8 *m)
{
	unsigned int i;
	u64 val = 0;

	for(i=0; i<8; i++) {
		val |= ((u64)m[i])<<(i*8);
	}
	return val;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x40, %rcx
je 0xe4185
movzbl (%rdi), %edx
shlq %cl, %rdx
orq %rdx, %rax
addq $0x8, %rcx
incq %rdi
jmp 0xe416d
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getint_ext
i64 dbuf_getint_ext(dbuf *f, i64 pos, unsigned int nbytes,
	int is_le, int is_signed)
{
	if(is_signed) {
		// TODO: Extend this to any number of bytes, 1-8.
		switch(nbytes) {
		case 1: return (i64)(signed char)dbuf_getbyte(f, pos); break;
		case 2: return dbuf_geti16x(f, pos, is_le); break;
		case 4: return dbuf_geti32x(f, pos, is_le); break;
		case 8: return dbuf_geti64x(f, pos, is_le); break;
		default:
			return dbuf_getint_ext_x(f, pos, nbytes, is_le);
		}
	}
	else {
		switch(nbytes) {
		case 1: return (i64)dbuf_getbyte(f, pos); break;
		case 2: return dbuf_getu16x(f, pos, is_le); break;
		case 4: return dbuf_getu32x(f, pos, is_le); break;
		case 8: return dbuf_geti64x(f, pos, is_le); break;
		default:
			return dbuf_getuint_ext_x(f, pos, nbytes, is_le);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rdx
testl %r8d, %r8d
je 0xe4291
leal -0x1(%r14), %r15d
cmpl $0x7, %r15d
ja 0xe42fa
leaq 0x579f1(%rip), %rax     # 0x13bc68
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rdx, %rsi
callq 0xe3eb4
movsbq %al, %rax
jmp 0xe4369
leal -0x1(%r14), %eax
cmpl $0x7, %eax
ja 0xe4361
leaq 0x579e3(%rip), %rcx     # 0x13bc88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdx, %rsi
callq 0xe3eb4
movzbl %al, %eax
jmp 0xe4369
movq %rdx, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe41e5
movq %rdx, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe41be
movq %rdx, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe41d8
cmpl $0x18, %r14d
ja 0xe4367
movl %r14d, %ebx
movq %rsp, %rsi
movq %rbx, %rcx
callq 0xe3cb7
testl %ebp, %ebp
jne 0xe4367
cmpl $0x8, %r14d
jbe 0xe43b0
addl $-0x8, %r14d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0xe43b0
cmpb $-0x1, (%rsp,%rcx)
leaq 0x1(%rcx), %rcx
je 0xe4324
jmp 0xe4369
movq %rdx, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe41cb
movq %rdx, %rsi
movl %ebp, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe41b1
cmpl $0x18, %r14d
jbe 0xe4374
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %ebx
movq %rsp, %rsi
movq %rbx, %rcx
callq 0xe3cb7
testl %ebp, %ebp
je 0xe43df
xorl %edx, %edx
xorl %eax, %eax
cmpq %rbx, %rdx
je 0xe4369
movzbl (%rsp,%rdx), %esi
testq %rsi, %rsi
je 0xe43ab
cmpq $0x7, %rdx
ja 0xe4367
leal (,%rdx,8), %ecx
shlq %cl, %rsi
orq %rsi, %rax
incq %rdx
jmp 0xe438a
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq $0x8, %rdx
je 0xe4369
movl $0xff, %esi
cmpq %rbx, %rdx
jae 0xe43cd
movl %r15d, %esi
movzbl (%rsp,%rsi), %esi
shlq %cl, %rsi
orq %rsi, %rax
incq %rdx
decl %r15d
addq $0x8, %rcx
jmp 0xe43b6
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %rbx
je 0xe4369
movq %rax, %rdx
shrq $0x38, %rdx
jne 0xe4367
shlq $0x8, %rax
movzbl (%rsp,%rcx), %edx
orq %rdx, %rax
incq %rcx
jmp 0xe43e3
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: de_getfloat32x_direct
double de_getfloat32x_direct(deark *c, const u8 *m, int is_le)
{
	char buf[4];
	float val = 0.0;

	if(c->can_decode_fltpt<0) {
		init_fltpt_decoder(c);
	}
	if(!c->can_decode_fltpt) return 0.0;

	// FIXME: This assumes that the native floating point format is
	// IEEE 754, but that does not have to be the case.

	de_memcpy(buf, m, 4);

	if(is_le != c->host_is_le) {
		int i;
		char tmpc;
		// Reverse order of bytes
		for(i=0; i<2; i++) {
			tmpc = buf[i]; buf[i] = buf[3-i]; buf[3-i] = tmpc;
		}
	}

	de_memcpy(&val, buf, 4);
	return (double)val;
}

// Assembly:
cmpl $0x0, 0xf0(%rdi)
js 0xe4418
je 0xe446c
movl 0xf4(%rdi), %eax
jmp 0xe442e
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xf0(%rdi)
movl $0x1, %eax
movl (%rsi), %ecx
movl %ecx, -0x4(%rsp)
cmpl %edx, %eax
jne 0xe443e
movd %ecx, %xmm0
jmp 0xe4467
leaq -0x1(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x2, %rcx
je 0xe4461
movb -0x4(%rsp,%rcx), %dl
movb (%rax), %sil
movb %sil, -0x4(%rsp,%rcx)
movb %dl, (%rax)
incq %rcx
decq %rax
jmp 0xe4445
movd -0x4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: de_getfloat64x_direct
double de_getfloat64x_direct(deark *c, const u8 *m, int is_le)
{
	char buf[8];
	double val = 0.0;

	if(c->can_decode_fltpt<0) {
		init_fltpt_decoder(c);
	}
	if(!c->can_decode_fltpt) return 0.0;

	de_memcpy(buf, m, 8);

	if(is_le != c->host_is_le) {
		int i;
		char tmpc;
		// Reverse order of bytes
		for(i=0; i<4; i++) {
			tmpc = buf[i]; buf[i] = buf[7-i]; buf[7-i] = tmpc;
		}
	}

	de_memcpy(&val, buf, 8);
	return (double)val;
}

// Assembly:
cmpl $0x0, 0xf0(%rdi)
js 0xe44bc
je 0xe4516
movl 0xf4(%rdi), %eax
jmp 0xe44d2
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xf0(%rdi)
movl $0x1, %eax
movq (%rsi), %rcx
movq %rcx, -0x8(%rsp)
cmpl %edx, %eax
jne 0xe44e4
movq %rcx, %xmm0
retq
movabsq $0x7, %rax
leaq -0x8(%rsp), %rcx
cmpq $0x3, %rax
je 0xe450f
movb (%rcx), %dl
movb -0x8(%rsp,%rax), %sil
movb %sil, (%rcx)
movb %dl, -0x8(%rsp,%rax)
decq %rax
incq %rcx
jmp 0xe44f3
movsd -0x8(%rsp), %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_read_ascii_number
int dbuf_read_ascii_number(dbuf *f, i64 pos, i64 fieldsize,
	int base, i64 *value)
{
	char buf[32];

	*value = 0;
	if(fieldsize>(i64)(sizeof(buf)-1)) return 0;

	dbuf_read(f, (u8*)buf, pos, fieldsize);
	buf[fieldsize] = '\0';

	*value = de_strtoll(buf, NULL, base);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
andq $0x0, (%r8)
xorl %eax, %eax
cmpq $0x1f, %rdx
jg 0xe4599
movq %r8, %rbx
movl %ecx, %ebp
movq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rsi
movq %r14, %rcx
callq 0xe3cb7
movb $0x0, (%rsp,%r14)
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0xfc8f5
movq %rax, (%rbx)
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_getRGB
de_color dbuf_getRGB(dbuf *f, i64 pos, unsigned int flags)
{
	u8 buf[3];
	dbuf_read(f, buf, pos, 3);
	if(flags&DE_GETRGBFLAG_BGR)
		return DE_MAKE_RGB(buf[2], buf[1], buf[0]);
	return DE_MAKE_RGB(buf[0], buf[1], buf[2]);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %rdx
leaq 0xd(%rsp), %rsi
pushq $0x3
popq %rcx
callq 0xe3cb7
testb $0x1, %bl
jne 0xe45d8
movzbl 0xd(%rsp), %ecx
shll $0x10, %ecx
movzbl 0xe(%rsp), %eax
shll $0x8, %eax
orl %ecx, %eax
movb 0xf(%rsp), %cl
jmp 0xe45e4
movzwl 0xe(%rsp), %eax
shll $0x8, %eax
movb 0xd(%rsp), %cl
movzbl %cl, %ecx
addl %ecx, %eax
addl $0xff000000, %eax       # imm = 0xFF000000
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_copy
void dbuf_copy(dbuf *inf, i64 input_offset, i64 input_len, dbuf *outf)
{
	u8 tmpbuf[256];

	// Fast paths, if the data to copy is all in memory

	if(inf->rcache &&
		(input_offset>=0) && (input_offset+input_len<=inf->rcache_bytes_used))
	{
		dbuf_write(outf, &inf->rcache[input_offset], input_len);
		return;
	}

	if(inf->btype==DBUF_TYPE_MEMBUF &&
		(input_offset>=0) && (input_offset+input_len<=inf->len))
	{
		dbuf_write(outf, &inf->membuf_buf[input_offset], input_len);
		return;
	}

	if(input_len<=(i64)sizeof(tmpbuf)) {
		// Fast path for small sizes
		dbuf_read(inf, tmpbuf, input_offset, input_len);
		dbuf_write(outf, tmpbuf, input_len);
		return;
	}

	dbuf_buffered_read(inf, input_offset, input_len, copy_cbfn, (void*)outf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %rdx
movq 0xc8(%rdi), %rsi
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sets %cl
orb %al, %cl
jne 0xe462d
leaq (%rbx,%rdx), %rax
cmpq 0xc0(%rdi), %rax
jle 0xe4694
testq %rdx, %rdx
js 0xe4641
cmpl $0x3, (%rdi)
jne 0xe4641
leaq (%rbx,%rdx), %rax
cmpq 0x18(%rdi), %rax
jle 0xe469c
cmpq $0x100, %rbx            # imm = 0x100
jg 0xe4673
movq %rsp, %r15
movq %r15, %rsi
movq %rbx, %rcx
callq 0xe3cb7
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe46ba
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
leaq 0x285(%rip), %rcx       # 0xe48ff
movq %rdx, %rsi
movq %rbx, %rdx
movq %r14, %r8
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmp 0xe4745
addq %rdx, %rsi
movq %r14, %rdi
jmp 0xe46a6
addq 0x78(%rdi), %rdx
movq %r14, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmp 0xe46ba
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_write
void dbuf_write(dbuf *f, const u8 *m, i64 len)
{
	if(!f->wbuffer) {
		dbuf_write_unbuffered(f, m, len);
		return;
	}

	if(len<=0) return;

	if(len > DE_WBUFFER_SIZE/2) {
		// This item doesn't fit in the buffer, even by itself, or we
		// consider it "large".
		// Flush the buffer, write the item, done.
		// TODO: Decide what the "large" threshold should be, or if there should
		// even be one.
		if(f->wbuffer_bytes_used!=0) dbuf_flush(f);
		dbuf_write_unbuffered(f, m, len);
		return;
	}

	if(f->wbuffer_bytes_used + len > DE_WBUFFER_SIZE) {
		// This item fits in the buffer by itself, but currently the buffer
		// is too full.
		// Flush the buffer, copy the item to the buffer, done.
		dbuf_flush(f);
		de_memcpy(f->wbuffer, m, (size_t)len);
		f->wbuffer_bytes_used = len;
		return;
	}

	// There is room for this item in the buffer, even without flushing it first.
	de_memcpy(&f->wbuffer[f->wbuffer_bytes_used], m, (size_t)len);
	f->wbuffer_bytes_used += len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0xe46f0
testq %rbx, %rbx
jle 0xe473f
movq 0x40(%r14), %rax
cmpq $0x101, %rbx            # imm = 0x101
jb 0xe4703
testq %rax, %rax
je 0xe46f0
movq %r14, %rdi
callq 0xe58e8
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xe5a80
leaq (%rax,%rbx), %rcx
cmpq $0x201, %rcx            # imm = 0x201
jl 0xe472d
movq %r14, %rdi
callq 0xe58e8
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x181e0
movq %rbx, 0x40(%r14)
jmp 0xe473f
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x181e0
addq %rbx, 0x40(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: copy_at_cbfn
static int copy_at_cbfn(struct de_bufferedreadctx *brctx, const u8 *buf,
	i64 buf_len)
{
	struct copy_at_ctx *ctx = (struct copy_at_ctx*)brctx->userdata;

	dbuf_write_at(ctx->outf, ctx->outpos, buf, buf_len);
	ctx->outpos += buf_len;
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq (%rdi), %r14
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rcx
callq 0xe5bfe
addq %rbx, 0x8(%r14)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_search_byte
int dbuf_search_byte(dbuf *f, const u8 b, i64 startpos,
	i64 haystack_len, i64 *foundpos)
{
	i64 i;

	for(i=0; i<haystack_len; i++) {
		if(b == dbuf_getbyte(f, startpos+i)) {
			*foundpos = startpos+i;
			return 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
xorl %r15d, %r15d
testq %rcx, %rcx
cmovleq %r15, %r12
movq %rdi, %r13
negq %r12
movq %rdx, 0x8(%rsp)
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0xe4b82
movq %r13, %rdi
movq %r14, %rsi
callq 0xe3eb4
decq %rbx
incq %r14
cmpb %bpl, %al
jne 0xe4b53
notq %rbx
addq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
pushq $0x1
popq %r15
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: de_destroy_stringreaderdata
void de_destroy_stringreaderdata(deark *c, struct de_stringreaderdata *srd)
{
	if(!srd) return;
	de_free(c, srd->sz);
	de_free(c, srd->sz_utf8);
	ucstring_destroy(srd->str);
	de_free(c, srd);
}

// Assembly:
testq %rsi, %rsi
je 0xe4bd3
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rsi
callq 0xded32
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0xded32
movq 0x18(%rbx), %rdi
callq 0xeaf3c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xded32
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_read_to_ucstring_ex
void dbuf_read_to_ucstring_ex(dbuf *f, i64 pos1, i64 len,
	de_ucstring *s, unsigned int conv_flags, struct de_encconv_state *es)
{
	i64 nbytes_remaining;
	i64 pos = pos1;
	int stop_at_nul = 0;
#define READTOUCSTRING_BUFLEN 256
	u8 buf[READTOUCSTRING_BUFLEN];

	if(conv_flags & DE_CONVFLAG_STOP_AT_NUL) {
		stop_at_nul = 1;
		// We handle STOP_AT_NUL ourselves, so don't pass it on.
		conv_flags -= DE_CONVFLAG_STOP_AT_NUL;
	}

	// Note: It might be sensible to use dbuf_buffered_read() here, but I've
	// decided against it for now.
	nbytes_remaining = len;
	do {
		i64 nbytes_to_read;
		i64 nbytes_in_buf;
		unsigned int conv_flags_to_use_this_time;

		// Lack of DE_CONVFLAG_PARTIAL_DATA flag signals end of data, which
		// isn't necessarily a no-op even with len=0.
		// That's why we always do this loop at least once.

		nbytes_to_read = de_min_int(nbytes_remaining, READTOUCSTRING_BUFLEN);
		dbuf_read(f, buf, pos, nbytes_to_read);
		pos += nbytes_to_read;
		nbytes_in_buf = nbytes_to_read;
		nbytes_remaining -= nbytes_to_read;

		if(stop_at_nul) {
			char *tmpp;

			tmpp = de_memchr(buf, 0x00, (size_t)nbytes_in_buf);
			if(tmpp) {
				nbytes_in_buf = (const u8*)tmpp - buf;
				nbytes_remaining = 0;
			}
		}

		conv_flags_to_use_this_time = conv_flags;
		if(nbytes_remaining>0) {
			// The caller may have already set this flag, in which case we will use
			// it every time.
			// If not, we still use it for all but the final call to ucstring_append_bytes_ex().
			conv_flags_to_use_this_time |= DE_CONVFLAG_PARTIAL_DATA;
		}

		ucstring_append_bytes_ex(s, buf, nbytes_in_buf, conv_flags_to_use_this_time, es);
	} while(nbytes_remaining>0);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r9, 0x18(%rsp)
movl %r8d, %ebp
movq %rcx, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
movl %r8d, %r13d
andl $-0x2, %ebp
movl %ebp, 0x4(%rsp)
orl $0x40, %ebp
leaq 0x20(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0xdfb45
movq %rax, %r14
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0xe3cb7
subq %r14, %r15
testb $0x1, %r13b
je 0xe4c60
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x18150
movq %rax, %rdx
subq %rbx, %rdx
testq %rax, %rax
movl $0x0, %eax
cmovneq %rax, %r15
cmoveq %r14, %rdx
jmp 0xe4c63
movq %r14, %rdx
movl %ebp, %ecx
testq %r15, %r15
jg 0xe4c6e
movl 0x4(%rsp), %ecx
addq %r14, %r12
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %r8
callq 0xeaf9a
testq %r15, %r15
jg 0xe4c0f
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_memcmp
int dbuf_memcmp(dbuf *f, i64 pos, const void *s, size_t n)
{
	u8 buf1[128];

	if(f->rcache &&
		pos >= 0 &&
		pos + (i64)n <= f->rcache_bytes_used)
	{
		// Fastest path: Compare directly to cache.
		return de_memcmp(s, &f->rcache[pos], n);
	}

	if(n<=sizeof(buf1)) {
		// Use a stack buffer if small enough.
		dbuf_read(f, buf1, pos, n);
		return de_memcmp(buf1, s, n);
	}

	// Fallback method.
	return !dbuf_buffered_read(f, pos, n, dbufmemcmp_cbfn, (void*)s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rdx
movq 0xc8(%rdi), %rsi
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sets %cl
orb %al, %cl
jne 0xe4d81
leaq (%rbx,%rdx), %rax
cmpq 0xc0(%rdi), %rax
jle 0xe4dd3
cmpq $0x80, %rbx
ja 0xe4da8
movq %rsp, %r15
movq %r15, %rsi
movq %rbx, %rcx
callq 0xe3cb7
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x18170
jmp 0xe4dc6
leaq 0x3e(%rip), %rcx        # 0xe4ded
movq %rdx, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0xe4745
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
addq %rdx, %rsi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x18170
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_create_file_from_slice
int dbuf_create_file_from_slice(dbuf *inf, i64 pos, i64 data_size,
	const char *ext, de_finfo *fi, unsigned int createflags)
{
	dbuf *f;
	f = dbuf_create_output_file(inf->c, ext, fi, createflags);
	if(!f) return 0;
	dbuf_copy(inf, pos, data_size, f);
	dbuf_close(f);
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
callq 0xe4e62
testq %rax, %rax
je 0xe4e54
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe45f4
movq %r12, %rdi
callq 0xe5591
pushq $0x1
popq %rax
jmp 0xe4e56
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_create_unmanaged_file
dbuf *dbuf_create_unmanaged_file(deark *c, const char *fname, int overwrite_mode,
	unsigned int flags)
{
	dbuf *f;
	char msgbuf[200];

	f = create_dbuf_lowlevel(c);
	f->is_managed = 0;
	f->name = de_strdup(c, fname);

	f->btype = DBUF_TYPE_OFILE;
	f->max_len_hard = c->max_output_file_size;
	f->fp = de_fopen_for_write(c, f->name, msgbuf, sizeof(msgbuf),
		c->overwrite_mode, flags);

	if(!f->fp) {
		de_err(c, "Failed to write %s: %s", f->name, msgbuf);
		f->btype = DBUF_TYPE_NULL;
		c->serious_error_flag = 1;
	}

	return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0xe5835
movq %rax, %r14
movb $0x0, 0x4(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdf791
movq %rax, 0x68(%r14)
movl $0x2, (%r14)
movq 0xb0(%rbx), %rcx
movq %rcx, 0x20(%r14)
movl 0xd8(%rbx), %r8d
movq %rsp, %rdx
movl $0xc8, %ecx
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %r9d
callq 0xfca20
movq %rax, 0x10(%r14)
testq %rax, %rax
jne 0xe5824
movq 0x68(%r14), %rdx
leaq 0x5653b(%rip), %rsi     # 0x13bd4a
movq %rsp, %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xdf2a5
andl $0x0, (%r14)
movb $0x1, 0x4c(%rbx)
movq %r14, %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: create_dbuf_lowlevel
static dbuf *create_dbuf_lowlevel(deark *c)
{
	dbuf *f;

	f = de_malloc(c, sizeof(dbuf));
	f->c = c;
	f->file_id = -1;
	return f;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0xd8, %esi
callq 0xdecaf
movq %rbx, 0x8(%rax)
orl $-0x1, 0x64(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_create_unmanaged_file_stdout
dbuf *dbuf_create_unmanaged_file_stdout(deark *c, const char *name)
{
	dbuf *f;

	f = create_dbuf_lowlevel(c);
	f->is_managed = 0;
	f->name = de_strdup(c, name);
	f->btype = DBUF_TYPE_STDOUT;
	f->max_len_hard = c->max_output_file_size;
	f->fp = stdout;
	return f;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xe5835
movq %rax, %r15
movb $0x0, 0x4(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdf791
movq %rax, 0x68(%r15)
movl $0x5, (%r15)
movq 0xb0(%r14), %rax
movq %rax, 0x20(%r15)
movq 0xac744(%rip), %rax     # 0x191fd0
movq (%rax), %rax
movq %rax, 0x10(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_disable_wbuffer
void dbuf_disable_wbuffer(dbuf *f)
{
	if(!f->wbuffer) return;
	dbuf_flush(f);
	de_free(f->c, f->wbuffer);
	f->wbuffer = NULL;
}

// Assembly:
cmpq $0x0, 0x48(%rdi)
je 0xe58e7
pushq %rbx
movq %rdi, %rbx
callq 0xe58e8
movq 0x8(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0xded32
andq $0x0, 0x48(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_create_membuf
dbuf *dbuf_create_membuf(deark *c, i64 initialsize, unsigned int flags)
{
	dbuf *f;

	f = create_dbuf_lowlevel(c);
	f->btype = DBUF_TYPE_MEMBUF;
	f->max_len_hard = DE_MAX_MEMBUF_SIZE;

	if(initialsize>0) {
		if(initialsize > f->max_len_hard) {
			do_on_dbuf_size_exceeded(f);
		}
		f->membuf_buf = de_malloc(c, initialsize);
		f->membuf_alloc = initialsize;
	}

	if(flags&0x01) {
		dbuf_set_length_limit(f, initialsize);
	}

	return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
callq 0xe5835
movq %rax, %r14
movl $0x3, (%rax)
movq $0x77359400, 0x20(%rax) # imm = 0x77359400
testq %rbx, %rbx
jle 0xe5a1b
cmpq $0x77359401, %rbx       # imm = 0x77359401
jb 0xe5a08
movq %r14, %rdi
callq 0xe5a3b
movq %r15, %rdi
movq %rbx, %rsi
callq 0xdecaf
movq %rax, 0x78(%r14)
movq %rbx, 0x70(%r14)
testb $0x1, %bpl
je 0xe5a2d
movl $0x1, 0x30(%r14)
movq %rbx, 0x28(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: do_on_dbuf_size_exceeded
static void do_on_dbuf_size_exceeded(dbuf *f)
{
	de_err(f->c, "Maximum %s size of %"I64_FMT" bytes exceeded",
		(f->btype==DBUF_TYPE_MEMBUF)?"membuf":"output file",
		f->max_len_hard);
	de_fatalerror(f->c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
cmpl $0x3, (%rbx)
leaq 0x5657f(%rip), %rax     # 0x13bfcc
leaq 0x3c60c(%rip), %rdx     # 0x122060
cmoveq %rax, %rdx
movq 0x20(%rbx), %rcx
leaq 0x56543(%rip), %rsi     # 0x13bfa6
xorl %eax, %eax
callq 0xdf2a5
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0xdf4d0
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_write_unbuffered
static void dbuf_write_unbuffered(dbuf *f, const u8 *m, i64 len)
{
	if(len<=0) return;
	if(f->len + len > f->max_len_hard) {
		do_on_dbuf_size_exceeded(f);
	}

	if(f->crco_for_oinfo) {
		de_crcobj_addbuf(f->crco_for_oinfo, m, len);
	}
	if(f->writelistener_cb) {
		f->writelistener_cb(f, f->userdata_for_writelistener, m, len);
	}

	switch(f->btype) {
	case DBUF_TYPE_OFILE:
	case DBUF_TYPE_STDOUT:
		if(!f->fp) return;
		if(f->c->debug_level>=4) {
			de_dbgx(f->c, 4, "writing %"I64_FMT" bytes to %s", len, f->name);
		}
		fwrite(m, 1, (size_t)len, f->fp);
		f->len += len;
		return;
	case DBUF_TYPE_MEMBUF:
		if(f->c->debug_level>=4 && f->name) {
			de_dbgx(f->c, 4, "appending %"I64_FMT" bytes to membuf %s", len, f->name);
		}
		membuf_append(f, m, len);
		return;
	case DBUF_TYPE_ODBUF:
		dbuf_write(f->parent_dbuf, m, len);
		f->len += len;
		return;
	case DBUF_TYPE_CUSTOM:
		if(f->customwrite_fn) {
			f->customwrite_fn(f, f->userdata_for_customwrite, m, len);
		}
		f->len += len;
		return;
	case DBUF_TYPE_NULL:
		f->len += len;
		return;
	}

	de_internal_err_fatal(f->c, "Invalid output file type (%d)", f->btype);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
jle 0xe5bbf
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x18(%rdi), %rax
addq %rdx, %rax
cmpq 0x20(%rdi), %rax
jle 0xe5aac
movq %r14, %rdi
callq 0xe5a3b
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0xe5ac3
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe0ecf
movq 0x90(%r14), %rax
testq %rax, %rax
je 0xe5ae1
movq 0x88(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq *%rax
movl (%r14), %edx
cmpq $0x9, %rdx
ja 0xe5b5c
leaq 0x561df(%rip), %rax     # 0x13bcd0
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0xe5bbf
movq 0x8(%r14), %rdi
cmpl $0x4, (%rdi)
jl 0xe5b2c
movq 0x68(%r14), %r8
leaq 0x564b8(%rip), %rdx     # 0x13bfd3
pushq $0x4
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xdeb15
movq 0x10(%r14), %rcx
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x182a0
jmp 0xe5bbb
movq 0xb0(%r14), %rax
testq %rax, %rax
je 0xe5bbb
movq 0xa8(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq *%rax
jmp 0xe5bbb
movq 0x8(%r14), %rdi
leaq 0x564a5(%rip), %rsi     # 0x13c00c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xdf4f0
movq 0x8(%r14), %rdi
cmpl $0x4, (%rdi)
jl 0xe5b99
movq 0x68(%r14), %r8
testq %r8, %r8
je 0xe5b99
leaq 0x5645f(%rip), %rdx     # 0x13bfeb
pushq $0x4
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xdeb15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xe5d2a
movq 0x50(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe46ba
addq %rbx, 0x18(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_writebyte
void dbuf_writebyte(dbuf *f, u8 n)
{
	// Optimization
	if(f->wbuffer && f->wbuffer_bytes_used<DE_WBUFFER_SIZE) {
		f->wbuffer[f->wbuffer_bytes_used++] = n;
		return;
	}

	dbuf_write(f, &n, 1);
}

// Assembly:
pushq %rax
movb %sil, 0x7(%rsp)
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0xe5bef
movq 0x40(%rdi), %rcx
cmpq $0x1ff, %rcx            # imm = 0x1FF
jg 0xe5bef
leaq 0x1(%rcx), %rdx
movq %rdx, 0x40(%rdi)
movb %sil, (%rax,%rcx)
jmp 0xe5bfc
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0xe46ba
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_write_at
void dbuf_write_at(dbuf *f, i64 pos, const u8 *m, i64 len)
{
	if(len<1 || pos<0) return;

	if(pos + len > f->max_len_hard) {
		do_on_dbuf_size_exceeded(f);
	}

	if(f->btype==DBUF_TYPE_MEMBUF) {
		i64 amt_overwrite, amt_newzeroes, amt_append;

		if(pos+len <= f->len) { // entirely within the current file
			amt_overwrite = len;
			amt_newzeroes = 0;
			amt_append = 0;
		}
		else if(pos >= f->len) { // starts after the end of the current file
			amt_overwrite = 0;
			amt_newzeroes = pos - f->len;
			amt_append = len;
		}
		else { // overlaps the end of the current file
			amt_overwrite = f->len - pos;
			amt_newzeroes = 0;
			amt_append = len - amt_overwrite;
		}

		if(amt_overwrite>0) {
			de_memcpy(&f->membuf_buf[pos], m, (size_t)amt_overwrite);
		}
		if(amt_newzeroes>0) {
			dbuf_write_zeroes(f, amt_newzeroes);
		}
		if(amt_append>0) {
			membuf_append(f, &m[amt_overwrite], amt_append);
		}
	}
	else if(f->btype==DBUF_TYPE_OFILE && !f->is_managed) {
		i64 curpos = de_ftell(f->fp);
		if(pos != curpos) {
			de_fseek(f->fp, pos, SEEK_SET);
		}
		fwrite(m, 1, (size_t)len, f->fp);
		if(pos+len > f->len) {
			f->len = pos+len;
		}
	}
	else if(f->btype==DBUF_TYPE_NULL) {
		if(pos+len > f->len) {
			f->len = pos+len;
		}
	}
	else {
		de_internal_err_fatal(f->c, "Attempt to seek on non-seekable stream");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
testq %rcx, %rcx
setle %al
testq %rsi, %rsi
sets %cl
orb %al, %cl
je 0xe5c24
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq (%r14,%rsi), %r13
cmpq 0x20(%rdi), %r13
jle 0xe5c3f
movq %rbx, %rdi
callq 0xe5a3b
movl (%rbx), %eax
testl %eax, %eax
je 0xe5ce3
cmpl $0x2, %eax
je 0xe5c72
cmpl $0x3, %eax
jne 0xe5c78
movq 0x18(%rbx), %rax
cmpq %rax, %r13
jle 0xe5c93
movq %rax, %r13
subq %r12, %r13
jle 0xe5cf6
subq %r13, %r14
testq %r13, %r13
jg 0xe5c99
jmp 0xe5cab
cmpb $0x0, 0x4(%rbx)
je 0xe5cb5
movq 0x8(%rbx), %rdi
leaq 0x561fd(%rip), %rsi     # 0x13be80
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xdf4f0
movq %r14, %r13
xorl %r14d, %r14d
addq 0x78(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x181e0
testq %r14, %r14
jg 0xe5d09
jmp 0xe5c1a
movq 0x10(%rbx), %rdi
callq 0xfcb2e
cmpq %r12, %rax
je 0xe5cd1
movq 0x10(%rbx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xfcb29
movq 0x10(%rbx), %rcx
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x182a0
cmpq 0x18(%rbx), %r13
jle 0xe5c1a
movq %r13, 0x18(%rbx)
jmp 0xe5c1a
subq %rax, %r12
jle 0xe5d06
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe5d20
xorl %r13d, %r13d
addq %r13, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe5d2a
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: membuf_append
static void membuf_append(dbuf *f, const u8 *m, i64 mlen)
{
	i64 new_alloc_size;

	if(f->has_len_limit) {
		if(f->len + mlen > f->len_limit) {
			mlen = f->len_limit - f->len;
		}
	}

	if(mlen<=0) return;

	if(mlen > f->membuf_alloc - f->len) {
		// Need to allocate more space
		new_alloc_size = (f->membuf_alloc + mlen)*2;
		if(new_alloc_size<1024) new_alloc_size=1024;
		if(new_alloc_size > f->max_len_hard) new_alloc_size = f->max_len_hard;
		if(f->c->debug_level>=4) {
			de_dbgx(f->c, 4, "increasing membuf size %"I64_FMT" -> %"I64_FMT,
				f->membuf_alloc, new_alloc_size);
		}
		if(f->len + mlen > f->max_len_hard) {
			do_on_dbuf_size_exceeded(f);
		}
		f->membuf_buf = de_realloc(f->c, f->membuf_buf, f->membuf_alloc, new_alloc_size);
		f->membuf_alloc = new_alloc_size;
	}

	de_memcpy(&f->membuf_buf[f->len], m, (size_t)mlen);
	f->len += mlen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x0, 0x30(%rdi)
je 0xe5d59
movq 0x18(%r14), %rax
movq 0x28(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
addq %rbx, %rax
cmpq %rcx, %rax
cmovgq %rdx, %rbx
testq %rbx, %rbx
jle 0xe5e07
movq 0x18(%r14), %rdi
movq 0x70(%r14), %rcx
movq %rcx, %rax
subq %rdi, %rax
cmpq %rax, %rbx
jle 0xe5df1
leaq (%rcx,%rbx), %rax
addq %rax, %rax
cmpq $0x401, %rax            # imm = 0x401
movl $0x400, %r12d           # imm = 0x400
cmovgeq %rax, %r12
movq 0x8(%r14), %rax
movq 0x20(%r14), %rdx
cmpq %rdx, %r12
cmovgeq %rdx, %r12
cmpl $0x4, (%rax)
jl 0xe5dbf
leaq 0x56283(%rip), %rdx     # 0x13c02a
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %r12, %r8
xorl %eax, %eax
callq 0xdeb15
movq 0x18(%r14), %rdi
movq 0x20(%r14), %rdx
addq %rbx, %rdi
cmpq %rdx, %rdi
jle 0xe5dcf
movq %r14, %rdi
callq 0xe5a3b
movq 0x78(%r14), %rsi
movq 0x8(%r14), %rdi
movq 0x70(%r14), %rdx
movq %r12, %rcx
callq 0xdf70a
movq %rax, 0x78(%r14)
movq %r12, 0x70(%r14)
movq 0x18(%r14), %rdi
jmp 0xe5df5
movq 0x78(%r14), %rax
addq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x181e0
addq %rbx, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_writebyte_at
void dbuf_writebyte_at(dbuf *f, i64 pos, u8 n)
{
	if(f->btype==DBUF_TYPE_MEMBUF && pos>=0 && pos<f->len) {
		// Fast path when overwriting a byte in a membuf
		f->membuf_buf[pos] = n;
		return;
	}

	dbuf_write_at(f, pos, &n, 1);
}

// Assembly:
pushq %rax
movb %dl, 0x7(%rsp)
testq %rsi, %rsi
js 0xe5e31
cmpl $0x3, (%rdi)
jne 0xe5e31
cmpq %rsi, 0x18(%rdi)
jle 0xe5e31
movq 0x78(%rdi), %rax
movb %dl, (%rax,%rsi)
jmp 0xe5e3e
leaq 0x7(%rsp), %rdx
pushq $0x1
popq %rcx
callq 0xe5bfe
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_write_run
void dbuf_write_run(dbuf *f, u8 n, i64 len)
{
	u8 buf[1024];
	i64 amt_left;
	i64 amt_to_write;

	if(len<=0) return;
	de_memset(buf, n, (size_t)len<sizeof(buf) ? (size_t)len : sizeof(buf));
	amt_left = len;
	while(amt_left > 0) {
		if(amt_left < (i64)sizeof(buf))
			amt_to_write = amt_left;
		else
			amt_to_write = (i64)sizeof(buf);
		dbuf_write(f, buf, amt_to_write);
		amt_left -= amt_to_write;
	}
}

// Assembly:
testq %rdx, %rdx
jle 0xe5eb1
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdx, %rbx
movq %rdi, %r14
movl $0x400, %r13d           # imm = 0x400
cmpq %r13, %rdx
movl $0x400, %edx            # imm = 0x400
cmovbq %rbx, %rdx
movzbl %sil, %esi
movq %rsp, %r15
movq %r15, %rdi
callq 0x18140
testq %rbx, %rbx
jle 0xe5ea1
cmpq %r13, %rbx
movl $0x400, %r12d           # imm = 0x400
cmovbq %rbx, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe46ba
subq %r12, %rbx
jmp 0xe5e7c
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/src/deark-dbuf.c
// Function: dbuf_truncate
void dbuf_truncate(dbuf *f, i64 desired_len)
{
	dbuf_flush(f);
	if(desired_len<0) desired_len=0;
	if(desired_len>f->len) {
		dbuf_write_zeroes(f, desired_len - f->len);
	}
	else if(desired_len<f->len) {
		if(f->btype==DBUF_TYPE_MEMBUF || f->btype==DBUF_TYPE_CUSTOM) {
			f->len = desired_len;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe58e8
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
movq %rax, %rsi
subq 0x18(%rbx), %rsi
jle 0xe5ee2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe5d20
jae 0xe5ef4
movl (%rbx), %ecx
cmpl $0x9, %ecx
je 0xe5ef0
cmpl $0x3, %ecx
jne 0xe5ef4
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq