// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_geob
static void decode_id3v2_frame_geob(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	u8 id3_encoding;
	i64 pos = pos1;
	de_ucstring *mimetype = NULL;
	de_ucstring *filename = NULL;
	de_ucstring *description = NULL;
	i64 bytes_consumed = 0;
	int ret;
	i64 objlen;

	id3_encoding = dbuf_getbyte(f, pos++);
	de_dbg(c, "text encoding: %d (%s)", (int)id3_encoding,
		get_id3v2_textenc_name(d, id3_encoding));

	mimetype = ucstring_create(c);
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, ID3ENC_ISO_8859_1,
		mimetype, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "mime type: \"%s\"", ucstring_getpsz(mimetype));
	pos += bytes_consumed;

	filename = ucstring_create(c);
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, id3_encoding,
		filename, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "filename: \"%s\"", ucstring_getpsz(filename));
	pos += bytes_consumed;

	description = ucstring_create(c);
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, id3_encoding,
		description, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "description: \"%s\"", ucstring_getpsz(description));
	pos += bytes_consumed;

	objlen = pos1+len-pos;
	if(objlen<1) goto done;

	de_dbg(c, "[%d bytes of encapsulated object data]", (int)objlen);

	if(c->extract_level>=2) {
		dbuf_create_file_from_slice(f, pos, objlen, "encobj.bin",
			NULL, DE_CREATEFLAG_IS_AUX);
	}
	else if(c->debug_level>=2) {
		de_dbg_indent(c, 1);
		de_dbg_hexdump(c, f, pos, objlen, 256, NULL, 0x1);
		de_dbg_indent(c, -1);
	}

done:
	ucstring_destroy(mimetype);
	ucstring_destroy(filename);
	ucstring_destroy(description);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
callq 0x165060
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x29(%rbp), %esi
callq 0xab3f0
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %edx
movq %rax, %rcx
leaq 0x108b62(%rip), %rsi    # 0x1b36b1
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
addq -0x28(%rbp), %r8
subq -0x38(%rbp), %r8
movq -0x40(%rbp), %r10
movl $0x100, %r9d            # imm = 0x100
xorl %eax, %eax
leaq -0x58(%rbp), %rax
movl $0x0, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xab4a0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xaabb3
jmp 0xaadcb
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172500
movq -0x80(%rbp), %rdi
movq %rax, %rdx
leaq 0x108b5c(%rip), %rsi    # 0x1b372e
movb $0x0, %al
callq 0x15b0d0
movq -0x58(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
addq -0x28(%rbp), %r8
subq -0x38(%rbp), %r8
movb -0x29(%rbp), %r11b
movq -0x48(%rbp), %r10
movl $0x100, %r9d            # imm = 0x100
leaq -0x58(%rbp), %rax
movzbl %r11b, %r11d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xab4a0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xaac45
jmp 0xaadcb
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
callq 0x172500
movq -0x88(%rbp), %rdi
movq %rax, %rdx
leaq 0x11c919(%rip), %rsi    # 0x1c7583
movb $0x0, %al
callq 0x15b0d0
movq -0x58(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
addq -0x28(%rbp), %r8
subq -0x38(%rbp), %r8
movb -0x29(%rbp), %r11b
movq -0x50(%rbp), %r10
movl $0x100, %r9d            # imm = 0x100
leaq -0x58(%rbp), %rax
movzbl %r11b, %r11d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xab4a0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xaacdd
jmp 0xaadcb
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rdi
callq 0x172500
movq -0x90(%rbp), %rdi
movq %rax, %rdx
leaq 0x108a1a(%rip), %rsi    # 0x1b371c
movb $0x0, %al
callq 0x15b0d0
movq -0x58(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x1, -0x68(%rbp)
jge 0xaad31
jmp 0xaadcb
movq -0x8(%rbp), %rdi
movq -0x68(%rbp), %rax
movl %eax, %edx
leaq 0x1089fc(%rip), %rsi    # 0x1b373e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jl 0xaad7b
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq 0x1089fc(%rip), %rcx    # 0x1b3765
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
callq 0x166be0
jmp 0xaadc9
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0xaadc7
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x68(%rbp), %rcx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, (%rsp)
callq 0x15b840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
jmp 0xaadc9
jmp 0xaadcb
movq -0x40(%rbp), %rdi
callq 0x171750
movq -0x48(%rbp), %rdi
callq 0x171750
movq -0x50(%rbp), %rdi
callq 0x171750
addq $0xb0, %rsp
popq %rbp
retq
nop