// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_txxx_etc
static void decode_id3v2_frame_txxx_etc(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len, struct de_fourcc *tag4cc)
{
	i64 pos = pos1;
	u8 id3_encoding;
	de_ucstring *description = NULL;
	de_ucstring *value = NULL;
	i64 bytes_consumed;
	const char *name;
	int ret;

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

	description = ucstring_create(c);
	bytes_consumed = 0;
	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;

	value = ucstring_create(c);
	id3v2_read_to_ucstring(c, f, pos, pos1+len-pos, value, id3_encoding);
	if(tag4cc->id==CODE_WXX || tag4cc->id==CODE_WXXX) name="url";
	else name="value";
	de_dbg(c, "%s: \"%s\"", name, ucstring_getpsz(value));

done:
	ucstring_destroy(description);
	ucstring_destroy(value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r12
movq %r8, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1(%rcx), %r13
movq %rdx, 0x28(%rsp)
movq %rdx, %rdi
movq %rcx, 0x18(%rsp)
movq %rcx, %rsi
callq 0xeead3
movzbl %al, %ebp
cmpb $0x3, %bpl
movq %r12, 0x20(%rsp)
ja 0x75b1c
leaq 0xb1e03(%rip), %rax     # 0x1278d4
movslq (%rax,%rbp,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xb2443(%rip), %rcx     # 0x127f24
jmp 0x75b23
leaq 0xb2464(%rip), %rcx     # 0x127f4e
jmp 0x75b23
leaq 0xae806(%rip), %rcx     # 0x1242f9
jmp 0x75b23
movb 0x30(%r14), %al
cmpb $0x3, %al
leaq 0xb2433(%rip), %rcx     # 0x127f35
leaq 0xb2438(%rip), %rdx     # 0x127f41
cmoveq %rcx, %rdx
cmpb $0x2, %al
leaq 0xb2419(%rip), %rcx     # 0x127f2f
cmovneq %rdx, %rcx
jmp 0x75b23
leaq 0xb662e(%rip), %rcx     # 0x12c151
leaq 0xb23df(%rip), %rsi     # 0x127f09
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r9
leaq 0x30(%rsp), %rax
movq $0x0, (%rax)
leaq -0x1(%r15), %rcx
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x28(%rsp), %r12
movq %r12, %rsi
movq %r13, %rdx
movl %ebp, %r8d
movq %r9, 0x10(%rsp)
callq 0x7665b
testl %eax, %eax
je 0x75c0f
addq 0x18(%rsp), %r15
movq 0x10(%rsp), %rdi
callq 0xf705c
leaq 0xb23e3(%rip), %rsi     # 0x127f74
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq 0x30(%rsp), %r13
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
subq %r13, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
movl %ebp, %r9d
callq 0x76713
movq 0x20(%rsp), %rax
movl 0x4(%rax), %eax
cmpl $0x57585858, %eax       # imm = 0x57585858
leaq 0xb2344(%rip), %rcx     # 0x127f20
leaq 0xbdf2e(%rip), %r15     # 0x133b11
cmoveq %rcx, %r15
cmpl $0x575858, %eax         # imm = 0x575858
cmoveq %rcx, %r15
movq %r14, %rdi
callq 0xf705c
leaq 0xb652b(%rip), %rsi     # 0x12c12a
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x10(%rsp), %rdi
callq 0xf6753
movq %r14, %rdi
callq 0xf6753
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq