// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/tst/evm.c
// Function: test_mulmod
void test_mulmod() {
    evmInit();

    address_t from = AddressFromHex42("0x4a6f6B9fF1fc974096f9063a45Fd12bD5B928AD1");
    uint64_t gas = 0x18a78;
    val_t value;
    data_t input;

    op_t program[] = {
        PUSH32,
        0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab, 0xab,
        PUSH32,
        0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73,
        PUSH32,
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
        PUSH32,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        PUSH32,
        0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
        DUP3, DUP3, DUP3, MULMOD, MSIZE, MSTORE,
        DUP4, DUP4, DUP3, MULMOD, MSIZE, MSTORE,
        DUP2, DUP4, DUP3, MULMOD, MSIZE, MSTORE,
        DUP4, DUP4, DUP4, MULMOD, MSIZE, MSTORE,
        DUP5, DUP5, DUP5, MULMOD, MSIZE, MSTORE,
        DUP3, DUP5, DUP6, MULMOD, MSIZE, MSTORE,
        DUP3, DUP5, DUP5, MULMOD, MSIZE, MSTORE,
        MSIZE, PUSH0, RETURN
    };
    input.content = program;
    input.size = sizeof(program);

    op_t expected[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
        0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b, 0x9b,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    result_t result = txCreate(from, gas, value, input);
    assert(result.gasRemaining == 0);
    assert(result.returnData.size == sizeof(expected));
    assert(memcmp(result.returnData.content, expected, sizeof(expected)) == 0);

    evmFinalize();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
xorl %eax, %eax
callq 0xca7b
movq $-0x2, %r14
leaq 0x20(%rsp), %r15
leaq 0xf0a7(%rip), %r12      # 0x14050
movq 0x19048(%rip), %r13     # 0x1dff8
leaq 0x12106(%rip), %rbx     # 0x170bd
movzbl 0x4(%r14,%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x4fde
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x4fd2
addb $-0x57, %cl
jmp 0x4fdc
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x501c
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x5(%r14,%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x5003
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x4ff7
addb $-0x57, %cl
jmp 0x5001
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x5031
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r15)
addq $0x2, %r14
incq %r15
cmpq $0x26, %r14
jb 0x4fb7
jmp 0x5045
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %bpl
jmp 0x4fde
movq (%r13), %rdi
movq %rbx, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x30a0
movb $-0x1, %al
jmp 0x5003
leaq 0x12c04(%rip), %rsi     # 0x17c50
leaq 0x80(%rsp), %rbx
movl $0xd2, %edx
movq %rbx, %rdi
callq 0x30b0
movl 0x30(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %r14
leaq 0x34(%rsp), %rdx
movl $0x18a78, %esi          # imm = 0x18A78
movl $0xd2, %ecx
movq %r14, %rdi
movq %rbx, %r8
callq 0xd845
cmpq $0x0, 0x30(%r14)
jne 0x50d6
cmpq $0xe0, 0x40(%rsp)
jne 0x50f5
movq 0x48(%rsp), %rdi
leaq 0x12c81(%rip), %rsi     # 0x17d30
movl $0xe0, %edx
callq 0x30d0
testl %eax, %eax
jne 0x5114
xorl %eax, %eax
callq 0xcf29
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf084(%rip), %rdi      # 0x14161
leaq 0xefb8(%rip), %rsi      # 0x1409c
leaq 0xf40e(%rip), %rcx      # 0x144f9
movl $0x24f, %edx            # imm = 0x24F
callq 0x3040
leaq 0xf279(%rip), %rdi      # 0x14375
leaq 0xef99(%rip), %rsi      # 0x1409c
leaq 0xf3ef(%rip), %rcx      # 0x144f9
movl $0x250, %edx            # imm = 0x250
callq 0x3040
leaq 0xf295(%rip), %rdi      # 0x143b0
leaq 0xef7a(%rip), %rsi      # 0x1409c
leaq 0xf3d0(%rip), %rcx      # 0x144f9
movl $0x251, %edx            # imm = 0x251
callq 0x3040