// File: /workspace/github_c_makefile_star2_O2/lengjingzju[P]json/json.c
// Function: json_get_number_value
int json_get_number_value(json_object *json, json_type_t type, void *value)
{
#define _get_number(json, etype, val) do {                                    \
    switch (json->type_member) {                                              \
    case JSON_BOOL:   *(etype *)val = (etype)json->value.vnum.vbool;   break; \
    case JSON_INT:    *(etype *)val = (etype)json->value.vnum.vint;    break; \
    case JSON_HEX:    *(etype *)val = (etype)json->value.vnum.vhex;    break; \
    case JSON_LINT:   *(etype *)val = (etype)json->value.vnum.vlint;   break; \
    case JSON_LHEX:   *(etype *)val = (etype)json->value.vnum.vlhex;   break; \
    case JSON_DOUBLE: *(etype *)val = (etype)json->value.vnum.vdbl;    break; \
    default: *(etype *)val = (etype)0; JsonErr("wrong type!\n");   return -1; \
    }                                                                         \
} while(0)

    switch (type) {
    case JSON_BOOL:   _get_number(json, bool, value);       break;
    case JSON_INT:    _get_number(json, int32_t, value);    break;
    case JSON_HEX:    _get_number(json, uint32_t, value);   break;
    case JSON_LINT:   _get_number(json, int64_t, value);    break;
    case JSON_LHEX:   _get_number(json, uint64_t, value);   break;
    case JSON_DOUBLE: _get_number(json, double, value);     break;
    default:          JsonErr("wrong type!\n");         return -1;
    }

    return json->type_member == type ? 0 : json->type_member;
}

// Assembly:
pushq %rax
leal -0x1(%rsi), %eax
cmpl $0x5, %eax
ja 0x2980
leaq 0x7829(%rip), %rcx      # 0xa078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2aaa
leaq 0x7898(%rip), %rcx      # 0xa108
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x18(%rdi)
jmp 0x29d3
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2a0e
leaq 0x780e(%rip), %rcx      # 0xa0a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x18(%rdi), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x77b8(%rip), %xmm0     # 0xa070
cvttsd2si %xmm0, %r8
sarq $0x3f, %rcx
andq %rcx, %r8
orq %rax, %r8
movq %r8, (%rdx)
jmp 0x2ae9
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2a37
leaq 0x77f1(%rip), %rcx      # 0xa0d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvttsd2si 0x18(%rdi), %rax
movl %eax, (%rdx)
jmp 0x2ae9
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2a68
leaq 0x77ab(%rip), %rcx      # 0xa0c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rdi), %rax
jmp 0x2a58
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2ac5
leaq 0x77b1(%rip), %rcx      # 0xa0f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%rdi), %eax
movl %eax, (%rdx)
jmp 0x2ae9
movl 0x8(%rdi), %eax
andl $0xf, %eax
decl %eax
cmpl $0x5, %eax
ja 0x2af8
leaq 0x7726(%rip), %rcx      # 0xa090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x18(%rdi), %eax
cvtsi2sd %eax, %xmm0
jmp 0x2ae5
leaq 0x7919(%rip), %rdi      # 0xa2a0
leaq 0x7924(%rip), %rsi      # 0xa2b2
movl $0x1f0, %edx            # imm = 0x1F0
xorl %eax, %eax
callq 0x2100
leaq 0x7d37(%rip), %rdi      # 0xa6d8
callq 0x2080
pushq $-0x1
popq %rax
jmp 0x2af6
movl 0x18(%rdi), %eax
jmp 0x2a58
movzbl 0x18(%rdi), %eax
jmp 0x294b
movzbl 0x18(%rdi), %eax
jmp 0x2a58
movslq 0x18(%rdi), %rax
jmp 0x2a58
cmpq $0x0, 0x18(%rdi)
setne (%rdx)
jmp 0x2ae9
movb 0x18(%rdi), %al
movb %al, (%rdx)
jmp 0x2ae9
movsd 0x18(%rdi), %xmm0
unpcklps 0x764f(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7657(%rip), %xmm0     # 0xa050
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd %xmm1, (%rdx)
jmp 0x2ae9
andq $0x0, (%rdx)
leaq 0x7887(%rip), %rdi      # 0xa2a0
leaq 0x7892(%rip), %rsi      # 0xa2b2
movl $0x1ee, %edx            # imm = 0x1EE
jmp 0x2993
movl 0x18(%rdi), %eax
cvtsi2sd %rax, %xmm0
jmp 0x2ae5
andl $0x0, (%rdx)
leaq 0x785f(%rip), %rdi      # 0xa2a0
leaq 0x786a(%rip), %rsi      # 0xa2b2
movl $0x1ec, %edx            # imm = 0x1EC
jmp 0x2993
cvttsd2si 0x18(%rdi), %rax
movq %rax, (%rdx)
jmp 0x2ae9
cvtsi2sdq 0x18(%rdi), %xmm0
jmp 0x2ae5
andq $0x0, (%rdx)
leaq 0x782d(%rip), %rdi      # 0xa2a0
leaq 0x7838(%rip), %rsi      # 0xa2b2
movl $0x1ed, %edx            # imm = 0x1ED
jmp 0x2993
xorpd %xmm0, %xmm0
ucomisd 0x18(%rdi), %xmm0
setp %al
setne %cl
orb %al, %cl
movb %cl, (%rdx)
jmp 0x2ae9
cvttsd2si 0x18(%rdi), %eax
jmp 0x294b
cvtsi2sdl 0x18(%rdi), %xmm0
jmp 0x2ae5
movb $0x0, (%rdx)
leaq 0x77ec(%rip), %rdi      # 0xa2a0
leaq 0x77f7(%rip), %rsi      # 0xa2b2
movl $0x1ea, %edx            # imm = 0x1EA
jmp 0x2993
andl $0x0, (%rdx)
leaq 0x77d1(%rip), %rdi      # 0xa2a0
leaq 0x77dc(%rip), %rsi      # 0xa2b2
movl $0x1eb, %edx            # imm = 0x1EB
jmp 0x2993
movsd 0x18(%rdi), %xmm0
movsd %xmm0, (%rdx)
movl 0x8(%rdi), %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl %esi, %ecx
cmovnel %ecx, %eax
popq %rcx
retq
andq $0x0, (%rdx)
leaq 0x779d(%rip), %rdi      # 0xa2a0
leaq 0x77a8(%rip), %rsi      # 0xa2b2
movl $0x1ef, %edx            # imm = 0x1EF
jmp 0x2993