#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void EndSwitch(FILE *fh) {
  fprintf(fh, "default:\r\n");
  fprintf(fh, "/* the following tells MSDEV 6 to not generate */\r\n");
  fprintf(fh, "/* code which checks if a input value to the  */\r\n");
  fprintf(fh, "/* switch is not valid.*/\r\n");
  fprintf(fh, "#ifdef _MSC_VER\r\n");
  fprintf(fh, "#if (_MSC_VER>=1200)\r\n");
  fprintf(fh, "__assume(0);\r\n");
  fprintf(fh, "#endif\r\n");
  fprintf(fh, "#endif\r\n");
  fprintf(fh, "break;\r\n");
  fprintf(fh, "}\r\n");
}


x86 assembly (clang, -O0):
<EndSwitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf27(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf29(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf30(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf2f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf18(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf11(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndSwitch>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xed4(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xeef(%rip),%rdi
mov    $0x32,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf09(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf0c(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf05(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf03(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xef9(%rip),%r14
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1030 <fwrite@plt>
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xed1(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xec1(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"default:\0D\0A\00"
@.str.1 = [52 x i8] c"/* the following tells MSDEV 6 to not generate */\0D\0A\00"
@.str.2 = [51 x i8] c"/* code which checks if a input value to the */\0D\0A\00"
@.str.3 = [28 x i8] c"/* switch is not valid.*/\0D\0A\00"
@.str.4 = [18 x i8] c"#ifdef _MSC_VER\0D\0A\00"
@.str.5 = [23 x i8] c"#if (_MSC_VER>=1200)\0D\0A\00"
@.str.6 = [15 x i8] c"__assume(0);\0D\0A\00"
@.str.7 = [9 x i8] c"#endif\0D\0A\00"
@.str.8 = [9 x i8] c"break;\0D\0A\00"
@.str.9 = [4 x i8] c"}\0D\0A\00"
define void @EndSwitch(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32*, i32** %2
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"default:\0D\0A\00"
@.str.1 = [52 x i8] c"/* the following tells MSDEV 6 to not generate */\0D\0A\00"
@.str.2 = [51 x i8] c"/* code which checks if a input value to the */\0D\0A\00"
@.str.3 = [28 x i8] c"/* switch is not valid.*/\0D\0A\00"
@.str.4 = [18 x i8] c"#ifdef _MSC_VER\0D\0A\00"
@.str.5 = [23 x i8] c"#if (_MSC_VER>=1200)\0D\0A\00"
@.str.6 = [15 x i8] c"__assume(0);\0D\0A\00"
@.str.7 = [9 x i8] c"#endif\0D\0A\00"
@.str.8 = [9 x i8] c"break;\0D\0A\00"
@.str.9 = [4 x i8] c"}\0D\0A\00"
define void @EndSwitch(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 10, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i64 51, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i64 50, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i64 27, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i64 17, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i64 22, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i64 14, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i64 8, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i64 8, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i64 8, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i64 3, i64 1, i32* %0)
ret void
}