// File: /workspace/github_c_makefile_star2_O0/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
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 -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%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, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x29(%rbp), %esi
callq 0xab3f0
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %edx
movq %rax, %rcx
leaq 0x108d7a(%rip), %rsi    # 0x1b36b1
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rcx
movl $0x3, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x1669f0
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rdi
callq 0x172500
movq -0x68(%rbp), %rdi
movq %rax, %rdx
leaq 0x108d7e(%rip), %rsi    # 0x1b3707
movb $0x0, %al
callq 0x15b0d0
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
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 -0x29(%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, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xaaa04
jmp 0xaaa95
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rdi
callq 0x172500
movq -0x88(%rbp), %rdi
movq %rax, %rdx
leaq 0x108ced(%rip), %rsi    # 0x1b3716
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 -0x29(%rbp), %r9d
callq 0xab5b0
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rdi
callq 0x172500
movq -0x80(%rbp), %rdi
movq %rax, %rdx
leaq 0xf5bbe(%rip), %rsi     # 0x1a064c
movb $0x0, %al
callq 0x15b0d0
movq -0x40(%rbp), %rdi
callq 0x171750
movq -0x48(%rbp), %rdi
callq 0x171750
movq -0x50(%rbp), %rdi
callq 0x171750
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)