// File: /workspace/github_c_makefile_star2_O1/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 0xef0d5
movzbl %al, %ebp
cmpb $0x3, %bpl
movq %r12, 0x20(%rsp)
ja 0x75e74
leaq 0xb187b(%rip), %rax     # 0x1276a4
movslq (%rax,%rbp,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xb1ebb(%rip), %rcx     # 0x127cf4
jmp 0x75e7b
leaq 0xb1edc(%rip), %rcx     # 0x127d1e
jmp 0x75e7b
leaq 0xae28e(%rip), %rcx     # 0x1240d9
jmp 0x75e7b
movb 0x30(%r14), %al
cmpb $0x3, %al
leaq 0xb1eab(%rip), %rcx     # 0x127d05
leaq 0xb1eb0(%rip), %rdx     # 0x127d11
cmoveq %rcx, %rdx
cmpb $0x2, %al
leaq 0xb1e91(%rip), %rcx     # 0x127cff
cmovneq %rdx, %rcx
jmp 0x75e7b
leaq 0xb5fee(%rip), %rcx     # 0x12be69
leaq 0xb1e57(%rip), %rsi     # 0x127cd9
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
callq 0xf6870
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 0x769ce
testl %eax, %eax
je 0x75f67
addq 0x18(%rsp), %r15
movq 0x10(%rsp), %rdi
callq 0xf74bd
leaq 0xb1e5b(%rip), %rsi     # 0x127d44
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
addq 0x30(%rsp), %r13
movq %rbx, %rdi
callq 0xf6870
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 0x76a8c
movq 0x20(%rsp), %rax
movl 0x4(%rax), %eax
cmpl $0x57585858, %eax       # imm = 0x57585858
leaq 0xb1dbc(%rip), %rcx     # 0x127cf0
leaq 0xbd7de(%rip), %r15     # 0x133719
cmoveq %rcx, %r15
cmpl $0x575858, %eax         # imm = 0x575858
cmoveq %rcx, %r15
movq %r14, %rdi
callq 0xf74bd
leaq 0xb5eeb(%rip), %rsi     # 0x12be42
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rsp), %rdi
callq 0xf6bb0
movq %r14, %rdi
callq 0xf6bb0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq