// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movb $0x0, %al
callq 0xcfc0
leaq -0x18(%rbp), %rdi
leaq 0x169c7(%rip), %rsi     # 0x1b004
addq $0x2, %rsi
callq 0x3380
movq $0x18a78, -0x20(%rbp)   # imm = 0x18A78
leaq -0x120(%rbp), %rdi
leaq 0x1a5b4(%rip), %rsi     # 0x1ec10
movl $0xd2, %edx
callq 0x30c0
leaq -0x120(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0xd2, -0x40(%rbp)
leaq -0x200(%rbp), %rdi
leaq 0x1a669(%rip), %rsi     # 0x1ecf0
movl $0xe0, %edx
callq 0x30c0
movq -0x20(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
leaq -0x240(%rbp), %rdi
leaq -0x18(%rbp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rsp)
callq 0xe270
cmpq $0x0, -0x210(%rbp)
jne 0x46d4
jmp 0x46f3
leaq 0x16a3a(%rip), %rdi     # 0x1b115
leaq 0x1696e(%rip), %rsi     # 0x1b050
movl $0x24f, %edx            # imm = 0x24F
leaq 0x16dbf(%rip), %rcx     # 0x1b4ad
callq 0x3040
cmpq $0xe0, -0x240(%rbp)
jne 0x4702
jmp 0x4721
leaq 0x16c20(%rip), %rdi     # 0x1b329
leaq 0x16940(%rip), %rsi     # 0x1b050
movl $0x250, %edx            # imm = 0x250
leaq 0x16d91(%rip), %rcx     # 0x1b4ad
callq 0x3040
movq -0x238(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0xe0, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0x4740
jmp 0x475f
leaq 0x16c1d(%rip), %rdi     # 0x1b364
leaq 0x16902(%rip), %rsi     # 0x1b050
movl $0x251, %edx            # imm = 0x251
leaq 0x16d53(%rip), %rcx     # 0x1b4ad
callq 0x3040
movb $0x0, %al
callq 0xd4d0
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
nop