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

/* Variables and functions */
char *BUF_strdup(char *);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ CRYPTO_mem_leaks_fp(int /*<<< orphan*/);
scalar_t__ ENGINE_add(int /*<<< orphan*/ *);
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ENGINE_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *ENGINE_get_first();
char *ENGINE_get_id(int /*<<< orphan*/ *);
char *ENGINE_get_name(int /*<<< orphan*/ *);
int /*<<< orphan*/ *ENGINE_new();
scalar_t__ ENGINE_remove(int /*<<< orphan*/ *);
int /*<<< orphan*/ ENGINE_set_id(int /*<<< orphan*/ *, char const *);
int /*<<< orphan*/ ENGINE_set_name(int /*<<< orphan*/ *, char const *);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ ERR_print_errors_fp(int /*<<< orphan*/);
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ display_engine_list();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ memset(int /*<<< orphan*/ **, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  ENGINE *block[512];
  char buf[256];
  const char *id, *name;
  ENGINE *ptr;
  int loop;
  int to_return = 1;
  ENGINE *new_h1 = NULL;
  ENGINE *new_h2 = NULL;
  ENGINE *new_h3 = NULL;
  ENGINE *new_h4 = NULL;
  ERR_load_crypto_strings();
  memset(block, 0, 512 * sizeof(ENGINE *));
  if (((new_h1 = ENGINE_new()) == NULL) || !ENGINE_set_id(new_h1, "test_id0") ||
      !ENGINE_set_name(new_h1, "First test item") ||
      ((new_h2 = ENGINE_new()) == NULL) || !ENGINE_set_id(new_h2, "test_id1") ||
      !ENGINE_set_name(new_h2, "Second test item") ||
      ((new_h3 = ENGINE_new()) == NULL) || !ENGINE_set_id(new_h3, "test_id2") ||
      !ENGINE_set_name(new_h3, "Third test item") ||
      ((new_h4 = ENGINE_new()) == NULL) || !ENGINE_set_id(new_h4, "test_id3") ||
      !ENGINE_set_name(new_h4, "Fourth test item")) {
    printf("Couldn't set up test ENGINE structures\n");
    goto end;
  }
  printf("\nenginetest beginning\n\n");
  display_engine_list();
  if (!ENGINE_add(new_h1)) {
    printf("Add failed!\n");
    goto end;
  }
  display_engine_list();
  ptr = ENGINE_get_first();
  if (!ENGINE_remove(ptr)) {
    printf("Remove failed!\n");
    goto end;
  }
  if (ptr)
    ENGINE_free(ptr);
  display_engine_list();
  if (!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) {
    printf("Add failed!\n");
    goto end;
  }
  display_engine_list();
  if (!ENGINE_remove(new_h2)) {
    printf("Remove failed!\n");
    goto end;
  }
  display_engine_list();
  if (!ENGINE_add(new_h4)) {
    printf("Add failed!\n");
    goto end;
  }
  display_engine_list();
  if (ENGINE_add(new_h3)) {
    printf("Add *should* have failed but didn't!\n");
    goto end;
  } else
    printf("Add that should fail did.\n");
  ERR_clear_error();
  if (ENGINE_remove(new_h2)) {
    printf("Remove *should* have failed but didn't!\n");
    goto end;
  } else
    printf("Remove that should fail did.\n");
  ERR_clear_error();
  if (!ENGINE_remove(new_h3)) {
    printf("Remove failed!\n");
    goto end;
  }
  display_engine_list();
  if (!ENGINE_remove(new_h4)) {
    printf("Remove failed!\n");
    goto end;
  }
  display_engine_list();
  ptr = ENGINE_get_first();
  if (ptr)
    if (!ENGINE_remove(ptr))
      printf("Remove failed!i - probably no hardware "
             "support present.\n");
  if (ptr)
    ENGINE_free(ptr);
  display_engine_list();
  if (!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) {
    printf("Couldn't add and remove to an empty list!\n");
    goto end;
  } else
    printf("Successfully added and removed to an empty list!\n");
  printf("About to beef up the engine-type list\n");
  for (loop = 0; loop < 512; loop++) {
    sprintf(buf, "id%i", loop);
    id = BUF_strdup(buf);
    sprintf(buf, "Fake engine type %i", loop);
    name = BUF_strdup(buf);
    if (((block[loop] = ENGINE_new()) == NULL) ||
        !ENGINE_set_id(block[loop], id) ||
        !ENGINE_set_name(block[loop], name)) {
      printf("Couldn't create block of ENGINE structures.\n"
             "I'll probably also core-dump now, damn.\n");
      goto end;
    }
  }
  for (loop = 0; loop < 512; loop++) {
    if (!ENGINE_add(block[loop])) {
      printf("\nAdding stopped at %i, (%s,%s)\n", loop,
             ENGINE_get_id(block[loop]), ENGINE_get_name(block[loop]));
      goto cleanup_loop;
    } else
      printf(".");
    fflush(stdout);
  }
cleanup_loop:
  printf("\nAbout to empty the engine-type list\n");
  while ((ptr = ENGINE_get_first()) != NULL) {
    if (!ENGINE_remove(ptr)) {
      printf("\nRemove failed!\n");
      goto end;
    }
    ENGINE_free(ptr);
    printf(".");
    fflush(stdout);
  }
  for (loop = 0; loop < 512; loop++) {
    free((void *)ENGINE_get_id(block[loop]));
    free((void *)ENGINE_get_name(block[loop]));
  }
  printf("\nTests completed happily\n");
  to_return = 0;
end:
  if (to_return)
    ERR_print_errors_fp(stderr);
  if (new_h1)
    ENGINE_free(new_h1);
  if (new_h2)
    ENGINE_free(new_h2);
  if (new_h3)
    ENGINE_free(new_h3);
  if (new_h4)
    ENGINE_free(new_h4);
  for (loop = 0; loop < 512; loop++)
    if (block[loop])
      ENGINE_free(block[loop]);
  ENGINE_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  ERR_remove_thread_state(NULL);
  CRYPTO_mem_leaks_fp(stderr);
  return to_return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x1130(%rbp)
movq   $0x0,-0x1138(%rbp)
movq   $0x0,-0x1140(%rbp)
movq   $0x0,-0x1148(%rbp)
movq   $0x0,-0x1150(%rbp)
mov    $0x0,%al
call   1170 <ERR_load_crypto_strings@plt>
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   10c0 <memset@plt>
mov    $0x0,%al
call   10d0 <ENGINE_new@plt>
mov    %rax,-0x1138(%rbp)
cmp    $0x0,%rax
je     1429 <main+0x1a9>
mov    -0x1138(%rbp),%rdi
lea    0xcf1(%rip),%rsi
call   1130 <ENGINE_set_id@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    -0x1138(%rbp),%rdi
lea    0xcde(%rip),%rsi
call   1120 <ENGINE_set_name@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    $0x0,%al
call   10d0 <ENGINE_new@plt>
mov    %rax,-0x1140(%rbp)
cmp    $0x0,%rax
je     1429 <main+0x1a9>
mov    -0x1140(%rbp),%rdi
lea    0xcba(%rip),%rsi
call   1130 <ENGINE_set_id@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    -0x1140(%rbp),%rdi
lea    0xca7(%rip),%rsi
call   1120 <ENGINE_set_name@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    $0x0,%al
call   10d0 <ENGINE_new@plt>
mov    %rax,-0x1148(%rbp)
cmp    $0x0,%rax
je     1429 <main+0x1a9>
mov    -0x1148(%rbp),%rdi
lea    0xc84(%rip),%rsi
call   1130 <ENGINE_set_id@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    -0x1148(%rbp),%rdi
lea    0xc71(%rip),%rsi
call   1120 <ENGINE_set_name@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    $0x0,%al
call   10d0 <ENGINE_new@plt>
mov    %rax,-0x1150(%rbp)
cmp    $0x0,%rax
je     1429 <main+0x1a9>
mov    -0x1150(%rbp),%rdi
lea    0xc4d(%rip),%rsi
call   1130 <ENGINE_set_id@plt>
cmp    $0x0,%eax
je     1429 <main+0x1a9>
mov    -0x1150(%rbp),%rdi
lea    0xc3a(%rip),%rsi
call   1120 <ENGINE_set_name@plt>
cmp    $0x0,%eax
jne    143c <main+0x1bc>
lea    0xc36(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1138(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
jne    147a <main+0x1fa>
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    $0x0,%al
call   1150 <ENGINE_get_first@plt>
mov    %rax,-0x1128(%rbp)
mov    -0x1128(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    14b8 <main+0x238>
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
cmpq   $0x0,-0x1128(%rbp)
je     14d2 <main+0x252>
mov    -0x1128(%rbp),%rdi
call   1040 <ENGINE_free@plt>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1148(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
je     1505 <main+0x285>
mov    -0x1140(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
jne    1518 <main+0x298>
lea    0xb9a(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1140(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    1548 <main+0x2c8>
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1150(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
jne    1578 <main+0x2f8>
lea    0xb3a(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1148(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
je     15a8 <main+0x328>
lea    0xb17(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
lea    0xb2a(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    $0x0,%al
call   10e0 <ERR_clear_error@plt>
mov    -0x1140(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
je     15e6 <main+0x366>
lea    0xb1a(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
lea    0xb30(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    $0x0,%al
call   10e0 <ERR_clear_error@plt>
mov    -0x1148(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    1624 <main+0x3a4>
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1150(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    1654 <main+0x3d4>
lea    0xc67(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    $0x0,%al
call   1150 <ENGINE_get_first@plt>
mov    %rax,-0x1128(%rbp)
cmpq   $0x0,-0x1128(%rbp)
je     16a0 <main+0x420>
mov    -0x1128(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    169b <main+0x41b>
lea    0xaa7(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    16a0 <main+0x420>
cmpq   $0x0,-0x1128(%rbp)
je     16ba <main+0x43a>
mov    -0x1128(%rbp),%rdi
call   1040 <ENGINE_free@plt>
mov    $0x0,%al
call   1100 <display_engine_list@plt>
mov    -0x1138(%rbp),%rdi
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
je     16ed <main+0x46d>
mov    -0x1138(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    1700 <main+0x480>
lea    0xa80(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
lea    0xa98(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
lea    0xabc(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
movl   $0x0,-0x112c(%rbp)
cmpl   $0x200,-0x112c(%rbp)
jge    1822 <main+0x5a2>
lea    -0x1110(%rbp),%rdi
mov    -0x112c(%rbp),%edx
lea    0xaae(%rip),%rsi
call   1180 <sprintf@plt>
lea    -0x1110(%rbp),%rdi
call   1160 <BUF_strdup@plt>
mov    %rax,-0x1118(%rbp)
lea    -0x1110(%rbp),%rdi
mov    -0x112c(%rbp),%edx
lea    0xa87(%rip),%rsi
call   1180 <sprintf@plt>
lea    -0x1110(%rbp),%rdi
call   1160 <BUF_strdup@plt>
mov    %rax,-0x1120(%rbp)
mov    $0x0,%al
call   10d0 <ENGINE_new@plt>
movslq -0x112c(%rbp),%rcx
mov    %rax,-0x1010(%rbp,%rcx,8)
ff
cmp    $0x0,%rax
je     17f6 <main+0x576>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
mov    -0x1118(%rbp),%rsi
call   1130 <ENGINE_set_id@plt>
cmp    $0x0,%eax
je     17f6 <main+0x576>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
mov    -0x1120(%rbp),%rsi
call   1120 <ENGINE_set_name@plt>
cmp    $0x0,%eax
jne    1809 <main+0x589>
lea    0xa14(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
jmp    180e <main+0x58e>
mov    -0x112c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x112c(%rbp)
jmp    1726 <main+0x4a6>
movl   $0x0,-0x112c(%rbp)
cmpl   $0x200,-0x112c(%rbp)
jge    18e8 <main+0x668>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   10a0 <ENGINE_add@plt>
cmp    $0x0,%rax
jne    18b8 <main+0x638>
mov    -0x112c(%rbp),%eax
mov    %eax,-0x115c(%rbp)
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   11a0 <ENGINE_get_id@plt>
mov    %rax,-0x1158(%rbp)
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   1090 <ENGINE_get_name@plt>
mov    -0x115c(%rbp),%esi
mov    -0x1158(%rbp),%rdx
mov    %rax,%rcx
lea    0x9ba(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    18ed <main+0x66d>
lea    0x9c7(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    0x270b(%rip),%rax
mov    (%rax),%edi
call   1110 <fflush@plt>
mov    -0x112c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x112c(%rbp)
jmp    182c <main+0x5ac>
jmp    18ed <main+0x66d>
lea    0x994(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    $0x0,%al
call   1150 <ENGINE_get_first@plt>
mov    %rax,-0x1128(%rbp)
cmp    $0x0,%rax
je     1969 <main+0x6e9>
mov    -0x1128(%rbp),%rdi
call   1140 <ENGINE_remove@plt>
cmp    $0x0,%rax
jne    193c <main+0x6bc>
lea    0x97e(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    19e7 <main+0x767>
mov    -0x1128(%rbp),%rdi
call   1040 <ENGINE_free@plt>
lea    0x937(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    0x267b(%rip),%rax
mov    (%rax),%edi
call   1110 <fflush@plt>
jmp    18fb <main+0x67b>
movl   $0x0,-0x112c(%rbp)
cmpl   $0x200,-0x112c(%rbp)
jge    19cf <main+0x74f>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   11a0 <ENGINE_get_id@plt>
mov    %rax,%rdi
call   1030 <free@plt>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   1090 <ENGINE_get_name@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    -0x112c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x112c(%rbp)
jmp    1973 <main+0x6f3>
lea    0x8e9(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
movl   $0x0,-0x1130(%rbp)
cmpl   $0x0,-0x1130(%rbp)
je     1a02 <main+0x782>
mov    0x25e5(%rip),%rax
mov    (%rax),%edi
call   1190 <ERR_print_errors_fp@plt>
cmpq   $0x0,-0x1138(%rbp)
je     1a1c <main+0x79c>
mov    -0x1138(%rbp),%rdi
call   1040 <ENGINE_free@plt>
cmpq   $0x0,-0x1140(%rbp)
je     1a36 <main+0x7b6>
mov    -0x1140(%rbp),%rdi
call   1040 <ENGINE_free@plt>
cmpq   $0x0,-0x1148(%rbp)
je     1a50 <main+0x7d0>
mov    -0x1148(%rbp),%rdi
call   1040 <ENGINE_free@plt>
cmpq   $0x0,-0x1150(%rbp)
je     1a6a <main+0x7ea>
mov    -0x1150(%rbp),%rdi
call   1040 <ENGINE_free@plt>
movl   $0x0,-0x112c(%rbp)
cmpl   $0x200,-0x112c(%rbp)
jge    1ac7 <main+0x847>
movslq -0x112c(%rbp),%rax
cmpq   $0x0,-0x1010(%rbp,%rax,8)
je     1aae <main+0x82e>
movslq -0x112c(%rbp),%rax
mov    -0x1010(%rbp,%rax,8),%rdi
ff
call   1040 <ENGINE_free@plt>
jmp    1ab3 <main+0x833>
mov    -0x112c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x112c(%rbp)
jmp    1a74 <main+0x7f4>
mov    $0x0,%al
call   1080 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   1070 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   10f0 <ERR_free_strings@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <ERR_remove_thread_state@plt>
mov    0x24f4(%rip),%rax
mov    (%rax),%edi
call   1060 <CRYPTO_mem_leaks_fp@plt>
mov    -0x1130(%rbp),%eax
add    $0x1160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1118,%rsp
xor    %r14d,%r14d
xor    %eax,%eax
call   1190 <ERR_load_crypto_strings@plt>
lea    0x110(%rsp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   10e0 <memset@plt>
xor    %eax,%eax
call   10f0 <ENGINE_new@plt>
mov    %rax,%rbx
lea    0xdbf(%rip),%r13
test   %rax,%rax
je     14b2 <main+0x212>
lea    0xd10(%rip),%rsi
mov    %rbx,%rdi
call   1150 <ENGINE_set_id@plt>
test   %eax,%eax
je     14af <main+0x20f>
lea    0xd02(%rip),%rsi
mov    %rbx,%rdi
call   1140 <ENGINE_set_name@plt>
test   %eax,%eax
je     14af <main+0x20f>
xor    %r15d,%r15d
xor    %eax,%eax
call   10f0 <ENGINE_new@plt>
test   %rax,%rax
je     156f <main+0x2cf>
mov    %rax,%r14
lea    0xce5(%rip),%rsi
mov    %rax,%rdi
call   1150 <ENGINE_set_id@plt>
test   %eax,%eax
je     14b2 <main+0x212>
lea    0xcd7(%rip),%rsi
mov    %r14,%rdi
call   1140 <ENGINE_set_name@plt>
test   %eax,%eax
je     14b2 <main+0x212>
xor    %r12d,%r12d
xor    %eax,%eax
call   10f0 <ENGINE_new@plt>
test   %rax,%rax
je     1577 <main+0x2d7>
mov    %rax,%r15
lea    0xcbb(%rip),%rsi
mov    %rax,%rdi
call   1150 <ENGINE_set_id@plt>
test   %eax,%eax
je     14b5 <main+0x215>
lea    0xcad(%rip),%rsi
mov    %r15,%rdi
call   1140 <ENGINE_set_name@plt>
test   %eax,%eax
je     14b5 <main+0x215>
xor    %eax,%eax
call   10f0 <ENGINE_new@plt>
test   %rax,%rax
je     14b5 <main+0x215>
mov    %rax,%r12
lea    0xc93(%rip),%rsi
mov    %rax,%rdi
call   1150 <ENGINE_set_id@plt>
test   %eax,%eax
je     14b8 <main+0x218>
lea    0xc85(%rip),%rsi
mov    %r12,%rdi
call   1140 <ENGINE_set_name@plt>
test   %eax,%eax
je     14b8 <main+0x218>
lea    0xcdf(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %rbx,%rdi
call   10c0 <ENGINE_add@plt>
lea    0xcdb(%rip),%r13
test   %rax,%rax
je     14b8 <main+0x218>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
xor    %eax,%eax
call   1170 <ENGINE_get_first@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1160 <ENGINE_remove@plt>
lea    0xdb5(%rip),%rcx
test   %rax,%rax
je     157f <main+0x2df>
test   %rbp,%rbp
je     1441 <main+0x1a1>
mov    %rbp,%rdi
call   1040 <ENGINE_free@plt>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %r15,%rdi
call   10c0 <ENGINE_add@plt>
test   %rax,%rax
je     14b8 <main+0x218>
mov    %r14,%rdi
call   10c0 <ENGINE_add@plt>
test   %rax,%rax
je     14b8 <main+0x218>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %r14,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     174c <main+0x4ac>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %r12,%rdi
call   10c0 <ENGINE_add@plt>
test   %rax,%rax
je     14b8 <main+0x218>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %r15,%rdi
call   10c0 <ENGINE_add@plt>
test   %rax,%rax
je     1587 <main+0x2e7>
lea    0xdf6(%rip),%r13
jmp    14b8 <main+0x218>
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %r12d,%r12d
mov    %r13,%rdi
call   1060 <puts@plt>
mov    0x2b19(%rip),%rax
mov    (%rax),%edi
call   11b0 <ERR_print_errors_fp@plt>
mov    $0x1,%ebp
test   %rbx,%rbx
je     14e0 <main+0x240>
mov    %rbx,%rdi
call   1040 <ENGINE_free@plt>
test   %r14,%r14
je     14ed <main+0x24d>
mov    %r14,%rdi
call   1040 <ENGINE_free@plt>
test   %r15,%r15
je     14fa <main+0x25a>
mov    %r15,%rdi
call   1040 <ENGINE_free@plt>
test   %r12,%r12
je     1507 <main+0x267>
mov    %r12,%rdi
call   1040 <ENGINE_free@plt>
xor    %ebx,%ebx
jmp    151d <main+0x27d>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0x200,%rbx
je     1531 <main+0x291>
mov    0x110(%rsp,%rbx,8),%rdi
test   %rdi,%rdi
je     1510 <main+0x270>
call   1040 <ENGINE_free@plt>
jmp    1510 <main+0x270>
xor    %eax,%eax
call   10a0 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   1090 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
call   1110 <ERR_free_strings@plt>
xor    %edi,%edi
call   1070 <ERR_remove_thread_state@plt>
mov    0x2a8c(%rip),%rax
mov    (%rax),%edi
call   1080 <CRYPTO_mem_leaks_fp@plt>
mov    %ebp,%eax
add    $0x1118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r14d,%r14d
jmp    14b5 <main+0x215>
xor    %r15d,%r15d
jmp    14b8 <main+0x218>
mov    %rcx,%r13
jmp    14b8 <main+0x218>
lea    0xb5b(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1100 <ERR_clear_error@plt>
mov    %r14,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     15b3 <main+0x313>
lea    0xccd(%rip),%r13
jmp    14b8 <main+0x218>
lea    0xb49(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1100 <ERR_clear_error@plt>
mov    %r15,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     174c <main+0x4ac>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %r12,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     174c <main+0x4ac>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
xor    %eax,%eax
call   1170 <ENGINE_get_first@plt>
test   %rax,%rax
je     1626 <main+0x386>
mov    %rax,%rbp
mov    %rax,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
jne    161e <main+0x37e>
lea    0xc2a(%rip),%rdi
call   1060 <puts@plt>
mov    %rbp,%rdi
call   1040 <ENGINE_free@plt>
xor    %eax,%eax
call   1120 <display_engine_list@plt>
mov    %rbx,%rdi
call   10c0 <ENGINE_add@plt>
lea    0xae4(%rip),%r13
test   %rax,%rax
je     14b8 <main+0x218>
mov    %rbx,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     14b8 <main+0x218>
lea    0xaed(%rip),%rdi
call   1060 <puts@plt>
lea    0xb12(%rip),%rdi
call   1060 <puts@plt>
lea    0xb7a(%rip),%r13
xor    %ebp,%ebp
lea    0x10(%rsp),%rdi
lea    0x9e3(%rip),%rsi
mov    %ebp,%edx
call   11a0 <sprintf@plt>
lea    0x10(%rsp),%rdi
call   1180 <BUF_strdup@plt>
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x9c6(%rip),%rsi
mov    %ebp,%edx
call   11a0 <sprintf@plt>
lea    0x10(%rsp),%rdi
call   1180 <BUF_strdup@plt>
mov    %rax,(%rsp)
xor    %eax,%eax
call   10f0 <ENGINE_new@plt>
mov    %rax,0x110(%rsp,%rbp,8)
test   %rax,%rax
je     14b8 <main+0x218>
mov    %rax,%rdi
mov    0x8(%rsp),%rsi
call   1150 <ENGINE_set_id@plt>
test   %eax,%eax
je     14b8 <main+0x218>
mov    0x110(%rsp,%rbp,8),%rdi
mov    (%rsp),%rsi
call   1140 <ENGINE_set_name@plt>
test   %eax,%eax
je     14b8 <main+0x218>
add    $0x1,%rbp
cmp    $0x200,%rbp
jne    1677 <main+0x3d7>
xor    %ebp,%ebp
mov    0x110(%rsp,%rbp,8),%rdi
call   10c0 <ENGINE_add@plt>
test   %rax,%rax
je     1758 <main+0x4b8>
mov    $0x2e,%edi
call   1050 <putchar@plt>
mov    0x28a2(%rip),%rax
mov    (%rax),%edi
call   1130 <fflush@plt>
add    $0x1,%rbp
cmp    $0x200,%rbp
jne    1713 <main+0x473>
jmp    178b <main+0x4eb>
lea    0xa8d(%rip),%r13
jmp    14b8 <main+0x218>
mov    0x110(%rsp,%rbp,8),%rdi
call   11c0 <ENGINE_get_id@plt>
mov    %rax,%r13
mov    0x110(%rsp,%rbp,8),%rdi
call   10b0 <ENGINE_get_name@plt>
lea    0x903(%rip),%rdi
mov    %ebp,%esi
mov    %r13,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   10d0 <printf@plt>
lea    0xa0f(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1170 <ENGINE_get_first@plt>
test   %rax,%rax
je     17ed <main+0x54d>
mov    %rax,%rbp
lea    0xa32(%rip),%r13
mov    %rbp,%rdi
call   1160 <ENGINE_remove@plt>
test   %rax,%rax
je     14b8 <main+0x218>
mov    %rbp,%rdi
call   1040 <ENGINE_free@plt>
mov    $0x2e,%edi
call   1050 <putchar@plt>
mov    0x2801(%rip),%rax
mov    (%rax),%edi
call   1130 <fflush@plt>
xor    %eax,%eax
call   1170 <ENGINE_get_first@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    17ad <main+0x50d>
xor    %ebp,%ebp
mov    0x110(%rsp,%rbp,8),%rdi
call   11c0 <ENGINE_get_id@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    0x110(%rsp,%rbp,8),%rdi
call   10b0 <ENGINE_get_name@plt>
mov    %rax,%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    $0x200,%rbp
jne    17ef <main+0x54f>
lea    0x999(%rip),%rdi
call   1060 <puts@plt>
xor    %ebp,%ebp
test   %rbx,%rbx
jne    14d8 <main+0x238>
jmp    14e0 <main+0x240>

LLVM IR (-O0):
@.str = [9 x i8] c"test_id0\00"
@.str.1 = [16 x i8] c"First test item\00"
@.str.2 = [9 x i8] c"test_id1\00"
@.str.3 = [17 x i8] c"Second test item\00"
@.str.4 = [9 x i8] c"test_id2\00"
@.str.5 = [16 x i8] c"Third test item\00"
@.str.6 = [9 x i8] c"test_id3\00"
@.str.7 = [17 x i8] c"Fourth test item\00"
@.str.8 = [40 x i8] c"Couldn't set up test ENGINE structures\0A\00"
@.str.9 = [24 x i8] c"\0Aenginetest beginning\0A\0A\00"
@.str.10 = [13 x i8] c"Add failed!\0A\00"
@.str.11 = [16 x i8] c"Remove failed!\0A\00"
@.str.12 = [38 x i8] c"Add *should* have failed but didn't!\0A\00"
@.str.13 = [27 x i8] c"Add that should fail did.\0A\00"
@.str.14 = [41 x i8] c"Remove *should* have failed but didn't!\0A\00"
@.str.15 = [30 x i8] c"Remove that should fail did.\0A\00"
@.str.16 = [57 x i8] c"Remove failed!i - probably no hardware support present.\0A\00"
@.str.17 = [43 x i8] c"Couldn't add and remove to an empty list!\0A\00"
@.str.18 = [50 x i8] c"Successfully added and removed to an empty list!\0A\00"
@.str.19 = [39 x i8] c"About to beef up the engine-type list\0A\00"
@.str.20 = [5 x i8] c"id%i\00"
@.str.21 = [20 x i8] c"Fake engine type %i\00"
@.str.22 = [85 x i8] c"Couldn't create block of ENGINE structures.\0AI'll probably also core-dump now, damn.\0A\00"
@.str.23 = [32 x i8] c"\0AAdding stopped at %i, (%s,%s)\0A\00"
@.str.24 = [2 x i8] c".\00"
@stdout = global i32 0
@.str.25 = [38 x i8] c"\0AAbout to empty the engine-type list\0A\00"
@.str.26 = [17 x i8] c"\0ARemove failed!\0A\00"
@.str.27 = [26 x i8] c"\0ATests completed happily\0A\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i32*]
%7 = alloca [256 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %12
store i32* null, i32** %13
store i32* null, i32** %14
store i32* null, i32** %15
store i32* null, i32** %16
%17 = call i32 (...) @ERR_load_crypto_strings()
%18 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 0
%19 = call i32 @memset(i32** %18, i32 0, i32 4096)
%20 = call i32* (...) @ENGINE_new()
store i32* %20, i32** %13
%21 = icmp eq i32* %20, null
br i1 %21, label %63, label %22
22: ; preds = %2
%23 = load i32*, i32** %13
%24 = call i32 @ENGINE_set_id(i32* %23, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %63
26: ; preds = %22
%27 = load i32*, i32** %13
%28 = call i32 @ENGINE_set_name(i32* %27, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %63
30: ; preds = %26
%31 = call i32* (...) @ENGINE_new()
store i32* %31, i32** %14
%32 = icmp eq i32* %31, null
br i1 %32, label %63, label %33
33: ; preds = %30
%34 = load i32*, i32** %14
%35 = call i32 @ENGINE_set_id(i32* %34, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %63
37: ; preds = %33
%38 = load i32*, i32** %14
%39 = call i32 @ENGINE_set_name(i32* %38, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %63
41: ; preds = %37
%42 = call i32* (...) @ENGINE_new()
store i32* %42, i32** %15
%43 = icmp eq i32* %42, null
br i1 %43, label %63, label %44
44: ; preds = %41
%45 = load i32*, i32** %15
%46 = call i32 @ENGINE_set_id(i32* %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %63
48: ; preds = %44
%49 = load i32*, i32** %15
%50 = call i32 @ENGINE_set_name(i32* %49, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %63
52: ; preds = %48
%53 = call i32* (...) @ENGINE_new()
store i32* %53, i32** %16
%54 = icmp eq i32* %53, null
br i1 %54, label %63, label %55
55: ; preds = %52
%56 = load i32*, i32** %16
%57 = call i32 @ENGINE_set_id(i32* %56, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %55
%60 = load i32*, i32** %16
%61 = call i32 @ENGINE_set_name(i32* %60, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp ne i32 %61, 0
br i1 %62, label %65, label %63
63: ; preds = %59, %55, %52, %48, %44, %41, %37, %33, %30, %26, %22, %2
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
br label %290
65: ; preds = %59
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%67 = call i32 (...) @display_engine_list()
%68 = load i32*, i32** %13
%69 = call i64 @ENGINE_add(i32* %68)
%70 = icmp ne i64 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %65
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
br label %290
73: ; preds = %65
%74 = call i32 (...) @display_engine_list()
%75 = call i32* (...) @ENGINE_get_first()
store i32* %75, i32** %10
%76 = load i32*, i32** %10
%77 = call i64 @ENGINE_remove(i32* %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %73
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %290
81: ; preds = %73
%82 = load i32*, i32** %10
%83 = icmp ne i32* %82, null
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load i32*, i32** %10
%86 = call i32 @ENGINE_free(i32* %85)
br label %87
87: ; preds = %84, %81
%88 = call i32 (...) @display_engine_list()
%89 = load i32*, i32** %15
%90 = call i64 @ENGINE_add(i32* %89)
%91 = icmp ne i64 %90, 0
br i1 %91, label %92, label %96
92: ; preds = %87
%93 = load i32*, i32** %14
%94 = call i64 @ENGINE_add(i32* %93)
%95 = icmp ne i64 %94, 0
br i1 %95, label %98, label %96
96: ; preds = %92, %87
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
br label %290
98: ; preds = %92
%99 = call i32 (...) @display_engine_list()
%100 = load i32*, i32** %14
%101 = call i64 @ENGINE_remove(i32* %100)
%102 = icmp ne i64 %101, 0
br i1 %102, label %105, label %103
103: ; preds = %98
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %290
105: ; preds = %98
%106 = call i32 (...) @display_engine_list()
%107 = load i32*, i32** %16
%108 = call i64 @ENGINE_add(i32* %107)
%109 = icmp ne i64 %108, 0
br i1 %109, label %112, label %110
110: ; preds = %105
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
br label %290
112: ; preds = %105
%113 = call i32 (...) @display_engine_list()
%114 = load i32*, i32** %15
%115 = call i64 @ENGINE_add(i32* %114)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %119
117: ; preds = %112
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
br label %290
119: ; preds = %112
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
br label %121
121: ; preds = %119
%122 = call i32 (...) @ERR_clear_error()
%123 = load i32*, i32** %14
%124 = call i64 @ENGINE_remove(i32* %123)
%125 = icmp ne i64 %124, 0
br i1 %125, label %126, label %128
126: ; preds = %121
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0))
br label %290
128: ; preds = %121
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0))
br label %130
130: ; preds = %128
%131 = call i32 (...) @ERR_clear_error()
%132 = load i32*, i32** %15
%133 = call i64 @ENGINE_remove(i32* %132)
%134 = icmp ne i64 %133, 0
br i1 %134, label %137, label %135
135: ; preds = %130
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %290
137: ; preds = %130
%138 = call i32 (...) @display_engine_list()
%139 = load i32*, i32** %16
%140 = call i64 @ENGINE_remove(i32* %139)
%141 = icmp ne i64 %140, 0
br i1 %141, label %144, label %142
142: ; preds = %137
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %290
144: ; preds = %137
%145 = call i32 (...) @display_engine_list()
%146 = call i32* (...) @ENGINE_get_first()
store i32* %146, i32** %10
%147 = load i32*, i32** %10
%148 = icmp ne i32* %147, null
br i1 %148, label %149, label %156
149: ; preds = %144
%150 = load i32*, i32** %10
%151 = call i64 @ENGINE_remove(i32* %150)
%152 = icmp ne i64 %151, 0
br i1 %152, label %155, label %153
153: ; preds = %149
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.16, i64 0, i64 0))
br label %155
155: ; preds = %153, %149
br label %156
156: ; preds = %155, %144
%157 = load i32*, i32** %10
%158 = icmp ne i32* %157, null
br i1 %158, label %159, label %162
159: ; preds = %156
%160 = load i32*, i32** %10
%161 = call i32 @ENGINE_free(i32* %160)
br label %162
162: ; preds = %159, %156
%163 = call i32 (...) @display_engine_list()
%164 = load i32*, i32** %13
%165 = call i64 @ENGINE_add(i32* %164)
%166 = icmp ne i64 %165, 0
br i1 %166, label %167, label %171
167: ; preds = %162
%168 = load i32*, i32** %13
%169 = call i64 @ENGINE_remove(i32* %168)
%170 = icmp ne i64 %169, 0
br i1 %170, label %173, label %171
171: ; preds = %167, %162
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0))
br label %290
173: ; preds = %167
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0))
br label %175
175: ; preds = %173
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.19, i64 0, i64 0))
store i32 0, i32* %11
br label %177
177: ; preds = %215, %175
%178 = load i32, i32* %11
%179 = icmp slt i32 %178, 512
br i1 %179, label %180, label %218
180: ; preds = %177
%181 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%182 = load i32, i32* %11
%183 = call i32 @sprintf(i8* %181, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 %182)
%184 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%185 = call i8* @BUF_strdup(i8* %184)
store i8* %185, i8** %8
%186 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%187 = load i32, i32* %11
%188 = call i32 @sprintf(i8* %186, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 %187)
%189 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%190 = call i8* @BUF_strdup(i8* %189)
store i8* %190, i8** %9
%191 = call i32* (...) @ENGINE_new()
%192 = load i32, i32* %11
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %193
store i32* %191, i32** %194
%195 = icmp eq i32* %191, null
br i1 %195, label %212, label %196
196: ; preds = %180
%197 = load i32, i32* %11
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %198
%200 = load i32*, i32** %199
%201 = load i8*, i8** %8
%202 = call i32 @ENGINE_set_id(i32* %200, i8* %201)
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %212
204: ; preds = %196
%205 = load i32, i32* %11
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %206
%208 = load i32*, i32** %207
%209 = load i8*, i8** %9
%210 = call i32 @ENGINE_set_name(i32* %208, i8* %209)
%211 = icmp ne i32 %210, 0
br i1 %211, label %214, label %212
212: ; preds = %204, %196, %180
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.22, i64 0, i64 0))
br label %290
214: ; preds = %204
br label %215
215: ; preds = %214
%216 = load i32, i32* %11
%217 = add nsw i32 %216, 1
store i32 %217, i32* %11
br label %177
218: ; preds = %177
store i32 0, i32* %11
br label %219
219: ; preds = %247, %218
%220 = load i32, i32* %11
%221 = icmp slt i32 %220, 512
br i1 %221, label %222, label %250
222: ; preds = %219
%223 = load i32, i32* %11
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %224
%226 = load i32*, i32** %225
%227 = call i64 @ENGINE_add(i32* %226)
%228 = icmp ne i64 %227, 0
br i1 %228, label %242, label %229
229: ; preds = %222
%230 = load i32, i32* %11
%231 = load i32, i32* %11
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %232
%234 = load i32*, i32** %233
%235 = call i8* @ENGINE_get_id(i32* %234)
%236 = load i32, i32* %11
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %237
%239 = load i32*, i32** %238
%240 = call i8* @ENGINE_get_name(i32* %239)
%241 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.23, i64 0, i64 0), i32 %230, i8* %235, i8* %240)
br label %251
242: ; preds = %222
%243 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
br label %244
244: ; preds = %242
%245 = load i32, i32* @stdout
%246 = call i32 @fflush(i32 %245)
br label %247
247: ; preds = %244
%248 = load i32, i32* %11
%249 = add nsw i32 %248, 1
store i32 %249, i32* %11
br label %219
250: ; preds = %219
br label %251
251: ; preds = %250, %229
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.25, i64 0, i64 0))
br label %253
253: ; preds = %262, %251
%254 = call i32* (...) @ENGINE_get_first()
store i32* %254, i32** %10
%255 = icmp ne i32* %254, null
br i1 %255, label %256, label %268
256: ; preds = %253
%257 = load i32*, i32** %10
%258 = call i64 @ENGINE_remove(i32* %257)
%259 = icmp ne i64 %258, 0
br i1 %259, label %262, label %260
260: ; preds = %256
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
br label %290
262: ; preds = %256
%263 = load i32*, i32** %10
%264 = call i32 @ENGINE_free(i32* %263)
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%266 = load i32, i32* @stdout
%267 = call i32 @fflush(i32 %266)
br label %253
268: ; preds = %253
store i32 0, i32* %11
br label %269
269: ; preds = %285, %268
%270 = load i32, i32* %11
%271 = icmp slt i32 %270, 512
br i1 %271, label %272, label %288
272: ; preds = %269
%273 = load i32, i32* %11
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %274
%276 = load i32*, i32** %275
%277 = call i8* @ENGINE_get_id(i32* %276)
%278 = call i32 @free(i8* %277)
%279 = load i32, i32* %11
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %280
%282 = load i32*, i32** %281
%283 = call i8* @ENGINE_get_name(i32* %282)
%284 = call i32 @free(i8* %283)
br label %285
285: ; preds = %272
%286 = load i32, i32* %11
%287 = add nsw i32 %286, 1
store i32 %287, i32* %11
br label %269
288: ; preds = %269
%289 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0))
store i32 0, i32* %12
br label %290
290: ; preds = %288, %260, %212, %171, %142, %135, %126, %117, %110, %103, %96, %79, %71, %63
%291 = load i32, i32* %12
%292 = icmp ne i32 %291, 0
br i1 %292, label %293, label %296
293: ; preds = %290
%294 = load i32, i32* @stderr
%295 = call i32 @ERR_print_errors_fp(i32 %294)
br label %296
296: ; preds = %293, %290
%297 = load i32*, i32** %13
%298 = icmp ne i32* %297, null
br i1 %298, label %299, label %302
299: ; preds = %296
%300 = load i32*, i32** %13
%301 = call i32 @ENGINE_free(i32* %300)
br label %302
302: ; preds = %299, %296
%303 = load i32*, i32** %14
%304 = icmp ne i32* %303, null
br i1 %304, label %305, label %308
305: ; preds = %302
%306 = load i32*, i32** %14
%307 = call i32 @ENGINE_free(i32* %306)
br label %308
308: ; preds = %305, %302
%309 = load i32*, i32** %15
%310 = icmp ne i32* %309, null
br i1 %310, label %311, label %314
311: ; preds = %308
%312 = load i32*, i32** %15
%313 = call i32 @ENGINE_free(i32* %312)
br label %314
314: ; preds = %311, %308
%315 = load i32*, i32** %16
%316 = icmp ne i32* %315, null
br i1 %316, label %317, label %320
317: ; preds = %314
%318 = load i32*, i32** %16
%319 = call i32 @ENGINE_free(i32* %318)
br label %320
320: ; preds = %317, %314
store i32 0, i32* %11
br label %321
321: ; preds = %337, %320
%322 = load i32, i32* %11
%323 = icmp slt i32 %322, 512
br i1 %323, label %324, label %340
324: ; preds = %321
%325 = load i32, i32* %11
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %326
%328 = load i32*, i32** %327
%329 = icmp ne i32* %328, null
br i1 %329, label %330, label %336
330: ; preds = %324
%331 = load i32, i32* %11
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds [512 x i32*], [512 x i32*]* %6, i64 0, i64 %332
%334 = load i32*, i32** %333
%335 = call i32 @ENGINE_free(i32* %334)
br label %336
336: ; preds = %330, %324
br label %337
337: ; preds = %336
%338 = load i32, i32* %11
%339 = add nsw i32 %338, 1
store i32 %339, i32* %11
br label %321
340: ; preds = %321
%341 = call i32 (...) @ENGINE_cleanup()
%342 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%343 = call i32 (...) @ERR_free_strings()
%344 = call i32 @ERR_remove_thread_state(i32* null)
%345 = load i32, i32* @stderr
%346 = call i32 @CRYPTO_mem_leaks_fp(i32 %345)
%347 = load i32, i32* %12
ret i32 %347
}

LLVM IR (-O2):
@.str = [9 x i8] c"test_id0\00"
@.str.1 = [16 x i8] c"First test item\00"
@.str.2 = [9 x i8] c"test_id1\00"
@.str.3 = [17 x i8] c"Second test item\00"
@.str.4 = [9 x i8] c"test_id2\00"
@.str.5 = [16 x i8] c"Third test item\00"
@.str.6 = [9 x i8] c"test_id3\00"
@.str.7 = [17 x i8] c"Fourth test item\00"
@.str.20 = [5 x i8] c"id%i\00"
@.str.21 = [20 x i8] c"Fake engine type %i\00"
@.str.23 = [32 x i8] c"\0AAdding stopped at %i, (%s,%s)\0A\00"
@stdout = global i32 0
@stderr = global i32 0
@str = [39 x i8] c"Couldn't set up test ENGINE structures\00"
@str.28 = [23 x i8] c"\0Aenginetest beginning\0A\00"
@str.33 = [12 x i8] c"Add failed!\00"
@str.34 = [26 x i8] c"Add that should fail did.\00"
@str.35 = [29 x i8] c"Remove that should fail did.\00"
@str.37 = [15 x i8] c"Remove failed!\00"
@str.38 = [42 x i8] c"Couldn't add and remove to an empty list!\00"
@str.39 = [49 x i8] c"Successfully added and removed to an empty list!\00"
@str.40 = [38 x i8] c"About to beef up the engine-type list\00"
@str.41 = [37 x i8] c"\0AAbout to empty the engine-type list\00"
@str.42 = [25 x i8] c"\0ATests completed happily\00"
@str.43 = [16 x i8] c"\0ARemove failed!\00"
@str.44 = [84 x i8] c"Couldn't create block of ENGINE structures.\0AI'll probably also core-dump now, damn.\00"
@str.45 = [56 x i8] c"Remove failed!i - probably no hardware support present.\00"
@str.46 = [40 x i8] c"Remove *should* have failed but didn't!\00"
@str.47 = [37 x i8] c"Add *should* have failed but didn't!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i32*]
%4 = alloca [256 x i8]
%5 = bitcast [512 x i32*]* %3 to i8*
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (...) @ERR_load_crypto_strings()
%8 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 0
%9 = call i32 @memset(i32** %8, i32 0, i32 4096)
%10 = call i32* (...) @ENGINE_new()
%11 = icmp eq i32* %10, null
br i1 %11, label %183, label %12
12: ; preds = %2
%13 = call i32 @ENGINE_set_id(i32* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %183, label %15
15: ; preds = %12
%16 = call i32 @ENGINE_set_name(i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %183, label %18
18: ; preds = %15
%19 = call i32* (...) @ENGINE_new()
%20 = icmp eq i32* %19, null
br i1 %20, label %183, label %21
21: ; preds = %18
%22 = call i32 @ENGINE_set_id(i32* %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %183, label %24
24: ; preds = %21
%25 = call i32 @ENGINE_set_name(i32* %19, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %183, label %27
27: ; preds = %24
%28 = call i32* (...) @ENGINE_new()
%29 = icmp eq i32* %28, null
br i1 %29, label %183, label %30
30: ; preds = %27
%31 = call i32 @ENGINE_set_id(i32* %28, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %183, label %33
33: ; preds = %30
%34 = call i32 @ENGINE_set_name(i32* %28, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %183, label %36
36: ; preds = %33
%37 = call i32* (...) @ENGINE_new()
%38 = icmp eq i32* %37, null
br i1 %38, label %183, label %39
39: ; preds = %36
%40 = call i32 @ENGINE_set_id(i32* %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%41 = icmp eq i32 %40, 0
br i1 %41, label %183, label %42
42: ; preds = %39
%43 = call i32 @ENGINE_set_name(i32* %37, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%44 = icmp eq i32 %43, 0
br i1 %44, label %183, label %45
45: ; preds = %42
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%47 = call i32 (...) @display_engine_list()
%48 = call i64 @ENGINE_add(i32* %10)
%49 = icmp eq i64 %48, 0
br i1 %49, label %183, label %50
50: ; preds = %45
%51 = call i32 (...) @display_engine_list()
%52 = call i32* (...) @ENGINE_get_first()
%53 = call i64 @ENGINE_remove(i32* %52)
%54 = icmp eq i64 %53, 0
br i1 %54, label %183, label %55
55: ; preds = %50
%56 = icmp eq i32* %52, null
br i1 %56, label %59, label %57
57: ; preds = %55
%58 = call i32 @ENGINE_free(i32* %52)
br label %59
59: ; preds = %57, %55
%60 = call i32 (...) @display_engine_list()
%61 = call i64 @ENGINE_add(i32* %28)
%62 = icmp eq i64 %61, 0
br i1 %62, label %183, label %63
63: ; preds = %59
%64 = call i64 @ENGINE_add(i32* %19)
%65 = icmp eq i64 %64, 0
br i1 %65, label %183, label %66
66: ; preds = %63
%67 = call i32 (...) @display_engine_list()
%68 = call i64 @ENGINE_remove(i32* %19)
%69 = icmp eq i64 %68, 0
br i1 %69, label %183, label %70
70: ; preds = %66
%71 = call i32 (...) @display_engine_list()
%72 = call i64 @ENGINE_add(i32* %37)
%73 = icmp eq i64 %72, 0
br i1 %73, label %183, label %74
74: ; preds = %70
%75 = call i32 (...) @display_engine_list()
%76 = call i64 @ENGINE_add(i32* %28)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %183
78: ; preds = %74
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.34, i64 0, i64 0))
%80 = call i32 (...) @ERR_clear_error()
%81 = call i64 @ENGINE_remove(i32* %19)
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %183
83: ; preds = %78
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.35, i64 0, i64 0))
%85 = call i32 (...) @ERR_clear_error()
%86 = call i64 @ENGINE_remove(i32* %28)
%87 = icmp eq i64 %86, 0
br i1 %87, label %183, label %88
88: ; preds = %83
%89 = call i32 (...) @display_engine_list()
%90 = call i64 @ENGINE_remove(i32* %37)
%91 = icmp eq i64 %90, 0
br i1 %91, label %183, label %92
92: ; preds = %88
%93 = call i32 (...) @display_engine_list()
%94 = call i32* (...) @ENGINE_get_first()
%95 = icmp eq i32* %94, null
br i1 %95, label %103, label %96
96: ; preds = %92
%97 = call i64 @ENGINE_remove(i32* %94)
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.45, i64 0, i64 0))
br label %101
101: ; preds = %99, %96
%102 = call i32 @ENGINE_free(i32* %94)
br label %103
103: ; preds = %92, %101
%104 = call i32 (...) @display_engine_list()
%105 = call i64 @ENGINE_add(i32* %10)
%106 = icmp eq i64 %105, 0
br i1 %106, label %183, label %107
107: ; preds = %103
%108 = call i64 @ENGINE_remove(i32* %10)
%109 = icmp eq i64 %108, 0
br i1 %109, label %183, label %110
110: ; preds = %107
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.39, i64 0, i64 0))
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.40, i64 0, i64 0))
br label %116
113: ; preds = %129
%114 = add nuw nsw i64 %117, 1
%115 = icmp eq i64 %114, 512
br i1 %115, label %133, label %116
116: ; preds = %110, %113
%117 = phi i64 [ 0, %110 ], [ %114, %113 ]
%118 = trunc i64 %117 to i32
%119 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 %118)
%120 = call i8* @BUF_strdup(i8* %6)
%121 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 %118)
%122 = call i8* @BUF_strdup(i8* %6)
%123 = call i32* (...) @ENGINE_new()
%124 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 %117
store i32* %123, i32** %124
%125 = icmp eq i32* %123, null
br i1 %125, label %183, label %126
126: ; preds = %116
%127 = call i32 @ENGINE_set_id(i32* %123, i8* %120)
%128 = icmp eq i32 %127, 0
br i1 %128, label %183, label %129
129: ; preds = %126
%130 = load i32*, i32** %124
%131 = call i32 @ENGINE_set_name(i32* %130, i8* %122)
%132 = icmp eq i32 %131, 0
br i1 %132, label %183, label %113
133: ; preds = %113, %148
%134 = phi i64 [ %152, %148 ], [ 0, %113 ]
%135 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 %134
%136 = load i32*, i32** %135
%137 = call i64 @ENGINE_add(i32* %136)
%138 = icmp eq i64 %137, 0
br i1 %138, label %139, label %148
139: ; preds = %133
%140 = trunc i64 %134 to i32
%141 = and i64 %134, 4294967295
%142 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 %141
%143 = load i32*, i32** %142
%144 = call i8* @ENGINE_get_id(i32* %143)
%145 = load i32*, i32** %142
%146 = call i8* @ENGINE_get_name(i32* %145)
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.23, i64 0, i64 0), i32 %140, i8* %144, i8* %146)
br label %154
148: ; preds = %133
%149 = call i32 @putchar(i32 46)
%150 = load i32, i32* @stdout
%151 = call i32 @fflush(i32 %150)
%152 = add nuw nsw i64 %134, 1
%153 = icmp eq i64 %152, 512
br i1 %153, label %154, label %133
154: ; preds = %148, %139
%155 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.41, i64 0, i64 0))
%156 = call i32* (...) @ENGINE_get_first()
%157 = icmp eq i32* %156, null
br i1 %157, label %169, label %158
158: ; preds = %154, %162
%159 = phi i32* [ %167, %162 ], [ %156, %154 ]
%160 = call i64 @ENGINE_remove(i32* %159)
%161 = icmp eq i64 %160, 0
br i1 %161, label %183, label %162
162: ; preds = %158
%163 = call i32 @ENGINE_free(i32* %159)
%164 = call i32 @putchar(i32 46)
%165 = load i32, i32* @stdout
%166 = call i32 @fflush(i32 %165)
%167 = call i32* (...) @ENGINE_get_first()
%168 = icmp eq i32* %167, null
br i1 %168, label %169, label %158
169: ; preds = %162, %154
br label %170
170: ; preds = %169, %170
%171 = phi i64 [ %179, %170 ], [ 0, %169 ]
%172 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 %171
%173 = load i32*, i32** %172
%174 = call i8* @ENGINE_get_id(i32* %173)
%175 = call i32 @free(i8* %174)
%176 = load i32*, i32** %172
%177 = call i8* @ENGINE_get_name(i32* %176)
%178 = call i32 @free(i8* %177)
%179 = add nuw nsw i64 %171, 1
%180 = icmp eq i64 %179, 512
br i1 %180, label %181, label %170
181: ; preds = %170
%182 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.42, i64 0, i64 0))
br label %191
183: ; preds = %116, %126, %129, %158, %103, %107, %88, %83, %78, %74, %70, %66, %59, %63, %50, %45, %2, %12, %15, %18, %21, %24, %27, %30, %33, %36, %39, %42
%184 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %42 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %39 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %36 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %33 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %30 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %27 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %24 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %21 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %18 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %15 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %12 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %2 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.33, i64 0, i64 0), %45 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0), %50 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.33, i64 0, i64 0), %63 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.33, i64 0, i64 0), %59 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0), %66 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.33, i64 0, i64 0), %70 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.47, i64 0, i64 0), %74 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @str.46, i64 0, i64 0), %78 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0), %83 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0), %88 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @str.38, i64 0, i64 0), %107 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @str.38, i64 0, i64 0), %103 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.43, i64 0, i64 0), %158 ], [ getelementptr inbounds ([84 x i8], [84 x i8]* @str.44, i64 0, i64 0), %129 ], [ getelementptr inbounds ([84 x i8], [84 x i8]* @str.44, i64 0, i64 0), %126 ], [ getelementptr inbounds ([84 x i8], [84 x i8]* @str.44, i64 0, i64 0), %116 ]
%185 = phi i32* [ %19, %42 ], [ %19, %39 ], [ %19, %36 ], [ %19, %33 ], [ %19, %30 ], [ %19, %27 ], [ %19, %24 ], [ %19, %21 ], [ null, %18 ], [ null, %15 ], [ null, %12 ], [ null, %2 ], [ %19, %45 ], [ %19, %50 ], [ %19, %63 ], [ %19, %59 ], [ %19, %66 ], [ %19, %70 ], [ %19, %74 ], [ %19, %78 ], [ %19, %83 ], [ %19, %88 ], [ %19, %107 ], [ %19, %103 ], [ %19, %158 ], [ %19, %129 ], [ %19, %126 ], [ %19, %116 ]
%186 = phi i32* [ %28, %42 ], [ %28, %39 ], [ %28, %36 ], [ %28, %33 ], [ %28, %30 ], [ null, %27 ], [ null, %24 ], [ null, %21 ], [ null, %18 ], [ null, %15 ], [ null, %12 ], [ null, %2 ], [ %28, %45 ], [ %28, %50 ], [ %28, %63 ], [ %28, %59 ], [ %28, %66 ], [ %28, %70 ], [ %28, %74 ], [ %28, %78 ], [ %28, %83 ], [ %28, %88 ], [ %28, %107 ], [ %28, %103 ], [ %28, %158 ], [ %28, %129 ], [ %28, %126 ], [ %28, %116 ]
%187 = phi i32* [ %37, %42 ], [ %37, %39 ], [ null, %36 ], [ null, %33 ], [ null, %30 ], [ null, %27 ], [ null, %24 ], [ null, %21 ], [ null, %18 ], [ null, %15 ], [ null, %12 ], [ null, %2 ], [ %37, %45 ], [ %37, %50 ], [ %37, %63 ], [ %37, %59 ], [ %37, %66 ], [ %37, %70 ], [ %37, %74 ], [ %37, %78 ], [ %37, %83 ], [ %37, %88 ], [ %37, %107 ], [ %37, %103 ], [ %37, %158 ], [ %37, %129 ], [ %37, %126 ], [ %37, %116 ]
%188 = call i32 @puts(i8* dereferenceable(1) %184)
%189 = load i32, i32* @stderr
%190 = call i32 @ERR_print_errors_fp(i32 %189)
br label %191
191: ; preds = %181, %183
%192 = phi i32* [ %187, %183 ], [ %37, %181 ]
%193 = phi i32* [ %186, %183 ], [ %28, %181 ]
%194 = phi i32* [ %185, %183 ], [ %19, %181 ]
%195 = phi i32 [ 1, %183 ], [ 0, %181 ]
br i1 %11, label %198, label %196
196: ; preds = %191
%197 = call i32 @ENGINE_free(i32* %10)
br label %198
198: ; preds = %196, %191
%199 = icmp eq i32* %194, null
br i1 %199, label %202, label %200
200: ; preds = %198
%201 = call i32 @ENGINE_free(i32* %194)
br label %202
202: ; preds = %200, %198
%203 = icmp eq i32* %193, null
br i1 %203, label %206, label %204
204: ; preds = %202
%205 = call i32 @ENGINE_free(i32* %193)
br label %206
206: ; preds = %204, %202
%207 = icmp eq i32* %192, null
br i1 %207, label %210, label %208
208: ; preds = %206
%209 = call i32 @ENGINE_free(i32* %192)
br label %210
210: ; preds = %208, %206
br label %211
211: ; preds = %210, %218
%212 = phi i64 [ %219, %218 ], [ 0, %210 ]
%213 = getelementptr inbounds [512 x i32*], [512 x i32*]* %3, i64 0, i64 %212
%214 = load i32*, i32** %213
%215 = icmp eq i32* %214, null
br i1 %215, label %218, label %216
216: ; preds = %211
%217 = call i32 @ENGINE_free(i32* %214)
br label %218
218: ; preds = %211, %216
%219 = add nuw nsw i64 %212, 1
%220 = icmp eq i64 %219, 512
br i1 %220, label %221, label %211
221: ; preds = %218
%222 = call i32 (...) @ENGINE_cleanup()
%223 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%224 = call i32 (...) @ERR_free_strings()
%225 = call i32 @ERR_remove_thread_state(i32* null)
%226 = load i32, i32* @stderr
%227 = call i32 @CRYPTO_mem_leaks_fp(i32 %226)
ret i32 %195
}