LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_memmatch
int de_memmatch(const u8 *mem, const u8 *pattern, size_t pattern_len,
	u8 wildcard, UI flags)
{
	size_t i;

	for(i=0; i<pattern_len; i++) {
		u8 m = mem[i];
		u8 p = pattern[i];

		if(p==wildcard) continue;
		if(p!=m) return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movl %r8d, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x15f72a
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x31(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x32(%rbp)
movzbl -0x32(%rbp), %eax
movzbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
jne 0x15f705
jmp 0x15f71c
movzbl -0x32(%rbp), %eax
movzbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
je 0x15f71a
movl $0x0, -0x4(%rbp)
jmp 0x15f731
jmp 0x15f71c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x15f6d1
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_memsearch_match
int de_memsearch_match(const u8 *mem, i64 mem_len,
	const u8 *pattern, i64 pattern_len, u8 wildcard, i64 *pfoundpos)
{
	i64 num_start_positions_to_search;
	i64 i;

	*pfoundpos = 0;
	if(pattern_len<1 || pattern_len>mem_len) return 0;
	num_start_positions_to_search = mem_len-pattern_len+1;

	for(i=0; i<num_start_positions_to_search; i++) {
		int ret;

		if(pattern[0]!=mem[i] && pattern[0]!=wildcard) continue;
		ret = de_memmatch(&mem[i], pattern, (size_t)pattern_len, wildcard, 0);
		if(ret) {
			*pfoundpos = i;
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x1, -0x28(%rbp)
jl 0x15f77e
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jle 0x15f78a
movl $0x0, -0x4(%rbp)
jmp 0x15f824
movq -0x18(%rbp), %rax
subq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x15f81d
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movq -0x48(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x15f7d4
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
je 0x15f7d4
jmp 0x15f80f
movq -0x10(%rbp), %rdi
addq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %r8d, %r8d
movzbl -0x29(%rbp), %ecx
callq 0x15f6b0
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x15f80d
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x15f824
jmp 0x15f80f
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x15f7a2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_sanitize_count
int de_sanitize_count(i64 *pn)
{
	if(*pn < 0) {
		*pn = 0;
		return 0;
	}
	if(*pn > DE_MAX_SANE_FILESIZE) {
		*pn = DE_MAX_SANE_FILESIZE;
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jge 0x15f856
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x15f88a
movq -0x10(%rbp), %rax
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
cmpq %rcx, (%rax)
jle 0x15f883
movq -0x10(%rbp), %rax
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x15f88a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_mp_acquire_dbuf
dbuf *de_mp_acquire_dbuf(deark *c, int xidx)
{
	int mpidx;

	if(xidx==0) return c->infile;
	mpidx = xidx-1;
	if(mpidx<0 || mpidx>=c->mp_data->count) return NULL;
	if(!c->mp_data->item[mpidx].f) {
		c->mp_data->item[mpidx].f = dbuf_open_input_file(c, c->mp_data->item[mpidx].fn);
	}
	return c->mp_data->item[mpidx].f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x15f8b6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x15f95c
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x15f8d4
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
cmpl (%rcx), %eax
jl 0x15f8de
movq $0x0, -0x8(%rbp)
jmp 0x15f95c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x15f93d
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x168de0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_mp_release_dbuf
void de_mp_release_dbuf(deark *c, int xidx, dbuf **p_oldf)
{
	int mpidx;

	if(p_oldf) {
		*p_oldf = NULL;
	}
	if(xidx==0) goto done;
	mpidx = xidx-1;
	if(mpidx<0 || mpidx>=c->mp_data->count) goto done;
	if(c->mp_data->item[mpidx].f) {
		dbuf_close(c->mp_data->item[mpidx].f);
		c->mp_data->item[mpidx].f = NULL;
	}
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x15f995
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x0, -0xc(%rbp)
jne 0x15f99d
jmp 0x15fa1c
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x15f9bb
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
cmpl (%rcx), %eax
jl 0x15f9bd
jmp 0x15fa1c
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x15fa1a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x1676a0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
jmp 0x15fa1c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: get_ndigits_for_offset
static int get_ndigits_for_offset(i64 n)
{
	int nd;

	if(n<10) nd=1;
	else if(n<100) nd=2;
	else if(n<1000) nd=3;
	else if(n<10000) nd=4;
	else nd=5;
	return nd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
cmpq $0xa, -0x8(%rbp)
jge 0x15fa48
movl $0x1, -0xc(%rbp)
jmp 0x15fa8b
cmpq $0x64, -0x8(%rbp)
jge 0x15fa58
movl $0x2, -0xc(%rbp)
jmp 0x15fa89
cmpq $0x3e8, -0x8(%rbp)      # imm = 0x3E8
jge 0x15fa6b
movl $0x3, -0xc(%rbp)
jmp 0x15fa87
cmpq $0x2710, -0x8(%rbp)     # imm = 0x2710
jge 0x15fa7e
movl $0x4, -0xc(%rbp)
jmp 0x15fa85
movl $0x5, -0xc(%rbp)
jmp 0x15fa87
jmp 0x15fa89
jmp 0x15fa8b
movl -0xc(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: de_char_to_valid_fn_char
static i32 de_char_to_valid_fn_char(deark *c, i32 ch)
{
	if(ch>=32 && ch<=126 && ch!='/' && ch!='\\' && ch!=':'
		&& ch!='*' && ch!='?' && ch!='\"' && ch!='<' &&
		ch!='>' && ch!='|')
	{
		// These are the valid ASCII characters in Windows filenames.
		// TODO: We could behave differently on different platforms.
		return ch;
	}
	else if(ch>=160 && ch<=0x10ffff) {
		// TODO: A lot of Unicode characters probably don't belong in filenames.
		// Maybe we need a whitelist or blacklist.
		// (is_printable_uchar() exists, but isn't quite right.)
		return ch;
	}
	return '_';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jl 0x15fdc5
cmpl $0x7e, -0x14(%rbp)
jg 0x15fdc5
cmpl $0x2f, -0x14(%rbp)
je 0x15fdc5
cmpl $0x5c, -0x14(%rbp)
je 0x15fdc5
cmpl $0x3a, -0x14(%rbp)
je 0x15fdc5
cmpl $0x2a, -0x14(%rbp)
je 0x15fdc5
cmpl $0x3f, -0x14(%rbp)
je 0x15fdc5
cmpl $0x22, -0x14(%rbp)
je 0x15fdc5
cmpl $0x3c, -0x14(%rbp)
je 0x15fdc5
cmpl $0x3e, -0x14(%rbp)
je 0x15fdc5
cmpl $0x7c, -0x14(%rbp)
je 0x15fdc5
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x15fde8
cmpl $0xa0, -0x14(%rbp)
jl 0x15fddf
cmpl $0x10ffff, -0x14(%rbp)  # imm = 0x10FFFF
jg 0x15fddf
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x15fde8
jmp 0x15fde1
movl $0x5f, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-util.c
// Function: sanitize_filename1
static void sanitize_filename1(deark *c, de_ucstring *s)
{
	// Don't allow "."
	if(s->len==1 && s->str[0]=='.') {
		s->str[0] = '_';
	}
	// Don't allow ".."
	if(s->len==2 && s->str[0]=='.' && s->str[1]=='.') {
		s->str[0] = '_';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x10(%rax)
jne 0x15fe22
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2e, (%rax)
jne 0x15fe22
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x5f, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x2, 0x10(%rax)
jne 0x15fe56
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2e, (%rax)
jne 0x15fe56
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2e, 0x4(%rax)
jne 0x15fe56
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x5f, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_decode_hex_digit
u8 de_decode_hex_digit(u8 x, int *errorflag)
{
	if(errorflag) *errorflag = 0;
	if(x>='0' && x<='9') return x-48;
	if(x>='A' && x<='F') return x-55;
	if(x>='a' && x<='f') return x-87;
	if(errorflag) *errorflag = 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1600cf
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movzbl -0x2(%rbp), %eax
cmpl $0x30, %eax
jl 0x1600ed
movzbl -0x2(%rbp), %eax
cmpl $0x39, %eax
jg 0x1600ed
movzbl -0x2(%rbp), %eax
subl $0x30, %eax
movb %al, -0x1(%rbp)
jmp 0x16013e
movzbl -0x2(%rbp), %eax
cmpl $0x41, %eax
jl 0x16010b
movzbl -0x2(%rbp), %eax
cmpl $0x46, %eax
jg 0x16010b
movzbl -0x2(%rbp), %eax
subl $0x37, %eax
movb %al, -0x1(%rbp)
jmp 0x16013e
movzbl -0x2(%rbp), %eax
cmpl $0x61, %eax
jl 0x160129
movzbl -0x2(%rbp), %eax
cmpl $0x66, %eax
jg 0x160129
movzbl -0x2(%rbp), %eax
subl $0x57, %eax
movb %al, -0x1(%rbp)
jmp 0x16013e
cmpq $0x0, -0x10(%rbp)
je 0x16013a
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_latin2_to_unicode
static de_rune de_latin2_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a<=0x9f) n = a;
	else if(a>=0xa0 && a<=0xbf) n = (de_rune)latin2table[a-0xa0];
	else if(a>=0x0c0 && a<=0xff) n = (de_rune)windows1250table[a-0x80];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x9f, -0xc(%rbp)
jg 0x1603dc
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x160441
cmpl $0xa0, -0xc(%rbp)
jl 0x160409
cmpl $0xbf, -0xc(%rbp)
jg 0x160409
movl -0xc(%rbp), %eax
subl $0xa0, %eax
movslq %eax, %rcx
leaq 0x72050(%rip), %rax     # 0x1d2450
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x16043f
cmpl $0xc0, -0xc(%rbp)
jl 0x160436
cmpl $0xff, -0xc(%rbp)
jg 0x160436
movl -0xc(%rbp), %eax
subl $0x80, %eax
movslq %eax, %rcx
leaq 0x72063(%rip), %rax     # 0x1d2490
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x16043d
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
jmp 0x16043f
jmp 0x160441
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x160451
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_cp437c_to_unicode
static de_rune de_cp437c_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a<=0x7f) n = a;
	else if(a>=0x80 && a<=0xff) n = (de_rune)cp437table[a];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jg 0x160479
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1604a8
cmpl $0x80, -0xc(%rbp)
jl 0x16049f
cmpl $0xff, -0xc(%rbp)
jg 0x16049f
movslq -0xc(%rbp), %rcx
leaq 0x720fa(%rip), %rax     # 0x1d2590
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x1604a6
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
jmp 0x1604a8
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x1604b8
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_cp437g_to_unicode
static de_rune de_cp437g_to_unicode(struct de_encconv_state *es_unused, i32 a)
{
	de_rune n;
	if(a<=0xff) n = (de_rune)cp437table[a];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0xff, -0xc(%rbp)
jg 0x160538
movslq -0xc(%rbp), %rcx
leaq 0x72061(%rip), %rax     # 0x1d2590
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x16053f
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x16054f
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_petscii_to_unicode
static de_rune de_petscii_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a<=0xff) n = petscii1table[a];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	if(a==0x0a) {
		// This is a hack to make "-m plaintext -inenc petscii" work with the
		// output from the basic_c64 module.
		if(es->enc_subtype==DE_ENCSUBTYPE_HYBRID) {
			n = 0x0a;
		}
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0xff, -0xc(%rbp)
jg 0x1605e7
movslq -0xc(%rbp), %rcx
leaq 0x723b1(%rip), %rax     # 0x1d2990
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
jmp 0x1605ee
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x1605fe
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
cmpl $0xa, -0xc(%rbp)
jne 0x160617
movq -0x8(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x160615
movl $0xa, -0x10(%rbp)
jmp 0x160617
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_windows1252_to_unicode
static de_rune de_windows1252_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a>=0x80 && a<=0x9f) n = (de_rune)windows1252table[a-0x80];
	else if(a<=0xff) n = a;
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x80, -0xc(%rbp)
jl 0x160658
cmpl $0x9f, -0xc(%rbp)
jg 0x160658
movl -0xc(%rbp), %eax
subl $0x80, %eax
movslq %eax, %rcx
leaq 0x72741(%rip), %rax     # 0x1d2d90
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x160672
cmpl $0xff, -0xc(%rbp)
jg 0x160669
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x160670
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
jmp 0x160672
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x160682
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_ext_ascii_to_unicode
static de_rune de_ext_ascii_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;

	if(a<=0x7f) n = a;
	else if(a>=0x80 && a<=0xff) n = (de_rune)((struct ext_ascii_pvt_data*)es->fn_pvt_data)->tbl[a-0x80];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jg 0x1606a9
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x1606e4
cmpl $0x80, -0xc(%rbp)
jl 0x1606db
cmpl $0xff, -0xc(%rbp)
jg 0x1606db
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x1606e2
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
jmp 0x1606e4
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x1606f4
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_windows874_to_unicode
static de_rune de_windows874_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n = 0xffff;
	if(a<=0x7f || a==0xa0) n = a;
	else if(a==0x80 || a==0x85 || (a>=0x91 && a<=0x97)) n = (de_rune)windows1252table[a-0x80];
	else if((a>=0xa1 && a<=0xda) || (a>=0xdf && a<=0xfb)) n = a + (0xe01 - 0xa1);
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
cmpl $0x7f, -0xc(%rbp)
jle 0x160721
cmpl $0xa0, -0xc(%rbp)
jne 0x160729
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x16079b
cmpl $0x80, -0xc(%rbp)
je 0x16074d
cmpl $0x85, -0xc(%rbp)
je 0x16074d
cmpl $0x91, -0xc(%rbp)
jl 0x160768
cmpl $0x97, -0xc(%rbp)
jg 0x160768
movl -0xc(%rbp), %eax
subl $0x80, %eax
movslq %eax, %rcx
leaq 0x72631(%rip), %rax     # 0x1d2d90
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x160799
cmpl $0xa1, -0xc(%rbp)
jl 0x16077a
cmpl $0xda, -0xc(%rbp)
jle 0x16078c
cmpl $0xdf, -0xc(%rbp)
jl 0x160797
cmpl $0xfb, -0xc(%rbp)
jg 0x160797
movl -0xc(%rbp), %eax
addl $0xd60, %eax            # imm = 0xD60
movl %eax, -0x10(%rbp)
jmp 0x160799
jmp 0x16079b
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x1607ab
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_atarist_to_unicode
static de_rune de_atarist_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;

	if(a<=0x1f || a==0x7f) {
		if (es->enc_subtype==DE_ENCSUBTYPE_HYBRID || es->enc_subtype==DE_ENCSUBTYPE_CONTROLS) {
			return a;
		}
	}
	if(a<=0x1f) n = atarist_table_lo[a];
	else if(a>=0xb0 && a<=0xff) n = (de_rune)atarist_table_hi[a-0xb0];
	else if(a==0x7f) n = 0x0394;
	else if(a==0x9e) n = 0x00df;
	else n = de_cp437g_to_unicode(NULL, a);
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x1f, -0x14(%rbp)
jle 0x1607cb
cmpl $0x7f, -0x14(%rbp)
jne 0x1607ec
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4(%rax)
je 0x1607df
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0x1607ea
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16087e
jmp 0x1607ec
cmpl $0x1f, -0x14(%rbp)
jg 0x160805
movslq -0x14(%rbp), %rcx
leaq 0x729d3(%rip), %rax     # 0x1d31d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0x160868
cmpl $0xb0, -0x14(%rbp)
jl 0x160832
cmpl $0xff, -0x14(%rbp)
jg 0x160832
movl -0x14(%rbp), %eax
subl $0xb0, %eax
movslq %eax, %rcx
leaq 0x72a27(%rip), %rax     # 0x1d3250
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x18(%rbp)
jmp 0x160866
cmpl $0x7f, -0x14(%rbp)
jne 0x160841
movl $0x394, -0x18(%rbp)     # imm = 0x394
jmp 0x160864
cmpl $0x9e, -0x14(%rbp)
jne 0x160853
movl $0xdf, -0x18(%rbp)
jmp 0x160862
movl -0x14(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x160510
movl %eax, -0x18(%rbp)
jmp 0x160864
jmp 0x160866
jmp 0x160868
cmpl $0xffff, -0x18(%rbp)    # imm = 0xFFFF
jne 0x160878
movl $0xfffffff, -0x18(%rbp) # imm = 0xFFFFFFF
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_riscos_to_unicode
static de_rune de_riscos_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a>=0x80 && a<=0x9f) n = (de_rune)riscostable[a-0x80];
	else if(a<=0xff) n = a;
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x80, -0xc(%rbp)
jl 0x160928
cmpl $0x9f, -0xc(%rbp)
jg 0x160928
movl -0xc(%rbp), %eax
subl $0x80, %eax
movslq %eax, %rcx
leaq 0x729e1(%rip), %rax     # 0x1d3300
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x160942
cmpl $0xff, -0xc(%rbp)
jg 0x160939
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x160940
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
jmp 0x160942
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x160952
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_decspecialgraphics_to_unicode
static de_rune de_decspecialgraphics_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;
	if(a>=95 && a<=126) n = (de_rune)decspecialgraphicstable[a-95];
	else n = DE_CODEPOINT_INVALID;
	if(n==0xffff) n = DE_CODEPOINT_INVALID;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x5f, -0xc(%rbp)
jl 0x1609b0
cmpl $0x7e, -0xc(%rbp)
jg 0x1609b0
movl -0xc(%rbp), %eax
subl $0x5f, %eax
movslq %eax, %rcx
leaq 0x72999(%rip), %rax     # 0x1d3340
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
jmp 0x1609b7
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
cmpl $0xffff, -0x10(%rbp)    # imm = 0xFFFF
jne 0x1609c7
movl $0xfffffff, -0x10(%rbp) # imm = 0xFFFFFFF
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_rot13_to_unicode
static de_rune de_rot13_to_unicode(struct de_encconv_state *es, i32 a)
{
	de_rune n;

	if((a>='A' && a<='M') || (a>='a' && a<='m')) {
		n = (de_rune)a+13;
	}
	else if((a>='N' && a<='Z') || (a>='n' && a<='z')) {
		n = (de_rune)a-13;
	}
	else {
		n = (de_rune)a;
	}

	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x41, -0xc(%rbp)
jl 0x1609e7
cmpl $0x4d, -0xc(%rbp)
jle 0x1609f3
cmpl $0x61, -0xc(%rbp)
jl 0x1609fe
cmpl $0x6d, -0xc(%rbp)
jg 0x1609fe
movl -0xc(%rbp), %eax
addl $0xd, %eax
movl %eax, -0x10(%rbp)
jmp 0x160a29
cmpl $0x4e, -0xc(%rbp)
jl 0x160a0a
cmpl $0x5a, -0xc(%rbp)
jle 0x160a16
cmpl $0x6e, -0xc(%rbp)
jl 0x160a21
cmpl $0x7a, -0xc(%rbp)
jg 0x160a21
movl -0xc(%rbp), %eax
subl $0xd, %eax
movl %eax, -0x10(%rbp)
jmp 0x160a27
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x160a29
movl -0x10(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_char_to_unicode_ex
de_rune de_char_to_unicode_ex(i32 a, struct de_encconv_state *es)
{
	if(a<0) return DE_CODEPOINT_INVALID;
	if(es->fn) {
		return es->fn(es, a);
	}

	switch(es->enc) {
	case DE_ENCODING_ASCII:
		if(es->enc_subtype==DE_ENCSUBTYPE_PRINTABLE) {
			return (a>=32 && a<=126)?a:DE_CODEPOINT_INVALID;
		}
		return (a<128)?a:DE_CODEPOINT_INVALID;
	case DE_ENCODING_LATIN1:
		return (a<256)?a:DE_CODEPOINT_INVALID;
	default:
		break;
	}
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x160a51
movl $0xfffffff, -0x4(%rbp)  # imm = 0xFFFFFFF
jmp 0x160b0d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x160a75
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x8(%rbp), %esi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x160b0d
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x160a8f
jmp 0x160a85
movl -0x14(%rbp), %eax
subl $0x5, %eax
je 0x160ae2
jmp 0x160b05
movq -0x10(%rbp), %rax
cmpl $0x4, 0x4(%rax)
jne 0x160abf
cmpl $0x20, -0x8(%rbp)
jl 0x160aad
cmpl $0x7e, -0x8(%rbp)
jg 0x160aad
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x160ab7
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
movl %eax, -0x18(%rbp)
jmp 0x160ab7
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x160b0d
cmpl $0x80, -0x8(%rbp)
jge 0x160ad0
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x160ada
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x160ada
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x160b0d
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x160af3
movl -0x8(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x160afd
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
movl %eax, -0x20(%rbp)
jmp 0x160afd
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x160b0d
jmp 0x160b07
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_uchar_to_utf8
void de_uchar_to_utf8(de_rune u1, u8 *utf8buf, i64 *p_utf8len)
{
	u32 u = (u32)u1;

	// TODO: Maybe there should be a flag to tell what to do with
	// our special codepoints (DE_CODEPOINT_BYTE00, ...).
	if(u1<0 || u1>0x10ffff)	{
		u=0xfffd;
	}

	if(u<=0x7f) {
		*p_utf8len = 1;
		utf8buf[0] = (u8)u;
	}
	else if(u>=0x80 && u<=0x7ff) {
		*p_utf8len = 2;
		utf8buf[0] = 0xc0 | (u8)(u>>6);
		utf8buf[1] = 0x80 | (u&0x3f);
	}
	else if(u>=0x800 && u<=0xffff) {
		*p_utf8len = 3;
		utf8buf[0] = 0xe0 | (u8)(u>>12);
		utf8buf[1] = 0x80 | ((u>>6)&0x3f);
		utf8buf[2] = 0x80 | (u&0x3f);
	}
	else {
		*p_utf8len = 4;
		utf8buf[0] = 0xf0 | (u8)(u>>18);
		utf8buf[1] = 0x80 | ((u>>12)&0x3f);
		utf8buf[2] = 0x80 | ((u>>6)&0x3f);
		utf8buf[3] = 0x80 | (u&0x3f);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x160b74
cmpl $0x10ffff, -0x4(%rbp)   # imm = 0x10FFFF
jle 0x160b7b
movl $0xfffd, -0x1c(%rbp)    # imm = 0xFFFD
cmpl $0x7f, -0x1c(%rbp)
ja 0x160b9c
movq -0x18(%rbp), %rax
movq $0x1, (%rax)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x160caf
cmpl $0x80, -0x1c(%rbp)
jb 0x160be8
cmpl $0x7ff, -0x1c(%rbp)     # imm = 0x7FF
ja 0x160be8
movq -0x18(%rbp), %rax
movq $0x2, (%rax)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
movzbl %al, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x160cad
cmpl $0x800, -0x1c(%rbp)     # imm = 0x800
jb 0x160c48
cmpl $0xffff, -0x1c(%rbp)    # imm = 0xFFFF
ja 0x160c48
movq -0x18(%rbp), %rax
movq $0x3, (%rax)
movl -0x1c(%rbp), %eax
shrl $0xc, %eax
movzbl %al, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x1c(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x160cab
movq -0x18(%rbp), %rax
movq $0x4, (%rax)
movl -0x1c(%rbp), %eax
shrl $0x12, %eax
movzbl %al, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
shrl $0xc, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x1c(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x160cad
jmp 0x160caf
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_is_ascii
int de_is_ascii(const u8 *buf, i64 buflen)
{
	i64 i;

	for(i=0; i<buflen; i++) {
		if(buf[i]>=128) return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x16113a
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
jl 0x16112a
movl $0x0, -0x4(%rbp)
jmp 0x161141
jmp 0x16112c
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x161104
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_get_std_palette_entry
de_color de_get_std_palette_entry(int pal_id, int pal_subid, int index)
{
	const u8 *pal;
	i64 stdpal_ncolors;

	pal = get_stdpal_colors(pal_id, pal_subid, &stdpal_ncolors);
	if(!pal || index<0 || index>=(int)stdpal_ncolors) {
		return DE_STOCKCOLOR_BLACK;
	}
	return DE_MAKE_RGB(pal[index*3], pal[index*3+1], pal[index*3+2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
leaq -0x20(%rbp), %rdx
callq 0x1611f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x16118c
cmpl $0x0, -0x10(%rbp)
jl 0x16118c
movl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl %ecx, %eax
jl 0x161195
movl $0xff000000, -0x4(%rbp) # imm = 0xFF000000
jmp 0x1611da
movq -0x18(%rbp), %rax
imull $0x3, -0x10(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movq -0x18(%rbp), %rcx
imull $0x3, -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
imull $0x3, -0x10(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: get_stdpal_colors
static const u8 *get_stdpal_colors(int pal_id, int pal_subid, i64 *pncolors)
{
	const u8 *p = NULL;

	*pncolors = 0;

	switch(pal_id) {
	case DE_PALID_CGA:
		*pncolors = 4;
		if(pal_subid>=0 && pal_subid<=5) {
			p = stdpals_cga[pal_subid];
		}
		else {
			p = stdpals_cga[2];
		}
		break;
	case DE_PALID_PC16:
		*pncolors = 16;
		p = stdpal_pc16_colors;
		break;
	case DE_PALID_WIN16:
		*pncolors = 16;
		switch(pal_subid) {
		case 1: p = stdpal_win16_colors_1; break;
		case 2: p = stdpal_win16_colors_2; break;
		default: p = stdpal_win16_colors_0; break;
		}
		break;
	case DE_PALID_EGA64:
		*pncolors = 64;
		p = stdpal_ega64_colors;
		break;
	case DE_PALID_VGA256:
		*pncolors = 256;
		p = stdpal_vga256_colors;
		break;
	}
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl -0x4(%rbp), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x28, %eax
ja 0x16130c
movq -0x20(%rbp), %rax
leaq 0x70e7b(%rip), %rcx     # 0x1d20ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq $0x4, (%rax)
cmpl $0x0, -0x8(%rbp)
jl 0x161269
cmpl $0x5, -0x8(%rbp)
jg 0x161269
movslq -0x8(%rbp), %rcx
leaq 0x72124(%rip), %rax     # 0x1d3380
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x161278
leaq 0x72110(%rip), %rax     # 0x1d3380
addq $0x18, %rax
movq %rax, -0x18(%rbp)
jmp 0x16130c
movq -0x10(%rbp), %rax
movq $0x10, (%rax)
leaq 0x72141(%rip), %rax     # 0x1d33d0
movq %rax, -0x18(%rbp)
jmp 0x16130c
movq -0x10(%rbp), %rax
movq $0x10, (%rax)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x1, %eax
je 0x1612b7
jmp 0x1612ad
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0x1612c4
jmp 0x1612d1
leaq 0x72142(%rip), %rax     # 0x1d3400
movq %rax, -0x18(%rbp)
jmp 0x1612dc
leaq 0x72165(%rip), %rax     # 0x1d3430
movq %rax, -0x18(%rbp)
jmp 0x1612dc
leaq 0x72188(%rip), %rax     # 0x1d3460
movq %rax, -0x18(%rbp)
jmp 0x16130c
movq -0x10(%rbp), %rax
movq $0x40, (%rax)
leaq 0x721a0(%rip), %rax     # 0x1d3490
movq %rax, -0x18(%rbp)
jmp 0x16130c
movq -0x10(%rbp), %rax
movq $0x100, (%rax)          # imm = 0x100
leaq 0x72248(%rip), %rax     # 0x1d3550
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_copy_std_palette
void de_copy_std_palette(int pal_id, int pal_subid, i64 starting_idx,
	de_color *dstpal, size_t dstpal_capacity, UI flags)
{
	const u8 *pal;
	i64 n_to_copy;
	i64 stdpal_ncolors;

	if(flags & DE_COPYPALFLAG_INITPAL) {
		de_zeromem(dstpal, dstpal_capacity*sizeof(de_color));
	}

	pal = get_stdpal_colors(pal_id, pal_subid, &stdpal_ncolors);
	if(!pal) goto done;
	if(starting_idx >= stdpal_ncolors) goto done;

	n_to_copy = de_min_int((i64)dstpal_capacity, stdpal_ncolors - starting_idx);
	if(n_to_copy<=0) goto done;
	de_copy_palette_from_rgb24(&pal[starting_idx*3], dstpal, (size_t)n_to_copy);
done:
	;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x16135c
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x19140
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
leaq -0x40(%rbp), %rdx
callq 0x1611f0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x161378
jmp 0x1613bb
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jl 0x161384
jmp 0x1613bb
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
subq -0x10(%rbp), %rsi
callq 0x15ccf0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jg 0x1613a2
jmp 0x1613bb
movq -0x30(%rbp), %rdi
imulq $0x3, -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x1613d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_sample_nbit_to_8bit
u8 de_sample_nbit_to_8bit(i64 n, unsigned int x)
{
	unsigned int maxval;

	if(x==0) return 0;
	if(n<1 || n>16) return 0;
	maxval = (1<<n)-1;
	if(x>=maxval) return 255;
	return (u8)(0.5+((((double)x)/(double)maxval)*255.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x161697
movb $0x0, -0x1(%rbp)
jmp 0x1616ff
cmpq $0x1, -0x10(%rbp)
jl 0x1616a5
cmpq $0x10, -0x10(%rbp)
jle 0x1616ab
movb $0x0, -0x1(%rbp)
jmp 0x1616ff
movq -0x10(%rbp), %rax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jb 0x1616cc
movb $-0x1, -0x1(%rbp)
jmp 0x1616ff
movl -0x14(%rbp), %eax
cvtsi2sd %rax, %xmm0
movl -0x18(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd 0x41f48(%rip), %xmm1    # 0x1a3630
mulsd %xmm1, %xmm0
movsd 0x41f44(%rip), %xmm1    # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_scale_n_to_16bit
void de_scale_n_to_16bit(int n, int x_in, u8 *x_out_hi, u8 *x_out_lo)
{
	double tmp1;
	UI tmp2;

	if(x_in<0) x_in = 0;
	if(x_in>n) x_in = n;
	tmp1 = ((double)x_in / (double)n) * 65535.0;
	tmp2 = (UI)(tmp1 + 0.5);
	*x_out_hi = (tmp2 & 0xff00)>>8;
	*x_out_lo = (tmp2 & 0xff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x16182f
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jle 0x16183d
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
cvtsi2sdl -0x8(%rbp), %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x7300d(%rip), %xmm1    # 0x1d4860
mulsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0x41dcf(%rip), %xmm1    # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_rgb565_to_888
de_color de_rgb565_to_888(u32 x)
{
	u8 cr, cg, cb;
	cr = (u8)(x>>11);
	cg = (u8)((x>>5)&0x3f);
	cb = (u8)(x&0x1f);
	cr = (u8)(0.5+((double)cr)*(255.0/31.0));
	cg = (u8)(0.5+((double)cg)*(255.0/63.0));
	cb = (u8)(0.5+((double)cb)*(255.0/31.0));
	return DE_MAKE_RGB(cr, cg, cb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0xb, %eax
movb %al, -0x5(%rbp)
movl -0x4(%rbp), %eax
shrl $0x5, %eax
andb $0x3f, %al
movb %al, -0x6(%rbp)
movb -0x4(%rbp), %al
andb $0x1f, %al
movb %al, -0x7(%rbp)
movzbl -0x5(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x72f95(%rip), %xmm2    # 0x1d4868
mulsd %xmm2, %xmm0
movsd 0x41d59(%rip), %xmm1    # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x5(%rbp)
movzbl -0x6(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x72f56(%rip), %xmm3    # 0x1d4850
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x6(%rbp)
movzbl -0x7(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x7(%rbp)
movzbl -0x5(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0x6(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x7(%rbp), %ecx
orl %ecx, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_bgr555_to_888
de_color de_bgr555_to_888(u32 x)
{
	u8 cr, cg, cb;
	cb = (u8)((x>>10)&0x1f);
	cg = (u8)((x>>5)&0x1f);
	cr = (u8)(x&0x1f);
	cb = (u8)(0.5+((double)cb)*(255.0/31.0));
	cg = (u8)(0.5+((double)cg)*(255.0/31.0));
	cr = (u8)(0.5+((double)cr)*(255.0/31.0));
	return DE_MAKE_RGB(cr, cg, cb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0xa, %eax
andb $0x1f, %al
movb %al, -0x7(%rbp)
movl -0x4(%rbp), %eax
shrl $0x5, %eax
andb $0x1f, %al
movb %al, -0x6(%rbp)
movb -0x4(%rbp), %al
andb $0x1f, %al
movb %al, -0x5(%rbp)
movzbl -0x7(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x72ef3(%rip), %xmm2    # 0x1d4868
mulsd %xmm2, %xmm0
movsd 0x41cb7(%rip), %xmm1    # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x7(%rbp)
movzbl -0x6(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x6(%rbp)
movzbl -0x5(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x5(%rbp)
movzbl -0x5(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0x6(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x7(%rbp), %ecx
orl %ecx, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_rgb555_to_888
de_color de_rgb555_to_888(u32 x)
{
	u8 cr, cg, cb;
	cr = (u8)((x>>10)&0x1f);
	cg = (u8)((x>>5)&0x1f);
	cb = (u8)(x&0x1f);
	cr = (u8)(0.5+((double)cr)*(255.0/31.0));
	cg = (u8)(0.5+((double)cg)*(255.0/31.0));
	cb = (u8)(0.5+((double)cb)*(255.0/31.0));
	return DE_MAKE_RGB(cr, cg, cb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0xa, %eax
andb $0x1f, %al
movb %al, -0x5(%rbp)
movl -0x4(%rbp), %eax
shrl $0x5, %eax
andb $0x1f, %al
movb %al, -0x6(%rbp)
movb -0x4(%rbp), %al
andb $0x1f, %al
movb %al, -0x7(%rbp)
movzbl -0x5(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x72e53(%rip), %xmm2    # 0x1d4868
mulsd %xmm2, %xmm0
movsd 0x41c17(%rip), %xmm1    # 0x1a3638
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x5(%rbp)
movzbl -0x6(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x6(%rbp)
movzbl -0x7(%rbp), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, -0x7(%rbp)
movzbl -0x5(%rbp), %eax
shll $0x10, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movzbl -0x6(%rbp), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzbl -0x7(%rbp), %ecx
orl %ecx, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_write_codepoint_to_html
void de_write_codepoint_to_html(deark *c, dbuf *f, de_rune ch)
{
	int e; // How to encode this codepoint

	if(ch<0 || ch>0x10ffff || ch==DE_CODEPOINT_INVALID) ch=0xfffd;

	if(ch=='&' || ch=='<' || ch=='>') {
		e = 1; // HTML entity
	}
	else if(ch>=32 && ch<=126) {
		e = 2; // raw byte
	}
	else if(c->ascii_html) {
		e = 1; // HTML entity
	}
	else {
		e = 3; // UTF-8
	}

	if(e==2) {
		dbuf_writebyte(f, (u8)ch);
	}
	else if(e==3) {
		dbuf_write_uchar_as_utf8(f, ch);
	}
	else {
		dbuf_printf(f, "&#%d;", (int)ch);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x161d3b
cmpl $0x10ffff, -0x14(%rbp)  # imm = 0x10FFFF
jg 0x161d3b
cmpl $0xfffffff, -0x14(%rbp) # imm = 0xFFFFFFF
jne 0x161d42
movl $0xfffd, -0x14(%rbp)    # imm = 0xFFFD
cmpl $0x26, -0x14(%rbp)
je 0x161d54
cmpl $0x3c, -0x14(%rbp)
je 0x161d54
cmpl $0x3e, -0x14(%rbp)
jne 0x161d5d
movl $0x1, -0x18(%rbp)
jmp 0x161d93
cmpl $0x20, -0x14(%rbp)
jl 0x161d72
cmpl $0x7e, -0x14(%rbp)
jg 0x161d72
movl $0x2, -0x18(%rbp)
jmp 0x161d91
movq -0x8(%rbp), %rax
cmpb $0x0, 0xce(%rax)
je 0x161d88
movl $0x1, -0x18(%rbp)
jmp 0x161d8f
movl $0x3, -0x18(%rbp)
jmp 0x161d91
jmp 0x161d93
cmpl $0x2, -0x18(%rbp)
jne 0x161daa
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movzbl %al, %esi
callq 0x168380
jmp 0x161dd5
cmpl $0x3, -0x18(%rbp)
jne 0x161dbe
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x160cc0
jmp 0x161dd3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x72aa4(%rip), %rsi     # 0x1d4870
movb $0x0, %al
callq 0x167f00
jmp 0x161dd5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_encoding_name_to_code
de_encoding de_encoding_name_to_code(const char *encname)
{
	size_t k;

	for(k=0; k<DE_ARRAYCOUNT(de_encmap_arr); k++) {
		if(!de_strcasecmp(encname, de_encmap_arr[k].encname)) {
			return de_encmap_arr[k].n;
		}
	}
	return DE_ENCODING_UNKNOWN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x18, -0x18(%rbp)
jae 0x161e49
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
leaq 0xc2a96(%rip), %rax     # 0x2248a0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x15aaa0
cmpl $0x0, %eax
jne 0x161e39
movq -0x18(%rbp), %rcx
leaq 0xc2a76(%rip), %rax     # 0x2248a0
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x161e50
jmp 0x161e3b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x161df4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-data.c
// Function: de_cp437like_to_unicode
static de_rune de_cp437like_to_unicode(struct de_encconv_state *es, i32 a,
	const u16 tbl2[128])
{
	de_rune n;

	if(a>0xff) n = DE_CODEPOINT_INVALID;
	else if(a>=0x20 && a<=0x7e) n = a;
	else if(a>=0x80 && a<=0xff) n = (de_rune)tbl2[a-0x80];
	else {
		if(es->enc_subtype==DE_ENCSUBTYPE_CONTROLS ||
			(es->enc_subtype==DE_ENCSUBTYPE_HYBRID && is_hybrid_codepoint(a)))
		{
			n = a;
		}
		else {
			return de_cp437g_to_unicode(es, a);
		}
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0xff, -0x14(%rbp)
jle 0x162275
movl $0xfffffff, -0x24(%rbp) # imm = 0xFFFFFFF
jmp 0x1622f4
cmpl $0x20, -0x14(%rbp)
jl 0x162289
cmpl $0x7e, -0x14(%rbp)
jg 0x162289
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1622f2
cmpl $0x80, -0x14(%rbp)
jl 0x1622b4
cmpl $0xff, -0x14(%rbp)
jg 0x1622b4
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
jmp 0x1622f0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x4(%rax)
je 0x1622d5
movq -0x10(%rbp), %rax
cmpl $0x3, 0x4(%rax)
jne 0x1622dd
movl -0x14(%rbp), %edi
callq 0x162210
cmpl $0x0, %eax
je 0x1622dd
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1622ee
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x160510
movl %eax, -0x4(%rbp)
jmp 0x1622fa
jmp 0x1622f0
jmp 0x1622f2
jmp 0x1622f4
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-zip.c
// Function: set_dos_modtime
static void set_dos_modtime(struct zipw_md *md)
{
	struct de_timestamp tmpts;
	struct de_struct_tm tm2;

	// Clamp to the range of times supported
	if(md->modtime_unix < 315532800) { // 1 Jan 1980 00:00:00
		de_unix_time_to_timestamp(315532800, &tmpts, 0x0);
		de_gmtime(&tmpts, &tm2);
	}
	else if(md->modtime_unix > 4354819198LL) { // 31 Dec 2107 23:59:58
		de_unix_time_to_timestamp(4354819198LL, &tmpts, 0x0);
		de_gmtime(&tmpts, &tm2);
	}
	else {
		de_gmtime(&md->modtime, &tm2);
	}

	md->modtime_dostime = (unsigned int)(((tm2.tm_hour) << 11) +
		((tm2.tm_min) << 5) + ((tm2.tm_sec) >> 1));
	md->modtime_dosdate = (unsigned int)(((tm2.tm_fullyear - 1980) << 9) +
		((tm2.tm_mon + 1) << 5) + tm2.tm_mday);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x12cea600, 0x30(%rax) # imm = 0x12CEA600
jge 0x1629d9
movl $0x12cea600, %edi       # imm = 0x12CEA600
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x15d530
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15de50
jmp 0x162a20
movq -0x8(%rbp), %rax
movabsq $0x10391447e, %rcx      # imm = 0x10391447E
cmpq %rcx, 0x30(%rax)
jle 0x162a11
movabsq $0x10391447e, %rdi      # imm = 0x10391447E
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x15d530
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15de50
jmp 0x162a1e
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15de50
jmp 0x162a20
movl -0x28(%rbp), %ecx
shll $0xb, %ecx
movl -0x24(%rbp), %eax
shll $0x5, %eax
addl %eax, %ecx
movl -0x20(%rbp), %eax
sarl %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x3c(%rax)
movl -0x34(%rbp), %ecx
subl $0x7bc, %ecx            # imm = 0x7BC
shll $0x9, %ecx
movl -0x30(%rbp), %eax
addl $0x1, %eax
shll $0x5, %eax
addl %eax, %ecx
addl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)