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

    UPPER(UPPER(a)) = 0xeeeeeeeeeeeeeeee;
    LOWER(UPPER(a)) = 0xeeeeeeeeeeeeeeee;
    UPPER(LOWER(a)) = 0xeeeeeeeeeeeeeeee;
    LOWER(LOWER(a)) = 0xeeeeeeeeeeeeeeee;
    UPPER(UPPER(b)) = 0xeeeeeeeeeeeeeeee;
    LOWER(UPPER(b)) = 0xeeeeeeeeeeeeeeee;
    UPPER(LOWER(b)) = 0xeeeeeeeeeeeeeeee;
    LOWER(LOWER(b)) = 0xeeeeeeeeeeeeeeee;
    UPPER(UPPER(c)) = 0xdddddddddddddddd;
    LOWER(UPPER(c)) = 0xdddddddddddddddd;
    UPPER(LOWER(c)) = 0xdddddddddddddddd;
    LOWER(LOWER(c)) = 0xdddddddddddddddd;

    mulmod256(&a, &b, &c, &d);
    assert(UPPER(UPPER(d)) == 0x1111111111111111);
    assert(UPPER(LOWER(d)) == 0x1111111111111111);
    assert(LOWER(UPPER(d)) == 0x1111111111111111);
    assert(LOWER(LOWER(d)) == 0x1111111111111111);

    mulmod256(&a, &b, &a, &d);
    assert(UPPER(UPPER(d)) == 0x0000000000000000);
    assert(UPPER(LOWER(d)) == 0x0000000000000000);
    assert(LOWER(UPPER(d)) == 0x0000000000000000);
    assert(LOWER(LOWER(d)) == 0x0000000000000000);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movabsq $0x1111111111111111, %r14 # imm = 0x1111111111111111
movaps 0x302a(%rip), %xmm0     # 0x6020
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps 0x301b(%rip), %xmm0     # 0x6030
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rsp, %rbx
movq %rbx, %rcx
callq 0x52a8
cmpq %r14, (%rbx)
jne 0x30a3
cmpq %r14, 0x10(%rsp)
jne 0x30c2
cmpq %r14, 0x8(%rsp)
jne 0x30e1
cmpq %r14, 0x18(%rsp)
jne 0x3100
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq %rsp, %rbx
movq %rdi, %rdx
movq %rbx, %rcx
callq 0x52a8
cmpq $0x0, (%rbx)
jne 0x311f
cmpq $0x0, 0x10(%rsp)
jne 0x313e
cmpq $0x0, 0x8(%rsp)
jne 0x315d
cmpq $0x0, 0x18(%rsp)
jne 0x317c
addq $0x88, %rsp
popq %rbx
popq %r14
retq
leaq 0x4001(%rip), %rdi      # 0x70ab
leaq 0x2fc6(%rip), %rsi      # 0x6077
leaq 0x4019(%rip), %rcx      # 0x70d1
movl $0x153, %edx            # imm = 0x153
callq 0x1030
leaq 0x401b(%rip), %rdi      # 0x70e4
leaq 0x2fa7(%rip), %rsi      # 0x6077
leaq 0x3ffa(%rip), %rcx      # 0x70d1
movl $0x154, %edx            # imm = 0x154
callq 0x1030
leaq 0x4022(%rip), %rdi      # 0x710a
leaq 0x2f88(%rip), %rsi      # 0x6077
leaq 0x3fdb(%rip), %rcx      # 0x70d1
movl $0x155, %edx            # imm = 0x155
callq 0x1030
leaq 0x4029(%rip), %rdi      # 0x7130
leaq 0x2f69(%rip), %rsi      # 0x6077
leaq 0x3fbc(%rip), %rcx      # 0x70d1
movl $0x156, %edx            # imm = 0x156
callq 0x1030
leaq 0x4030(%rip), %rdi      # 0x7156
leaq 0x2f4a(%rip), %rsi      # 0x6077
leaq 0x3f9d(%rip), %rcx      # 0x70d1
movl $0x159, %edx            # imm = 0x159
callq 0x1030
leaq 0x4037(%rip), %rdi      # 0x717c
leaq 0x2f2b(%rip), %rsi      # 0x6077
leaq 0x3f7e(%rip), %rcx      # 0x70d1
movl $0x15a, %edx            # imm = 0x15A
callq 0x1030
leaq 0x403e(%rip), %rdi      # 0x71a2
leaq 0x2f0c(%rip), %rsi      # 0x6077
leaq 0x3f5f(%rip), %rcx      # 0x70d1
movl $0x15b, %edx            # imm = 0x15B
callq 0x1030
leaq 0x4045(%rip), %rdi      # 0x71c8
leaq 0x2eed(%rip), %rsi      # 0x6077
leaq 0x3f40(%rip), %rcx      # 0x70d1
movl $0x15c, %edx            # imm = 0x15C
callq 0x1030