#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 /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x;
  scanf("%d", &x);
  switch (x) {
  case 0:
    printf("No customers.\n");
    break;
  case 2:
    printf("Maximum.\n");
  default:
    printf("Illegal value.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1163 <main+0x43>
jmp    1152 <main+0x32>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1174 <main+0x54>
jmp    1180 <main+0x60>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    118c <main+0x6c>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     1154 <main+0x34>
cmp    $0x2,%eax
jne    114b <main+0x2b>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
jmp    115b <main+0x3b>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [15 x i8] c"No customers.\0A\00"
@.str.2 = [10 x i8] c"Maximum.\0A\00"
@.str.3 = [16 x i8] c"Illegal value.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 0, label %5
i32 2, label %7
]
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %11
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [9 x i8] c"Maximum.\00"
@str.4 = [15 x i8] c"Illegal value.\00"
@str.5 = [14 x i8] c"No customers.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
switch i32 %4, label %7 [
i32 0, label %8
i32 2, label %5
]
5: ; preds = %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %0, %5
br label %8
8: ; preds = %0, %7
%9 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0), %0 ]
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}