// File: /workspace/github_cpp_makefile_star2_O1/philpoore[P]Math/./src/Interp.cpp
// Function: Interp::eval(AstExpr*)
double Interp::eval(AstExpr* expr) {
    switch (expr->type) {
        case AST_TYPE_NUMBER:
            return ((AstNumber*)expr)->value;
        case AST_TYPE_IDENT:
            return evalIdent((AstIdent*)expr);
        case AST_TYPE_BIN_OP:
            return evalBinOp((AstBinaryOp*)expr);
        case AST_TYPE_FUNCTION_CALL:
            return evalFunctionCall((AstFunctionCall*)expr);
        default:
            error(string("Unknown expression type: ") + to_string(expr->type));
            return 0.0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl (%rsi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x72b2
leaq 0x5e5d(%rip), %rcx      # 0xd0b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x8(%rbx), %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7466
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x74ce
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7126
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x604c(%rip), %rsi      # 0xd30e
leaq 0x605e(%rip), %rdx      # 0xd327
leaq -0x88(%rbp), %rdi
callq 0xb59a
movl (%rbx), %ebx
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
movl $0x1, %r15d
cmpl $0xa, %r14d
jb 0x7337
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x732e
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x7334
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x7337
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x72fb
addl $-0x3, %r15d
jmp 0x7337
addl $-0x2, %r15d
jmp 0x7337
decl %r15d
shrl $0x1f, %ebx
leal (%r15,%rbx), %esi
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x68(%rbp), %rdi
movl $0x2d, %edx
callq 0x3280
addq -0x68(%rbp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0xb251
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movq -0x60(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x7387
movq -0x78(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x73a0
movl $0xf, %esi
cmpq %r13, -0x68(%rbp)
je 0x739b
movq -0x58(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x73b2
movq -0x68(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x30d0
jmp 0x73bf
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3260
leaq -0x38(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x73db
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x73e6
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x48(%rbp), %rsi
callq 0x70ec
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x742c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3240
jmp 0x742c
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x7446
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3240
jmp 0x7446
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x745e
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x3370