#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*/ *);
scalar_t__ BN_hex2bn(int /*<<< orphan*/ **, char const *);
int /*<<< orphan*/ test_BN_eq(char *, int, char *, char *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
int /*<<< orphan*/ test_BN_ne(char *, int, char *, char *, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ *);
int test_case(int, char *, int /*<<< orphan*/);
scalar_t__ test_true(char *, int, char *, int);
int test_long_bignum(void) {
  int r;
  BIGNUM *a = NULL, *b = NULL, *c = NULL, *d = NULL;
  const char as[] = "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789012"
                    "FFFFFF";
  const char bs[] = "1234567890123456789012345678901234567890123456789012"
                    "1234567890123456789012345678901234567890123456789013"
                    "987657";
  const char cs[] = "-"
                    "123456789012345678901234567890"
                    "123456789012345678901234567890"
                    "ABCD";
  const char ds[] = "-"
                    "23456789A123456789B123456789C"
                    "123456789D123456789E123456789F"
                    "ABCD";
  r = 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/test_test.c",
                423, "BN_hex2bn(&a, as)", (BN_hex2bn(&a, as)) != 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/test_test.c",
                424, "BN_hex2bn(&b, bs)", (BN_hex2bn(&b, bs)) != 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/test_test.c",
                425, "BN_hex2bn(&c, cs)", (BN_hex2bn(&c, cs)) != 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/test_test.c",
                426, "BN_hex2bn(&d, ds)", (BN_hex2bn(&d, ds)) != 0) &&
      (test_case(
           (0), "TEST_BN_eq(a, b)",
           (test_BN_eq(
               "/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/test_test.c",
               427, "a", "b", a, b))) &
       test_case(
           (0), "TEST_BN_eq(b, a)",
           (test_BN_eq(
               "/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/test_test.c",
               428, "b", "a", b, a))) &
       test_case(
           (0), "TEST_BN_eq(b, NULL)",
           (test_BN_eq(
               "/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/test_test.c",
               429, "b", "NULL", b, NULL))) &
       test_case(
           (0), "TEST_BN_eq(NULL, a)",
           (test_BN_eq(
               "/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/test_test.c",
               430, "NULL", "a", NULL, a))) &
       test_case(
           (1), "TEST_BN_ne(a, NULL)",
           (test_BN_ne(
               "/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/test_test.c",
               431, "a", "NULL", a, NULL))) &
       test_case(
           (0), "TEST_BN_eq(c, d)",
           (test_BN_eq(
               "/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/test_test.c",
               432, "c", "d", c, d))));
  BN_free(a);
  BN_free(b);
  BN_free(c);
  BN_free(d);
  return r;
}


x86 assembly (clang, -O0):
<test_long_bignum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2a0,%rsp
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x170(%rbp),%rdi
lea    0xe57(%rip),%rsi
mov    $0x13f,%edx
call   1080 <memcpy@plt>
lea    -0x1e0(%rbp),%rdi
lea    0xf7f(%rip),%rsi
mov    $0x6f,%edx
call   1080 <memcpy@plt>
lea    -0x230(%rbp),%rdi
lea    0xfd7(%rip),%rsi
mov    $0x42,%edx
call   1080 <memcpy@plt>
lea    -0x280(%rbp),%rdi
lea    0x100f(%rip),%rsi
mov    $0x41,%edx
call   1080 <memcpy@plt>
lea    -0x170(%rbp),%rsi
lea    -0x10(%rbp),%rdi
call   1030 <BN_hex2bn@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0x1023(%rip),%rdi
mov    $0x1a7,%esi
lea    0x10c4(%rip),%rdx
call   1040 <test_true@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x281(%rbp)
je     14cb <test_long_bignum+0x35b>
lea    -0x1e0(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <BN_hex2bn@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xfda(%rip),%rdi
mov    $0x1a8,%esi
lea    0x108d(%rip),%rdx
call   1040 <test_true@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x281(%rbp)
je     14cb <test_long_bignum+0x35b>
lea    -0x230(%rbp),%rsi
lea    -0x20(%rbp),%rdi
call   1030 <BN_hex2bn@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xf91(%rip),%rdi
mov    $0x1a9,%esi
lea    0x1056(%rip),%rdx
call   1040 <test_true@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x281(%rbp)
je     14cb <test_long_bignum+0x35b>
lea    -0x280(%rbp),%rsi
lea    -0x28(%rbp),%rdi
call   1030 <BN_hex2bn@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xf48(%rip),%rdi
mov    $0x1aa,%esi
lea    0x101f(%rip),%rdx
call   1040 <test_true@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x281(%rbp)
je     14cb <test_long_bignum+0x35b>
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xf13(%rip),%rdi
mov    $0x1ab,%esi
lea    0x100d(%rip),%rdx
lea    0x1008(%rip),%rcx
call   1050 <test_BN_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xfe5(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,-0x298(%rbp)
mov    -0x18(%rbp),%r8
mov    -0x10(%rbp),%r9
lea    0xed6(%rip),%rdi
mov    $0x1ac,%esi
lea    0xfd2(%rip),%rdx
lea    0xfc9(%rip),%rcx
call   1050 <test_BN_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xfbd(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,%ecx
mov    -0x298(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x294(%rbp)
mov    -0x18(%rbp),%r8
lea    0xe93(%rip),%rdi
mov    $0x1ad,%esi
lea    0xf8f(%rip),%rdx
lea    0xfaf(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r9d
call   1050 <test_BN_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xf86(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,%ecx
mov    -0x294(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x290(%rbp)
mov    -0x10(%rbp),%r9
lea    0xe4b(%rip),%rdi
mov    $0x1ae,%esi
lea    0xf6e(%rip),%rdx
lea    0xf3e(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1050 <test_BN_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xf57(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,%ecx
mov    -0x290(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x28c(%rbp)
mov    -0x10(%rbp),%r8
lea    0xe03(%rip),%rdi
mov    $0x1af,%esi
lea    0xefd(%rip),%rdx
lea    0xf1f(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r9d
call   1060 <test_BN_ne@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xf20(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,%ecx
mov    -0x28c(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x288(%rbp)
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    0xdb4(%rip),%rdi
mov    $0x1b0,%esi
lea    0xe53(%rip),%rdx
lea    0xf0e(%rip),%rcx
call   1050 <test_BN_eq@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xeed(%rip),%rsi
call   1090 <test_case@plt>
mov    %eax,%ecx
mov    -0x288(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x281(%rbp)
mov    -0x281(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <BN_free@plt>
mov    -0x18(%rbp),%rdi
call   1070 <BN_free@plt>
mov    -0x20(%rbp),%rdi
call   1070 <BN_free@plt>
mov    -0x28(%rbp),%rdi
call   1070 <BN_free@plt>
mov    -0x4(%rbp),%eax
add    $0x2a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_long_bignum>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x278,%rsp
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
lea    0xe55(%rip),%rsi
lea    0x130(%rsp),%rbx
mov    $0x13f,%edx
mov    %rbx,%rdi
call   1080 <memcpy@plt>
movups 0xfd8(%rip),%xmm0
movups %xmm0,0x11f(%rsp)
movaps 0xfba(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xf9b(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xf7c(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf5d(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xf3e(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xf1f(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xfb0(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf91(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xf72(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xf53(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movw   $0x44,0xb0(%rsp)
movaps 0xfbd(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xfa1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf85(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xf69(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movb   $0x0,0x60(%rsp)
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1030 <BN_hex2bn@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xf86(%rip),%rdi
lea    0x102c(%rip),%rdx
mov    $0x1a7,%esi
call   1040 <test_true@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     14c8 <test_long_bignum+0x358>
lea    0x8(%rsp),%rdi
lea    0xc0(%rsp),%rsi
call   1030 <BN_hex2bn@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xf49(%rip),%rdi
lea    0x1001(%rip),%rdx
mov    $0x1a8,%esi
call   1040 <test_true@plt>
test   %rax,%rax
je     14c8 <test_long_bignum+0x358>
lea    0x18(%rsp),%rdi
lea    0x70(%rsp),%rsi
call   1030 <BN_hex2bn@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xf11(%rip),%rdi
lea    0xfdb(%rip),%rdx
mov    $0x1a9,%esi
call   1040 <test_true@plt>
test   %rax,%rax
je     14c8 <test_long_bignum+0x358>
lea    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1030 <BN_hex2bn@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xed9(%rip),%rdi
lea    0xfb5(%rip),%rdx
mov    $0x1aa,%esi
call   1040 <test_true@plt>
test   %rax,%rax
je     14c8 <test_long_bignum+0x358>
mov    (%rsp),%r8
mov    0x8(%rsp),%r9
lea    0xeaf(%rip),%r15
lea    0xfae(%rip),%r14
lea    0xfa9(%rip),%r13
mov    %r15,%rdi
mov    $0x1ab,%esi
mov    %r14,%rdx
mov    %r13,%rcx
call   1050 <test_BN_eq@plt>
lea    0xf7c(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%r8
mov    (%rsp),%r9
mov    %r15,%rdi
mov    $0x1ac,%esi
mov    %r13,%rdx
mov    %r14,%rcx
call   1050 <test_BN_eq@plt>
lea    0xf63(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    0x8(%rsp),%r8
lea    0xf6f(%rip),%r12
mov    %r15,%rdi
mov    $0x1ad,%esi
mov    %r13,%rdx
mov    %r12,%rcx
xor    %r9d,%r9d
call   1050 <test_BN_eq@plt>
lea    0xf3e(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
mov    %eax,%r13d
mov    (%rsp),%r9
mov    %r15,%rdi
mov    $0x1ae,%esi
mov    %r12,%rdx
mov    %r14,%rcx
xor    %r8d,%r8d
call   1050 <test_BN_eq@plt>
lea    0xf2a(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
mov    %eax,%ebx
and    %r13d,%ebx
and    %ebp,%ebx
mov    (%rsp),%r8
mov    %r15,%rdi
mov    $0x1af,%esi
mov    %r14,%rdx
mov    %r12,%rcx
xor    %r9d,%r9d
call   1060 <test_BN_ne@plt>
lea    0xf0d(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    0x18(%rsp),%r8
mov    0x10(%rsp),%r9
lea    0xe4f(%rip),%rdx
lea    0xf0a(%rip),%rcx
mov    %r15,%rdi
mov    $0x1b0,%esi
call   1050 <test_BN_eq@plt>
lea    0xee5(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
call   1090 <test_case@plt>
xor    %ebx,%ebx
test   %eax,%ebp
setne  %bl
mov    (%rsp),%rdi
call   1070 <BN_free@plt>
mov    0x8(%rsp),%rdi
call   1070 <BN_free@plt>
mov    0x18(%rsp),%rdi
call   1070 <BN_free@plt>
mov    0x10(%rsp),%rdi
call   1070 <BN_free@plt>
mov    %ebx,%eax
add    $0x278,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.test_long_bignum.as = [319 x i8] c"123456789012345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789012123456789012345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789012FFFFFF\00"
@__const.test_long_bignum.bs = [111 x i8] c"12345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789013987657\00"
@__const.test_long_bignum.cs = [66 x i8] c"-123456789012345678901234567890123456789012345678901234567890ABCD\00"
@__const.test_long_bignum.ds = [65 x i8] c"-23456789A123456789B123456789C123456789D123456789E123456789FABCD\00"
@.str = [173 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/test_test.c\00"
@.str.1 = [18 x i8] c"BN_hex2bn(&a, as)\00"
@.str.2 = [18 x i8] c"BN_hex2bn(&b, bs)\00"
@.str.3 = [18 x i8] c"BN_hex2bn(&c, cs)\00"
@.str.4 = [18 x i8] c"BN_hex2bn(&d, ds)\00"
@.str.5 = [17 x i8] c"TEST_BN_eq(a, b)\00"
@.str.6 = [2 x i8] c"a\00"
@.str.7 = [2 x i8] c"b\00"
@.str.8 = [17 x i8] c"TEST_BN_eq(b, a)\00"
@.str.9 = [20 x i8] c"TEST_BN_eq(b, NULL)\00"
@.str.10 = [5 x i8] c"NULL\00"
@.str.11 = [20 x i8] c"TEST_BN_eq(NULL, a)\00"
@.str.12 = [20 x i8] c"TEST_BN_ne(a, NULL)\00"
@.str.13 = [17 x i8] c"TEST_BN_eq(c, d)\00"
@.str.14 = [2 x i8] c"c\00"
@.str.15 = [2 x i8] c"d\00"
define i32 @test_long_bignum() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca [319 x i8]
%7 = alloca [111 x i8]
%8 = alloca [66 x i8]
%9 = alloca [65 x i8]
store i32* null, i32** %2
store i32* null, i32** %3
store i32* null, i32** %4
store i32* null, i32** %5
%10 = bitcast [319 x i8]* %6 to i8*
%11 = bitcast [111 x i8]* %7 to i8*
%12 = bitcast [66 x i8]* %8 to i8*
%13 = bitcast [65 x i8]* %9 to i8*
%14 = getelementptr inbounds [319 x i8], [319 x i8]* %6, i64 0, i64 0
%15 = call i64 @BN_hex2bn(i32** %2, i8* %14)
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 423, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %69
20: ; preds = %0
%21 = getelementptr inbounds [111 x i8], [111 x i8]* %7, i64 0, i64 0
%22 = call i64 @BN_hex2bn(i32** %3, i8* %21)
%23 = icmp ne i64 %22, 0
%24 = zext i1 %23 to i32
%25 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 424, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %69
27: ; preds = %20
%28 = getelementptr inbounds [66 x i8], [66 x i8]* %8, i64 0, i64 0
%29 = call i64 @BN_hex2bn(i32** %4, i8* %28)
%30 = icmp ne i64 %29, 0
%31 = zext i1 %30 to i32
%32 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %69
34: ; preds = %27
%35 = getelementptr inbounds [65 x i8], [65 x i8]* %9, i64 0, i64 0
%36 = call i64 @BN_hex2bn(i32** %5, i8* %35)
%37 = icmp ne i64 %36, 0
%38 = zext i1 %37 to i32
%39 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 426, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %69
41: ; preds = %34
%42 = load i32*, i32** %2
%43 = load i32*, i32** %3
%44 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 427, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32* %42, i32* %43)
%45 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %44)
%46 = load i32*, i32** %3
%47 = load i32*, i32** %2
%48 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 428, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %46, i32* %47)
%49 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %48)
%50 = and i32 %45, %49
%51 = load i32*, i32** %3
%52 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 429, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32* %51, i32* null)
%53 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %52)
%54 = and i32 %50, %53
%55 = load i32*, i32** %2
%56 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* null, i32* %55)
%57 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i32 %56)
%58 = and i32 %54, %57
%59 = load i32*, i32** %2
%60 = call i32 @test_BN_ne(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 431, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32* %59, i32* null)
%61 = call i32 @test_case(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %60)
%62 = and i32 %58, %61
%63 = load i32*, i32** %4
%64 = load i32*, i32** %5
%65 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 432, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i32* %63, i32* %64)
%66 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %65)
%67 = and i32 %62, %66
%68 = icmp ne i32 %67, 0
br label %69
69: ; preds = %41, %34, %27, %20, %0
%70 = phi i1 [ false, %34 ], [ false, %27 ], [ false, %20 ], [ false, %0 ], [ %68, %41 ]
%71 = zext i1 %70 to i32
store i32 %71, i32* %1
%72 = load i32*, i32** %2
%73 = call i32 @BN_free(i32* %72)
%74 = load i32*, i32** %3
%75 = call i32 @BN_free(i32* %74)
%76 = load i32*, i32** %4
%77 = call i32 @BN_free(i32* %76)
%78 = load i32*, i32** %5
%79 = call i32 @BN_free(i32* %78)
%80 = load i32, i32* %1
ret i32 %80
}

LLVM IR (-O2):
@__const.test_long_bignum.as = [319 x i8] c"123456789012345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789012123456789012345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789012FFFFFF\00"
@__const.test_long_bignum.bs = [111 x i8] c"12345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789013987657\00"
@__const.test_long_bignum.cs = [66 x i8] c"-123456789012345678901234567890123456789012345678901234567890ABCD\00"
@__const.test_long_bignum.ds = [65 x i8] c"-23456789A123456789B123456789C123456789D123456789E123456789FABCD\00"
@.str = [173 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/test_test.c\00"
@.str.1 = [18 x i8] c"BN_hex2bn(&a, as)\00"
@.str.2 = [18 x i8] c"BN_hex2bn(&b, bs)\00"
@.str.3 = [18 x i8] c"BN_hex2bn(&c, cs)\00"
@.str.4 = [18 x i8] c"BN_hex2bn(&d, ds)\00"
@.str.5 = [17 x i8] c"TEST_BN_eq(a, b)\00"
@.str.6 = [2 x i8] c"a\00"
@.str.7 = [2 x i8] c"b\00"
@.str.8 = [17 x i8] c"TEST_BN_eq(b, a)\00"
@.str.9 = [20 x i8] c"TEST_BN_eq(b, NULL)\00"
@.str.10 = [5 x i8] c"NULL\00"
@.str.11 = [20 x i8] c"TEST_BN_eq(NULL, a)\00"
@.str.12 = [20 x i8] c"TEST_BN_ne(a, NULL)\00"
@.str.13 = [17 x i8] c"TEST_BN_eq(c, d)\00"
@.str.14 = [2 x i8] c"c\00"
@.str.15 = [2 x i8] c"d\00"
define i32 @test_long_bignum() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [319 x i8]
%6 = alloca [111 x i8]
%7 = alloca [66 x i8]
%8 = alloca [65 x i8]
%9 = bitcast i32** %1 to i8*
store i32* null, i32** %1
%10 = bitcast i32** %2 to i8*
store i32* null, i32** %2
%11 = bitcast i32** %3 to i8*
store i32* null, i32** %3
%12 = bitcast i32** %4 to i8*
store i32* null, i32** %4
%13 = getelementptr inbounds [319 x i8], [319 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [111 x i8], [111 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [66 x i8], [66 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%17 = call i64 @BN_hex2bn(i32** %1, i8* %13)
%18 = icmp ne i64 %17, 0
%19 = zext i1 %18 to i32
%20 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 423, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %69, label %22
22: ; preds = %0
%23 = call i64 @BN_hex2bn(i32** %2, i8* %14)
%24 = icmp ne i64 %23, 0
%25 = zext i1 %24 to i32
%26 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 424, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %69, label %28
28: ; preds = %22
%29 = call i64 @BN_hex2bn(i32** %3, i8* %15)
%30 = icmp ne i64 %29, 0
%31 = zext i1 %30 to i32
%32 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%33 = icmp eq i64 %32, 0
br i1 %33, label %69, label %34
34: ; preds = %28
%35 = call i64 @BN_hex2bn(i32** %4, i8* %16)
%36 = icmp ne i64 %35, 0
%37 = zext i1 %36 to i32
%38 = call i64 @test_true(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 426, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = icmp eq i64 %38, 0
br i1 %39, label %69, label %40
40: ; preds = %34
%41 = load i32*, i32** %1
%42 = load i32*, i32** %2
%43 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 427, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32* %41, i32* %42)
%44 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %43)
%45 = load i32*, i32** %2
%46 = load i32*, i32** %1
%47 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 428, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* %45, i32* %46)
%48 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %47)
%49 = and i32 %48, %44
%50 = load i32*, i32** %2
%51 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 429, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32* %50, i32* null)
%52 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %51)
%53 = and i32 %49, %52
%54 = load i32*, i32** %1
%55 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i32* null, i32* %54)
%56 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i32 %55)
%57 = and i32 %53, %56
%58 = load i32*, i32** %1
%59 = call i32 @test_BN_ne(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 431, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32* %58, i32* null)
%60 = call i32 @test_case(i32 1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %59)
%61 = and i32 %57, %60
%62 = load i32*, i32** %3
%63 = load i32*, i32** %4
%64 = call i32 @test_BN_eq(i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str, i64 0, i64 0), i32 432, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i32* %62, i32* %63)
%65 = call i32 @test_case(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %64)
%66 = and i32 %61, %65
%67 = icmp ne i32 %66, 0
%68 = zext i1 %67 to i32
br label %69
69: ; preds = %40, %34, %28, %22, %0
%70 = phi i32 [ 0, %34 ], [ 0, %28 ], [ 0, %22 ], [ 0, %0 ], [ %68, %40 ]
%71 = load i32*, i32** %1
%72 = call i32 @BN_free(i32* %71)
%73 = load i32*, i32** %2
%74 = call i32 @BN_free(i32* %73)
%75 = load i32*, i32** %3
%76 = call i32 @BN_free(i32* %75)
%77 = load i32*, i32** %4
%78 = call i32 @BN_free(i32* %77)
ret i32 %70
}