// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
leaq 0x1(%rcx), %rax
movq %rax, 0x18(%rsp)
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xe3eb4
movzbl %al, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x72350
leaq 0xa8e6d(%rip), %rsi     # 0x11acc9
movq %r13, %rdi
movl %r15d, 0x8(%rsp)
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xde896
movq %r13, %rdi
callq 0xeac74
movq %rax, %r12
movq %rbx, %r15
leaq -0x1(%rbx), %rcx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movq %rbp, 0x20(%rsp)
movq %rbp, %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x723ac
testl %eax, %eax
je 0x71fdb
addq %r14, %r15
movq %r12, %rdi
callq 0xeb7e4
leaq 0xa8e82(%rip), %rsi     # 0x11ad46
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq 0x10(%rsp), %rbp
movq %r13, %rdi
callq 0xeac74
movq %rax, %r14
movq %r15, 0x18(%rsp)
movq %r15, %rcx
subq %rbp, %rcx
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq %r13, %rdi
movq 0x20(%rsp), %rbx
movq %rbx, %rsi
movq %rbp, %rdx
movl 0x8(%rsp), %r8d
movq %rax, %r9
callq 0x723ac
testl %eax, %eax
je 0x71fe2
movq %r14, %rdi
callq 0xeb7e4
leaq 0xbcb37(%rip), %rsi     # 0x12ea5e
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq 0x10(%rsp), %rbp
movq %r13, %rdi
callq 0xeac74
movq 0x18(%rsp), %rcx
subq %rbp, %rcx
movq %r15, (%rsp)
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movl 0x8(%rsp), %r8d
movq %rax, %rbx
movq %rax, %r9
callq 0x723ac
testl %eax, %eax
je 0x72033
movq %rbx, %rdi
callq 0xeb7e4
leaq 0xa8db7(%rip), %rsi     # 0x11ad34
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
addq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r15
subq %rbp, %r15
jle 0x72033
leaq 0xa8db2(%rip), %rsi     # 0x11ad56
movq %r13, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xde896
cmpl $0x2, 0x90(%r13)
jl 0x71fe6
leaq 0xa8dbb(%rip), %rcx     # 0x11ad7d
pushq $0x1
popq %r9
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq 0xe4e0b
jmp 0x72033
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x72033
xorl %ebx, %ebx
jmp 0x72033
movq %rbx, 0x8(%rsp)
cmpl $0x2, (%r13)
movq 0x20(%rsp), %rbx
jl 0x7202e
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0xdeba7
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xded3a
pushq $-0x1
popq %rsi
movq %r13, %rdi
callq 0xdeba7
movq 0x8(%rsp), %rbx
movq %r12, %rdi
callq 0xeaf3c
movq %r14, %rdi
callq 0xeaf3c
movq %rbx, %rdi
callq 0xeaf3c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq