LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: de_char_output_to_file
void de_char_output_to_file(deark *c, struct de_char_context *charctx)
{
	i64 i;
	const char *s;
	int n;
	struct charextractx *ectx = NULL;

	ectx = de_malloc(c, sizeof(struct charextractx));

	de_char_decide_output_format(c, charctx);

	if(charctx->prefer_9col_mode) {
		ectx->vga_9col_mode = 1;
	}

	s = de_get_ext_option(c, "char:charwidth");
	if(s) {
		n = de_atoi(s);
		if(n>=9) {
			ectx->vga_9col_mode = 1;
		}
		else if(n>=1) {
			ectx->vga_9col_mode = 0;
		}
	}

	ectx->scrstats = de_mallocarray(c, charctx->nscreens, sizeof(struct screen_stats));

	for(i=0; i<charctx->nscreens; i++) {
		do_prescan_screen(c, charctx, ectx, i);
	}

	switch(charctx->outfmt) {
	case 1:
		de_char_output_to_image_files(c, charctx, ectx);
		break;
	default:
		de_char_output_to_html_file(c, charctx, ectx);
	}

	if(ectx) {
		de_free(c, ectx->scrstats);
	}
	de_free(c, ectx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl $0x50, %esi
callq 0x15b780
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x16d9a0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0x16da88
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x67771(%rip), %rsi     # 0x1d5204
callq 0x15cb30
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x16dacf
movq -0x20(%rbp), %rdi
callq 0x15cca0
movl %eax, -0x24(%rbp)
cmpl $0x9, -0x24(%rbp)
jl 0x16dabe
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x16dacd
cmpl $0x1, -0x24(%rbp)
jl 0x16dacb
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
jmp 0x16dacd
jmp 0x16dacf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x88, %edx
callq 0x15c450
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x16db29
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x16db90
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x16daf8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
jne 0x16db4a
jmp 0x16db37
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x16de40
jmp 0x16db5b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x16df80
cmpq $0x0, -0x30(%rbp)
je 0x16db73
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: de_char_output_to_image_files
static void de_char_output_to_image_files(deark *c, struct de_char_context *charctx,
	struct charextractx *ectx)
{
	i64 i;

	if(ectx->used_blink) {
		de_warn(c, "This file uses blinking characters, which are not supported with "
			"image output.");
	}

	if(charctx->font) {
		ectx->uses_custom_font = 1;
		ectx->font_to_use = charctx->font;
	}
	else {
		ectx->uses_custom_font = 0;
		do_create_standard_font(c, ectx);
		ectx->font_to_use = ectx->standard_font;
	}

	if(ectx->vga_9col_mode)
		ectx->char_width_in_pixels = 9;
	else
		ectx->char_width_in_pixels = ectx->font_to_use->nominal_width;

	ectx->char_height_in_pixels = ectx->font_to_use->nominal_height;

	for(i=0; i<charctx->nscreens; i++) {
		de_char_output_screen_to_image_file(c, charctx, ectx, charctx->screens[i]);
	}

	if(ectx->standard_font) {
		de_free(c, ectx->standard_font->char_array);
		de_destroy_bitmap_font(c, ectx->standard_font);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x4(%rax)
je 0x16de70
movq -0x8(%rbp), %rdi
leaq 0x673aa(%rip), %rsi     # 0x1d5213
movb $0x0, %al
callq 0x15bc10
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x16de95
movq -0x18(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x16deba
movq -0x18(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x16e080
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16ded1
movq -0x18(%rbp), %rax
movq $0x9, 0x38(%rax)
jmp 0x16dee4
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movslq 0x4(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x16df3d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
callq 0x16e270
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16df00
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x16df6e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x16f730
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: de_char_output_to_html_file
static void de_char_output_to_html_file(deark *c, struct de_char_context *charctx,
	struct charextractx *ectx)
{
	i64 i;
	dbuf *ofile = NULL;

	if(charctx->font && !charctx->suppress_custom_font_warning) {
		de_warn(c, "This file uses a custom font, which is not supported with "
			"HTML output.");
	}

	if(ectx->used_24bitcolor) {
		de_info(c, "Note: This file uses 24-bit colors, which are supported but "
			"not optimized. The HTML file may be very large.");
	}

	ofile = dbuf_create_output_file(c, "html", NULL, 0);
	dbuf_enable_wbuffer(ofile);

	do_output_html_header(c, charctx, ectx, ofile);
	for(i=0; i<charctx->nscreens; i++) {
		do_output_html_screen(c, charctx, ectx, i, ofile);
	}
	do_output_html_footer(c, charctx, ectx, ofile);

	dbuf_close(ofile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x16dfc3
movq -0x10(%rbp), %rax
cmpb $0x0, 0x4(%rax)
jne 0x16dfc3
movq -0x8(%rbp), %rdi
leaq 0x672a6(%rip), %rsi     # 0x1d5262
movb $0x0, %al
callq 0x15bc10
movq -0x18(%rbp), %rax
cmpb $0x0, 0x5(%rax)
je 0x16dfdf
movq -0x8(%rbp), %rdi
leaq 0x672d1(%rip), %rsi     # 0x1d52a9
movb $0x0, %al
callq 0x15c0c0
movq -0x8(%rbp), %rdi
leaq 0x5e11b(%rip), %rsi     # 0x1cc105
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x167b90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x16e780
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x16e054
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x16eb20
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16e01f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x16ef30
movq -0x28(%rbp), %rdi
callq 0x1676a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: set_density
static void set_density(deark *c, struct de_char_context *charctx,
	struct charextractx *ectx, de_finfo *fi)
{
	// FIXME: This is quick and dirty. Need to put more thought into how to
	// figure out the pixel density.

	if(charctx->no_density) return;

	// TODO: Maybe behave more intelligently if charctx->screen_image_flag is
	// set, depending on the screen size.
	// (And maybe use an 8x8 font sometimes, but that will take some work.)

	if(ectx->char_height_in_pixels==16 && ectx->char_width_in_pixels==8) {
		// Assume the intended display is 640x400.
		fi->density.code = DE_DENSITY_UNK_UNITS;
		fi->density.xdens = 480.0;
		fi->density.ydens = 400.0;
	}
	else if(ectx->char_height_in_pixels==16 && ectx->char_width_in_pixels==9) {
		// Assume the intended display is 720x400.
		fi->density.code = DE_DENSITY_UNK_UNITS;
		fi->density.xdens = 540.0;
		fi->density.ydens = 400.0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x3(%rax)
je 0x16e5c3
jmp 0x16e659
movq -0x18(%rbp), %rax
cmpq $0x10, 0x40(%rax)
jne 0x16e60e
movq -0x18(%rbp), %rax
cmpq $0x8, 0x38(%rax)
jne 0x16e60e
movq -0x20(%rbp), %rax
movl $0x1, 0x78(%rax)
movq -0x20(%rbp), %rax
movsd 0x37ce8(%rip), %xmm0    # 0x1a62d8
movsd %xmm0, 0x80(%rax)
movq -0x20(%rbp), %rax
movsd 0x52ec4(%rip), %xmm0    # 0x1c14c8
movsd %xmm0, 0x88(%rax)
jmp 0x16e659
movq -0x18(%rbp), %rax
cmpq $0x10, 0x40(%rax)
jne 0x16e657
movq -0x18(%rbp), %rax
cmpq $0x9, 0x38(%rax)
jne 0x16e657
movq -0x20(%rbp), %rax
movl $0x1, 0x78(%rax)
movq -0x20(%rbp), %rax
movsd 0x66bad(%rip), %xmm0    # 0x1d51e8
movsd %xmm0, 0x80(%rax)
movq -0x20(%rbp), %rax
movsd 0x52e79(%rip), %xmm0    # 0x1c14c8
movsd %xmm0, 0x88(%rax)
jmp 0x16e659
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: do_render_character
static void do_render_character(deark *c, struct de_char_context *charctx,
	struct charextractx *ectx, de_bitmap *img,
	i64 xpos, i64 ypos,
	i32 codepoint, int codepoint_is_unicode,
	u32 fgcol, u32 bgcol,
	unsigned int extra_flags)
{
	i64 xpos_in_pix, ypos_in_pix;
	u32 fgcol_rgb, bgcol_rgb;
	unsigned int flags;

	xpos_in_pix = xpos * ectx->char_width_in_pixels;
	ypos_in_pix = ypos * ectx->char_height_in_pixels;

	if(DE_IS_PAL_COLOR(fgcol))
		fgcol_rgb = charctx->pal[fgcol];
	else
		fgcol_rgb = fgcol;
	if(DE_IS_PAL_COLOR(bgcol))
		bgcol_rgb = charctx->pal[bgcol];
	else
		bgcol_rgb = bgcol;

	flags = extra_flags;
	if(ectx->vga_9col_mode) flags |= DE_PAINTFLAG_VGA9COL;

	if(codepoint_is_unicode) {
		de_font_paint_character_cp(c, img, ectx->font_to_use, codepoint,
			xpos_in_pix, ypos_in_pix, fgcol_rgb, bgcol_rgb, flags);
	}
	else {
		de_font_paint_character_idx(c, img, ectx->font_to_use, (i64)codepoint,
			xpos_in_pix, ypos_in_pix, fgcol_rgb, bgcol_rgb, flags);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq 0x38(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq 0x40(%rcx), %rax
movq %rax, -0x40(%rbp)
cmpl $0xf, 0x20(%rbp)
ja 0x16e6c7
movq -0x10(%rbp), %rax
movl 0x20(%rbp), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
jmp 0x16e6cd
movl 0x20(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0xf, 0x28(%rbp)
ja 0x16e6e3
movq -0x10(%rbp), %rax
movl 0x28(%rbp), %ecx
movl 0x20(%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
jmp 0x16e6e9
movl 0x28(%rbp), %eax
movl %eax, -0x48(%rbp)
movl 0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16e701
movl -0x4c(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, 0x18(%rbp)
je 0x16e741
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
movl 0x10(%rbp), %ecx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movl -0x44(%rbp), %r11d
movl -0x48(%rbp), %r10d
movl -0x4c(%rbp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x16fd10
jmp 0x16e77a
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdx
movslq 0x10(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movl -0x44(%rbp), %r11d
movl -0x48(%rbp), %r10d
movl -0x4c(%rbp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x16f760
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: write_ucstring_to_html
static void write_ucstring_to_html(deark *c, const de_ucstring *s, dbuf *f)
{
	i64 i;
	i64 f_len;
	i64 len_at_last_linebreak;
	int prev_space = 0;
	i32 ch;

	if(!s) return;

	f_len = dbuf_get_length(f);
	len_at_last_linebreak = f_len;

	for(i=0; i<s->len; i++) {
		ch = s->str[i];

		// Don't let HTML collapse consecutive spaces
		// (this is not ideal, but it's better than nothing).
		if(ch==0x20) {
			if(prev_space) {
				ch = 0xa0; // nbsp
			}
			prev_space = 1;
		}
		else {
			prev_space = 0;
		}

		if(ch==0x0a) {
			dbuf_puts(f, "<br>\n");
			f_len = dbuf_get_length(f);
			len_at_last_linebreak = f_len;
		}
		else if(ch==0x20 && (f_len - len_at_last_linebreak > 70)) { // zzz
			// Low-quality attempt at word wrapping
			dbuf_puts(f, "\n");
			f_len = dbuf_get_length(f);
			len_at_last_linebreak = f_len;
		}
		else {
			de_write_codepoint_to_html(c, f, ch);
			f_len = dbuf_get_length(f);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x16ef87
jmp 0x16f085
movq -0x18(%rbp), %rdi
callq 0x169790
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x16f085
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
cmpl $0x20, -0x38(%rbp)
jne 0x16efe4
cmpl $0x0, -0x34(%rbp)
je 0x16efdb
movl $0xa0, -0x38(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x16efeb
movl $0x0, -0x34(%rbp)
cmpl $0xa, -0x38(%rbp)
jne 0x16f018
movq -0x18(%rbp), %rdi
leaq 0x5e7d1(%rip), %rsi     # 0x1cd7cd
callq 0x168da0
movq -0x18(%rbp), %rdi
callq 0x169790
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x16f072
cmpl $0x20, -0x38(%rbp)
jne 0x16f053
movq -0x28(%rbp), %rax
subq -0x30(%rbp), %rax
cmpq $0x46, %rax
jle 0x16f053
movq -0x18(%rbp), %rdi
leaq 0x2d14c(%rip), %rsi     # 0x19c183
callq 0x168da0
movq -0x18(%rbp), %rdi
callq 0x169790
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x16f070
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x161d10
movq -0x18(%rbp), %rdi
callq 0x169790
movq %rax, -0x28(%rbp)
jmp 0x16f072
jmp 0x16f074
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x16efa4
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: output_css_color_block
static void output_css_color_block(deark *c, dbuf *ofile, u32 *pal,
	const char *selectorprefix, const char *prop, const u8 *used_flags)
{
	char tmpbuf[16];
	int i;

	for(i=0; i<16; i++) {
		if(!used_flags[i]) continue;
		de_color_to_css(pal[i], tmpbuf, sizeof(tmpbuf));
		dbuf_printf(ofile, " %s%c { %s: %s }\n", selectorprefix, de_get_hexchar(i),
			prop, tmpbuf);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
cmpl $0x10, -0x44(%rbp)
jge 0x16f12a
movq -0x30(%rbp), %rax
movslq -0x44(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x16f0cd
jmp 0x16f11f
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %edi
leaq -0x40(%rbp), %rsi
movl $0x10, %edx
callq 0x161470
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x44(%rbp), %edi
callq 0x160080
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movsbl %al, %ecx
movq -0x28(%rbp), %r8
leaq -0x40(%rbp), %r9
leaq 0x665d8(%rip), %rsi     # 0x1d56f0
movb $0x0, %al
callq 0x167f00
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x16f0b7
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: print_header_item
static void print_header_item(deark *c, dbuf *ofile, const char *name_rawhtml, const de_ucstring *value)
{
	int k;

	dbuf_puts(ofile, "<td class=htc>");
	if(ucstring_isnonempty(value)) {
		dbuf_printf(ofile, "<span class=hn>%s:&nbsp; </span><span class=hv>", name_rawhtml);
		write_ucstring_to_html(c, value, ofile);
		dbuf_puts(ofile, "</span>");
	}
	else {
		// Placeholder
		for(k=0; k<20; k++) {
			de_write_codepoint_to_html(c, ofile, 0x00a0); // nbsp
		}
	}
	dbuf_puts(ofile, "</td>\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x665af(%rip), %rsi     # 0x1d5702
callq 0x168da0
movq -0x20(%rbp), %rdi
callq 0x1717f0
cmpl $0x0, %eax
je 0x16f19f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x6659c(%rip), %rsi     # 0x1d5711
movb $0x0, %al
callq 0x167f00
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x16ef60
movq -0x10(%rbp), %rdi
leaq 0x665d8(%rip), %rsi     # 0x1d5770
callq 0x168da0
jmp 0x16f1cb
movl $0x0, -0x24(%rbp)
cmpl $0x14, -0x24(%rbp)
jge 0x16f1c9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0xa0, %edx
callq 0x161d10
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x16f1a6
jmp 0x16f1cb
movq -0x10(%rbp), %rdi
leaq 0x6656b(%rip), %rsi     # 0x1d5741
callq 0x168da0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-char.c
// Function: print_comments
static void print_comments(deark *c, struct de_char_context *charctx, dbuf *ofile)
{
	if(ucstring_isempty(charctx->comment)) return;
	dbuf_puts(ofile, "<table class=htt><tr>\n");
	dbuf_puts(ofile, "<td class=hcth>");
	dbuf_printf(ofile, "<span class=hn>Comments:</span>");
	dbuf_puts(ofile, "</td>\n");

	dbuf_puts(ofile, "<td class=hctc>");

	dbuf_puts(ofile, "<span class=hv>");
	// TODO: Some line breaks would be good.
	write_ucstring_to_html(c, charctx->comment, ofile);
	dbuf_puts(ofile, "</span>");

	dbuf_puts(ofile, "</td>\n");

	dbuf_puts(ofile, "</tr></table>\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x1717b0
cmpl $0x0, %eax
je 0x16f25e
jmp 0x16f308
movq -0x18(%rbp), %rdi
leaq 0x66463(%rip), %rsi     # 0x1d56cc
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x664cf(%rip), %rsi     # 0x1d5748
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x664cf(%rip), %rsi     # 0x1d5758
movb $0x0, %al
callq 0x167f00
movq -0x18(%rbp), %rdi
leaq 0x664a6(%rip), %rsi     # 0x1d5741
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x664cd(%rip), %rsi     # 0x1d5778
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x66476(%rip), %rsi     # 0x1d5731
callq 0x168da0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x16ef60
movq -0x18(%rbp), %rdi
leaq 0x6648d(%rip), %rsi     # 0x1d5770
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x6644e(%rip), %rsi     # 0x1d5741
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x664b2(%rip), %rsi     # 0x1d57b5
callq 0x168da0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: is_valid_char
static int is_valid_char(struct de_bitmap_font_char *ch)
{
	if(!ch) return 0;
	if(!ch->bitmap) return 0;
	if(ch->width<0 || ch->height<0) return 0;
	if(ch->extraspace_l<0 || ch->extraspace_r<0) return 0;
	if(ch->width==0 && (ch->extraspace_l>0 || ch->extraspace_r>0)) {
		// Allow 0-width character if extraspace makes that sensible.
		;
	}
	else if(ch->width<1 || ch->height<1) {
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x16fa0b
movl $0x0, -0x4(%rbp)
jmp 0x16faae
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x16fa22
movl $0x0, -0x4(%rbp)
jmp 0x16faae
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x16fa36
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x16fa3f
movl $0x0, -0x4(%rbp)
jmp 0x16faae
movq -0x10(%rbp), %rax
movswl 0x14(%rax), %eax
cmpl $0x0, %eax
jl 0x16fa59
movq -0x10(%rbp), %rax
movswl 0x16(%rax), %eax
cmpl $0x0, %eax
jge 0x16fa62
movl $0x0, -0x4(%rbp)
jmp 0x16faae
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x16fa88
movq -0x10(%rbp), %rax
movswl 0x14(%rax), %eax
cmpl $0x0, %eax
jg 0x16fa86
movq -0x10(%rbp), %rax
movswl 0x16(%rax), %eax
cmpl $0x0, %eax
jle 0x16fa88
jmp 0x16faa7
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jl 0x16fa9c
movq -0x10(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jge 0x16faa5
movl $0x0, -0x4(%rbp)
jmp 0x16faae
jmp 0x16faa7
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-font.c
// Function: de_font_paint_character_cp
void de_font_paint_character_cp(deark *c, de_bitmap *img,
	struct de_bitmap_font *font, i32 codepoint,
	i64 xpos, i64 ypos, de_color fgcol, de_color bgcol, unsigned int flags)
{
	i64 char_idx;

	char_idx = get_char_idx_by_cp(c, font, codepoint);
	if(char_idx<0) {
		if(font->index_of_replacement_char>=0) {
			char_idx = font->index_of_replacement_char;
		}
	}
	if(char_idx<0) {
		char_idx = get_char_idx_by_cp(c, font, '?');
	}
	if(char_idx<0 || char_idx>=font->num_chars) {
		return;
	}
	de_font_paint_character_idx(c, img, font, char_idx, xpos, ypos, fgcol, bgcol, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x16fde0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0x16fd6c
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jl 0x16fd6a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x16fd6c
cmpq $0x0, -0x38(%rbp)
jge 0x16fd89
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x3f, %edx
callq 0x16fde0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jl 0x16fd9e
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jl 0x16fda0
jmp 0x16fdd5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x16f760
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: get_char_idx_by_cp
static i64 get_char_idx_by_cp(deark *c, struct de_bitmap_font *font, i32 codepoint)
{
	i64 i;

	// TODO: Sometimes, a font has multiple characters that map to the same
	// codepoint. We should have a way to find the *best* such character,
	// which might not be the first one.

	for(i=0; i<font->num_chars; i++) {
		if(font->has_unicode_codepoints) {
			if(font->char_array[i].codepoint_unicode == codepoint)
				return i;
		}
		else {
			if(font->char_array[i].codepoint_nonunicode == codepoint)
				return i;
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x16fe66
movq -0x18(%rbp), %rax
cmpb $0x0, 0x11(%rax)
je 0x16fe33
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x16fe31
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16fe6e
jmp 0x16fe56
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x28(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x16fe54
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16fe6e
jmp 0x16fe56
jmp 0x16fe58
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x16fdf7
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: make_digit_font
static struct de_bitmap_font *make_digit_font(deark *c)
{
	struct de_bitmap_font *dfont = NULL;
	i64 i;

	dfont = de_create_bitmap_font(c);
	dfont->num_chars = 16;
	dfont->nominal_width = 6;
	dfont->nominal_height = 7;
	dfont->has_unicode_codepoints = 1;
	dfont->char_array = de_mallocarray(c, dfont->num_chars, sizeof(struct de_bitmap_font_char));

	for(i=0; i<dfont->num_chars; i++) {
		dfont->char_array[i].codepoint_unicode = dfont_data[i].codepoint_unicode;
		dfont->char_array[i].width = dfont->nominal_width;
		dfont->char_array[i].height = dfont->nominal_height;
		dfont->char_array[i].rowspan = 1;
		dfont->char_array[i].bitmap = (u8*)dfont_data[i].bitmap;
	}

	return dfont;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x16f6f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x10, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x6, (%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x4(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x11(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl $0x28, %edx
callq 0x15c450
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jge 0x170b8c
leaq 0x64ec4(%rip), %rax     # 0x1d59b0
imulq $0xc, -0x18(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x18(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x18(%rbp), %rcx
addq %rcx, %rax
movq $0x1, 0x18(%rax)
leaq 0x64e55(%rip), %rcx     # 0x1d59b0
imulq $0xc, -0x18(%rbp), %rax
addq %rax, %rcx
addq $0x4, %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x28, -0x18(%rbp), %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x170ad3
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: get_min_max_codepoint
static void get_min_max_codepoint(struct font_render_ctx *fctx)
{
	i64 i;

	fctx->min_codepoint = 0x10ffff;
	fctx->max_codepoint = 0;
	fctx->num_valid_chars = 0;

	for(i=0; i<fctx->font->num_chars; i++) {
		if(!is_valid_char(&fctx->font->char_array[i])) continue;
		if(fctx->codepoint_tmp[i] == DE_CODEPOINT_INVALID) continue;
		fctx->num_valid_chars++;
		if(fctx->codepoint_tmp[i] < fctx->min_codepoint)
			fctx->min_codepoint = fctx->codepoint_tmp[i];
		if(fctx->codepoint_tmp[i] > fctx->max_codepoint)
			fctx->max_codepoint = fctx->codepoint_tmp[i];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x10ffff, 0x8(%rax)    # imm = 0x10FFFF
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x18(%rcx), %rax
jge 0x170ec3
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rdi
imulq $0x28, -0x10(%rbp), %rax
addq %rax, %rdi
callq 0x16f9f0
cmpl $0x0, %eax
jne 0x170e2d
jmp 0x170eb2
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
cmpl $0xfffffff, (%rax,%rcx,4) # imm = 0xFFFFFFF
jne 0x170e44
jmp 0x170eb2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x170e82
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x170eb0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x170eb2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x170df6
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: checkerboard_bkgd
static void checkerboard_bkgd(de_bitmap *img, i64 xpos, i64 ypos, i64 w, i64 h)
{
	i64 ii, jj;

	for(jj=0; jj<h; jj++) {
		for(ii=0; ii<w; ii++) {
			de_bitmap_setpixel_gray(img, xpos+ii, ypos+jj, (ii/2+jj/2)%2 ? 176 : 192);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x171164
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x171151
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rdx, %r8
movq -0x40(%rbp), %rdx
movl $0xc0, %eax
movl $0xb0, %ecx
cmpq $0x0, %r8
cmovnel %ecx, %eax
movzbl %al, %ecx
callq 0x16b1c0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1710ca
jmp 0x171153
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1710b4
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-font.c
// Function: de_font_is_standard_vga_font
int de_font_is_standard_vga_font(deark *c, u32 crc)
{
	switch(crc) {
	case 0x2c3cf7d2U: // e.g.: ndh - Ada.xb
	case 0x3c0aa3eeU: // https://commons.wikimedia.org/w/index.php?title=File:Codepage-437.png&oldid=153353189
	case 0x71e15998U: // Used in many XBIN files.
	case 0xb6133c6eU: // blocktronics_baud_dudes/k1-strax.xb (8x14)
	case 0xb7cb6e5cU: // e.g.: T1-XBIN.XB
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0xb6133c6e, %eax       # imm = 0xB6133C6E
je 0x1711ba
jmp 0x17118a
movl -0x18(%rbp), %eax
subl $0xb7cb6e5c, %eax       # imm = 0xB7CB6E5C
je 0x1711ba
jmp 0x171196
movl -0x18(%rbp), %eax
subl $0x2c3cf7d2, %eax       # imm = 0x2C3CF7D2
je 0x1711ba
jmp 0x1711a2
movl -0x18(%rbp), %eax
subl $0x3c0aa3ee, %eax       # imm = 0x3C0AA3EE
je 0x1711ba
jmp 0x1711ae
movl -0x18(%rbp), %eax
subl $0x71e15998, %eax       # imm = 0x71E15998
jne 0x1711c3
jmp 0x1711ba
movl $0x1, -0x4(%rbp)
jmp 0x1711ca
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_truncate
void ucstring_truncate(de_ucstring *s, i64 newlen)
{
	if(!s) return;
	if(newlen<0) newlen=0;
	if(newlen<s->len) s->len = newlen;

	if(s->tmp_string) {
		// There's no requirement to free tmp_string here, but it's no
		// longer needed, and maybe it's nice to have a way to do it.
		de_free(s->c, s->tmp_string);
		s->tmp_string = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x171249
jmp 0x17129d
cmpq $0x0, -0x10(%rbp)
jge 0x171258
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x171272
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x17129d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_truncate_at_NUL
void ucstring_truncate_at_NUL(de_ucstring *s)
{
	i64 i;

	for(i=0; i<s->len; i++) {
		if(s->str[i]==0x0000) {
			ucstring_truncate(s, i);
			return;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x171303
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x1712f3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x171230
jmp 0x171303
jmp 0x1712f5
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1712c4
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_delete_prefix
void ucstring_delete_prefix(de_ucstring *s, i64 nchars)
{
	i64 i;
	i64 new_len;

	if(nchars<1) return;
	if(nchars >= s->len) {
		ucstring_empty(s);
		return;
	}

	new_len = s->len - nchars;
	for(i=0; i<new_len; i++) {
		s->str[i] = s->str[nchars+i];
	}
	ucstring_truncate(s, new_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x1, -0x10(%rbp)
jge 0x1713d9
jmp 0x171451
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jl 0x1713f2
movq -0x8(%rbp), %rdi
callq 0x171210
jmp 0x171451
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x171444
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x17140a
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x171230
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_ucstring
void ucstring_append_ucstring(de_ucstring *s1, const de_ucstring *s2)
{
	i64 i;

	if(!s2) return;
	// TODO: This could be done more efficiently.
	for(i=0; i<s2->len; i++) {
		ucstring_append_char(s1, s2->str[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x171479
jmp 0x1714b5
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x1714b5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x1714c0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x171481
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_char
void ucstring_append_char(de_ucstring *s, de_rune ch)
{
	i64 new_len;
	i64 new_alloc;

	if(s->len >= 100000000) {
		return;
	}
	new_len = s->len + 1;
	if(new_len > s->alloc) {
		new_alloc = s->alloc * 2;
		if(new_alloc<32) new_alloc=32;
		s->str = de_reallocarray(s->c, s->str, s->alloc, sizeof(i32), new_alloc);
		s->alloc = new_alloc;
	}

	s->str[s->len] = ch;
	s->len++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x5f5e100, 0x10(%rax)  # imm = 0x5F5E100
jl 0x1714e2
jmp 0x171580
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jle 0x17155a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
shlq %rax
movq %rax, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jge 0x17151e
movq $0x20, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x20(%rbp), %r8
movl $0x4, %ecx
callq 0x15c4d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_sz
void ucstring_append_sz(de_ucstring *s, const char *sz, de_ext_encoding ee)
{
	i64 len;

	if(ee==DE_ENCODING_LATIN1) { // Fast path for this common case
		const u8 *sz_u8 = (const u8*)sz;

		while(*sz_u8) {
			ucstring_append_char(s, (de_rune)(*sz_u8));
			sz_u8++;
		}
		return;
	}

	len = (i64)de_strlen(sz);
	ucstring_append_bytes(s, (const u8*)sz, len, 0, ee);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x5, -0x14(%rbp)
jne 0x17162a
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x171628
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movzbl (%rax), %esi
callq 0x1714c0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x171601
jmp 0x17164e
movq -0x10(%rbp), %rdi
callq 0x190e0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %r8d
xorl %ecx, %ecx
callq 0x171fa0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_clone
de_ucstring *ucstring_clone(const de_ucstring *src)
{
	de_ucstring *dst;

	if(!src) return NULL;
	dst = ucstring_create(src->c);
	ucstring_append_ucstring(dst, src);
	return dst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x17171d
movq $0x0, -0x8(%rbp)
jmp 0x171742
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1711d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x171460
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_destroy
void ucstring_destroy(de_ucstring *s)
{
	deark *c;
	if(s) {
		c = s->c;
		de_free(c, s->str);
		de_free(c, s->tmp_string);
		de_free(c, s);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x17179d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x15b820
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x15b820
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x15b820
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_append_bytes_ex
void ucstring_append_bytes_ex(de_ucstring *s, const u8 *buf, i64 buflen,
	unsigned int conv_flags, struct de_encconv_state *es)
{
	de_encoding encoding = es->enc;

	// Adjust buflen if necessary.
	if(conv_flags & DE_CONVFLAG_STOP_AT_NUL) {
		char *tmpp;
		tmpp = de_memchr(buf, 0, (size_t)buflen);
		if(tmpp) {
			buflen = (const u8*)tmpp - buf;
		}
	}

	if(encoding==DE_ENCODING_UTF8) {
		append_bytes_utf8(s, buf, buflen, conv_flags, es);
	}
	else if(encoding==DE_ENCODING_UTF16LE || encoding==DE_ENCODING_UTF16BE) {
		append_bytes_utf16(s, buf, buflen, conv_flags, es, (encoding==DE_ENCODING_UTF16LE));
	}
	else if(encoding==DE_ENCODING_CP932) {
		append_bytes_cp932(s->c, s, buf, buflen, conv_flags, es);
	}
	else {
		i64 pos;

		for(pos=0; pos<buflen; pos++) {
			i32 ch;

			ch = de_char_to_unicode_ex(buf[pos], es);
			if(ch==DE_CODEPOINT_INVALID) {
				handle_invalid_byte(s, buf[pos]);
			}
			else {
				ucstring_append_char(s, ch);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x17187a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x19150
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x171878
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x17187a
cmpl $0x2, -0x2c(%rbp)
jne 0x17189d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
callq 0x171970
jmp 0x171967
cmpl $0x3, -0x2c(%rbp)
je 0x1718a9
cmpl $0x4, -0x2c(%rbp)
jne 0x1718d3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %r8
cmpl $0x3, -0x2c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x171b90
jmp 0x171965
cmpl $0x10, -0x2c(%rbp)
jne 0x1718fb
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movq -0x28(%rbp), %r9
callq 0x171db0
jmp 0x171963
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x171961
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %edi
movq -0x28(%rbp), %rsi
callq 0x160a30
movl %eax, -0x44(%rbp)
cmpl $0xfffffff, -0x44(%rbp) # imm = 0xFFFFFFF
jne 0x171945
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x171f70
jmp 0x171951
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x1714c0
jmp 0x171953
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x171903
jmp 0x171963
jmp 0x171965
jmp 0x171967
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_is_ascii
int ucstring_is_ascii(const de_ucstring *s)
{
	i64 i;
	for(i=0; i<s->len; i++) {
		if(s->str[i]<0 || s->str[i]>=0x80)
			return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x17204e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x172035
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x80, (%rax,%rcx,4)
jl 0x17203e
movl $0x0, -0x4(%rbp)
jmp 0x172055
jmp 0x172040
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x172000
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_count_utf8_bytes
i64 ucstring_count_utf8_bytes(de_ucstring *s)
{
	i64 i;
	i64 n = 0;
	if(!s) return n;
	for(i=0; i<s->len; i++) {
		if(s->str[i]<0 || s->str[i]>0xffff) n+=4;
		else if(s->str[i]<=0x7f) n+=1;
		else if(s->str[i]<=0x7ff) n+=2;
		else n+=3;
	}
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x172084
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x172141
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x172139
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x1720c5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0xffff, (%rax,%rcx,4)  # imm = 0xFFFF
jle 0x1720d3
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0x172126
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x7f, (%rax,%rcx,4)
jg 0x1720f3
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x172124
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpl $0x7ff, (%rax,%rcx,4)   # imm = 0x7FF
jg 0x172116
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x172122
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
jmp 0x172124
jmp 0x172126
jmp 0x172128
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x17208c
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: ucstring_write_as_utf8
void ucstring_write_as_utf8(deark *c, de_ucstring *s, dbuf *outf, int add_bom_if_needed)
{
	i64 i;

	if(add_bom_if_needed &&
		c->write_bom &&
		(s->len>0 && s->str[0]!=0xfeff) &&
		!ucstring_is_ascii(s))
	{
		// Write a BOM
		dbuf_write_uchar_as_utf8(outf, 0xfeff);
	}

	for(i=0; i<s->len; i++) {
		dbuf_write_uchar_as_utf8(outf, s->str[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1721b4
movq -0x8(%rbp), %rax
movzbl 0xcc(%rax), %eax
cmpl $0x0, %eax
je 0x1721b4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jle 0x1721b4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0xfeff, (%rax)         # imm = 0xFEFF
je 0x1721b4
movq -0x10(%rbp), %rdi
callq 0x171ff0
cmpl $0x0, %eax
jne 0x1721b4
movq -0x18(%rbp), %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0x160cc0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x1721f0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x160cc0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1721bc
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-ucstring.c
// Function: de_is_printable_uchar
int de_is_printable_uchar(de_rune ch)
{
	struct pr_range { i32 n1, n2; };
	static const struct pr_range ranges[] = {
		{ 0x0020, 0x007e },
		{ 0x00a0, 0x200d },
		{ 0x2010, 0x2027 },
		{ 0x202f, 0x2065 },
		{ 0x2070, 0xd7ff },
		{ 0xf900, 0xfdcf },
		{ 0xfdf0, 0xfdff },
		{ 0xfe10, 0xfefe },
		{ 0xff00, 0xffef },
		{ 0xfffd, 0xfffd },
		{ 0x10000, 0x101ff },
		{ 0x1f000, 0x1fbff }
		// TODO: Whitelist more codepoints
	};
	size_t i;
	const size_t num_ranges = DE_ARRAYCOUNT(ranges);

	for(i=0; i<num_ranges; i++) {
		if(ch>=ranges[i].n1 && ch<=ranges[i].n2) return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq $0xc, -0x18(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0xc, -0x10(%rbp)
jae 0x1724ee
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rdx
leaq 0x63604(%rip), %rcx     # 0x1d5ac0
cmpl (%rcx,%rdx,8), %eax
jl 0x1724de
movl -0x8(%rbp), %eax
movq -0x10(%rbp), %rdx
leaq 0x635f1(%rip), %rcx     # 0x1d5ac0
cmpl 0x4(%rcx,%rdx,8), %eax
jg 0x1724de
movl $0x1, -0x4(%rbp)
jmp 0x1724f5
jmp 0x1724e0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1724a7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)