#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 *, int, ...);
void main() {
  int i, j, m = 'A';
  float k;
  i = -1;
  switch (i) {
  case -1 - 2:
    j = 3;
    printf("case j = %d\n", j);
    break;
  case -3 / 2:
    j = 4;
  case 1:
    j = 1;
    printf("case j = %d\n", j);
    break;
  case -2:
    j = -1;
  default:
    break;
  }
  printf("Int j = %d %u\n", j, j);
  switch (m) {
  case 65:
    j = 65;
    break;
  default:
    break;
  }
  printf("Char j = %d %u\n", j, j);
  printf("Float j = %d %u\n", j, j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x41,-0xc(%rbp)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     1197 <main+0x87>
mov    -0x18(%rbp),%rax
lea    0xeba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119c <main+0x8c>
movl   $0x4,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119c <main+0x8c>
movl   $0xffffffff,-0x8(%rbp)
jmp    119c <main+0x8c>
mov    -0x8(%rbp),%edx
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
mov    %edx,%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x41,%eax
jne    11cc <main+0xbc>
jmp    11c0 <main+0xb0>
movl   $0x41,-0x8(%rbp)
jmp    11d1 <main+0xc1>
jmp    11d1 <main+0xc1>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"case j = %d\0A\00"
@.str.1 = [15 x i8] c"Int j = %d %u\0A\00"
@.str.2 = [16 x i8] c"Char j = %d %u\0A\00"
@.str.3 = [17 x i8] c"Float j = %d %u\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 65, i32* %3
store i32 -1, i32* %1
%5 = load i32, i32* %1
switch i32 %5, label %14 [
i32 -3, label %6
i32 -1, label %9
i32 1, label %10
i32 -2, label %13
]
6: ; preds = %0
store i32 3, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %15
9: ; preds = %0
store i32 4, i32* %2
br label %10
10: ; preds = %0, %9
store i32 1, i32* %2
%11 = load i32, i32* %2
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %15
13: ; preds = %0
store i32 -1, i32* %2
br label %14
14: ; preds = %0, %13
br label %15
15: ; preds = %14, %10, %6
%16 = load i32, i32* %2
%17 = load i32, i32* %2
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
%19 = load i32, i32* %3
switch i32 %19, label %21 [
i32 65, label %20
]
20: ; preds = %15
store i32 65, i32* %2
br label %22
21: ; preds = %15
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %2
%28 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %26, i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"case j = %d\0A\00"
@.str.1 = [15 x i8] c"Int j = %d %u\0A\00"
@.str.2 = [16 x i8] c"Char j = %d %u\0A\00"
@.str.3 = [17 x i8] c"Float j = %d %u\0A\00"
define void @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 1)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 65, i32 65)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 65, i32 65)
ret void
}