// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
movq %rcx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movq $0x0, 0x18(%rsp)
leaq 0x1(%rcx), %r12
movq %rdx, %rbp
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xeead3
movzbl %al, %edx
cmpb $0x3, %dl
ja 0x75feb
leaq 0xb1963(%rip), %rax     # 0x127904
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xb1f73(%rip), %rcx     # 0x127f24
jmp 0x75ff2
leaq 0xb1f94(%rip), %rcx     # 0x127f4e
jmp 0x75ff2
leaq 0xae336(%rip), %rcx     # 0x1242f9
jmp 0x75ff2
movb 0x30(%rbx), %al
cmpb $0x3, %al
leaq 0xb1f64(%rip), %rcx     # 0x127f35
leaq 0xb1f69(%rip), %rsi     # 0x127f41
cmoveq %rcx, %rsi
cmpb $0x2, %al
leaq 0xb1f4a(%rip), %rcx     # 0x127f2f
cmovneq %rsi, %rcx
jmp 0x75ff2
leaq 0xb615f(%rip), %rcx     # 0x12c151
leaq 0xb1f10(%rip), %rsi     # 0x127f09
movq %r15, %rdi
xorl %eax, %eax
movq %rdx, 0x10(%rsp)
callq 0xe8617
movq %r15, %rdi
callq 0xf6410
movq %rax, %r14
movq 0x8(%rsp), %rbx
leaq -0x1(%rbx), %rcx
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x7665b
testl %eax, %eax
je 0x76171
addq %r13, %rbx
movq %r14, %rdi
callq 0xf705c
leaq 0xb1f33(%rip), %rsi     # 0x127f86
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq 0x18(%rsp), %r12
movq %r15, %rdi
callq 0xf6410
movq %rax, %r13
movq %rbx, %rcx
subq %r12, %rcx
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq 0x10(%rsp), %r8
movq %r13, %r9
callq 0x7665b
testl %eax, %eax
je 0x76178
movq %r14, 0x8(%rsp)
movq %r13, %rdi
movq %rbp, %r14
callq 0xf705c
leaq 0xc5c9a(%rip), %rsi     # 0x13bd4e
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq 0x18(%rsp), %r12
movq %r15, %rdi
callq 0xf6410
movq %rax, %rbp
movq %rbx, %rcx
subq %r12, %rcx
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r14, 0x20(%rsp)
movq %r14, %rsi
movq %r12, %rdx
movq 0x10(%rsp), %r8
movq %rbp, %r9
callq 0x7665b
testl %eax, %eax
je 0x761c4
movq %rbp, 0x10(%rsp)
movq %rbp, %rdi
callq 0xf705c
leaq 0xb1e5d(%rip), %rsi     # 0x127f74
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq 0x18(%rsp), %r12
subq %r12, %rbx
jle 0x761bf
leaq 0xb1e5d(%rip), %rsi     # 0x127f96
movq %r15, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xe8617
cmpl $0x2, 0x90(%r15)
jl 0x7617c
leaq 0xb1e67(%rip), %rcx     # 0x127fbd
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefd48
jmp 0x761bf
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x761c9
xorl %ebp, %ebp
jmp 0x761c9
cmpl $0x2, (%r15)
jl 0x761bf
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r15, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0xe8bea
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xf6753
movq %r13, %rdi
callq 0xf6753
movq %rbp, %rdi
callq 0xf6753
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq