#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_CTX_new();
int /*<<< orphan*/ *BN_new();
int /*<<< orphan*/ do_mul_exp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  BN_CTX *ctx;
  BIGNUM *a, *b, *c, *r;
  ctx = BN_CTX_new();
  a = BN_new();
  b = BN_new();
  c = BN_new();
  r = BN_new();
  do_mul_exp(r, a, b, c, ctx);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <BN_CTX_new@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1050 <do_mul_exp@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <BN_CTX_new@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
call   1050 <do_mul_exp@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%10 = call i32* (...) @BN_CTX_new()
store i32* %10, i32** %5
%11 = call i32* (...) @BN_new()
store i32* %11, i32** %6
%12 = call i32* (...) @BN_new()
store i32* %12, i32** %7
%13 = call i32* (...) @BN_new()
store i32* %13, i32** %8
%14 = call i32* (...) @BN_new()
store i32* %14, i32** %9
%15 = load i32*, i32** %9
%16 = load i32*, i32** %6
%17 = load i32*, i32** %7
%18 = load i32*, i32** %8
%19 = load i32*, i32** %5
%20 = call i32 @do_mul_exp(i32* %15, i32* %16, i32* %17, i32* %18, i32* %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* (...) @BN_CTX_new()
%4 = tail call i32* (...) @BN_new()
%5 = tail call i32* (...) @BN_new()
%6 = tail call i32* (...) @BN_new()
%7 = tail call i32* (...) @BN_new()
%8 = tail call i32 @do_mul_exp(i32* %7, i32* %4, i32* %5, i32* %6, i32* %3)
ret i32 0
}