// File: /workspace/github_c_makefile_star2_O0/codeplea[P]tinyexpr/smoke.c
// Function: test_variables
void test_variables() {

    double x, y, test;
    te_variable lookup[] = {{"x", &x}, {"y", &y}, {"te_st", &test}};

    int err;

    te_expr *expr1 = te_compile("cos x + sin y", lookup, 2, &err);
    lok(expr1);
    lok(!err);

    te_expr *expr2 = te_compile("x+x+x-y", lookup, 2, &err);
    lok(expr2);
    lok(!err);

    te_expr *expr3 = te_compile("x*y^3", lookup, 2, &err);
    lok(expr3);
    lok(!err);

    te_expr *expr4 = te_compile("te_st+5", lookup, 3, &err);
    lok(expr4);
    lok(!err);

    for (y = 2; y < 3; ++y) {
        for (x = 0; x < 5; ++x) {
            double ev;

            ev = te_eval(expr1);
            lfequal(ev, cos(x) + sin(y));

            ev = te_eval(expr2);
            lfequal(ev, x+x+x-y);

            ev = te_eval(expr3);
            lfequal(ev, x*y*y*y);

            test = x;
            ev = te_eval(expr4);
            lfequal(ev, x+5);
        }
    }

    te_free(expr1);
    te_free(expr2);
    te_free(expr3);
    te_free(expr4);



    te_expr *expr5 = te_compile("xx*y^3", lookup, 2, &err);
    lok(!expr5);
    lok(err);

    te_expr *expr6 = te_compile("tes", lookup, 3, &err);
    lok(!expr6);
    lok(err);

    te_expr *expr7 = te_compile("sinn x", lookup, 2, &err);
    lok(!expr7);
    lok(err);

    te_expr *expr8 = te_compile("si x", lookup, 2, &err);
    lok(!expr8);
    lok(err);
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
leaq 0x7a91(%rip), %rax      # 0xb58f
movq %rax, 0x90(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x98(%rsp)
movl $0x0, 0xa0(%rsp)
movq $0x0, 0xa8(%rsp)
leaq 0x79f0(%rip), %rax      # 0xb524
movq %rax, 0xb0(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl $0x0, 0xc0(%rsp)
movq $0x0, 0xc8(%rsp)
leaq 0x79a8(%rip), %rax      # 0xb512
movq %rax, 0xd0(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movl $0x0, 0xe0(%rsp)
movq $0x0, 0xe8(%rsp)
leaq 0x90(%rsp), %rsi
leaq 0x7970(%rip), %rdi      # 0xb518
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x80(%rsp)
movl 0xb534(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb52b(%rip)      # 0xf0fc
cmpq $0x0, 0x80(%rsp)
jne 0x3c05
movl 0xb51e(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb515(%rip)      # 0xf100
leaq 0x77bb(%rip), %rdi      # 0xb3ad
leaq 0x77c2(%rip), %rsi      # 0xb3bb
movl $0x11f, %edx            # imm = 0x11F
movb $0x0, %al
callq 0x3080
jmp 0x3c07
jmp 0x3c09
movl 0xb4ed(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb4e4(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
je 0x3c4b
movl 0xb4d8(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb4cf(%rip)      # 0xf100
leaq 0x7775(%rip), %rdi      # 0xb3ad
leaq 0x777c(%rip), %rsi      # 0xb3bb
movl $0x120, %edx            # imm = 0x120
movb $0x0, %al
callq 0x3080
jmp 0x3c4d
leaq 0x90(%rsp), %rsi
leaq 0x78ca(%rip), %rdi      # 0xb526
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x78(%rsp)
movl 0xb483(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb47a(%rip)      # 0xf0fc
cmpq $0x0, 0x78(%rsp)
jne 0x3cb3
movl 0xb470(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb467(%rip)      # 0xf100
leaq 0x770d(%rip), %rdi      # 0xb3ad
leaq 0x7714(%rip), %rsi      # 0xb3bb
movl $0x123, %edx            # imm = 0x123
movb $0x0, %al
callq 0x3080
jmp 0x3cb5
jmp 0x3cb7
movl 0xb43f(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb436(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
je 0x3cf9
movl 0xb42a(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb421(%rip)      # 0xf100
leaq 0x76c7(%rip), %rdi      # 0xb3ad
leaq 0x76ce(%rip), %rsi      # 0xb3bb
movl $0x124, %edx            # imm = 0x124
movb $0x0, %al
callq 0x3080
jmp 0x3cfb
leaq 0x90(%rsp), %rsi
leaq 0x782d(%rip), %rdi      # 0xb537
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x70(%rsp)
movl 0xb3d5(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb3cc(%rip)      # 0xf0fc
cmpq $0x0, 0x70(%rsp)
jne 0x3d61
movl 0xb3c2(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb3b9(%rip)      # 0xf100
leaq 0x765f(%rip), %rdi      # 0xb3ad
leaq 0x7666(%rip), %rsi      # 0xb3bb
movl $0x127, %edx            # imm = 0x127
movb $0x0, %al
callq 0x3080
jmp 0x3d63
jmp 0x3d65
movl 0xb391(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb388(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
je 0x3da7
movl 0xb37c(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb373(%rip)      # 0xf100
leaq 0x7619(%rip), %rdi      # 0xb3ad
leaq 0x7620(%rip), %rsi      # 0xb3bb
movl $0x128, %edx            # imm = 0x128
movb $0x0, %al
callq 0x3080
jmp 0x3da9
leaq 0x90(%rsp), %rsi
leaq 0x7776(%rip), %rdi      # 0xb52e
movl $0x3, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x68(%rsp)
movl 0xb327(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb31e(%rip)      # 0xf0fc
cmpq $0x0, 0x68(%rsp)
jne 0x3e0f
movl 0xb314(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb30b(%rip)      # 0xf100
leaq 0x75b1(%rip), %rdi      # 0xb3ad
leaq 0x75b8(%rip), %rsi      # 0xb3bb
movl $0x12b, %edx            # imm = 0x12B
movb $0x0, %al
callq 0x3080
jmp 0x3e11
jmp 0x3e13
movl 0xb2e3(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb2da(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
je 0x3e55
movl 0xb2ce(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb2c5(%rip)      # 0xf100
leaq 0x756b(%rip), %rdi      # 0xb3ad
leaq 0x7572(%rip), %rsi      # 0xb3bb
movl $0x12c, %edx            # imm = 0x12C
movb $0x0, %al
callq 0x3080
jmp 0x3e57
movsd 0x71b9(%rip), %xmm0     # 0xb018
movsd %xmm0, 0xf8(%rsp)
movsd 0x71b0(%rip), %xmm0     # 0xb020
ucomisd 0xf8(%rsp), %xmm0
jbe 0x427e
xorps %xmm0, %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x7195(%rip), %xmm0     # 0xb028
ucomisd 0x100(%rsp), %xmm0
jbe 0x425d
movq 0x80(%rsp), %rdi
callq 0x8450
movsd %xmm0, 0x60(%rsp)
movl 0xb241(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb238(%rip)      # 0xf0fc
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x100(%rsp), %xmm0
callq 0x30b0
movsd %xmm0, 0x10(%rsp)
movsd 0xf8(%rsp), %xmm0
callq 0x3150
movsd 0x10(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x18(%rsp), %xmm0
addsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movaps 0x7170(%rip), %xmm1     # 0xb080
pand %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
movsd 0x70e0(%rip), %xmm1     # 0xb008
ucomisd %xmm1, %xmm0
ja 0x3f40
movsd 0x58(%rsp), %xmm0
ucomisd 0x58(%rsp), %xmm0
jne 0x3f40
jp 0x3f40
jmp 0x3fa8
movl 0xb1ba(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb1b1(%rip)      # 0xf100
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x100(%rsp), %xmm0
callq 0x30b0
movsd %xmm0, (%rsp)
movsd 0xf8(%rsp), %xmm0
callq 0x3150
movsd (%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
addsd %xmm2, %xmm1
leaq 0x742e(%rip), %rdi      # 0xb3c3
leaq 0x741f(%rip), %rsi      # 0xb3bb
movl $0x133, %edx            # imm = 0x133
movb $0x2, %al
callq 0x3080
jmp 0x3faa
movq 0x78(%rsp), %rdi
callq 0x8450
movsd %xmm0, 0x60(%rsp)
movl 0xb13c(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb133(%rip)      # 0xf0fc
movsd 0x60(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
addsd 0x100(%rsp), %xmm1
addsd 0x100(%rsp), %xmm1
subsd 0xf8(%rsp), %xmm1
subsd %xmm1, %xmm0
movaps 0x7082(%rip), %xmm1     # 0xb080
pand %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
movsd 0x6ff2(%rip), %xmm1     # 0xb008
ucomisd %xmm1, %xmm0
ja 0x402e
movsd 0x50(%rsp), %xmm0
ucomisd 0x50(%rsp), %xmm0
jne 0x402e
jp 0x402e
jmp 0x4081
movl 0xb0cc(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xb0c3(%rip)      # 0xf100
movsd 0x60(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
addsd 0x100(%rsp), %xmm1
addsd 0x100(%rsp), %xmm1
subsd 0xf8(%rsp), %xmm1
leaq 0x7355(%rip), %rdi      # 0xb3c3
leaq 0x7346(%rip), %rsi      # 0xb3bb
movl $0x136, %edx            # imm = 0x136
movb $0x2, %al
callq 0x3080
jmp 0x4083
movq 0x70(%rsp), %rdi
callq 0x8450
movsd %xmm0, 0x60(%rsp)
movl 0xb063(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xb05a(%rip)      # 0xf0fc
movsd 0x60(%rsp), %xmm1
movsd 0x100(%rsp), %xmm0
mulsd 0xf8(%rsp), %xmm0
mulsd 0xf8(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movaps 0x6f8e(%rip), %xmm1     # 0xb080
pand %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
movsd 0x6efe(%rip), %xmm1     # 0xb008
ucomisd %xmm1, %xmm0
ja 0x4122
movsd 0x48(%rsp), %xmm0
ucomisd 0x48(%rsp), %xmm0
jne 0x4122
jp 0x4122
jmp 0x4175
movl 0xafd8(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xafcf(%rip)      # 0xf100
movsd 0x60(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
mulsd 0xf8(%rsp), %xmm1
mulsd 0xf8(%rsp), %xmm1
mulsd 0xf8(%rsp), %xmm1
leaq 0x7261(%rip), %rdi      # 0xb3c3
leaq 0x7252(%rip), %rsi      # 0xb3bb
movl $0x139, %edx            # imm = 0x139
movb $0x2, %al
callq 0x3080
jmp 0x4177
movsd 0x100(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movq 0x68(%rsp), %rdi
callq 0x8450
movsd %xmm0, 0x60(%rsp)
movl 0xaf5d(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xaf54(%rip)      # 0xf0fc
movsd 0x60(%rsp), %xmm0
movsd 0x6e72(%rip), %xmm1     # 0xb028
addsd 0x100(%rsp), %xmm1
subsd %xmm1, %xmm0
movaps 0x6eb6(%rip), %xmm1     # 0xb080
pand %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x6e26(%rip), %xmm1     # 0xb008
ucomisd %xmm1, %xmm0
ja 0x41fa
movsd 0x40(%rsp), %xmm0
ucomisd 0x40(%rsp), %xmm0
jne 0x41fa
jp 0x41fa
jmp 0x423a
movl 0xaf00(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xaef7(%rip)      # 0xf100
movsd 0x60(%rsp), %xmm0
movsd 0x6e11(%rip), %xmm1     # 0xb028
addsd 0x100(%rsp), %xmm1
leaq 0x719c(%rip), %rdi      # 0xb3c3
leaq 0x718d(%rip), %rsi      # 0xb3bb
movl $0x13d, %edx            # imm = 0x13D
movb $0x2, %al
callq 0x3080
jmp 0x423c
jmp 0x423e
movsd 0x6dca(%rip), %xmm0     # 0xb010
addsd 0x100(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
jmp 0x3e8b
jmp 0x425f
movsd 0x6da9(%rip), %xmm0     # 0xb010
addsd 0xf8(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
jmp 0x3e68
movq 0x80(%rsp), %rdi
callq 0x7e40
movq 0x78(%rsp), %rdi
callq 0x7e40
movq 0x70(%rsp), %rdi
callq 0x7e40
movq 0x68(%rsp), %rdi
callq 0x7e40
leaq 0x90(%rsp), %rsi
leaq 0x727e(%rip), %rdi      # 0xb536
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x38(%rsp)
movl 0xae27(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xae1e(%rip)      # 0xf0fc
cmpq $0x0, 0x38(%rsp)
je 0x430f
movl 0xae14(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xae0b(%rip)      # 0xf100
leaq 0x70b1(%rip), %rdi      # 0xb3ad
leaq 0x70b8(%rip), %rsi      # 0xb3bb
movl $0x149, %edx            # imm = 0x149
movb $0x0, %al
callq 0x3080
jmp 0x4311
jmp 0x4313
movl 0xade3(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xadda(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
jne 0x4355
movl 0xadce(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xadc5(%rip)      # 0xf100
leaq 0x706b(%rip), %rdi      # 0xb3ad
leaq 0x7072(%rip), %rsi      # 0xb3bb
movl $0x14a, %edx            # imm = 0x14A
movb $0x0, %al
callq 0x3080
jmp 0x4357
leaq 0x90(%rsp), %rsi
leaq 0x71d7(%rip), %rdi      # 0xb53d
movl $0x3, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x30(%rsp)
movl 0xad79(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xad70(%rip)      # 0xf0fc
cmpq $0x0, 0x30(%rsp)
je 0x43bd
movl 0xad66(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xad5d(%rip)      # 0xf100
leaq 0x7003(%rip), %rdi      # 0xb3ad
leaq 0x700a(%rip), %rsi      # 0xb3bb
movl $0x14d, %edx            # imm = 0x14D
movb $0x0, %al
callq 0x3080
jmp 0x43bf
jmp 0x43c1
movl 0xad35(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xad2c(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
jne 0x4403
movl 0xad20(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xad17(%rip)      # 0xf100
leaq 0x6fbd(%rip), %rdi      # 0xb3ad
leaq 0x6fc4(%rip), %rsi      # 0xb3bb
movl $0x14e, %edx            # imm = 0x14E
movb $0x0, %al
callq 0x3080
jmp 0x4405
leaq 0x90(%rsp), %rsi
leaq 0x712d(%rip), %rdi      # 0xb541
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x28(%rsp)
movl 0xaccb(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xacc2(%rip)      # 0xf0fc
cmpq $0x0, 0x28(%rsp)
je 0x446b
movl 0xacb8(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xacaf(%rip)      # 0xf100
leaq 0x6f55(%rip), %rdi      # 0xb3ad
leaq 0x6f5c(%rip), %rsi      # 0xb3bb
movl $0x151, %edx            # imm = 0x151
movb $0x0, %al
callq 0x3080
jmp 0x446d
jmp 0x446f
movl 0xac87(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xac7e(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
jne 0x44b1
movl 0xac72(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xac69(%rip)      # 0xf100
leaq 0x6f0f(%rip), %rdi      # 0xb3ad
leaq 0x6f16(%rip), %rsi      # 0xb3bb
movl $0x152, %edx            # imm = 0x152
movb $0x0, %al
callq 0x3080
jmp 0x44b3
leaq 0x90(%rsp), %rsi
leaq 0x7086(%rip), %rdi      # 0xb548
movl $0x2, %edx
leaq 0x8c(%rsp), %rcx
callq 0x8ff0
movq %rax, 0x20(%rsp)
movl 0xac1d(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xac14(%rip)      # 0xf0fc
cmpq $0x0, 0x20(%rsp)
je 0x4519
movl 0xac0a(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xac01(%rip)      # 0xf100
leaq 0x6ea7(%rip), %rdi      # 0xb3ad
leaq 0x6eae(%rip), %rsi      # 0xb3bb
movl $0x155, %edx            # imm = 0x155
movb $0x0, %al
callq 0x3080
jmp 0x451b
jmp 0x451d
movl 0xabd9(%rip), %eax      # 0xf0fc
addl $0x1, %eax
movl %eax, 0xabd0(%rip)      # 0xf0fc
cmpl $0x0, 0x8c(%rsp)
jne 0x455f
movl 0xabc4(%rip), %eax      # 0xf100
addl $0x1, %eax
movl %eax, 0xabbb(%rip)      # 0xf100
leaq 0x6e61(%rip), %rdi      # 0xb3ad
leaq 0x6e68(%rip), %rsi      # 0xb3bb
movl $0x156, %edx            # imm = 0x156
movb $0x0, %al
callq 0x3080
jmp 0x4561
addq $0x108, %rsp            # imm = 0x108
retq
nopl (%rax)