char *arch_get_reg_name(int reg, int size) {
  char *name = "";
  if (reg == 0) {
    if (size == 1) {
      name = "%al";
    } else if (size == 2) {
      name = "%ax";
    } else if (size == 4) {
      name = "%eax";
    } else if (size == 8) {
      name = "%rax";
    }
  } else if (reg == 1) {
    if (size == 1) {
      name = "%bl";
    } else if (size == 2) {
      name = "%bx";
    } else if (size == 4) {
      name = "%ebx";
    } else if (size == 8) {
      name = "%rbx";
    }
  } else if (reg == 2) {
    if (size == 1) {
      name = "%cl";
    } else if (size == 2) {
      name = "%cx";
    } else if (size == 4) {
      name = "%ecx";
    } else if (size == 8) {
      name = "%rcx";
    }
  } else if (reg == 3) {
    if (size == 1) {
      name = "%dl";
    } else if (size == 2) {
      name = "%dx";
    } else if (size == 4) {
      name = "%edx";
    } else if (size == 8) {
      name = "%rdx";
    }
  } else if (reg == 4) {
    if (size == 2) {
      name = "%si";
    } else if (size == 4) {
      name = "%esi";
    } else if (size == 8) {
      name = "%rsi";
    }
  } else if (reg == 5) {
    if (size == 2) {
      name = "%di";
    } else if (size == 4) {
      name = "%edi";
    } else if (size == 8) {
      name = "%rdi";
    }
  }
  return name;
}


x86 assembly (clang, -O0):
<arch_get_reg_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xf48(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1196 <arch_get_reg_name+0x96>
cmpl   $0x1,-0x8(%rbp)
jne    1139 <arch_get_reg_name+0x39>
lea    0xed0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1191 <arch_get_reg_name+0x91>
cmpl   $0x2,-0x8(%rbp)
jne    1153 <arch_get_reg_name+0x53>
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    118c <arch_get_reg_name+0x8c>
cmpl   $0x4,-0x8(%rbp)
jne    116d <arch_get_reg_name+0x6d>
lea    0xea4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1187 <arch_get_reg_name+0x87>
cmpl   $0x8,-0x8(%rbp)
jne    1182 <arch_get_reg_name+0x82>
lea    0xe8f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1187 <arch_get_reg_name+0x87>
jmp    118c <arch_get_reg_name+0x8c>
jmp    1191 <arch_get_reg_name+0x91>
jmp    13f6 <arch_get_reg_name+0x2f6>
cmpl   $0x1,-0x4(%rbp)
jne    1217 <arch_get_reg_name+0x117>
cmpl   $0x1,-0x8(%rbp)
jne    11ba <arch_get_reg_name+0xba>
lea    0xe61(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <arch_get_reg_name+0x112>
cmpl   $0x2,-0x8(%rbp)
jne    11d4 <arch_get_reg_name+0xd4>
lea    0xe4b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    120d <arch_get_reg_name+0x10d>
cmpl   $0x4,-0x8(%rbp)
jne    11ee <arch_get_reg_name+0xee>
lea    0xe35(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1208 <arch_get_reg_name+0x108>
cmpl   $0x8,-0x8(%rbp)
jne    1203 <arch_get_reg_name+0x103>
lea    0xe20(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1208 <arch_get_reg_name+0x108>
jmp    120d <arch_get_reg_name+0x10d>
jmp    1212 <arch_get_reg_name+0x112>
jmp    13f1 <arch_get_reg_name+0x2f1>
cmpl   $0x2,-0x4(%rbp)
jne    1298 <arch_get_reg_name+0x198>
cmpl   $0x1,-0x8(%rbp)
jne    123b <arch_get_reg_name+0x13b>
lea    0xdf2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1293 <arch_get_reg_name+0x193>
cmpl   $0x2,-0x8(%rbp)
jne    1255 <arch_get_reg_name+0x155>
lea    0xddc(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    128e <arch_get_reg_name+0x18e>
cmpl   $0x4,-0x8(%rbp)
jne    126f <arch_get_reg_name+0x16f>
lea    0xdc6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1289 <arch_get_reg_name+0x189>
cmpl   $0x8,-0x8(%rbp)
jne    1284 <arch_get_reg_name+0x184>
lea    0xdb1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1289 <arch_get_reg_name+0x189>
jmp    128e <arch_get_reg_name+0x18e>
jmp    1293 <arch_get_reg_name+0x193>
jmp    13ec <arch_get_reg_name+0x2ec>
cmpl   $0x3,-0x4(%rbp)
jne    1319 <arch_get_reg_name+0x219>
cmpl   $0x1,-0x8(%rbp)
jne    12bc <arch_get_reg_name+0x1bc>
lea    0xd83(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1314 <arch_get_reg_name+0x214>
cmpl   $0x2,-0x8(%rbp)
jne    12d6 <arch_get_reg_name+0x1d6>
lea    0xd6d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    130f <arch_get_reg_name+0x20f>
cmpl   $0x4,-0x8(%rbp)
jne    12f0 <arch_get_reg_name+0x1f0>
lea    0xd57(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    130a <arch_get_reg_name+0x20a>
cmpl   $0x8,-0x8(%rbp)
jne    1305 <arch_get_reg_name+0x205>
lea    0xd42(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    130a <arch_get_reg_name+0x20a>
jmp    130f <arch_get_reg_name+0x20f>
jmp    1314 <arch_get_reg_name+0x214>
jmp    13e7 <arch_get_reg_name+0x2e7>
cmpl   $0x4,-0x4(%rbp)
jne    137b <arch_get_reg_name+0x27b>
cmpl   $0x2,-0x8(%rbp)
jne    133d <arch_get_reg_name+0x23d>
lea    0xd14(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1376 <arch_get_reg_name+0x276>
cmpl   $0x4,-0x8(%rbp)
jne    1357 <arch_get_reg_name+0x257>
lea    0xcfe(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1371 <arch_get_reg_name+0x271>
cmpl   $0x8,-0x8(%rbp)
jne    136c <arch_get_reg_name+0x26c>
lea    0xce9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1371 <arch_get_reg_name+0x271>
jmp    1376 <arch_get_reg_name+0x276>
jmp    13e2 <arch_get_reg_name+0x2e2>
cmpl   $0x5,-0x4(%rbp)
jne    13dd <arch_get_reg_name+0x2dd>
cmpl   $0x2,-0x8(%rbp)
jne    139f <arch_get_reg_name+0x29f>
lea    0xcc0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13d8 <arch_get_reg_name+0x2d8>
cmpl   $0x4,-0x8(%rbp)
jne    13b9 <arch_get_reg_name+0x2b9>
lea    0xcaa(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13d3 <arch_get_reg_name+0x2d3>
cmpl   $0x8,-0x8(%rbp)
jne    13ce <arch_get_reg_name+0x2ce>
lea    0xc95(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    13d3 <arch_get_reg_name+0x2d3>
jmp    13d8 <arch_get_reg_name+0x2d8>
jmp    13dd <arch_get_reg_name+0x2dd>
jmp    13e2 <arch_get_reg_name+0x2e2>
jmp    13e7 <arch_get_reg_name+0x2e7>
jmp    13ec <arch_get_reg_name+0x2ec>
jmp    13f1 <arch_get_reg_name+0x2f1>
jmp    13f6 <arch_get_reg_name+0x2f6>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_get_reg_name>:
lea    0xf6a(%rip),%rax
cmp    $0x5,%edi
ja     119f <arch_get_reg_name+0x9f>
mov    %edi,%ecx
lea    0xee7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
add    $0xffffffff,%esi
cmp    $0x8,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2bac(%rip),%rcx
jmp    1198 <arch_get_reg_name+0x98>
add    $0xffffffff,%esi
cmp    $0x8,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2bd8(%rip),%rcx
jmp    1198 <arch_get_reg_name+0x98>
add    $0xffffffff,%esi
cmp    $0x8,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2c04(%rip),%rcx
jmp    1198 <arch_get_reg_name+0x98>
add    $0xffffffff,%esi
cmp    $0x8,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2c30(%rip),%rcx
jmp    1198 <arch_get_reg_name+0x98>
add    $0xfffffffe,%esi
cmp    $0x7,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2c5c(%rip),%rcx
jmp    1198 <arch_get_reg_name+0x98>
add    $0xfffffffe,%esi
cmp    $0x7,%esi
jae    119f <arch_get_reg_name+0x9f>
movslq %esi,%rax
lea    0x2c80(%rip),%rcx
lea    (%rcx,%rax,8),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%al\00"
@.str.2 = [4 x i8] c"%ax\00"
@.str.3 = [5 x i8] c"%eax\00"
@.str.4 = [5 x i8] c"%rax\00"
@.str.5 = [4 x i8] c"%bl\00"
@.str.6 = [4 x i8] c"%bx\00"
@.str.7 = [5 x i8] c"%ebx\00"
@.str.8 = [5 x i8] c"%rbx\00"
@.str.9 = [4 x i8] c"%cl\00"
@.str.10 = [4 x i8] c"%cx\00"
@.str.11 = [5 x i8] c"%ecx\00"
@.str.12 = [5 x i8] c"%rcx\00"
@.str.13 = [4 x i8] c"%dl\00"
@.str.14 = [4 x i8] c"%dx\00"
@.str.15 = [5 x i8] c"%edx\00"
@.str.16 = [5 x i8] c"%rdx\00"
@.str.17 = [4 x i8] c"%si\00"
@.str.18 = [5 x i8] c"%esi\00"
@.str.19 = [5 x i8] c"%rsi\00"
@.str.20 = [4 x i8] c"%di\00"
@.str.21 = [5 x i8] c"%edi\00"
@.str.22 = [5 x i8] c"%rdi\00"
define i8* @arch_get_reg_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %28
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %8
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
br label %27
12: ; preds = %8
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %16
15: ; preds = %12
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %5
br label %26
16: ; preds = %12
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 4
br i1 %18, label %19, label %20
19: ; preds = %16
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %5
br label %25
20: ; preds = %16
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 8
br i1 %22, label %23, label %24
23: ; preds = %20
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %5
br label %24
24: ; preds = %23, %20
br label %25
25: ; preds = %24, %19
br label %26
26: ; preds = %25, %15
br label %27
27: ; preds = %26, %11
br label %138
28: ; preds = %2
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %51
31: ; preds = %28
%32 = load i32, i32* %4
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %35
34: ; preds = %31
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %5
br label %50
35: ; preds = %31
%36 = load i32, i32* %4
%37 = icmp eq i32 %36, 2
br i1 %37, label %38, label %39
38: ; preds = %35
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %5
br label %49
39: ; preds = %35
%40 = load i32, i32* %4
%41 = icmp eq i32 %40, 4
br i1 %41, label %42, label %43
42: ; preds = %39
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %5
br label %48
43: ; preds = %39
%44 = load i32, i32* %4
%45 = icmp eq i32 %44, 8
br i1 %45, label %46, label %47
46: ; preds = %43
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %5
br label %47
47: ; preds = %46, %43
br label %48
48: ; preds = %47, %42
br label %49
49: ; preds = %48, %38
br label %50
50: ; preds = %49, %34
br label %137
51: ; preds = %28
%52 = load i32, i32* %3
%53 = icmp eq i32 %52, 2
br i1 %53, label %54, label %74
54: ; preds = %51
%55 = load i32, i32* %4
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %58
57: ; preds = %54
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8** %5
br label %73
58: ; preds = %54
%59 = load i32, i32* %4
%60 = icmp eq i32 %59, 2
br i1 %60, label %61, label %62
61: ; preds = %58
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %5
br label %72
62: ; preds = %58
%63 = load i32, i32* %4
%64 = icmp eq i32 %63, 4
br i1 %64, label %65, label %66
65: ; preds = %62
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8** %5
br label %71
66: ; preds = %62
%67 = load i32, i32* %4
%68 = icmp eq i32 %67, 8
br i1 %68, label %69, label %70
69: ; preds = %66
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8** %5
br label %70
70: ; preds = %69, %66
br label %71
71: ; preds = %70, %65
br label %72
72: ; preds = %71, %61
br label %73
73: ; preds = %72, %57
br label %136
74: ; preds = %51
%75 = load i32, i32* %3
%76 = icmp eq i32 %75, 3
br i1 %76, label %77, label %97
77: ; preds = %74
%78 = load i32, i32* %4
%79 = icmp eq i32 %78, 1
br i1 %79, label %80, label %81
80: ; preds = %77
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8** %5
br label %96
81: ; preds = %77
%82 = load i32, i32* %4
%83 = icmp eq i32 %82, 2
br i1 %83, label %84, label %85
84: ; preds = %81
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8** %5
br label %95
85: ; preds = %81
%86 = load i32, i32* %4
%87 = icmp eq i32 %86, 4
br i1 %87, label %88, label %89
88: ; preds = %85
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8** %5
br label %94
89: ; preds = %85
%90 = load i32, i32* %4
%91 = icmp eq i32 %90, 8
br i1 %91, label %92, label %93
92: ; preds = %89
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8** %5
br label %93
93: ; preds = %92, %89
br label %94
94: ; preds = %93, %88
br label %95
95: ; preds = %94, %84
br label %96
96: ; preds = %95, %80
br label %135
97: ; preds = %74
%98 = load i32, i32* %3
%99 = icmp eq i32 %98, 4
br i1 %99, label %100, label %115
100: ; preds = %97
%101 = load i32, i32* %4
%102 = icmp eq i32 %101, 2
br i1 %102, label %103, label %104
103: ; preds = %100
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8** %5
br label %114
104: ; preds = %100
%105 = load i32, i32* %4
%106 = icmp eq i32 %105, 4
br i1 %106, label %107, label %108
107: ; preds = %104
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %5
br label %113
108: ; preds = %104
%109 = load i32, i32* %4
%110 = icmp eq i32 %109, 8
br i1 %110, label %111, label %112
111: ; preds = %108
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8** %5
br label %112
112: ; preds = %111, %108
br label %113
113: ; preds = %112, %107
br label %114
114: ; preds = %113, %103
br label %134
115: ; preds = %97
%116 = load i32, i32* %3
%117 = icmp eq i32 %116, 5
br i1 %117, label %118, label %133
118: ; preds = %115
%119 = load i32, i32* %4
%120 = icmp eq i32 %119, 2
br i1 %120, label %121, label %122
121: ; preds = %118
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8** %5
br label %132
122: ; preds = %118
%123 = load i32, i32* %4
%124 = icmp eq i32 %123, 4
br i1 %124, label %125, label %126
125: ; preds = %122
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8** %5
br label %131
126: ; preds = %122
%127 = load i32, i32* %4
%128 = icmp eq i32 %127, 8
br i1 %128, label %129, label %130
129: ; preds = %126
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i8** %5
br label %130
130: ; preds = %129, %126
br label %131
131: ; preds = %130, %125
br label %132
132: ; preds = %131, %121
br label %133
133: ; preds = %132, %115
br label %134
134: ; preds = %133, %114
br label %135
135: ; preds = %134, %96
br label %136
136: ; preds = %135, %73
br label %137
137: ; preds = %136, %50
br label %138
138: ; preds = %137, %27
%139 = load i8*, i8** %5
ret i8* %139
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%al\00"
@.str.2 = [4 x i8] c"%ax\00"
@.str.3 = [5 x i8] c"%eax\00"
@.str.4 = [5 x i8] c"%rax\00"
@.str.5 = [4 x i8] c"%bl\00"
@.str.6 = [4 x i8] c"%bx\00"
@.str.7 = [5 x i8] c"%ebx\00"
@.str.8 = [5 x i8] c"%rbx\00"
@.str.9 = [4 x i8] c"%cl\00"
@.str.10 = [4 x i8] c"%cx\00"
@.str.11 = [5 x i8] c"%ecx\00"
@.str.12 = [5 x i8] c"%rcx\00"
@.str.13 = [4 x i8] c"%dl\00"
@.str.14 = [4 x i8] c"%dx\00"
@.str.15 = [5 x i8] c"%edx\00"
@.str.16 = [5 x i8] c"%rdx\00"
@.str.17 = [4 x i8] c"%si\00"
@.str.18 = [5 x i8] c"%esi\00"
@.str.19 = [5 x i8] c"%rsi\00"
@.str.20 = [4 x i8] c"%di\00"
@.str.21 = [5 x i8] c"%edi\00"
@.str.22 = [5 x i8] c"%rdi\00"
@switch.table.arch_get_reg_name = [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)]
@switch.table.arch_get_reg_name.23 = [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0)]
@switch.table.arch_get_reg_name.24 = [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0)]
@switch.table.arch_get_reg_name.25 = [8 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0)]
@switch.table.arch_get_reg_name.26 = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0)]
@switch.table.arch_get_reg_name.27 = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0)]
define i8* @arch_get_reg_name(i32 %0, i32 %1) {
switch i32 %0, label %42 [
i32 0, label %3
i32 1, label %6
i32 2, label %9
i32 3, label %12
i32 4, label %15
i32 5, label %18
]
3: ; preds = %2
%4 = add i32 %1, -1
%5 = icmp ult i32 %4, 8
br i1 %5, label %21, label %42
6: ; preds = %2
%7 = add i32 %1, -1
%8 = icmp ult i32 %7, 8
br i1 %8, label %24, label %42
9: ; preds = %2
%10 = add i32 %1, -1
%11 = icmp ult i32 %10, 8
br i1 %11, label %27, label %42
12: ; preds = %2
%13 = add i32 %1, -1
%14 = icmp ult i32 %13, 8
br i1 %14, label %30, label %42
15: ; preds = %2
%16 = add i32 %1, -2
%17 = icmp ult i32 %16, 7
br i1 %17, label %33, label %42
18: ; preds = %2
%19 = add i32 %1, -2
%20 = icmp ult i32 %19, 7
br i1 %20, label %36, label %42
21: ; preds = %3
%22 = sext i32 %4 to i64
%23 = getelementptr inbounds [8 x i8*], [8 x i8*]* @switch.table.arch_get_reg_name, i64 0, i64 %22
br label %39
24: ; preds = %6
%25 = sext i32 %7 to i64
%26 = getelementptr inbounds [8 x i8*], [8 x i8*]* @switch.table.arch_get_reg_name.23, i64 0, i64 %25
br label %39
27: ; preds = %9
%28 = sext i32 %10 to i64
%29 = getelementptr inbounds [8 x i8*], [8 x i8*]* @switch.table.arch_get_reg_name.24, i64 0, i64 %28
br label %39
30: ; preds = %12
%31 = sext i32 %13 to i64
%32 = getelementptr inbounds [8 x i8*], [8 x i8*]* @switch.table.arch_get_reg_name.25, i64 0, i64 %31
br label %39
33: ; preds = %15
%34 = sext i32 %16 to i64
%35 = getelementptr inbounds [7 x i8*], [7 x i8*]* @switch.table.arch_get_reg_name.26, i64 0, i64 %34
br label %39
36: ; preds = %18
%37 = sext i32 %19 to i64
%38 = getelementptr inbounds [7 x i8*], [7 x i8*]* @switch.table.arch_get_reg_name.27, i64 0, i64 %37
br label %39
39: ; preds = %21, %24, %27, %30, %33, %36
%40 = phi i8** [ %38, %36 ], [ %35, %33 ], [ %32, %30 ], [ %29, %27 ], [ %26, %24 ], [ %23, %21 ]
%41 = load i8*, i8** %40
br label %42
42: ; preds = %39, %18, %15, %12, %9, %6, %3, %2
%43 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %3 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %6 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %9 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %12 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %15 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %18 ], [ %41, %39 ]
ret i8* %43
}