#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 *, char *, ...);
int ilog2(int);
int /*<<< orphan*/ printf(char *, char);
void write_mg_info(FILE *fp, int nprocs, char class) {
  int problem_size, nit, log2_size, log2_nprocs, lt_default, lm;
  int ndim1, ndim2, ndim3;
  if (class == 'S') {
    problem_size = 32;
    nit = 4;
  } else if (class == 'W') {
    problem_size = 128;
    nit = 4;
  } else if (class == 'A') {
    problem_size = 256;
    nit = 4;
  } else if (class == 'B') {
    problem_size = 256;
    nit = 20;
  } else if (class == 'C') {
    problem_size = 512;
    nit = 20;
  } else if (class == 'D') {
    problem_size = 1024;
    nit = 50;
  } else if (class == 'E') {
    problem_size = 2048;
    nit = 50;
  } else {
    printf("setparams: Internal error: invalid class type %c\n", class);
    exit(1);
  }
  log2_size = ilog2(problem_size);
  log2_nprocs = ilog2(nprocs);
  lt_default = log2_size;
  lm = log2_size - log2_nprocs / 3;
  ndim1 = lm;
  ndim3 = log2_size - (log2_nprocs + 2) / 3;
  ndim2 = log2_size - (log2_nprocs + 1) / 3;
  fprintf(fp, "%sinteger nprocs_compiled\n", "        ");
  fprintf(fp, "%sparameter (nprocs_compiled = %d)\n", "        ", nprocs);
  fprintf(fp, "%sinteger nx_default, ny_default, nz_default\n", "        ");
  fprintf(fp, "%sparameter (nx_default=%d, ny_default=%d, nz_default=%d)\n",
          "        ", problem_size, problem_size, problem_size);
  fprintf(fp, "%sinteger nit_default, lm, lt_default\n", "        ");
  fprintf(fp, "%sparameter (nit_default=%d, lm = %d, lt_default=%d)\n",
          "        ", nit, lm, lt_default);
  fprintf(fp, "%sinteger debug_default\n", "        ");
  fprintf(fp, "%sparameter (debug_default=%d)\n", "        ", 0);
  fprintf(fp, "%sinteger ndim1, ndim2, ndim3\n", "        ");
  fprintf(fp, "%sparameter (ndim1 = %d, ndim2 = %d, ndim3 = %d)\n", "        ",
          ndim1, ndim2, ndim3);
}


x86 assembly (clang, -O0):
<write_mg_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x53,%eax
jne    1174 <write_mg_info+0x34>
movl   $0x20,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    126c <write_mg_info+0x12c>
movsbl -0xd(%rbp),%eax
cmp    $0x57,%eax
jne    1194 <write_mg_info+0x54>
movl   $0x80,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    1267 <write_mg_info+0x127>
movsbl -0xd(%rbp),%eax
cmp    $0x41,%eax
jne    11b4 <write_mg_info+0x74>
movl   $0x100,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    1262 <write_mg_info+0x122>
movsbl -0xd(%rbp),%eax
cmp    $0x42,%eax
jne    11d4 <write_mg_info+0x94>
movl   $0x100,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
jmp    125d <write_mg_info+0x11d>
movsbl -0xd(%rbp),%eax
cmp    $0x43,%eax
jne    11f4 <write_mg_info+0xb4>
movl   $0x200,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
jmp    1258 <write_mg_info+0x118>
movsbl -0xd(%rbp),%eax
cmp    $0x44,%eax
jne    1214 <write_mg_info+0xd4>
movl   $0x400,-0x14(%rbp)
movl   $0x32,-0x18(%rbp)
jmp    1253 <write_mg_info+0x113>
movsbl -0xd(%rbp),%eax
cmp    $0x45,%eax
jne    1234 <write_mg_info+0xf4>
movl   $0x800,-0x14(%rbp)
movl   $0x32,-0x18(%rbp)
jmp    124e <write_mg_info+0x10e>
lea    0xdc5(%rip),%rdi
movsbl -0xd(%rbp),%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    1253 <write_mg_info+0x113>
jmp    1258 <write_mg_info+0x118>
jmp    125d <write_mg_info+0x11d>
jmp    1262 <write_mg_info+0x122>
jmp    1267 <write_mg_info+0x127>
jmp    126c <write_mg_info+0x12c>
mov    -0x14(%rbp),%edi
call   1030 <ilog2@plt>
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ilog2@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x20(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xd42(%rip),%rsi
lea    0xd56(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xd4a(%rip),%rsi
lea    0xd3a(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd55(%rip),%rsi
lea    0xd21(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xd5f(%rip),%rsi
lea    0xcfd(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd81(%rip),%rsi
lea    0xce4(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xd84(%rip),%rsi
lea    0xcc0(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xda1(%rip),%rsi
lea    0xca7(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xda1(%rip),%rsi
lea    0xc8e(%rip),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xda6(%rip),%rsi
lea    0xc73(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    -0x34(%rbp),%r9d
lea    0xda1(%rip),%rsi
lea    0xc4f(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_mg_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    -0x41(%rdx),%eax
cmp    $0x16,%al
ja     133a <write_mg_info+0x1fa>
mov    %esi,%r15d
mov    %rdi,%r13
mov    $0x20,%r14d
mov    $0x4,%esi
movzbl %al,%eax
lea    0xe8c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x100,%r14d
jmp    11bf <write_mg_info+0x7f>
mov    $0x100,%r14d
mov    $0x14,%esi
jmp    11bf <write_mg_info+0x7f>
mov    $0x200,%r14d
mov    $0x14,%esi
jmp    11bf <write_mg_info+0x7f>
mov    $0x400,%r14d
mov    $0x32,%esi
jmp    11bf <write_mg_info+0x7f>
mov    $0x800,%r14d
mov    $0x32,%esi
jmp    11bf <write_mg_info+0x7f>
mov    $0x80,%r14d
mov    %esi,0x14(%rsp)
mov    %r14d,%edi
call   1030 <ilog2@plt>
mov    %eax,%ebx
mov    %r15d,%edi
call   1030 <ilog2@plt>
cltq
imul   $0x55555555,%rax,%rbp
shr    $0x20,%rbp
sub    %eax,%ebp
mov    %ebp,%ecx
shr    $0x1f,%ecx
sar    %ebp
add    %ecx,%ebp
mov    %ebx,%edx
add    %ebx,%ebp
lea    0x2(%rax),%ecx
movslq %ecx,%rcx
mov    %r15d,0xc(%rsp)
imul   $0x55555555,%rcx,%rbx
shr    $0x20,%rbx
sub    %ecx,%ebx
mov    %ebx,%ecx
shr    $0x1f,%ecx
sar    %ebx
add    %ecx,%ebx
add    %edx,%ebx
mov    %edx,0x10(%rsp)
add    $0x1,%eax
cltq
imul   $0x55555555,%rax,%r12
shr    $0x20,%r12
sub    %eax,%r12d
mov    %r12d,%eax
shr    $0x1f,%eax
sar    %r12d
add    %eax,%r12d
add    %edx,%r12d
lea    0xe4d(%rip),%rsi
lea    0xe61(%rip),%r15
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe56(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
mov    0xc(%rsp),%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe62(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe7c(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
mov    %r14d,%ecx
mov    %r14d,%r8d
mov    %r14d,%r9d
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe9a(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xead(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
mov    0x14(%rsp),%ecx
mov    %ebp,%r8d
mov    0x10(%rsp),%r9d
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xec3(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xec8(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xed2(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xedd(%rip),%rsi
mov    %r13,%rdi
mov    %r15,%rdx
mov    %ebp,%ecx
mov    %r12d,%r8d
mov    %ebx,%r9d
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fprintf@plt>
movsbl %dl,%esi
lea    0xd18(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.1 = [27 x i8] c"%sinteger nprocs_compiled\0A\00"
@.str.2 = [9 x i8] c" \00"
@.str.3 = [36 x i8] c"%sparameter (nprocs_compiled = %d)\0A\00"
@.str.4 = [46 x i8] c"%sinteger nx_default, ny_default, nz_default\0A\00"
@.str.5 = [59 x i8] c"%sparameter (nx_default=%d, ny_default=%d, nz_default=%d)\0A\00"
@.str.6 = [39 x i8] c"%sinteger nit_default, lm, lt_default\0A\00"
@.str.7 = [54 x i8] c"%sparameter (nit_default=%d, lm = %d, lt_default=%d)\0A\00"
@.str.8 = [25 x i8] c"%sinteger debug_default\0A\00"
@.str.9 = [32 x i8] c"%sparameter (debug_default=%d)\0A\00"
@.str.10 = [31 x i8] c"%sinteger ndim1, ndim2, ndim3\0A\00"
@.str.11 = [50 x i8] c"%sparameter (ndim1 = %d, ndim2 = %d, ndim3 = %d)\0A\00"
define void @write_mg_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 i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%16 = load i8, i8* %6
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 83
br i1 %18, label %19, label %20
19: ; preds = %3
store i32 32, i32* %7
store i32 4, i32* %8
br label %60
20: ; preds = %3
%21 = load i8, i8* %6
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 87
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 128, i32* %7
store i32 4, i32* %8
br label %59
25: ; preds = %20
%26 = load i8, i8* %6
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 65
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 256, i32* %7
store i32 4, i32* %8
br label %58
30: ; preds = %25
%31 = load i8, i8* %6
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 66
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 256, i32* %7
store i32 20, i32* %8
br label %57
35: ; preds = %30
%36 = load i8, i8* %6
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 67
br i1 %38, label %39, label %40
39: ; preds = %35
store i32 512, i32* %7
store i32 20, i32* %8
br label %56
40: ; preds = %35
%41 = load i8, i8* %6
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 68
br i1 %43, label %44, label %45
44: ; preds = %40
store i32 1024, i32* %7
store i32 50, i32* %8
br label %55
45: ; preds = %40
%46 = load i8, i8* %6
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 69
br i1 %48, label %49, label %50
49: ; preds = %45
store i32 2048, i32* %7
store i32 50, i32* %8
br label %54
50: ; preds = %45
%51 = load i8, i8* %6
%52 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %51)
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %49
br label %55
55: ; preds = %54, %44
br label %56
56: ; preds = %55, %39
br label %57
57: ; preds = %56, %34
br label %58
58: ; preds = %57, %29
br label %59
59: ; preds = %58, %24
br label %60
60: ; preds = %59, %19
%61 = load i32, i32* %7
%62 = call i32 @ilog2(i32 %61)
store i32 %62, i32* %9
%63 = load i32, i32* %5
%64 = call i32 @ilog2(i32 %63)
store i32 %64, i32* %10
%65 = load i32, i32* %9
store i32 %65, i32* %11
%66 = load i32, i32* %9
%67 = load i32, i32* %10
%68 = sdiv i32 %67, 3
%69 = sub nsw i32 %66, %68
store i32 %69, i32* %12
%70 = load i32, i32* %12
store i32 %70, i32* %13
%71 = load i32, i32* %9
%72 = load i32, i32* %10
%73 = add nsw i32 %72, 2
%74 = sdiv i32 %73, 3
%75 = sub nsw i32 %71, %74
store i32 %75, i32* %15
%76 = load i32, i32* %9
%77 = load i32, i32* %10
%78 = add nsw i32 %77, 1
%79 = sdiv i32 %78, 3
%80 = sub nsw i32 %76, %79
store i32 %80, i32* %14
%81 = load i32*, i32** %4
%82 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%83 = load i32*, i32** %4
%84 = load i32, i32* %5
%85 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %84)
%86 = load i32*, i32** %4
%87 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%88 = load i32*, i32** %4
%89 = load i32, i32* %7
%90 = load i32, i32* %7
%91 = load i32, i32* %7
%92 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %89, i32 %90, i32 %91)
%93 = load i32*, i32** %4
%94 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %93, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%95 = load i32*, i32** %4
%96 = load i32, i32* %8
%97 = load i32, i32* %12
%98 = load i32, i32* %11
%99 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %96, i32 %97, i32 %98)
%100 = load i32*, i32** %4
%101 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%102 = load i32*, i32** %4
%103 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 0)
%104 = load i32*, i32** %4
%105 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %104, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%106 = load i32*, i32** %4
%107 = load i32, i32* %13
%108 = load i32, i32* %14
%109 = load i32, i32* %15
%110 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %107, i32 %108, i32 %109)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.1 = [27 x i8] c"%sinteger nprocs_compiled\0A\00"
@.str.2 = [9 x i8] c" \00"
@.str.3 = [36 x i8] c"%sparameter (nprocs_compiled = %d)\0A\00"
@.str.4 = [46 x i8] c"%sinteger nx_default, ny_default, nz_default\0A\00"
@.str.5 = [59 x i8] c"%sparameter (nx_default=%d, ny_default=%d, nz_default=%d)\0A\00"
@.str.6 = [39 x i8] c"%sinteger nit_default, lm, lt_default\0A\00"
@.str.7 = [54 x i8] c"%sparameter (nit_default=%d, lm = %d, lt_default=%d)\0A\00"
@.str.8 = [25 x i8] c"%sinteger debug_default\0A\00"
@.str.9 = [32 x i8] c"%sparameter (debug_default=%d)\0A\00"
@.str.10 = [31 x i8] c"%sinteger ndim1, ndim2, ndim3\0A\00"
@.str.11 = [50 x i8] c"%sparameter (ndim1 = %d, ndim2 = %d, ndim3 = %d)\0A\00"
define void @write_mg_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, 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 i32 [ 4, %4 ], [ 4, %5 ], [ 20, %6 ], [ 20, %7 ], [ 50, %8 ], [ 50, %9 ], [ 4, %3 ]
%15 = phi i32 [ 128, %4 ], [ 256, %5 ], [ 256, %6 ], [ 512, %7 ], [ 1024, %8 ], [ 2048, %9 ], [ 32, %3 ]
%16 = tail call i32 @ilog2(i32 %15)
%17 = tail call i32 @ilog2(i32 %1)
%18 = sdiv i32 %17, -3
%19 = add i32 %18, %16
%20 = add nsw i32 %17, 2
%21 = sdiv i32 %20, -3
%22 = add i32 %21, %16
%23 = add nsw i32 %17, 1
%24 = sdiv i32 %23, -3
%25 = add i32 %24, %16
%26 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%27 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%28 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%29 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %15, i32 %15)
%30 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%31 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %19, i32 %16)
%32 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%33 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 0)
%34 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%35 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %19, i32 %25, i32 %22)
ret void
}