// File: /workspace/github_c_makefile_star2_O1/jsummers[P]deark/modules/os2ea.c
// Function: eadata_do_attribute_lowlevel
static int eadata_do_attribute_lowlevel(deark *c, struct eadata_ctx *d,
	UI attr_dtype, i64 pos1, i64 nbytes_avail, i64 *pbytes_consumed, int nesting_level)
{
	int retval = 0;

	*pbytes_consumed = 0;

	// I don't know if multi-val attributes are allowed to contain other multi-val attributes.
	if(nesting_level>5) goto done;

	switch(attr_dtype) {
	case 0xffdf:
		if(!eadata_do_MVMT(c, d, pos1, nbytes_avail, pbytes_consumed, nesting_level)) goto done;
		break;
	case 0xffde: // MVST (TODO)
	case 0xffdd: // ASN1
		goto done;
	default:
		if(!eadata_do_attribute_lowlevel_singleval(c, d, attr_dtype, pos1, nbytes_avail,
			pbytes_consumed))
		{
			goto done;
		}
		break;
	}

	retval = 1;

done:
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x18(%rsp)
movl 0x80(%rsp), %r12d
movq $0x0, (%r9)
xorl %ebp, %ebp
cmpl $0x5, %r12d
jg 0xa3d7e
movl %edx, %r15d
leal -0xffdd(%r15), %eax
cmpl $0x2, %eax
jb 0xa3d7e
movq %rcx, %r13
movq %rdi, %rbx
movq %r9, 0x28(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0xffdf, %r15d          # imm = 0xFFDF
jne 0xa3c99
leaq 0x10(%rsp), %r14
movq %r13, (%r14)
leaq 0x24(%rsp), %rsi
movq %rbx, %rdi
callq 0xe958c
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef1ed
leaq 0x8ed2c(%rip), %rsi     # 0x132827
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xef1ed
movq %rax, %r15
leaq 0x7626a(%rip), %rsi     # 0x119d87
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
testq %r15, %r15
movq %r13, %rax
setg %r13b
movq %rax, 0x38(%rsp)
jle 0xa3c82
addq %rax, 0x18(%rsp)
incl %r12d
xorl %r14d, %r14d
movq %r15, 0x40(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x10(%rsp), %rcx
movl $0x5, %ebp
cmpq 0x18(%rsp), %rcx
jg 0xa3c6a
movq %rbx, %rdi
leaq 0x8ecbe(%rip), %rsi     # 0x132835
movl %r14d, %edx
xorl %eax, %eax
callq 0xe9226
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0xef1ed
movq %rax, %r15
cmpl $0xfff8, %r15d          # imm = 0xFFF8
jle 0xa3bd3
cmpl $0xfff9, %r15d          # imm = 0xFFF9
je 0xa3bf5
cmpl $0xfffd, %r15d          # imm = 0xFFFD
je 0xa3bfe
leaq 0x882a8(%rip), %rcx     # 0x12be69
cmpl $0xfffe, %r15d          # imm = 0xFFFE
jne 0xa3c0e
leaq 0x9c3e8(%rip), %rcx     # 0x13ffb9
jmp 0xa3c0e
cmpl $0xffde, %r15d          # imm = 0xFFDE
je 0xa3c07
leaq 0x88286(%rip), %rcx     # 0x12be69
cmpl $0xffdf, %r15d          # imm = 0xFFDF
jne 0xa3c0e
leaq 0x8ec1f(%rip), %rcx     # 0x132812
jmp 0xa3c0e
leaq 0x811ae(%rip), %rcx     # 0x124daa
jmp 0xa3c0e
leaq 0x88e0e(%rip), %rcx     # 0x12ca13
jmp 0xa3c0e
leaq 0x8ebee(%rip), %rcx     # 0x1327fc
movq %rbx, %rdi
leaq 0x8994c(%rip), %rsi     # 0x12d564
movl %r15d, %edx
xorl %eax, %eax
callq 0xe9226
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
subq %rcx, %r8
movl %r12d, (%rsp)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movl %r15d, %edx
leaq 0x30(%rsp), %r9
callq 0xa3a75
testl %eax, %eax
movq 0x40(%rsp), %r15
je 0xa3c6a
movq 0x30(%rsp), %rax
addq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0xa3d60
incq %r14
cmpq %r15, %r14
setl %r13b
jne 0xa3b4f
movq 0x10(%rsp), %rax
subq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rax, (%rcx)
jmp 0xa3d65
movq 0x18(%rbx), %rdi
movq %r13, %rsi
callq 0xef1ca
movq %rax, %r14
leaq 0x8eb96(%rip), %rsi     # 0x132845
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
cmpq $0x2, %r14
setl %al
cmpq 0x18(%rsp), %r14
setg %r12b
orb %al, %r12b
jne 0xa3d7e
movq %r14, %rax
addq $0x2, %rax
movq 0x28(%rsp), %rcx
movq %rax, (%rcx)
addq $0x2, %r13
cmpl $0xfffd, %r15d          # imm = 0xFFFD
je 0xa3d8f
cmpl $0xfff9, %r15d          # imm = 0xFFF9
jne 0xa3de1
movq %rbx, %rdi
callq 0xea9a9
movq %rax, %r15
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0xa3e11
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xea9e4
movq 0x8(%rsp), %rcx
movq 0x18(%rbx), %rdi
movl 0x4(%rcx), %r9d
leaq 0x798ce(%rip), %rcx     # 0x11d610
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %r8
callq 0xf0321
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea9b3
jmp 0xa3e03
cmpl $0x5, %ebp
jne 0xa3d71
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xe9595
xorl %ebp, %ebp
testb $0x1, %r13b
jne 0xa3d7e
movl $0x1, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0xf6870
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl $0x1, (%rsp)
movl $0x800, %ecx            # imm = 0x800
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xf0203
movq %r15, %rdi
callq 0xf7557
leaq 0x96f42(%rip), %rsi     # 0x13ad0c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
callq 0xf6bb0
jmp 0xa3e03
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %r13, %rdx
movq %r14, %rcx
xorl %r9d, %r9d
callq 0xe975a
testb %r12b, %r12b
je 0xa3d79
jmp 0xa3d7e
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0xa3d33
movq 0x8(%rax), %rdi
callq 0xf6c00
movq 0x8(%rsp), %rcx
testl %eax, %eax
je 0xa3d33
movq 0x18(%rcx), %rax
movq 0x8(%rax), %rdx
jmp 0xa3d21
nopl (%rax)