#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 */
char menu();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ przyklad();
int /*<<< orphan*/ wypisanie();
int main(void) {
  char wyb;
  wyb = menu();
  switch (wyb) {
  case 'w':
  case 'W':
    wypisanie();
    break;
  case 'p':
  case 'P':
    przyklad();
    break;
  case 'k':
  case 'K':
    break;
  default:
    printf("Co ty wybrales?\n");
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
call   1050 <menu@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x4b,%eax
je     11db <main+0x9b>
jmp    116e <main+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x50,%eax
je     11cf <main+0x8f>
jmp    117f <main+0x3f>
mov    -0xc(%rbp),%eax
sub    $0x57,%eax
je     11c3 <main+0x83>
jmp    1190 <main+0x50>
mov    -0xc(%rbp),%eax
sub    $0x6b,%eax
je     11db <main+0x9b>
jmp    11a1 <main+0x61>
mov    -0xc(%rbp),%eax
sub    $0x70,%eax
je     11cf <main+0x8f>
jmp    11b2 <main+0x72>
mov    -0xc(%rbp),%eax
sub    $0x77,%eax
jne    11e0 <main+0xa0>
jmp    11c3 <main+0x83>
mov    $0x0,%al
call   1040 <wypisanie@plt>
jmp    11ec <main+0xac>
mov    $0x0,%al
call   1030 <przyklad@plt>
jmp    11ec <main+0xac>
jmp    11ec <main+0xac>
lea    0xe19(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <menu@plt>
movsbl %al,%eax
add    $0xffffffb5,%eax
cmp    $0x2c,%eax
ja     1195 <main+0x55>
movabs $0x100000001,%rcx
bt     %rax,%rcx
jb     11a1 <main+0x61>
movabs $0x2000000020,%rcx
bt     %rax,%rcx
jb     118c <main+0x4c>
movabs $0x100000001000,%rcx
bt     %rax,%rcx
jae    1195 <main+0x55>
xor    %eax,%eax
call   1050 <wypisanie@plt>
jmp    11a1 <main+0x61>
xor    %eax,%eax
call   1030 <przyklad@plt>
jmp    11a1 <main+0x61>
lea    0xe64(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Co ty wybrales?\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @menu()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 119, label %6
i32 87, label %6
i32 112, label %8
i32 80, label %8
i32 107, label %10
i32 75, label %10
]
6: ; preds = %0, %0
%7 = call i32 (...) @wypisanie()
br label %13
8: ; preds = %0, %0
%9 = call i32 (...) @przyklad()
br label %13
10: ; preds = %0, %0
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %10, %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Co ty wybrales?\00"
define i32 @main() {
%1 = tail call signext i8 (...) @menu()
%2 = sext i8 %1 to i32
switch i32 %2, label %7 [
i32 119, label %3
i32 87, label %3
i32 112, label %5
i32 80, label %5
i32 107, label %9
i32 75, label %9
]
3: ; preds = %0, %0
%4 = tail call i32 (...) @wypisanie()
br label %9
5: ; preds = %0, %0
%6 = tail call i32 (...) @przyklad()
br label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %0, %0, %7, %5, %3
ret i32 0
}