// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_comm
static void decode_id3v2_frame_comm(deark *c, id3v2ctx *d,
	dbuf *f, i64 pos1, i64 len)
{
	u8 id3_encoding;
	i64 pos = pos1;
	de_ucstring *lang = NULL;
	de_ucstring *shortdesc = NULL;
	de_ucstring *comment_text = NULL;
	i64 bytes_consumed;
	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));

	lang = ucstring_create(c);
	dbuf_read_to_ucstring(f, pos, 3, lang, 0, DE_ENCODING_ASCII);
	de_dbg(c, "language: \"%s\"", ucstring_getpsz(lang));
	pos += 3;

	shortdesc = ucstring_create(c);
	bytes_consumed = 0;
	ret = read_id3v2_terminated_string(c, d, f, pos, pos1+len-pos, 256, id3_encoding,
		shortdesc, &bytes_consumed);
	if(!ret) goto done;
	de_dbg(c, "short description: \"%s\"", ucstring_getpsz(shortdesc));
	pos += bytes_consumed;

	comment_text = ucstring_create(c);
	id3v2_read_to_ucstring(c, f, pos, pos1+len-pos, comment_text, id3_encoding);
	de_dbg(c, "comment: \"%s\"", ucstring_getpsz(comment_text));

done:
	ucstring_destroy(lang);
	ucstring_destroy(shortdesc);
	ucstring_destroy(comment_text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1(%rcx), %r12
movq %rdx, %r13
movq %rdx, %rdi
movq %rcx, 0x18(%rsp)
movq %rcx, %rsi
callq 0xeead3
movzbl %al, %r14d
cmpb $0x3, %r14b
ja 0x75e1d
leaq 0xb1b22(%rip), %rax     # 0x1278f4
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xb2142(%rip), %rcx     # 0x127f24
jmp 0x75e24
leaq 0xb2163(%rip), %rcx     # 0x127f4e
jmp 0x75e24
leaq 0xae505(%rip), %rcx     # 0x1242f9
jmp 0x75e24
movb 0x30(%r15), %al
cmpb $0x3, %al
leaq 0xb2132(%rip), %rcx     # 0x127f35
leaq 0xb2137(%rip), %rsi     # 0x127f41
cmoveq %rcx, %rsi
cmpb $0x2, %al
leaq 0xb2118(%rip), %rcx     # 0x127f2f
cmovneq %rsi, %rcx
jmp 0x75e24
leaq 0xb632d(%rip), %rcx     # 0x12c151
leaq 0xb20de(%rip), %rsi     # 0x127f09
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r15
movl $0x3, %edx
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xefbd7
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0xf705c
leaq 0xb20ec(%rip), %rsi     # 0x127f5f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rsp), %r12
leaq 0x4(%r12), %r15
movq %rbx, %rdi
callq 0xf6410
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
leaq -0x4(%rbp), %rcx
movq %rdx, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, 0x8(%rsp)
movl %r14d, %r8d
movq %rax, %r14
movq %rax, %r9
callq 0x7665b
testl %eax, %eax
je 0x75f2f
addq %r12, %rbp
movq %r14, %rdi
callq 0xf705c
leaq 0xb2096(%rip), %rsi     # 0x127f6e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
addq 0x20(%rsp), %r15
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r12
subq %r15, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %rax, %r8
movq 0x8(%rsp), %r9
callq 0x76713
movq %r12, %rdi
callq 0xf705c
leaq 0x9e960(%rip), %rsi     # 0x114880
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
jmp 0x75f32
xorl %r12d, %r12d
movq 0x10(%rsp), %rdi
callq 0xf6753
movq %r14, %rdi
callq 0xf6753
movq %r12, %rdi
callq 0xf6753
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq