// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/runt.c
// Function: hex2flt
static runt_float hex2flt(runt_vm *vm, const char *str, runt_uint pos, int size)
{
    runt_uint i;
    runt_uint sz;
    const char *p;
    runt_float val;
    runt_int b;
    runt_int m;

    sz = size - 2;
    p = str + 2 + pos;
    val = 0;
    m = 1 << ((sz - 1) * 4);
    for(i = 0; i < sz; i++) {
        b = 0;
        switch(p[i]) {
            case ' ':
            case '0':
                b = 0;
                break;
            case '1':
                b = 1;
                break;
            case '2':
                b = 2;
                break;
            case '3':
                b = 3;
                break;
            case '4':
                b = 4;
                break;
            case '5':
                b = 5;
                break;
            case '6':
                b = 6;
                break;
            case '7':
                b = 7;
                break;
            case '8':
                b = 8;
                break;
            case '9':
                b = 9;
                break;
            case 'a':
                b = 10;
                break;
            case 'b':
                b = 11;
                break;
            case 'c':
                b = 12;
                break;
            case 'd':
                b = 13;
                break;
            case 'e':
                b = 14;
                break;
            case 'f':
                b = 15;
                break;
        }
        val += m * b;
        m >>= 4;
    }
    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x18(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
shll $0x2, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x4360
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x46, %eax
ja 0x4334
movq -0x40(%rbp), %rax
leaq 0x4f26(%rip), %rcx      # 0x91c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x30(%rbp)
jmp 0x4334
movl $0x1, -0x30(%rbp)
jmp 0x4334
movl $0x2, -0x30(%rbp)
jmp 0x4334
movl $0x3, -0x30(%rbp)
jmp 0x4334
movl $0x4, -0x30(%rbp)
jmp 0x4334
movl $0x5, -0x30(%rbp)
jmp 0x4334
movl $0x6, -0x30(%rbp)
jmp 0x4334
movl $0x7, -0x30(%rbp)
jmp 0x4334
movl $0x8, -0x30(%rbp)
jmp 0x4334
movl $0x9, -0x30(%rbp)
jmp 0x4334
movl $0xa, -0x30(%rbp)
jmp 0x4334
movl $0xb, -0x30(%rbp)
jmp 0x4334
movl $0xc, -0x30(%rbp)
jmp 0x4334
movl $0xd, -0x30(%rbp)
jmp 0x4334
movl $0xe, -0x30(%rbp)
jmp 0x4334
movl $0xf, -0x30(%rbp)
movl -0x34(%rbp), %eax
imull -0x30(%rbp), %eax
cvtsi2ss %eax, %xmm0
addss -0x2c(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0x34(%rbp), %eax
sarl $0x4, %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x425f
movss -0x2c(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)