#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 /*<<< orphan*/ printf(char *);
void complex(int n, int a) {
  if (n == 1) {
    switch (a) {
    case 1:
      printf("ELEVEN ");
      break;
    case 2:
      printf("TWELVE ");
      break;
    case 3:
      printf("THIRTEEN ");
      break;
    case 4:
      printf("FOURTEEN ");
      break;
    case 5:
      printf("FIFTEEN ");
      break;
    case 6:
      printf("SIXTEEN ");
      break;
    case 7:
      printf("SEVENTEEN ");
      break;
    case 8:
      printf("EIGHTEEN ");
      break;
    case 9:
      printf("NINETEEN ");
      break;
    }
    return;
  }
  switch (n) {
  case 2:
    printf("TWENTY ");
    break;
  case 3:
    printf("THIRTY ");
    break;
  case 4:
    printf("FOURTY ");
    break;
  case 5:
    printf("FIFTY ");
    break;
  case 6:
    printf("SIXTY ");
    break;
  case 7:
    printf("SEVENTY ");
    break;
  case 8:
    printf("EIGHTY ");
    break;
  case 9:
    printf("NINETY ");
    break;
  }
}


x86 assembly (clang, -O0):
<complex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    11ea <complex+0xda>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     11e5 <complex+0xd5>
mov    -0x10(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <complex+0xd5>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
mov    -0x4(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x7,%eax
ja     1296 <complex+0x186>
mov    -0x18(%rbp),%rax
lea    0xdf6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    1296 <complex+0x186>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<complex>:
mov    %edi,%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     114f <complex+0x3f>
lea    0xf7c(%rip),%rdi
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0xffffffff,%esi
cmp    $0x9,%esi
jae    114f <complex+0x3f>
movslq %esi,%rax
lea    0xee1(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <printf@plt>
ret
lea    0xf4e(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf4a(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf46(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf51(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf35(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf30(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf35(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"ELEVEN \00"
@.str.1 = [8 x i8] c"TWELVE \00"
@.str.2 = [10 x i8] c"THIRTEEN \00"
@.str.3 = [10 x i8] c"FOURTEEN \00"
@.str.4 = [9 x i8] c"FIFTEEN \00"
@.str.5 = [9 x i8] c"SIXTEEN \00"
@.str.6 = [11 x i8] c"SEVENTEEN \00"
@.str.7 = [10 x i8] c"EIGHTEEN \00"
@.str.8 = [10 x i8] c"NINETEEN \00"
@.str.9 = [8 x i8] c"TWENTY \00"
@.str.10 = [8 x i8] c"THIRTY \00"
@.str.11 = [8 x i8] c"FOURTY \00"
@.str.12 = [7 x i8] c"FIFTY \00"
@.str.13 = [7 x i8] c"SIXTY \00"
@.str.14 = [9 x i8] c"SEVENTY \00"
@.str.15 = [8 x i8] c"EIGHTY \00"
@.str.16 = [8 x i8] c"NINETY \00"
define void @complex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %28
7: ; preds = %2
%8 = load i32, i32* %4
switch i32 %8, label %27 [
i32 1, label %9
i32 2, label %11
i32 3, label %13
i32 4, label %15
i32 5, label %17
i32 6, label %19
i32 7, label %21
i32 8, label %23
i32 9, label %25
]
9: ; preds = %7
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %27
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %27
13: ; preds = %7
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %27
15: ; preds = %7
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %27
17: ; preds = %7
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %27
19: ; preds = %7
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %27
21: ; preds = %7
%22 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
br label %27
23: ; preds = %7
%24 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %27
25: ; preds = %7
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %27
27: ; preds = %7, %25, %23, %21, %19, %17, %15, %13, %11, %9
br label %46
28: ; preds = %2
%29 = load i32, i32* %3
switch i32 %29, label %46 [
i32 2, label %30
i32 3, label %32
i32 4, label %34
i32 5, label %36
i32 6, label %38
i32 7, label %40
i32 8, label %42
i32 9, label %44
]
30: ; preds = %28
%31 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %46
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %46
34: ; preds = %28
%35 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
br label %46
36: ; preds = %28
%37 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
br label %46
38: ; preds = %28
%39 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %46
40: ; preds = %28
%41 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
br label %46
42: ; preds = %28
%43 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
br label %46
44: ; preds = %28
%45 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
br label %46
46: ; preds = %27, %28, %44, %42, %40, %38, %36, %34, %32, %30
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"ELEVEN \00"
@.str.1 = [8 x i8] c"TWELVE \00"
@.str.2 = [10 x i8] c"THIRTEEN \00"
@.str.3 = [10 x i8] c"FOURTEEN \00"
@.str.4 = [9 x i8] c"FIFTEEN \00"
@.str.5 = [9 x i8] c"SIXTEEN \00"
@.str.6 = [11 x i8] c"SEVENTEEN \00"
@.str.7 = [10 x i8] c"EIGHTEEN \00"
@.str.8 = [10 x i8] c"NINETEEN \00"
@.str.9 = [8 x i8] c"TWENTY \00"
@.str.10 = [8 x i8] c"THIRTY \00"
@.str.11 = [8 x i8] c"FOURTY \00"
@.str.12 = [7 x i8] c"FIFTY \00"
@.str.13 = [7 x i8] c"SIXTY \00"
@.str.14 = [9 x i8] c"SEVENTY \00"
@.str.15 = [8 x i8] c"EIGHTY \00"
@.str.16 = [8 x i8] c"NINETY \00"
@reltable.complex = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.5 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.6 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.7 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.8 to i64), i64 ptrtoint ([9 x i32]* @reltable.complex to i64)) to i32)]
define void @complex(i32 %0, i32 %1) {
switch i32 %0, label %20 [
i32 1, label %3
i32 2, label %17
i32 3, label %6
i32 4, label %7
i32 5, label %8
i32 6, label %9
i32 7, label %10
i32 8, label %11
i32 9, label %12
]
3: ; preds = %2
%4 = add i32 %1, -1
%5 = icmp ult i32 %4, 9
br i1 %5, label %13, label %20
6: ; preds = %2
br label %17
7: ; preds = %2
br label %17
8: ; preds = %2
br label %17
9: ; preds = %2
br label %17
10: ; preds = %2
br label %17
11: ; preds = %2
br label %17
12: ; preds = %2
br label %17
13: ; preds = %3
%14 = sext i32 %4 to i64
%15 = shl i64 %14, 2
%16 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.complex to i8*), i64 %15)
br label %17
17: ; preds = %13, %2, %6, %7, %8, %9, %10, %11, %12
%18 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), %11 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), %10 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), %9 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), %8 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), %6 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %2 ], [ %16, %13 ]
%19 = tail call i32 @printf(i8* dereferenceable(1) %18)
br label %20
20: ; preds = %3, %17, %2
ret void
}