// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/id3.c
// Function: decode_id3v2_frame_internal
static void decode_id3v2_frame_internal(deark *c, id3v2ctx *d, dbuf *f,
	i64 pos1, i64 len, struct de_fourcc *tag4cc)
{
	if(d->version_code==2) {
		if(tag4cc->id==CODE_TXX || tag4cc->id==CODE_WXX) {
			decode_id3v2_frame_txxx_etc(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->bytes[0]=='T') {
			decode_id3v2_frame_text(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->bytes[0]=='W') {
			decode_id3v2_frame_urllink(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->id==CODE_COM) {
			decode_id3v2_frame_comm(c, d, f, pos1, len);
		}
		else if(tag4cc->id==CODE_GEO) {
			decode_id3v2_frame_geob(c, d, f, pos1, len);
		}
		else if(tag4cc->id==CODE_PIC) {
			decode_id3v2_frame_pic_apic(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->id==CODE_POP) {
			decode_id3v2_frame_pop_popm(c, d, f, pos1, len);
		}
	}
	else if(d->version_code>=3) {
		// "All text frame identifiers begin with "T". Only text frame identifiers
		// begin with "T", with the exception of the "TXXX" frame."
		if(tag4cc->id==CODE_TXXX || tag4cc->id==CODE_WXXX) {
			decode_id3v2_frame_txxx_etc(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->bytes[0]=='T') {
			decode_id3v2_frame_text(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->bytes[0]=='W') {
			decode_id3v2_frame_urllink(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->id==CODE_COMM) {
			decode_id3v2_frame_comm(c, d, f, pos1, len);
		}
		else if(tag4cc->id==CODE_GEOB) {
			decode_id3v2_frame_geob(c, d, f, pos1, len);
		}
		else if(tag4cc->id==CODE_PRIV) {
			decode_id3v2_frame_priv(c, d, f, pos1, len);
		}
		else if(tag4cc->id==CODE_APIC) {
			decode_id3v2_frame_pic_apic(c, d, f, pos1, len, tag4cc);
		}
		else if(tag4cc->id==CODE_POPM) {
			decode_id3v2_frame_pop_popm(c, d, f, pos1, len);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r14
movq %rdi, %r15
movb 0x30(%rsi), %al
cmpb $0x2, %al
jne 0x717f3
movl 0x4(%r9), %eax
cmpl $0x575858, %eax         # imm = 0x575858
je 0x7180b
cmpl $0x545858, %eax         # imm = 0x545858
je 0x7180b
movzbl (%r9), %ecx
cmpl $0x57, %ecx
je 0x71857
cmpl $0x54, %ecx
je 0x71838
cmpl $0x504f50, %eax         # imm = 0x504F50
je 0x718ee
cmpl $0x47454f, %eax         # imm = 0x47454F
je 0x718cf
cmpl $0x504943, %eax         # imm = 0x504943
je 0x7190d
cmpl $0x434f4d, %eax         # imm = 0x434F4D
je 0x718a1
jmp 0x718c0
jbe 0x718c0
movl 0x4(%r9), %eax
cmpl $0x57585858, %eax       # imm = 0x57585858
je 0x7180b
cmpl $0x54585858, %eax       # imm = 0x54585858
jne 0x7182a
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71a2a
movzbl (%r9), %ecx
cmpl $0x57, %ecx
je 0x71857
cmpl $0x54, %ecx
jne 0x71876
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71b80
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71c2e
cmpl $0x41504943, %eax       # imm = 0x41504943
je 0x7190d
cmpl $0x50524956, %eax       # imm = 0x50524956
je 0x7192c
cmpl $0x47454f42, %eax       # imm = 0x47454F42
je 0x718cf
cmpl $0x504f504d, %eax       # imm = 0x504F504D
je 0x718ee
cmpl $0x434f4d4d, %eax       # imm = 0x434F4D4D
jne 0x718c0
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71c90
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71e0c
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x72295
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7205a
movl $0x100, %ecx            # imm = 0x100
cmpq %rcx, %rbx
cmovlq %rbx, %rcx
pushq $0x1
popq %r8
pushq $0x5
popq %r9
movq %r14, %rdi
movq %r12, %rsi
movq %rcx, %rdx
callq 0xe495c
movq %rax, %r13
cmpl $0x0, 0x34(%rax)
je 0x71a11
movq 0x18(%r13), %rdi
callq 0xeb7e4
leaq 0xa959a(%rip), %rsi     # 0x11af05
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%r13), %rbp
subq %rbp, %rbx
testq %rbx, %rbx
jle 0x71a11
addq %r12, %rbp
leaq 0xa957f(%rip), %rsi     # 0x11af11
movq %r15, %rdi
movq %rbp, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x8(%r13), %rdi
leaq 0xace21(%rip), %rsi     # 0x11e7ce
callq 0x181a0
testl %eax, %eax
je 0x719f5
cmpl $0x2, (%r15)
jl 0x71a11
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0xded3a
pushq $-0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
jmp 0x71a11
leaq 0xb8e02(%rip), %rcx     # 0x12a7fe
pushq $0x1
popq %r9
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xe4e0b
movq %r15, %rdi
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe4b94