#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*/ BN_CTX;
typedef int /*<<< orphan*/ const BIGNUM;

/* Variables and functions */
int BN_extended_gcd(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                    int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                    int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ const *);
int BN_mod_add(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ *);
int BN_mod_mul(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
               int /*<<< orphan*/ *);
int BN_mul(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
           int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ const *BN_new();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
int BN_crt(BIGNUM *x, const BIGNUM *a1, const BIGNUM *n1, const BIGNUM *a2,
           const BIGNUM *n2, BN_CTX *bn_ctx) {
  int ret, ok;
  BIGNUM *n1inv_n2 = NULL, *n2inv_n1 = NULL;
  BIGNUM *n = NULL;
  BIGNUM *tmp = NULL, *tmp1 = NULL, *tmp2 = NULL;
  if ((n1inv_n2 = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        164);
    fflush(stderr);
    ;
    goto err;
  };
  if ((n2inv_n1 = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        165);
    fflush(stderr);
    ;
    goto err;
  };
  if ((n = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        166);
    fflush(stderr);
    ;
    goto err;
  };
  if ((tmp = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        167);
    fflush(stderr);
    ;
    goto err;
  };
  if ((tmp1 = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        168);
    fflush(stderr);
    ;
    goto err;
  };
  if ((tmp2 = BN_new()) == NULL) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        169);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mul(n, n1, n2, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        171);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_extended_gcd(NULL, n1inv_n2, n2inv_n1, n1, n2, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        173);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_mul(tmp, n2inv_n1, n2, n, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        175);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_mul(tmp1, a1, tmp, n, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        176);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_mul(tmp, n1inv_n2, n1, n, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        177);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_mul(tmp2, a2, tmp, n, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        178);
    fflush(stderr);
    ;
    goto err;
  };
  ok = (BN_mod_add(x, tmp1, tmp2, n, bn_ctx));
  if (ok != 1) {
    fprintf(
        stderr, "@@@ %s:%d @@@\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c",
        179);
    fflush(stderr);
    ;
    goto err;
  };
  ret = 1;
  goto cleanup;
err:
  ret = 0;
cleanup:
  BN_free(n1inv_n2);
  BN_free(n2inv_n1);
  BN_free(n);
  BN_free(tmp);
  BN_free(tmp1);
  BN_free(tmp2);
  return ret;
}


x86 assembly (clang, -O0):
<BN_crt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x68(%rbp)
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    1219 <BN_crt+0x99>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
lea    0xe0b(%rip),%rsi
lea    0xe13(%rip),%rdx
mov    $0xa4,%ecx
call   1070 <fprintf@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    1262 <BN_crt+0xe2>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
lea    0xdc2(%rip),%rsi
lea    0xdca(%rip),%rdx
mov    $0xa5,%ecx
call   1070 <fprintf@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    12ab <BN_crt+0x12b>
mov    0x2d62(%rip),%rax
mov    (%rax),%edi
lea    0xd79(%rip),%rsi
lea    0xd81(%rip),%rdx
mov    $0xa6,%ecx
call   1070 <fprintf@plt>
mov    0x2d41(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    12f4 <BN_crt+0x174>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
lea    0xd30(%rip),%rsi
lea    0xd38(%rip),%rdx
mov    $0xa7,%ecx
call   1070 <fprintf@plt>
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    133d <BN_crt+0x1bd>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edi
lea    0xce7(%rip),%rsi
lea    0xcef(%rip),%rdx
mov    $0xa8,%ecx
call   1070 <fprintf@plt>
mov    0x2caf(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    $0x0,%al
call   1040 <BN_new@plt>
mov    %rax,-0x68(%rbp)
cmp    $0x0,%rax
jne    1386 <BN_crt+0x206>
mov    0x2c87(%rip),%rax
mov    (%rax),%edi
lea    0xc9e(%rip),%rsi
lea    0xca6(%rip),%rdx
mov    $0xa9,%ecx
call   1070 <fprintf@plt>
mov    0x2c66(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1050 <BN_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     13dc <BN_crt+0x25c>
mov    0x2c31(%rip),%rax
mov    (%rax),%edi
lea    0xc48(%rip),%rsi
lea    0xc50(%rip),%rdx
mov    $0xab,%ecx
call   1070 <fprintf@plt>
mov    0x2c10(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
xor    %eax,%eax
mov    %eax,%edi
call   1030 <BN_extended_gcd@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     143a <BN_crt+0x2ba>
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
lea    0xbea(%rip),%rsi
lea    0xbf2(%rip),%rdx
mov    $0xad,%ecx
call   1070 <fprintf@plt>
mov    0x2bb2(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x58(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1090 <BN_mod_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     1494 <BN_crt+0x314>
mov    0x2b79(%rip),%rax
mov    (%rax),%edi
lea    0xb90(%rip),%rsi
lea    0xb98(%rip),%rdx
mov    $0xaf,%ecx
call   1070 <fprintf@plt>
mov    0x2b58(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1090 <BN_mod_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     14ee <BN_crt+0x36e>
mov    0x2b1f(%rip),%rax
mov    (%rax),%edi
lea    0xb36(%rip),%rsi
lea    0xb3e(%rip),%rdx
mov    $0xb0,%ecx
call   1070 <fprintf@plt>
mov    0x2afe(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1090 <BN_mod_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     1548 <BN_crt+0x3c8>
mov    0x2ac5(%rip),%rax
mov    (%rax),%edi
lea    0xadc(%rip),%rsi
lea    0xae4(%rip),%rdx
mov    $0xb1,%ecx
call   1070 <fprintf@plt>
mov    0x2aa4(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x68(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1090 <BN_mod_mul@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     15a2 <BN_crt+0x422>
mov    0x2a6b(%rip),%rax
mov    (%rax),%edi
lea    0xa82(%rip),%rsi
lea    0xa8a(%rip),%rdx
mov    $0xb2,%ecx
call   1070 <fprintf@plt>
mov    0x2a4a(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   10a0 <BN_mod_add@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
je     15fc <BN_crt+0x47c>
mov    0x2a11(%rip),%rax
mov    (%rax),%edi
lea    0xa28(%rip),%rsi
lea    0xa30(%rip),%rdx
mov    $0xb3,%ecx
call   1070 <fprintf@plt>
mov    0x29f0(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
jmp    1608 <BN_crt+0x488>
movl   $0x1,-0x34(%rbp)
jmp    160f <BN_crt+0x48f>
movl   $0x0,-0x34(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x48(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x50(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x58(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x60(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x68(%rbp),%rdi
call   1060 <BN_free@plt>
mov    -0x34(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_crt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r13
mov    %r8,%r12
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    %rsi,0x20(%rsp)
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <BN_new@plt>
mov    %rax,%r15
test   %rax,%rax
je     135a <BN_crt+0x1da>
mov    %rbp,0x30(%rsp)
mov    %rbx,0x40(%rsp)
xor    %eax,%eax
call   1040 <BN_new@plt>
test   %rax,%rax
je     137d <BN_crt+0x1fd>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <BN_new@plt>
test   %rax,%rax
je     139d <BN_crt+0x21d>
mov    %rax,%rbp
mov    %r14,0x38(%rsp)
xor    %eax,%eax
call   1040 <BN_new@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
mov    %rbp,0x28(%rsp)
je     13bb <BN_crt+0x23b>
xor    %eax,%eax
call   1040 <BN_new@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     13d2 <BN_crt+0x252>
xor    %eax,%eax
call   1040 <BN_new@plt>
test   %rax,%rax
mov    %r15,%r14
je     13eb <BN_crt+0x26b>
mov    %rax,0x8(%rsp)
mov    %rbp,%rdi
mov    0x30(%rsp),%rbp
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1050 <BN_mul@plt>
mov    $0xab,%ecx
cmp    $0x1,%eax
jne    13f7 <BN_crt+0x277>
xor    %edi,%edi
mov    %r14,%rsi
mov    %rbx,%r15
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
mov    %r13,%r9
call   1030 <BN_extended_gcd@plt>
mov    $0xad,%ecx
cmp    $0x1,%eax
jne    146d <BN_crt+0x2ed>
mov    0x18(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    0x28(%rsp),%r15
mov    %r15,%rcx
mov    %r13,%r8
call   1090 <BN_mod_mul@plt>
mov    $0xaf,%ecx
cmp    $0x1,%eax
jne    147c <BN_crt+0x2fc>
mov    %r13,%r8
mov    0x10(%rsp),%r13
mov    %r13,%rdi
mov    0x20(%rsp),%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %r8,0x20(%rsp)
call   1090 <BN_mod_mul@plt>
mov    $0xb0,%ecx
cmp    $0x1,%eax
mov    %rbp,%r12
jne    1401 <BN_crt+0x281>
mov    %r12,%rdi
mov    %r14,%rsi
mov    0x30(%rsp),%rdx
mov    %r15,%rcx
mov    0x20(%rsp),%r8
call   1090 <BN_mod_mul@plt>
mov    $0xb1,%ecx
cmp    $0x1,%eax
jne    1401 <BN_crt+0x281>
mov    0x8(%rsp),%rbp
mov    %rbp,%rdi
mov    0x40(%rsp),%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    0x20(%rsp),%r8
call   1090 <BN_mod_mul@plt>
mov    $0xb2,%ecx
cmp    $0x1,%eax
jne    1401 <BN_crt+0x281>
mov    0x38(%rsp),%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    0x20(%rsp),%r8
call   10a0 <BN_mod_add@plt>
mov    $0xb3,%ecx
mov    $0x1,%ebp
cmp    $0x1,%eax
jne    1401 <BN_crt+0x281>
jmp    1428 <BN_crt+0x2a8>
mov    $0xa4,%ecx
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r15,%r14
xor    %ebx,%ebx
jmp    1401 <BN_crt+0x281>
xor    %eax,%eax
mov    %rax,0x28(%rsp)
mov    $0xa5,%ecx
xor    %ebx,%ebx
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r15,%r14
jmp    1401 <BN_crt+0x281>
mov    $0xa6,%ecx
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %r13d,%r13d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r12d,%r12d
mov    %r15,%r14
jmp    1401 <BN_crt+0x281>
mov    $0xa7,%ecx
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r13d,%r13d
mov    %r15,%r14
jmp    1401 <BN_crt+0x281>
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    $0xa8,%ecx
xor    %r13d,%r13d
mov    0x18(%rsp),%r12
mov    %r15,%r14
jmp    1401 <BN_crt+0x281>
mov    $0xa9,%ecx
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    0x10(%rsp),%r13
mov    0x18(%rsp),%r12
mov    0x2bd8(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xbee(%rip),%rsi
lea    0xbf6(%rip),%rdx
call   1070 <fprintf@plt>
mov    0x0(%rbp),%edi
call   1080 <fflush@plt>
xor    %ebp,%ebp
mov    %r14,%rdi
call   1060 <BN_free@plt>
mov    %rbx,%rdi
call   1060 <BN_free@plt>
mov    0x28(%rsp),%rdi
call   1060 <BN_free@plt>
mov    %r12,%rdi
call   1060 <BN_free@plt>
mov    %r13,%rdi
call   1060 <BN_free@plt>
mov    0x8(%rsp),%rdi
call   1060 <BN_free@plt>
mov    %ebp,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rsp),%r13
mov    0x18(%rsp),%r12
mov    %r15,%rbx
jmp    1401 <BN_crt+0x281>
mov    0x10(%rsp),%r13
mov    %rbp,%r12
jmp    1401 <BN_crt+0x281>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c\00"
define i32 @BN_crt(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
store i32* null, i32** %15
store i32* null, i32** %16
store i32* null, i32** %17
store i32* null, i32** %18
store i32* null, i32** %19
store i32* null, i32** %20
%21 = call i32* (...) @BN_new()
store i32* %21, i32** %15
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %28
23: ; preds = %6
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 164)
%26 = load i32, i32* @stderr
%27 = call i32 @fflush(i32 %26)
br label %166
28: ; preds = %6
%29 = call i32* (...) @BN_new()
store i32* %29, i32** %16
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 165)
%34 = load i32, i32* @stderr
%35 = call i32 @fflush(i32 %34)
br label %166
36: ; preds = %28
%37 = call i32* (...) @BN_new()
store i32* %37, i32** %17
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 166)
%42 = load i32, i32* @stderr
%43 = call i32 @fflush(i32 %42)
br label %166
44: ; preds = %36
%45 = call i32* (...) @BN_new()
store i32* %45, i32** %18
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %52
47: ; preds = %44
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 167)
%50 = load i32, i32* @stderr
%51 = call i32 @fflush(i32 %50)
br label %166
52: ; preds = %44
%53 = call i32* (...) @BN_new()
store i32* %53, i32** %19
%54 = icmp eq i32* %53, null
br i1 %54, label %55, label %60
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 168)
%58 = load i32, i32* @stderr
%59 = call i32 @fflush(i32 %58)
br label %166
60: ; preds = %52
%61 = call i32* (...) @BN_new()
store i32* %61, i32** %20
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %68
63: ; preds = %60
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 169)
%66 = load i32, i32* @stderr
%67 = call i32 @fflush(i32 %66)
br label %166
68: ; preds = %60
%69 = load i32*, i32** %17
%70 = load i32*, i32** %9
%71 = load i32*, i32** %11
%72 = load i32*, i32** %12
%73 = call i32 @BN_mul(i32* %69, i32* %70, i32* %71, i32* %72)
store i32 %73, i32* %14
%74 = load i32, i32* %14
%75 = icmp ne i32 %74, 1
br i1 %75, label %76, label %81
76: ; preds = %68
%77 = load i32, i32* @stderr
%78 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 171)
%79 = load i32, i32* @stderr
%80 = call i32 @fflush(i32 %79)
br label %166
81: ; preds = %68
%82 = load i32*, i32** %15
%83 = load i32*, i32** %16
%84 = load i32*, i32** %9
%85 = load i32*, i32** %11
%86 = load i32*, i32** %12
%87 = call i32 @BN_extended_gcd(i32* null, i32* %82, i32* %83, i32* %84, i32* %85, i32* %86)
store i32 %87, i32* %14
%88 = load i32, i32* %14
%89 = icmp ne i32 %88, 1
br i1 %89, label %90, label %95
90: ; preds = %81
%91 = load i32, i32* @stderr
%92 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 173)
%93 = load i32, i32* @stderr
%94 = call i32 @fflush(i32 %93)
br label %166
95: ; preds = %81
%96 = load i32*, i32** %18
%97 = load i32*, i32** %16
%98 = load i32*, i32** %11
%99 = load i32*, i32** %17
%100 = load i32*, i32** %12
%101 = call i32 @BN_mod_mul(i32* %96, i32* %97, i32* %98, i32* %99, i32* %100)
store i32 %101, i32* %14
%102 = load i32, i32* %14
%103 = icmp ne i32 %102, 1
br i1 %103, label %104, label %109
104: ; preds = %95
%105 = load i32, i32* @stderr
%106 = call i32 @fprintf(i32 %105, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 175)
%107 = load i32, i32* @stderr
%108 = call i32 @fflush(i32 %107)
br label %166
109: ; preds = %95
%110 = load i32*, i32** %19
%111 = load i32*, i32** %8
%112 = load i32*, i32** %18
%113 = load i32*, i32** %17
%114 = load i32*, i32** %12
%115 = call i32 @BN_mod_mul(i32* %110, i32* %111, i32* %112, i32* %113, i32* %114)
store i32 %115, i32* %14
%116 = load i32, i32* %14
%117 = icmp ne i32 %116, 1
br i1 %117, label %118, label %123
118: ; preds = %109
%119 = load i32, i32* @stderr
%120 = call i32 @fprintf(i32 %119, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 176)
%121 = load i32, i32* @stderr
%122 = call i32 @fflush(i32 %121)
br label %166
123: ; preds = %109
%124 = load i32*, i32** %18
%125 = load i32*, i32** %15
%126 = load i32*, i32** %9
%127 = load i32*, i32** %17
%128 = load i32*, i32** %12
%129 = call i32 @BN_mod_mul(i32* %124, i32* %125, i32* %126, i32* %127, i32* %128)
store i32 %129, i32* %14
%130 = load i32, i32* %14
%131 = icmp ne i32 %130, 1
br i1 %131, label %132, label %137
132: ; preds = %123
%133 = load i32, i32* @stderr
%134 = call i32 @fprintf(i32 %133, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 177)
%135 = load i32, i32* @stderr
%136 = call i32 @fflush(i32 %135)
br label %166
137: ; preds = %123
%138 = load i32*, i32** %20
%139 = load i32*, i32** %10
%140 = load i32*, i32** %18
%141 = load i32*, i32** %17
%142 = load i32*, i32** %12
%143 = call i32 @BN_mod_mul(i32* %138, i32* %139, i32* %140, i32* %141, i32* %142)
store i32 %143, i32* %14
%144 = load i32, i32* %14
%145 = icmp ne i32 %144, 1
br i1 %145, label %146, label %151
146: ; preds = %137
%147 = load i32, i32* @stderr
%148 = call i32 @fprintf(i32 %147, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 178)
%149 = load i32, i32* @stderr
%150 = call i32 @fflush(i32 %149)
br label %166
151: ; preds = %137
%152 = load i32*, i32** %7
%153 = load i32*, i32** %19
%154 = load i32*, i32** %20
%155 = load i32*, i32** %17
%156 = load i32*, i32** %12
%157 = call i32 @BN_mod_add(i32* %152, i32* %153, i32* %154, i32* %155, i32* %156)
store i32 %157, i32* %14
%158 = load i32, i32* %14
%159 = icmp ne i32 %158, 1
br i1 %159, label %160, label %165
160: ; preds = %151
%161 = load i32, i32* @stderr
%162 = call i32 @fprintf(i32 %161, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 179)
%163 = load i32, i32* @stderr
%164 = call i32 @fflush(i32 %163)
br label %166
165: ; preds = %151
store i32 1, i32* %13
br label %167
166: ; preds = %160, %146, %132, %118, %104, %90, %76, %63, %55, %47, %39, %31, %23
store i32 0, i32* %13
br label %167
167: ; preds = %166, %165
%168 = load i32*, i32** %15
%169 = call i32 @BN_free(i32* %168)
%170 = load i32*, i32** %16
%171 = call i32 @BN_free(i32* %170)
%172 = load i32*, i32** %17
%173 = call i32 @BN_free(i32* %172)
%174 = load i32*, i32** %18
%175 = call i32 @BN_free(i32* %174)
%176 = load i32*, i32** %19
%177 = call i32 @BN_free(i32* %176)
%178 = load i32*, i32** %20
%179 = call i32 @BN_free(i32* %178)
%180 = load i32, i32* %13
ret i32 %180
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"@@@ %s:%d @@@\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dstebila/daps/refs/heads/master/bn_extra.c\00"
define i32 @BN_crt(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32* (...) @BN_new()
%8 = icmp eq i32* %7, null
br i1 %8, label %45, label %9
9: ; preds = %6
%10 = tail call i32* (...) @BN_new()
%11 = icmp eq i32* %10, null
br i1 %11, label %45, label %12
12: ; preds = %9
%13 = tail call i32* (...) @BN_new()
%14 = icmp eq i32* %13, null
br i1 %14, label %45, label %15
15: ; preds = %12
%16 = tail call i32* (...) @BN_new()
%17 = icmp eq i32* %16, null
br i1 %17, label %45, label %18
18: ; preds = %15
%19 = tail call i32* (...) @BN_new()
%20 = icmp eq i32* %19, null
br i1 %20, label %45, label %21
21: ; preds = %18
%22 = tail call i32* (...) @BN_new()
%23 = icmp eq i32* %22, null
br i1 %23, label %45, label %24
24: ; preds = %21
%25 = tail call i32 @BN_mul(i32* %13, i32* %2, i32* %4, i32* %5)
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %45
27: ; preds = %24
%28 = tail call i32 @BN_extended_gcd(i32* null, i32* %7, i32* %10, i32* %2, i32* %4, i32* %5)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %45
30: ; preds = %27
%31 = tail call i32 @BN_mod_mul(i32* %16, i32* %10, i32* %4, i32* %13, i32* %5)
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %45
33: ; preds = %30
%34 = tail call i32 @BN_mod_mul(i32* %19, i32* %1, i32* %16, i32* %13, i32* %5)
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %45
36: ; preds = %33
%37 = tail call i32 @BN_mod_mul(i32* %16, i32* %7, i32* %2, i32* %13, i32* %5)
%38 = icmp eq i32 %37, 1
br i1 %38, label %39, label %45
39: ; preds = %36
%40 = tail call i32 @BN_mod_mul(i32* %22, i32* %3, i32* %16, i32* %13, i32* %5)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = tail call i32 @BN_mod_add(i32* %0, i32* %19, i32* %22, i32* %13, i32* %5)
%44 = icmp eq i32 %43, 1
br i1 %44, label %56, label %45
45: ; preds = %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
%46 = phi i32 [ 164, %6 ], [ 165, %9 ], [ 166, %12 ], [ 167, %15 ], [ 168, %18 ], [ 169, %21 ], [ 171, %24 ], [ 173, %27 ], [ 175, %30 ], [ 176, %33 ], [ 177, %36 ], [ 178, %39 ], [ 179, %42 ]
%47 = phi i32* [ null, %6 ], [ null, %9 ], [ %10, %12 ], [ %10, %15 ], [ %10, %18 ], [ %10, %21 ], [ %10, %24 ], [ %10, %27 ], [ %10, %30 ], [ %10, %33 ], [ %10, %36 ], [ %10, %39 ], [ %10, %42 ]
%48 = phi i32* [ null, %6 ], [ null, %9 ], [ null, %12 ], [ %13, %15 ], [ %13, %18 ], [ %13, %21 ], [ %13, %24 ], [ %13, %27 ], [ %13, %30 ], [ %13, %33 ], [ %13, %36 ], [ %13, %39 ], [ %13, %42 ]
%49 = phi i32* [ null, %6 ], [ null, %9 ], [ null, %12 ], [ null, %15 ], [ %16, %18 ], [ %16, %21 ], [ %16, %24 ], [ %16, %27 ], [ %16, %30 ], [ %16, %33 ], [ %16, %36 ], [ %16, %39 ], [ %16, %42 ]
%50 = phi i32* [ null, %6 ], [ null, %9 ], [ null, %12 ], [ null, %15 ], [ null, %18 ], [ %19, %21 ], [ %19, %24 ], [ %19, %27 ], [ %19, %30 ], [ %19, %33 ], [ %19, %36 ], [ %19, %39 ], [ %19, %42 ]
%51 = phi i32* [ null, %6 ], [ null, %9 ], [ null, %12 ], [ null, %15 ], [ null, %18 ], [ null, %21 ], [ %22, %24 ], [ %22, %27 ], [ %22, %30 ], [ %22, %33 ], [ %22, %36 ], [ %22, %39 ], [ %22, %42 ]
%52 = load i32, i32* @stderr
%53 = tail call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%54 = load i32, i32* @stderr
%55 = tail call i32 @fflush(i32 %54)
br label %56
56: ; preds = %45, %42
%57 = phi i32 [ 1, %42 ], [ 0, %45 ]
%58 = phi i32* [ %10, %42 ], [ %47, %45 ]
%59 = phi i32* [ %13, %42 ], [ %48, %45 ]
%60 = phi i32* [ %16, %42 ], [ %49, %45 ]
%61 = phi i32* [ %19, %42 ], [ %50, %45 ]
%62 = phi i32* [ %22, %42 ], [ %51, %45 ]
%63 = tail call i32 @BN_free(i32* %7)
%64 = tail call i32 @BN_free(i32* %58)
%65 = tail call i32 @BN_free(i32* %59)
%66 = tail call i32 @BN_free(i32* %60)
%67 = tail call i32 @BN_free(i32* %61)
%68 = tail call i32 @BN_free(i32* %62)
ret i32 %57
}