// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/tst/uint256.c
// Function: test_exp
void test_exp() {
    uint256_t a, b, c;

    clear256(&a);
    LOWER(LOWER(a)) = 3;
    clear256(&b);
    LOWER(LOWER(b)) = 8;
    clear256(&c);

    exp256(&b, &c, &c);
    assert(LOWER(LOWER(c)) == 1);
    assert(UPPER(LOWER(c)) == 0);
    assert(LOWER(UPPER(c)) == 0);
    assert(UPPER(UPPER(c)) == 0);

    exp256(&a, &b, &c);
    assert(LOWER(LOWER(c)) == 6561);
    assert(UPPER(LOWER(c)) == 0);
    assert(LOWER(UPPER(c)) == 0);
    assert(UPPER(UPPER(c)) == 0);

    exp256(&b, &a, &c);
    assert(LOWER(LOWER(c)) == 512);
    assert(UPPER(LOWER(c)) == 0);
    assert(LOWER(UPPER(c)) == 0);
    assert(UPPER(UPPER(c)) == 0);

    LOWER(LOWER(c)) = 160;

    exp256(&a, &c, &c);
    assert(UPPER(UPPER(c)) == 0x304d37f120d696c8);
    assert(LOWER(UPPER(c)) == 0x34550e63d9bb9c14);
    assert(UPPER(LOWER(c)) == 0xb4f9165c9ede434e);
    assert(LOWER(LOWER(c)) == 0x4644e3998d6db881);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq -0x20(%rbp), %rdi
callq 0x35f0
movq $0x3, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x35f0
movq $0x8, -0x28(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x35f0
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movq %rdx, %rsi
callq 0x58c0
cmpq $0x1, -0x48(%rbp)
jne 0x274c
jmp 0x276b
leaq 0x55d0(%rip), %rdi      # 0x7d23
leaq 0x48e1(%rip), %rsi      # 0x703b
movl $0xf9, %edx
leaq 0x55d2(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x50(%rbp)
jne 0x2774
jmp 0x2793
leaq 0x55cd(%rip), %rdi      # 0x7d48
leaq 0x48b9(%rip), %rsi      # 0x703b
movl $0xfa, %edx
leaq 0x55aa(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x58(%rbp)
jne 0x279c
jmp 0x27bb
leaq 0x55ba(%rip), %rdi      # 0x7d5d
leaq 0x4891(%rip), %rsi      # 0x703b
movl $0xfb, %edx
leaq 0x5582(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x60(%rbp)
jne 0x27c4
jmp 0x27e3
leaq 0x55a7(%rip), %rdi      # 0x7d72
leaq 0x4869(%rip), %rsi      # 0x703b
movl $0xfc, %edx
leaq 0x555a(%rip), %rcx      # 0x7d38
callq 0x1030
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x58c0
cmpq $0x19a1, -0x48(%rbp)    # imm = 0x19A1
jne 0x2800
jmp 0x281f
leaq 0x5580(%rip), %rdi      # 0x7d87
leaq 0x482d(%rip), %rsi      # 0x703b
movl $0xff, %edx
leaq 0x551e(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x50(%rbp)
jne 0x2828
jmp 0x2847
leaq 0x5519(%rip), %rdi      # 0x7d48
leaq 0x4805(%rip), %rsi      # 0x703b
movl $0x100, %edx            # imm = 0x100
leaq 0x54f6(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x58(%rbp)
jne 0x2850
jmp 0x286f
leaq 0x5506(%rip), %rdi      # 0x7d5d
leaq 0x47dd(%rip), %rsi      # 0x703b
movl $0x101, %edx            # imm = 0x101
leaq 0x54ce(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x60(%rbp)
jne 0x2878
jmp 0x2897
leaq 0x54f3(%rip), %rdi      # 0x7d72
leaq 0x47b5(%rip), %rsi      # 0x703b
movl $0x102, %edx            # imm = 0x102
leaq 0x54a6(%rip), %rcx      # 0x7d38
callq 0x1030
leaq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x58c0
cmpq $0x200, -0x48(%rbp)     # imm = 0x200
jne 0x28b4
jmp 0x28d3
leaq 0x54e4(%rip), %rdi      # 0x7d9f
leaq 0x4779(%rip), %rsi      # 0x703b
movl $0x105, %edx            # imm = 0x105
leaq 0x546a(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x50(%rbp)
jne 0x28dc
jmp 0x28fb
leaq 0x5465(%rip), %rdi      # 0x7d48
leaq 0x4751(%rip), %rsi      # 0x703b
movl $0x106, %edx            # imm = 0x106
leaq 0x5442(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x58(%rbp)
jne 0x2904
jmp 0x2923
leaq 0x5452(%rip), %rdi      # 0x7d5d
leaq 0x4729(%rip), %rsi      # 0x703b
movl $0x107, %edx            # imm = 0x107
leaq 0x541a(%rip), %rcx      # 0x7d38
callq 0x1030
cmpq $0x0, -0x60(%rbp)
jne 0x292c
jmp 0x294b
leaq 0x543f(%rip), %rdi      # 0x7d72
leaq 0x4701(%rip), %rsi      # 0x703b
movl $0x108, %edx            # imm = 0x108
leaq 0x53f2(%rip), %rcx      # 0x7d38
callq 0x1030
movq $0xa0, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movq %rdx, %rsi
callq 0x58c0
movabsq $0x304d37f120d696c8, %rax # imm = 0x304D37F120D696C8
cmpq %rax, -0x60(%rbp)
jne 0x2975
jmp 0x2994
leaq 0x543a(%rip), %rdi      # 0x7db6
leaq 0x46b8(%rip), %rsi      # 0x703b
movl $0x10d, %edx            # imm = 0x10D
leaq 0x53a9(%rip), %rcx      # 0x7d38
callq 0x1030
movabsq $0x34550e63d9bb9c14, %rax # imm = 0x34550E63D9BB9C14
cmpq %rax, -0x58(%rbp)
jne 0x29a6
jmp 0x29c5
leaq 0x542f(%rip), %rdi      # 0x7ddc
leaq 0x4687(%rip), %rsi      # 0x703b
movl $0x10e, %edx            # imm = 0x10E
leaq 0x5378(%rip), %rcx      # 0x7d38
callq 0x1030
movabsq $-0x4b06e9a36121bcb2, %rax # imm = 0xB4F9165C9EDE434E
cmpq %rax, -0x50(%rbp)
jne 0x29d7
jmp 0x29f6
leaq 0x5424(%rip), %rdi      # 0x7e02
leaq 0x4656(%rip), %rsi      # 0x703b
movl $0x10f, %edx            # imm = 0x10F
leaq 0x5347(%rip), %rcx      # 0x7d38
callq 0x1030
movabsq $0x4644e3998d6db881, %rax # imm = 0x4644E3998D6DB881
cmpq %rax, -0x48(%rbp)
jne 0x2a08
jmp 0x2a27
leaq 0x5419(%rip), %rdi      # 0x7e28
leaq 0x4625(%rip), %rsi      # 0x703b
movl $0x110, %edx            # imm = 0x110
leaq 0x5316(%rip), %rcx      # 0x7d38
callq 0x1030
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)