#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*/ mpz_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ crt(int /*<<< orphan*/, unsigned long *, unsigned long *,
                       unsigned long);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fread(unsigned long *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(unsigned long *);
int fscanf(int /*<<< orphan*/, char *, unsigned long *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
void *malloc(int);
int /*<<< orphan*/ mpz_init(int /*<<< orphan*/);
scalar_t__ mpz_mod_ui(int /*<<< orphan*/, int /*<<< orphan*/, unsigned long);
int /*<<< orphan*/ mpz_out_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
unsigned long strtoul(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  unsigned long int ell, i, n, num, thisprime, numprimes;
  unsigned long int three_to_ell, three_to_ellMinusOne, nbound;
  unsigned long int *a, *m;
  mpz_t answer;
  int items;
  char thisfilename[128];
  FILE **datafiles;
  if (argc < 2) {
    fprintf(stderr, "\nUsage:\n\t%s ell\n", argv[0]);
    fprintf(stderr,
            "Makes sure that the case l=ell is true for Theorem 4 in\n`Parity "
            "of 5-regular and 13-regular Partition Functions'");
    return 1;
  }
  ell = strtoul(argv[1], NULL, 10);
  m = malloc(sizeof(unsigned long) * 2048);
  a = malloc(sizeof(unsigned long) * 2048);
  datafiles = malloc(sizeof(FILE *) * 2048);
  mpz_init(answer);
  three_to_ell = 1;
  three_to_ellMinusOne = 1;
  for (i = 0; i < ell; ++i)
    three_to_ell *= 3;
  for (i = 0; i < ell - 1; ++i)
    three_to_ellMinusOne *= 3;
  nbound = 7 * three_to_ellMinusOne + 3;
  i = 0;
  while (1) {
    items = fscanf(stdin, "%lu %s\n", &thisprime, thisfilename);
    if (items == 2) {
      datafiles[i] = fopen(thisfilename, "r");
      m[i] = thisprime;
      i++;
    } else
      break;
  }
  numprimes = i;
  for (n = 1; n <= nbound; ++n) {
    num = three_to_ell * n + (5 * three_to_ellMinusOne - 1) / 2;
    for (i = 0; i < numprimes; ++i) {
      fseek(datafiles[i], 4L * num, SEEK_SET);
      fread(&a[i], 4, 1, datafiles[i]);
    }
    crt(answer, a, m, numprimes);
    if (mpz_mod_ui(answer, answer, (unsigned long)3) != 0) {
      printf("Failed case: n=%lu num=%lu b_13(num)=", n, num);
      mpz_out_str(stdout, 10, answer);
      printf("\n");
      fflush(stdout);
      exit(1);
    }
  }
  printf("Yay! Case l=%lu is true!\n", ell);
  for (i = 0; i < numprimes; ++i)
    fclose(datafiles[i]);
  free(a);
  free(m);
  free(datafiles);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1264 <main+0x64>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
lea    0xdc0(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1578 <main+0x378>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1110 <strtoul@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4000,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    $0x4000,%edi
call   10d0 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x4000,%edi
call   10d0 <malloc@plt>
mov    %rax,-0xf8(%rbp)
mov    -0x6c(%rbp),%edi
call   10a0 <mpz_init@plt>
movq   $0x1,-0x48(%rbp)
movq   $0x1,-0x50(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    12f3 <main+0xf3>
imul   $0x3,-0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    12cb <main+0xcb>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    132a <main+0x12a>
imul   $0x3,-0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    12fb <main+0xfb>
imul   $0x7,-0x50(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
lea    -0xf0(%rbp),%rcx
lea    0xd2c(%rip),%rsi
lea    -0x38(%rbp),%rdx
call   1070 <fscanf@plt>
mov    %eax,-0x70(%rbp)
cmpl   $0x2,-0x70(%rbp)
jne    13b2 <main+0x1b2>
lea    -0xf0(%rbp),%rdi
lea    0xd10(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,%rdx
mov    -0xf8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x38(%rbp),%rdx
mov    -0x68(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    13b7 <main+0x1b7>
jmp    13bc <main+0x1bc>
jmp    133f <main+0x13f>
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x58(%rbp),%rax
ja     1506 <main+0x306>
mov    -0x48(%rbp),%rax
imul   -0x28(%rbp),%rax
imul   $0x5,-0x50(%rbp),%rcx
sub    $0x1,%rcx
shr    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    1470 <main+0x270>
mov    -0xf8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x30(%rbp),%rsi
shl    $0x2,%rsi
mov    0x2ba5(%rip),%rax
mov    (%rax),%edx
call   10f0 <fseek@plt>
mov    -0x60(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xf8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    13ff <main+0x1ff>
mov    -0x6c(%rbp),%edi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   1090 <crt@plt>
mov    -0x6c(%rbp),%edi
mov    -0x6c(%rbp),%esi
mov    $0x3,%edx
call   1080 <mpz_mod_ui@plt>
cmp    $0x0,%rax
je     14f0 <main+0x2f0>
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    0xbdf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2b0d(%rip),%rax
mov    (%rax),%edi
mov    -0x6c(%rbp),%edx
mov    $0xa,%esi
call   10c0 <mpz_out_str@plt>
lea    0xbf9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2ae9(%rip),%rax
mov    (%rax),%edi
call   10e0 <fflush@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
jmp    14f5 <main+0x2f5>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    13cc <main+0x1cc>
mov    -0x18(%rbp),%rsi
lea    0xba1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    1553 <main+0x353>
mov    -0xf8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1520 <main+0x320>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf8(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
cmp    $0x1,%edi
jg     125b <main+0x4b>
mov    0x2dab(%rip),%rbx
mov    (%rbx),%edi
mov    (%rsi),%rdx
lea    0xdc7(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdc8(%rip),%rsi
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0x1,%r14d
jmp    155e <main+0x34e>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1120 <strtoul@plt>
mov    %rax,%rbx
mov    %rax,%r12
mov    $0x4000,%edi
call   10e0 <malloc@plt>
mov    %rax,%r14
mov    $0x4000,%edi
call   10e0 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x4000,%edi
call   10e0 <malloc@plt>
mov    %rax,%r15
call   10b0 <mpz_init@plt>
mov    $0x1,%ebp
test   %rbx,%rbx
je     12c0 <main+0xb0>
lea    -0x1(%rbx),%rcx
mov    %r12d,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    12ce <main+0xbe>
mov    $0x1,%edx
jmp    12ed <main+0xdd>
mov    $0xffffffffffffffff,%rbx
mov    $0x1,%edx
jmp    1310 <main+0x100>
mov    %rbx,%rcx
and    $0xfffffffffffffff8,%rcx
mov    $0x1,%edx
nopw   0x0(%rax,%rax,1)
imul   $0x19a1,%rdx,%rdx
add    $0xfffffffffffffff8,%rcx
jne    12e0 <main+0xd0>
test   %rax,%rax
je     130a <main+0xfa>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rdx,%rdx,2),%rdx
add    $0xffffffffffffffff,%rax
jne    1300 <main+0xf0>
add    $0xffffffffffffffff,%rbx
je     135d <main+0x14d>
lea    -0x1(%rbx),%rcx
mov    %ebx,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jb     133d <main+0x12d>
and    $0xfffffffffffffff8,%rbx
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
imul   $0x19a1,%rbp,%rbp
add    $0xfffffffffffffff8,%rbx
jne    1330 <main+0x120>
test   %rax,%rax
mov    %rdx,0x8(%rsp)
je     1367 <main+0x157>
nopw   0x0(%rax,%rax,1)
lea    0x0(%rbp,%rbp,2),%rbp
add    $0xffffffffffffffff,%rax
jne    1350 <main+0x140>
jmp    1367 <main+0x157>
mov    %rdx,0x8(%rsp)
mov    $0x1,%ebp
mov    %r12,0x48(%rsp)
mov    %r15,0x10(%rsp)
mov    %r14,0x18(%rsp)
lea    0x0(,%rbp,8),%rax
sub    %rbp,%rax
add    $0x3,%rax
mov    %rax,0x28(%rsp)
mov    0x2c57(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
lea    0x40(%rsp),%rdx
lea    0x60(%rsp),%rcx
call   1080 <fscanf@plt>
xor    %ebx,%ebx
cmp    $0x2,%eax
jne    1410 <main+0x200>
lea    0x60(%rsp),%r13
lea    0x40(%rsp),%r14
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
lea    0xcb0(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,(%r15,%rbx,8)
mov    0x40(%rsp),%rax
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
lea    0xc82(%rip),%rsi
mov    %r14,%rdx
mov    %r13,%rcx
call   1080 <fscanf@plt>
cmp    $0x2,%eax
je     13d0 <main+0x1c0>
cmpq   $0x0,0x28(%rsp)
mov    0x8(%rsp),%rax
mov    %rbx,%r12
je     1503 <main+0x2f3>
lea    -0x1(,%rbp,4),%rcx
ff
add    %rbp,%rcx
shr    %rcx
mov    %rcx,0x50(%rsp)
mov    $0x1,%ecx
mov    0x2b8d(%rip),%rbx
mov    0x10(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    %rcx,0x38(%rsp)
imul   %rax,%rcx
add    0x50(%rsp),%rcx
mov    %rcx,0x30(%rsp)
test   %r12,%r12
je     14c5 <main+0x2b5>
mov    0x30(%rsp),%rax
lea    0x0(,%rax,4),%rax
mov    %rax,0x58(%rsp)
mov    0x20(%rsp),%rbp
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%r14,8),%r13
mov    (%rbx),%edx
mov    %r13,%rdi
mov    0x58(%rsp),%rsi
call   1100 <fseek@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1050 <fread@plt>
add    $0x1,%r14
add    $0x8,%rbp
cmp    %r14,%r12
jne    1490 <main+0x280>
mov    0x20(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    %r12,%rcx
call   10a0 <crt@plt>
mov    $0x3,%edx
call   1090 <mpz_mod_ui@plt>
test   %rax,%rax
jne    1573 <main+0x363>
mov    0x38(%rsp),%rcx
add    $0x1,%rcx
cmp    0x28(%rsp),%rcx
mov    0x8(%rsp),%rax
jbe    1450 <main+0x240>
lea    0xba8(%rip),%rdi
xor    %r14d,%r14d
mov    0x48(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
test   %r12,%r12
mov    0x10(%rsp),%r15
je     1542 <main+0x332>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbp,8),%rdi
call   1060 <fclose@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1530 <main+0x320>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r14d,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb12(%rip),%rdi
mov    0x38(%rsp),%rsi
mov    0x30(%rsp),%rdx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2a36(%rip),%rbx
mov    (%rbx),%edi
mov    $0xa,%esi
call   10d0 <mpz_out_str@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    (%rbx),%edi
call   10f0 <fflush@plt>
mov    $0x1,%edi
call   1130 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"\0AUsage:\0A\09%s ell\0A\00"
@.str.1 = [113 x i8] c"Makes sure that the case l=ell is true for Theorem 4 in\0A`Parity of 5-regular and 13-regular Partition Functions'\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"%lu %s\0A\00"
@.str.3 = [2 x i8] c"r\00"
@SEEK_SET = global i32 0
@.str.4 = [38 x i8] c"Failed case: n=%lu num=%lu b_13(num)=\00"
@stdout = global i32 0
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [26 x i8] c"Yay! Case l=%lu is true!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64*
%16 = alloca i64*
%17 = alloca i32
%18 = alloca i32
%19 = alloca [128 x i8]
%20 = alloca i32**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 2
br i1 %22, label %23, label %31
23: ; preds = %2
%24 = load i32, i32* @stderr
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @stderr
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %178
31: ; preds = %2
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i64 @strtoul(i8* %34, i32* null, i32 10)
store i64 %35, i64* %6
%36 = call i8* @malloc(i32 16384)
%37 = bitcast i8* %36 to i64*
store i64* %37, i64** %16
%38 = call i8* @malloc(i32 16384)
%39 = bitcast i8* %38 to i64*
store i64* %39, i64** %15
%40 = call i8* @malloc(i32 16384)
%41 = bitcast i8* %40 to i32**
store i32** %41, i32*** %20
%42 = load i32, i32* %17
%43 = call i32 @mpz_init(i32 %42)
store i64 1, i64* %12
store i64 1, i64* %13
store i64 0, i64* %7
br label %44
44: ; preds = %51, %31
%45 = load i64, i64* %7
%46 = load i64, i64* %6
%47 = icmp ult i64 %45, %46
br i1 %47, label %48, label %54
48: ; preds = %44
%49 = load i64, i64* %12
%50 = mul i64 %49, 3
store i64 %50, i64* %12
br label %51
51: ; preds = %48
%52 = load i64, i64* %7
%53 = add i64 %52, 1
store i64 %53, i64* %7
br label %44
54: ; preds = %44
store i64 0, i64* %7
br label %55
55: ; preds = %63, %54
%56 = load i64, i64* %7
%57 = load i64, i64* %6
%58 = sub i64 %57, 1
%59 = icmp ult i64 %56, %58
br i1 %59, label %60, label %66
60: ; preds = %55
%61 = load i64, i64* %13
%62 = mul i64 %61, 3
store i64 %62, i64* %13
br label %63
63: ; preds = %60
%64 = load i64, i64* %7
%65 = add i64 %64, 1
store i64 %65, i64* %7
br label %55
66: ; preds = %55
%67 = load i64, i64* %13
%68 = mul i64 7, %67
%69 = add i64 %68, 3
store i64 %69, i64* %14
store i64 0, i64* %7
br label %70
70: ; preds = %66, %89
%71 = load i32, i32* @stdin
%72 = getelementptr inbounds [128 x i8], [128 x i8]* %19, i64 0, i64 0
%73 = call i32 @fscanf(i32 %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i64* %10, i8* %72)
store i32 %73, i32* %18
%74 = load i32, i32* %18
%75 = icmp eq i32 %74, 2
br i1 %75, label %76, label %88
76: ; preds = %70
%77 = getelementptr inbounds [128 x i8], [128 x i8]* %19, i64 0, i64 0
%78 = call i32* @fopen(i8* %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%79 = load i32**, i32*** %20
%80 = load i64, i64* %7
%81 = getelementptr inbounds i32*, i32** %79, i64 %80
store i32* %78, i32** %81
%82 = load i64, i64* %10
%83 = load i64*, i64** %16
%84 = load i64, i64* %7
%85 = getelementptr inbounds i64, i64* %83, i64 %84
store i64 %82, i64* %85
%86 = load i64, i64* %7
%87 = add i64 %86, 1
store i64 %87, i64* %7
br label %89
88: ; preds = %70
br label %90
89: ; preds = %76
br label %70
90: ; preds = %88
%91 = load i64, i64* %7
store i64 %91, i64* %11
store i64 1, i64* %8
br label %92
92: ; preds = %151, %90
%93 = load i64, i64* %8
%94 = load i64, i64* %14
%95 = icmp ule i64 %93, %94
br i1 %95, label %96, label %154
96: ; preds = %92
%97 = load i64, i64* %12
%98 = load i64, i64* %8
%99 = mul i64 %97, %98
%100 = load i64, i64* %13
%101 = mul i64 5, %100
%102 = sub i64 %101, 1
%103 = udiv i64 %102, 2
%104 = add i64 %99, %103
store i64 %104, i64* %9
store i64 0, i64* %7
br label %105
105: ; preds = %126, %96
%106 = load i64, i64* %7
%107 = load i64, i64* %11
%108 = icmp ult i64 %106, %107
br i1 %108, label %109, label %129
109: ; preds = %105
%110 = load i32**, i32*** %20
%111 = load i64, i64* %7
%112 = getelementptr inbounds i32*, i32** %110, i64 %111
%113 = load i32*, i32** %112
%114 = load i64, i64* %9
%115 = mul i64 4, %114
%116 = load i32, i32* @SEEK_SET
%117 = call i32 @fseek(i32* %113, i64 %115, i32 %116)
%118 = load i64*, i64** %15
%119 = load i64, i64* %7
%120 = getelementptr inbounds i64, i64* %118, i64 %119
%121 = load i32**, i32*** %20
%122 = load i64, i64* %7
%123 = getelementptr inbounds i32*, i32** %121, i64 %122
%124 = load i32*, i32** %123
%125 = call i32 @fread(i64* %120, i32 4, i32 1, i32* %124)
br label %126
126: ; preds = %109
%127 = load i64, i64* %7
%128 = add i64 %127, 1
store i64 %128, i64* %7
br label %105
129: ; preds = %105
%130 = load i32, i32* %17
%131 = load i64*, i64** %15
%132 = load i64*, i64** %16
%133 = load i64, i64* %11
%134 = call i32 @crt(i32 %130, i64* %131, i64* %132, i64 %133)
%135 = load i32, i32* %17
%136 = load i32, i32* %17
%137 = call i64 @mpz_mod_ui(i32 %135, i32 %136, i64 3)
%138 = icmp ne i64 %137, 0
br i1 %138, label %139, label %150
139: ; preds = %129
%140 = load i64, i64* %8
%141 = load i64, i64* %9
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i64 %140, i64 %141)
%143 = load i32, i32* @stdout
%144 = load i32, i32* %17
%145 = call i32 @mpz_out_str(i32 %143, i32 10, i32 %144)
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%147 = load i32, i32* @stdout
%148 = call i32 @fflush(i32 %147)
%149 = call i32 @exit(i32 1)
unreachable
150: ; preds = %129
br label %151
151: ; preds = %150
%152 = load i64, i64* %8
%153 = add i64 %152, 1
store i64 %153, i64* %8
br label %92
154: ; preds = %92
%155 = load i64, i64* %6
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i64 %155)
store i64 0, i64* %7
br label %157
157: ; preds = %167, %154
%158 = load i64, i64* %7
%159 = load i64, i64* %11
%160 = icmp ult i64 %158, %159
br i1 %160, label %161, label %170
161: ; preds = %157
%162 = load i32**, i32*** %20
%163 = load i64, i64* %7
%164 = getelementptr inbounds i32*, i32** %162, i64 %163
%165 = load i32*, i32** %164
%166 = call i32 @fclose(i32* %165)
br label %167
167: ; preds = %161
%168 = load i64, i64* %7
%169 = add i64 %168, 1
store i64 %169, i64* %7
br label %157
170: ; preds = %157
%171 = load i64*, i64** %15
%172 = call i32 @free(i64* %171)
%173 = load i64*, i64** %16
%174 = call i32 @free(i64* %173)
%175 = load i32**, i32*** %20
%176 = bitcast i32** %175 to i64*
%177 = call i32 @free(i64* %176)
store i32 0, i32* %3
br label %178
178: ; preds = %170, %23
%179 = load i32, i32* %3
ret i32 %179
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"\0AUsage:\0A\09%s ell\0A\00"
@.str.1 = [113 x i8] c"Makes sure that the case l=ell is true for Theorem 4 in\0A`Parity of 5-regular and 13-regular Partition Functions'\00"
@stdin = global i32 0
@.str.2 = [8 x i8] c"%lu %s\0A\00"
@.str.3 = [2 x i8] c"r\00"
@SEEK_SET = global i32 0
@.str.4 = [38 x i8] c"Failed case: n=%lu num=%lu b_13(num)=\00"
@stdout = global i32 0
@.str.6 = [26 x i8] c"Yay! Case l=%lu is true!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca [128 x i8]
%5 = bitcast i64* %3 to i8*
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = icmp slt i32 %0, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.1, i64 0, i64 0))
br label %148
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i64 @strtoul(i8* nocapture %16, i32* null, i32 10)
%18 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
%19 = bitcast i8* %18 to i64*
%20 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
%21 = bitcast i8* %20 to i64*
%22 = tail call dereferenceable_or_null(16384) i8* @malloc(i32 16384)
%23 = bitcast i8* %22 to i32**
%24 = tail call i32 @mpz_init(i32 undef)
%25 = icmp eq i64 %17, 0
br i1 %25, label %46, label %26
26: ; preds = %14
%27 = add i64 %17, -1
%28 = and i64 %17, 7
%29 = icmp ult i64 %27, 7
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = and i64 %17, -8
br label %54
32: ; preds = %54, %26
%33 = phi i64 [ undef, %26 ], [ %57, %54 ]
%34 = phi i64 [ 1, %26 ], [ %57, %54 ]
%35 = icmp eq i64 %28, 0
br i1 %35, label %42, label %36
36: ; preds = %32, %36
%37 = phi i64 [ %39, %36 ], [ %34, %32 ]
%38 = phi i64 [ %40, %36 ], [ 0, %32 ]
%39 = mul i64 %37, 3
%40 = add i64 %38, 1
%41 = icmp eq i64 %40, %28
br i1 %41, label %42, label %36
42: ; preds = %36, %32
%43 = phi i64 [ %33, %32 ], [ %39, %36 ]
%44 = add i64 %17, -1
%45 = icmp eq i64 %44, 0
br i1 %45, label %76, label %46
46: ; preds = %14, %42
%47 = phi i64 [ %44, %42 ], [ -1, %14 ]
%48 = phi i64 [ %43, %42 ], [ 1, %14 ]
%49 = add i64 %47, -1
%50 = and i64 %47, 7
%51 = icmp ult i64 %49, 7
br i1 %51, label %66, label %52
52: ; preds = %46
%53 = and i64 %47, -8
br label %60
54: ; preds = %54, %30
%55 = phi i64 [ 1, %30 ], [ %57, %54 ]
%56 = phi i64 [ 0, %30 ], [ %58, %54 ]
%57 = mul i64 %55, 6561
%58 = add i64 %56, 8
%59 = icmp eq i64 %58, %31
br i1 %59, label %32, label %54
60: ; preds = %60, %52
%61 = phi i64 [ 1, %52 ], [ %63, %60 ]
%62 = phi i64 [ 0, %52 ], [ %64, %60 ]
%63 = mul i64 %61, 6561
%64 = add i64 %62, 8
%65 = icmp eq i64 %64, %53
br i1 %65, label %66, label %60
66: ; preds = %60, %46
%67 = phi i64 [ undef, %46 ], [ %63, %60 ]
%68 = phi i64 [ 1, %46 ], [ %63, %60 ]
%69 = icmp eq i64 %50, 0
br i1 %69, label %76, label %70
70: ; preds = %66, %70
%71 = phi i64 [ %73, %70 ], [ %68, %66 ]
%72 = phi i64 [ %74, %70 ], [ 0, %66 ]
%73 = mul i64 %71, 3
%74 = add i64 %72, 1
%75 = icmp eq i64 %74, %50
br i1 %75, label %76, label %70
76: ; preds = %66, %70, %42
%77 = phi i64 [ %43, %42 ], [ %48, %70 ], [ %48, %66 ]
%78 = phi i64 [ 1, %42 ], [ %67, %66 ], [ %73, %70 ]
%79 = mul i64 %78, 7
%80 = add i64 %79, 3
%81 = load i32, i32* @stdin
%82 = call i32 @fscanf(i32 %81, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i64* %3, i8* %6)
%83 = icmp eq i32 %82, 2
br i1 %83, label %92, label %84
84: ; preds = %92, %76
%85 = phi i64 [ 0, %76 ], [ %98, %92 ]
%86 = icmp eq i64 %80, 0
br i1 %86, label %133, label %87
87: ; preds = %84
%88 = mul i64 %78, 5
%89 = add i64 %88, -1
%90 = lshr i64 %89, 1
%91 = icmp eq i64 %85, 0
br label %102
92: ; preds = %76, %92
%93 = phi i64 [ %98, %92 ], [ 0, %76 ]
%94 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%95 = getelementptr inbounds i32*, i32** %23, i64 %93
store i32* %94, i32** %95
%96 = load i64, i64* %3
%97 = getelementptr inbounds i64, i64* %19, i64 %93
store i64 %96, i64* %97
%98 = add i64 %93, 1
%99 = load i32, i32* @stdin
%100 = call i32 @fscanf(i32 %99, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i64* %3, i8* %6)
%101 = icmp eq i32 %100, 2
br i1 %101, label %92, label %84
102: ; preds = %87, %130
%103 = phi i64 [ 1, %87 ], [ %131, %130 ]
%104 = mul i64 %103, %77
%105 = add i64 %104, %90
br i1 %91, label %118, label %106
106: ; preds = %102
%107 = shl i64 %105, 2
br label %108
108: ; preds = %106, %108
%109 = phi i64 [ 0, %106 ], [ %116, %108 ]
%110 = getelementptr inbounds i32*, i32** %23, i64 %109
%111 = load i32*, i32** %110
%112 = load i32, i32* @SEEK_SET
%113 = call i32 @fseek(i32* %111, i64 %107, i32 %112)
%114 = getelementptr inbounds i64, i64* %21, i64 %109
%115 = call i32 @fread(i64* %114, i32 4, i32 1, i32* %111)
%116 = add nuw i64 %109, 1
%117 = icmp eq i64 %116, %85
br i1 %117, label %118, label %108
118: ; preds = %108, %102
%119 = call i32 @crt(i32 undef, i64* %21, i64* %19, i64 %85)
%120 = call i64 @mpz_mod_ui(i32 undef, i32 undef, i64 3)
%121 = icmp eq i64 %120, 0
br i1 %121, label %130, label %122
122: ; preds = %118
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i64 %103, i64 %105)
%124 = load i32, i32* @stdout
%125 = call i32 @mpz_out_str(i32 %124, i32 10, i32 undef)
%126 = call i32 @putchar(i32 10)
%127 = load i32, i32* @stdout
%128 = call i32 @fflush(i32 %127)
%129 = call i32 @exit(i32 1)
unreachable
130: ; preds = %118
%131 = add i64 %103, 1
%132 = icmp ugt i64 %131, %80
br i1 %132, label %133, label %102
133: ; preds = %130, %84
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i64 %17)
%135 = icmp eq i64 %85, 0
br i1 %135, label %143, label %136
136: ; preds = %133, %136
%137 = phi i64 [ %141, %136 ], [ 0, %133 ]
%138 = getelementptr inbounds i32*, i32** %23, i64 %137
%139 = load i32*, i32** %138
%140 = call i32 @fclose(i32* %139)
%141 = add nuw i64 %137, 1
%142 = icmp eq i64 %141, %85
br i1 %142, label %143, label %136
143: ; preds = %136, %133
%144 = call i32 @free(i64* %21)
%145 = call i32 @free(i64* %19)
%146 = bitcast i8* %22 to i64*
%147 = call i32 @free(i64* %146)
br label %148
148: ; preds = %143, %8
%149 = phi i32 [ 1, %8 ], [ 0, %143 ]
ret i32 %149
}