#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 show_sas_phy_event_info(int peis, unsigned int val, unsigned thresh_val) {
  unsigned int u;
  switch (peis) {
  case 0:
    printf("     No event\n");
    break;
  case 0x1:
    printf("     Invalid word count: %u\n", val);
    break;
  case 0x2:
    printf("     Running disparity error count: %u\n", val);
    break;
  case 0x3:
    printf("     Loss of dword synchronization count: %u\n", val);
    break;
  case 0x4:
    printf("     Phy reset problem count: %u\n", val);
    break;
  case 0x5:
    printf("     Elasticity buffer overflow count: %u\n", val);
    break;
  case 0x6:
    printf("     Received ERROR  count: %u\n", val);
    break;
  case 0x20:
    printf("     Received address frame error count: %u\n", val);
    break;
  case 0x21:
    printf("     Transmitted abandon-class OPEN_REJECT count: %u\n", val);
    break;
  case 0x22:
    printf("     Received abandon-class OPEN_REJECT count: %u\n", val);
    break;
  case 0x23:
    printf("     Transmitted retry-class OPEN_REJECT count: %u\n", val);
    break;
  case 0x24:
    printf("     Received retry-class OPEN_REJECT count: %u\n", val);
    break;
  case 0x25:
    printf("     Received AIP (WATING ON PARTIAL) count: %u\n", val);
    break;
  case 0x26:
    printf("     Received AIP (WAITING ON CONNECTION) count: %u\n", val);
    break;
  case 0x27:
    printf("     Transmitted BREAK count: %u\n", val);
    break;
  case 0x28:
    printf("     Received BREAK count: %u\n", val);
    break;
  case 0x29:
    printf("     Break timeout count: %u\n", val);
    break;
  case 0x2a:
    printf("     Connection count: %u\n", val);
    break;
  case 0x2b:
    printf("     Peak transmitted pathway blocked count: %u\n", val & 0xff);
    printf("         Peak value detector threshold: %u\n", thresh_val & 0xff);
    break;
  case 0x2c:
    u = val & 0xffff;
    if (u < 0x8000)
      printf("     Peak transmitted arbitration wait time (us): "
             "%u\n",
             u);
    else
      printf("     Peak transmitted arbitration wait time (ms): "
             "%u\n",
             33 + (u - 0x8000));
    u = thresh_val & 0xffff;
    if (u < 0x8000)
      printf("         Peak value detector threshold (us): %u\n", u);
    else
      printf("         Peak value detector threshold (ms): %u\n",
             33 + (u - 0x8000));
    break;
  case 0x2d:
    printf("     Peak arbitration time (us): %u\n", val);
    printf("         Peak value detector threshold: %u\n", thresh_val);
    break;
  case 0x2e:
    printf("     Peak connection time (us): %u\n", val);
    printf("         Peak value detector threshold: %u\n", thresh_val);
    break;
  case 0x40:
    printf("     Transmitted SSP frame count: %u\n", val);
    break;
  case 0x41:
    printf("     Received SSP frame count: %u\n", val);
    break;
  case 0x42:
    printf("     Transmitted SSP frame error count: %u\n", val);
    break;
  case 0x43:
    printf("     Received SSP frame error count: %u\n", val);
    break;
  case 0x44:
    printf("     Transmitted CREDIT_BLOCKED count: %u\n", val);
    break;
  case 0x45:
    printf("     Received CREDIT_BLOCKED count: %u\n", val);
    break;
  case 0x50:
    printf("     Transmitted SATA frame count: %u\n", val);
    break;
  case 0x51:
    printf("     Received SATA frame count: %u\n", val);
    break;
  case 0x52:
    printf("     SATA flow control buffer overflow count: %u\n", val);
    break;
  case 0x60:
    printf("     Transmitted SMP frame count: %u\n", val);
    break;
  case 0x61:
    printf("     Received SMP frame count: %u\n", val);
    break;
  case 0x63:
    printf("     Received SMP frame error count: %u\n", val);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<show_sas_phy_event_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x63,%rax
ja     14ed <show_sas_phy_event_info+0x3dd>
mov    -0x18(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1043(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x103c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1043(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1055(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x106d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1079(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x108e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1098(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x10af(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x10cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x10ec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x110a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1125(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1140(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x115f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x116b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1174(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x117c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
lea    0x117b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
and    $0xff,%esi
lea    0x1195(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x8000,-0x10(%rbp)
jae    1330 <show_sas_phy_event_info+0x220>
mov    -0x10(%rbp),%esi
lea    0x1193(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    134a <show_sas_phy_event_info+0x23a>
mov    -0x10(%rbp),%esi
sub    $0x8000,%esi
add    $0x21,%esi
lea    0x11aa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x8000,-0x10(%rbp)
jae    1378 <show_sas_phy_event_info+0x268>
mov    -0x10(%rbp),%esi
lea    0x11b7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1392 <show_sas_phy_event_info+0x282>
mov    -0x10(%rbp),%esi
sub    $0x8000,%esi
add    $0x21,%esi
lea    0x11c9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x11e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0x10d9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x11e2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0x10b2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x11df(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x11ef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x11fc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1212(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1225(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x123a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x124c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x125d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x126b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1287(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x1297(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
mov    -0x8(%rbp),%esi
lea    0x12a4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
jmp    14f2 <show_sas_phy_event_info+0x3e2>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_sas_phy_event_info>:
push   %rbx
cmp    $0x63,%edi
ja     1238 <show_sas_phy_event_info+0x118>
mov    %edx,%ebx
mov    %edi,%eax
lea    0xecb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x165a(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
lea    0x114b(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x11a8(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1201(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1226(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
movzbl %sil,%esi
lea    0x12c5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl %bl,%esi
lea    0x12e5(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x13f8(%rip),%rdi
jmp    12a9 <show_sas_phy_event_info+0x189>
lea    0x1410(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x142a(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x146d(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x14dd(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1574(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x158b(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0xf99(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0xfaa(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0xfc6(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0xfe8(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0xffe(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x101d(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
pop    %rbx
ret
lea    0x102f(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1086(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x10e1(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x116c(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1182(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1195(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x11a7(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
movzwl %si,%esi
cmp    $0x7fff,%esi
ja     12f1 <show_sas_phy_event_info+0x1d1>
lea    0x1208(%rip),%rdi
jmp    12fe <show_sas_phy_event_info+0x1de>
lea    0x12cd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x11c5(%rip),%rdi
mov    %ebx,%esi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1346(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1392(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x13b4(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x13fa(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x1415(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
lea    0x143e(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
add    $0xffff8021,%esi
lea    0x11e0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzwl %bx,%esi
cmp    $0x7fff,%esi
ja     1319 <show_sas_phy_event_info+0x1f9>
lea    0x11fd(%rip),%rdi
jmp    1326 <show_sas_phy_event_info+0x206>
add    $0xffff8021,%esi
lea    0x121f(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c" No event\0A\00"
@.str.1 = [29 x i8] c" Invalid word count: %u\0A\00"
@.str.2 = [40 x i8] c" Running disparity error count: %u\0A\00"
@.str.3 = [46 x i8] c" Loss of dword synchronization count: %u\0A\00"
@.str.4 = [34 x i8] c" Phy reset problem count: %u\0A\00"
@.str.5 = [43 x i8] c" Elasticity buffer overflow count: %u\0A\00"
@.str.6 = [32 x i8] c" Received ERROR count: %u\0A\00"
@.str.7 = [45 x i8] c" Received address frame error count: %u\0A\00"
@.str.8 = [54 x i8] c" Transmitted abandon-class OPEN_REJECT count: %u\0A\00"
@.str.9 = [51 x i8] c" Received abandon-class OPEN_REJECT count: %u\0A\00"
@.str.10 = [52 x i8] c" Transmitted retry-class OPEN_REJECT count: %u\0A\00"
@.str.11 = [49 x i8] c" Received retry-class OPEN_REJECT count: %u\0A\00"
@.str.12 = [49 x i8] c" Received AIP (WATING ON PARTIAL) count: %u\0A\00"
@.str.13 = [53 x i8] c" Received AIP (WAITING ON CONNECTION) count: %u\0A\00"
@.str.14 = [34 x i8] c" Transmitted BREAK count: %u\0A\00"
@.str.15 = [31 x i8] c" Received BREAK count: %u\0A\00"
@.str.16 = [30 x i8] c" Break timeout count: %u\0A\00"
@.str.17 = [27 x i8] c" Connection count: %u\0A\00"
@.str.18 = [49 x i8] c" Peak transmitted pathway blocked count: %u\0A\00"
@.str.19 = [44 x i8] c" Peak value detector threshold: %u\0A\00"
@.str.20 = [54 x i8] c" Peak transmitted arbitration wait time (us): %u\0A\00"
@.str.21 = [54 x i8] c" Peak transmitted arbitration wait time (ms): %u\0A\00"
@.str.22 = [49 x i8] c" Peak value detector threshold (us): %u\0A\00"
@.str.23 = [49 x i8] c" Peak value detector threshold (ms): %u\0A\00"
@.str.24 = [37 x i8] c" Peak arbitration time (us): %u\0A\00"
@.str.25 = [36 x i8] c" Peak connection time (us): %u\0A\00"
@.str.26 = [38 x i8] c" Transmitted SSP frame count: %u\0A\00"
@.str.27 = [35 x i8] c" Received SSP frame count: %u\0A\00"
@.str.28 = [44 x i8] c" Transmitted SSP frame error count: %u\0A\00"
@.str.29 = [41 x i8] c" Received SSP frame error count: %u\0A\00"
@.str.30 = [43 x i8] c" Transmitted CREDIT_BLOCKED count: %u\0A\00"
@.str.31 = [40 x i8] c" Received CREDIT_BLOCKED count: %u\0A\00"
@.str.32 = [39 x i8] c" Transmitted SATA frame count: %u\0A\00"
@.str.33 = [36 x i8] c" Received SATA frame count: %u\0A\00"
@.str.34 = [50 x i8] c" SATA flow control buffer overflow count: %u\0A\00"
@.str.35 = [38 x i8] c" Transmitted SMP frame count: %u\0A\00"
@.str.36 = [35 x i8] c" Received SMP frame count: %u\0A\00"
@.str.37 = [41 x i8] c" Received SMP frame error count: %u\0A\00"
define void @show_sas_phy_event_info(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
switch i32 %8, label %142 [
i32 0, label %9
i32 1, label %11
i32 2, label %14
i32 3, label %17
i32 4, label %20
i32 5, label %23
i32 6, label %26
i32 32, label %29
i32 33, label %32
i32 34, label %35
i32 35, label %38
i32 36, label %41
i32 37, label %44
i32 38, label %47
i32 39, label %50
i32 40, label %53
i32 41, label %56
i32 42, label %59
i32 43, label %62
i32 44, label %69
i32 45, label %96
i32 46, label %101
i32 64, label %106
i32 65, label %109
i32 66, label %112
i32 67, label %115
i32 68, label %118
i32 69, label %121
i32 80, label %124
i32 81, label %127
i32 82, label %130
i32 96, label %133
i32 97, label %136
i32 99, label %139
]
9: ; preds = %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %143
11: ; preds = %3
%12 = load i32, i32* %5
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %143
14: ; preds = %3
%15 = load i32, i32* %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %143
17: ; preds = %3
%18 = load i32, i32* %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %18)
br label %143
20: ; preds = %3
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %21)
br label %143
23: ; preds = %3
%24 = load i32, i32* %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %24)
br label %143
26: ; preds = %3
%27 = load i32, i32* %5
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %27)
br label %143
29: ; preds = %3
%30 = load i32, i32* %5
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %30)
br label %143
32: ; preds = %3
%33 = load i32, i32* %5
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 %33)
br label %143
35: ; preds = %3
%36 = load i32, i32* %5
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %36)
br label %143
38: ; preds = %3
%39 = load i32, i32* %5
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %39)
br label %143
41: ; preds = %3
%42 = load i32, i32* %5
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0), i32 %42)
br label %143
44: ; preds = %3
%45 = load i32, i32* %5
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), i32 %45)
br label %143
47: ; preds = %3
%48 = load i32, i32* %5
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0), i32 %48)
br label %143
50: ; preds = %3
%51 = load i32, i32* %5
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i32 %51)
br label %143
53: ; preds = %3
%54 = load i32, i32* %5
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0), i32 %54)
br label %143
56: ; preds = %3
%57 = load i32, i32* %5
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i32 %57)
br label %143
59: ; preds = %3
%60 = load i32, i32* %5
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i32 %60)
br label %143
62: ; preds = %3
%63 = load i32, i32* %5
%64 = and i32 %63, 255
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.18, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %6
%67 = and i32 %66, 255
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %67)
br label %143
69: ; preds = %3
%70 = load i32, i32* %5
%71 = and i32 %70, 65535
store i32 %71, i32* %7
%72 = load i32, i32* %7
%73 = icmp ult i32 %72, 32768
br i1 %73, label %74, label %77
74: ; preds = %69
%75 = load i32, i32* %7
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.20, i64 0, i64 0), i32 %75)
br label %82
77: ; preds = %69
%78 = load i32, i32* %7
%79 = sub i32 %78, 32768
%80 = add i32 33, %79
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.21, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %77, %74
%83 = load i32, i32* %6
%84 = and i32 %83, 65535
store i32 %84, i32* %7
%85 = load i32, i32* %7
%86 = icmp ult i32 %85, 32768
br i1 %86, label %87, label %90
87: ; preds = %82
%88 = load i32, i32* %7
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.22, i64 0, i64 0), i32 %88)
br label %95
90: ; preds = %82
%91 = load i32, i32* %7
%92 = sub i32 %91, 32768
%93 = add i32 33, %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.23, i64 0, i64 0), i32 %93)
br label %95
95: ; preds = %90, %87
br label %143
96: ; preds = %3
%97 = load i32, i32* %5
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.24, i64 0, i64 0), i32 %97)
%99 = load i32, i32* %6
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %99)
br label %143
101: ; preds = %3
%102 = load i32, i32* %5
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0), i32 %102)
%104 = load i32, i32* %6
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %104)
br label %143
106: ; preds = %3
%107 = load i32, i32* %5
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.26, i64 0, i64 0), i32 %107)
br label %143
109: ; preds = %3
%110 = load i32, i32* %5
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.27, i64 0, i64 0), i32 %110)
br label %143
112: ; preds = %3
%113 = load i32, i32* %5
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.28, i64 0, i64 0), i32 %113)
br label %143
115: ; preds = %3
%116 = load i32, i32* %5
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.29, i64 0, i64 0), i32 %116)
br label %143
118: ; preds = %3
%119 = load i32, i32* %5
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.30, i64 0, i64 0), i32 %119)
br label %143
121: ; preds = %3
%122 = load i32, i32* %5
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i32 %122)
br label %143
124: ; preds = %3
%125 = load i32, i32* %5
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.32, i64 0, i64 0), i32 %125)
br label %143
127: ; preds = %3
%128 = load i32, i32* %5
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0), i32 %128)
br label %143
130: ; preds = %3
%131 = load i32, i32* %5
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.34, i64 0, i64 0), i32 %131)
br label %143
133: ; preds = %3
%134 = load i32, i32* %5
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.35, i64 0, i64 0), i32 %134)
br label %143
136: ; preds = %3
%137 = load i32, i32* %5
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.36, i64 0, i64 0), i32 %137)
br label %143
139: ; preds = %3
%140 = load i32, i32* %5
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.37, i64 0, i64 0), i32 %140)
br label %143
142: ; preds = %3
br label %143
143: ; preds = %142, %139, %136, %133, %130, %127, %124, %121, %118, %115, %112, %109, %106, %101, %96, %95, %62, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %9
ret void
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c" Invalid word count: %u\0A\00"
@.str.2 = [40 x i8] c" Running disparity error count: %u\0A\00"
@.str.3 = [46 x i8] c" Loss of dword synchronization count: %u\0A\00"
@.str.4 = [34 x i8] c" Phy reset problem count: %u\0A\00"
@.str.5 = [43 x i8] c" Elasticity buffer overflow count: %u\0A\00"
@.str.6 = [32 x i8] c" Received ERROR count: %u\0A\00"
@.str.7 = [45 x i8] c" Received address frame error count: %u\0A\00"
@.str.8 = [54 x i8] c" Transmitted abandon-class OPEN_REJECT count: %u\0A\00"
@.str.9 = [51 x i8] c" Received abandon-class OPEN_REJECT count: %u\0A\00"
@.str.10 = [52 x i8] c" Transmitted retry-class OPEN_REJECT count: %u\0A\00"
@.str.11 = [49 x i8] c" Received retry-class OPEN_REJECT count: %u\0A\00"
@.str.12 = [49 x i8] c" Received AIP (WATING ON PARTIAL) count: %u\0A\00"
@.str.13 = [53 x i8] c" Received AIP (WAITING ON CONNECTION) count: %u\0A\00"
@.str.14 = [34 x i8] c" Transmitted BREAK count: %u\0A\00"
@.str.15 = [31 x i8] c" Received BREAK count: %u\0A\00"
@.str.16 = [30 x i8] c" Break timeout count: %u\0A\00"
@.str.17 = [27 x i8] c" Connection count: %u\0A\00"
@.str.18 = [49 x i8] c" Peak transmitted pathway blocked count: %u\0A\00"
@.str.19 = [44 x i8] c" Peak value detector threshold: %u\0A\00"
@.str.20 = [54 x i8] c" Peak transmitted arbitration wait time (us): %u\0A\00"
@.str.21 = [54 x i8] c" Peak transmitted arbitration wait time (ms): %u\0A\00"
@.str.22 = [49 x i8] c" Peak value detector threshold (us): %u\0A\00"
@.str.23 = [49 x i8] c" Peak value detector threshold (ms): %u\0A\00"
@.str.24 = [37 x i8] c" Peak arbitration time (us): %u\0A\00"
@.str.25 = [36 x i8] c" Peak connection time (us): %u\0A\00"
@.str.26 = [38 x i8] c" Transmitted SSP frame count: %u\0A\00"
@.str.27 = [35 x i8] c" Received SSP frame count: %u\0A\00"
@.str.28 = [44 x i8] c" Transmitted SSP frame error count: %u\0A\00"
@.str.29 = [41 x i8] c" Received SSP frame error count: %u\0A\00"
@.str.30 = [43 x i8] c" Transmitted CREDIT_BLOCKED count: %u\0A\00"
@.str.31 = [40 x i8] c" Received CREDIT_BLOCKED count: %u\0A\00"
@.str.32 = [39 x i8] c" Transmitted SATA frame count: %u\0A\00"
@.str.33 = [36 x i8] c" Received SATA frame count: %u\0A\00"
@.str.34 = [50 x i8] c" SATA flow control buffer overflow count: %u\0A\00"
@.str.35 = [38 x i8] c" Transmitted SMP frame count: %u\0A\00"
@.str.36 = [35 x i8] c" Received SMP frame count: %u\0A\00"
@.str.37 = [41 x i8] c" Received SMP frame error count: %u\0A\00"
@str = [14 x i8] c" No event\00"
define void @show_sas_phy_event_info(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %91 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
i32 5, label %14
i32 6, label %16
i32 32, label %18
i32 33, label %20
i32 34, label %22
i32 35, label %24
i32 36, label %26
i32 37, label %28
i32 38, label %30
i32 39, label %32
i32 40, label %34
i32 41, label %36
i32 42, label %38
i32 43, label %40
i32 44, label %45
i32 45, label %61
i32 46, label %64
i32 64, label %67
i32 65, label %69
i32 66, label %71
i32 67, label %73
i32 68, label %75
i32 69, label %77
i32 80, label %79
i32 81, label %81
i32 82, label %83
i32 96, label %85
i32 97, label %87
i32 99, label %89
]
4: ; preds = %3
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %91
6: ; preds = %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %91
8: ; preds = %3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 %1)
br label %91
10: ; preds = %3
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %1)
br label %91
12: ; preds = %3
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %1)
br label %91
14: ; preds = %3
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %1)
br label %91
16: ; preds = %3
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %1)
br label %91
18: ; preds = %3
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i32 %1)
br label %91
20: ; preds = %3
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 %1)
br label %91
22: ; preds = %3
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %1)
br label %91
24: ; preds = %3
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %1)
br label %91
26: ; preds = %3
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0), i32 %1)
br label %91
28: ; preds = %3
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), i32 %1)
br label %91
30: ; preds = %3
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0), i32 %1)
br label %91
32: ; preds = %3
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i32 %1)
br label %91
34: ; preds = %3
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i64 0, i64 0), i32 %1)
br label %91
36: ; preds = %3
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i32 %1)
br label %91
38: ; preds = %3
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i32 %1)
br label %91
40: ; preds = %3
%41 = and i32 %1, 255
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.18, i64 0, i64 0), i32 %41)
%43 = and i32 %2, 255
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %43)
br label %91
45: ; preds = %3
%46 = and i32 %1, 65535
%47 = icmp ult i32 %46, 32768
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.20, i64 0, i64 0), i32 %46)
br label %53
50: ; preds = %45
%51 = add nsw i32 %46, -32735
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.21, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %50, %48
%54 = and i32 %2, 65535
%55 = icmp ult i32 %54, 32768
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.22, i64 0, i64 0), i32 %54)
br label %91
58: ; preds = %53
%59 = add nsw i32 %54, -32735
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.23, i64 0, i64 0), i32 %59)
br label %91
61: ; preds = %3
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.24, i64 0, i64 0), i32 %1)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %2)
br label %91
64: ; preds = %3
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0), i32 %1)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0), i32 %2)
br label %91
67: ; preds = %3
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.26, i64 0, i64 0), i32 %1)
br label %91
69: ; preds = %3
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.27, i64 0, i64 0), i32 %1)
br label %91
71: ; preds = %3
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.28, i64 0, i64 0), i32 %1)
br label %91
73: ; preds = %3
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.29, i64 0, i64 0), i32 %1)
br label %91
75: ; preds = %3
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.30, i64 0, i64 0), i32 %1)
br label %91
77: ; preds = %3
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i32 %1)
br label %91
79: ; preds = %3
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.32, i64 0, i64 0), i32 %1)
br label %91
81: ; preds = %3
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0), i32 %1)
br label %91
83: ; preds = %3
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.34, i64 0, i64 0), i32 %1)
br label %91
85: ; preds = %3
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.35, i64 0, i64 0), i32 %1)
br label %91
87: ; preds = %3
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.36, i64 0, i64 0), i32 %1)
br label %91
89: ; preds = %3
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.37, i64 0, i64 0), i32 %1)
br label %91
91: ; preds = %3, %56, %58, %89, %87, %85, %83, %81, %79, %77, %75, %73, %71, %69, %67, %64, %61, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
ret void
}