#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*/ display_error(int);
void raiseInterrupt(int iInterruptType) {
  switch (iInterruptType) {
  case 0:
    display_error(0);
    break;
  case 1:
    display_error(1);
    break;
  case 2:
    display_error(2);
    break;
  case 3:
    display_error(3);
    break;
  case 4:
    display_error(4);
    break;
  case 5:
    display_error(5);
    break;
  case 6:
    display_error(6);
    break;
  case 7:
    display_error(7);
  case 8:
    display_error(8);
    break;
  }
}


x86 assembly (clang, -O0):
<raiseInterrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x8,%rax
ja     11ba <raiseInterrupt+0xaa>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %edi,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x1,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x2,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x3,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x4,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x5,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x6,%edi
call   1030 <display_error@plt>
jmp    11ba <raiseInterrupt+0xaa>
mov    $0x7,%edi
call   1030 <display_error@plt>
mov    $0x8,%edi
call   1030 <display_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raiseInterrupt>:
cmp    $0x7,%edi
jae    111a <raiseInterrupt+0xa>
jmp    1030 <display_error@plt>
cmp    $0x8,%edi
je     1133 <raiseInterrupt+0x23>
cmp    $0x7,%edi
jne    113d <raiseInterrupt+0x2d>
push   %rax
mov    $0x7,%edi
call   1030 <display_error@plt>
add    $0x8,%rsp
mov    $0x8,%edi
jmp    1030 <display_error@plt>
ret

LLVM IR (-O0):
define void @raiseInterrupt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %22 [
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 7, label %18
i32 8, label %20
]
4: ; preds = %1
%5 = call i32 @display_error(i32 0)
br label %22
6: ; preds = %1
%7 = call i32 @display_error(i32 1)
br label %22
8: ; preds = %1
%9 = call i32 @display_error(i32 2)
br label %22
10: ; preds = %1
%11 = call i32 @display_error(i32 3)
br label %22
12: ; preds = %1
%13 = call i32 @display_error(i32 4)
br label %22
14: ; preds = %1
%15 = call i32 @display_error(i32 5)
br label %22
16: ; preds = %1
%17 = call i32 @display_error(i32 6)
br label %22
18: ; preds = %1
%19 = call i32 @display_error(i32 7)
br label %20
20: ; preds = %1, %18
%21 = call i32 @display_error(i32 8)
br label %22
22: ; preds = %1, %20, %16, %14, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
define void @raiseInterrupt(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %5
i32 1, label %5
i32 2, label %5
i32 3, label %5
i32 4, label %5
i32 5, label %5
i32 6, label %5
i32 7, label %2
i32 8, label %4
]
2: ; preds = %1
%3 = tail call i32 @display_error(i32 7)
br label %4
4: ; preds = %1, %2
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %4
%6 = phi i32 [ 8, %4 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ]
%7 = tail call i32 @display_error(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}