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

/* Variables and functions */
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_new();
scalar_t__ BN_rand(int /*<<< orphan*/ *, int, int, int);
int /*<<< orphan*/ test_BN_eq_one(char *, int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ test_BN_eq_word(char *, int, char *, char *,
                                   int /*<<< orphan*/ *, int);
int /*<<< orphan*/ test_false(char *, int, char *, int);
int /*<<< orphan*/ test_ptr(char *, int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ test_true(char *, int, char *, int);
int test_rand(void) {
  BIGNUM *bn = NULL;
  int st = 0;
  if (!test_ptr("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/"
                "refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c",
                1935, "bn = BN_new()", bn = BN_new()))
    return 0;
  if (!test_false(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1939, "BN_rand(bn, 0, 0 , 0 )", (BN_rand(bn, 0, 0, 0)) != 0) ||
      !test_false(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1940, "BN_rand(bn, 0, 1 , 1 )", (BN_rand(bn, 0, 1, 1)) != 0) ||
      !test_true(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1941, "BN_rand(bn, 1, 0 , 0 )", (BN_rand(bn, 1, 0, 0)) != 0) ||
      !test_BN_eq_one(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1942, "bn", bn) ||
      !test_false(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1943, "BN_rand(bn, 1, 1 , 0 )", (BN_rand(bn, 1, 1, 0)) != 0) ||
      !test_true(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1944, "BN_rand(bn, 1, -1 , 1 )", (BN_rand(bn, 1, -1, 1)) != 0) ||
      !test_BN_eq_one(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1945, "bn", bn) ||
      !test_true(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1946, "BN_rand(bn, 2, 1 , 0 )", (BN_rand(bn, 2, 1, 0)) != 0) ||
      !test_BN_eq_word(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/"
          "master/Src/OSF/OpenSSL-111/test/bntest.c",
          1947, "bn", "3", bn, 3))
    goto err;
  st = 1;
err:
  BN_free(bn);
  return st;
}


x86 assembly (clang, -O0):
<test_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1070 <BN_new@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xe54(%rip),%rdi
mov    $0x78f,%esi
lea    0xef2(%rip),%rdx
call   1080 <test_ptr@plt>
cmp    $0x0,%eax
jne    11d2 <test_rand+0x52>
movl   $0x0,-0x4(%rbp)
jmp    13e6 <test_rand+0x266>
mov    -0x10(%rbp),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xe0c(%rip),%rdi
mov    $0x793,%esi
lea    0xeb8(%rip),%rdx
call   1040 <test_false@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xdcd(%rip),%rdi
mov    $0x794,%esi
lea    0xe90(%rip),%rdx
call   1040 <test_false@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xd8e(%rip),%rdi
mov    $0x795,%esi
lea    0xe68(%rip),%rdx
call   1060 <test_true@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rcx
lea    0xd69(%rip),%rdi
mov    $0x796,%esi
lea    0xe5a(%rip),%rdx
call   1030 <test_BN_eq_one@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xd2a(%rip),%rdi
mov    $0x797,%esi
lea    0xe1e(%rip),%rdx
call   1040 <test_false@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rdi
mov    $0x1,%ecx
mov    $0xffffffff,%edx
mov    %ecx,%esi
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xce8(%rip),%rdi
mov    $0x798,%esi
lea    0xdf3(%rip),%rdx
call   1060 <test_true@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rcx
lea    0xcc3(%rip),%rdi
mov    $0x799,%esi
lea    0xdb4(%rip),%rdx
call   1030 <test_BN_eq_one@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1050 <BN_rand@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xc81(%rip),%rdi
mov    $0x79a,%esi
lea    0xda4(%rip),%rdx
call   1060 <test_true@plt>
cmp    $0x0,%eax
je     13cb <test_rand+0x24b>
mov    -0x10(%rbp),%r8
lea    0xc5c(%rip),%rdi
mov    $0x79b,%esi
lea    0xd4d(%rip),%rdx
lea    0xd8f(%rip),%rcx
mov    $0x3,%r9d
call   10a0 <test_BN_eq_word@plt>
cmp    $0x0,%eax
jne    13d0 <test_rand+0x250>
jmp    13d7 <test_rand+0x257>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <BN_free@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rand>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1070 <BN_new@plt>
mov    %rax,%rbx
lea    0xe6a(%rip),%rdi
lea    0xf0d(%rip),%rdx
mov    $0x78f,%esi
mov    %rax,%rcx
call   1080 <test_ptr@plt>
test   %eax,%eax
je     1394 <test_rand+0x214>
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xe2f(%rip),%rdi
lea    0xee0(%rip),%rdx
mov    $0x793,%esi
call   1040 <test_false@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xdf1(%rip),%rdi
lea    0xeb9(%rip),%rdx
mov    $0x794,%esi
call   1040 <test_false@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xdb6(%rip),%rdi
lea    0xe95(%rip),%rdx
mov    $0x795,%esi
call   1060 <test_true@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
lea    0xd96(%rip),%rdi
lea    0xe8c(%rip),%rdx
mov    $0x796,%esi
mov    %rbx,%rcx
call   1030 <test_BN_eq_one@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xd55(%rip),%rdi
lea    0xe4e(%rip),%rdx
mov    $0x797,%esi
call   1040 <test_false@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xd16(%rip),%rdi
lea    0xe26(%rip),%rdx
mov    $0x798,%esi
call   1060 <test_true@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
lea    0xcf6(%rip),%rdi
lea    0xdec(%rip),%rdx
mov    $0x799,%esi
mov    %rbx,%rcx
call   1030 <test_BN_eq_one@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1050 <BN_rand@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xcb9(%rip),%rdi
lea    0xde1(%rip),%rdx
mov    $0x79a,%esi
call   1060 <test_true@plt>
test   %eax,%eax
je     138c <test_rand+0x20c>
lea    0xc9d(%rip),%rdi
lea    0xd93(%rip),%rdx
lea    0xdd5(%rip),%rcx
mov    $0x79b,%esi
mov    %rbx,%r8
mov    $0x3,%r9d
call   10a0 <test_BN_eq_word@plt>
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
mov    %rbx,%rdi
call   1090 <BN_free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [170 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c\00"
@.str.1 = [14 x i8] c"bn = BN_new()\00"
@.str.2 = [23 x i8] c"BN_rand(bn, 0, 0 , 0 )\00"
@.str.3 = [23 x i8] c"BN_rand(bn, 0, 1 , 1 )\00"
@.str.4 = [23 x i8] c"BN_rand(bn, 1, 0 , 0 )\00"
@.str.5 = [3 x i8] c"bn\00"
@.str.6 = [23 x i8] c"BN_rand(bn, 1, 1 , 0 )\00"
@.str.7 = [24 x i8] c"BN_rand(bn, 1, -1 , 1 )\00"
@.str.8 = [23 x i8] c"BN_rand(bn, 2, 1 , 0 )\00"
@.str.9 = [2 x i8] c"3\00"
define i32 @test_rand() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32* null, i32** %2
store i32 0, i32* %3
%4 = call i32* (...) @BN_new()
store i32* %4, i32** %2
%5 = call i32 @test_ptr(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1935, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %0
store i32 0, i32* %1
br label %68
8: ; preds = %0
%9 = load i32*, i32** %2
%10 = call i64 @BN_rand(i32* %9, i32 0, i32 0, i32 0)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1939, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %62
15: ; preds = %8
%16 = load i32*, i32** %2
%17 = call i64 @BN_rand(i32* %16, i32 0, i32 1, i32 1)
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
%20 = call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1940, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %62
22: ; preds = %15
%23 = load i32*, i32** %2
%24 = call i64 @BN_rand(i32* %23, i32 1, i32 0, i32 0)
%25 = icmp ne i64 %24, 0
%26 = zext i1 %25 to i32
%27 = call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1941, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %62
29: ; preds = %22
%30 = load i32*, i32** %2
%31 = call i32 @test_BN_eq_one(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1942, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %30)
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %62
33: ; preds = %29
%34 = load i32*, i32** %2
%35 = call i64 @BN_rand(i32* %34, i32 1, i32 1, i32 0)
%36 = icmp ne i64 %35, 0
%37 = zext i1 %36 to i32
%38 = call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1943, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %62
40: ; preds = %33
%41 = load i32*, i32** %2
%42 = call i64 @BN_rand(i32* %41, i32 1, i32 -1, i32 1)
%43 = icmp ne i64 %42, 0
%44 = zext i1 %43 to i32
%45 = call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1944, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %44)
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %62
47: ; preds = %40
%48 = load i32*, i32** %2
%49 = call i32 @test_BN_eq_one(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1945, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %62
51: ; preds = %47
%52 = load i32*, i32** %2
%53 = call i64 @BN_rand(i32* %52, i32 2, i32 1, i32 0)
%54 = icmp ne i64 %53, 0
%55 = zext i1 %54 to i32
%56 = call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1946, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %51
%59 = load i32*, i32** %2
%60 = call i32 @test_BN_eq_word(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1947, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32* %59, i32 3)
%61 = icmp ne i32 %60, 0
br i1 %61, label %63, label %62
62: ; preds = %58, %51, %47, %40, %33, %29, %22, %15, %8
br label %64
63: ; preds = %58
store i32 1, i32* %3
br label %64
64: ; preds = %63, %62
%65 = load i32*, i32** %2
%66 = call i32 @BN_free(i32* %65)
%67 = load i32, i32* %3
store i32 %67, i32* %1
br label %68
68: ; preds = %64, %7
%69 = load i32, i32* %1
ret i32 %69
}

LLVM IR (-O2):
@.str = [170 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c\00"
@.str.1 = [14 x i8] c"bn = BN_new()\00"
@.str.2 = [23 x i8] c"BN_rand(bn, 0, 0 , 0 )\00"
@.str.3 = [23 x i8] c"BN_rand(bn, 0, 1 , 1 )\00"
@.str.4 = [23 x i8] c"BN_rand(bn, 1, 0 , 0 )\00"
@.str.5 = [3 x i8] c"bn\00"
@.str.6 = [23 x i8] c"BN_rand(bn, 1, 1 , 0 )\00"
@.str.7 = [24 x i8] c"BN_rand(bn, 1, -1 , 1 )\00"
@.str.8 = [23 x i8] c"BN_rand(bn, 2, 1 , 0 )\00"
@.str.9 = [2 x i8] c"3\00"
define i32 @test_rand() {
%1 = tail call i32* (...) @BN_new()
%2 = tail call i32 @test_ptr(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1935, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %53, label %4
4: ; preds = %0
%5 = tail call i64 @BN_rand(i32* %1, i32 0, i32 0, i32 0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1939, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %50, label %10
10: ; preds = %4
%11 = tail call i64 @BN_rand(i32* %1, i32 0, i32 1, i32 1)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i32
%14 = tail call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1940, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %50, label %16
16: ; preds = %10
%17 = tail call i64 @BN_rand(i32* %1, i32 1, i32 0, i32 0)
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
%20 = tail call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1941, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %19)
%21 = icmp eq i32 %20, 0
br i1 %21, label %50, label %22
22: ; preds = %16
%23 = tail call i32 @test_BN_eq_one(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1942, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%24 = icmp eq i32 %23, 0
br i1 %24, label %50, label %25
25: ; preds = %22
%26 = tail call i64 @BN_rand(i32* %1, i32 1, i32 1, i32 0)
%27 = icmp ne i64 %26, 0
%28 = zext i1 %27 to i32
%29 = tail call i32 @test_false(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1943, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %28)
%30 = icmp eq i32 %29, 0
br i1 %30, label %50, label %31
31: ; preds = %25
%32 = tail call i64 @BN_rand(i32* %1, i32 1, i32 -1, i32 1)
%33 = icmp ne i64 %32, 0
%34 = zext i1 %33 to i32
%35 = tail call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1944, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %34)
%36 = icmp eq i32 %35, 0
br i1 %36, label %50, label %37
37: ; preds = %31
%38 = tail call i32 @test_BN_eq_one(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1945, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%39 = icmp eq i32 %38, 0
br i1 %39, label %50, label %40
40: ; preds = %37
%41 = tail call i64 @BN_rand(i32* %1, i32 2, i32 1, i32 0)
%42 = icmp ne i64 %41, 0
%43 = zext i1 %42 to i32
%44 = tail call i32 @test_true(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1946, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %43)
%45 = icmp eq i32 %44, 0
br i1 %45, label %50, label %46
46: ; preds = %40
%47 = tail call i32 @test_BN_eq_word(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @.str, i64 0, i64 0), i32 1947, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32* %1, i32 3)
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i32
br label %50
50: ; preds = %46, %4, %10, %16, %22, %25, %31, %37, %40
%51 = phi i32 [ 0, %40 ], [ 0, %37 ], [ 0, %31 ], [ 0, %25 ], [ 0, %22 ], [ 0, %16 ], [ 0, %10 ], [ 0, %4 ], [ %49, %46 ]
%52 = tail call i32 @BN_free(i32* %1)
br label %53
53: ; preds = %0, %50
%54 = phi i32 [ %51, %50 ], [ 0, %0 ]
ret i32 %54
}