// File: /workspace/github_cpp_makefile_star2_O3/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 0x7212
leaq 0x5efd(%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 0x73c6
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x742e
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7086
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x60ec(%rip), %rsi      # 0xd30e
leaq 0x60fe(%rip), %rdx      # 0xd327
leaq -0x88(%rbp), %rdi
callq 0xb494
movl (%rbx), %ebx
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
movl $0x1, %r15d
cmpl $0xa, %r14d
jb 0x7297
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x728e
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x7294
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x7297
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x725b
addl $-0x3, %r15d
jmp 0x7297
addl $-0x2, %r15d
jmp 0x7297
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 0xb147
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movq -0x60(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x72e7
movq -0x78(%rbp), %rdi
movq -0x68(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x7303
movl $0xf, %edi
cmpq %r13, %rsi
je 0x72fe
movq -0x58(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x7311
leaq -0x88(%rbp), %rdi
callq 0x30d0
jmp 0x731e
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 0x733a
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x7345
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 0x704c
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x738b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3240
jmp 0x738b
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x73a5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3240
jmp 0x73a5
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x73bd
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x3370
nop