#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 /*<<< orphan*/ printf(char *, char);
void write_ua_info(FILE *fp, char class) {
  int lelt, lmor, refine_max, niter, nmxh, fre;
  char *alpha;
  fre = 5;
  if (class == 'S') {
    lelt = 250;
    lmor = 11600;
    refine_max = 4;
    niter = 50;
    nmxh = 10;
    alpha = "0.040e0";
  } else if (class == 'W') {
    lelt = 700;
    lmor = 26700;
    refine_max = 5;
    niter = 100;
    nmxh = 10;
    alpha = "0.060e0";
  } else if (class == 'A') {
    lelt = 2400;
    lmor = 92700;
    refine_max = 6;
    niter = 200;
    nmxh = 10;
    alpha = "0.076e0";
  } else if (class == 'B') {
    lelt = 8800;
    lmor = 334600;
    refine_max = 7;
    niter = 200;
    nmxh = 10;
    alpha = "0.076e0";
  } else if (class == 'C') {
    lelt = 33500;
    lmor = 1262100;
    refine_max = 8;
    niter = 200;
    nmxh = 10;
    alpha = "0.067e0";
  } else if (class == 'D') {
    lelt = 515000;
    lmor = 19500000;
    refine_max = 10;
    niter = 250;
    nmxh = 10;
    alpha = "0.046e0";
  } else {
    printf("setparams: Internal error: invalid class type %c\n", class);
    exit(1);
  }
  fprintf(fp, "#define LELT           %d\n\n", lelt);
  fprintf(fp, "#define LMOR           %d\n\n", lmor);
  fprintf(fp, "#define REFINE_MAX     %d\n\n", refine_max);
  fprintf(fp, "#define FRE_DEFAULT    %d\n\n", fre);
  fprintf(fp, "#define NITER_DEFAULT  %d\n\n", niter);
  fprintf(fp, "#define NMXH_DEFAULT   %d\n\n", nmxh);
  fprintf(fp, "#define CLASS_DEFAULT  \'%c\'\n\n", class);
  fprintf(fp, "#define ALPHA_DEFAULT  %s\n\n", alpha);
}


x86 assembly (clang, -O0):
<write_ua_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x5,-0x24(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x53,%eax
jne    1189 <write_ua_info+0x59>
movl   $0xfa,-0x10(%rbp)
movl   $0x2d50,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
movl   $0x32,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xe80(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12fc <write_ua_info+0x1cc>
movsbl -0x9(%rbp),%eax
cmp    $0x57,%eax
jne    11c9 <write_ua_info+0x99>
movl   $0x2bc,-0x10(%rbp)
movl   $0x684c,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
movl   $0x64,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xe48(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12f7 <write_ua_info+0x1c7>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
jne    1209 <write_ua_info+0xd9>
movl   $0x960,-0x10(%rbp)
movl   $0x16a1c,-0x14(%rbp)
movl   $0x6,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xe10(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12f2 <write_ua_info+0x1c2>
movsbl -0x9(%rbp),%eax
cmp    $0x42,%eax
jne    1249 <write_ua_info+0x119>
movl   $0x2260,-0x10(%rbp)
movl   $0x51b08,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xdd0(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12ed <write_ua_info+0x1bd>
movsbl -0x9(%rbp),%eax
cmp    $0x43,%eax
jne    1289 <write_ua_info+0x159>
movl   $0x82dc,-0x10(%rbp)
movl   $0x134214,-0x14(%rbp)
movl   $0x8,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xd98(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12e8 <write_ua_info+0x1b8>
movsbl -0x9(%rbp),%eax
cmp    $0x44,%eax
jne    12c9 <write_ua_info+0x199>
movl   $0x7dbb8,-0x10(%rbp)
movl   $0x1298be0,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0xfa,-0x1c(%rbp)
movl   $0xa,-0x20(%rbp)
lea    0xd60(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    12e3 <write_ua_info+0x1b3>
lea    0xd58(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    12e8 <write_ua_info+0x1b8>
jmp    12ed <write_ua_info+0x1bd>
jmp    12f2 <write_ua_info+0x1c2>
jmp    12f7 <write_ua_info+0x1c7>
jmp    12fc <write_ua_info+0x1cc>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xd50(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd57(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
lea    0xd5e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0xd65(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xd73(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%edx
lea    0xd79(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xd81(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ua_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    -0x41(%rsi),%eax
cmp    $0x16,%al
ja     12c4 <write_ua_info+0x194>
mov    %rdi,%rbx
lea    0xf0c(%rip),%r14
mov    $0xfa,%edx
mov    $0x32,%r15d
mov    $0x4,%r12d
mov    $0x2d50,%ebp
movzbl %al,%eax
lea    0xe90(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeec(%rip),%r14
mov    $0x960,%edx
mov    $0xc8,%r15d
mov    $0x6,%r12d
mov    $0x16a1c,%ebp
jmp    1212 <write_ua_info+0xe2>
lea    0xecd(%rip),%r14
mov    $0x2260,%edx
mov    $0xc8,%r15d
mov    $0x7,%r12d
mov    $0x51b08,%ebp
jmp    1212 <write_ua_info+0xe2>
lea    0xeb6(%rip),%r14
mov    $0x82dc,%edx
mov    $0xc8,%r15d
mov    $0x8,%r12d
mov    $0x134214,%ebp
jmp    1212 <write_ua_info+0xe2>
lea    0xe9f(%rip),%r14
mov    $0x7dbb8,%edx
mov    $0xfa,%r15d
mov    $0xa,%r12d
mov    $0x1298be0,%ebp
jmp    1212 <write_ua_info+0xe2>
lea    0xe68(%rip),%r14
mov    $0x2bc,%edx
mov    $0x64,%r15d
mov    $0x5,%r12d
mov    $0x684c,%ebp
movzbl %sil,%r13d
lea    0xe99(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fprintf@plt>
movsbl %sil,%esi
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"0.040e0\00"
@.str.1 = [8 x i8] c"0.060e0\00"
@.str.2 = [8 x i8] c"0.076e0\00"
@.str.3 = [8 x i8] c"0.067e0\00"
@.str.4 = [8 x i8] c"0.046e0\00"
@.str.5 = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.6 = [28 x i8] c"#define LELT %d\0A\0A\00"
@.str.7 = [28 x i8] c"#define LMOR %d\0A\0A\00"
@.str.8 = [28 x i8] c"#define REFINE_MAX %d\0A\0A\00"
@.str.9 = [28 x i8] c"#define FRE_DEFAULT %d\0A\0A\00"
@.str.10 = [28 x i8] c"#define NITER_DEFAULT %d\0A\0A\00"
@.str.11 = [28 x i8] c"#define NMXH_DEFAULT %d\0A\0A\00"
@.str.12 = [30 x i8] c"#define CLASS_DEFAULT '%c'\0A\0A\00"
@.str.13 = [28 x i8] c"#define ALPHA_DEFAULT %s\0A\0A\00"
define void @write_ua_info(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
store i32* %0, i32** %3
store i8 %1, i8* %4
store i32 5, i32* %10
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 83
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 250, i32* %5
store i32 11600, i32* %6
store i32 4, i32* %7
store i32 50, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %11
br label %50
16: ; preds = %2
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 87
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 700, i32* %5
store i32 26700, i32* %6
store i32 5, i32* %7
store i32 100, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %11
br label %49
21: ; preds = %16
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 65
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 2400, i32* %5
store i32 92700, i32* %6
store i32 6, i32* %7
store i32 200, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %11
br label %48
26: ; preds = %21
%27 = load i8, i8* %4
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 66
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 8800, i32* %5
store i32 334600, i32* %6
store i32 7, i32* %7
store i32 200, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %11
br label %47
31: ; preds = %26
%32 = load i8, i8* %4
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 67
br i1 %34, label %35, label %36
35: ; preds = %31
store i32 33500, i32* %5
store i32 1262100, i32* %6
store i32 8, i32* %7
store i32 200, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %11
br label %46
36: ; preds = %31
%37 = load i8, i8* %4
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 68
br i1 %39, label %40, label %41
40: ; preds = %36
store i32 515000, i32* %5
store i32 19500000, i32* %6
store i32 10, i32* %7
store i32 250, i32* %8
store i32 10, i32* %9
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %11
br label %45
41: ; preds = %36
%42 = load i8, i8* %4
%43 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8 signext %42)
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %40
br label %46
46: ; preds = %45, %35
br label %47
47: ; preds = %46, %30
br label %48
48: ; preds = %47, %25
br label %49
49: ; preds = %48, %20
br label %50
50: ; preds = %49, %15
%51 = load i32*, i32** %3
%52 = load i32, i32* %5
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %52)
%54 = load i32*, i32** %3
%55 = load i32, i32* %6
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %55)
%57 = load i32*, i32** %3
%58 = load i32, i32* %7
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %58)
%60 = load i32*, i32** %3
%61 = load i32, i32* %10
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 %61)
%63 = load i32*, i32** %3
%64 = load i32, i32* %8
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %64)
%66 = load i32*, i32** %3
%67 = load i32, i32* %9
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %67)
%69 = load i32*, i32** %3
%70 = load i8, i8* %4
%71 = sext i8 %70 to i32
%72 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %71)
%73 = load i32*, i32** %3
%74 = load i8*, i8** %11
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* %74)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"0.040e0\00"
@.str.1 = [8 x i8] c"0.060e0\00"
@.str.2 = [8 x i8] c"0.076e0\00"
@.str.3 = [8 x i8] c"0.067e0\00"
@.str.4 = [8 x i8] c"0.046e0\00"
@.str.5 = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
@.str.6 = [28 x i8] c"#define LELT %d\0A\0A\00"
@.str.7 = [28 x i8] c"#define LMOR %d\0A\0A\00"
@.str.8 = [28 x i8] c"#define REFINE_MAX %d\0A\0A\00"
@.str.9 = [28 x i8] c"#define FRE_DEFAULT %d\0A\0A\00"
@.str.10 = [28 x i8] c"#define NITER_DEFAULT %d\0A\0A\00"
@.str.11 = [28 x i8] c"#define NMXH_DEFAULT %d\0A\0A\00"
@.str.12 = [30 x i8] c"#define CLASS_DEFAULT '%c'\0A\0A\00"
@.str.13 = [28 x i8] c"#define ALPHA_DEFAULT %s\0A\0A\00"
define void @write_ua_info(i32* nocapture %0, i8 signext %1) {
switch i8 %1, label %8 [
i8 83, label %11
i8 87, label %3
i8 65, label %4
i8 66, label %5
i8 67, label %6
i8 68, label %7
]
3: ; preds = %2
br label %11
4: ; preds = %2
br label %11
5: ; preds = %2
br label %11
6: ; preds = %2
br label %11
7: ; preds = %2
br label %11
8: ; preds = %2
%9 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i8 signext %1)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2, %3, %5, %7, %6, %4
%12 = phi i32 [ 26700, %3 ], [ 92700, %4 ], [ 334600, %5 ], [ 1262100, %6 ], [ 19500000, %7 ], [ 11600, %2 ]
%13 = phi i32 [ 5, %3 ], [ 6, %4 ], [ 7, %5 ], [ 8, %6 ], [ 10, %7 ], [ 4, %2 ]
%14 = phi i32 [ 100, %3 ], [ 200, %4 ], [ 200, %5 ], [ 200, %6 ], [ 250, %7 ], [ 50, %2 ]
%15 = phi i32 [ 700, %3 ], [ 2400, %4 ], [ 8800, %5 ], [ 33500, %6 ], [ 515000, %7 ], [ 250, %2 ]
%16 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %2 ]
%17 = zext i8 %1 to i32
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %15)
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %12)
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %13)
%21 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 5)
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %14)
%23 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 10)
%24 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %17)
%25 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* %16)
ret void
}