// File: /workspace/github_c_makefile_star2_O2/jsummers[P]deark/modules/vort.c
// Function: do_full_object
static int do_full_object(deark *c, lctx *d, i64 pos1,
	i64 *bytes_consumed)
{
	u8 obj_type;
	i64 obj_dlen;
	i64 pos = pos1;
	i64 bytes_consumed2 = 0;
	int retval = 0;
	int saved_indent_level;

	de_dbg_indent_save(c, &saved_indent_level);
	d->nesting_level++;
	// Objects can't be nested without going through this code path, so doing
	// this check only here should be sufficient.
	if(d->nesting_level>8) goto done;

	de_dbg(c, "full object at %"I64_FMT, pos);
	de_dbg_indent(c, 1);
	obj_type = de_getbyte_p(&pos);
	de_dbg(c, "full type: %u (%s)", (UI)obj_type, get_fulltype_name(obj_type));

	obj_dlen = read_vlq(c, &pos);
	de_dbg(c, "data len: %"I64_FMT, obj_dlen);

	if(!do_object_list(c, d, pos, obj_dlen, obj_type, &bytes_consumed2)) goto done;

	pos += obj_dlen;
	retval = 1;

done:
	d->nesting_level--;
	de_dbg_indent_restore(c, saved_indent_level);
	*bytes_consumed = pos-pos1;
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, 0x10(%rsp)
leaq 0x1c(%rsp), %rsi
callq 0xdebae
movl 0x4(%r12), %eax
leal 0x1(%rax), %ecx
movq %r12, 0x30(%rsp)
movl %ecx, 0x4(%r12)
xorl %r12d, %r12d
cmpl $0x7, %eax
jg 0xc94e3
movq %rbx, 0x28(%rsp)
leaq 0x69f92(%rip), %rsi     # 0x1331dc
movq %r15, %rdi
movq %r14, 0x20(%rsp)
movq %r14, %rdx
xorl %eax, %eax
callq 0xde896
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xdeba7
movq 0x18(%r15), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe3f2a
movl %eax, %ebp
movzbl %al, %edx
leaq 0x55c60(%rip), %rcx     # 0x11eee1
cmpb $0x3, %dl
ja 0xc9296
movl %edx, %eax
leaq 0x69f05(%rip), %rsi     # 0x133194
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
leaq 0x69f52(%rip), %rsi     # 0x1331ef
movq %r15, %rdi
xorl %eax, %eax
callq 0xde896
leaq 0x10(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc9184
movq %rax, %r14
leaq 0x5c622(%rip), %rsi     # 0x1258e3
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xde896
movq (%rbx), %rbx
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0xdebae
leaq 0x69f1d(%rip), %rsi     # 0x133202
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xde896
movq %r14, 0x40(%rsp)
addq %rbx, %r14
movq %r14, 0x48(%rsp)
pushq $0x1
popq %r12
leaq 0xc6b83(%rip), %r13     # 0x18fe90
cmpq 0x48(%rsp), %rbx
jge 0xc94b2
movq 0x18(%r15), %rax
cmpq 0x18(%rax), %rbx
jge 0xc94ca
movq %r15, %rdi
movl %r12d, %esi
callq 0xdeba7
movq %rbx, (%rsp)
movq %r15, %rdi
leaq 0x69edf(%rip), %rsi     # 0x13321e
movq %rbx, %rdx
xorl %eax, %eax
callq 0xde896
movq %r15, %rdi
movl %r12d, %esi
callq 0xdeba7
movq 0x18(%r15), %rdi
movq %rsp, %rsi
callq 0xe3f2a
xorl %ebx, %ebx
cmpq $0x270, %rbx            # imm = 0x270
je 0xc937f
cmpb %al, 0x5(%rbx,%r13)
jne 0xc9379
cmpb %bpl, 0x4(%rbx,%r13)
je 0xc9391
addq $0x18, %rbx
jmp 0xc9362
movq $0x0, 0x38(%rsp)
leaq 0x55b52(%rip), %r12     # 0x11eee1
jmp 0xc93ad
leaq (%rbx,%r13), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rbx,%r13), %r12
testq %r12, %r12
leaq 0x55b38(%rip), %rcx     # 0x11eee1
cmoveq %rcx, %r12
movzbl %al, %edx
movq %r15, %rdi
leaq 0x69e7c(%rip), %rsi     # 0x133236
movq %r12, %rcx
xorl %eax, %eax
callq 0xde896
movq 0x18(%r15), %rdi
movq (%rsp), %rsi
callq 0xe3eb4
movl %eax, %r14d
leal -0x1(%r14), %eax
cmpb $0x7, %al
ja 0xc93f7
movq (%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0xc9184
movq %rax, %r8
jmp 0xc93fa
xorl %r8d, %r8d
movzbl %r14b, %r14d
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq $0x270, %rbx            # imm = 0x270
je 0xc9484
movq 0x38(%rsp), %rbx
movl (%rbx), %eax
testb $0x1, %al
je 0xc9460
testb $0x2, %al
jne 0xc9428
cmpq $0x0, 0x10(%rbx)
jne 0xc9460
movq %r15, %rdi
testq %r14, %r14
je 0xc9449
leaq 0x4bcc0(%rip), %rsi     # 0x1150f7
movq %r12, %rdx
movq %r8, %rcx
xorl %eax, %eax
movq %r8, %r12
callq 0xde896
jmp 0xc945d
leaq 0x69dfe(%rip), %rsi     # 0x13324e
movq %r12, %rdx
xorl %eax, %eax
movq %r8, %r12
callq 0xde896
movq %r12, %r8
movq 0x10(%rbx), %rax
movq (%rsp), %rcx
testq %rax, %rax
je 0xc9484
movq %r15, %rdi
movq 0x30(%rsp), %rsi
movq %rbx, %rdx
movq %r8, %r9
movq %r14, %r8
callq *%rax
movq (%rsp), %rcx
addq %r14, %rcx
movq %rcx, (%rsp)
movq %r15, %rdi
pushq $-0x1
popq %r14
movl %r14d, %esi
callq 0xdeba7
movq (%rsp), %rbx
movq %r15, %rdi
movl %r14d, %esi
callq 0xdeba7
pushq $0x1
popq %r12
jmp 0xc930d
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0xdebb7
movq 0x40(%rsp), %rax
addq %rax, 0x10(%rsp)
jmp 0xc94d9
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0xdebb7
xorl %r12d, %r12d
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r14
movq 0x30(%rsp), %rax
decl 0x4(%rax)
movl 0x1c(%rsp), %esi
movq %r15, %rdi
callq 0xdebb7
movq 0x10(%rsp), %rax
subq %r14, %rax
movq %rax, (%rbx)
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq