// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
leaq 0x18(%rsp), %rsi
callq 0xe958c
movl 0x4(%r13), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%r13)
cmpl $0x7, %eax
jg 0xd2db1
movq %r12, 0x20(%rsp)
movq %r14, 0x28(%rsp)
leaq 0x8(%rsp), %rbx
movq (%rbx), %rdx
leaq 0x6d625(%rip), %rsi     # 0x14014c
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0xef14d
movl %eax, %ebp
movzbl %al, %edx
leaq 0x59313(%rip), %rcx     # 0x12be69
cmpb $0x3, %dl
ja 0xd2b6b
movl %edx, %eax
leaq 0x6d5a0(%rip), %rsi     # 0x140104
movslq (%rsi,%rax,4), %rcx
addq %rsi, %rcx
movq %r13, 0x10(%rsp)
leaq 0x6d5e8(%rip), %rsi     # 0x14015f
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9226
leaq 0x8(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xd2a5c
movq %rax, %r14
leaq 0x5fcb0(%rip), %rsi     # 0x13284b
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe9226
movq (%rbx), %rbx
leaq 0x1c(%rsp), %rsi
movq %r15, %rdi
callq 0xe958c
leaq 0x6d5b3(%rip), %rsi     # 0x140172
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0xe9226
movq %r14, 0x30(%rsp)
movq %r14, %rdx
addq %rbx, %rdx
leaq 0xba2af(%rip), %r14     # 0x18ce90
movq %rdx, 0x38(%rsp)
movl $0x3, %eax
cmpq %rdx, %rbx
jge 0xd2d68
movq 0x18(%r15), %rcx
movl $0x4, %eax
cmpq 0x18(%rcx), %rbx
jge 0xd2d68
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq %rbx, (%rsp)
movq %r15, %rdi
leaq 0x6d56c(%rip), %rsi     # 0x14018e
movq %rbx, %rdx
xorl %eax, %eax
callq 0xe9226
movq %r15, %rdi
movl $0x1, %esi
callq 0xe9585
movq 0x18(%r15), %rdi
movq %rsp, %rsi
callq 0xef14d
xorl %ebx, %ebx
cmpb %al, 0x5(%rbx,%r14)
jne 0xd2c55
cmpb %bpl, 0x4(%rbx,%r14)
je 0xd2c66
addq $0x18, %rbx
cmpq $0x270, %rbx            # imm = 0x270
jne 0xd2c47
xorl %ebx, %ebx
jmp 0xd2c69
addq %r14, %rbx
testq %rbx, %rbx
je 0xd2c77
movq 0x8(%rbx), %r13
testq %r13, %r13
jne 0xd2c7e
leaq 0x591eb(%rip), %r13     # 0x12be69
movzbl %al, %edx
movq %r15, %rdi
leaq 0x6d51b(%rip), %rsi     # 0x1401a6
movq %r13, %rcx
xorl %eax, %eax
callq 0xe9226
movq 0x18(%r15), %rdi
movq (%rsp), %rsi
callq 0xef0d5
movl %eax, %r12d
leal -0x1(%r12), %eax
cmpb $0x7, %al
ja 0xd2cc9
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0xd2a5c
movq %rax, %r9
jmp 0xd2ccc
xorl %r9d, %r9d
movzbl %r12b, %r12d
incq (%rsp)
testq %rbx, %rbx
je 0xd2d3f
movl (%rbx), %eax
testb $0x1, %al
je 0xd2d22
testb $0x2, %al
jne 0xd2cea
cmpq $0x0, 0x10(%rbx)
jne 0xd2d22
movq %r15, %rdi
testq %r12, %r12
je 0xd2d0b
leaq 0x4f3b6(%rip), %rsi     # 0x1220af
movq %r13, %rdx
movq %r9, %rcx
xorl %eax, %eax
movq %r9, %r13
callq 0xe9226
jmp 0xd2d1f
leaq 0x6d4ac(%rip), %rsi     # 0x1401be
movq %r13, %rdx
xorl %eax, %eax
movq %r9, %r13
callq 0xe9226
movq %r13, %r9
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xd2d3f
movq (%rsp), %rcx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r12, %r8
callq *%rax
addq %r12, (%rsp)
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
movq (%rsp), %rbx
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe9585
xorl %eax, %eax
movq 0x38(%rsp), %rdx
testl %eax, %eax
je 0xd2be6
cmpl $0x4, %eax
je 0xd2d8d
cmpl $0x3, %eax
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %r12
movq 0x10(%rsp), %r13
jne 0xd2dac
xorl %ebx, %ebx
jmp 0xd2d9e
movb $0x1, %bl
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %r12
movq 0x10(%rsp), %r13
movl 0x1c(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
jmp 0xd2dac
testb $0x1, %bl
je 0xd2db5
xorl %ebx, %ebx
jmp 0xd2dc4
movq 0x30(%rsp), %rax
addq %rax, 0x8(%rsp)
movl $0x1, %ebx
decl 0x4(%r13)
movl 0x18(%rsp), %esi
movq %r15, %rdi
callq 0xe9595
movq 0x8(%rsp), %rax
subq %r12, %rax
movq %rax, (%r14)
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq