// File: /workspace/github_c_makefile_star2_O0/TurkeyMcMac[P]ts3d/src/json.c
// Function: push_frame
static int push_frame(json_reader *reader, int frame)
{
	if (reader->flags & SMALL_STACK) {
		/* Temporary stack holding buffer: */
		char tmp[sizeof(reader->stack.small.frames)];
		if (reader->stack.small.size >= sizeof(tmp)) {
			/* The small stack must be embiggened. */
			memcpy(tmp, reader->stack.small.frames, sizeof(tmp));
			size_t size = sizeof(tmp) + 1;
			if (!(reader->stack.big.frames = reader->alloc(size))) {
				/* Failure to allocate; revert and report. */
				memcpy(reader->stack.small.frames, tmp,
					sizeof(tmp));
				reader->stack.small.size = sizeof(tmp);
				set_error(reader, JSON_ERROR_MEMORY);
				return -1;
			}
			memcpy(reader->stack.big.frames, tmp, sizeof(tmp));
			reader->stack.big.frames[size - 1] = frame;
			reader->stack.big.cap = size;
			reader->stack.big.size = size;
			reader->flags &= ~SMALL_STACK;
		} else {
			reader->stack.small.frames[reader->stack.small.size++] =
				frame;
		}
		return 0;
	} else {
		return push_byte(reader, &reader->stack.big.frames,
			&reader->stack.big.size, &reader->stack.big.cap, frame);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x58(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x85e3
movq -0x10(%rbp), %rax
movzbl 0x57(%rax), %eax
cmpq $0x17, %rax
jb 0x85b8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x48(%rax), %rcx
movq %rcx, -0x28(%rbp)
movl 0x50(%rax), %ecx
movl %ecx, -0x20(%rbp)
movw 0x54(%rax), %cx
movw %cx, -0x1c(%rbp)
movb 0x56(%rax), %al
movb %al, -0x1a(%rbp)
movq $0x18, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x40(%rcx)
cmpq $0x0, %rax
jne 0x854b
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x48(%rax)
movl -0x20(%rbp), %ecx
movl %ecx, 0x50(%rax)
movw -0x1c(%rbp), %cx
movw %cx, 0x54(%rax)
movb -0x1a(%rbp), %cl
movb %cl, 0x56(%rax)
movq -0x10(%rbp), %rax
movb $0x17, 0x57(%rax)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x7d30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8613
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movl %ecx, 0x10(%rax)
movw -0x1c(%rbp), %cx
movw %cx, 0x14(%rax)
movb -0x1a(%rbp), %cl
movb %cl, 0x16(%rax)
movl -0x14(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x58(%rax), %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
movl %ecx, 0x58(%rax)
jmp 0x85da
movl -0x14(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movb 0x57(%rsi), %cl
movb %cl, %dil
addb $0x1, %dil
movb %dil, 0x57(%rsi)
movzbl %cl, %ecx
movb %dl, 0x40(%rax,%rcx)
movl $0x0, -0x4(%rbp)
jmp 0x8613
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movq -0x10(%rbp), %rdx
addq $0x40, %rdx
addq $0x8, %rdx
movq -0x10(%rbp), %rcx
addq $0x40, %rcx
addq $0x10, %rcx
movl -0x14(%rbp), %r8d
callq 0x87d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)