// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/evm.c
// Function: doSupportedPrecompile
static result_t doSupportedPrecompile(precompile_t precompile, context_t *callContext) {
    uint64_t gasCost;
    result_t result;
    result.stateChanges = NULL;
    LOWER(LOWER(result.status)) = 1;
    UPPER(LOWER(result.status)) = 0;
    LOWER(UPPER(result.status)) = 0;
    UPPER(UPPER(result.status)) = 0;
    #define OUT_OF_GAS \
            fprintf(stderr, "Out of gas in precompile %s\n", precompileName[precompile]); \
            LOWER(LOWER(result.status)) = 0; \
            callContext->gas = 0; \
            result.returnData.size = 0; \
            return result
    #define APPLY_GAS_COST(required) \
        gasCost = required; \
        if (callContext->gas < gasCost) { \
            OUT_OF_GAS; \
        } \
        callContext->gas -= gasCost

    switch (precompile) {
        case HOLE:
            result.returnData.size = 0;
            return result;
        case IDENTITY:
            APPLY_GAS_COST(15 + 3 * ((callContext->callData.size + 31) / 32));
            result.returnData.size = callContext->callData.size;
            result.returnData.content = malloc(callContext->callData.size);
            memcpy(result.returnData.content, callContext->callData.content, callContext->callData.size);
            return result;
        default:
            assert(0);
    }
    #undef APPLY_GAS_COST
    #undef OUT_OF_GAS
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movl %esi, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movq $0x0, 0x38(%rdi)
movq $0x1, 0x28(%rdi)
movq $0x0, 0x20(%rdi)
movq $0x0, 0x18(%rdi)
movq $0x0, 0x10(%rdi)
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0xe6bb
jmp 0xe6ae
movl -0x1c(%rbp), %eax
subl $0x4, %eax
je 0xe6cb
jmp 0xe7b1
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0xe7d0
movq -0x10(%rbp), %rax
movq 0x8070(%rax), %rax
addq $0x1f, %rax
shrq $0x5, %rax
imulq $0x3, %rax, %rax
addq $0xf, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8080(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xe74a
movq 0x118f6(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x11a6f(%rip), %rax     # 0x20180
movq (%rax,%rcx,8), %rdx
leaq 0xc5aa(%rip), %rsi      # 0x1acc6
movb $0x0, %al
callq 0x31e0
movq -0x30(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rcx
movq $0x0, 0x8080(%rcx)
movq $0x0, (%rax)
jmp 0xe7d0
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq 0x8080(%rcx), %rdx
subq %rsi, %rdx
movq %rdx, 0x8080(%rcx)
movq -0x10(%rbp), %rcx
movq 0x8070(%rcx), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8070(%rax), %rdi
callq 0x3210
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8078(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8070(%rax), %rdx
callq 0x3200
jmp 0xe7d0
leaq 0xc579(%rip), %rdi      # 0x1ad31
leaq 0xc524(%rip), %rsi      # 0x1ace3
movl $0x26e, %edx            # imm = 0x26E
leaq 0xc522(%rip), %rcx      # 0x1aced
callq 0x3120
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)