// File: /workspace/github_c_makefile_star2_O2/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 0x5bea
testl %eax, %eax
js 0x562a
cmpl $0x22, %eax
je 0x565c
cmpl $0x7b, %eax
je 0x5643
cmpl $0x5b, %eax
jne 0x5683
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5c2d
orb $0x2, 0x59(%rbx)
movl $0x4, 0x10(%r14)
jmp 0x567c
movl 0x58(%rbx), %ecx
pushq $-0x1
popq %rax
testb %cl, %cl
jne 0x5a04
orl $0x12, %ecx
movl %ecx, 0x58(%rbx)
jmp 0x5a04
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5c2d
orb $0x2, 0x59(%rbx)
movl $0x2, 0x10(%r14)
jmp 0x567c
decq 0x38(%rbx)
leaq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x5ab8
testl %eax, %eax
jne 0x5a01
movl $0x6, 0x10(%r14)
xorl %eax, %eax
jmp 0x5a04
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 0x5713
cmpl $0x6e, %eax
je 0x56e0
cmpl $0x74, %eax
jne 0x5761
leaq 0xb(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x5d6f
testq %rax, %rax
js 0x5a01
cmpq $0x4, %rax
jb 0x574e
cmpl $0x65757274, 0xb(%rsp)  # imm = 0x65757274
jne 0x574e
pushq $0x1
popq %rax
jmp 0x5960
leaq 0xb(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x5d6f
testq %rax, %rax
js 0x5a01
cmpq $0x4, %rax
jb 0x574e
cmpl $0x6c6c756e, 0xb(%rsp)  # imm = 0x6C6C756E
jne 0x574e
pushq $0x1
popq %rax
pushq $0x10
jmp 0x596a
leaq 0xb(%rsp), %rsi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x5d6f
testq %rax, %rax
js 0x5a01
cmpq $0x5, %rax
jb 0x574e
leaq 0x5e9c(%rip), %rsi      # 0xb5d5
leaq 0xb(%rsp), %rdi
pushq $0x5
popq %rdx
callq 0x2290
testl %eax, %eax
je 0x595e
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5a01
orl $0xb, %eax
jmp 0x59fe
movq %rbx, %rdi
callq 0x5bea
pushq $0xb
popq %rbp
testl %eax, %eax
js 0x59f1
movl %eax, %r15d
cmpl $0x2d, %eax
jne 0x5799
movq %rbx, %rdi
callq 0x5bea
testl %eax, %eax
js 0x59f1
movl %eax, %r15d
movsd 0x5e09(%rip), %xmm0     # 0xb5a0
jmp 0x57a1
movsd 0x594f(%rip), %xmm0     # 0xb0f0
movsd %xmm0, 0x20(%rsp)
cmpl $0x30, %r15d
jne 0x57c5
movq %rbx, %rdi
callq 0x5bea
movl %eax, %r15d
xorpd %xmm1, %xmm1
testl %eax, %eax
jns 0x5816
jmp 0x59cb
leal -0x3a(%r15), %eax
cmpl $-0xa, %eax
jb 0x59f1
xorpd %xmm1, %xmm1
movapd %xmm1, %xmm0
mulsd 0x5dc6(%rip), %xmm0     # 0xb5a8
addl $-0x30, %r15d
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x5bea
testl %eax, %eax
js 0x5974
movl %eax, %r15d
addl $-0x3a, %eax
cmpl $-0xb, %eax
movsd 0x10(%rsp), %xmm1
ja 0x57d6
pushq $0xa
popq %rbp
cmpl $0x2e, %r15d
jne 0x58b1
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x5bea
movl %eax, %r15d
leal -0x3a(%r15), %eax
cmpl $-0xa, %eax
jb 0x59f1
xorpd %xmm0, %xmm0
pushq $0x1
popq %r12
mulsd 0x5d57(%rip), %xmm0     # 0xb5a8
addl $-0x30, %r15d
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movq %rbx, %rdi
callq 0x5bea
testl %eax, %eax
js 0x597c
movl %eax, %r15d
addl $-0x3a, %eax
incq %r12
cmpl $-0xb, %eax
movsd 0x18(%rsp), %xmm0
ja 0x5849
decq %r12
cvtsi2sd %r12, %xmm1
movsd 0x5d10(%rip), %xmm0     # 0xb5a8
callq 0x24f0
movsd 0x18(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
andl $-0x21, %r15d
cmpl $0x45, %r15d
jne 0x59c7
movsd %xmm1, 0x10(%rsp)
movq %rbx, %rdi
callq 0x5bea
testl %eax, %eax
js 0x59f1
pushq $0x1
popq %r15
cmpl $0x2b, %eax
je 0x58e7
cmpl $0x2d, %eax
jne 0x58f7
pushq $-0x1
popq %r15
movq %rbx, %rdi
callq 0x5bea
testl %eax, %eax
js 0x59f1
movq %r15, 0x18(%rsp)
pushq $0xa
popq %rbp
xorl %r15d, %r15d
movabsq $0xccccccccccccccb, %r12 # imm = 0xCCCCCCCCCCCCCCB
xorl %r13d, %r13d
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x59a4
cmpq %r12, %r13
jg 0x59ee
imulq $0xa, %r13, %rcx
movl %eax, %r13d
addq %rcx, %r13
movq %rbx, %rdi
callq 0x5bea
xorl %ebp, %ebp
movb $0x1, %r15b
testl %eax, %eax
jns 0x590f
imull $0xa, 0x18(%rsp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %r13, %xmm1
callq 0x24f0
movsd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm1
jmp 0x59cb
xorl %eax, %eax
movl $0x8, 0x10(%r14)
pushq $0x18
popq %rcx
movl %eax, (%r14,%rcx)
jmp 0x567c
movsd 0x10(%rsp), %xmm1
jmp 0x59cb
cvtsi2sd %r12, %xmm1
movsd 0x5c1f(%rip), %xmm0     # 0xb5a8
callq 0x24f0
movsd 0x18(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
addsd %xmm2, %xmm1
jmp 0x59cb
imull $0xa, 0x18(%rsp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %r13, %xmm1
callq 0x24f0
testb $0x1, %r15b
je 0x59f1
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 0x5a01
jmp 0x567c
pushq $0xa
popq %rbp
decq 0x38(%rbx)
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5a01
orl %ebp, %eax
movl %eax, 0x58(%rbx)
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq