#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 size_t uint8_t;
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_CTX_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_CTX_new();
int /*<<< orphan*/ *BN_bin2bn(size_t const *, size_t, int /*<<< orphan*/ *);
scalar_t__ BN_cmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ *);
scalar_t__ BN_is_zero(int /*<<< orphan*/ *);
int BN_mod_exp(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
               int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int BN_mod_exp_simple(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                      int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_new();
int /*<<< orphan*/ BN_print_fp(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_set_negative(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ OPENSSL_assert(int);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
  int success = 0;
  size_t l1 = 0, l2 = 0, l3 = 0;
  int s1 = 0, s3 = 0;
  BN_CTX *ctx;
  BIGNUM *b1;
  BIGNUM *b2;
  BIGNUM *b3;
  BIGNUM *b4;
  BIGNUM *b5;
  b1 = BN_new();
  b2 = BN_new();
  b3 = BN_new();
  b4 = BN_new();
  b5 = BN_new();
  ctx = BN_CTX_new();
  if (len > 2) {
    len -= 3;
    l1 = (buf[0] * len) / 255;
    ++buf;
    l2 = (buf[0] * (len - l1)) / 255;
    ++buf;
    l3 = len - l1 - l2;
    s1 = buf[0] & 1;
    s3 = buf[0] & 4;
    ++buf;
  }
  OPENSSL_assert(BN_bin2bn(buf, l1, b1) == b1);
  BN_set_negative(b1, s1);
  OPENSSL_assert(BN_bin2bn(buf + l1, l2, b2) == b2);
  OPENSSL_assert(BN_bin2bn(buf + l1 + l2, l3, b3) == b3);
  BN_set_negative(b3, s3);
  if (BN_is_zero(b3)) {
    success = 1;
    goto done;
  }
  OPENSSL_assert(BN_mod_exp(b4, b1, b2, b3, ctx));
  OPENSSL_assert(BN_mod_exp_simple(b5, b1, b2, b3, ctx));
  success = BN_cmp(b4, b5) == 0;
  if (!success) {
    BN_print_fp(stdout, b1);
    putchar('\n');
    BN_print_fp(stdout, b2);
    putchar('\n');
    BN_print_fp(stdout, b3);
    putchar('\n');
    BN_print_fp(stdout, b4);
    putchar('\n');
    BN_print_fp(stdout, b5);
    putchar('\n');
  }
done:
  OPENSSL_assert(success);
  BN_free(b1);
  BN_free(b2);
  BN_free(b3);
  BN_free(b4);
  BN_free(b5);
  BN_CTX_free(ctx);
  ERR_clear_error();
  return 0;
}


x86 assembly (clang, -O0):
<FuzzerTestOneInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    $0x0,%al
call   1050 <BN_new@plt>
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1050 <BN_new@plt>
mov    %rax,-0x50(%rbp)
mov    $0x0,%al
call   1050 <BN_new@plt>
mov    %rax,-0x58(%rbp)
mov    $0x0,%al
call   1050 <BN_new@plt>
mov    %rax,-0x60(%rbp)
mov    $0x0,%al
call   1050 <BN_new@plt>
mov    %rax,-0x68(%rbp)
mov    $0x0,%al
call   10e0 <BN_CTX_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x2,-0x10(%rbp)
jbe    1301 <FuzzerTestOneInput+0x121>
mov    -0x10(%rbp),%rax
sub    $0x3,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
imul   -0x10(%rbp),%rax
mov    $0xff,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
sub    -0x20(%rbp),%rcx
imul   %rcx,%rax
mov    $0xff,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x20(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0x1,%rax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0x4,%rax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1060 <BN_bin2bn@plt>
cmp    -0x48(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x48(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1070 <BN_set_negative@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rsi
mov    -0x50(%rbp),%rdx
call   1060 <BN_bin2bn@plt>
cmp    -0x50(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   1060 <BN_bin2bn@plt>
cmp    -0x58(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x58(%rbp),%rdi
mov    -0x38(%rbp),%esi
call   1070 <BN_set_negative@plt>
mov    -0x58(%rbp),%rdi
call   10f0 <BN_is_zero@plt>
cmp    $0x0,%rax
je     13bf <FuzzerTestOneInput+0x1df>
movl   $0x1,-0x14(%rbp)
jmp    14b6 <FuzzerTestOneInput+0x2d6>
mov    -0x60(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    -0x40(%rbp),%r8
call   10d0 <BN_mod_exp@plt>
mov    %eax,%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x68(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    -0x40(%rbp),%r8
call   1090 <BN_mod_exp_simple@plt>
mov    %eax,%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x60(%rbp),%rdi
mov    -0x68(%rbp),%rsi
call   1100 <BN_cmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    14b1 <FuzzerTestOneInput+0x2d1>
mov    0x2bb4(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
mov    -0x50(%rbp),%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2b7c(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2b60(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2b44(%rip),%rax
mov    (%rax),%edi
mov    -0x68(%rbp),%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    14b6 <FuzzerTestOneInput+0x2d6>
mov    -0x14(%rbp),%edi
call   1040 <OPENSSL_assert@plt>
mov    -0x48(%rbp),%rdi
call   10a0 <BN_free@plt>
mov    -0x50(%rbp),%rdi
call   10a0 <BN_free@plt>
mov    -0x58(%rbp),%rdi
call   10a0 <BN_free@plt>
mov    -0x60(%rbp),%rdi
call   10a0 <BN_free@plt>
mov    -0x68(%rbp),%rdi
call   10a0 <BN_free@plt>
mov    -0x40(%rbp),%rdi
call   1080 <BN_CTX_free@plt>
mov    $0x0,%al
call   10c0 <ERR_clear_error@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerTestOneInput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbp
mov    %rdi,%r12
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <BN_new@plt>
mov    %rax,%r13
xor    %eax,%eax
call   1050 <BN_new@plt>
mov    %rax,0x30(%rsp)
xor    %eax,%eax
call   1050 <BN_new@plt>
mov    %rax,0x28(%rsp)
xor    %eax,%eax
call   1050 <BN_new@plt>
mov    %rax,0x18(%rsp)
xor    %eax,%eax
call   1050 <BN_new@plt>
mov    %rax,0x10(%rsp)
xor    %eax,%eax
call   10e0 <BN_CTX_new@plt>
mov    %rax,0x20(%rsp)
cmp    $0x3,%rbp
jb     1295 <FuzzerTestOneInput+0xb5>
add    $0xfffffffffffffffd,%rbp
mov    (%r12),%rax
imul   %rbp,%rax
movabs $0x8080808080808081,%rcx
80 80 80
mul    %rcx
mov    %rdx,%rbx
shr    $0x7,%rbx
sub    %rbx,%rbp
mov    0x8(%r12),%rax
imul   %rbp,%rax
mul    %rcx
mov    %rdx,%r15
shr    $0x7,%r15
sub    %r15,%rbp
mov    0x10(%r12),%eax
mov    %eax,%r14d
and    $0x1,%r14d
and    $0x4,%eax
mov    %eax,0xc(%rsp)
add    $0x18,%r12
jmp    12a4 <FuzzerTestOneInput+0xc4>
movl   $0x0,0xc(%rsp)
xor    %ebp,%ebp
xor    %r15d,%r15d
xor    %ebx,%ebx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1060 <BN_bin2bn@plt>
xor    %edi,%edi
cmp    %r13,%rax
sete   %dil
call   1040 <OPENSSL_assert@plt>
mov    %r13,%rdi
mov    %r14d,%esi
call   1070 <BN_set_negative@plt>
lea    (%r12,%rbx,8),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0x30(%rsp),%r14
mov    %r14,%rdx
call   1060 <BN_bin2bn@plt>
xor    %edi,%edi
cmp    %r14,%rax
sete   %dil
call   1040 <OPENSSL_assert@plt>
lea    (%rbx,%r15,8),%rdi
mov    %rbp,%rsi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdx
call   1060 <BN_bin2bn@plt>
xor    %edi,%edi
cmp    %rbp,%rax
sete   %dil
call   1040 <OPENSSL_assert@plt>
mov    %rbp,%rdi
mov    0xc(%rsp),%esi
call   1070 <BN_set_negative@plt>
mov    %rbp,%rdi
call   10f0 <BN_is_zero@plt>
mov    $0x1,%ebx
test   %rax,%rax
je     133f <FuzzerTestOneInput+0x15f>
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r12
jmp    1404 <FuzzerTestOneInput+0x224>
mov    0x18(%rsp),%r12
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    0x20(%rsp),%r15
mov    %r15,%r8
call   10d0 <BN_mod_exp@plt>
mov    %eax,%edi
call   1040 <OPENSSL_assert@plt>
mov    0x10(%rsp),%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r15,%r8
mov    %r12,%r15
mov    %rdi,%r12
call   1090 <BN_mod_exp_simple@plt>
mov    %eax,%edi
call   1040 <OPENSSL_assert@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1100 <BN_cmp@plt>
test   %rax,%rax
je     1404 <FuzzerTestOneInput+0x224>
mov    0x2c42(%rip),%rbx
mov    (%rbx),%edi
mov    %r13,%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%edi
mov    %rbp,%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%edi
mov    %r15,%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%edi
mov    %r12,%rsi
call   10b0 <BN_print_fp@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
mov    %ebx,%edi
call   1040 <OPENSSL_assert@plt>
mov    %r13,%rdi
call   10a0 <BN_free@plt>
mov    %r14,%rdi
call   10a0 <BN_free@plt>
mov    %rbp,%rdi
call   10a0 <BN_free@plt>
mov    %r15,%rdi
call   10a0 <BN_free@plt>
mov    %r12,%rdi
call   10a0 <BN_free@plt>
mov    0x20(%rsp),%rdi
call   1080 <BN_CTX_free@plt>
xor    %eax,%eax
call   10c0 <ERR_clear_error@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @FuzzerTestOneInput(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store i64* %0, i64** %3
store i64 %1, i64* %4
store i32 0, i32* %5
store i64 0, i64* %6
store i64 0, i64* %7
store i64 0, i64* %8
store i32 0, i32* %9
store i32 0, i32* %10
%17 = call i32* (...) @BN_new()
store i32* %17, i32** %12
%18 = call i32* (...) @BN_new()
store i32* %18, i32** %13
%19 = call i32* (...) @BN_new()
store i32* %19, i32** %14
%20 = call i32* (...) @BN_new()
store i32* %20, i32** %15
%21 = call i32* (...) @BN_new()
store i32* %21, i32** %16
%22 = call i32* (...) @BN_CTX_new()
store i32* %22, i32** %11
%23 = load i64, i64* %4
%24 = icmp ugt i64 %23, 2
br i1 %24, label %25, label %63
25: ; preds = %2
%26 = load i64, i64* %4
%27 = sub i64 %26, 3
store i64 %27, i64* %4
%28 = load i64*, i64** %3
%29 = getelementptr inbounds i64, i64* %28, i64 0
%30 = load i64, i64* %29
%31 = load i64, i64* %4
%32 = mul i64 %30, %31
%33 = udiv i64 %32, 255
store i64 %33, i64* %6
%34 = load i64*, i64** %3
%35 = getelementptr inbounds i64, i64* %34, i32 1
store i64* %35, i64** %3
%36 = load i64*, i64** %3
%37 = getelementptr inbounds i64, i64* %36, i64 0
%38 = load i64, i64* %37
%39 = load i64, i64* %4
%40 = load i64, i64* %6
%41 = sub i64 %39, %40
%42 = mul i64 %38, %41
%43 = udiv i64 %42, 255
store i64 %43, i64* %7
%44 = load i64*, i64** %3
%45 = getelementptr inbounds i64, i64* %44, i32 1
store i64* %45, i64** %3
%46 = load i64, i64* %4
%47 = load i64, i64* %6
%48 = sub i64 %46, %47
%49 = load i64, i64* %7
%50 = sub i64 %48, %49
store i64 %50, i64* %8
%51 = load i64*, i64** %3
%52 = getelementptr inbounds i64, i64* %51, i64 0
%53 = load i64, i64* %52
%54 = and i64 %53, 1
%55 = trunc i64 %54 to i32
store i32 %55, i32* %9
%56 = load i64*, i64** %3
%57 = getelementptr inbounds i64, i64* %56, i64 0
%58 = load i64, i64* %57
%59 = and i64 %58, 4
%60 = trunc i64 %59 to i32
store i32 %60, i32* %10
%61 = load i64*, i64** %3
%62 = getelementptr inbounds i64, i64* %61, i32 1
store i64* %62, i64** %3
br label %63
63: ; preds = %25, %2
%64 = load i64*, i64** %3
%65 = load i64, i64* %6
%66 = load i32*, i32** %12
%67 = call i32* @BN_bin2bn(i64* %64, i64 %65, i32* %66)
%68 = load i32*, i32** %12
%69 = icmp eq i32* %67, %68
%70 = zext i1 %69 to i32
%71 = call i32 @OPENSSL_assert(i32 %70)
%72 = load i32*, i32** %12
%73 = load i32, i32* %9
%74 = call i32 @BN_set_negative(i32* %72, i32 %73)
%75 = load i64*, i64** %3
%76 = load i64, i64* %6
%77 = getelementptr inbounds i64, i64* %75, i64 %76
%78 = load i64, i64* %7
%79 = load i32*, i32** %13
%80 = call i32* @BN_bin2bn(i64* %77, i64 %78, i32* %79)
%81 = load i32*, i32** %13
%82 = icmp eq i32* %80, %81
%83 = zext i1 %82 to i32
%84 = call i32 @OPENSSL_assert(i32 %83)
%85 = load i64*, i64** %3
%86 = load i64, i64* %6
%87 = getelementptr inbounds i64, i64* %85, i64 %86
%88 = load i64, i64* %7
%89 = getelementptr inbounds i64, i64* %87, i64 %88
%90 = load i64, i64* %8
%91 = load i32*, i32** %14
%92 = call i32* @BN_bin2bn(i64* %89, i64 %90, i32* %91)
%93 = load i32*, i32** %14
%94 = icmp eq i32* %92, %93
%95 = zext i1 %94 to i32
%96 = call i32 @OPENSSL_assert(i32 %95)
%97 = load i32*, i32** %14
%98 = load i32, i32* %10
%99 = call i32 @BN_set_negative(i32* %97, i32 %98)
%100 = load i32*, i32** %14
%101 = call i64 @BN_is_zero(i32* %100)
%102 = icmp ne i64 %101, 0
br i1 %102, label %103, label %104
103: ; preds = %63
store i32 1, i32* %5
br label %148
104: ; preds = %63
%105 = load i32*, i32** %15
%106 = load i32*, i32** %12
%107 = load i32*, i32** %13
%108 = load i32*, i32** %14
%109 = load i32*, i32** %11
%110 = call i32 @BN_mod_exp(i32* %105, i32* %106, i32* %107, i32* %108, i32* %109)
%111 = call i32 @OPENSSL_assert(i32 %110)
%112 = load i32*, i32** %16
%113 = load i32*, i32** %12
%114 = load i32*, i32** %13
%115 = load i32*, i32** %14
%116 = load i32*, i32** %11
%117 = call i32 @BN_mod_exp_simple(i32* %112, i32* %113, i32* %114, i32* %115, i32* %116)
%118 = call i32 @OPENSSL_assert(i32 %117)
%119 = load i32*, i32** %15
%120 = load i32*, i32** %16
%121 = call i64 @BN_cmp(i32* %119, i32* %120)
%122 = icmp eq i64 %121, 0
%123 = zext i1 %122 to i32
store i32 %123, i32* %5
%124 = load i32, i32* %5
%125 = icmp ne i32 %124, 0
br i1 %125, label %147, label %126
126: ; preds = %104
%127 = load i32, i32* @stdout
%128 = load i32*, i32** %12
%129 = call i32 @BN_print_fp(i32 %127, i32* %128)
%130 = call i32 @putchar(i8 signext 10)
%131 = load i32, i32* @stdout
%132 = load i32*, i32** %13
%133 = call i32 @BN_print_fp(i32 %131, i32* %132)
%134 = call i32 @putchar(i8 signext 10)
%135 = load i32, i32* @stdout
%136 = load i32*, i32** %14
%137 = call i32 @BN_print_fp(i32 %135, i32* %136)
%138 = call i32 @putchar(i8 signext 10)
%139 = load i32, i32* @stdout
%140 = load i32*, i32** %15
%141 = call i32 @BN_print_fp(i32 %139, i32* %140)
%142 = call i32 @putchar(i8 signext 10)
%143 = load i32, i32* @stdout
%144 = load i32*, i32** %16
%145 = call i32 @BN_print_fp(i32 %143, i32* %144)
%146 = call i32 @putchar(i8 signext 10)
br label %147
147: ; preds = %126, %104
br label %148
148: ; preds = %147, %103
%149 = load i32, i32* %5
%150 = call i32 @OPENSSL_assert(i32 %149)
%151 = load i32*, i32** %12
%152 = call i32 @BN_free(i32* %151)
%153 = load i32*, i32** %13
%154 = call i32 @BN_free(i32* %153)
%155 = load i32*, i32** %14
%156 = call i32 @BN_free(i32* %155)
%157 = load i32*, i32** %15
%158 = call i32 @BN_free(i32* %157)
%159 = load i32*, i32** %16
%160 = call i32 @BN_free(i32* %159)
%161 = load i32*, i32** %11
%162 = call i32 @BN_CTX_free(i32* %161)
%163 = call i32 (...) @ERR_clear_error()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @FuzzerTestOneInput(i64* %0, i64 %1) {
%3 = tail call i32* (...) @BN_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* (...) @BN_CTX_new()
%9 = icmp ugt i64 %1, 2
br i1 %9, label %10, label %27
10: ; preds = %2
%11 = add i64 %1, -3
%12 = load i64, i64* %0
%13 = mul i64 %12, %11
%14 = udiv i64 %13, 255
%15 = getelementptr inbounds i64, i64* %0, i64 1
%16 = load i64, i64* %15
%17 = sub i64 %11, %14
%18 = mul i64 %17, %16
%19 = udiv i64 %18, 255
%20 = getelementptr inbounds i64, i64* %0, i64 2
%21 = sub i64 %17, %19
%22 = load i64, i64* %20
%23 = trunc i64 %22 to i32
%24 = and i32 %23, 1
%25 = and i32 %23, 4
%26 = getelementptr inbounds i64, i64* %0, i64 3
br label %27
27: ; preds = %10, %2
%28 = phi i32 [ %24, %10 ], [ 0, %2 ]
%29 = phi i32 [ %25, %10 ], [ 0, %2 ]
%30 = phi i64 [ %21, %10 ], [ 0, %2 ]
%31 = phi i64 [ %19, %10 ], [ 0, %2 ]
%32 = phi i64 [ %14, %10 ], [ 0, %2 ]
%33 = phi i64* [ %26, %10 ], [ %0, %2 ]
%34 = tail call i32* @BN_bin2bn(i64* %33, i64 %32, i32* %3)
%35 = icmp eq i32* %34, %3
%36 = zext i1 %35 to i32
%37 = tail call i32 @OPENSSL_assert(i32 %36)
%38 = tail call i32 @BN_set_negative(i32* %3, i32 %28)
%39 = getelementptr inbounds i64, i64* %33, i64 %32
%40 = tail call i32* @BN_bin2bn(i64* %39, i64 %31, i32* %4)
%41 = icmp eq i32* %40, %4
%42 = zext i1 %41 to i32
%43 = tail call i32 @OPENSSL_assert(i32 %42)
%44 = getelementptr inbounds i64, i64* %39, i64 %31
%45 = tail call i32* @BN_bin2bn(i64* %44, i64 %30, i32* %5)
%46 = icmp eq i32* %45, %5
%47 = zext i1 %46 to i32
%48 = tail call i32 @OPENSSL_assert(i32 %47)
%49 = tail call i32 @BN_set_negative(i32* %5, i32 %29)
%50 = tail call i64 @BN_is_zero(i32* %5)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %75
52: ; preds = %27
%53 = tail call i32 @BN_mod_exp(i32* %6, i32* %3, i32* %4, i32* %5, i32* %8)
%54 = tail call i32 @OPENSSL_assert(i32 %53)
%55 = tail call i32 @BN_mod_exp_simple(i32* %7, i32* %3, i32* %4, i32* %5, i32* %8)
%56 = tail call i32 @OPENSSL_assert(i32 %55)
%57 = tail call i64 @BN_cmp(i32* %6, i32* %7)
%58 = icmp eq i64 %57, 0
br i1 %58, label %75, label %59
59: ; preds = %52
%60 = load i32, i32* @stdout
%61 = tail call i32 @BN_print_fp(i32 %60, i32* %3)
%62 = tail call i32 @putchar(i8 signext 10)
%63 = load i32, i32* @stdout
%64 = tail call i32 @BN_print_fp(i32 %63, i32* %4)
%65 = tail call i32 @putchar(i8 signext 10)
%66 = load i32, i32* @stdout
%67 = tail call i32 @BN_print_fp(i32 %66, i32* %5)
%68 = tail call i32 @putchar(i8 signext 10)
%69 = load i32, i32* @stdout
%70 = tail call i32 @BN_print_fp(i32 %69, i32* %6)
%71 = tail call i32 @putchar(i8 signext 10)
%72 = load i32, i32* @stdout
%73 = tail call i32 @BN_print_fp(i32 %72, i32* %7)
%74 = tail call i32 @putchar(i8 signext 10)
br label %75
75: ; preds = %27, %52, %59
%76 = phi i32 [ 1, %52 ], [ 0, %59 ], [ 1, %27 ]
%77 = tail call i32 @OPENSSL_assert(i32 %76)
%78 = tail call i32 @BN_free(i32* %3)
%79 = tail call i32 @BN_free(i32* %4)
%80 = tail call i32 @BN_free(i32* %5)
%81 = tail call i32 @BN_free(i32* %6)
%82 = tail call i32 @BN_free(i32* %7)
%83 = tail call i32 @BN_CTX_free(i32* %8)
%84 = tail call i32 (...) @ERR_clear_error()
ret i32 0
}