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

/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  void generateAnswers(FILE * inputFile, unsigned int **answers);
  char *path = (char *)calloc(512, sizeof(char));
  int x = 0;
  unsigned int *answers[15];
  for (; x < 15; x++)
    answers[x] = (unsigned int *)calloc(99, sizeof(int));
  printf("Enter file path:: ");
  FILE *inputFile = fopen("input.txt", "r");
  if (!inputFile) {
    perror("The following error occured:: ");
    goto finalLine;
  }
  generateAnswers(inputFile, answers);
  printf("Base 2:: %s\nBase 3:: %s\n Base 4:: %s\nBase 5:: %s\n", answers[0],
         answers[1], answers[2], answers[3]);
  printf("Base 6:: %s\nBase 7:: %s\n Base 8:: %s\nBase 9:: %s\n", answers[4],
         answers[5], answers[6], answers[7]);
  printf("Base 10:: %s\nBase 11:: %s\n Base 12:: %s\nBase 13:: %s\n",
         answers[8], answers[9], answers[10], answers[11]);
  printf("Base 14:: %s\nBase 15:: %s\n Base 16:: %s\n", answers[12],
         answers[13], answers[14]);
finalLine:
  printf("DONE");
  scanf("%s", &x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    11c2 <main+0x62>
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
mov    %rcx,-0x90(%rbp,%rax,8)
ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118c <main+0x2c>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3c(%rip),%rdi
lea    0xe3f(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x98(%rbp)
jne    1209 <main+0xa9>
lea    0xe20(%rip),%rdi
call   1080 <perror@plt>
jmp    1296 <main+0x136>
mov    -0x98(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <generateAnswers@plt>
mov    -0x90(%rbp),%rsi
mov    -0x88(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    -0x78(%rbp),%r8
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x60(%rbp),%rcx
mov    -0x58(%rbp),%r8
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r8
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5b(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
mov    $0x200,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x18(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x28(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x30(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x38(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x40(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x48(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x50(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x58(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x60(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x68(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x70(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x78(%rsp)
mov    $0x63,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,0x80(%rsp)
movl   $0xf,0xc(%rsp)
lea    0xd4c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd51(%rip),%rdi
lea    0xd54(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     1393 <main+0x233>
lea    0x10(%rsp),%rsi
mov    %rax,%rdi
call   1050 <generateAnswers@plt>
mov    0x10(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    0x28(%rsp),%r8
lea    0xd3f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rcx
mov    0x48(%rsp),%r8
lea    0xd4f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x50(%rsp),%rsi
mov    0x58(%rsp),%rdx
mov    0x60(%rsp),%rcx
mov    0x68(%rsp),%r8
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x70(%rsp),%rsi
mov    0x78(%rsp),%rdx
mov    0x80(%rsp),%rcx
lea    0xd75(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd90(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd87(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret
lea    0xc85(%rip),%rdi
call   1080 <perror@plt>
jmp    136a <main+0x20a>

LLVM IR (-O0):
@.str = [19 x i8] c"Enter file path:: \00"
@.str.1 = [10 x i8] c"input.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [31 x i8] c"The following error occured:: \00"
@.str.4 = [50 x i8] c"Base 2:: %s\0ABase 3:: %s\0A Base 4:: %s\0ABase 5:: %s\0A\00"
@.str.5 = [50 x i8] c"Base 6:: %s\0ABase 7:: %s\0A Base 8:: %s\0ABase 9:: %s\0A\00"
@.str.6 = [54 x i8] c"Base 10:: %s\0ABase 11:: %s\0A Base 12:: %s\0ABase 13:: %s\0A\00"
@.str.7 = [41 x i8] c"Base 14:: %s\0ABase 15:: %s\0A Base 16:: %s\0A\00"
@.str.8 = [5 x i8] c"DONE\00"
@.str.9 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [15 x i32*]
%5 = alloca i32*
store i32 0, i32* %1
%6 = call i64 @calloc(i32 512, i32 1)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %2
store i32 0, i32* %3
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 15
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = call i64 @calloc(i32 99, i32 4)
%13 = inttoptr i64 %12 to i32*
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 %15
store i32* %13, i32** %16
br label %17
17: ; preds = %11
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %8
20: ; preds = %8
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%22 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %22, i32** %5
%23 = load i32*, i32** %5
%24 = icmp ne i32* %23, null
br i1 %24, label %27, label %25
25: ; preds = %20
%26 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %64
27: ; preds = %20
%28 = load i32*, i32** %5
%29 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 0
%30 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 0
%31 = load i32*, i32** %30
%32 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 1
%33 = load i32*, i32** %32
%34 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 2
%35 = load i32*, i32** %34
%36 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 3
%37 = load i32*, i32** %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32* %31, i32* %33, i32* %35, i32* %37)
%39 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 4
%40 = load i32*, i32** %39
%41 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 5
%42 = load i32*, i32** %41
%43 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 6
%44 = load i32*, i32** %43
%45 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 7
%46 = load i32*, i32** %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32* %40, i32* %42, i32* %44, i32* %46)
%48 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 8
%49 = load i32*, i32** %48
%50 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 9
%51 = load i32*, i32** %50
%52 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 10
%53 = load i32*, i32** %52
%54 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 11
%55 = load i32*, i32** %54
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0), i32* %49, i32* %51, i32* %53, i32* %55)
%57 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 12
%58 = load i32*, i32** %57
%59 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 13
%60 = load i32*, i32** %59
%61 = getelementptr inbounds [15 x i32*], [15 x i32*]* %4, i64 0, i64 14
%62 = load i32*, i32** %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32* %58, i32* %60, i32* %62)
br label %64
64: ; preds = %27, %25
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%66 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %3)
%67 = load i32, i32* %1
ret i32 %67
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter file path:: \00"
@.str.1 = [10 x i8] c"input.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [31 x i8] c"The following error occured:: \00"
@.str.4 = [50 x i8] c"Base 2:: %s\0ABase 3:: %s\0A Base 4:: %s\0ABase 5:: %s\0A\00"
@.str.5 = [50 x i8] c"Base 6:: %s\0ABase 7:: %s\0A Base 8:: %s\0ABase 9:: %s\0A\00"
@.str.6 = [54 x i8] c"Base 10:: %s\0ABase 11:: %s\0A Base 12:: %s\0ABase 13:: %s\0A\00"
@.str.7 = [41 x i8] c"Base 14:: %s\0ABase 15:: %s\0A Base 16:: %s\0A\00"
@.str.8 = [5 x i8] c"DONE\00"
@.str.9 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i32*]
%3 = tail call i64 @calloc(i32 512, i32 1)
%4 = bitcast i32* %1 to i8*
%5 = bitcast [15 x i32*]* %2 to i8*
%6 = tail call i64 @calloc(i32 99, i32 4)
%7 = inttoptr i64 %6 to i32*
%8 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 0
store i32* %7, i32** %8
%9 = tail call i64 @calloc(i32 99, i32 4)
%10 = inttoptr i64 %9 to i32*
%11 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 1
store i32* %10, i32** %11
%12 = tail call i64 @calloc(i32 99, i32 4)
%13 = inttoptr i64 %12 to i32*
%14 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 2
store i32* %13, i32** %14
%15 = tail call i64 @calloc(i32 99, i32 4)
%16 = inttoptr i64 %15 to i32*
%17 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 3
store i32* %16, i32** %17
%18 = tail call i64 @calloc(i32 99, i32 4)
%19 = inttoptr i64 %18 to i32*
%20 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 4
store i32* %19, i32** %20
%21 = tail call i64 @calloc(i32 99, i32 4)
%22 = inttoptr i64 %21 to i32*
%23 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 5
store i32* %22, i32** %23
%24 = tail call i64 @calloc(i32 99, i32 4)
%25 = inttoptr i64 %24 to i32*
%26 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 6
store i32* %25, i32** %26
%27 = tail call i64 @calloc(i32 99, i32 4)
%28 = inttoptr i64 %27 to i32*
%29 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 7
store i32* %28, i32** %29
%30 = tail call i64 @calloc(i32 99, i32 4)
%31 = inttoptr i64 %30 to i32*
%32 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 8
store i32* %31, i32** %32
%33 = tail call i64 @calloc(i32 99, i32 4)
%34 = inttoptr i64 %33 to i32*
%35 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 9
store i32* %34, i32** %35
%36 = tail call i64 @calloc(i32 99, i32 4)
%37 = inttoptr i64 %36 to i32*
%38 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 10
store i32* %37, i32** %38
%39 = tail call i64 @calloc(i32 99, i32 4)
%40 = inttoptr i64 %39 to i32*
%41 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 11
store i32* %40, i32** %41
%42 = tail call i64 @calloc(i32 99, i32 4)
%43 = inttoptr i64 %42 to i32*
%44 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 12
store i32* %43, i32** %44
%45 = tail call i64 @calloc(i32 99, i32 4)
%46 = inttoptr i64 %45 to i32*
%47 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 13
store i32* %46, i32** %47
%48 = tail call i64 @calloc(i32 99, i32 4)
%49 = inttoptr i64 %48 to i32*
%50 = getelementptr inbounds [15 x i32*], [15 x i32*]* %2, i64 0, i64 14
store i32* %49, i32** %50
store i32 15, i32* %1
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%52 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%53 = icmp eq i32* %52, null
br i1 %53, label %54, label %56
54: ; preds = %0
%55 = tail call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %76
56: ; preds = %0
%57 = load i32*, i32** %8
%58 = load i32*, i32** %11
%59 = load i32*, i32** %14
%60 = load i32*, i32** %17
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32* %57, i32* %58, i32* %59, i32* %60)
%62 = load i32*, i32** %20
%63 = load i32*, i32** %23
%64 = load i32*, i32** %26
%65 = load i32*, i32** %29
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32* %62, i32* %63, i32* %64, i32* %65)
%67 = load i32*, i32** %32
%68 = load i32*, i32** %35
%69 = load i32*, i32** %38
%70 = load i32*, i32** %41
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0), i32* %67, i32* %68, i32* %69, i32* %70)
%72 = load i32*, i32** %44
%73 = load i32*, i32** %47
%74 = load i32*, i32** %50
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32* %72, i32* %73, i32* %74)
br label %76
76: ; preds = %56, %54
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%78 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %1)
ret i32 0
}