// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, 0x10(%rsp)
leaq 0x1c(%rsp), %rsi
callq 0xe8a1c
movl 0x4(%rbx), %eax
leal 0x1(%rax), %ecx
movq %rbx, 0x38(%rsp)
movl %ecx, 0x4(%rbx)
xorl %ebx, %ebx
cmpl $0x7, %eax
jg 0xd2131
leaq 0x6e6c3(%rip), %rsi     # 0x14054c
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rdi
leaq 0x10(%rsp), %rsi
callq 0xeeb4b
movl %eax, %ebp
movzbl %al, %edx
cmpb $0x3, %dl
movq %r14, 0x28(%rsp)
movq %r12, 0x20(%rsp)
ja 0xd1ed7
movl %edx, %eax
leaq 0x6e636(%rip), %rsi     # 0x140504
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
jmp 0xd1ede
leaq 0x5a273(%rip), %rcx     # 0x12c151
leaq 0x6e67a(%rip), %rsi     # 0x14055f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe8617
leaq 0x10(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xd1dcb
movq %rax, %r14
leaq 0x60cda(%rip), %rsi     # 0x132be3
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe8617
movq (%rbx), %rbx
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0xe8a1c
leaq 0x6e645(%rip), %rsi     # 0x140572
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq %r14, 0x30(%rsp)
testq %r14, %r14
jle 0xd20fc
movq 0x30(%rsp), %rax
addq %rbx, %rax
movq %rax, 0x48(%rsp)
leaq 0xbaf31(%rip), %r12     # 0x18ce90
movq 0x18(%r15), %rax
cmpq 0x18(%rax), %rbx
jge 0xd2119
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq %rbx, (%rsp)
movq %r15, %rdi
leaq 0x6e606(%rip), %rsi     # 0x14058e
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x18(%r15), %rdi
movq %rsp, %rsi
callq 0xeeb4b
xorl %ecx, %ecx
cmpb %al, 0x5(%rcx,%r12)
jne 0xd1fbb
cmpb %bpl, 0x4(%rcx,%r12)
je 0xd1fdc
addq $0x18, %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0xd1fad
movb $0x1, %bl
movq $0x0, 0x40(%rsp)
leaq 0x5a177(%rip), %r14     # 0x12c151
jmp 0xd1ffa
leaq (%r12,%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%rcx,%r12), %r14
testq %r14, %r14
leaq 0x5a15d(%rip), %rcx     # 0x12c151
cmoveq %rcx, %r14
xorl %ebx, %ebx
movzbl %al, %edx
movq %r15, %rdi
leaq 0x6e59f(%rip), %rsi     # 0x1405a6
movq %r14, %rcx
xorl %eax, %eax
callq 0xe8617
movq 0x18(%r15), %rdi
movq (%rsp), %rsi
callq 0xeead3
movl %eax, %r13d
leal -0x1(%r13), %eax
cmpb $0x7, %al
ja 0xd2044
movq (%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0xd1dcb
movq %rax, %r8
jmp 0xd2047
xorl %r8d, %r8d
movzbl %r13b, %r13d
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
testb %bl, %bl
jne 0xd20cc
movq 0x40(%rsp), %rbx
movl (%rbx), %eax
testb $0x1, %al
je 0xd20a8
testb $0x2, %al
jne 0xd2070
cmpq $0x0, 0x10(%rbx)
jne 0xd20a8
movq %r15, %rdi
testq %r13, %r13
je 0xd2091
leaq 0x50238(%rip), %rsi     # 0x1222b7
movq %r14, %rdx
movq %r8, %rcx
xorl %eax, %eax
movq %r8, %r14
callq 0xe8617
jmp 0xd20a5
leaq 0x6e526(%rip), %rsi     # 0x1405be
movq %r14, %rdx
xorl %eax, %eax
movq %r8, %r14
callq 0xe8617
movq %r14, %r8
movq 0x10(%rbx), %rax
movq (%rsp), %rcx
testq %rax, %rax
je 0xd20cc
movq %r15, %rdi
movq 0x38(%rsp), %rsi
movq %rbx, %rdx
movq %r8, %r9
movq %r13, %r8
callq *%rax
movq (%rsp), %rcx
addq %r13, %rcx
movq %rcx, (%rsp)
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq (%rsp), %rbx
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
cmpq 0x48(%rsp), %rbx
jl 0xd1f5f
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0xe8a25
movq 0x30(%rsp), %rax
addq %rax, 0x10(%rsp)
movl $0x1, %ebx
jmp 0xd2127
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0xe8a25
xorl %ebx, %ebx
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %r12
movq 0x38(%rsp), %rax
decl 0x4(%rax)
movl 0x1c(%rsp), %esi
movq %r15, %rdi
callq 0xe8a25
movq 0x10(%rsp), %rax
subq %r12, %rax
movq %rax, (%r14)
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq