#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 */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int ilog2(int);
int ipow2(int);
int /*<<< orphan*/ printf(char *, char);
void write_cg_info(FILE *fp, int nprocs, char class) {
  int na, nonzer, niter;
  char *shift, *rcond = "1.0e-1";
  char *shiftS = "10.", *shiftW = "12.", *shiftA = "20.", *shiftB = "60.",
       *shiftC = "110.", *shiftD = "500.", *shiftE = "1.5e3";
  int num_proc_cols, num_proc_rows;
  if (class == 'S') {
    na = 1400;
    nonzer = 7;
    niter = 15;
    shift = shiftS;
  } else if (class == 'W') {
    na = 7000;
    nonzer = 8;
    niter = 15;
    shift = shiftW;
  } else if (class == 'A') {
    na = 14000;
    nonzer = 11;
    niter = 15;
    shift = shiftA;
  } else if (class == 'B') {
    na = 75000;
    nonzer = 13;
    niter = 75;
    shift = shiftB;
  } else if (class == 'C') {
    na = 150000;
    nonzer = 15;
    niter = 75;
    shift = shiftC;
  } else if (class == 'D') {
    na = 1500000;
    nonzer = 21;
    niter = 100;
    shift = shiftD;
  } else if (class == 'E') {
    na = 9000000;
    nonzer = 26;
    niter = 100;
    shift = shiftE;
  } else {
    printf("setparams: Internal error: invalid class type %c\n", class);
    exit(1);
  }
  fprintf(fp, "const int na = %d;\n", na);
  fprintf(fp, "const int nonzer = %d;\n", nonzer);
  fprintf(fp, "const int niter = %d;\n", niter);
  fprintf(fp, "const double shift = %s;\n", shift);
  fprintf(fp, "const double rcond = %s;\n", rcond);
  num_proc_cols = num_proc_rows = ilog2(nprocs) / 2;
  if (num_proc_cols + num_proc_rows != ilog2(nprocs))
    num_proc_cols += 1;
  num_proc_cols = ipow2(num_proc_cols);
  num_proc_rows = ipow2(num_proc_rows);
  fprintf(fp, "\n// number of nodes for which this version is compiled\n");
  fprintf(fp, "const int nnodes_compiled = %d;\n", nprocs);
  fprintf(fp, "const int num_proc_cols = %d;\n", num_proc_cols);
  fprintf(fp, "const int num_proc_rows = %d;\n", num_proc_rows);
}


x86 assembly (clang, -O0):
<write_cg_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
lea    0xe92(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe9b(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe83(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xe7c(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe75(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe6e(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe68(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xe62(%rip),%rax
mov    %rax,-0x68(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x53,%eax
jne    11ee <write_cg_info+0x9e>
movl   $0x578,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
movl   $0xf,-0x1c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1340 <write_cg_info+0x1f0>
movsbl -0xd(%rbp),%eax
cmp    $0x57,%eax
jne    121d <write_cg_info+0xcd>
movl   $0x1b58,-0x14(%rbp)
movl   $0x8,-0x18(%rbp)
movl   $0xf,-0x1c(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    133b <write_cg_info+0x1eb>
movsbl -0xd(%rbp),%eax
cmp    $0x41,%eax
jne    124c <write_cg_info+0xfc>
movl   $0x36b0,-0x14(%rbp)
movl   $0xb,-0x18(%rbp)
movl   $0xf,-0x1c(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1336 <write_cg_info+0x1e6>
movsbl -0xd(%rbp),%eax
cmp    $0x42,%eax
jne    127b <write_cg_info+0x12b>
movl   $0x124f8,-0x14(%rbp)
movl   $0xd,-0x18(%rbp)
movl   $0x4b,-0x1c(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1331 <write_cg_info+0x1e1>
movsbl -0xd(%rbp),%eax
cmp    $0x43,%eax
jne    12aa <write_cg_info+0x15a>
movl   $0x249f0,-0x14(%rbp)
movl   $0xf,-0x18(%rbp)
movl   $0x4b,-0x1c(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    132c <write_cg_info+0x1dc>
movsbl -0xd(%rbp),%eax
cmp    $0x44,%eax
jne    12d9 <write_cg_info+0x189>
movl   $0x16e360,-0x14(%rbp)
movl   $0x15,-0x18(%rbp)
movl   $0x64,-0x1c(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1327 <write_cg_info+0x1d7>
movsbl -0xd(%rbp),%eax
cmp    $0x45,%eax
jne    1308 <write_cg_info+0x1b8>
movl   $0x895440,-0x14(%rbp)
movl   $0x1a,-0x18(%rbp)
movl   $0x64,-0x1c(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1322 <write_cg_info+0x1d2>
lea    0xd14(%rip),%rdi
movsbl -0xd(%rbp),%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1327 <write_cg_info+0x1d7>
jmp    132c <write_cg_info+0x1dc>
jmp    1331 <write_cg_info+0x1e1>
jmp    1336 <write_cg_info+0x1e6>
jmp    133b <write_cg_info+0x1eb>
jmp    1340 <write_cg_info+0x1f0>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd07(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
lea    0xd06(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xd09(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xd0a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xd0e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1030 <ilog2@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x70(%rbp)
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
add    -0x70(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ilog2@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
cmp    %ecx,%eax
je     13e8 <write_cg_info+0x298>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%edi
call   1060 <ipow2@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x70(%rbp),%edi
call   1060 <ipow2@plt>
mov    %eax,-0x70(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xcc3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xce6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x6c(%rbp),%edx
lea    0xcf2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x70(%rbp),%edx
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_cg_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%eax
lea    -0x41(%rax),%ecx
cmp    $0x16,%cl
ja     1330 <write_cg_info+0x1d0>
mov    %esi,%r14d
mov    %rdi,%r13
mov    $0x578,%edx
mov    $0x7,%ebp
mov    $0xf,%r15d
lea    0xeda(%rip),%r12
movzbl %cl,%ecx
lea    0xe60(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
mov    $0x36b0,%edx
mov    $0xb,%ebp
lea    0xead(%rip),%r12
jmp    1231 <write_cg_info+0xd1>
mov    $0x124f8,%edx
mov    $0xd,%ebp
mov    $0x4b,%r15d
lea    0xe98(%rip),%r12
jmp    1231 <write_cg_info+0xd1>
mov    $0x249f0,%edx
mov    $0xf,%ebp
mov    $0x4b,%r15d
lea    0xe83(%rip),%r12
jmp    1231 <write_cg_info+0xd1>
mov    $0x16e360,%edx
mov    $0x15,%ebp
mov    $0x64,%r15d
lea    0xe6f(%rip),%r12
jmp    1231 <write_cg_info+0xd1>
mov    $0x895440,%edx
mov    $0x1a,%ebp
mov    $0x64,%r15d
lea    0xe5b(%rip),%r12
jmp    1231 <write_cg_info+0xd1>
mov    $0x1b58,%edx
mov    $0x8,%ebp
lea    0xe32(%rip),%r12
lea    0xe79(%rip),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe7c(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe81(%rip),%rsi
mov    %r13,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe84(%rip),%rsi
mov    %r13,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe8a(%rip),%rsi
lea    0xdd1(%rip),%rdx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r14d,%edi
call   1030 <ilog2@plt>
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
mov    %ebp,%ebx
sar    %ebx
and    $0xfffffffe,%ebp
mov    %r14d,%edi
call   1030 <ilog2@plt>
xor    %edi,%edi
cmp    %eax,%ebp
setne  %dil
add    %ebx,%edi
call   1060 <ipow2@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1060 <ipow2@plt>
mov    %eax,%ebp
lea    0xe53(%rip),%rdi
mov    $0x37,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1080 <fwrite@plt>
lea    0xe72(%rip),%rsi
mov    %r13,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe7f(%rip),%rsi
mov    %r13,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe8a(%rip),%rsi
mov    %r13,%rdi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fprintf@plt>
movsbl %al,%esi
lea    0xd45(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"1.0e-1\00"
@.str.1 = [4 x i8] c"10.\00"
@.str.2 = [4 x i8] c"12.\00"
@.str.3 = [4 x i8] c"20.\00"
@.str.4 = [4 x i8] c"60.\00"
@.str.5 = [5 x i8] c"110.\00"
@.str.6 = [5 x i8] c"500.\00"
@.str.7 = [6 x i8] c"1.5e3\00"
@.str.8 = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.9 = [20 x i8] c"const int na = %d;\0A\00"
@.str.10 = [24 x i8] c"const int nonzer = %d;\0A\00"
@.str.11 = [23 x i8] c"const int niter = %d;\0A\00"
@.str.12 = [26 x i8] c"const double shift = %s;\0A\00"
@.str.13 = [26 x i8] c"const double rcond = %s;\0A\00"
@.str.14 = [56 x i8] c"\0A// number of nodes for which this version is compiled\0A\00"
@.str.15 = [33 x i8] c"const int nnodes_compiled = %d;\0A\00"
@.str.16 = [31 x i8] c"const int num_proc_cols = %d;\0A\00"
@.str.17 = [31 x i8] c"const int num_proc_rows = %d;\0A\00"
define void @write_cg_info(i32* %0, i32 %1, i8 signext %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i32
%20 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %11
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %12
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %13
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %14
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %15
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %16
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %17
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %18
%21 = load i8, i8* %6
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 83
br i1 %23, label %24, label %26
24: ; preds = %3
store i32 1400, i32* %7
store i32 7, i32* %8
store i32 15, i32* %9
%25 = load i8*, i8** %12
store i8* %25, i8** %10
br label %72
26: ; preds = %3
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 87
br i1 %29, label %30, label %32
30: ; preds = %26
store i32 7000, i32* %7
store i32 8, i32* %8
store i32 15, i32* %9
%31 = load i8*, i8** %13
store i8* %31, i8** %10
br label %71
32: ; preds = %26
%33 = load i8, i8* %6
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 65
br i1 %35, label %36, label %38
36: ; preds = %32
store i32 14000, i32* %7
store i32 11, i32* %8
store i32 15, i32* %9
%37 = load i8*, i8** %14
store i8* %37, i8** %10
br label %70
38: ; preds = %32
%39 = load i8, i8* %6
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 66
br i1 %41, label %42, label %44
42: ; preds = %38
store i32 75000, i32* %7
store i32 13, i32* %8
store i32 75, i32* %9
%43 = load i8*, i8** %15
store i8* %43, i8** %10
br label %69
44: ; preds = %38
%45 = load i8, i8* %6
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 67
br i1 %47, label %48, label %50
48: ; preds = %44
store i32 150000, i32* %7
store i32 15, i32* %8
store i32 75, i32* %9
%49 = load i8*, i8** %16
store i8* %49, i8** %10
br label %68
50: ; preds = %44
%51 = load i8, i8* %6
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 68
br i1 %53, label %54, label %56
54: ; preds = %50
store i32 1500000, i32* %7
store i32 21, i32* %8
store i32 100, i32* %9
%55 = load i8*, i8** %17
store i8* %55, i8** %10
br label %67
56: ; preds = %50
%57 = load i8, i8* %6
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 69
br i1 %59, label %60, label %62
60: ; preds = %56
store i32 9000000, i32* %7
store i32 26, i32* %8
store i32 100, i32* %9
%61 = load i8*, i8** %18
store i8* %61, i8** %10
br label %66
62: ; preds = %56
%63 = load i8, i8* %6
%64 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0), i8 signext %63)
%65 = call i32 @exit(i32 1)
unreachable
66: ; preds = %60
br label %67
67: ; preds = %66, %54
br label %68
68: ; preds = %67, %48
br label %69
69: ; preds = %68, %42
br label %70
70: ; preds = %69, %36
br label %71
71: ; preds = %70, %30
br label %72
72: ; preds = %71, %24
%73 = load i32*, i32** %4
%74 = load i32, i32* %7
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %74)
%76 = load i32*, i32** %4
%77 = load i32, i32* %8
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 %77)
%79 = load i32*, i32** %4
%80 = load i32, i32* %9
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %80)
%82 = load i32*, i32** %4
%83 = load i8*, i8** %10
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* %83)
%85 = load i32*, i32** %4
%86 = load i8*, i8** %11
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i8* %86)
%88 = load i32, i32* %5
%89 = call i32 @ilog2(i32 %88)
%90 = sdiv i32 %89, 2
store i32 %90, i32* %20
store i32 %90, i32* %19
%91 = load i32, i32* %19
%92 = load i32, i32* %20
%93 = add nsw i32 %91, %92
%94 = load i32, i32* %5
%95 = call i32 @ilog2(i32 %94)
%96 = icmp ne i32 %93, %95
br i1 %96, label %97, label %100
97: ; preds = %72
%98 = load i32, i32* %19
%99 = add nsw i32 %98, 1
store i32 %99, i32* %19
br label %100
100: ; preds = %97, %72
%101 = load i32, i32* %19
%102 = call i32 @ipow2(i32 %101)
store i32 %102, i32* %19
%103 = load i32, i32* %20
%104 = call i32 @ipow2(i32 %103)
store i32 %104, i32* %20
%105 = load i32*, i32** %4
%106 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i64 0, i64 0))
%107 = load i32*, i32** %4
%108 = load i32, i32* %5
%109 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %108)
%110 = load i32*, i32** %4
%111 = load i32, i32* %19
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %110, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i32 %111)
%113 = load i32*, i32** %4
%114 = load i32, i32* %20
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i32 %114)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"1.0e-1\00"
@.str.1 = [4 x i8] c"10.\00"
@.str.2 = [4 x i8] c"12.\00"
@.str.3 = [4 x i8] c"20.\00"
@.str.4 = [4 x i8] c"60.\00"
@.str.5 = [5 x i8] c"110.\00"
@.str.6 = [5 x i8] c"500.\00"
@.str.7 = [6 x i8] c"1.5e3\00"
@.str.8 = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.9 = [20 x i8] c"const int na = %d;\0A\00"
@.str.10 = [24 x i8] c"const int nonzer = %d;\0A\00"
@.str.11 = [23 x i8] c"const int niter = %d;\0A\00"
@.str.12 = [26 x i8] c"const double shift = %s;\0A\00"
@.str.13 = [26 x i8] c"const double rcond = %s;\0A\00"
@.str.14 = [56 x i8] c"\0A// number of nodes for which this version is compiled\0A\00"
@.str.15 = [33 x i8] c"const int nnodes_compiled = %d;\0A\00"
@.str.16 = [31 x i8] c"const int num_proc_cols = %d;\0A\00"
@.str.17 = [31 x i8] c"const int num_proc_rows = %d;\0A\00"
define void @write_cg_info(i32* nocapture %0, i32 %1, i8 signext %2) {
switch i8 %2, label %10 [
i8 83, label %13
i8 87, label %4
i8 65, label %5
i8 66, label %6
i8 67, label %7
i8 68, label %8
i8 69, label %9
]
4: ; preds = %3
br label %13
5: ; preds = %3
br label %13
6: ; preds = %3
br label %13
7: ; preds = %3
br label %13
8: ; preds = %3
br label %13
9: ; preds = %3
br label %13
10: ; preds = %3
%11 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0), i8 signext %2)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %3, %4, %6, %8, %9, %7, %5
%14 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %3 ]
%15 = phi i32 [ 15, %4 ], [ 15, %5 ], [ 75, %6 ], [ 75, %7 ], [ 100, %8 ], [ 100, %9 ], [ 15, %3 ]
%16 = phi i32 [ 8, %4 ], [ 11, %5 ], [ 13, %6 ], [ 15, %7 ], [ 21, %8 ], [ 26, %9 ], [ 7, %3 ]
%17 = phi i32 [ 7000, %4 ], [ 14000, %5 ], [ 75000, %6 ], [ 150000, %7 ], [ 1500000, %8 ], [ 9000000, %9 ], [ 1400, %3 ]
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %17)
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 %16)
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %15)
%21 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8* %14)
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%23 = tail call i32 @ilog2(i32 %1)
%24 = sdiv i32 %23, 2
%25 = shl nsw i32 %24, 1
%26 = tail call i32 @ilog2(i32 %1)
%27 = icmp ne i32 %25, %26
%28 = zext i1 %27 to i32
%29 = add nsw i32 %24, %28
%30 = tail call i32 @ipow2(i32 %29)
%31 = tail call i32 @ipow2(i32 %24)
%32 = tail call i64 @fwrite(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i64 0, i64 0), i64 55, i64 1, i32* %0)
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %1)
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0), i32 %30)
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), i32 %31)
ret void
}