#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_lu_info(FILE *fp, int nprocs, char class) {
  int isiz1, isiz2, itmax, inorm, problem_size;
  int xdiv, ydiv;
  char *dt_default;
  if (class == 'S') {
    problem_size = 12;
    dt_default = "0.5d0";
    itmax = 50;
  } else if (class == 'W') {
    problem_size = 33;
    dt_default = "1.5d-3";
    itmax = 300;
  } else if (class == 'A') {
    problem_size = 64;
    dt_default = "2.0d0";
    itmax = 250;
  } else if (class == 'B') {
    problem_size = 102;
    dt_default = "2.0d0";
    itmax = 250;
  } else if (class == 'C') {
    problem_size = 162;
    dt_default = "2.0d0";
    itmax = 250;
  } else if (class == 'D') {
    problem_size = 408;
    dt_default = "1.0d0";
    itmax = 300;
  } else {
    printf("setparams: Internal error: invalid class %c\n", class);
    exit(1);
  }
  inorm = itmax;
  xdiv = ydiv = ilog2(nprocs) / 2;
  if (xdiv + ydiv != ilog2(nprocs))
    xdiv += 1;
  xdiv = ipow2(xdiv);
  ydiv = ipow2(ydiv);
  isiz1 = problem_size / xdiv;
  if (isiz1 * xdiv < problem_size)
    isiz1++;
  isiz2 = problem_size / ydiv;
  if (isiz2 * ydiv < problem_size)
    isiz2++;
  fprintf(fp, "\nc number of nodes for which this version is compiled\n");
  fprintf(fp, "%sinteger nnodes_compiled\n", "        ");
  fprintf(fp, "%sparameter (nnodes_compiled = %d)\n", "        ", nprocs);
  fprintf(fp, "\nc full problem size\n");
  fprintf(fp, "%sinteger isiz01, isiz02, isiz03\n", "        ");
  fprintf(fp, "%sparameter (isiz01=%d, isiz02=%d, isiz03=%d)\n", "        ",
          problem_size, problem_size, problem_size);
  fprintf(fp, "\nc sub-domain array size\n");
  fprintf(fp, "%sinteger isiz1, isiz2, isiz3\n", "        ");
  fprintf(fp, "%sparameter (isiz1=%d, isiz2=%d, isiz3=isiz03)\n", "        ",
          isiz1, isiz2);
  fprintf(fp, "\nc number of iterations and how often to print the norm\n");
  fprintf(fp, "%sinteger itmax_default, inorm_default\n", "        ");
  fprintf(fp, "%sparameter (itmax_default=%d, inorm_default=%d)\n", "        ",
          itmax, inorm);
  fprintf(fp, "%sdouble precision dt_default\n", "        ");
  fprintf(fp, "%sparameter (dt_default = %s)\n", "        ", dt_default);
}


x86 assembly (clang, -O0):
<write_lu_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    118f <write_lu_info+0x3f>
movl   $0xc,-0x24(%rbp)
lea    0xe81(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x32,-0x1c(%rbp)
jmp    1299 <write_lu_info+0x149>
movsbl -0xd(%rbp),%eax
cmp    $0x57,%eax
jne    11ba <write_lu_info+0x6a>
movl   $0x21,-0x24(%rbp)
lea    0xe5c(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x12c,-0x1c(%rbp)
jmp    1294 <write_lu_info+0x144>
movsbl -0xd(%rbp),%eax
cmp    $0x41,%eax
jne    11e5 <write_lu_info+0x95>
movl   $0x40,-0x24(%rbp)
lea    0xe38(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0xfa,-0x1c(%rbp)
jmp    128f <write_lu_info+0x13f>
movsbl -0xd(%rbp),%eax
cmp    $0x42,%eax
jne    1210 <write_lu_info+0xc0>
movl   $0x66,-0x24(%rbp)
lea    0xe0d(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0xfa,-0x1c(%rbp)
jmp    128a <write_lu_info+0x13a>
movsbl -0xd(%rbp),%eax
cmp    $0x43,%eax
jne    123b <write_lu_info+0xeb>
movl   $0xa2,-0x24(%rbp)
lea    0xde2(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0xfa,-0x1c(%rbp)
jmp    1285 <write_lu_info+0x135>
movsbl -0xd(%rbp),%eax
cmp    $0x44,%eax
jne    1266 <write_lu_info+0x116>
movl   $0x198,-0x24(%rbp)
lea    0xdbd(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x12c,-0x1c(%rbp)
jmp    1280 <write_lu_info+0x130>
lea    0xdac(%rip),%rdi
movsbl -0xd(%rbp),%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1285 <write_lu_info+0x135>
jmp    128a <write_lu_info+0x13a>
jmp    128f <write_lu_info+0x13f>
jmp    1294 <write_lu_info+0x144>
jmp    1299 <write_lu_info+0x149>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ilog2@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ilog2@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
cmp    %ecx,%eax
je     12dc <write_lu_info+0x18c>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
call   1060 <ipow2@plt>
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%edi
call   1060 <ipow2@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
cltd
idivl  -0x28(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1315 <write_lu_info+0x1c5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x24(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1338 <write_lu_info+0x1e8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xd03(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd28(%rip),%rsi
lea    0xd3c(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xd30(%rip),%rsi
lea    0xd20(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd3b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd3f(%rip),%rsi
lea    0xcf5(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xd3d(%rip),%rsi
lea    0xcd1(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd53(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd5b(%rip),%rsi
lea    0xca6(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xd5a(%rip),%rsi
lea    0xc86(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd71(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xd98(%rip),%rsi
lea    0xc5b(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xda0(%rip),%rsi
lea    0xc3b(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xdb9(%rip),%rsi
lea    0xc22(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%rcx
lea    0xdbb(%rip),%rsi
lea    0xc05(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_lu_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    -0x41(%rdx),%eax
cmp    $0x16,%al
ja     13d3 <write_lu_info+0x273>
mov    %rdi,%r13
lea    0xed9(%rip),%rbp
mov    $0xc,%r12d
mov    $0x32,%edi
movzbl %al,%eax
lea    0xe68(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec1(%rip),%rbp
mov    $0x40,%r12d
mov    $0xfa,%edi
jmp    11fe <write_lu_info+0x9e>
lea    0xead(%rip),%rbp
mov    $0x66,%r12d
mov    $0xfa,%edi
jmp    11fe <write_lu_info+0x9e>
lea    0xe99(%rip),%rbp
mov    $0xa2,%r12d
mov    $0xfa,%edi
jmp    11fe <write_lu_info+0x9e>
lea    0xe8b(%rip),%rbp
mov    $0x198,%r12d
jmp    11f9 <write_lu_info+0x99>
lea    0xe6f(%rip),%rbp
mov    $0x21,%r12d
mov    $0x12c,%edi
mov    %edi,0xc(%rsp)
mov    %rbp,0x10(%rsp)
mov    %esi,%edi
mov    %esi,%r14d
mov    %esi,0x8(%rsp)
call   1030 <ilog2@plt>
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
mov    %ebx,%ebp
sar    %ebp
and    $0xfffffffe,%ebx
mov    %r14d,%edi
call   1030 <ilog2@plt>
xor    %edi,%edi
cmp    %eax,%ebx
setne  %dil
add    %ebp,%edi
call   1060 <ipow2@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1060 <ipow2@plt>
mov    %eax,%ecx
mov    %r12d,%eax
xor    %edx,%edx
idiv   %ebx
imul   %eax,%ebx
xor    %r14d,%r14d
cmp    %r12d,%ebx
setl   %r14b
add    %eax,%r14d
mov    %r12d,%eax
xor    %edx,%edx
idiv   %ecx
imul   %eax,%ecx
xor    %r15d,%r15d
cmp    %r12d,%ecx
setl   %r15b
add    %eax,%r15d
lea    0xe28(%rip),%rdi
mov    $0x36,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1080 <fwrite@plt>
lea    0xe46(%rip),%rsi
lea    0xe5a(%rip),%rbx
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe4f(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    0x8(%rsp),%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe5b(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1080 <fwrite@plt>
lea    0xe58(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe66(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    %r12d,%ecx
mov    %r12d,%r8d
mov    %r12d,%r9d
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe78(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1080 <fwrite@plt>
lea    0xe79(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe84(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe9a(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1080 <fwrite@plt>
lea    0xeba(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xece(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    0xc(%rsp),%ecx
mov    %ecx,%r8d
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xee5(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xef0(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    0x10(%rsp),%rcx
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    0xc98(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"0.5d0\00"
@.str.1 = [7 x i8] c"1.5d-3\00"
@.str.2 = [6 x i8] c"2.0d0\00"
@.str.3 = [6 x i8] c"1.0d0\00"
@.str.4 = [45 x i8] c"setparams: Internal error: invalid class %c\0A\00"
@.str.5 = [55 x i8] c"\0Ac number of nodes for which this version is compiled\0A\00"
@.str.6 = [27 x i8] c"%sinteger nnodes_compiled\0A\00"
@.str.7 = [9 x i8] c" \00"
@.str.8 = [36 x i8] c"%sparameter (nnodes_compiled = %d)\0A\00"
@.str.9 = [22 x i8] c"\0Ac full problem size\0A\00"
@.str.10 = [34 x i8] c"%sinteger isiz01, isiz02, isiz03\0A\00"
@.str.11 = [47 x i8] c"%sparameter (isiz01=%d, isiz02=%d, isiz03=%d)\0A\00"
@.str.12 = [26 x i8] c"\0Ac sub-domain array size\0A\00"
@.str.13 = [31 x i8] c"%sinteger isiz1, isiz2, isiz3\0A\00"
@.str.14 = [48 x i8] c"%sparameter (isiz1=%d, isiz2=%d, isiz3=isiz03)\0A\00"
@.str.15 = [57 x i8] c"\0Ac number of iterations and how often to print the norm\0A\00"
@.str.16 = [40 x i8] c"%sinteger itmax_default, inorm_default\0A\00"
@.str.17 = [50 x i8] c"%sparameter (itmax_default=%d, inorm_default=%d)\0A\00"
@.str.18 = [31 x i8] c"%sdouble precision dt_default\0A\00"
@.str.19 = [31 x i8] c"%sparameter (dt_default = %s)\0A\00"
define void @write_lu_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 i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 83
br i1 %17, label %18, label %19
18: ; preds = %3
store i32 12, i32* %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %14
store i32 50, i32* %9
br label %53
19: ; preds = %3
%20 = load i8, i8* %6
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 87
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 33, i32* %11
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %14
store i32 300, i32* %9
br label %52
24: ; preds = %19
%25 = load i8, i8* %6
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 65
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 64, i32* %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %14
store i32 250, i32* %9
br label %51
29: ; preds = %24
%30 = load i8, i8* %6
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 66
br i1 %32, label %33, label %34
33: ; preds = %29
store i32 102, i32* %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %14
store i32 250, i32* %9
br label %50
34: ; preds = %29
%35 = load i8, i8* %6
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 67
br i1 %37, label %38, label %39
38: ; preds = %34
store i32 162, i32* %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %14
store i32 250, i32* %9
br label %49
39: ; preds = %34
%40 = load i8, i8* %6
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 68
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 408, i32* %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %14
store i32 300, i32* %9
br label %48
44: ; preds = %39
%45 = load i8, i8* %6
%46 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8 signext %45)
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %43
br label %49
49: ; preds = %48, %38
br label %50
50: ; preds = %49, %33
br label %51
51: ; preds = %50, %28
br label %52
52: ; preds = %51, %23
br label %53
53: ; preds = %52, %18
%54 = load i32, i32* %9
store i32 %54, i32* %10
%55 = load i32, i32* %5
%56 = call i32 @ilog2(i32 %55)
%57 = sdiv i32 %56, 2
store i32 %57, i32* %13
store i32 %57, i32* %12
%58 = load i32, i32* %12
%59 = load i32, i32* %13
%60 = add nsw i32 %58, %59
%61 = load i32, i32* %5
%62 = call i32 @ilog2(i32 %61)
%63 = icmp ne i32 %60, %62
br i1 %63, label %64, label %67
64: ; preds = %53
%65 = load i32, i32* %12
%66 = add nsw i32 %65, 1
store i32 %66, i32* %12
br label %67
67: ; preds = %64, %53
%68 = load i32, i32* %12
%69 = call i32 @ipow2(i32 %68)
store i32 %69, i32* %12
%70 = load i32, i32* %13
%71 = call i32 @ipow2(i32 %70)
store i32 %71, i32* %13
%72 = load i32, i32* %11
%73 = load i32, i32* %12
%74 = sdiv i32 %72, %73
store i32 %74, i32* %7
%75 = load i32, i32* %7
%76 = load i32, i32* %12
%77 = mul nsw i32 %75, %76
%78 = load i32, i32* %11
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %83
80: ; preds = %67
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 1
store i32 %82, i32* %7
br label %83
83: ; preds = %80, %67
%84 = load i32, i32* %11
%85 = load i32, i32* %13
%86 = sdiv i32 %84, %85
store i32 %86, i32* %8
%87 = load i32, i32* %8
%88 = load i32, i32* %13
%89 = mul nsw i32 %87, %88
%90 = load i32, i32* %11
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %95
92: ; preds = %83
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %8
br label %95
95: ; preds = %92, %83
%96 = load i32*, i32** %4
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%98 = load i32*, i32** %4
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %98, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%100 = load i32*, i32** %4
%101 = load i32, i32* %5
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %101)
%103 = load i32*, i32** %4
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%105 = load i32*, i32** %4
%106 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%107 = load i32*, i32** %4
%108 = load i32, i32* %11
%109 = load i32, i32* %11
%110 = load i32, i32* %11
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %108, i32 %109, i32 %110)
%112 = load i32*, i32** %4
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
%114 = load i32*, i32** %4
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %114, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%116 = load i32*, i32** %4
%117 = load i32, i32* %7
%118 = load i32, i32* %8
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %117, i32 %118)
%120 = load i32*, i32** %4
%121 = call i32 (i32*, i8*, ...) @fprintf(i32* %120, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.15, i64 0, i64 0))
%122 = load i32*, i32** %4
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %122, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%124 = load i32*, i32** %4
%125 = load i32, i32* %9
%126 = load i32, i32* %10
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %125, i32 %126)
%128 = load i32*, i32** %4
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%130 = load i32*, i32** %4
%131 = load i8*, i8** %14
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* %131)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.5d0\00"
@.str.1 = [7 x i8] c"1.5d-3\00"
@.str.2 = [6 x i8] c"2.0d0\00"
@.str.3 = [6 x i8] c"1.0d0\00"
@.str.4 = [45 x i8] c"setparams: Internal error: invalid class %c\0A\00"
@.str.5 = [55 x i8] c"\0Ac number of nodes for which this version is compiled\0A\00"
@.str.6 = [27 x i8] c"%sinteger nnodes_compiled\0A\00"
@.str.7 = [9 x i8] c" \00"
@.str.8 = [36 x i8] c"%sparameter (nnodes_compiled = %d)\0A\00"
@.str.9 = [22 x i8] c"\0Ac full problem size\0A\00"
@.str.10 = [34 x i8] c"%sinteger isiz01, isiz02, isiz03\0A\00"
@.str.11 = [47 x i8] c"%sparameter (isiz01=%d, isiz02=%d, isiz03=%d)\0A\00"
@.str.12 = [26 x i8] c"\0Ac sub-domain array size\0A\00"
@.str.13 = [31 x i8] c"%sinteger isiz1, isiz2, isiz3\0A\00"
@.str.14 = [48 x i8] c"%sparameter (isiz1=%d, isiz2=%d, isiz3=isiz03)\0A\00"
@.str.15 = [57 x i8] c"\0Ac number of iterations and how often to print the norm\0A\00"
@.str.16 = [40 x i8] c"%sinteger itmax_default, inorm_default\0A\00"
@.str.17 = [50 x i8] c"%sparameter (itmax_default=%d, inorm_default=%d)\0A\00"
@.str.18 = [31 x i8] c"%sdouble precision dt_default\0A\00"
@.str.19 = [31 x i8] c"%sparameter (dt_default = %s)\0A\00"
define void @write_lu_info(i32* nocapture %0, i32 %1, i8 signext %2) {
switch i8 %2, label %9 [
i8 83, label %12
i8 87, label %4
i8 65, label %5
i8 66, label %6
i8 67, label %7
i8 68, label %8
]
4: ; preds = %3
br label %12
5: ; preds = %3
br label %12
6: ; preds = %3
br label %12
7: ; preds = %3
br label %12
8: ; preds = %3
br label %12
9: ; preds = %3
%10 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0), i8 signext %2)
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %3, %4, %6, %8, %7, %5
%13 = phi i32 [ 300, %4 ], [ 250, %5 ], [ 250, %6 ], [ 250, %7 ], [ 300, %8 ], [ 50, %3 ]
%14 = phi i32 [ 33, %4 ], [ 64, %5 ], [ 102, %6 ], [ 162, %7 ], [ 408, %8 ], [ 12, %3 ]
%15 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %3 ]
%16 = tail call i32 @ilog2(i32 %1)
%17 = sdiv i32 %16, 2
%18 = shl nsw i32 %17, 1
%19 = tail call i32 @ilog2(i32 %1)
%20 = icmp ne i32 %18, %19
%21 = zext i1 %20 to i32
%22 = add nsw i32 %17, %21
%23 = tail call i32 @ipow2(i32 %22)
%24 = tail call i32 @ipow2(i32 %17)
%25 = sdiv i32 %14, %23
%26 = mul nsw i32 %25, %23
%27 = icmp slt i32 %26, %14
%28 = zext i1 %27 to i32
%29 = add nsw i32 %25, %28
%30 = sdiv i32 %14, %24
%31 = mul nsw i32 %30, %24
%32 = icmp slt i32 %31, %14
%33 = zext i1 %32 to i32
%34 = add nsw i32 %30, %33
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0), i64 54, i64 1, i32* %0)
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %1)
%38 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i64 21, i64 1, i32* %0)
%39 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %14, i32 %14, i32 %14)
%41 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i64 25, i64 1, i32* %0)
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%43 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %29, i32 %34)
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.15, i64 0, i64 0), i64 56, i64 1, i32* %0)
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%46 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %13, i32 %13)
%47 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%48 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* %15)
ret void
}