#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*/ const BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ const *);
int BN_lshift(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
              int const);
int BN_mod_exp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ *);
int BN_mod_mul(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ *);
int /*<<< orphan*/ const *BN_new();
int BN_set_word(int /*<<< orphan*/ const *, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
int F(BIGNUM *r, const BIGNUM *c, const BIGNUM *x, const int l, const BIGNUM *N,
      BN_CTX *bn_ctx) {
  int ret, ok;
  BIGNUM *t1 = NULL, *t2 = NULL, *t3 = NULL;
  if ((t1 = BN_new()) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            183);
    fflush(stderr);
    ;
    goto err;
  };
  if ((t2 = BN_new()) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            184);
    fflush(stderr);
    ;
    goto err;
  };
  if ((t3 = BN_new()) == NULL) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            185);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_set_word(t3, 1));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            186);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_lshift(t3, t3, l));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            187);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_exp(t1, x, t3, N, bn_ctx));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            188);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_set_word(t3, 4));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            189);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_exp(t2, t3, c, N, bn_ctx));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            190);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_mul(r, t1, t2, N, bn_ctx));
  if (ok != 1) {
    fprintf(stderr, "@@@ %s:%d @@@\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/"
            "daps_h2_mr.c",
            191);
    fflush(stderr);
    ;
    goto err;
  }
  ret = 1;
  goto cleanup;
err:
  ret = 0;
cleanup:
  BN_free(t1);
  BN_free(t2);
  BN_free(t3);
  return ret;
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    1200 <F+0x80>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    0xe24(%rip),%rsi
lea    0xe2c(%rip),%rdx
mov    $0xb7,%ecx
call   1060 <fprintf@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    1249 <F+0xc9>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
lea    0xddb(%rip),%rsi
lea    0xde3(%rip),%rdx
mov    $0xb8,%ecx
call   1060 <fprintf@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    1292 <F+0x112>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
lea    0xd92(%rip),%rsi
lea    0xd9a(%rip),%rdx
mov    $0xb9,%ecx
call   1060 <fprintf@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x50(%rbp),%rdi
mov    $0x1,%esi
call   1030 <BN_set_word@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     12e1 <F+0x161>
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
lea    0xd43(%rip),%rsi
lea    0xd4b(%rip),%rdx
mov    $0xba,%ecx
call   1060 <fprintf@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x50(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   10a0 <BN_lshift@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     1332 <F+0x1b2>
mov    0x2cdb(%rip),%rax
mov    (%rax),%edi
lea    0xcf2(%rip),%rsi
lea    0xcfa(%rip),%rdx
mov    $0xbb,%ecx
call   1060 <fprintf@plt>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1070 <BN_mod_exp@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     138c <F+0x20c>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
lea    0xca0(%rip),%rdx
mov    $0xbc,%ecx
call   1060 <fprintf@plt>
mov    0x2c60(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x50(%rbp),%rdi
mov    $0x4,%esi
call   1030 <BN_set_word@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     13db <F+0x25b>
mov    0x2c32(%rip),%rax
mov    (%rax),%edi
lea    0xc49(%rip),%rsi
lea    0xc51(%rip),%rdx
mov    $0xbd,%ecx
call   1060 <fprintf@plt>
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1070 <BN_mod_exp@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     1435 <F+0x2b5>
mov    0x2bd8(%rip),%rax
mov    (%rax),%edi
lea    0xbef(%rip),%rsi
lea    0xbf7(%rip),%rdx
mov    $0xbe,%ecx
call   1060 <fprintf@plt>
mov    0x2bb7(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
mov    -0x8(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1090 <BN_mod_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     148f <F+0x30f>
mov    0x2b7e(%rip),%rax
mov    (%rax),%edi
lea    0xb95(%rip),%rsi
lea    0xb9d(%rip),%rdx
mov    $0xbf,%ecx
call   1060 <fprintf@plt>
mov    0x2b5d(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    149b <F+0x31b>
movl   $0x1,-0x34(%rbp)
jmp    14a2 <F+0x322>
movl   $0x0,-0x34(%rbp)
mov    -0x40(%rbp),%rdi
call   1050 <BN_free@plt>
mov    -0x48(%rbp),%rdi
call   1050 <BN_free@plt>
mov    -0x50(%rbp),%rdi
call   1050 <BN_free@plt>
mov    -0x34(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%rbx
mov    %r8,%r12
mov    %ecx,%r13d
mov    %rdx,%rbp
mov    %rsi,0x10(%rsp)
mov    %rdi,0x8(%rsp)
xor    %r15d,%r15d
xor    %eax,%eax
call   1040 <BN_new@plt>
mov    %rax,%r14
test   %rax,%rax
je     129e <F+0x11e>
mov    %rbx,(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <BN_new@plt>
test   %rax,%rax
je     12a5 <F+0x125>
mov    %rax,%r15
xor    %eax,%eax
call   1040 <BN_new@plt>
test   %rax,%rax
je     12af <F+0x12f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1,%esi
call   1030 <BN_set_word@plt>
mov    $0xba,%ecx
cmp    $0x1,%eax
jne    12b6 <F+0x136>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
call   10a0 <BN_lshift@plt>
mov    $0xbb,%ecx
cmp    $0x1,%eax
jne    12b6 <F+0x136>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
mov    (%rsp),%r8
call   1070 <BN_mod_exp@plt>
mov    $0xbc,%ecx
cmp    $0x1,%eax
jne    12b6 <F+0x136>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <BN_set_word@plt>
mov    $0xbd,%ecx
cmp    $0x1,%eax
jne    12b6 <F+0x136>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    0x10(%rsp),%rdx
mov    %r12,%rcx
mov    (%rsp),%rbp
mov    %rbp,%r8
call   1070 <BN_mod_exp@plt>
mov    $0xbe,%ecx
cmp    $0x1,%eax
jne    12b6 <F+0x136>
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %rbp,%r8
call   1090 <BN_mod_mul@plt>
mov    $0xbf,%ecx
mov    $0x1,%ebp
cmp    $0x1,%eax
jne    12b6 <F+0x136>
jmp    12dd <F+0x15d>
mov    $0xb7,%ecx
jmp    12b4 <F+0x134>
mov    $0xb8,%ecx
xor    %r15d,%r15d
jmp    12b6 <F+0x136>
mov    $0xb9,%ecx
xor    %ebx,%ebx
mov    0x2d23(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xd39(%rip),%rsi
lea    0xd41(%rip),%rdx
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
call   1080 <fflush@plt>
xor    %ebp,%ebp
mov    %r14,%rdi
call   1050 <BN_free@plt>
mov    %r15,%rdi
call   1050 <BN_free@plt>
mov    %rbx,%rdi
call   1050 <BN_free@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/daps_h2_mr.c\00"
define i32 @F(i32* %0, i32* %1, i32* %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
store i32* null, i32** %15
store i32* null, i32** %16
store i32* null, i32** %17
%18 = call i32* (...) @BN_new()
store i32* %18, i32** %15
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %25
20: ; preds = %6
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 183)
%23 = load i32, i32* @stderr
%24 = call i32 @fflush(i32 %23)
br label %116
25: ; preds = %6
%26 = call i32* (...) @BN_new()
store i32* %26, i32** %16
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = load i32, i32* @stderr
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 184)
%31 = load i32, i32* @stderr
%32 = call i32 @fflush(i32 %31)
br label %116
33: ; preds = %25
%34 = call i32* (...) @BN_new()
store i32* %34, i32** %17
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 185)
%39 = load i32, i32* @stderr
%40 = call i32 @fflush(i32 %39)
br label %116
41: ; preds = %33
%42 = load i32*, i32** %17
%43 = call i32 @BN_set_word(i32* %42, i32 1)
store i32 %43, i32* %14
%44 = load i32, i32* %14
%45 = icmp ne i32 %44, 1
br i1 %45, label %46, label %51
46: ; preds = %41
%47 = load i32, i32* @stderr
%48 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 186)
%49 = load i32, i32* @stderr
%50 = call i32 @fflush(i32 %49)
br label %116
51: ; preds = %41
%52 = load i32*, i32** %17
%53 = load i32*, i32** %17
%54 = load i32, i32* %10
%55 = call i32 @BN_lshift(i32* %52, i32* %53, i32 %54)
store i32 %55, i32* %14
%56 = load i32, i32* %14
%57 = icmp ne i32 %56, 1
br i1 %57, label %58, label %63
58: ; preds = %51
%59 = load i32, i32* @stderr
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 187)
%61 = load i32, i32* @stderr
%62 = call i32 @fflush(i32 %61)
br label %116
63: ; preds = %51
%64 = load i32*, i32** %15
%65 = load i32*, i32** %9
%66 = load i32*, i32** %17
%67 = load i32*, i32** %11
%68 = load i32*, i32** %12
%69 = call i32 @BN_mod_exp(i32* %64, i32* %65, i32* %66, i32* %67, i32* %68)
store i32 %69, i32* %14
%70 = load i32, i32* %14
%71 = icmp ne i32 %70, 1
br i1 %71, label %72, label %77
72: ; preds = %63
%73 = load i32, i32* @stderr
%74 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 188)
%75 = load i32, i32* @stderr
%76 = call i32 @fflush(i32 %75)
br label %116
77: ; preds = %63
%78 = load i32*, i32** %17
%79 = call i32 @BN_set_word(i32* %78, i32 4)
store i32 %79, i32* %14
%80 = load i32, i32* %14
%81 = icmp ne i32 %80, 1
br i1 %81, label %82, label %87
82: ; preds = %77
%83 = load i32, i32* @stderr
%84 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 189)
%85 = load i32, i32* @stderr
%86 = call i32 @fflush(i32 %85)
br label %116
87: ; preds = %77
%88 = load i32*, i32** %16
%89 = load i32*, i32** %17
%90 = load i32*, i32** %8
%91 = load i32*, i32** %11
%92 = load i32*, i32** %12
%93 = call i32 @BN_mod_exp(i32* %88, i32* %89, i32* %90, i32* %91, i32* %92)
store i32 %93, i32* %14
%94 = load i32, i32* %14
%95 = icmp ne i32 %94, 1
br i1 %95, label %96, label %101
96: ; preds = %87
%97 = load i32, i32* @stderr
%98 = call i32 @fprintf(i32 %97, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 190)
%99 = load i32, i32* @stderr
%100 = call i32 @fflush(i32 %99)
br label %116
101: ; preds = %87
%102 = load i32*, i32** %7
%103 = load i32*, i32** %15
%104 = load i32*, i32** %16
%105 = load i32*, i32** %11
%106 = load i32*, i32** %12
%107 = call i32 @BN_mod_mul(i32* %102, i32* %103, i32* %104, i32* %105, i32* %106)
store i32 %107, i32* %14
%108 = load i32, i32* %14
%109 = icmp ne i32 %108, 1
br i1 %109, label %110, label %115
110: ; preds = %101
%111 = load i32, i32* @stderr
%112 = call i32 @fprintf(i32 %111, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 191)
%113 = load i32, i32* @stderr
%114 = call i32 @fflush(i32 %113)
br label %116
115: ; preds = %101
store i32 1, i32* %13
br label %117
116: ; preds = %110, %96, %82, %72, %58, %46, %36, %28, %20
store i32 0, i32* %13
br label %117
117: ; preds = %116, %115
%118 = load i32*, i32** %15
%119 = call i32 @BN_free(i32* %118)
%120 = load i32*, i32** %16
%121 = call i32 @BN_free(i32* %120)
%122 = load i32*, i32** %17
%123 = call i32 @BN_free(i32* %122)
%124 = load i32, i32* %13
ret i32 %124
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/daps_h2_mr.c\00"
define i32 @F(i32* %0, i32* %1, i32* %2, i32 %3, i32* %4, i32* %5) {
%7 = tail call i32* (...) @BN_new()
%8 = icmp eq i32* %7, null
br i1 %8, label %33, label %9
9: ; preds = %6
%10 = tail call i32* (...) @BN_new()
%11 = icmp eq i32* %10, null
br i1 %11, label %33, label %12
12: ; preds = %9
%13 = tail call i32* (...) @BN_new()
%14 = icmp eq i32* %13, null
br i1 %14, label %33, label %15
15: ; preds = %12
%16 = tail call i32 @BN_set_word(i32* %13, i32 1)
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %33
18: ; preds = %15
%19 = tail call i32 @BN_lshift(i32* %13, i32* %13, i32 %3)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %33
21: ; preds = %18
%22 = tail call i32 @BN_mod_exp(i32* %7, i32* %2, i32* %13, i32* %4, i32* %5)
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %33
24: ; preds = %21
%25 = tail call i32 @BN_set_word(i32* %13, i32 4)
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = tail call i32 @BN_mod_exp(i32* %10, i32* %13, i32* %1, i32* %4, i32* %5)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = tail call i32 @BN_mod_mul(i32* %0, i32* %7, i32* %10, i32* %4, i32* %5)
%32 = icmp eq i32 %31, 1
br i1 %32, label %41, label %33
33: ; preds = %30, %27, %24, %21, %18, %15, %12, %9, %6
%34 = phi i32 [ 183, %6 ], [ 184, %9 ], [ 185, %12 ], [ 186, %15 ], [ 187, %18 ], [ 188, %21 ], [ 189, %24 ], [ 190, %27 ], [ 191, %30 ]
%35 = phi i32* [ null, %6 ], [ null, %9 ], [ %10, %12 ], [ %10, %15 ], [ %10, %18 ], [ %10, %21 ], [ %10, %24 ], [ %10, %27 ], [ %10, %30 ]
%36 = phi i32* [ null, %6 ], [ null, %9 ], [ null, %12 ], [ %13, %15 ], [ %13, %18 ], [ %13, %21 ], [ %13, %24 ], [ %13, %27 ], [ %13, %30 ]
%37 = load i32, i32* @stderr
%38 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%39 = load i32, i32* @stderr
%40 = tail call i32 @fflush(i32 %39)
br label %41
41: ; preds = %33, %30
%42 = phi i32 [ 1, %30 ], [ 0, %33 ]
%43 = phi i32* [ %10, %30 ], [ %35, %33 ]
%44 = phi i32* [ %13, %30 ], [ %36, %33 ]
%45 = tail call i32 @BN_free(i32* %7)
%46 = tail call i32 @BN_free(i32* %43)
%47 = tail call i32 @BN_free(i32* %44)
ret i32 %42
}