// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/bmp.c
// Function: read_infoheader
static int read_infoheader(deark *c, lctx *d, i64 pos)
{
	i64 height_raw;
	i64 clr_used_raw;
	int bitcount_ok = 0;
	int cmpr_ok = 0;
	int retval = 0;
	i64 nplanes;

	de_dbg(c, "info header at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	de_dbg(c, "info header size: %"I64_FMT, d->infohdrsize);

	if(d->version==DE_BMPVER_OS2V1) {
		d->width = de_getu16le(pos+4);
		d->height = de_getu16le(pos+6);
		nplanes = de_getu16le(pos+8);
	}
	else {
		d->width = de_geti32le(pos+4);
		height_raw = de_geti32le(pos+8);
		if(height_raw<0) {
			d->top_down = 1;
			d->height = -height_raw;
		}
		else {
			d->height = height_raw;
		}
		nplanes = de_getu16le(pos+12);
	}
	d->pdwidth = d->width; // Default "padded width"
	de_dbg_dimensions(c, d->width, d->height);
	if(d->top_down) {
		de_dbg(c, "orientation: top-down");
	}
	else {
		d->createflags |= DE_CREATEFLAG_FLIP_IMAGE;
	}

	de_dbg(c, "planes: %d", (int)nplanes);

	// Already read, in detect_bmp_version()
	de_dbg(c, "bits/pixel: %d", (int)d->bitcount);

	// FIXME? The conditional test for 64 may lead to misleading error messages
	// (but I'm afraid something might break without it).
	if(d->bitcount==0 || d->bitcount==1 || d->bitcount==2 || d->bitcount==4 ||
		d->bitcount==8 || d->bitcount==16 || d->bitcount==24 || d->bitcount==32 ||
		(d->bitcount==64 && d->version==DE_BMPVER_64BIT))
	{
		bitcount_ok = 1;
	}

	if(d->version==DE_BMPVER_OS2V1) {
		d->bytes_per_pal_entry = 3;
	}
	else {
		char cmprname[80];
		// d->compression_field was already read, in detect_bmp_version()
		fmtutil_get_bmp_compression_name(d->compression_field, cmprname, sizeof(cmprname),
			(d->version==DE_BMPVER_OS2V2));
		de_dbg(c, "compression (etc.): %u (%s)", (UI)d->compression_field, cmprname);
		d->bytes_per_pal_entry = 4;
	}

	d->compression_type = CMPR_NONE; // Temporary default

	switch(d->compression_field) {
	case 0: // BI_RGB
		if(d->bitcount==16 || d->bitcount==32) {
			d->bitfields_type = BF_DEFAULT;
		}
		d->compression_type = CMPR_NONE;
		cmpr_ok = 1;
		break;
	case 1: // BI_RLE8
		d->compression_type=CMPR_RLE8;
		cmpr_ok = 1;
		break;
	case 2: // BI_RLE4
		d->compression_type=CMPR_RLE4;
		cmpr_ok = 1;
		break;
	case 3: // BI_BITFIELDS or Huffman_1D
		if(d->version==DE_BMPVER_OS2V2) {
			if(d->bitcount==1) {
				d->compression_type=CMPR_HUFFMAN1D;
				cmpr_ok = 1;
			}
		}
		else if(d->bitcount==16 || d->bitcount==32) {
			d->compression_type = CMPR_NONE;
			cmpr_ok = 1;
			if(d->infohdrsize>=52) {
				d->bitfields_type = BF_IN_HEADER;
			}
			else {
				d->bitfields_type = BF_SEGMENT;
				d->bitfields_segment_len = 12;
			}
		}
		break;
	case 4: // BI_JPEG or RLE24
		if(d->version==DE_BMPVER_OS2V2) {
			if(d->bitcount==24) {
				d->compression_type=CMPR_RLE24;
				cmpr_ok = 1;
			}
		}
		else {
			d->compression_type=CMPR_JPEG;
			cmpr_ok = 1;
		}
		break;
	case 5: // BI_PNG
		d->compression_type=CMPR_PNG;
		cmpr_ok = 1;
		break;
	case 6: // BI_ALPHABITFIELDS
		if(d->bitcount==16 || d->bitcount==32) {
			d->compression_type = CMPR_NONE;
			cmpr_ok = 1;
			if(d->infohdrsize>=56) {
				d->bitfields_type = BF_IN_HEADER;
			}
			else {
				d->bitfields_type = BF_SEGMENT;
				d->bitfields_segment_len = 16;
			}
		}
		break;
	}

	if(d->infohdrsize>=24) {
		d->size_image = de_getu32le(pos+20);
		de_dbg(c, "biSizeImage: %"I64_FMT, d->size_image);
	}

	if(d->infohdrsize>=32) {
		d->xpelspermeter = de_geti32le(pos+24);
		d->ypelspermeter = de_geti32le(pos+28);
		de_dbg(c, "density: %d"DE_CHAR_TIMES"%d pixels/meter", (int)d->xpelspermeter, (int)d->ypelspermeter);
		if(d->xpelspermeter>0 && d->ypelspermeter>0) {
			d->fi->density.code = DE_DENSITY_DPI;
			d->fi->density.xdens = (double)d->xpelspermeter * 0.0254;
			d->fi->density.ydens = (double)d->ypelspermeter * 0.0254;
		}
	}

	if(d->infohdrsize>=36)
		clr_used_raw = de_getu32le(pos+32);
	else
		clr_used_raw = 0;

	if(d->bitcount>=1 && d->bitcount<=8 && clr_used_raw==0) {
		d->pal_entries = ((i64)1)<<d->bitcount;
	}
	else {
		d->pal_entries = clr_used_raw;
	}
	de_dbg(c, "number of palette colors: %d", (int)d->pal_entries);

	// Note that after 40 bytes, WINV345 and OS2V2 header fields are different,
	// so we have to pay more attention to the version.

	if(d->bitfields_type==BF_IN_HEADER) {
		do_read_bitfields(c, d, pos+40, d->infohdrsize>=56 ? 16 : 12);
	}

	if(d->bitfields_type==BF_DEFAULT) {
		set_default_bitfields(c, d);
	}

	if(d->version==DE_BMPVER_WINV345 && d->infohdrsize>=108) {
		char cstype_descr_dbgstr[80];
		dbuf_read_fourcc(c->infile, pos+56, &d->cstype4cc, 4, DE_4CCFLAG_REVERSED);
		get_cstype_descr_dbgstr(&d->cstype4cc, cstype_descr_dbgstr, sizeof(cstype_descr_dbgstr));
		de_dbg(c, "CSType: %s", cstype_descr_dbgstr);
	}

	if(d->version==DE_BMPVER_WINV345 && d->infohdrsize>=124) {
		u32 intent;
		intent = (u32)de_getu32le(pos+108);
		de_dbg(c, "intent: %u", (UI)intent);
	}

	if(d->version==DE_BMPVER_WINV345 && d->infohdrsize>=124 &&
		(d->cstype4cc.id==CODE_MBED || d->cstype4cc.id==CODE_LINK))
	{
		d->profile_offset_raw = de_getu32le(pos+112);
		de_dbg(c, "profile offset: %d+%"I64_FMT, (int)FILEHEADER_SIZE,
			d->profile_offset_raw);
		d->profile_size = de_getu32le(pos+116);
		de_dbg(c, "profile size: %"I64_FMT, d->profile_size);
	}

	if(!bitcount_ok) {
		de_err(c, "Bad or unsupported bits/pixel: %d", (int)d->bitcount);
		goto done;
	}
	if(!cmpr_ok) {
		de_err(c, "Unsupported compression type: %u", (UI)d->compression_field);
		goto done;
	}
	if(!de_good_image_dimensions(c, d->width, d->height)) {
		goto done;
	}

	retval = 1;
done:
	de_dbg_indent(c, -1);
	return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x15f616(%rip), %rsi    # 0x1a3801
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdx
leaq 0x15f601(%rip), %rsi    # 0x1a3814
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x44281
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x6, %rsi
callq 0x165280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x165280
movq %rax, -0x40(%rbp)
jmp 0x44303
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x165600
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
callq 0x165600
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x442de
movq -0x10(%rbp), %rax
movl $0x1, 0x68(%rax)
xorl %eax, %eax
movl %eax, %ecx
subq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x442ea
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0xc, %rsi
callq 0x165280
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x15bba0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x4434a
movq -0x8(%rbp), %rdi
leaq 0x15f4e9(%rip), %rsi    # 0x1a382a
movb $0x0, %al
callq 0x15b0d0
jmp 0x44357
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl %eax, %edx
leaq 0x182997(%rip), %rsi    # 0x1c6cff
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %edx
leaq 0x18d870(%rip), %rsi    # 0x1d1bf4
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x1, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x2, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x4, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x8, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x10, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x18, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x20, 0x38(%rax)
je 0x443f7
movq -0x10(%rbp), %rax
cmpq $0x40, 0x38(%rax)
jne 0x443fe
movq -0x10(%rbp), %rax
cmpl $0xa, (%rax)
jne 0x443fe
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x44418
movq -0x10(%rbp), %rax
movq $0x3, 0x80(%rax)
jmp 0x4446e
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
leaq -0x90(%rbp), %rsi
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movl $0x50, %edx
callq 0x172ca0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edx
leaq -0x90(%rbp), %rcx
leaq 0x15f3e8(%rip), %rsi    # 0x1a3840
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
movq $0x4, 0x80(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xa8(%rax)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq %rax, -0xf0(%rbp)
subq $0x6, %rax
ja 0x44674
movq -0xf0(%rbp), %rax
leaq 0x15f096(%rip), %rcx    # 0x1a3538
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
cmpq $0x10, 0x38(%rax)
je 0x444c1
movq -0x10(%rbp), %rax
cmpq $0x20, 0x38(%rax)
jne 0x444cf
movq -0x10(%rbp), %rax
movl $0x1, 0x8c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x44674
movq -0x10(%rbp), %rax
movl $0xc, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x44674
movq -0x10(%rbp), %rax
movl $0xb, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x44674
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x44548
movq -0x10(%rbp), %rax
cmpq $0x1, 0x38(%rax)
jne 0x44546
movq -0x10(%rbp), %rax
movl $0x10, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x445af
movq -0x10(%rbp), %rax
cmpq $0x10, 0x38(%rax)
je 0x4455e
movq -0x10(%rbp), %rax
cmpq $0x20, 0x38(%rax)
jne 0x445ad
movq -0x10(%rbp), %rax
movl $0x0, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x34, 0x30(%rax)
jl 0x4458e
movq -0x10(%rbp), %rax
movl $0x3, 0x8c(%rax)
jmp 0x445ab
movq -0x10(%rbp), %rax
movl $0x2, 0x8c(%rax)
movq -0x10(%rbp), %rax
movq $0xc, 0x90(%rax)
jmp 0x445ad
jmp 0x445af
jmp 0x44674
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x445df
movq -0x10(%rbp), %rax
cmpq $0x18, 0x38(%rax)
jne 0x445dd
movq -0x10(%rbp), %rax
movl $0xd, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x445f4
movq -0x10(%rbp), %rax
movl $0xe, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x44674
movq -0x10(%rbp), %rax
movl $0xf, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
jmp 0x44674
movq -0x10(%rbp), %rax
cmpq $0x10, 0x38(%rax)
je 0x44623
movq -0x10(%rbp), %rax
cmpq $0x20, 0x38(%rax)
jne 0x44672
movq -0x10(%rbp), %rax
movl $0x0, 0xa8(%rax)
movl $0x1, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x38, 0x30(%rax)
jl 0x44653
movq -0x10(%rbp), %rax
movl $0x3, 0x8c(%rax)
jmp 0x44670
movq -0x10(%rbp), %rax
movl $0x2, 0x8c(%rax)
movq -0x10(%rbp), %rax
movq $0x10, 0x90(%rax)
jmp 0x44672
jmp 0x44674
movq -0x10(%rbp), %rax
cmpq $0x18, 0x30(%rax)
jl 0x446b9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x14, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x15f1aa(%rip), %rsi    # 0x1a385c
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpq $0x20, 0x30(%rax)
jl 0x447b9
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
callq 0x165600
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x1c, %rsi
callq 0x165600
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movl %eax, %ecx
leaq 0x15f13a(%rip), %rsi    # 0x1a386d
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jle 0x447b7
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
jle 0x447b7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x2, 0x78(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0x98(%rax), %xmm0
movsd 0x15ca36(%rip), %xmm1   # 0x1a11b0
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsd %xmm0, 0x80(%rax)
movq -0x10(%rbp), %rax
cvtsi2sdq 0xa0(%rax), %xmm0
movsd 0x15ca0d(%rip), %xmm1   # 0x1a11b0
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsd %xmm0, 0x88(%rax)
jmp 0x447b9
movq -0x10(%rbp), %rax
cmpq $0x24, 0x30(%rax)
jl 0x447df
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
callq 0x165540
movq %rax, -0x28(%rbp)
jmp 0x447e7
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x1, 0x38(%rax)
jl 0x44821
movq -0x10(%rbp), %rax
cmpq $0x8, 0x38(%rax)
jg 0x44821
cmpq $0x0, -0x28(%rbp)
jne 0x44821
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
jmp 0x4482d
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl %eax, %edx
leaq 0x158b5a(%rip), %rsi    # 0x19d39c
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x3, 0x8c(%rax)
jne 0x44887
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x28, %rdx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %r8
movl $0xc, %eax
movl $0x10, %ecx
cmpq $0x38, %r8
cmovgel %ecx, %eax
movslq %eax, %rcx
callq 0x44ab0
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8c(%rax)
jne 0x448a1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45110
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x44915
movq -0x10(%rbp), %rax
cmpq $0x6c, 0x30(%rax)
jl 0x44915
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x38, %rsi
movq -0x10(%rbp), %rdx
addq $0xac, %rdx
movl $0x4, %ecx
movl $0x1, %r8d
callq 0x169860
movq -0x10(%rbp), %rdi
addq $0xac, %rdi
leaq -0xe0(%rbp), %rsi
movl $0x50, %edx
callq 0x451b0
movq -0x8(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
leaq 0x15ef7c(%rip), %rsi    # 0x1a388a
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x4495c
movq -0x10(%rbp), %rax
cmpq $0x7c, 0x30(%rax)
jl 0x4495c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x6c, %rsi
callq 0x165540
movl %eax, -0xe4(%rbp)
movq -0x8(%rbp), %rdi
movl -0xe4(%rbp), %edx
leaq 0x15ef40(%rip), %rsi    # 0x1a3895
movb $0x0, %al
callq 0x15b0d0
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x44a21
movq -0x10(%rbp), %rax
cmpq $0x7c, 0x30(%rax)
jl 0x44a21
movq -0x10(%rbp), %rax
cmpl $0x4d424544, 0xb0(%rax) # imm = 0x4D424544
je 0x4499c
movq -0x10(%rbp), %rax
cmpl $0x4c494e4b, 0xb0(%rax) # imm = 0x4C494E4B
jne 0x44a21
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xe0(%rax), %rcx
leaq 0x15eecb(%rip), %rsi    # 0x1a38a0
movl $0xe, %edx
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x74, %rsi
callq 0x165540
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xf0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdx
leaq 0x15ee9d(%rip), %rsi    # 0x1a38b7
movb $0x0, %al
callq 0x15b0d0
cmpl $0x0, -0x2c(%rbp)
jne 0x44a45
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %eax, %edx
leaq 0x15ee8d(%rip), %rsi    # 0x1a38c9
movb $0x0, %al
callq 0x15bfb0
jmp 0x44a8d
cmpl $0x0, -0x30(%rbp)
jne 0x44a66
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edx
leaq 0x15ee8e(%rip), %rsi    # 0x1a38eb
movb $0x0, %al
callq 0x15bfb0
jmp 0x44a8d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdx
callq 0x16a850
cmpl $0x0, %eax
jne 0x44a86
jmp 0x44a8d
movl $0x1, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movl -0x34(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw (%rax,%rax)