// File: /workspace/github_c_makefile_star2_O3/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
movl 0x80(%rsp), %ebp
movq $0x0, (%r9)
xorl %r15d, %r15d
cmpl $0x5, %ebp
jg 0xa350c
movl %edx, %r14d
leal -0xffdd(%r14), %eax
cmpl $0x2, %eax
jb 0xa350c
movq %r8, %r12
movq %rdi, %rbx
movq %r9, 0x30(%rsp)
movq %rsi, 0x10(%rsp)
cmpl $0xffdf, %r14d          # imm = 0xFFDF
jne 0xa33be
leaq 0x18(%rsp), %r14
movq %rcx, 0x28(%rsp)
movq %rcx, (%r14)
leaq 0x24(%rsp), %rsi
movq %rbx, %rdi
callq 0xe8a1c
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeebeb
leaq 0x8f98a(%rip), %rsi     # 0x132bbf
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0xeebeb
movq %rax, %r14
leaq 0x76c50(%rip), %rsi     # 0x119ea7
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %r14, 0x40(%rsp)
testq %r14, %r14
jle 0xa339b
addq 0x28(%rsp), %r12
incl %ebp
leaq 0x89a7b(%rip), %r13     # 0x12ccfb
xorl %r14d, %r14d
movq $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rcx
cmpq %r12, %rcx
jg 0xa3481
movq %rbx, %rdi
leaq 0x8f929(%rip), %rsi     # 0x132bcd
movl %r14d, %edx
xorl %eax, %eax
callq 0xe8617
movq %rbx, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xeebeb
movq %rax, %r15
cmpl $0xfff8, %r15d          # imm = 0xFFF8
jle 0xa3300
cmpl $0xfff9, %r15d          # imm = 0xFFF9
je 0xa3322
cmpl $0xfffd, %r15d          # imm = 0xFFFD
je 0xa332b
leaq 0x88e63(%rip), %rcx     # 0x12c151
cmpl $0xfffe, %r15d          # imm = 0xFFFE
jne 0xa3337
leaq 0x9d0bb(%rip), %rcx     # 0x1403b9
jmp 0xa3337
cmpl $0xffde, %r15d          # imm = 0xFFDE
je 0xa3330
leaq 0x88e41(%rip), %rcx     # 0x12c151
cmpl $0xffdf, %r15d          # imm = 0xFFDF
jne 0xa3337
leaq 0x8f88a(%rip), %rcx     # 0x132baa
jmp 0xa3337
leaq 0x81cb1(%rip), %rcx     # 0x124fda
jmp 0xa3337
movq %r13, %rcx
jmp 0xa3337
leaq 0x8f85d(%rip), %rcx     # 0x132b94
movq %rbx, %rdi
leaq 0x8a50b(%rip), %rsi     # 0x12d84c
movl %r15d, %edx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%rsp), %rcx
movq %r12, %r8
subq %rcx, %r8
movl %ebp, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movl %r15d, %edx
leaq 0x38(%rsp), %r9
callq 0xa31b0
testl %eax, %eax
je 0xa3481
movq 0x38(%rsp), %rax
addq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
incq %r14
cmpq %r14, 0x40(%rsp)
jne 0xa3283
movq 0x18(%rsp), %rax
subq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
jmp 0xa3506
movq 0x18(%rbx), %rdi
movq %rcx, %rsi
movq %rcx, %rbp
callq 0xeebc8
movq %rax, %r13
leaq 0x8f806(%rip), %rsi     # 0x132bdd
xorl %r15d, %r15d
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
cmpq $0x2, %r13
setl %al
cmpq %r12, %r13
setg %cl
orb %al, %cl
movq 0x30(%rsp), %rcx
jne 0xa350c
movq %r13, %rax
addq $0x2, %rax
movq %rax, (%rcx)
addq $0x2, %rbp
cmpl $0xfffd, %r14d          # imm = 0xFFFD
je 0xa3492
cmpl $0xfff9, %r14d          # imm = 0xFFF9
jne 0xa34e4
movq %rbx, %rdi
callq 0xea504
movq 0x10(%rsp), %rcx
movq %rax, %r14
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0xa351e
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xea53f
movq 0x10(%rsp), %rcx
movq 0x18(%rbx), %rdi
movl 0x4(%rcx), %r9d
leaq 0x7a2bd(%rip), %rcx     # 0x11d720
movq %rbp, %rsi
movq %r13, %rdx
movq %r14, %r8
callq 0xefd48
movq %rbx, %rdi
movq %r14, %rsi
callq 0xea50e
jmp 0xa3506
movl 0x24(%rsp), %esi
movq %rbx, %rdi
callq 0xe8a25
xorl %r15d, %r15d
jmp 0xa350c
movq %rbx, %rdi
callq 0xf6410
movq %rax, %r14
movq 0x18(%rbx), %rdi
movl $0x1, (%rsp)
movl $0x800, %ecx            # imm = 0x800
movq %rbp, %rsi
movq %r13, %rdx
movq %rax, %r8
xorl %r9d, %r9d
callq 0xefc2a
movq %r14, %rdi
callq 0xf70f6
leaq 0x97bd7(%rip), %rsi     # 0x13b0a4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r14, %rdi
callq 0xf6753
jmp 0xa3506
movq 0x18(%rbx), %rsi
movl $0x1, (%rsp)
movl $0x100, %r8d            # imm = 0x100
movq %rbx, %rdi
movq %rbp, %rdx
movq %r13, %rcx
xorl %r9d, %r9d
callq 0xe8bea
movl $0x1, %r15d
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0xa3454
movq 0x8(%rax), %rdi
callq 0xf67a3
movq 0x10(%rsp), %rcx
testl %eax, %eax
je 0xa3454
movq 0x18(%rcx), %rax
movq 0x8(%rax), %rdx
jmp 0xa3442
nop