// File: /workspace/github_c_makefile_star2_O3/TurkeyMcMac[P]ts3d/src/json.c
// Function: parse_value
static int parse_value(json_reader *reader, struct json_item *result)
{
	int ch;
	NEXT_CHAR(reader, ch, goto error_expected_value);
	switch (ch) {
	case '[':
		push_frame(reader, FRAME_LIST);
		reader->flags |= STARTED_COMPOUND;
		result->type = JSON_LIST;
		break;
	case '{':
		push_frame(reader, FRAME_MAP);
		reader->flags |= STARTED_COMPOUND;
		result->type = JSON_MAP;
		break;
	case '"':
		reexamine_char(reader);
		if (parse_string(reader, &result->val.str)) goto error;
		result->type = JSON_STRING;
		break;
	default:
		reexamine_char(reader);
		if (parse_token_value(reader, result)) goto error;
		break;
	}
	return 0;

error_expected_value:
	if (!has_error(reader)) set_error(reader, JSON_ERROR_EXPECTED_VALUE);
error:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x6056
testl %eax, %eax
js 0x5a1b
cmpl $0x22, %eax
je 0x5a51
cmpl $0x7b, %eax
je 0x5a36
cmpl $0x5b, %eax
jne 0x5a7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6098
orb $0x2, 0x59(%rbx)
movl $0x4, 0x10(%r14)
jmp 0x5a78
movl 0x58(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
jne 0x5e31
orl $0x12, %ecx
movl %ecx, 0x58(%rbx)
jmp 0x5e31
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6098
orb $0x2, 0x59(%rbx)
movl $0x2, 0x10(%r14)
jmp 0x5a78
decq 0x38(%rbx)
leaq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x5f0e
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x5e31
movl $0x6, 0x10(%r14)
xorl %eax, %eax
jmp 0x5e31
movq 0x38(%rbx), %rax
leaq -0x1(%rax), %rcx
movq %rcx, 0x38(%rbx)
movq 0x20(%rbx), %rcx
movzbl -0x1(%rcx,%rax), %eax
cmpl $0x66, %eax
je 0x5b1e
cmpl $0x6e, %eax
je 0x5ae4
cmpl $0x74, %eax
jne 0x5b6b
leaq 0xb(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x61e0
testq %rax, %rax
js 0x5e2c
cmpq $0x4, %rax
jb 0x5b58
cmpl $0x65757274, 0xb(%rsp)  # imm = 0x65757274
jne 0x5b58
movl $0x1, %eax
jmp 0x5d79
leaq 0xb(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x61e0
testq %rax, %rax
js 0x5e2c
cmpq $0x4, %rax
jb 0x5b58
cmpl $0x6c6c756e, 0xb(%rsp)  # imm = 0x6C6C756E
jne 0x5b58
movl $0x1, %eax
movl $0x10, %ecx
jmp 0x5d86
leaq 0xb(%rsp), %rsi
movl $0x5, %edx
movq %rbx, %rdi
callq 0x61e0
testq %rax, %rax
js 0x5e2c
cmpq $0x5, %rax
jb 0x5b58
movl $0x736c6166, %eax       # imm = 0x736C6166
xorl 0xb(%rsp), %eax
movzbl 0xf(%rsp), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
je 0x5d77
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5e2c
orl $0xb, %eax
jmp 0x5e29
movq %rbx, %rdi
callq 0x6056
movl $0xb, %r12d
testl %eax, %eax
js 0x5e1b
movl %eax, %r15d
cmpl $0x2d, %eax
jne 0x5ba6
movq %rbx, %rdi
callq 0x6056
testl %eax, %eax
js 0x5e1b
movl %eax, %r15d
movsd 0x6a2c(%rip), %xmm0     # 0xc5d0
jmp 0x5bae
movsd 0x655a(%rip), %xmm0     # 0xc108
movsd %xmm0, 0x20(%rsp)
cmpl $0x30, %r15d
jne 0x5bd2
movq %rbx, %rdi
callq 0x6056
movl %eax, %r15d
xorpd %xmm1, %xmm1
testl %eax, %eax
jns 0x5c26
jmp 0x5df2
leal -0x3a(%r15), %eax
cmpl $-0xa, %eax
jb 0x5e1b
xorpd %xmm1, %xmm1
movapd %xmm1, %xmm0
mulsd 0x69e9(%rip), %xmm0     # 0xc5d8
addl $-0x30, %r15d
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x6056
testl %eax, %eax
js 0x5d8f
movl %eax, %r15d
addl $-0x3a, %eax
cmpl $-0xb, %eax
movsd 0x10(%rsp), %xmm1
ja 0x5be3
cmpl $0x2e, %r15d
jne 0x5ccf
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x6056
movl %eax, %r15d
leal -0x3a(%r15), %eax
movl $0xa, %r12d
cmpl $-0xa, %eax
jb 0x5e1b
xorpd %xmm0, %xmm0
movl $0x1, %eax
movq %rax, %r12
mulsd 0x6970(%rip), %xmm0     # 0xc5d8
addl $-0x30, %r15d
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movq %rbx, %rdi
callq 0x6056
testl %eax, %eax
js 0x5d97
movl %eax, %r15d
movl %eax, %ecx
addl $-0x3a, %ecx
leaq 0x1(%r12), %rax
cmpl $-0xb, %ecx
movsd 0x18(%rsp), %xmm0
ja 0x5c5d
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
movsd 0x6922(%rip), %xmm0     # 0xc5d8
callq 0x24e0
movsd 0x18(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
andl $-0x21, %r15d
cmpl $0x45, %r15d
jne 0x5dee
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x6056
movl $0xa, %r12d
testl %eax, %eax
js 0x5e1b
movl %eax, %ebp
movl $0x1, %r15d
cmpl $0x2b, %eax
je 0x5d12
cmpl $0x2d, %ebp
jne 0x5d24
movq $-0x1, %r15
movq %rbx, %rdi
callq 0x6056
testl %eax, %eax
js 0x5e1b
movl %eax, %ebp
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x5dc2
xorl %r12d, %r12d
movabsq $0xccccccccccccccb, %r13 # imm = 0xCCCCCCCCCCCCCCB
movl %ebp, %eax
cmpq %r13, %r12
jg 0x5e15
leaq (%r12,%r12,4), %rcx
movl %eax, %eax
leaq (%rax,%rcx,2), %r12
movq %rbx, %rdi
callq 0x6056
testl %eax, %eax
js 0x5e40
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x5d3f
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
xorl %r12d, %r12d
jmp 0x5dcc
xorl %eax, %eax
movl $0x8, 0x10(%r14)
movl $0x18, %ecx
movl %eax, (%r14,%rcx)
jmp 0x5a78
movsd 0x10(%rsp), %xmm1
jmp 0x5df2
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
movsd 0x6831(%rip), %xmm0     # 0xc5d8
callq 0x24e0
movsd 0x18(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
jmp 0x5df2
xorpd %xmm1, %xmm1
movl $0xa, %r12d
addl %r15d, %r15d
leal (%r15,%r15,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x24e0
cmpl $0x9, %ebp
ja 0x5e1b
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
decq 0x38(%rbx)
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
movl $0x7, 0x10(%r14)
movsd %xmm0, 0x18(%r14)
cmpb $0x0, 0x58(%rbx)
jne 0x5e2c
jmp 0x5a78
movl $0xa, %r12d
decq 0x38(%rbx)
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5e2c
orl %r12d, %eax
movl %eax, 0x58(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl %r15d, %r15d
leal (%r15,%r15,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
callq 0x24e0
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
jmp 0x5df2