#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*/ q;
typedef int /*<<< orphan*/ p;
typedef int /*<<< orphan*/ n;
typedef int /*<<< orphan*/ iqmp;
typedef int /*<<< orphan*/ ex_prime;
typedef int /*<<< orphan*/ ex_exponent;
typedef int /*<<< orphan*/ ex_coefficient;
typedef int /*<<< orphan*/ e;
typedef int /*<<< orphan*/ dmq1;
typedef int /*<<< orphan*/ dmp1;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_bin2bn(unsigned char const *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ OPENSSL_free(int /*<<< orphan*/ **);
int /*<<< orphan*/ **OPENSSL_zalloc(int);
int /*<<< orphan*/ RSA_set0_crt_params(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ RSA_set0_factors(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *);
int /*<<< orphan*/ RSA_set0_key(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *, int /*<<< orphan*/ *);
scalar_t__ RSA_set0_multi_prime_params(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ **,
                                       int /*<<< orphan*/ **,
                                       int /*<<< orphan*/ **, int);
int /*<<< orphan*/ test_int_eq(char *, int, char *, char *, int /*<<< orphan*/,
                               int);
int /*<<< orphan*/ test_ptr(char *, int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ test_true(char *, int, char *, int);
int key2048p3(RSA *key) {
  static const unsigned char n[] =
      "\x92\x60\xd0\x75\x0a\xe1\x17\xee\xe5\x5c\x3f\x3d\xea\xba\x74\x91"
      "\x75\x21\xa2\x62\xee\x76\x00\x7c\xdf\x8a\x56\x75\x5a\xd7\x3a\x15"
      "\x98\xa1\x40\x84\x10\xa0\x14\x34\xc3\xf5\xbc\x54\xa8\x8b\x57\xfa"
      "\x19\xfc\x43\x28\xda\xea\x07\x50\xa4\xc4\x4e\x88\xcf\xf3\xb2\x38"
      "\x26\x21\xb8\x0f\x67\x04\x64\x43\x3e\x43\x36\xe6\xd0\x03\xe8\xcd"
      "\x65\xbf\xf2\x11\xda\x14\x4b\x88\x29\x1c\x22\x59\xa0\x0a\x72\xb7"
      "\x11\xc1\x16\xef\x76\x86\xe8\xfe\xe3\x4e\x4d\x93\x3c\x86\x81\x87"
      "\xbd\xc2\x6f\x7b\xe0\x71\x49\x3c\x86\xf7\xa5\x94\x1c\x35\x10\x80"
      "\x6a\xd6\x7b\x0f\x94\xd8\x8f\x5c\xf5\xc0\x2a\x09\x28\x21\xd8\x62"
      "\x6e\x89\x32\xb6\x5c\x5b\xd8\xc9\x20\x49\xc2\x10\x93\x2b\x7a\xfa"
      "\x7a\xc5\x9c\x0e\x88\x6a\xe5\xc1\xed\xb0\x0d\x8c\xe2\xc5\x76\x33"
      "\xdb\x26\xbd\x66\x39\xbf\xf7\x3c\xee\x82\xbe\x92\x75\xc4\x02\xb4"
      "\xcf\x2a\x43\x88\xda\x8c\xf8\xc6\x4e\xef\xe1\xc5\xa0\xf5\xab\x80"
      "\x57\xc3\x9f\xa5\xc0\x58\x9c\x3e\x25\x3f\x09\x60\x33\x23\x00\xf9"
      "\x4b\xea\x44\x87\x7b\x58\x8e\x1e\xdb\xde\x97\xcf\x23\x60\x72\x7a"
      "\x09\xb7\x75\x26\x2d\x7e\xe5\x52\xb3\x31\x9b\x92\x66\xf0\x5a\x25";
  static const unsigned char e[] = "\x01\x00\x01";
  static const unsigned char d[] =
      "\x6a\x7d\xf2\xca\x63\xea\xd4\xdd\xa1\x91\xd6\x14\xb6\xb3\x85\xe0"
      "\xd9\x05\x6a\x3d\x6d\x5c\xfe\x07\xdb\x1d\xaa\xbe\xe0\x22\xdb\x08"
      "\x21\x2d\x97\x61\x3d\x33\x28\xe0\x26\x7c\x9d\xd2\x3d\x78\x7a\xbd"
      "\xe2\xaf\xcb\x30\x6a\xeb\x7d\xfc\xe6\x92\x46\xcc\x73\xf5\xc8\x7f"
      "\xdf\x06\x03\x01\x79\xa2\x11\x4b\x76\x7d\xb1\xf0\x83\xff\x84\x1c"
      "\x02\x5d\x7d\xc0\x0c\xd8\x24\x35\xb9\xa9\x0f\x69\x53\x69\xe9\x4d"
      "\xf2\x3d\x2c\xe4\x58\xbc\x3b\x32\x83\xad\x8b\xba\x2b\x8f\xa1\xba"
      "\x62\xe2\xdc\xe9\xac\xcf\xf3\x79\x9a\xae\x7c\x84\x00\x16\xf3\xba"
      "\x8e\x00\x48\xc0\xb6\xcc\x43\x39\xaf\x71\x61\x00\x3a\x5b\xeb\x86"
      "\x4a\x01\x64\xb2\xc1\xc9\x23\x7b\x64\xbc\x87\x55\x69\x94\x35\x1b"
      "\x27\x50\x6c\x33\xd4\xbc\xdf\xce\x0f\x9c\x49\x1a\x7d\x6b\x06\x28"
      "\xc7\xc8\x52\xbe\x4f\x0a\x9c\x31\x32\xb2\xed\x3a\x2c\x88\x81\xe9"
      "\xaa\xb0\x7e\x20\xe1\x7d\xeb\x07\x46\x91\xbe\x67\x77\x76\xa7\x8b"
      "\x5c\x50\x2e\x05\xd9\xbd\xde\x72\x12\x6b\x37\x38\x69\x5e\x2d\xd1"
      "\xa0\xa9\x8a\x14\x24\x7c\x65\xd8\xa7\xee\x79\x43\x2a\x09\x2c\xb0"
      "\x72\x1a\x12\xdf\x79\x8e\x44\xf7\xcf\xce\x0c\x49\x81\x47\xa9\xb1";
  static const unsigned char p[] =
      "\x06\x77\xcd\xd5\x46\x9b\xc1\xd5\x58\x00\x81\xe2\xf3\x0a\x36\xb1"
      "\x6e\x29\x89\xd5\x2f\x31\x5f\x92\x22\x3b\x9b\x75\x30\x82\xfa\xc5"
      "\xf5\xde\x8a\x36\xdb\xc6\xe5\x8f\xef\x14\x37\xd6\x00\xf9\xab\x90"
      "\x9b\x5d\x57\x4c\xf5\x1f\x77\xc4\xbb\x8b\xdd\x9b\x67\x11\x45\xb2"
      "\x64\xe8\xac\xa8\x03\x0f\x16\x0d\x5d\x2d\x53\x07\x23\xfb\x62\x0d"
      "\xe6\x16\xd3\x23\xe8\xb3";
  static const unsigned char q[] =
      "\x06\x66\x9a\x70\x53\xd6\x72\x74\xfd\xea\x45\xc3\xc0\x17\xae\xde"
      "\x79\x17\xae\x79\xde\xfc\x0e\xf7\xa4\x3a\x8c\x43\x8f\xc7\x8a\xa2"
      "\x2c\x51\xc4\xd0\x72\x89\x73\x5c\x61\xbe\xfd\x54\x3f\x92\x65\xde"
      "\x4d\x65\x71\x70\xf6\xf2\xe5\x98\xb9\x0f\xd1\x0b\xe6\x95\x09\x4a"
      "\x7a\xdf\xf3\x10\x16\xd0\x60\xfc\xa5\x10\x34\x97\x37\x6f\x0a\xd5"
      "\x5d\x8f\xd4\xc3\xa0\x5b";
  static const unsigned char dmp1[] =
      "\x05\x7c\x9e\x1c\xbd\x90\x25\xe7\x40\x86\xf5\xa8\x3b\x7a\x3f\x99"
      "\x56\x95\x60\x3a\x7b\x95\x4b\xb8\xa0\xd7\xa5\xf1\xcc\xdc\x5f\xb5"
      "\x8c\xf4\x62\x95\x54\xed\x2e\x12\x62\xc2\xe8\xf6\xde\xce\xed\x8e"
      "\x77\x6d\xc0\x40\x25\x74\xb3\x5a\x2d\xaa\xe1\xac\x11\xcb\xe2\x2f"
      "\x0a\x51\x23\x1e\x47\xb2\x05\x88\x02\xb2\x0f\x4b\xf0\x67\x30\xf0"
      "\x0f\x6e\xef\x5f\xf7\xe7";
  static const unsigned char dmq1[] =
      "\x01\xa5\x6b\xbc\xcd\xe3\x0e\x46\xc6\x72\xf5\x04\x56\x28\x01\x22"
      "\x58\x74\x5d\xbc\x1c\x3c\x29\x41\x49\x6c\x81\x5c\x72\xe2\xf7\xe5"
      "\xa3\x8e\x58\x16\xe0\x0e\x37\xac\x1f\xbb\x75\xfd\xaf\xe7\xdf\xe9"
      "\x1f\x70\xa2\x8f\x52\x03\xc0\x46\xd9\xf9\x96\x63\x00\x27\x7e\x5f"
      "\x38\x60\xd6\x6b\x61\xe2\xaf\xbe\xea\x58\xd3\x9d\xbc\x75\x03\x8d"
      "\x42\x65\xd6\x6b\x85\x97";
  static const unsigned char iqmp[] =
      "\x03\xa1\x8b\x80\xe4\xd8\x87\x25\x17\x5d\xcc\x8d\xa9\x8a\x22\x2b"
      "\x6c\x15\x34\x6f\x80\xcc\x1c\x44\x04\x68\xbc\x03\xcd\x95\xbb\x69"
      "\x37\x61\x48\xb4\x23\x13\x08\x16\x54\x6a\xa1\x7c\xf5\xd4\x3a\xe1"
      "\x4f\xa4\x0c\xf5\xaf\x80\x85\x27\x06\x0d\x70\xc0\xc5\x19\x28\xfe"
      "\xee\x8e\x86\x21\x98\x8a\x37\xb7\xe5\x30\x25\x70\x93\x51\x2d\x49"
      "\x85\x56\xb3\x0c\x2b\x96";
  static const unsigned char ex_prime[] =
      "\x03\x89\x22\xa0\xb7\x3a\x91\xcb\x5e\x0c\xfd\x73\xde\xa7\x38\xa9"
      "\x47\x43\xd6\x02\xbf\x2a\xb9\x3c\x48\xf3\x06\xd6\x58\x35\x50\x56"
      "\x16\x5c\x34\x9b\x61\x87\xc8\xaa\x0a\x5d\x8a\x0a\xcd\x9c\x41\xd9"
      "\x96\x24\xe0\xa9\x9b\x26\xb7\xa8\x08\xc9\xea\xdc\xa7\x15\xfb\x62"
      "\xa0\x2d\x90\xe6\xa7\x55\x6e\xc6\x6c\xff\xd6\x10\x6d\xfa\x2e\x04"
      "\x50\xec\x5c\x66\xe4\x05";
  static const unsigned char ex_exponent[] =
      "\x02\x0a\xcd\xc3\x82\xd2\x03\xb0\x31\xac\xd3\x20\x80\x34\x9a\x57"
      "\xbc\x60\x04\x57\x25\xd0\x29\x9a\x16\x90\xb9\x1c\x49\x6a\xd1\xf2"
      "\x47\x8c\x0e\x9e\xc9\x20\xc2\xd8\xe4\x8f\xce\xd2\x1a\x9c\xec\xb4"
      "\x1f\x33\x41\xc8\xf5\x62\xd1\xa5\xef\x1d\xa1\xd8\xbd\x71\xc6\xf7"
      "\xda\x89\x37\x2e\xe2\xec\x47\xc5\xb8\xe3\xb4\xe3\x5c\x82\xaa\xdd"
      "\xb7\x58\x2e\xaf\x07\x79";
  static const unsigned char ex_coefficient[] =
      "\x00\x9c\x09\x88\x9b\xc8\x57\x08\x69\x69\xab\x2d\x9e\x29\x1c\x3c"
      "\x6d\x59\x33\x12\x0d\x2b\x09\x2e\xaf\x01\x2c\x27\x01\xfc\xbd\x26"
      "\x13\xf9\x2d\x09\x22\x4e\x49\x11\x03\x82\x88\x87\xf4\x43\x1d\xac"
      "\xca\xec\x86\xf7\x23\xf1\x64\xf3\xf5\x81\xf0\x37\x36\xcf\x67\xff"
      "\x1a\xff\x7a\xc7\xf9\xf9\x67\x2d\xa0\x9d\x61\xf8\xf6\x47\x5c\x2f"
      "\xe7\x66\xe8\x3c\x3a\xe8";
  BIGNUM **pris = NULL, **exps = NULL, **coeffs = NULL;
  int rv = 256;
  if (!test_int_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          136,
          "RSA_set0_key(key, BN_bin2bn(n, sizeof(n) - 1, NULL), BN_bin2bn(e, "
          "sizeof(e) - 1, NULL), BN_bin2bn(d, sizeof(d) - 1, NULL))",
          "1",
          RSA_set0_key(key, BN_bin2bn(n, sizeof(n) - 1, NULL),
                       BN_bin2bn(e, sizeof(e) - 1, NULL),
                       BN_bin2bn(d, sizeof(d) - 1, NULL)),
          1))
    goto err;
  if (!test_int_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          142,
          "RSA_set0_factors(key, BN_bin2bn(p, sizeof(p) - 1, NULL), "
          "BN_bin2bn(q, sizeof(q) - 1, NULL))",
          "1",
          RSA_set0_factors(key, BN_bin2bn(p, sizeof(p) - 1, NULL),
                           BN_bin2bn(q, sizeof(q) - 1, NULL)),
          1))
    goto err;
  if (!test_int_eq(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          147,
          "RSA_set0_crt_params(key, BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL), "
          "BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL), BN_bin2bn(iqmp, "
          "sizeof(iqmp) - 1, NULL))",
          "1",
          RSA_set0_crt_params(key, BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL),
                              BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL),
                              BN_bin2bn(iqmp, sizeof(iqmp) - 1, NULL)),
          1))
    return 0;
  pris = OPENSSL_zalloc(sizeof(BIGNUM *));
  exps = OPENSSL_zalloc(sizeof(BIGNUM *));
  coeffs = OPENSSL_zalloc(sizeof(BIGNUM *));
  if (!test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          157, "pris", pris) ||
      !test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          157, "exps", exps) ||
      !test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          157, "coeffs", coeffs))
    goto err;
  pris[0] = BN_bin2bn(ex_prime, sizeof(ex_prime) - 1, NULL);
  exps[0] = BN_bin2bn(ex_exponent, sizeof(ex_exponent) - 1, NULL);
  coeffs[0] = BN_bin2bn(ex_coefficient, sizeof(ex_coefficient) - 1, NULL);
  if (!test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          163, "pris[0]", pris[0]) ||
      !test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          163, "exps[0]", exps[0]) ||
      !test_ptr(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          163, "coeffs[0]", coeffs[0]))
    goto err;
  if (!test_true(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/"
          "humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c",
          166,
          "RSA_set0_multi_prime_params(key, pris, exps, coeffs, "
          "NUM_EXTRA_PRIMES)",
          (RSA_set0_multi_prime_params(key, pris, exps, coeffs, 1)) != 0))
    goto err;
ret:
  OPENSSL_free(pris);
  OPENSSL_free(exps);
  OPENSSL_free(coeffs);
  return rv;
err:
  if (pris != NULL)
    BN_free(pris[0]);
  if (exps != NULL)
    BN_free(exps[0]);
  if (coeffs != NULL)
    BN_free(coeffs[0]);
  rv = 0;
  goto ret;
}


x86 assembly (clang, -O0):
<key2048p3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x100,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    0xe16(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,-0x40(%rbp)
lea    0xefe(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,-0x38(%rbp)
lea    0xef4(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    %rax,%rcx
call   10d0 <RSA_set0_key@plt>
mov    %eax,%r8d
lea    0x12cf(%rip),%rdi
mov    $0x88,%esi
lea    0x1388(%rip),%rdx
lea    0x13fc(%rip),%rcx
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
cmp    $0x0,%eax
jne    1274 <key2048p3+0xc4>
jmp    1580 <key2048p3+0x3d0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xf9d(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,-0x50(%rbp)
lea    0xfe4(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    %rax,%rdx
call   10b0 <RSA_set0_factors@plt>
mov    %eax,%r8d
lea    0x1253(%rip),%rdi
mov    $0x8e,%esi
lea    0x1389(%rip),%rdx
lea    0x1380(%rip),%rcx
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
cmp    $0x0,%eax
jne    12f0 <key2048p3+0x140>
jmp    1580 <key2048p3+0x3d0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
lea    0xfe1(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,-0x68(%rbp)
lea    0x1028(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,-0x60(%rbp)
lea    0x106f(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    -0x70(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    %rax,%rcx
call   1040 <RSA_set0_crt_params@plt>
mov    %eax,%r8d
lea    0x11ba(%rip),%rdi
mov    $0x93,%esi
lea    0x134c(%rip),%rdx
lea    0x12e7(%rip),%rcx
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
cmp    $0x0,%eax
jne    1390 <key2048p3+0x1e0>
movl   $0x0,-0x4(%rbp)
jmp    15d1 <key2048p3+0x421>
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rcx
lea    0x1152(%rip),%rdi
mov    $0x9d,%esi
lea    0x1378(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
je     1429 <key2048p3+0x279>
mov    -0x20(%rbp),%rcx
lea    0x112d(%rip),%rdi
mov    $0x9d,%esi
lea    0x1358(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
je     1429 <key2048p3+0x279>
mov    -0x28(%rbp),%rcx
lea    0x1108(%rip),%rdi
mov    $0x9d,%esi
lea    0x1338(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
jne    142e <key2048p3+0x27e>
jmp    1580 <key2048p3+0x3d0>
lea    0xfcb(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
lea    0x100c(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
lea    0x104d(%rip),%rdi
mov    $0x56,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
lea    0x107e(%rip),%rdi
mov    $0xa3,%esi
lea    0x12b5(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
je     1503 <key2048p3+0x353>
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
lea    0x1056(%rip),%rdi
mov    $0xa3,%esi
lea    0x1295(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
je     1503 <key2048p3+0x353>
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
lea    0x102e(%rip),%rdi
mov    $0xa3,%esi
lea    0x1275(%rip),%rdx
call   1060 <test_ptr@plt>
cmp    $0x0,%eax
jne    1508 <key2048p3+0x358>
jmp    1580 <key2048p3+0x3d0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1,%r8d
call   10a0 <RSA_set0_multi_prime_params@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xfe1(%rip),%rdi
mov    $0xa6,%esi
lea    0x1232(%rip),%rdx
call   1030 <test_true@plt>
cmp    $0x0,%eax
jne    1555 <key2048p3+0x3a5>
jmp    1580 <key2048p3+0x3d0>
jmp    155a <key2048p3+0x3aa>
mov    -0x18(%rbp),%rdi
call   10c0 <OPENSSL_free@plt>
mov    -0x20(%rbp),%rdi
call   10c0 <OPENSSL_free@plt>
mov    -0x28(%rbp),%rdi
call   10c0 <OPENSSL_free@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15d1 <key2048p3+0x421>
cmpq   $0x0,-0x18(%rbp)
je     1597 <key2048p3+0x3e7>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1090 <BN_free@plt>
cmpq   $0x0,-0x20(%rbp)
je     15ae <key2048p3+0x3fe>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1090 <BN_free@plt>
cmpq   $0x0,-0x28(%rbp)
je     15c5 <key2048p3+0x415>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1090 <BN_free@plt>
movl   $0x0,-0x2c(%rbp)
jmp    155a <key2048p3+0x3aa>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key2048p3>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r14
lea    0xe3d(%rip),%rdi
xor    %r15d,%r15d
mov    $0x100,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%r12
lea    0xf25(%rip),%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%rbx
lea    0xf1e(%rip),%rdi
mov    $0x100,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   10d0 <RSA_set0_key@plt>
lea    0x1301(%rip),%rdi
lea    0x13bf(%rip),%rdx
lea    0x1433(%rip),%rcx
mov    $0x88,%esi
mov    %eax,%r8d
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
mov    $0x0,%r12d
mov    $0x0,%r13d
mov    $0x0,%ebx
test   %eax,%eax
je     14f6 <key2048p3+0x346>
lea    0xfc9(%rip),%rdi
xor    %r15d,%r15d
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%rbx
lea    0x1010(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   10b0 <RSA_set0_factors@plt>
lea    0x1286(%rip),%rdi
lea    0x13c1(%rip),%rdx
lea    0x13b8(%rip),%rcx
mov    $0x8e,%esi
mov    %eax,%r8d
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
mov    $0x0,%r12d
mov    $0x0,%r13d
mov    $0x0,%ebx
test   %eax,%eax
je     14f6 <key2048p3+0x346>
lea    0x100e(%rip),%rdi
xor    %ebx,%ebx
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%r15
lea    0x1056(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,%r12
lea    0x10a0(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rax,%rcx
call   1040 <RSA_set0_crt_params@plt>
lea    0x11f3(%rip),%rdi
lea    0x138a(%rip),%rdx
lea    0x1325(%rip),%rcx
mov    $0x93,%esi
mov    %eax,%r8d
mov    $0x1,%r9d
call   1070 <test_int_eq@plt>
test   %eax,%eax
je     150e <key2048p3+0x35e>
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,%r15
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,%r12
mov    $0x8,%edi
call   1080 <OPENSSL_zalloc@plt>
mov    %rax,%r13
lea    0x119c(%rip),%rdi
lea    0x13c7(%rip),%rdx
mov    $0x9d,%esi
mov    %r15,%rcx
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14c6 <key2048p3+0x316>
lea    0x1179(%rip),%rdi
lea    0x13a9(%rip),%rdx
mov    $0x9d,%esi
mov    %r12,%rcx
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14c6 <key2048p3+0x316>
lea    0x1156(%rip),%rdi
lea    0x138b(%rip),%rdx
mov    $0x9d,%esi
mov    %r13,%rcx
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14c6 <key2048p3+0x316>
lea    0x101c(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,(%r15)
lea    0x1066(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,(%r12)
lea    0x10af(%rip),%rdi
mov    $0x56,%esi
xor    %edx,%edx
call   1050 <BN_bin2bn@plt>
mov    %rax,0x0(%r13)
mov    (%r15),%rcx
lea    0x10ec(%rip),%rdi
lea    0x1328(%rip),%rdx
mov    $0xa3,%esi
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14cb <key2048p3+0x31b>
mov    (%r12),%rcx
lea    0x10c8(%rip),%rdi
lea    0x130c(%rip),%rdx
mov    $0xa3,%esi
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14cb <key2048p3+0x31b>
mov    0x0(%r13),%rcx
lea    0x10a8(%rip),%rdi
lea    0x12f4(%rip),%rdx
mov    $0xa3,%esi
call   1060 <test_ptr@plt>
test   %eax,%eax
je     14cb <key2048p3+0x31b>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    $0x1,%r8d
call   10a0 <RSA_set0_multi_prime_params@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    0x106d(%rip),%rdi
lea    0x12c3(%rip),%rdx
mov    $0xa6,%esi
call   1030 <test_true@plt>
mov    $0x100,%ebx
test   %eax,%eax
jne    14f6 <key2048p3+0x346>
jmp    14cb <key2048p3+0x31b>
test   %r15,%r15
je     151a <key2048p3+0x36a>
mov    (%r15),%rdi
call   1090 <BN_free@plt>
test   %r12,%r12
je     14e1 <key2048p3+0x331>
mov    (%r12),%rdi
call   1090 <BN_free@plt>
xor    %ebx,%ebx
test   %r13,%r13
je     14f3 <key2048p3+0x343>
mov    0x0(%r13),%rdi
call   1090 <BN_free@plt>
jmp    14f6 <key2048p3+0x346>
xor    %r13d,%r13d
mov    %r15,%rdi
call   10c0 <OPENSSL_free@plt>
mov    %r12,%rdi
call   10c0 <OPENSSL_free@plt>
mov    %r13,%rdi
call   10c0 <OPENSSL_free@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
xor    %r15d,%r15d
test   %r12,%r12
jne    14d8 <key2048p3+0x328>
jmp    14e1 <key2048p3+0x331>

LLVM IR (-O0):
@key2048p3.n = internal constant [257 x i8] c"\92`\D0u\0A\E1\17\EE\E5\\?=\EA\BAt\91u!\A2b\EEv\00|\DF\8AVuZ\D7:\15\98\A1@\84\10\A0\144\C3\F5\BCT\A8\8BW\FA\19\FCC(\DA\EA\07P\A4\C4N\88\CF\F3\B28&!\B8\0Fg\04dC>C6\E6\D0\03\E8\CDe\BF\F2\11\DA\14K\88)\1C\22Y\A0\0Ar\B7\11\C1\16\EFv\86\E8\FE\E3NM\93<\86\81\87\BD\C2o{\E0qI<\86\F7\A5\94\1C5\10\80j\D6{\0F\94\D8\8F\\\F5\C0*\09(!\D8bn\892\B6\\[\D8\C9 I\C2\10\93+z\FAz\C5\9C\0E\88j\E5\C1\ED\B0\0D\8C\E2\C5v3\DB&\BDf9\BF\F7<\EE\82\BE\92u\C4\02\B4\CF*C\88\DA\8C\F8\C6N\EF\E1\C5\A0\F5\AB\80W\C3\9F\A5\C0X\9C>%?\09`3#\00\F9K\EAD\87{X\8E\1E\DB\DE\97\CF#`rz\09\B7u&-~\E5R\B31\9B\92f\F0Z%\00"
@key2048p3.e = internal constant [4 x i8] c"\01\00\01\00"
@key2048p3.d = internal constant [257 x i8] c"j}\F2\CAc\EA\D4\DD\A1\91\D6\14\B6\B3\85\E0\D9\05j=m\\\FE\07\DB\1D\AA\BE\E0\22\DB\08!-\97a=3(\E0&|\9D\D2=xz\BD\E2\AF\CB0j\EB}\FC\E6\92F\CCs\F5\C8\7F\DF\06\03\01y\A2\11Kv}\B1\F0\83\FF\84\1C\02]}\C0\0C\D8$5\B9\A9\0FiSi\E9M\F2=,\E4X\BC;2\83\AD\8B\BA+\8F\A1\BAb\E2\DC\E9\AC\CF\F3y\9A\AE|\84\00\16\F3\BA\8E\00H\C0\B6\CCC9\AFqa\00:[\EB\86J\01d\B2\C1\C9#{d\BC\87Ui\945\1B'Pl3\D4\BC\DF\CE\0F\9CI\1A}k\06(\C7\C8R\BEO\0A\9C12\B2\ED:,\88\81\E9\AA\B0~ \E1}\EB\07F\91\BEgwv\A7\8B\\P.\05\D9\BD\DEr\12k78i^-\D1\A0\A9\8A\14$|e\D8\A7\EEyC*\09,\B0r\1A\12\DFy\8ED\F7\CF\CE\0CI\81G\A9\B1\00"
@key2048p3.p = internal constant [87 x i8] c"\06w\CD\D5F\9B\C1\D5X\00\81\E2\F3\0A6\B1n)\89\D5/1_\92\22;\9Bu0\82\FA\C5\F5\DE\8A6\DB\C6\E5\8F\EF\147\D6\00\F9\AB\90\9B]WL\F5\1Fw\C4\BB\8B\DD\9Bg\11E\B2d\E8\AC\A8\03\0F\16\0D]-S\07#\FBb\0D\E6\16\D3#\E8\B3\00"
@key2048p3.q = internal constant [87 x i8] c"\06f\9ApS\D6rt\FD\EAE\C3\C0\17\AE\DEy\17\AEy\DE\FC\0E\F7\A4:\8CC\8F\C7\8A\A2,Q\C4\D0r\89s\\a\BE\FDT?\92e\DEMeqp\F6\F2\E5\98\B9\0F\D1\0B\E6\95\09Jz\DF\F3\10\16\D0`\FC\A5\104\977o\0A\D5]\8F\D4\C3\A0[\00"
@key2048p3.dmp1 = internal constant [87 x i8] c"\05|\9E\1C\BD\90%\E7@\86\F5\A8;z?\99V\95`:{\95K\B8\A0\D7\A5\F1\CC\DC_\B5\8C\F4b\95T\ED.\12b\C2\E8\F6\DE\CE\ED\8Ewm\C0@%t\B3Z-\AA\E1\AC\11\CB\E2/\0AQ#\1EG\B2\05\88\02\B2\0FK\F0g0\F0\0Fn\EF_\F7\E7\00"
@key2048p3.dmq1 = internal constant [87 x i8] c"\01\A5k\BC\CD\E3\0EF\C6r\F5\04V(\01\22Xt]\BC\1C<)AIl\81\\r\E2\F7\E5\A3\8EX\16\E0\0E7\AC\1F\BBu\FD\AF\E7\DF\E9\1Fp\A2\8FR\03\C0F\D9\F9\96c\00'~_8`\D6ka\E2\AF\BE\EAX\D3\9D\BCu\03\8DBe\D6k\85\97\00"
@key2048p3.iqmp = internal constant [87 x i8] c"\03\A1\8B\80\E4\D8\87%\17]\CC\8D\A9\8A\22+l\154o\80\CC\1CD\04h\BC\03\CD\95\BBi7aH\B4#\13\08\16Tj\A1|\F5\D4:\E1O\A4\0C\F5\AF\80\85'\06\0Dp\C0\C5\19(\FE\EE\8E\86!\98\8A7\B7\E50%p\93Q-I\85V\B3\0C+\96\00"
@key2048p3.ex_prime = internal constant [87 x i8] c"\03\89\22\A0\B7:\91\CB^\0C\FDs\DE\A78\A9GC\D6\02\BF*\B9<H\F3\06\D6X5PV\16\\4\9Ba\87\C8\AA\0A]\8A\0A\CD\9CA\D9\96$\E0\A9\9B&\B7\A8\08\C9\EA\DC\A7\15\FBb\A0-\90\E6\A7Un\C6l\FF\D6\10m\FA.\04P\EC\\f\E4\05\00"
@key2048p3.ex_exponent = internal constant [87 x i8] c"\02\0A\CD\C3\82\D2\03\B01\AC\D3 \804\9AW\BC`\04W%\D0)\9A\16\90\B9\1CIj\D1\F2G\8C\0E\9E\C9 \C2\D8\E4\8F\CE\D2\1A\9C\EC\B4\1F3A\C8\F5b\D1\A5\EF\1D\A1\D8\BDq\C6\F7\DA\897.\E2\ECG\C5\B8\E3\B4\E3\\\82\AA\DD\B7X.\AF\07y\00"
@key2048p3.ex_coefficient = internal constant [87 x i8] c"\00\9C\09\88\9B\C8W\08ii\AB-\9E)\1C<mY3\12\0D+\09.\AF\01,'\01\FC\BD&\13\F9-\09\22NI\11\03\82\88\87\F4C\1D\AC\CA\EC\86\F7#\F1d\F3\F5\81\F076\CFg\FF\1A\FFz\C7\F9\F9g-\A0\9Da\F8\F6G\\/\E7f\E8<:\E8\00"
@.str = [197 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c\00"
@.str.1 = [123 x i8] c"RSA_set0_key(key, BN_bin2bn(n, sizeof(n) - 1, NULL), BN_bin2bn(e, sizeof(e) - 1, NULL), BN_bin2bn(d, sizeof(d) - 1, NULL))\00"
@.str.2 = [2 x i8] c"1\00"
@.str.3 = [92 x i8] c"RSA_set0_factors(key, BN_bin2bn(p, sizeof(p) - 1, NULL), BN_bin2bn(q, sizeof(q) - 1, NULL))\00"
@.str.4 = [148 x i8] c"RSA_set0_crt_params(key, BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL), BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL), BN_bin2bn(iqmp, sizeof(iqmp) - 1, NULL))\00"
@.str.5 = [5 x i8] c"pris\00"
@.str.6 = [5 x i8] c"exps\00"
@.str.7 = [7 x i8] c"coeffs\00"
@.str.8 = [8 x i8] c"pris[0]\00"
@.str.9 = [8 x i8] c"exps[0]\00"
@.str.10 = [10 x i8] c"coeffs[0]\00"
@.str.11 = [71 x i8] c"RSA_set0_multi_prime_params(key, pris, exps, coeffs, NUM_EXTRA_PRIMES)\00"
define i32 @key2048p3(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32**
%5 = alloca i32**
%6 = alloca i32**
%7 = alloca i32
store i32* %0, i32** %3
store i32** null, i32*** %4
store i32** null, i32*** %5
store i32** null, i32*** %6
store i32 256, i32* %7
%8 = load i32*, i32** %3
%9 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @key2048p3.n, i64 0, i64 0), i32 256, i32* null)
%10 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @key2048p3.e, i64 0, i64 0), i32 3, i32* null)
%11 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @key2048p3.d, i64 0, i64 0), i32 256, i32* null)
%12 = call i32 @RSA_set0_key(i32* %8, i32* %9, i32* %10, i32* %11)
%13 = call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 136, i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 1)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %1
br label %100
16: ; preds = %1
%17 = load i32*, i32** %3
%18 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.p, i64 0, i64 0), i32 86, i32* null)
%19 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.q, i64 0, i64 0), i32 86, i32* null)
%20 = call i32 @RSA_set0_factors(i32* %17, i32* %18, i32* %19)
%21 = call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 142, i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %20, i32 1)
%22 = icmp ne i32 %21, 0
br i1 %22, label %24, label %23
23: ; preds = %16
br label %100
24: ; preds = %16
%25 = load i32*, i32** %3
%26 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.dmp1, i64 0, i64 0), i32 86, i32* null)
%27 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.dmq1, i64 0, i64 0), i32 86, i32* null)
%28 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.iqmp, i64 0, i64 0), i32 86, i32* null)
%29 = call i32 @RSA_set0_crt_params(i32* %25, i32* %26, i32* %27, i32* %28)
%30 = call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 147, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %29, i32 1)
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %24
store i32 0, i32* %2
br label %125
33: ; preds = %24
%34 = call i32** @OPENSSL_zalloc(i32 8)
store i32** %34, i32*** %4
%35 = call i32** @OPENSSL_zalloc(i32 8)
store i32** %35, i32*** %5
%36 = call i32** @OPENSSL_zalloc(i32 8)
store i32** %36, i32*** %6
%37 = load i32**, i32*** %4
%38 = bitcast i32** %37 to i32*
%39 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32* %38)
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %51
41: ; preds = %33
%42 = load i32**, i32*** %5
%43 = bitcast i32** %42 to i32*
%44 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32* %43)
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %41
%47 = load i32**, i32*** %6
%48 = bitcast i32** %47 to i32*
%49 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32* %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %46, %41, %33
br label %100
52: ; preds = %46
%53 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_prime, i64 0, i64 0), i32 86, i32* null)
%54 = load i32**, i32*** %4
%55 = getelementptr inbounds i32*, i32** %54, i64 0
store i32* %53, i32** %55
%56 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_exponent, i64 0, i64 0), i32 86, i32* null)
%57 = load i32**, i32*** %5
%58 = getelementptr inbounds i32*, i32** %57, i64 0
store i32* %56, i32** %58
%59 = call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_coefficient, i64 0, i64 0), i32 86, i32* null)
%60 = load i32**, i32*** %6
%61 = getelementptr inbounds i32*, i32** %60, i64 0
store i32* %59, i32** %61
%62 = load i32**, i32*** %4
%63 = getelementptr inbounds i32*, i32** %62, i64 0
%64 = load i32*, i32** %63
%65 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32* %64)
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %79
67: ; preds = %52
%68 = load i32**, i32*** %5
%69 = getelementptr inbounds i32*, i32** %68, i64 0
%70 = load i32*, i32** %69
%71 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32* %70)
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %79
73: ; preds = %67
%74 = load i32**, i32*** %6
%75 = getelementptr inbounds i32*, i32** %74, i64 0
%76 = load i32*, i32** %75
%77 = call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32* %76)
%78 = icmp ne i32 %77, 0
br i1 %78, label %80, label %79
79: ; preds = %73, %67, %52
br label %100
80: ; preds = %73
%81 = load i32*, i32** %3
%82 = load i32**, i32*** %4
%83 = load i32**, i32*** %5
%84 = load i32**, i32*** %6
%85 = call i64 @RSA_set0_multi_prime_params(i32* %81, i32** %82, i32** %83, i32** %84, i32 1)
%86 = icmp ne i64 %85, 0
%87 = zext i1 %86 to i32
%88 = call i32 @test_true(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 166, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), i32 %87)
%89 = icmp ne i32 %88, 0
br i1 %89, label %91, label %90
90: ; preds = %80
br label %100
91: ; preds = %80
br label %92
92: ; preds = %124, %91
%93 = load i32**, i32*** %4
%94 = call i32 @OPENSSL_free(i32** %93)
%95 = load i32**, i32*** %5
%96 = call i32 @OPENSSL_free(i32** %95)
%97 = load i32**, i32*** %6
%98 = call i32 @OPENSSL_free(i32** %97)
%99 = load i32, i32* %7
store i32 %99, i32* %2
br label %125
100: ; preds = %90, %79, %51, %23, %15
%101 = load i32**, i32*** %4
%102 = icmp ne i32** %101, null
br i1 %102, label %103, label %108
103: ; preds = %100
%104 = load i32**, i32*** %4
%105 = getelementptr inbounds i32*, i32** %104, i64 0
%106 = load i32*, i32** %105
%107 = call i32 @BN_free(i32* %106)
br label %108
108: ; preds = %103, %100
%109 = load i32**, i32*** %5
%110 = icmp ne i32** %109, null
br i1 %110, label %111, label %116
111: ; preds = %108
%112 = load i32**, i32*** %5
%113 = getelementptr inbounds i32*, i32** %112, i64 0
%114 = load i32*, i32** %113
%115 = call i32 @BN_free(i32* %114)
br label %116
116: ; preds = %111, %108
%117 = load i32**, i32*** %6
%118 = icmp ne i32** %117, null
br i1 %118, label %119, label %124
119: ; preds = %116
%120 = load i32**, i32*** %6
%121 = getelementptr inbounds i32*, i32** %120, i64 0
%122 = load i32*, i32** %121
%123 = call i32 @BN_free(i32* %122)
br label %124
124: ; preds = %119, %116
store i32 0, i32* %7
br label %92
125: ; preds = %92, %32
%126 = load i32, i32* %2
ret i32 %126
}

LLVM IR (-O2):
@key2048p3.n = internal constant [257 x i8] c"\92`\D0u\0A\E1\17\EE\E5\\?=\EA\BAt\91u!\A2b\EEv\00|\DF\8AVuZ\D7:\15\98\A1@\84\10\A0\144\C3\F5\BCT\A8\8BW\FA\19\FCC(\DA\EA\07P\A4\C4N\88\CF\F3\B28&!\B8\0Fg\04dC>C6\E6\D0\03\E8\CDe\BF\F2\11\DA\14K\88)\1C\22Y\A0\0Ar\B7\11\C1\16\EFv\86\E8\FE\E3NM\93<\86\81\87\BD\C2o{\E0qI<\86\F7\A5\94\1C5\10\80j\D6{\0F\94\D8\8F\\\F5\C0*\09(!\D8bn\892\B6\\[\D8\C9 I\C2\10\93+z\FAz\C5\9C\0E\88j\E5\C1\ED\B0\0D\8C\E2\C5v3\DB&\BDf9\BF\F7<\EE\82\BE\92u\C4\02\B4\CF*C\88\DA\8C\F8\C6N\EF\E1\C5\A0\F5\AB\80W\C3\9F\A5\C0X\9C>%?\09`3#\00\F9K\EAD\87{X\8E\1E\DB\DE\97\CF#`rz\09\B7u&-~\E5R\B31\9B\92f\F0Z%\00"
@key2048p3.e = internal constant [4 x i8] c"\01\00\01\00"
@key2048p3.d = internal constant [257 x i8] c"j}\F2\CAc\EA\D4\DD\A1\91\D6\14\B6\B3\85\E0\D9\05j=m\\\FE\07\DB\1D\AA\BE\E0\22\DB\08!-\97a=3(\E0&|\9D\D2=xz\BD\E2\AF\CB0j\EB}\FC\E6\92F\CCs\F5\C8\7F\DF\06\03\01y\A2\11Kv}\B1\F0\83\FF\84\1C\02]}\C0\0C\D8$5\B9\A9\0FiSi\E9M\F2=,\E4X\BC;2\83\AD\8B\BA+\8F\A1\BAb\E2\DC\E9\AC\CF\F3y\9A\AE|\84\00\16\F3\BA\8E\00H\C0\B6\CCC9\AFqa\00:[\EB\86J\01d\B2\C1\C9#{d\BC\87Ui\945\1B'Pl3\D4\BC\DF\CE\0F\9CI\1A}k\06(\C7\C8R\BEO\0A\9C12\B2\ED:,\88\81\E9\AA\B0~ \E1}\EB\07F\91\BEgwv\A7\8B\\P.\05\D9\BD\DEr\12k78i^-\D1\A0\A9\8A\14$|e\D8\A7\EEyC*\09,\B0r\1A\12\DFy\8ED\F7\CF\CE\0CI\81G\A9\B1\00"
@key2048p3.p = internal constant [87 x i8] c"\06w\CD\D5F\9B\C1\D5X\00\81\E2\F3\0A6\B1n)\89\D5/1_\92\22;\9Bu0\82\FA\C5\F5\DE\8A6\DB\C6\E5\8F\EF\147\D6\00\F9\AB\90\9B]WL\F5\1Fw\C4\BB\8B\DD\9Bg\11E\B2d\E8\AC\A8\03\0F\16\0D]-S\07#\FBb\0D\E6\16\D3#\E8\B3\00"
@key2048p3.q = internal constant [87 x i8] c"\06f\9ApS\D6rt\FD\EAE\C3\C0\17\AE\DEy\17\AEy\DE\FC\0E\F7\A4:\8CC\8F\C7\8A\A2,Q\C4\D0r\89s\\a\BE\FDT?\92e\DEMeqp\F6\F2\E5\98\B9\0F\D1\0B\E6\95\09Jz\DF\F3\10\16\D0`\FC\A5\104\977o\0A\D5]\8F\D4\C3\A0[\00"
@key2048p3.dmp1 = internal constant [87 x i8] c"\05|\9E\1C\BD\90%\E7@\86\F5\A8;z?\99V\95`:{\95K\B8\A0\D7\A5\F1\CC\DC_\B5\8C\F4b\95T\ED.\12b\C2\E8\F6\DE\CE\ED\8Ewm\C0@%t\B3Z-\AA\E1\AC\11\CB\E2/\0AQ#\1EG\B2\05\88\02\B2\0FK\F0g0\F0\0Fn\EF_\F7\E7\00"
@key2048p3.dmq1 = internal constant [87 x i8] c"\01\A5k\BC\CD\E3\0EF\C6r\F5\04V(\01\22Xt]\BC\1C<)AIl\81\\r\E2\F7\E5\A3\8EX\16\E0\0E7\AC\1F\BBu\FD\AF\E7\DF\E9\1Fp\A2\8FR\03\C0F\D9\F9\96c\00'~_8`\D6ka\E2\AF\BE\EAX\D3\9D\BCu\03\8DBe\D6k\85\97\00"
@key2048p3.iqmp = internal constant [87 x i8] c"\03\A1\8B\80\E4\D8\87%\17]\CC\8D\A9\8A\22+l\154o\80\CC\1CD\04h\BC\03\CD\95\BBi7aH\B4#\13\08\16Tj\A1|\F5\D4:\E1O\A4\0C\F5\AF\80\85'\06\0Dp\C0\C5\19(\FE\EE\8E\86!\98\8A7\B7\E50%p\93Q-I\85V\B3\0C+\96\00"
@key2048p3.ex_prime = internal constant [87 x i8] c"\03\89\22\A0\B7:\91\CB^\0C\FDs\DE\A78\A9GC\D6\02\BF*\B9<H\F3\06\D6X5PV\16\\4\9Ba\87\C8\AA\0A]\8A\0A\CD\9CA\D9\96$\E0\A9\9B&\B7\A8\08\C9\EA\DC\A7\15\FBb\A0-\90\E6\A7Un\C6l\FF\D6\10m\FA.\04P\EC\\f\E4\05\00"
@key2048p3.ex_exponent = internal constant [87 x i8] c"\02\0A\CD\C3\82\D2\03\B01\AC\D3 \804\9AW\BC`\04W%\D0)\9A\16\90\B9\1CIj\D1\F2G\8C\0E\9E\C9 \C2\D8\E4\8F\CE\D2\1A\9C\EC\B4\1F3A\C8\F5b\D1\A5\EF\1D\A1\D8\BDq\C6\F7\DA\897.\E2\ECG\C5\B8\E3\B4\E3\\\82\AA\DD\B7X.\AF\07y\00"
@key2048p3.ex_coefficient = internal constant [87 x i8] c"\00\9C\09\88\9B\C8W\08ii\AB-\9E)\1C<mY3\12\0D+\09.\AF\01,'\01\FC\BD&\13\F9-\09\22NI\11\03\82\88\87\F4C\1D\AC\CA\EC\86\F7#\F1d\F3\F5\81\F076\CFg\FF\1A\FFz\C7\F9\F9g-\A0\9Da\F8\F6G\\/\E7f\E8<:\E8\00"
@.str = [197 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/artclarke/humble-video/refs/heads/master/humble-video-captive/src/main/gnu/openssl/csrc/test/rsa_mp_test.c\00"
@.str.1 = [123 x i8] c"RSA_set0_key(key, BN_bin2bn(n, sizeof(n) - 1, NULL), BN_bin2bn(e, sizeof(e) - 1, NULL), BN_bin2bn(d, sizeof(d) - 1, NULL))\00"
@.str.2 = [2 x i8] c"1\00"
@.str.3 = [92 x i8] c"RSA_set0_factors(key, BN_bin2bn(p, sizeof(p) - 1, NULL), BN_bin2bn(q, sizeof(q) - 1, NULL))\00"
@.str.4 = [148 x i8] c"RSA_set0_crt_params(key, BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL), BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL), BN_bin2bn(iqmp, sizeof(iqmp) - 1, NULL))\00"
@.str.5 = [5 x i8] c"pris\00"
@.str.6 = [5 x i8] c"exps\00"
@.str.7 = [7 x i8] c"coeffs\00"
@.str.8 = [8 x i8] c"pris[0]\00"
@.str.9 = [8 x i8] c"exps[0]\00"
@.str.10 = [10 x i8] c"coeffs[0]\00"
@.str.11 = [71 x i8] c"RSA_set0_multi_prime_params(key, pris, exps, coeffs, NUM_EXTRA_PRIMES)\00"
define i32 @key2048p3(i32* %0) {
%2 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @key2048p3.n, i64 0, i64 0), i32 256, i32* null)
%3 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @key2048p3.e, i64 0, i64 0), i32 3, i32* null)
%4 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([257 x i8], [257 x i8]* @key2048p3.d, i64 0, i64 0), i32 256, i32* null)
%5 = tail call i32 @RSA_set0_key(i32* %0, i32* %2, i32* %3, i32* %4)
%6 = tail call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 136, i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %57, label %8
8: ; preds = %1
%9 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.p, i64 0, i64 0), i32 86, i32* null)
%10 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.q, i64 0, i64 0), i32 86, i32* null)
%11 = tail call i32 @RSA_set0_factors(i32* %0, i32* %9, i32* %10)
%12 = tail call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 142, i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 1)
%13 = icmp eq i32 %12, 0
br i1 %13, label %57, label %14
14: ; preds = %8
%15 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.dmp1, i64 0, i64 0), i32 86, i32* null)
%16 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.dmq1, i64 0, i64 0), i32 86, i32* null)
%17 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.iqmp, i64 0, i64 0), i32 86, i32* null)
%18 = tail call i32 @RSA_set0_crt_params(i32* %0, i32* %15, i32* %16, i32* %17)
%19 = tail call i32 @test_int_eq(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 147, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 1)
%20 = icmp eq i32 %19, 0
br i1 %20, label %81, label %21
21: ; preds = %14
%22 = tail call i32** @OPENSSL_zalloc(i32 8)
%23 = tail call i32** @OPENSSL_zalloc(i32 8)
%24 = tail call i32** @OPENSSL_zalloc(i32 8)
%25 = bitcast i32** %22 to i32*
%26 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32* %25)
%27 = icmp eq i32 %26, 0
br i1 %27, label %65, label %28
28: ; preds = %21
%29 = bitcast i32** %23 to i32*
%30 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32* %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %65, label %32
32: ; preds = %28
%33 = bitcast i32** %24 to i32*
%34 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 157, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32* %33)
%35 = icmp eq i32 %34, 0
br i1 %35, label %65, label %36
36: ; preds = %32
%37 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_prime, i64 0, i64 0), i32 86, i32* null)
store i32* %37, i32** %22
%38 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_exponent, i64 0, i64 0), i32 86, i32* null)
store i32* %38, i32** %23
%39 = tail call i32* @BN_bin2bn(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @key2048p3.ex_coefficient, i64 0, i64 0), i32 86, i32* null)
store i32* %39, i32** %24
%40 = load i32*, i32** %22
%41 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32* %40)
%42 = icmp eq i32 %41, 0
br i1 %42, label %67, label %43
43: ; preds = %36
%44 = load i32*, i32** %23
%45 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32* %44)
%46 = icmp eq i32 %45, 0
br i1 %46, label %67, label %47
47: ; preds = %43
%48 = load i32*, i32** %24
%49 = tail call i32 @test_ptr(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 163, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32* %48)
%50 = icmp eq i32 %49, 0
br i1 %50, label %67, label %51
51: ; preds = %47
%52 = tail call i64 @RSA_set0_multi_prime_params(i32* %0, i32** %22, i32** %23, i32** %24, i32 1)
%53 = icmp ne i64 %52, 0
%54 = zext i1 %53 to i32
%55 = tail call i32 @test_true(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i32 166, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0), i32 %54)
%56 = icmp eq i32 %55, 0
br i1 %56, label %67, label %57
57: ; preds = %1, %8, %76, %78, %51
%58 = phi i32** [ %22, %51 ], [ %71, %78 ], [ %71, %76 ], [ null, %8 ], [ null, %1 ]
%59 = phi i32** [ %23, %51 ], [ %23, %78 ], [ %23, %76 ], [ null, %8 ], [ null, %1 ]
%60 = phi i32** [ %24, %51 ], [ %24, %78 ], [ null, %76 ], [ null, %8 ], [ null, %1 ]
%61 = phi i32 [ 256, %51 ], [ 0, %78 ], [ 0, %76 ], [ 0, %8 ], [ 0, %1 ]
%62 = tail call i32 @OPENSSL_free(i32** %58)
%63 = tail call i32 @OPENSSL_free(i32** %59)
%64 = tail call i32 @OPENSSL_free(i32** %60)
br label %81
65: ; preds = %21, %28, %32
%66 = icmp eq i32** %22, null
br i1 %66, label %70, label %67
67: ; preds = %36, %43, %47, %51, %65
%68 = load i32*, i32** %22
%69 = tail call i32 @BN_free(i32* %68)
br label %70
70: ; preds = %67, %65
%71 = phi i32** [ %22, %67 ], [ null, %65 ]
%72 = icmp eq i32** %23, null
br i1 %72, label %76, label %73
73: ; preds = %70
%74 = load i32*, i32** %23
%75 = tail call i32 @BN_free(i32* %74)
br label %76
76: ; preds = %73, %70
%77 = icmp eq i32** %24, null
br i1 %77, label %57, label %78
78: ; preds = %76
%79 = load i32*, i32** %24
%80 = tail call i32 @BN_free(i32* %79)
br label %57
81: ; preds = %14, %57
%82 = phi i32 [ %61, %57 ], [ 0, %14 ]
ret i32 %82
}