// File: /workspace/github_c_makefile_star2_O1/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 0x6099
testl %eax, %eax
js 0x5a10
cmpl $0x22, %eax
je 0x5a46
cmpl $0x7b, %eax
je 0x5a2b
cmpl $0x5b, %eax
jne 0x5a74
movq %rbx, %rdi
movl $0x1, %esi
callq 0x60df
orb $0x2, 0x59(%rbx)
movl $0x4, 0x10(%r14)
jmp 0x5a6d
movl 0x58(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
jne 0x5e30
orl $0x12, %ecx
movl %ecx, 0x58(%rbx)
jmp 0x5e30
movq %rbx, %rdi
movl $0x2, %esi
callq 0x60df
orb $0x2, 0x59(%rbx)
movl $0x2, 0x10(%r14)
jmp 0x5a6d
decq 0x38(%rbx)
leaq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x5f45
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x5e30
movl $0x6, 0x10(%r14)
xorl %eax, %eax
jmp 0x5e30
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 0x5b13
cmpl $0x6e, %eax
je 0x5ad9
cmpl $0x74, %eax
jne 0x5b60
leaq 0x13(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x6230
testq %rax, %rax
js 0x5e2b
cmpq $0x4, %rax
jl 0x5b4d
cmpl $0x65757274, 0x13(%rsp) # imm = 0x65757274
jne 0x5b4d
movl $0x1, %eax
jmp 0x5cac
leaq 0x13(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x6230
testq %rax, %rax
js 0x5e2b
cmpq $0x4, %rax
jl 0x5b4d
cmpl $0x6c6c756e, 0x13(%rsp) # imm = 0x6C6C756E
jne 0x5b4d
movl $0x1, %eax
movl $0x10, %ecx
jmp 0x5cb9
leaq 0x13(%rsp), %rsi
movl $0x5, %edx
movq %rbx, %rdi
callq 0x6230
testq %rax, %rax
js 0x5e2b
cmpq $0x5, %rax
jl 0x5b4d
movl $0x736c6166, %eax       # imm = 0x736C6166
xorl 0x13(%rsp), %eax
movzbl 0x17(%rsp), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
je 0x5caa
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5e2b
orl $0xb, %eax
jmp 0x5e28
movq %rbx, %rdi
callq 0x6099
movl $0xb, %ebp
testl %eax, %eax
js 0x5e1b
movl %eax, %r15d
cmpl $0x2d, %eax
jne 0x5b9a
movq %rbx, %rdi
callq 0x6099
testl %eax, %eax
js 0x5e1b
movl %eax, %r15d
movsd 0x69c8(%rip), %xmm0     # 0xc560
jmp 0x5ba2
movsd 0x649e(%rip), %xmm0     # 0xc040
cmpl $0x30, %r15d
jne 0x5bc6
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
callq 0x6099
movl %eax, %r15d
xorpd %xmm1, %xmm1
testl %eax, %eax
jns 0x5c20
jmp 0x5e43
leal -0x3a(%r15), %eax
cmpl $-0xa, %eax
jb 0x5e1b
movsd %xmm0, 0x18(%rsp)
xorpd %xmm1, %xmm1
movapd %xmm1, %xmm0
mulsd 0x697f(%rip), %xmm0     # 0xc568
addl $-0x30, %r15d
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x6099
testl %eax, %eax
js 0x5cc2
movl %eax, %r15d
addl $-0x3a, %eax
cmpl $-0xb, %eax
movsd 0x8(%rsp), %xmm1
ja 0x5bdd
xorl %ebp, %ebp
cmpl $0x2e, %r15d
jne 0x5d2f
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x6099
movl $0x4, %r12d
movl $0xa, %ebp
testl %eax, %eax
js 0x5ccd
movl %eax, %r15d
addl $-0x3a, %eax
cmpl $-0xa, %eax
jb 0x5cd3
xorpd %xmm0, %xmm0
movl $0x1, %eax
movq %rax, %r13
mulsd 0x68fc(%rip), %xmm0     # 0xc568
addl $-0x30, %r15d
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movq %rbx, %rdi
callq 0x6099
testl %eax, %eax
js 0x5cdb
movl %eax, %r15d
movl %eax, %ecx
addl $-0x3a, %ecx
leaq 0x1(%r13), %rax
cmpl $-0xb, %ecx
movsd 0x20(%rsp), %xmm0
ja 0x5c61
xorl %r12d, %r12d
jmp 0x5ce7
xorl %eax, %eax
movl $0x8, 0x10(%r14)
movl $0x18, %ecx
movl %eax, (%r14,%rcx)
jmp 0x5a6d
movsd 0x8(%rsp), %xmm1
jmp 0x5e43
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movsd 0x8(%rsp), %xmm1
jmp 0x5d12
movl $0x9, %r12d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
movsd 0x6871(%rip), %xmm0     # 0xc568
callq 0x24e0
movsd 0x20(%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm1
addsd %xmm2, %xmm1
xorl %ebp, %ebp
cmpl $0x9, %r12d
je 0x5e43
cmpl $0x4, %r12d
je 0x5e1b
testl %r12d, %r12d
jne 0x5e62
andl $-0x21, %r15d
cmpl $0x45, %r15d
jne 0x5e17
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x6099
movl $0x4, %r15d
movl $0xa, %ebp
testl %eax, %eax
js 0x5e00
movl $0x1, %r12d
cmpl $0x2b, %eax
je 0x5d75
cmpl $0x2d, %eax
jne 0x5d81
movq $-0x1, %r12
movq %rbx, %rdi
callq 0x6099
testl %eax, %eax
js 0x5e00
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x5d94
xorpd %xmm1, %xmm1
movl $0xa, %ebp
jmp 0x5dd9
xorl %r13d, %r13d
movabsq $0xccccccccccccccb, %rbp # imm = 0xCCCCCCCCCCCCCCB
cmpq %rbp, %r13
jg 0x5dfb
leaq (,%r13,4), %rcx
addq %r13, %rcx
movl %eax, %eax
leaq (%rax,%rcx,2), %r13
movq %rbx, %rdi
callq 0x6099
testl %eax, %eax
js 0x5e6c
addl $-0x30, %eax
cmpl $0x9, %eax
jbe 0x5da1
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
xorl %ebp, %ebp
addl %r12d, %r12d
leal (%r12,%r12,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x24e0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
xorl %r15d, %r15d
jmp 0x5e06
movl $0xa, %ebp
movsd 0x8(%rsp), %xmm1
cmpl $0x9, %r15d
je 0x5e43
cmpl $0x4, %r15d
je 0x5e1b
testl %r15d, %r15d
jne 0x5e62
testl %ebp, %ebp
je 0x5e3f
decq 0x38(%rbx)
movl 0x58(%rbx), %eax
testb %al, %al
jne 0x5e2b
orl %ebp, %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
decq 0x38(%rbx)
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movl $0x7, 0x10(%r14)
movsd %xmm0, 0x18(%r14)
cmpb $0x0, 0x58(%rbx)
sete %al
testb $0x1, %al
jne 0x5a6d
jmp 0x5e2b
addl %r12d, %r12d
leal (%r12,%r12,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
callq 0x24e0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movl $0x9, %r15d
xorl %ebp, %ebp
jmp 0x5e06