#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*/ ref;
typedef int /*<<< orphan*/ out;
typedef int /*<<< orphan*/ EVP_CIPHER;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_f_cipher();
int /*<<< orphan*/ BIO_flush(int /*<<< orphan*/ *);
int /*<<< orphan*/ BIO_free_all(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_new(int /*<<< orphan*/);
int /*<<< orphan*/ BIO_new_mem_buf(unsigned char *, int);
int /*<<< orphan*/ BIO_push(int /*<<< orphan*/ *, int /*<<< orphan*/);
int BIO_read(int /*<<< orphan*/ *, unsigned char *, int);
scalar_t__ BIO_set_cipher(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          unsigned char const *, unsigned char const *, int);
int /*<<< orphan*/ RAND_bytes(unsigned char *, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ test_info(char *, int, char *, int);
int /*<<< orphan*/ test_int_gt(char *, int, char *, char *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int /*<<< orphan*/ test_mem_eq(char *, int, char *, char *, unsigned char *,
                               int, unsigned char *, int);
int /*<<< orphan*/ test_true(char *, int, char *, int);
int /*<<< orphan*/ test_uchar_eq(char *, int, char *, char *, unsigned char,
                                 unsigned char);
int do_bio_cipher(const EVP_CIPHER *cipher, const unsigned char *key,
                  const unsigned char *iv) {
  BIO *b;
  static unsigned char inp[(1024 + 32)] = {0};
  unsigned char out[(1024 + 32)], ref[(1024 + 32)];
  int i, lref, len;
  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_enc_test.c",
          46, "RAND_bytes(inp, DATA_SIZE)", "0", RAND_bytes(inp, 1024), 0))
    return 0;
  b = BIO_new(BIO_f_cipher());
  if (!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/bio_enc_test.c",
          53, "BIO_set_cipher(b, cipher, key, iv, ENCRYPT)",
          (BIO_set_cipher(b, cipher, key, iv, 1)) != 0))
    return 0;
  BIO_push(b, BIO_new_mem_buf(inp, 1024));
  lref = BIO_read(b, ref, sizeof(ref));
  BIO_free_all(b);
  for (i = 1; i < lref; i++) {
    b = BIO_new(BIO_f_cipher());
    if (!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/bio_enc_test.c",
            62, "BIO_set_cipher(b, cipher, key, iv, ENCRYPT)",
            (BIO_set_cipher(b, cipher, key, iv, 1)) != 0)) {
      test_info("/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_enc_test.c",
                63, "Split encrypt failed @ operation %d", i);
      return 0;
    }
    BIO_push(b, BIO_new_mem_buf(inp, 1024));
    memset(out, 0, sizeof(out));
    out[i] = ~ref[i];
    len = BIO_read(b, out, i);
    if (!test_uchar_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_enc_test.c",
            71, "out[i]", "(unsigned char)~ref[i]", out[i],
            (unsigned char)~ref[i])) {
      test_info("/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_enc_test.c",
                72, "Encrypt overstep check failed @ operation %d", i);
      return 0;
    }
    len += BIO_read(b, out + len, sizeof(out) - len);
    BIO_free_all(b);
    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_enc_test.c",
            78, "out", "ref", out, len, ref, lref)) {
      test_info("/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_enc_test.c",
                79, "Encrypt compare failed @ operation %d", i);
      return 0;
    }
  }
  for (i = 1; i < lref / 2; i++) {
    int delta;
    b = BIO_new(BIO_f_cipher());
    if (!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/bio_enc_test.c",
            89, "BIO_set_cipher(b, cipher, key, iv, ENCRYPT)",
            (BIO_set_cipher(b, cipher, key, iv, 1)) != 0)) {
      test_info("/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_enc_test.c",
                90, "Small chunk encrypt failed @ operation %d", i);
      return 0;
    }
    BIO_push(b, BIO_new_mem_buf(inp, 1024));
    memset(out, 0, sizeof(out));
    for (len = 0; (delta = BIO_read(b, out + len, i));) {
      len += delta;
    }
    BIO_free_all(b);
    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_enc_test.c",
            100, "out", "ref", out, len, ref, lref)) {
      test_info("/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_enc_test.c",
                101, "Small chunk encrypt compare failed @ operation %d", i);
      return 0;
    }
  }
  b = BIO_new(BIO_f_cipher());
  if (!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/bio_enc_test.c",
          110, "BIO_set_cipher(b, cipher, key, iv, DECRYPT)",
          (BIO_set_cipher(b, cipher, key, iv, 0)) != 0))
    return 0;
  BIO_push(b, BIO_new_mem_buf(ref, lref));
  (void)BIO_flush(b);
  memset(out, 0, sizeof(out));
  len = BIO_read(b, out, sizeof(out));
  BIO_free_all(b);
  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_enc_test.c",
          119, "inp", "out", inp, 1024, out, len))
    return 0;
  for (i = 1; i < lref; i++) {
    b = BIO_new(BIO_f_cipher());
    if (!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/bio_enc_test.c",
            125, "BIO_set_cipher(b, cipher, key, iv, DECRYPT)",
            (BIO_set_cipher(b, cipher, key, iv, 0)) != 0)) {
      test_info("/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_enc_test.c",
                126, "Split decrypt failed @ operation %d", i);
      return 0;
    }
    BIO_push(b, BIO_new_mem_buf(ref, lref));
    memset(out, 0, sizeof(out));
    out[i] = ~ref[i];
    len = BIO_read(b, out, i);
    if (!test_uchar_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_enc_test.c",
            134, "out[i]", "(unsigned char)~ref[i]", out[i],
            (unsigned char)~ref[i])) {
      test_info("/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_enc_test.c",
                135, "Decrypt overstep check failed @ operation %d", i);
      return 0;
    }
    len += BIO_read(b, out + len, sizeof(out) - len);
    BIO_free_all(b);
    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_enc_test.c",
            141, "inp", "out", inp, 1024, out, len)) {
      test_info("/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_enc_test.c",
                142, "Decrypt compare failed @ operation %d", i);
      return 0;
    }
  }
  for (i = 1; i < lref / 2; i++) {
    int delta;
    b = BIO_new(BIO_f_cipher());
    if (!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/bio_enc_test.c",
            152, "BIO_set_cipher(b, cipher, key, iv, DECRYPT)",
            (BIO_set_cipher(b, cipher, key, iv, 0)) != 0)) {
      test_info("/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_enc_test.c",
                153, "Small chunk decrypt failed @ operation %d", i);
      return 0;
    }
    BIO_push(b, BIO_new_mem_buf(ref, lref));
    memset(out, 0, sizeof(out));
    for (len = 0; (delta = BIO_read(b, out + len, i));) {
      len += delta;
    }
    BIO_free_all(b);
    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_enc_test.c",
            163, "inp", "out", inp, 1024, out, len)) {
      test_info("/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_enc_test.c",
                164, "Small chunk decrypt compare failed @ operation %d", i);
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<do_bio_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8e0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0x2ea2(%rip),%rdi
mov    $0x400,%esi
call   1070 <RAND_bytes@plt>
mov    %eax,%r8d
lea    0xdde(%rip),%rdi
mov    $0x2e,%esi
lea    0xe82(%rip),%rdx
lea    0xe96(%rip),%rcx
xor    %r9d,%r9d
call   1040 <test_int_gt@plt>
cmp    $0x0,%eax
jne    1252 <do_bio_cipher+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xd6e(%rip),%rdi
mov    $0x35,%esi
lea    0xe2f(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    12b8 <do_bio_cipher+0xc8>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x890(%rbp)
lea    0x2de6(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x890(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
mov    -0x28(%rbp),%rdi
lea    -0x870(%rbp),%rsi
mov    $0x420,%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x878(%rbp)
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
movl   $0x1,-0x874(%rbp)
mov    -0x874(%rbp),%eax
cmp    -0x878(%rbp),%eax
jge    156a <do_bio_cipher+0x37a>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xc9e(%rip),%rdi
mov    $0x3e,%esi
lea    0xd5f(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    13a6 <do_bio_cipher+0x1b6>
mov    -0x874(%rbp),%ecx
lea    0xc77(%rip),%rdi
mov    $0x3f,%esi
lea    0xd64(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x898(%rbp)
lea    0x2cf8(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x898(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movslq -0x874(%rbp),%rax
movzbl -0x870(%rbp,%rax,1),%eax
ff
xor    $0xffffffff,%eax
mov    %al,%cl
movslq -0x874(%rbp),%rax
mov    %cl,-0x450(%rbp,%rax,1)
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
mov    -0x874(%rbp),%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x87c(%rbp)
movslq -0x874(%rbp),%rax
mov    -0x450(%rbp,%rax,1),%r8b
ff
movslq -0x874(%rbp),%rax
movzbl -0x870(%rbp,%rax,1),%eax
ff
xor    $0xffffffff,%eax
lea    0xbb7(%rip),%rdi
mov    $0x47,%esi
lea    0xcc8(%rip),%rdx
lea    0xcc8(%rip),%rcx
movzbl %r8b,%r8d
movzbl %al,%r9d
call   10c0 <test_uchar_eq@plt>
cmp    $0x0,%eax
jne    149c <do_bio_cipher+0x2ac>
mov    -0x874(%rbp),%ecx
lea    0xb81(%rip),%rdi
mov    $0x48,%esi
lea    0xcb0(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
movslq -0x87c(%rbp),%rax
add    %rax,%rsi
movslq -0x87c(%rbp),%rcx
mov    $0x420,%eax
sub    %rcx,%rax
mov    %eax,%edx
call   1060 <BIO_read@plt>
add    -0x87c(%rbp),%eax
mov    %eax,-0x87c(%rbp)
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
lea    -0x450(%rbp),%r8
mov    -0x87c(%rbp),%r9d
lea    -0x870(%rbp),%r10
mov    -0x878(%rbp),%eax
lea    0xb02(%rip),%rdi
mov    $0x4e,%esi
lea    0xc5e(%rip),%rdx
lea    0xc5b(%rip),%rcx
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10f0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    1551 <do_bio_cipher+0x361>
mov    -0x874(%rbp),%ecx
lea    0xacc(%rip),%rdi
mov    $0x4f,%esi
lea    0xc30(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
jmp    1556 <do_bio_cipher+0x366>
mov    -0x874(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x874(%rbp)
jmp    1310 <do_bio_cipher+0x120>
movl   $0x1,-0x874(%rbp)
mov    -0x874(%rbp),%eax
mov    %eax,-0x89c(%rbp)
mov    -0x878(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x89c(%rbp),%eax
cmp    %ecx,%eax
jge    1746 <do_bio_cipher+0x556>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xa22(%rip),%rdi
mov    $0x59,%esi
lea    0xae3(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    1622 <do_bio_cipher+0x432>
mov    -0x874(%rbp),%ecx
lea    0x9fb(%rip),%rdi
mov    $0x5a,%esi
lea    0xb85(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8a8(%rbp)
lea    0x2a7c(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x8a8(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movl   $0x0,-0x87c(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
movslq -0x87c(%rbp),%rax
add    %rax,%rsi
mov    -0x874(%rbp),%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x880(%rbp)
cmp    $0x0,%eax
je     16af <do_bio_cipher+0x4bf>
mov    -0x880(%rbp),%eax
add    -0x87c(%rbp),%eax
mov    %eax,-0x87c(%rbp)
jmp    1669 <do_bio_cipher+0x479>
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
lea    -0x450(%rbp),%r8
mov    -0x87c(%rbp),%r9d
lea    -0x870(%rbp),%r10
mov    -0x878(%rbp),%eax
lea    0x926(%rip),%rdi
mov    $0x64,%esi
lea    0xa82(%rip),%rdx
lea    0xa7f(%rip),%rcx
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10f0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    172d <do_bio_cipher+0x53d>
mov    -0x874(%rbp),%ecx
lea    0x8f0(%rip),%rdi
mov    $0x65,%esi
lea    0xaa4(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
jmp    1732 <do_bio_cipher+0x542>
mov    -0x874(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x874(%rbp)
jmp    1574 <do_bio_cipher+0x384>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0x87d(%rip),%rdi
mov    $0x6e,%esi
lea    0xa63(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    17a9 <do_bio_cipher+0x5b9>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8b0(%rbp)
lea    -0x870(%rbp),%rdi
mov    -0x878(%rbp),%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x8b0(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
mov    -0x28(%rbp),%rdi
call   1110 <BIO_flush@plt>
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
mov    $0x420,%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x87c(%rbp)
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
lea    -0x450(%rbp),%r10
mov    -0x87c(%rbp),%eax
lea    0x7d8(%rip),%rdi
mov    $0x77,%esi
lea    0x9ea(%rip),%rdx
lea    0x92d(%rip),%rcx
lea    0x286e(%rip),%r8
mov    $0x400,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10f0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    186a <do_bio_cipher+0x67a>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
movl   $0x1,-0x874(%rbp)
mov    -0x874(%rbp),%eax
cmp    -0x878(%rbp),%eax
jge    1acb <do_bio_cipher+0x8db>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0x73d(%rip),%rdi
mov    $0x7d,%esi
lea    0x923(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    1907 <do_bio_cipher+0x717>
mov    -0x874(%rbp),%ecx
lea    0x716(%rip),%rdi
mov    $0x7e,%esi
lea    0x92c(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8b8(%rbp)
lea    -0x870(%rbp),%rdi
mov    -0x878(%rbp),%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x8b8(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movslq -0x874(%rbp),%rax
movzbl -0x870(%rbp,%rax,1),%eax
ff
xor    $0xffffffff,%eax
mov    %al,%cl
movslq -0x874(%rbp),%rax
mov    %cl,-0x450(%rbp,%rax,1)
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
mov    -0x874(%rbp),%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x87c(%rbp)
movslq -0x874(%rbp),%rax
mov    -0x450(%rbp,%rax,1),%r8b
ff
movslq -0x874(%rbp),%rax
movzbl -0x870(%rbp,%rax,1),%eax
ff
xor    $0xffffffff,%eax
lea    0x655(%rip),%rdi
mov    $0x86,%esi
lea    0x766(%rip),%rdx
lea    0x766(%rip),%rcx
movzbl %r8b,%r8d
movzbl %al,%r9d
call   10c0 <test_uchar_eq@plt>
cmp    $0x0,%eax
jne    19fe <do_bio_cipher+0x80e>
mov    -0x874(%rbp),%ecx
lea    0x61f(%rip),%rdi
mov    $0x87,%esi
lea    0x859(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
movslq -0x87c(%rbp),%rax
add    %rax,%rsi
movslq -0x87c(%rbp),%rcx
mov    $0x420,%eax
sub    %rcx,%rax
mov    %eax,%edx
call   1060 <BIO_read@plt>
add    -0x87c(%rbp),%eax
mov    %eax,-0x87c(%rbp)
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
lea    -0x450(%rbp),%r10
mov    -0x87c(%rbp),%eax
lea    0x5ae(%rip),%rdi
mov    $0x8d,%esi
lea    0x7c0(%rip),%rdx
lea    0x703(%rip),%rcx
lea    0x2644(%rip),%r8
mov    $0x400,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10f0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    1ab2 <do_bio_cipher+0x8c2>
mov    -0x874(%rbp),%ecx
lea    0x56b(%rip),%rdi
mov    $0x8e,%esi
lea    0x7d2(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
jmp    1ab7 <do_bio_cipher+0x8c7>
mov    -0x874(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x874(%rbp)
jmp    1874 <do_bio_cipher+0x684>
movl   $0x1,-0x874(%rbp)
mov    -0x874(%rbp),%eax
mov    %eax,-0x8bc(%rbp)
mov    -0x878(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8bc(%rbp),%eax
cmp    %ecx,%eax
jge    1ca4 <do_bio_cipher+0xab4>
mov    $0x0,%al
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0x4c4(%rip),%rdi
mov    $0x98,%esi
lea    0x6aa(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    1b80 <do_bio_cipher+0x990>
mov    -0x874(%rbp),%ecx
lea    0x49d(%rip),%rdi
mov    $0x99,%esi
lea    0x72a(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8c8(%rbp)
lea    -0x870(%rbp),%rdi
mov    -0x878(%rbp),%esi
call   1090 <BIO_new_mem_buf@plt>
mov    -0x8c8(%rbp),%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
lea    -0x450(%rbp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movl   $0x0,-0x87c(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0x450(%rbp),%rsi
movslq -0x87c(%rbp),%rax
add    %rax,%rsi
mov    -0x874(%rbp),%edx
call   1060 <BIO_read@plt>
mov    %eax,-0x884(%rbp)
cmp    $0x0,%eax
je     1c0e <do_bio_cipher+0xa1e>
mov    -0x884(%rbp),%eax
add    -0x87c(%rbp),%eax
mov    %eax,-0x87c(%rbp)
jmp    1bc8 <do_bio_cipher+0x9d8>
mov    -0x28(%rbp),%rdi
call   1100 <BIO_free_all@plt>
lea    -0x450(%rbp),%r10
mov    -0x87c(%rbp),%eax
lea    0x3d5(%rip),%rdi
mov    $0xa3,%esi
lea    0x5e7(%rip),%rdx
lea    0x52a(%rip),%rcx
lea    0x246b(%rip),%r8
mov    $0x400,%r9d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10f0 <test_mem_eq@plt>
cmp    $0x0,%eax
jne    1c8b <do_bio_cipher+0xa9b>
mov    -0x874(%rbp),%ecx
lea    0x392(%rip),%rdi
mov    $0xa4,%esi
lea    0x649(%rip),%rdx
call   10d0 <test_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    1cab <do_bio_cipher+0xabb>
jmp    1c90 <do_bio_cipher+0xaa0>
mov    -0x874(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x874(%rbp)
jmp    1ad5 <do_bio_cipher+0x8e5>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_bio_cipher>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x878,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbp
lea    0x2e9f(%rip),%rdi
mov    $0x400,%esi
call   1070 <RAND_bytes@plt>
lea    0xdde(%rip),%rdi
lea    0xe87(%rip),%rdx
lea    0xe9b(%rip),%rcx
xor    %r13d,%r13d
mov    $0x2e,%esi
mov    %eax,%r8d
xor    %r9d,%r9d
call   1040 <test_int_gt@plt>
test   %eax,%eax
je     198a <do_bio_cipher+0x79a>
xor    %r13d,%r13d
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xd7b(%rip),%rdi
lea    0xe41(%rip),%rdx
mov    $0x35,%esi
call   1030 <test_true@plt>
test   %eax,%eax
je     198a <do_bio_cipher+0x79a>
mov    %rbp,0x20(%rsp)
mov    %r15,0x28(%rsp)
lea    0x2e01(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
lea    0x450(%rsp),%rsi
mov    %r12,%rdi
mov    $0x420,%edx
call   1060 <BIO_read@plt>
mov    %eax,%ebp
mov    %eax,%ebx
mov    %r12,%rdi
call   1100 <BIO_free_all@plt>
cmp    $0x1,%ebp
mov    %r14,0x8(%rsp)
mov    %rbx,0x18(%rsp)
jle    1591 <do_bio_cipher+0x3a1>
mov    $0x1,%ebp
lea    0xcfd(%rip),%r13
lea    0x30(%rsp),%r12
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0x8(%rsp),%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %r13,%rdi
mov    $0x3e,%esi
lea    0xd78(%rip),%rdx
call   1030 <test_true@plt>
test   %eax,%eax
je     1943 <do_bio_cipher+0x753>
lea    0x2d47(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movzbl 0x450(%rsp,%rbp,1),%eax
not    %al
mov    %al,0x30(%rsp,%rbp,1)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1060 <BIO_read@plt>
mov    %eax,%r14d
movzbl 0x30(%rsp,%rbp,1),%r8d
movzbl 0x450(%rsp,%rbp,1),%r9d
xor    $0xff,%r9d
mov    %r13,%rdi
mov    $0x47,%esi
lea    0xd4e(%rip),%rdx
lea    0xd4e(%rip),%rcx
call   10c0 <test_uchar_eq@plt>
test   %eax,%eax
je     1958 <do_bio_cipher+0x768>
movslq %r14d,%rbx
lea    (%rsp,%rbx,1),%rsi
add    $0x30,%rsi
mov    $0x420,%edx
sub    %ebx,%edx
mov    %r15,%rdi
call   1060 <BIO_read@plt>
add    %eax,%ebx
mov    %r15,%rdi
call   1100 <BIO_free_all@plt>
mov    %r13,%rdi
mov    $0x4e,%esi
lea    0xd52(%rip),%rdx
lea    0xd4f(%rip),%rcx
mov    %r12,%r8
mov    %ebx,%r9d
mov    0x18(%rsp),%rbx
push   %rbx
lea    0x458(%rsp),%rax
push   %rax
call   10f0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     196d <do_bio_cipher+0x77d>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1310 <do_bio_cipher+0x120>
mov    %ebx,%r12d
shr    $0x1f,%r12d
add    %ebx,%r12d
sar    %r12d
cmp    $0x4,%ebx
setge  %al
jl     199f <do_bio_cipher+0x7af>
mov    %eax,0x10(%rsp)
cmp    $0x3,%r12d
mov    $0x2,%eax
cmovge %r12d,%eax
mov    %eax,(%rsp)
mov    $0x1,%ebx
lea    0xb77(%rip),%r13
nopl   0x0(%rax)
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0x8(%rsp),%rcx
mov    $0x1,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %r13,%rdi
mov    $0x59,%esi
lea    0xbf8(%rip),%rdx
call   1030 <test_true@plt>
test   %eax,%eax
je     1a28 <do_bio_cipher+0x838>
lea    0x2bc7(%rip),%rdi
mov    $0x400,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
xor    %ebp,%ebp
lea    0x30(%rsp),%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
mov    %ebp,%r14d
movslq %ebp,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x30,%rsi
mov    %r15,%rdi
mov    %ebx,%edx
call   1060 <BIO_read@plt>
lea    (%rax,%r14,1),%ebp
test   %eax,%eax
jne    1510 <do_bio_cipher+0x320>
mov    %r15,%rdi
call   1100 <BIO_free_all@plt>
mov    %r13,%rdi
mov    $0x64,%esi
lea    0xc21(%rip),%rdx
lea    0xc1e(%rip),%rcx
lea    0x30(%rsp),%r8
mov    %r14d,%r9d
push   0x18(%rsp)
lea    0x458(%rsp),%rax
push   %rax
call   10f0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     1a42 <do_bio_cipher+0x852>
add    $0x1,%ebx
cmp    (%rsp),%ebx
jne    1490 <do_bio_cipher+0x2a0>
mov    %r12d,0x14(%rsp)
mov    0x8(%rsp),%r14
mov    0x10(%rsp),%r15d
jmp    15a1 <do_bio_cipher+0x3b1>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
mov    %eax,0x14(%rsp)
xor    %r15d,%r15d
xor    %r13d,%r13d
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    %r14,%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0xa24(%rip),%rdi
lea    0xc0f(%rip),%rdx
mov    $0x6e,%esi
call   1030 <test_true@plt>
test   %eax,%eax
je     198a <do_bio_cipher+0x79a>
lea    0x450(%rsp),%rdi
mov    0x18(%rsp),%rsi
call   1090 <BIO_new_mem_buf@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
mov    %rbx,%rdi
call   1110 <BIO_flush@plt>
lea    0x30(%rsp),%rbp
xor    %r13d,%r13d
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x420,%edx
call   1060 <BIO_read@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1100 <BIO_free_all@plt>
lea    0x9ae(%rip),%rdi
lea    0xbc5(%rip),%rdx
lea    0xb08(%rip),%rcx
lea    0x2a49(%rip),%r8
mov    $0x77,%esi
mov    $0x400,%r9d
push   %r14
push   %rbp
call   10f0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     198a <do_bio_cipher+0x79a>
mov    %r15d,0x10(%rsp)
mov    0x18(%rsp),%rbx
cmp    $0x2,%ebx
lea    0x30(%rsp),%r12
jl     17f5 <do_bio_cipher+0x605>
mov    $0x1,%ebp
lea    0x956(%rip),%r13
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0x8(%rsp),%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %r13,%rdi
mov    $0x7d,%esi
lea    0xb00(%rip),%rdx
call   1030 <test_true@plt>
test   %eax,%eax
je     19b1 <do_bio_cipher+0x7c1>
lea    0x450(%rsp),%rdi
mov    %ebx,%esi
call   1090 <BIO_new_mem_buf@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
movzbl 0x450(%rsp,%rbp,1),%eax
not    %al
mov    %al,0x30(%rsp,%rbp,1)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1060 <BIO_read@plt>
mov    %eax,%r14d
movzbl 0x30(%rsp,%rbp,1),%r8d
mov    %rbp,(%rsp)
movzbl 0x450(%rsp,%rbp,1),%r9d
xor    $0xff,%r9d
mov    %r13,%rdi
mov    $0x86,%esi
lea    0x9af(%rip),%rdx
lea    0x9af(%rip),%rcx
call   10c0 <test_uchar_eq@plt>
test   %eax,%eax
je     19c6 <do_bio_cipher+0x7d6>
movslq %r14d,%rbp
lea    (%rsp,%rbp,1),%rsi
add    $0x30,%rsi
mov    $0x420,%edx
sub    %ebp,%edx
mov    %r15,%rdi
call   1060 <BIO_read@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1100 <BIO_free_all@plt>
mov    %r13,%rdi
mov    $0x8d,%esi
lea    0xa67(%rip),%rdx
lea    0x9aa(%rip),%rcx
lea    0x28eb(%rip),%r8
mov    $0x400,%r9d
push   %rbx
push   %r12
call   10f0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     19db <do_bio_cipher+0x7eb>
mov    (%rsp),%rbp
add    $0x1,%rbp
mov    0x18(%rsp),%rbx
cmp    %rbp,%rbx
jne    16b0 <do_bio_cipher+0x4c0>
mov    $0x1,%r13d
cmpb   $0x0,0x10(%rsp)
mov    0x8(%rsp),%r15
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r12
je     198a <do_bio_cipher+0x79a>
mov    0x14(%rsp),%eax
cmp    $0x3,%eax
mov    $0x2,%ecx
cmovge %eax,%ecx
mov    %ecx,(%rsp)
mov    $0x1,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   10e0 <BIO_f_cipher@plt>
mov    %eax,%edi
call   10b0 <BIO_new@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
call   10a0 <BIO_set_cipher@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0x79c(%rip),%r13
mov    %r13,%rdi
mov    $0x98,%esi
lea    0x97f(%rip),%rdx
call   1030 <test_true@plt>
test   %eax,%eax
je     19f4 <do_bio_cipher+0x804>
lea    0x450(%rsp),%rdi
mov    0x18(%rsp),%rsi
call   1090 <BIO_new_mem_buf@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1050 <BIO_push@plt>
xor    %r15d,%r15d
lea    0x30(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x420,%edx
call   1080 <memset@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15d,%r12d
movslq %r15d,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x30,%rsi
mov    %rbp,%rdi
mov    %ebx,%edx
call   1060 <BIO_read@plt>
lea    (%rax,%r12,1),%r15d
test   %eax,%eax
jne    18c0 <do_bio_cipher+0x6d0>
mov    %rbp,%rdi
call   1100 <BIO_free_all@plt>
mov    %r13,%rdi
mov    $0xa3,%esi
lea    0x927(%rip),%rdx
lea    0x86a(%rip),%rcx
lea    0x27ab(%rip),%r8
mov    $0x400,%r9d
push   %r12
push   %r14
call   10f0 <test_mem_eq@plt>
add    $0x10,%rsp
test   %eax,%eax
je     1a0e <do_bio_cipher+0x81e>
add    $0x1,%ebx
mov    $0x1,%r13d
cmp    (%rsp),%ebx
mov    0x8(%rsp),%r15
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r12
jne    1830 <do_bio_cipher+0x640>
jmp    198a <do_bio_cipher+0x79a>
lea    0x6b6(%rip),%rdi
lea    0x7a8(%rip),%rdx
mov    $0x3f,%esi
jmp    1980 <do_bio_cipher+0x790>
lea    0x6a1(%rip),%rdi
lea    0x7d5(%rip),%rdx
mov    $0x48,%esi
jmp    1980 <do_bio_cipher+0x790>
lea    0x68c(%rip),%rdi
lea    0x7f5(%rip),%rdx
mov    $0x4f,%esi
mov    %ebp,%ecx
call   10d0 <test_info@plt>
xor    %r13d,%r13d
mov    %r13d,%eax
add    $0x878,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12d,0x14(%rsp)
xor    %r15d,%r15d
mov    0x8(%rsp),%r14
jmp    15a1 <do_bio_cipher+0x3b1>
lea    0x648(%rip),%rdi
lea    0x863(%rip),%rdx
mov    $0x7e,%esi
jmp    1980 <do_bio_cipher+0x790>
lea    0x633(%rip),%rdi
lea    0x872(%rip),%rdx
mov    $0x87,%esi
jmp    19ee <do_bio_cipher+0x7fe>
lea    0x61e(%rip),%rdi
lea    0x88a(%rip),%rdx
mov    $0x8e,%esi
mov    (%rsp),%rcx
jmp    1982 <do_bio_cipher+0x792>
lea    0x605(%rip),%rdi
lea    0x897(%rip),%rdx
mov    $0x99,%esi
mov    %ebx,%ecx
jmp    1982 <do_bio_cipher+0x792>
lea    0x5eb(%rip),%rdi
lea    0x8a7(%rip),%rdx
mov    $0xa4,%esi
mov    %ebx,%ecx
jmp    1982 <do_bio_cipher+0x792>
lea    0x5d1(%rip),%rdi
lea    0x760(%rip),%rdx
mov    $0x5a,%esi
mov    %ebx,%ecx
jmp    1982 <do_bio_cipher+0x792>
lea    0x5b7(%rip),%rdi
lea    0x770(%rip),%rdx
mov    $0x65,%esi
mov    %ebx,%ecx
jmp    1982 <do_bio_cipher+0x792>

LLVM IR (-O0):
@do_bio_cipher.inp = internal global [1056 x i8] zeroinitializer
@.str = [176 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_enc_test.c\00"
@.str.1 = [27 x i8] c"RAND_bytes(inp, DATA_SIZE)\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [44 x i8] c"BIO_set_cipher(b, cipher, key, iv, ENCRYPT)\00"
@.str.4 = [36 x i8] c"Split encrypt failed @ operation %d\00"
@.str.5 = [7 x i8] c"out[i]\00"
@.str.6 = [23 x i8] c"(unsigned char)~ref[i]\00"
@.str.7 = [45 x i8] c"Encrypt overstep check failed @ operation %d\00"
@.str.8 = [4 x i8] c"out\00"
@.str.9 = [4 x i8] c"ref\00"
@.str.10 = [38 x i8] c"Encrypt compare failed @ operation %d\00"
@.str.11 = [42 x i8] c"Small chunk encrypt failed @ operation %d\00"
@.str.12 = [50 x i8] c"Small chunk encrypt compare failed @ operation %d\00"
@.str.13 = [44 x i8] c"BIO_set_cipher(b, cipher, key, iv, DECRYPT)\00"
@.str.14 = [4 x i8] c"inp\00"
@.str.15 = [36 x i8] c"Split decrypt failed @ operation %d\00"
@.str.16 = [45 x i8] c"Decrypt overstep check failed @ operation %d\00"
@.str.17 = [38 x i8] c"Decrypt compare failed @ operation %d\00"
@.str.18 = [42 x i8] c"Small chunk decrypt failed @ operation %d\00"
@.str.19 = [50 x i8] c"Small chunk decrypt compare failed @ operation %d\00"
define i32 @do_bio_cipher(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca [1056 x i8]
%10 = alloca [1056 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%16 = call i32 @RAND_bytes(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%17 = call i32 @test_int_gt(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 46, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 0)
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %3
store i32 0, i32* %4
br label %355
20: ; preds = %3
%21 = call i32 (...) @BIO_f_cipher()
%22 = call i32* @BIO_new(i32 %21)
store i32* %22, i32** %8
%23 = load i32*, i32** %8
%24 = load i32*, i32** %5
%25 = load i8*, i8** %6
%26 = load i8*, i8** %7
%27 = call i64 @BIO_set_cipher(i32* %23, i32* %24, i8* %25, i8* %26, i32 1)
%28 = icmp ne i64 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %20
store i32 0, i32* %4
br label %355
33: ; preds = %20
%34 = load i32*, i32** %8
%35 = call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%36 = call i32 @BIO_push(i32* %34, i32 %35)
%37 = load i32*, i32** %8
%38 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%39 = call i32 @BIO_read(i32* %37, i8* %38, i32 1056)
store i32 %39, i32* %12
%40 = load i32*, i32** %8
%41 = call i32 @BIO_free_all(i32* %40)
store i32 1, i32* %11
br label %42
42: ; preds = %122, %33
%43 = load i32, i32* %11
%44 = load i32, i32* %12
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %125
46: ; preds = %42
%47 = call i32 (...) @BIO_f_cipher()
%48 = call i32* @BIO_new(i32 %47)
store i32* %48, i32** %8
%49 = load i32*, i32** %8
%50 = load i32*, i32** %5
%51 = load i8*, i8** %6
%52 = load i8*, i8** %7
%53 = call i64 @BIO_set_cipher(i32* %49, i32* %50, i8* %51, i8* %52, i32 1)
%54 = icmp ne i64 %53, 0
%55 = zext i1 %54 to i32
%56 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %61, label %58
58: ; preds = %46
%59 = load i32, i32* %11
%60 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 63, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %59)
store i32 0, i32* %4
br label %355
61: ; preds = %46
%62 = load i32*, i32** %8
%63 = call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%64 = call i32 @BIO_push(i32* %62, i32 %63)
%65 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%66 = call i32 @memset(i8* %65, i32 0, i32 1056)
%67 = load i32, i32* %11
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = xor i32 %71, -1
%73 = trunc i32 %72 to i8
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 %75
store i8 %73, i8* %76
%77 = load i32*, i32** %8
%78 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%79 = load i32, i32* %11
%80 = call i32 @BIO_read(i32* %77, i8* %78, i32 %79)
store i32 %80, i32* %13
%81 = load i32, i32* %11
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = load i32, i32* %11
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = xor i32 %89, -1
%91 = trunc i32 %90 to i8
%92 = call i32 @test_uchar_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 71, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %84, i8 zeroext %91)
%93 = icmp ne i32 %92, 0
br i1 %93, label %97, label %94
94: ; preds = %61
%95 = load i32, i32* %11
%96 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 72, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %95)
store i32 0, i32* %4
br label %355
97: ; preds = %61
%98 = load i32*, i32** %8
%99 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%100 = load i32, i32* %13
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %99, i64 %101
%103 = load i32, i32* %13
%104 = sext i32 %103 to i64
%105 = sub i64 1056, %104
%106 = trunc i64 %105 to i32
%107 = call i32 @BIO_read(i32* %98, i8* %102, i32 %106)
%108 = load i32, i32* %13
%109 = add nsw i32 %108, %107
store i32 %109, i32* %13
%110 = load i32*, i32** %8
%111 = call i32 @BIO_free_all(i32* %110)
%112 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%113 = load i32, i32* %13
%114 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%115 = load i32, i32* %12
%116 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %112, i32 %113, i8* %114, i32 %115)
%117 = icmp ne i32 %116, 0
br i1 %117, label %121, label %118
118: ; preds = %97
%119 = load i32, i32* %11
%120 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %119)
store i32 0, i32* %4
br label %355
121: ; preds = %97
br label %122
122: ; preds = %121
%123 = load i32, i32* %11
%124 = add nsw i32 %123, 1
store i32 %124, i32* %11
br label %42
125: ; preds = %42
store i32 1, i32* %11
br label %126
126: ; preds = %178, %125
%127 = load i32, i32* %11
%128 = load i32, i32* %12
%129 = sdiv i32 %128, 2
%130 = icmp slt i32 %127, %129
br i1 %130, label %131, label %181
131: ; preds = %126
%132 = call i32 (...) @BIO_f_cipher()
%133 = call i32* @BIO_new(i32 %132)
store i32* %133, i32** %8
%134 = load i32*, i32** %8
%135 = load i32*, i32** %5
%136 = load i8*, i8** %6
%137 = load i8*, i8** %7
%138 = call i64 @BIO_set_cipher(i32* %134, i32* %135, i8* %136, i8* %137, i32 1)
%139 = icmp ne i64 %138, 0
%140 = zext i1 %139 to i32
%141 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 89, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %140)
%142 = icmp ne i32 %141, 0
br i1 %142, label %146, label %143
143: ; preds = %131
%144 = load i32, i32* %11
%145 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0), i32 %144)
store i32 0, i32* %4
br label %355
146: ; preds = %131
%147 = load i32*, i32** %8
%148 = call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%149 = call i32 @BIO_push(i32* %147, i32 %148)
%150 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%151 = call i32 @memset(i8* %150, i32 0, i32 1056)
store i32 0, i32* %13
br label %152
152: ; preds = %161, %146
%153 = load i32*, i32** %8
%154 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%155 = load i32, i32* %13
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i8, i8* %154, i64 %156
%158 = load i32, i32* %11
%159 = call i32 @BIO_read(i32* %153, i8* %157, i32 %158)
store i32 %159, i32* %14
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %165
161: ; preds = %152
%162 = load i32, i32* %14
%163 = load i32, i32* %13
%164 = add nsw i32 %163, %162
store i32 %164, i32* %13
br label %152
165: ; preds = %152
%166 = load i32*, i32** %8
%167 = call i32 @BIO_free_all(i32* %166)
%168 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%169 = load i32, i32* %13
%170 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%171 = load i32, i32* %12
%172 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %168, i32 %169, i8* %170, i32 %171)
%173 = icmp ne i32 %172, 0
br i1 %173, label %177, label %174
174: ; preds = %165
%175 = load i32, i32* %11
%176 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 101, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.12, i64 0, i64 0), i32 %175)
store i32 0, i32* %4
br label %355
177: ; preds = %165
br label %178
178: ; preds = %177
%179 = load i32, i32* %11
%180 = add nsw i32 %179, 1
store i32 %180, i32* %11
br label %126
181: ; preds = %126
%182 = call i32 (...) @BIO_f_cipher()
%183 = call i32* @BIO_new(i32 %182)
store i32* %183, i32** %8
%184 = load i32*, i32** %8
%185 = load i32*, i32** %5
%186 = load i8*, i8** %6
%187 = load i8*, i8** %7
%188 = call i64 @BIO_set_cipher(i32* %184, i32* %185, i8* %186, i8* %187, i32 0)
%189 = icmp ne i64 %188, 0
%190 = zext i1 %189 to i32
%191 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %190)
%192 = icmp ne i32 %191, 0
br i1 %192, label %194, label %193
193: ; preds = %181
store i32 0, i32* %4
br label %355
194: ; preds = %181
%195 = load i32*, i32** %8
%196 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%197 = load i32, i32* %12
%198 = call i32 @BIO_new_mem_buf(i8* %196, i32 %197)
%199 = call i32 @BIO_push(i32* %195, i32 %198)
%200 = load i32*, i32** %8
%201 = call i32 @BIO_flush(i32* %200)
%202 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%203 = call i32 @memset(i8* %202, i32 0, i32 1056)
%204 = load i32*, i32** %8
%205 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%206 = call i32 @BIO_read(i32* %204, i8* %205, i32 1056)
store i32 %206, i32* %13
%207 = load i32*, i32** %8
%208 = call i32 @BIO_free_all(i32* %207)
%209 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%210 = load i32, i32* %13
%211 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 119, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %209, i32 %210)
%212 = icmp ne i32 %211, 0
br i1 %212, label %214, label %213
213: ; preds = %194
store i32 0, i32* %4
br label %355
214: ; preds = %194
store i32 1, i32* %11
br label %215
215: ; preds = %295, %214
%216 = load i32, i32* %11
%217 = load i32, i32* %12
%218 = icmp slt i32 %216, %217
br i1 %218, label %219, label %298
219: ; preds = %215
%220 = call i32 (...) @BIO_f_cipher()
%221 = call i32* @BIO_new(i32 %220)
store i32* %221, i32** %8
%222 = load i32*, i32** %8
%223 = load i32*, i32** %5
%224 = load i8*, i8** %6
%225 = load i8*, i8** %7
%226 = call i64 @BIO_set_cipher(i32* %222, i32* %223, i8* %224, i8* %225, i32 0)
%227 = icmp ne i64 %226, 0
%228 = zext i1 %227 to i32
%229 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 125, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %228)
%230 = icmp ne i32 %229, 0
br i1 %230, label %234, label %231
231: ; preds = %219
%232 = load i32, i32* %11
%233 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 126, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), i32 %232)
store i32 0, i32* %4
br label %355
234: ; preds = %219
%235 = load i32*, i32** %8
%236 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%237 = load i32, i32* %12
%238 = call i32 @BIO_new_mem_buf(i8* %236, i32 %237)
%239 = call i32 @BIO_push(i32* %235, i32 %238)
%240 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%241 = call i32 @memset(i8* %240, i32 0, i32 1056)
%242 = load i32, i32* %11
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 %243
%245 = load i8, i8* %244
%246 = zext i8 %245 to i32
%247 = xor i32 %246, -1
%248 = trunc i32 %247 to i8
%249 = load i32, i32* %11
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 %250
store i8 %248, i8* %251
%252 = load i32*, i32** %8
%253 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%254 = load i32, i32* %11
%255 = call i32 @BIO_read(i32* %252, i8* %253, i32 %254)
store i32 %255, i32* %13
%256 = load i32, i32* %11
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 %257
%259 = load i8, i8* %258
%260 = load i32, i32* %11
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 %261
%263 = load i8, i8* %262
%264 = zext i8 %263 to i32
%265 = xor i32 %264, -1
%266 = trunc i32 %265 to i8
%267 = call i32 @test_uchar_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 134, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %259, i8 zeroext %266)
%268 = icmp ne i32 %267, 0
br i1 %268, label %272, label %269
269: ; preds = %234
%270 = load i32, i32* %11
%271 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 135, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i32 %270)
store i32 0, i32* %4
br label %355
272: ; preds = %234
%273 = load i32*, i32** %8
%274 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%275 = load i32, i32* %13
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds i8, i8* %274, i64 %276
%278 = load i32, i32* %13
%279 = sext i32 %278 to i64
%280 = sub i64 1056, %279
%281 = trunc i64 %280 to i32
%282 = call i32 @BIO_read(i32* %273, i8* %277, i32 %281)
%283 = load i32, i32* %13
%284 = add nsw i32 %283, %282
store i32 %284, i32* %13
%285 = load i32*, i32** %8
%286 = call i32 @BIO_free_all(i32* %285)
%287 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%288 = load i32, i32* %13
%289 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 141, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %287, i32 %288)
%290 = icmp ne i32 %289, 0
br i1 %290, label %294, label %291
291: ; preds = %272
%292 = load i32, i32* %11
%293 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 142, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0), i32 %292)
store i32 0, i32* %4
br label %355
294: ; preds = %272
br label %295
295: ; preds = %294
%296 = load i32, i32* %11
%297 = add nsw i32 %296, 1
store i32 %297, i32* %11
br label %215
298: ; preds = %215
store i32 1, i32* %11
br label %299
299: ; preds = %351, %298
%300 = load i32, i32* %11
%301 = load i32, i32* %12
%302 = sdiv i32 %301, 2
%303 = icmp slt i32 %300, %302
br i1 %303, label %304, label %354
304: ; preds = %299
%305 = call i32 (...) @BIO_f_cipher()
%306 = call i32* @BIO_new(i32 %305)
store i32* %306, i32** %8
%307 = load i32*, i32** %8
%308 = load i32*, i32** %5
%309 = load i8*, i8** %6
%310 = load i8*, i8** %7
%311 = call i64 @BIO_set_cipher(i32* %307, i32* %308, i8* %309, i8* %310, i32 0)
%312 = icmp ne i64 %311, 0
%313 = zext i1 %312 to i32
%314 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 152, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %313)
%315 = icmp ne i32 %314, 0
br i1 %315, label %319, label %316
316: ; preds = %304
%317 = load i32, i32* %11
%318 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 153, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 %317)
store i32 0, i32* %4
br label %355
319: ; preds = %304
%320 = load i32*, i32** %8
%321 = getelementptr inbounds [1056 x i8], [1056 x i8]* %10, i64 0, i64 0
%322 = load i32, i32* %12
%323 = call i32 @BIO_new_mem_buf(i8* %321, i32 %322)
%324 = call i32 @BIO_push(i32* %320, i32 %323)
%325 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%326 = call i32 @memset(i8* %325, i32 0, i32 1056)
store i32 0, i32* %13
br label %327
327: ; preds = %336, %319
%328 = load i32*, i32** %8
%329 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%330 = load i32, i32* %13
%331 = sext i32 %330 to i64
%332 = getelementptr inbounds i8, i8* %329, i64 %331
%333 = load i32, i32* %11
%334 = call i32 @BIO_read(i32* %328, i8* %332, i32 %333)
store i32 %334, i32* %15
%335 = icmp ne i32 %334, 0
br i1 %335, label %336, label %340
336: ; preds = %327
%337 = load i32, i32* %15
%338 = load i32, i32* %13
%339 = add nsw i32 %338, %337
store i32 %339, i32* %13
br label %327
340: ; preds = %327
%341 = load i32*, i32** %8
%342 = call i32 @BIO_free_all(i32* %341)
%343 = getelementptr inbounds [1056 x i8], [1056 x i8]* %9, i64 0, i64 0
%344 = load i32, i32* %13
%345 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %343, i32 %344)
%346 = icmp ne i32 %345, 0
br i1 %346, label %350, label %347
347: ; preds = %340
%348 = load i32, i32* %11
%349 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 164, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.19, i64 0, i64 0), i32 %348)
store i32 0, i32* %4
br label %355
350: ; preds = %340
br label %351
351: ; preds = %350
%352 = load i32, i32* %11
%353 = add nsw i32 %352, 1
store i32 %353, i32* %11
br label %299
354: ; preds = %299
store i32 1, i32* %4
br label %355
355: ; preds = %354, %347, %316, %291, %269, %231, %213, %193, %174, %143, %118, %94, %58, %32, %19
%356 = load i32, i32* %4
ret i32 %356
}

LLVM IR (-O2):
@do_bio_cipher.inp = internal global [1056 x i8] zeroinitializer
@.str = [176 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_enc_test.c\00"
@.str.1 = [27 x i8] c"RAND_bytes(inp, DATA_SIZE)\00"
@.str.2 = [2 x i8] c"0\00"
@.str.3 = [44 x i8] c"BIO_set_cipher(b, cipher, key, iv, ENCRYPT)\00"
@.str.4 = [36 x i8] c"Split encrypt failed @ operation %d\00"
@.str.5 = [7 x i8] c"out[i]\00"
@.str.6 = [23 x i8] c"(unsigned char)~ref[i]\00"
@.str.7 = [45 x i8] c"Encrypt overstep check failed @ operation %d\00"
@.str.8 = [4 x i8] c"out\00"
@.str.9 = [4 x i8] c"ref\00"
@.str.10 = [38 x i8] c"Encrypt compare failed @ operation %d\00"
@.str.11 = [42 x i8] c"Small chunk encrypt failed @ operation %d\00"
@.str.12 = [50 x i8] c"Small chunk encrypt compare failed @ operation %d\00"
@.str.13 = [44 x i8] c"BIO_set_cipher(b, cipher, key, iv, DECRYPT)\00"
@.str.14 = [4 x i8] c"inp\00"
@.str.15 = [36 x i8] c"Split decrypt failed @ operation %d\00"
@.str.16 = [45 x i8] c"Decrypt overstep check failed @ operation %d\00"
@.str.17 = [38 x i8] c"Decrypt compare failed @ operation %d\00"
@.str.18 = [42 x i8] c"Small chunk decrypt failed @ operation %d\00"
@.str.19 = [50 x i8] c"Small chunk decrypt compare failed @ operation %d\00"
define i32 @do_bio_cipher(i32* %0, i8* %1, i8* %2) {
%4 = alloca [1056 x i8]
%5 = alloca [1056 x i8]
%6 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [1056 x i8], [1056 x i8]* %5, i64 0, i64 0
%8 = tail call i32 @RAND_bytes(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%9 = tail call i32 @test_int_gt(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 46, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 0)
%10 = icmp eq i32 %9, 0
br i1 %10, label %211, label %11
11: ; preds = %3
%12 = tail call i32 (...) @BIO_f_cipher()
%13 = tail call i32* @BIO_new(i32 %12)
%14 = tail call i64 @BIO_set_cipher(i32* %13, i32* %0, i8* %1, i8* %2, i32 1)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i32
%17 = tail call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 53, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = icmp eq i32 %17, 0
br i1 %18, label %211, label %19
19: ; preds = %11
%20 = tail call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%21 = tail call i32 @BIO_push(i32* %13, i32 %20)
%22 = call i32 @BIO_read(i32* %13, i8* %7, i32 1056)
%23 = call i32 @BIO_free_all(i32* %13)
%24 = icmp sgt i32 %22, 1
br i1 %24, label %27, label %25
25: ; preds = %19
%26 = sdiv i32 %22, 2
br label %110
27: ; preds = %19
%28 = zext i32 %22 to i64
br label %34
29: ; preds = %76
%30 = sdiv i32 %22, 2
%31 = icmp sgt i32 %22, 3
br i1 %31, label %32, label %110
32: ; preds = %29
%33 = call i32 @llvm.smax.i32(i32 %30, i32 2)
br label %79
34: ; preds = %27, %76
%35 = phi i64 [ 1, %27 ], [ %77, %76 ]
%36 = call i32 (...) @BIO_f_cipher()
%37 = call i32* @BIO_new(i32 %36)
%38 = call i64 @BIO_set_cipher(i32* %37, i32* %0, i8* %1, i8* %2, i32 1)
%39 = icmp ne i64 %38, 0
%40 = zext i1 %39 to i32
%41 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 62, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %34
%44 = trunc i64 %35 to i32
%45 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 63, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %44)
br label %211
46: ; preds = %34
%47 = call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%48 = call i32 @BIO_push(i32* %37, i32 %47)
%49 = call i32 @memset(i8* %6, i32 0, i32 1056)
%50 = getelementptr inbounds [1056 x i8], [1056 x i8]* %5, i64 0, i64 %35
%51 = load i8, i8* %50
%52 = xor i8 %51, -1
%53 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %35
store i8 %52, i8* %53
%54 = trunc i64 %35 to i32
%55 = call i32 @BIO_read(i32* %37, i8* %6, i32 %54)
%56 = load i8, i8* %53
%57 = load i8, i8* %50
%58 = xor i8 %57, -1
%59 = call i32 @test_uchar_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 71, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %56, i8 zeroext %58)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %46
%62 = trunc i64 %35 to i32
%63 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 72, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %62)
br label %211
64: ; preds = %46
%65 = sext i32 %55 to i64
%66 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %65
%67 = sub i32 1056, %55
%68 = call i32 @BIO_read(i32* %37, i8* %66, i32 %67)
%69 = add nsw i32 %68, %55
%70 = call i32 @BIO_free_all(i32* %37)
%71 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %6, i32 %69, i8* %7, i32 %22)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %64
%74 = trunc i64 %35 to i32
%75 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 %74)
br label %211
76: ; preds = %64
%77 = add nuw nsw i64 %35, 1
%78 = icmp eq i64 %77, %28
br i1 %78, label %29, label %34
79: ; preds = %32, %107
%80 = phi i32 [ %108, %107 ], [ 1, %32 ]
%81 = call i32 (...) @BIO_f_cipher()
%82 = call i32* @BIO_new(i32 %81)
%83 = call i64 @BIO_set_cipher(i32* %82, i32* %0, i8* %1, i8* %2, i32 1)
%84 = icmp ne i64 %83, 0
%85 = zext i1 %84 to i32
%86 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 89, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %85)
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %79
%89 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0), i32 %80)
br label %211
90: ; preds = %79
%91 = call i32 @BIO_new_mem_buf(i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024)
%92 = call i32 @BIO_push(i32* %82, i32 %91)
%93 = call i32 @memset(i8* %6, i32 0, i32 1056)
br label %94
94: ; preds = %94, %90
%95 = phi i32 [ 0, %90 ], [ %100, %94 ]
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %96
%98 = call i32 @BIO_read(i32* %82, i8* %97, i32 %80)
%99 = icmp eq i32 %98, 0
%100 = add nsw i32 %98, %95
br i1 %99, label %101, label %94
101: ; preds = %94
%102 = call i32 @BIO_free_all(i32* %82)
%103 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %6, i32 %95, i8* %7, i32 %22)
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %107
105: ; preds = %101
%106 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 101, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.12, i64 0, i64 0), i32 %80)
br label %211
107: ; preds = %101
%108 = add nuw nsw i32 %80, 1
%109 = icmp eq i32 %108, %33
br i1 %109, label %110, label %79
110: ; preds = %107, %25, %29
%111 = phi i1 [ false, %25 ], [ false, %29 ], [ %31, %107 ]
%112 = phi i32 [ %26, %25 ], [ %30, %29 ], [ %30, %107 ]
%113 = call i32 (...) @BIO_f_cipher()
%114 = call i32* @BIO_new(i32 %113)
%115 = call i64 @BIO_set_cipher(i32* %114, i32* %0, i8* %1, i8* %2, i32 0)
%116 = icmp ne i64 %115, 0
%117 = zext i1 %116 to i32
%118 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 110, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %117)
%119 = icmp eq i32 %118, 0
br i1 %119, label %211, label %120
120: ; preds = %110
%121 = call i32 @BIO_new_mem_buf(i8* %7, i32 %22)
%122 = call i32 @BIO_push(i32* %114, i32 %121)
%123 = call i32 @BIO_flush(i32* %114)
%124 = call i32 @memset(i8* %6, i32 0, i32 1056)
%125 = call i32 @BIO_read(i32* %114, i8* %6, i32 1056)
%126 = call i32 @BIO_free_all(i32* %114)
%127 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 119, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %6, i32 %125)
%128 = icmp eq i32 %127, 0
br i1 %128, label %211, label %129
129: ; preds = %120
br i1 %24, label %130, label %132
130: ; preds = %129
%131 = zext i32 %22 to i64
br label %135
132: ; preds = %177, %129
br i1 %111, label %133, label %211
133: ; preds = %132
%134 = call i32 @llvm.smax.i32(i32 %112, i32 2)
br label %180
135: ; preds = %130, %177
%136 = phi i64 [ 1, %130 ], [ %178, %177 ]
%137 = call i32 (...) @BIO_f_cipher()
%138 = call i32* @BIO_new(i32 %137)
%139 = call i64 @BIO_set_cipher(i32* %138, i32* %0, i8* %1, i8* %2, i32 0)
%140 = icmp ne i64 %139, 0
%141 = zext i1 %140 to i32
%142 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 125, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %141)
%143 = icmp eq i32 %142, 0
br i1 %143, label %144, label %147
144: ; preds = %135
%145 = trunc i64 %136 to i32
%146 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 126, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0), i32 %145)
br label %211
147: ; preds = %135
%148 = call i32 @BIO_new_mem_buf(i8* %7, i32 %22)
%149 = call i32 @BIO_push(i32* %138, i32 %148)
%150 = call i32 @memset(i8* %6, i32 0, i32 1056)
%151 = getelementptr inbounds [1056 x i8], [1056 x i8]* %5, i64 0, i64 %136
%152 = load i8, i8* %151
%153 = xor i8 %152, -1
%154 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %136
store i8 %153, i8* %154
%155 = trunc i64 %136 to i32
%156 = call i32 @BIO_read(i32* %138, i8* %6, i32 %155)
%157 = load i8, i8* %154
%158 = load i8, i8* %151
%159 = xor i8 %158, -1
%160 = call i32 @test_uchar_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 134, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %157, i8 zeroext %159)
%161 = icmp eq i32 %160, 0
br i1 %161, label %162, label %165
162: ; preds = %147
%163 = trunc i64 %136 to i32
%164 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 135, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i32 %163)
br label %211
165: ; preds = %147
%166 = sext i32 %156 to i64
%167 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %166
%168 = sub i32 1056, %156
%169 = call i32 @BIO_read(i32* %138, i8* %167, i32 %168)
%170 = add nsw i32 %169, %156
%171 = call i32 @BIO_free_all(i32* %138)
%172 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 141, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %6, i32 %170)
%173 = icmp eq i32 %172, 0
br i1 %173, label %174, label %177
174: ; preds = %165
%175 = trunc i64 %136 to i32
%176 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 142, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0), i32 %175)
br label %211
177: ; preds = %165
%178 = add nuw nsw i64 %136, 1
%179 = icmp eq i64 %178, %131
br i1 %179, label %132, label %135
180: ; preds = %133, %208
%181 = phi i32 [ %209, %208 ], [ 1, %133 ]
%182 = call i32 (...) @BIO_f_cipher()
%183 = call i32* @BIO_new(i32 %182)
%184 = call i64 @BIO_set_cipher(i32* %183, i32* %0, i8* %1, i8* %2, i32 0)
%185 = icmp ne i64 %184, 0
%186 = zext i1 %185 to i32
%187 = call i32 @test_true(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 152, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0), i32 %186)
%188 = icmp eq i32 %187, 0
br i1 %188, label %189, label %191
189: ; preds = %180
%190 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 153, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 %181)
br label %211
191: ; preds = %180
%192 = call i32 @BIO_new_mem_buf(i8* %7, i32 %22)
%193 = call i32 @BIO_push(i32* %183, i32 %192)
%194 = call i32 @memset(i8* %6, i32 0, i32 1056)
br label %195
195: ; preds = %195, %191
%196 = phi i32 [ 0, %191 ], [ %201, %195 ]
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [1056 x i8], [1056 x i8]* %4, i64 0, i64 %197
%199 = call i32 @BIO_read(i32* %183, i8* %198, i32 %181)
%200 = icmp eq i32 %199, 0
%201 = add nsw i32 %199, %196
br i1 %200, label %202, label %195
202: ; preds = %195
%203 = call i32 @BIO_free_all(i32* %183)
%204 = call i32 @test_mem_eq(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1056 x i8], [1056 x i8]* @do_bio_cipher.inp, i64 0, i64 0), i32 1024, i8* %6, i32 %196)
%205 = icmp eq i32 %204, 0
br i1 %205, label %206, label %208
206: ; preds = %202
%207 = call i32 @test_info(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 164, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.19, i64 0, i64 0), i32 %181)
br label %211
208: ; preds = %202
%209 = add nuw nsw i32 %181, 1
%210 = icmp eq i32 %209, %134
br i1 %210, label %211, label %180
211: ; preds = %208, %132, %189, %206, %120, %110, %88, %105, %11, %3, %174, %162, %144, %73, %61, %43
%212 = phi i32 [ 0, %73 ], [ 0, %61 ], [ 0, %43 ], [ 0, %174 ], [ 0, %162 ], [ 0, %144 ], [ 0, %3 ], [ 0, %11 ], [ 0, %105 ], [ 0, %88 ], [ 0, %110 ], [ 0, %120 ], [ 0, %206 ], [ 0, %189 ], [ 1, %132 ], [ 1, %208 ]
ret i32 %212
}