// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_btcl_frame_s_eval_number_literal
er_t x_btcl_frame_s_eval_number_literal( x_btcl_frame_s* o, x_source* source, sr_s* sr )
{
    // bcore_x_btcl.x:913:1
    BLM_INIT_LEVEL(0);
    bl_t is_hex = false;
    bl_t is_float = false;
    st_s st;BLM_T_INIT_SPUSH(st_s, &st);;
    
    if( x_source_parse_bl(source,"#?'0x'" ) )
    {
        st_s_push_sc(&(st),"0x" );
        is_hex = true;
    }
    else if( x_source_parse_bl(source,"#?'0X'" ) )
    {
        st_s_push_sc(&(st),"0X" );
        is_hex = true;
    }
    
    if( is_hex )
    {
        while( x_source_parse_bl(source,"#?(([0]>='0'&&[0]<='9')||([0]>='a'&&[0]<='f')||([0]>='A'&&[0]<='F'))" ) )
        {
            st_s_push_char(&(st),x_source_get_char(source) );
        }
    }
    else // decimal
    {
        while( x_source_parse_bl(source,"#?([0]>='0'&&[0]<='9')" ) ) st_s_push_char(&(st),x_source_get_char(source) );
    }
    
    if( !is_hex && x_source_parse_bl(source,"#?([0]=='.')" ) )
    {
        st_s_push_char(&(st),x_source_get_char(source) );
        while( x_source_parse_bl(source,"#?([0]>='0'&&[0]<='9')" ) ) st_s_push_char(&(st),x_source_get_char(source) );
        is_float = true;
    }
    
    bl_t exponent = false;
    
    if( !is_hex && x_source_parse_bl(source,"#?([0]=='e'||[0]=='E')" ) )
    {
        st_s_push_char(&(st),x_source_get_char(source) );
        exponent = true;
        is_float = true;
    }
    
    if( exponent )
    {
        if( x_source_parse_bl(source,"#?([0]=='+'||[0]=='-')" ) )
        {
            st_s_push_char(&(st),x_source_get_char(source) );
        }
    
        while( x_source_parse_bl(source,"#?([0]>='0'&&[0]<='9')" ) )
        {
            st_s_push_char(&(st),x_source_get_char(source) );
        }
    }
    
    f3_t factor = 1.0;
    bl_t use_suffix = true;
    
    char c = x_source_inspect_char(source);
    switch( c )
    {
        case 'd': factor = 1E-1;  break; // deci
        case 'c': factor = 1E-2;  break; // centi
        case 'm': factor = 1E-3;  break; // milli
        case 'u': factor = 1E-6;  break; // micro
        case 'n': factor = 1E-9;  break; // nano
        case 'p': factor = 1E-12; break; // pico
        case 'f': factor = 1E-15; break; // femto
        case 'a': factor = 1E-18; break; // atto
        case 'z': factor = 1E-21; break; // zepto
        case 'y': factor = 1E-24; break; // yocto
        case 'r': factor = 1E-27; break; // ronto
        case 'q': factor = 1E-30; break; // quecto
    
        case 'D': factor = 1E+1;  break; // deca
        case 'C': factor = 1E+2;  break; // cento
        case 'K': factor = 1E+3;  break; // kilo
        case 'M': factor = 1E+6;  break; // mega
        case 'G': factor = 1E+9;  break; // giga
        case 'T': factor = 1E+12; break; // tera
        case 'P': factor = 1E+15; break; // peta
        case 'X': factor = 1E+18; break; // exa
        case 'Z': factor = 1E+21; break; // zetta
        case 'Y': factor = 1E+24; break; // yotta
        case 'R': factor = 1E+27; break; // ronna
        case 'Q': factor = 1E+30; break; // quetta
    
        default: use_suffix = false; break;
    }
    
    if( use_suffix ) x_source_get_char(source);
    
    if( is_float )
    {
        f3_t f3 = 0;
        st_s_parse_fa(&(st),0, -1, "#<f3_t*>", (&(f3)) );
        sr_s_const_from_f3(sr,f3 * factor );
    }
    else
    {
        s3_t s3 = 0;
        st_s_parse_fa(&(st),0, -1, "#<s3_t*>", (&(s3)) );
        if( use_suffix )
        {
            sr_s_const_from_f3(sr,s3 * factor );
        }
        else
        {
            sr_s_const_from_s3(sr,s3 );
        }
    }
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0xdd15b(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x717f5
andq $0x0, 0x10(%r15)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x8e048
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %r15, %rdi
movq %r12, %rdx
callq 0x71998
leaq 0x72746(%rip), %rsi     # 0xad3f9
movq %r14, %rdi
callq 0x2ef75
testb %al, %al
je 0x3acc8
leaq 0x7273a(%rip), %rsi     # 0xad400
jmp 0x3ace6
leaq 0x72734(%rip), %rsi     # 0xad403
movq %r14, %rdi
callq 0x2ef75
testb %al, %al
je 0x3ade3
leaq 0x72724(%rip), %rsi     # 0xad40a
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8f392
leaq 0x72713(%rip), %r12     # 0xad40d
movq %r14, %rdi
movq %r12, %rsi
callq 0x2ef75
testb %al, %al
je 0x3ad1e
movq %r14, %rdi
callq 0x36ed6
movsbl %al, %esi
movq %r15, %rdi
callq 0x8f0ee
jmp 0x3acfa
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x36ebe
addb $-0x43, %al
movsd 0x799b6(%rip), %xmm0    # 0xb46e8
movsd %xmm0, (%rsp)
cmpb $0x37, %al
ja 0x3ad6c
movzbl %al, %eax
movabsq $0xc4ec0b40e2e513, %rcx # imm = 0xC4EC0B40E2E513
btq %rax, %rcx
jae 0x3ad6c
leaq 0x8553b(%rip), %rcx     # 0xc0290
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x36ed6
movb $0x1, %r15b
jmp 0x3ad6f
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
testb %bpl, %bpl
je 0x3ada4
andq $0x0, (%r14)
leaq 0x87c2b(%rip), %rcx     # 0xc29af
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
xorl %esi, %esi
movq %r14, %r8
xorl %eax, %eax
callq 0x91e11
movsd (%rsp), %xmm0
mulsd (%r14), %xmm0
jmp 0x3add9
andq $0x0, (%r14)
leaq 0x8fa17(%rip), %rcx     # 0xca7c6
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
xorl %esi, %esi
movq %r14, %r8
xorl %eax, %eax
callq 0x91e11
movq (%r14), %rsi
testb %r15b, %r15b
je 0x3ae13
cvtsi2sd %rsi, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x8d566
jmp 0x3ae1b
leaq 0x7a978(%rip), %r15     # 0xb5762
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2ef75
testb %al, %al
je 0x3ae34
movq %r14, %rdi
callq 0x36ed6
movsbl %al, %esi
movq %r12, %rdi
callq 0x8f0ee
jmp 0x3adef
movq %rbx, %rdi
callq 0x8d5c6
leaq 0x30(%rsp), %rdi
callq 0x71b64
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x72617(%rip), %rsi     # 0xad452
movq %r14, %rdi
callq 0x2ef75
movl %eax, %ebp
testb %al, %al
je 0x3ae77
leaq 0x10(%rsp), %r15
leaq 0x7a90d(%rip), %r12     # 0xb5762
movq %r14, %rdi
callq 0x36ed6
movsbl %al, %esi
movq %r15, %rdi
callq 0x8f0ee
movq %r14, %rdi
movq %r12, %rsi
callq 0x2ef75
testb %al, %al
jne 0x3ae55
leaq 0x725e1(%rip), %rsi     # 0xad45f
movq %r14, %rdi
callq 0x2ef75
testb %al, %al
je 0x3ad20
movq %r14, %rdi
callq 0x36ed6
movsbl %al, %esi
leaq 0x10(%rsp), %rdi
callq 0x8f0ee
leaq 0x725cc(%rip), %rsi     # 0xad476
movq %r14, %rdi
callq 0x2ef75
testb %al, %al
je 0x3aecb
movq %r14, %rdi
callq 0x36ed6
movsbl %al, %esi
leaq 0x10(%rsp), %rdi
callq 0x8f0ee
leaq 0x7a890(%rip), %rsi     # 0xb5762
movq %r14, %rdi
callq 0x2ef75
testb %al, %al
jne 0x3aeb6
movb $0x1, %bpl
jmp 0x3ad20