#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 *, ...);
h() {
  int i, n = 0;
  printf("h:\n");
  for (i = 1; i <= 500; i++)
    switch (i) {
    default:
      n++;
      continue;
    case 128:
      printf("i = %d\n", i);
      break;
    case 16:
      printf("i = %d\n", i);
      break;
    case 8:
      printf("i = %d\n", i);
      break;
    case 120:
      printf("i = %d\n", i);
      break;
    case 280:
      printf("i = %d\n", i);
      break;
    case 264:
      printf("i = %d\n", i);
      break;
    case 248:
      printf("i = %d\n", i);
      break;
    case 272:
      printf("i = %d\n", i);
      break;
    case 304:
      printf("i = %d\n", i);
      break;
    case 296:
      printf("i = %d\n", i);
      break;
    case 288:
      printf("i = %d\n", i);
      break;
    case 312:
      printf("i = %d\n", i);
      break;
    }
  printf("%d defaults\n", n);
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1f4,-0x8(%rbp)
jg     1346 <h+0x236>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x8,%eax
je     125c <h+0x14c>
jmp    1155 <h+0x45>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     1246 <h+0x136>
jmp    1166 <h+0x56>
mov    -0x10(%rbp),%eax
sub    $0x78,%eax
je     1272 <h+0x162>
jmp    1177 <h+0x67>
mov    -0x10(%rbp),%eax
sub    $0x80,%eax
je     1230 <h+0x120>
jmp    118a <h+0x7a>
mov    -0x10(%rbp),%eax
sub    $0xf8,%eax
je     12b4 <h+0x1a4>
jmp    119d <h+0x8d>
mov    -0x10(%rbp),%eax
sub    $0x108,%eax
je     129e <h+0x18e>
jmp    11b0 <h+0xa0>
mov    -0x10(%rbp),%eax
sub    $0x110,%eax
je     12ca <h+0x1ba>
jmp    11c3 <h+0xb3>
mov    -0x10(%rbp),%eax
sub    $0x118,%eax
je     1288 <h+0x178>
jmp    11d6 <h+0xc6>
mov    -0x10(%rbp),%eax
sub    $0x120,%eax
je     130c <h+0x1fc>
jmp    11e9 <h+0xd9>
mov    -0x10(%rbp),%eax
sub    $0x128,%eax
je     12f6 <h+0x1e6>
jmp    11fc <h+0xec>
mov    -0x10(%rbp),%eax
sub    $0x130,%eax
je     12e0 <h+0x1d0>
jmp    120f <h+0xff>
mov    -0x10(%rbp),%eax
sub    $0x138,%eax
je     1322 <h+0x212>
jmp    1222 <h+0x112>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1338 <h+0x228>
mov    -0x8(%rbp),%esi
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1333 <h+0x223>
mov    -0x8(%rbp),%esi
lea    0xcd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1338 <h+0x228>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <h+0x24>
mov    -0xc(%rbp),%esi
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xfeb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebp
lea    0xfc5(%rip),%r15
lea    0xeba(%rip),%rbx
xor    %r14d,%r14d
nopl   0x0(%rax)
cmp    $0x7f,%ebp
jle    1180 <h+0x60>
lea    -0xf8(%rbp),%eax
cmp    $0x40,%eax
ja     11ad <h+0x8d>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
mov    %r15,%rdi
mov    $0xf8,%esi
jmp    1210 <h+0xf0>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x8,%ebp
je     1199 <h+0x79>
cmp    $0x10,%ebp
je     11a3 <h+0x83>
cmp    $0x78,%ebp
jne    11bf <h+0x9f>
mov    %r15,%rdi
mov    $0x78,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x8,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x10,%esi
jmp    1210 <h+0xf0>
cmp    $0x80,%ebp
jne    11bf <h+0x9f>
mov    %r15,%rdi
mov    $0x80,%esi
jmp    1210 <h+0xf0>
add    $0x1,%r14d
jmp    1217 <h+0xf7>
mov    %r15,%rdi
mov    $0x108,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x110,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x118,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x120,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x128,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x130,%esi
jmp    1210 <h+0xf0>
mov    %r15,%rdi
mov    $0x138,%esi
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x1f5,%ebp
jne    1150 <h+0x30>
lea    0xedf(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"h:\0A\00"
@.str.1 = [8 x i8] c"i = %d\0A\00"
@.str.2 = [13 x i8] c"%d defaults\0A\00"
define i32 @h() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %5
5: ; preds = %50, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 500
br i1 %7, label %8, label %53
8: ; preds = %5
%9 = load i32, i32* %2
switch i32 %9, label %10 [
i32 128, label %13
i32 16, label %16
i32 8, label %19
i32 120, label %22
i32 280, label %25
i32 264, label %28
i32 248, label %31
i32 272, label %34
i32 304, label %37
i32 296, label %40
i32 288, label %43
i32 312, label %46
]
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %50
13: ; preds = %8
%14 = load i32, i32* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %49
16: ; preds = %8
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %49
19: ; preds = %8
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %49
22: ; preds = %8
%23 = load i32, i32* %2
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %49
25: ; preds = %8
%26 = load i32, i32* %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %26)
br label %49
28: ; preds = %8
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %29)
br label %49
31: ; preds = %8
%32 = load i32, i32* %2
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %49
34: ; preds = %8
%35 = load i32, i32* %2
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %35)
br label %49
37: ; preds = %8
%38 = load i32, i32* %2
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %49
40: ; preds = %8
%41 = load i32, i32* %2
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %49
43: ; preds = %8
%44 = load i32, i32* %2
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %44)
br label %49
46: ; preds = %8
%47 = load i32, i32* %2
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13
br label %50
50: ; preds = %49, %10
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
br label %5
53: ; preds = %5
%54 = load i32, i32* %3
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"i = %d\0A\00"
@.str.2 = [13 x i8] c"%d defaults\0A\00"
@str = [3 x i8] c"h:\00"
define i32 @h() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %31
%3 = phi i32 [ 0, %0 ], [ %32, %31 ]
%4 = phi i32 [ 1, %0 ], [ %33, %31 ]
switch i32 %4, label %5 [
i32 128, label %7
i32 16, label %9
i32 8, label %11
i32 120, label %13
i32 280, label %15
i32 264, label %17
i32 248, label %19
i32 272, label %21
i32 304, label %23
i32 296, label %25
i32 288, label %27
i32 312, label %29
]
5: ; preds = %2
%6 = add nsw i32 %3, 1
br label %31
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 128)
br label %31
9: ; preds = %2
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 16)
br label %31
11: ; preds = %2
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 8)
br label %31
13: ; preds = %2
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 120)
br label %31
15: ; preds = %2
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 280)
br label %31
17: ; preds = %2
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 264)
br label %31
19: ; preds = %2
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 248)
br label %31
21: ; preds = %2
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 272)
br label %31
23: ; preds = %2
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 304)
br label %31
25: ; preds = %2
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 296)
br label %31
27: ; preds = %2
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 288)
br label %31
29: ; preds = %2
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 312)
br label %31
31: ; preds = %7, %9, %11, %13, %15, %17, %19, %21, %23, %25, %27, %29, %5
%32 = phi i32 [ %6, %5 ], [ %3, %29 ], [ %3, %27 ], [ %3, %25 ], [ %3, %23 ], [ %3, %21 ], [ %3, %19 ], [ %3, %17 ], [ %3, %15 ], [ %3, %13 ], [ %3, %11 ], [ %3, %9 ], [ %3, %7 ]
%33 = add nuw nsw i32 %4, 1
%34 = icmp eq i32 %33, 501
br i1 %34, label %35, label %2
35: ; preds = %31
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %32)
ret i32 undef
}