// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
callq 0x165060
movb %al, -0x39(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movzbl -0x39(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x39(%rbp), %esi
callq 0xab3f0
movq -0x70(%rbp), %rdi
movl -0x68(%rbp), %edx
movq %rax, %rcx
leaq 0x1090ee(%rip), %rsi    # 0x1b36b1
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x48(%rbp)
movq $0x0, -0x58(%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 -0x39(%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, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jne 0xaa632
jmp 0xaa701
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rdi
callq 0x172500
movq -0x78(%rbp), %rdi
movq %rax, %rdx
leaq 0x1090cb(%rip), %rsi    # 0x1b371c
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 -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
subq -0x38(%rbp), %rcx
movq -0x50(%rbp), %r8
movzbl -0x39(%rbp), %r9d
callq 0xab5b0
movq -0x30(%rbp), %rax
cmpl $0x575858, 0x4(%rax)    # imm = 0x575858
je 0xaa6b1
movq -0x30(%rbp), %rax
cmpl $0x57585858, 0x4(%rax)  # imm = 0x57585858
jne 0xaa6be
leaq 0x109010(%rip), %rax    # 0x1b36c8
movq %rax, -0x60(%rbp)
jmp 0xaa6c9
leaq 0x114e93(%rip), %rax    # 0x1bf558
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rdi
callq 0x172500
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rdx
movq %rax, %rcx
leaq 0x10d50c(%rip), %rsi    # 0x1b7c06
movb $0x0, %al
callq 0x15b0d0
movq -0x48(%rbp), %rdi
callq 0x171750
movq -0x50(%rbp), %rdi
callq 0x171750
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)