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

/* Variables and functions */
int /*<<< orphan*/ BIO_FLAGS_MEM_RDONLY;
int /*<<< orphan*/ BIO_clear_flags(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ BIO_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_new(int /*<<< orphan*/);
int /*<<< orphan*/ BIO_puts(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ BIO_read(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ BIO_reset(int /*<<< orphan*/ *);
int /*<<< orphan*/ BIO_s_mem();
int /*<<< orphan*/ BIO_set_flags(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ test_int_eq(char *, int, char *, char *, int /*<<< orphan*/,
                               int);
int /*<<< orphan*/ test_int_gt(char *, int, char *, char *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int /*<<< orphan*/ test_mem_eq(char *, int, char *, char *, char *, int, char *,
                               int);
int /*<<< orphan*/ test_ptr(char *, int, char *, int /*<<< orphan*/ *);
int test_bio_rdwr_rdonly(void) {
  int ok = 0;
  BIO *bio = NULL;
  char data[16];
  bio = BIO_new(BIO_s_mem());
  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/bio_memleak_test.c",
                154, "bio", bio))
    goto finish;
  if (!test_int_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/bio_memleak_test.c",
          156, "BIO_puts(bio, \"Hello World\\n\")", "12",
          BIO_puts(bio, "Hello World\n"), 12))
    goto finish;
  BIO_set_flags(bio, BIO_FLAGS_MEM_RDONLY);
  if (!test_int_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/bio_memleak_test.c",
          160, "BIO_read(bio, data, 16)", "12", BIO_read(bio, data, 16), 12))
    goto finish;
  if (!test_mem_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/bio_memleak_test.c",
          162, "data", "\"Hello World\\n\"", data, 12, "Hello World\n", 12))
    goto finish;
  if (!test_int_gt(
          "/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/bio_memleak_test.c",
          164, "BIO_reset(bio)", "0", BIO_reset(bio), 0))
    goto finish;
  BIO_clear_flags(bio, BIO_FLAGS_MEM_RDONLY);
  if (!test_int_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/bio_memleak_test.c",
          168, "BIO_puts(bio, \"Hi!\\n\")", "4", BIO_puts(bio, "Hi!\n"), 4))
    goto finish;
  if (!test_int_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/bio_memleak_test.c",
          170, "BIO_read(bio, data, 16)", "16", BIO_read(bio, data, 16), 16))
    goto finish;
  if (!test_mem_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/bio_memleak_test.c",
          173, "data", "\"Hello World\\nHi!\\n\"", data, 16,
          "Hello World\nHi!\n", 16))
    goto finish;
  ok = 1;
finish:
  BIO_free(bio);
  return ok;
}


x86 assembly (clang, -O0):
<test_bio_rdwr_rdonly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   10e0 <BIO_s_mem@plt>
mov    %eax,%edi
call   1090 <BIO_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0xe0c(%rip),%rdi
mov    $0x9a,%esi
lea    0xeb4(%rip),%rdx
call   1050 <test_ptr@plt>
cmp    $0x0,%eax
jne    1213 <test_bio_rdwr_rdonly+0x53>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   10c0 <BIO_puts@plt>
mov    %eax,%r8d
lea    0xdd3(%rip),%rdi
mov    $0x9c,%esi
lea    0xe7f(%rip),%rdx
lea    0xe97(%rip),%rcx
mov    $0xc,%r9d
call   1060 <test_int_eq@plt>
cmp    $0x0,%eax
jne    1259 <test_bio_rdwr_rdonly+0x99>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
mov    -0x10(%rbp),%rdi
mov    0x2d7c(%rip),%rax
mov    (%rax),%esi
call   1070 <BIO_set_flags@plt>
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x10,%edx
call   1040 <BIO_read@plt>
mov    %eax,%r8d
lea    0xd79(%rip),%rdi
mov    $0xa0,%esi
lea    0xe54(%rip),%rdx
lea    0xe3d(%rip),%rcx
mov    $0xc,%r9d
call   1060 <test_int_eq@plt>
cmp    $0x0,%eax
jne    12b3 <test_bio_rdwr_rdonly+0xf3>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
lea    -0x20(%rbp),%r8
lea    0xd42(%rip),%rdi
mov    $0xa2,%esi
lea    0xe35(%rip),%rdx
lea    0xe33(%rip),%rcx
mov    $0xc,%r9d
lea    0xdfc(%rip),%rax
mov    %rax,(%rsp)
movl   $0xc,0x8(%rsp)
call   10b0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    12fd <test_bio_rdwr_rdonly+0x13d>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
mov    -0x10(%rbp),%rdi
call   10d0 <BIO_reset@plt>
mov    %eax,%r8d
lea    0xcf0(%rip),%rdi
mov    $0xa4,%esi
lea    0xdf8(%rip),%rdx
lea    0xe00(%rip),%rcx
xor    %r9d,%r9d
call   1030 <test_int_gt@plt>
cmp    $0x0,%eax
jne    1339 <test_bio_rdwr_rdonly+0x179>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
mov    -0x10(%rbp),%rdi
mov    0x2c9c(%rip),%rax
mov    (%rax),%esi
call   1080 <BIO_clear_flags@plt>
mov    -0x10(%rbp),%rdi
lea    0xe0c(%rip),%rsi
call   10c0 <BIO_puts@plt>
mov    %eax,%r8d
lea    0xc9b(%rip),%rdi
mov    $0xa8,%esi
lea    0xdb4(%rip),%rdx
lea    0xdc4(%rip),%rcx
mov    $0x4,%r9d
call   1060 <test_int_eq@plt>
cmp    $0x0,%eax
jne    1391 <test_bio_rdwr_rdonly+0x1d1>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x10,%edx
call   1040 <BIO_read@plt>
mov    %eax,%r8d
lea    0xc53(%rip),%rdi
mov    $0xaa,%esi
lea    0xd2e(%rip),%rdx
lea    0xd7e(%rip),%rcx
mov    $0x10,%r9d
call   1060 <test_int_eq@plt>
cmp    $0x0,%eax
jne    13d9 <test_bio_rdwr_rdonly+0x219>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
lea    -0x20(%rbp),%r8
lea    0xc1c(%rip),%rdi
mov    $0xad,%esi
lea    0xd0f(%rip),%rdx
lea    0xd4a(%rip),%rcx
mov    $0x10,%r9d
lea    0xd52(%rip),%rax
mov    %rax,(%rsp)
movl   $0x10,0x8(%rsp)
call   10b0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    1423 <test_bio_rdwr_rdonly+0x263>
jmp    142a <test_bio_rdwr_rdonly+0x26a>
movl   $0x1,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <BIO_free@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bio_rdwr_rdonly>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
xor    %ebp,%ebp
xor    %eax,%eax
call   10e0 <BIO_s_mem@plt>
mov    %eax,%edi
call   1090 <BIO_new@plt>
mov    %rax,%rbx
lea    0xe1c(%rip),%rdi
lea    0xec9(%rip),%rdx
mov    $0x9a,%esi
mov    %rax,%rcx
call   1050 <test_ptr@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
lea    0xed3(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10c0 <BIO_puts@plt>
lea    0xde7(%rip),%rdi
lea    0xe98(%rip),%rdx
lea    0xeb0(%rip),%rcx
mov    $0x9c,%esi
mov    %eax,%r8d
mov    $0xc,%r9d
call   1060 <test_int_eq@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
mov    0x2d97(%rip),%r15
mov    (%r15),%esi
mov    %rbx,%rdi
call   1070 <BIO_set_flags@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x10,%edx
call   1040 <BIO_read@plt>
lea    0xd95(%rip),%rdi
lea    0xe75(%rip),%rdx
lea    0xe5e(%rip),%rcx
mov    $0xa0,%esi
mov    %eax,%r8d
mov    $0xc,%r9d
call   1060 <test_int_eq@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
lea    0xd65(%rip),%rdi
lea    0xe5d(%rip),%rdx
lea    0xe5b(%rip),%rcx
mov    %rsp,%r8
mov    $0xa2,%esi
mov    $0xc,%r9d
push   $0xc
push   %r14
call   10b0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
mov    %rbx,%rdi
call   10d0 <BIO_reset@plt>
lea    0xd25(%rip),%rdi
lea    0xe32(%rip),%rdx
lea    0xe3a(%rip),%rcx
xor    %ebp,%ebp
mov    $0xa4,%esi
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <test_int_gt@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1080 <BIO_clear_flags@plt>
lea    0xe4d(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <BIO_puts@plt>
lea    0xcdc(%rip),%rdi
lea    0xdfa(%rip),%rdx
lea    0xe0a(%rip),%rcx
mov    $0xa8,%esi
mov    %eax,%r8d
mov    $0x4,%r9d
call   1060 <test_int_eq@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x10,%edx
call   1040 <BIO_read@plt>
lea    0xca0(%rip),%rdi
lea    0xd80(%rip),%rdx
lea    0xdd0(%rip),%rcx
mov    $0xaa,%esi
mov    %eax,%r8d
mov    $0x10,%r9d
call   1060 <test_int_eq@plt>
test   %eax,%eax
je     13c3 <test_bio_rdwr_rdonly+0x203>
lea    0xdca(%rip),%rax
lea    0xc6d(%rip),%rdi
lea    0xd65(%rip),%rdx
lea    0xda0(%rip),%rcx
mov    %rsp,%r8
mov    $0xad,%esi
mov    $0x10,%r9d
push   $0x10
push   %rax
call   10b0 <test_mem_eq@plt>
add    $0x10,%rsp
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
mov    %rbx,%rdi
call   10a0 <BIO_free@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [180 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/bio_memleak_test.c\00"
@.str.1 = [4 x i8] c"bio\00"
@.str.2 = [31 x i8] c"BIO_puts(bio, \22Hello World\\n\22)\00"
@.str.3 = [3 x i8] c"12\00"
@.str.4 = [13 x i8] c"Hello World\0A\00"
@BIO_FLAGS_MEM_RDONLY = global i32 0
@.str.5 = [24 x i8] c"BIO_read(bio, data, 16)\00"
@.str.6 = [5 x i8] c"data\00"
@.str.7 = [16 x i8] c"\22Hello World\\n\22\00"
@.str.8 = [15 x i8] c"BIO_reset(bio)\00"
@.str.9 = [2 x i8] c"0\00"
@.str.10 = [23 x i8] c"BIO_puts(bio, \22Hi!\\n\22)\00"
@.str.11 = [2 x i8] c"4\00"
@.str.12 = [5 x i8] c"Hi!\0A\00"
@.str.13 = [3 x i8] c"16\00"
@.str.14 = [21 x i8] c"\22Hello World\\nHi!\\n\22\00"
@.str.15 = [17 x i8] c"Hello World\0AHi!\0A\00"
define i32 @test_bio_rdwr_rdonly() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [16 x i8]
store i32 0, i32* %1
store i32* null, i32** %2
%4 = call i32 (...) @BIO_s_mem()
%5 = call i32* @BIO_new(i32 %4)
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @test_ptr(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 154, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %0
br label %59
10: ; preds = %0
%11 = load i32*, i32** %2
%12 = call i32 @BIO_puts(i32* %11, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 156, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %12, i32 12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %10
br label %59
16: ; preds = %10
%17 = load i32*, i32** %2
%18 = load i32, i32* @BIO_FLAGS_MEM_RDONLY
%19 = call i32 @BIO_set_flags(i32* %17, i32 %18)
%20 = load i32*, i32** %2
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%22 = call i32 @BIO_read(i32* %20, i8* %21, i32 16)
%23 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 160, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %22, i32 12)
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %16
br label %59
26: ; preds = %16
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%28 = call i32 @test_mem_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 162, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %27, i32 12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 12)
%29 = icmp ne i32 %28, 0
br i1 %29, label %31, label %30
30: ; preds = %26
br label %59
31: ; preds = %26
%32 = load i32*, i32** %2
%33 = call i32 @BIO_reset(i32* %32)
%34 = call i32 @test_int_gt(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 164, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32 %33, i32 0)
%35 = icmp ne i32 %34, 0
br i1 %35, label %37, label %36
36: ; preds = %31
br label %59
37: ; preds = %31
%38 = load i32*, i32** %2
%39 = load i32, i32* @BIO_FLAGS_MEM_RDONLY
%40 = call i32 @BIO_clear_flags(i32* %38, i32 %39)
%41 = load i32*, i32** %2
%42 = call i32 @BIO_puts(i32* %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%43 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 168, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i32 %42, i32 4)
%44 = icmp ne i32 %43, 0
br i1 %44, label %46, label %45
45: ; preds = %37
br label %59
46: ; preds = %37
%47 = load i32*, i32** %2
%48 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%49 = call i32 @BIO_read(i32* %47, i8* %48, i32 16)
%50 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 170, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %49, i32 16)
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %46
br label %59
53: ; preds = %46
%54 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%55 = call i32 @test_mem_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 173, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i8* %54, i32 16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 16)
%56 = icmp ne i32 %55, 0
br i1 %56, label %58, label %57
57: ; preds = %53
br label %59
58: ; preds = %53
store i32 1, i32* %1
br label %59
59: ; preds = %58, %57, %52, %45, %36, %30, %25, %15, %9
%60 = load i32*, i32** %2
%61 = call i32 @BIO_free(i32* %60)
%62 = load i32, i32* %1
ret i32 %62
}

LLVM IR (-O2):
@.str = [180 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/bio_memleak_test.c\00"
@.str.1 = [4 x i8] c"bio\00"
@.str.2 = [31 x i8] c"BIO_puts(bio, \22Hello World\\n\22)\00"
@.str.3 = [3 x i8] c"12\00"
@.str.4 = [13 x i8] c"Hello World\0A\00"
@BIO_FLAGS_MEM_RDONLY = global i32 0
@.str.5 = [24 x i8] c"BIO_read(bio, data, 16)\00"
@.str.6 = [5 x i8] c"data\00"
@.str.7 = [16 x i8] c"\22Hello World\\n\22\00"
@.str.8 = [15 x i8] c"BIO_reset(bio)\00"
@.str.9 = [2 x i8] c"0\00"
@.str.10 = [23 x i8] c"BIO_puts(bio, \22Hi!\\n\22)\00"
@.str.11 = [2 x i8] c"4\00"
@.str.12 = [5 x i8] c"Hi!\0A\00"
@.str.13 = [3 x i8] c"16\00"
@.str.14 = [21 x i8] c"\22Hello World\\nHi!\\n\22\00"
@.str.15 = [17 x i8] c"Hello World\0AHi!\0A\00"
define i32 @test_bio_rdwr_rdonly() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @BIO_s_mem()
%4 = tail call i32* @BIO_new(i32 %3)
%5 = tail call i32 @test_ptr(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 154, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %38, label %7
7: ; preds = %0
%8 = tail call i32 @BIO_puts(i32* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 156, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 12)
%10 = icmp eq i32 %9, 0
br i1 %10, label %38, label %11
11: ; preds = %7
%12 = load i32, i32* @BIO_FLAGS_MEM_RDONLY
%13 = tail call i32 @BIO_set_flags(i32* %4, i32 %12)
%14 = call i32 @BIO_read(i32* %4, i8* %2, i32 16)
%15 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 160, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 12)
%16 = icmp eq i32 %15, 0
br i1 %16, label %38, label %17
17: ; preds = %11
%18 = call i32 @test_mem_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 162, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %2, i32 12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 12)
%19 = icmp eq i32 %18, 0
br i1 %19, label %38, label %20
20: ; preds = %17
%21 = call i32 @BIO_reset(i32* %4)
%22 = call i32 @test_int_gt(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 164, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32 %21, i32 0)
%23 = icmp eq i32 %22, 0
br i1 %23, label %38, label %24
24: ; preds = %20
%25 = load i32, i32* @BIO_FLAGS_MEM_RDONLY
%26 = call i32 @BIO_clear_flags(i32* %4, i32 %25)
%27 = call i32 @BIO_puts(i32* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0))
%28 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 168, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i32 %27, i32 4)
%29 = icmp eq i32 %28, 0
br i1 %29, label %38, label %30
30: ; preds = %24
%31 = call i32 @BIO_read(i32* %4, i8* %2, i32 16)
%32 = call i32 @test_int_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 170, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32 %31, i32 16)
%33 = icmp eq i32 %32, 0
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = call i32 @test_mem_eq(i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i32 173, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i8* %2, i32 16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i32 16)
%36 = icmp ne i32 %35, 0
%37 = zext i1 %36 to i32
br label %38
38: ; preds = %34, %30, %24, %20, %17, %11, %7, %0
%39 = phi i32 [ 0, %30 ], [ 0, %24 ], [ 0, %20 ], [ 0, %17 ], [ 0, %11 ], [ 0, %7 ], [ 0, %0 ], [ %37, %34 ]
%40 = call i32 @BIO_free(i32* %4)
ret i32 %39
}