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

/* Variables and functions */
int toupper(int);
char *swe_house_name(int hsys) {
  int h = hsys;
  if (h != 'i')
    h = toupper(h);
  switch (h) {
  case 'A':
    return "equal";
  case 'B':
    return "Alcabitius";
  case 'C':
    return "Campanus";
  case 'D':
    return "equal (MC)";
  case 'E':
    return "equal";
  case 'F':
    return "Carter poli-equ.";
  case 'G':
    return "Gauquelin sectors";
  case 'H':
    return "horizon/azimut";
  case 'I':
    return "Sunshine";
  case 'i':
    return "Sunshine/alt.";
  case 'K':
    return "Koch";
  case 'L':
    return "Pullen SD";
  case 'M':
    return "Morinus";
  case 'N':
    return "equal/1=Aries";
  case 'O':
    return "Porphyry";
  case 'Q':
    return "Pullen SR";
  case 'R':
    return "Regiomontanus";
  case 'S':
    return "Sripati";
  case 'T':
    return "Polich/Page";
  case 'U':
    return "Krusinski-Pisa-Goelzer";
  case 'V':
    return "equal/Vehlow";
  case 'W':
    return "equal/ whole sign";
  case 'X':
    return "axial rotation system/Meridian houses";
  case 'Y':
    return "APC houses";
  default:
    return "Placidus";
  }
}


x86 assembly (clang, -O0):
<swe_house_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x69,-0x10(%rbp)
je     1136 <swe_house_name+0x26>
mov    -0x10(%rbp),%edi
call   1030 <toupper@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x28,%eax
ja     12df <swe_house_name+0x1cf>
mov    -0x18(%rbp),%rax
lea    0xeaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf3e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf34(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf2f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf28(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xefe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf13(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf16(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf15(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf0c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xf01(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xefb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xef3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xef1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xeea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xee4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xedc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ea <swe_house_name+0x1da>
lea    0xeed(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_house_name>:
push   %rax
cmp    $0x69,%edi
jne    111f <swe_house_name+0xf>
lea    0xf43(%rip),%rax
pop    %rcx
ret
call   1030 <toupper@plt>
add    $0xffffffbf,%eax
cmp    $0x28,%eax
ja     113e <swe_house_name+0x2e>
cltq
lea    0x1003(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
pop    %rcx
ret
lea    0xfea(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"equal\00"
@.str.1 = [11 x i8] c"Alcabitius\00"
@.str.2 = [9 x i8] c"Campanus\00"
@.str.3 = [11 x i8] c"equal (MC)\00"
@.str.4 = [17 x i8] c"Carter poli-equ.\00"
@.str.5 = [18 x i8] c"Gauquelin sectors\00"
@.str.6 = [15 x i8] c"horizon/azimut\00"
@.str.7 = [9 x i8] c"Sunshine\00"
@.str.8 = [14 x i8] c"Sunshine/alt.\00"
@.str.9 = [5 x i8] c"Koch\00"
@.str.10 = [10 x i8] c"Pullen SD\00"
@.str.11 = [8 x i8] c"Morinus\00"
@.str.12 = [14 x i8] c"equal/1=Aries\00"
@.str.13 = [9 x i8] c"Porphyry\00"
@.str.14 = [10 x i8] c"Pullen SR\00"
@.str.15 = [14 x i8] c"Regiomontanus\00"
@.str.16 = [8 x i8] c"Sripati\00"
@.str.17 = [12 x i8] c"Polich/Page\00"
@.str.18 = [23 x i8] c"Krusinski-Pisa-Goelzer\00"
@.str.19 = [13 x i8] c"equal/Vehlow\00"
@.str.20 = [18 x i8] c"equal/ whole sign\00"
@.str.21 = [38 x i8] c"axial rotation system/Meridian houses\00"
@.str.22 = [11 x i8] c"APC houses\00"
@.str.23 = [9 x i8] c"Placidus\00"
define i8* @swe_house_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 105
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %4
%10 = call i32 @toupper(i32 %9)
store i32 %10, i32* %4
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %4
switch i32 %12, label %37 [
i32 65, label %13
i32 66, label %14
i32 67, label %15
i32 68, label %16
i32 69, label %17
i32 70, label %18
i32 71, label %19
i32 72, label %20
i32 73, label %21
i32 105, label %22
i32 75, label %23
i32 76, label %24
i32 77, label %25
i32 78, label %26
i32 79, label %27
i32 81, label %28
i32 82, label %29
i32 83, label %30
i32 84, label %31
i32 85, label %32
i32 86, label %33
i32 87, label %34
i32 88, label %35
i32 89, label %36
]
13: ; preds = %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %38
14: ; preds = %11
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %38
15: ; preds = %11
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %38
16: ; preds = %11
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %38
17: ; preds = %11
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
br label %38
18: ; preds = %11
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %38
19: ; preds = %11
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %38
20: ; preds = %11
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %38
21: ; preds = %11
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %38
22: ; preds = %11
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %38
23: ; preds = %11
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %38
24: ; preds = %11
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %38
25: ; preds = %11
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %38
26: ; preds = %11
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %38
27: ; preds = %11
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %38
28: ; preds = %11
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %38
29: ; preds = %11
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %38
30: ; preds = %11
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %38
31: ; preds = %11
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %38
32: ; preds = %11
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %38
33: ; preds = %11
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %38
34: ; preds = %11
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %38
35: ; preds = %11
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %38
36: ; preds = %11
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %38
37: ; preds = %11
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %38
38: ; preds = %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%39 = load i8*, i8** %2
ret i8* %39
}

LLVM IR (-O2):
@.str = [6 x i8] c"equal\00"
@.str.1 = [11 x i8] c"Alcabitius\00"
@.str.2 = [9 x i8] c"Campanus\00"
@.str.3 = [11 x i8] c"equal (MC)\00"
@.str.4 = [17 x i8] c"Carter poli-equ.\00"
@.str.5 = [18 x i8] c"Gauquelin sectors\00"
@.str.6 = [15 x i8] c"horizon/azimut\00"
@.str.7 = [9 x i8] c"Sunshine\00"
@.str.8 = [14 x i8] c"Sunshine/alt.\00"
@.str.9 = [5 x i8] c"Koch\00"
@.str.10 = [10 x i8] c"Pullen SD\00"
@.str.11 = [8 x i8] c"Morinus\00"
@.str.12 = [14 x i8] c"equal/1=Aries\00"
@.str.13 = [9 x i8] c"Porphyry\00"
@.str.14 = [10 x i8] c"Pullen SR\00"
@.str.15 = [14 x i8] c"Regiomontanus\00"
@.str.16 = [8 x i8] c"Sripati\00"
@.str.17 = [12 x i8] c"Polich/Page\00"
@.str.18 = [23 x i8] c"Krusinski-Pisa-Goelzer\00"
@.str.19 = [13 x i8] c"equal/Vehlow\00"
@.str.20 = [18 x i8] c"equal/ whole sign\00"
@.str.21 = [38 x i8] c"axial rotation system/Meridian houses\00"
@.str.22 = [11 x i8] c"APC houses\00"
@.str.23 = [9 x i8] c"Placidus\00"
@reltable.swe_house_name = [41 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.1 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.2 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.3 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.4 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.5 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.6 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.7 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.9 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.10 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.11 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.12 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.13 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.14 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.15 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.16 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.17 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.18 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.19 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.20 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str.21 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.22 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.23 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.8 to i64), i64 ptrtoint ([41 x i32]* @reltable.swe_house_name to i64)) to i32)]
define i8* @swe_house_name(i32 %0) {
%2 = icmp eq i32 %0, 105
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @toupper(i32 %0)
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 41
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = sext i32 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([41 x i32]* @reltable.swe_house_name to i8*), i64 %9)
br label %11
11: ; preds = %3, %1, %7
%12 = phi i8* [ %10, %7 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), %1 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), %3 ]
ret i8* %12
}