#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char string;
  printf("Recensamanat: Partidul preferat:\n\n\n");
  printf("Deci, \"cu ce partid tii\"? : ");
  scanf("%c", &string);
  printf("Ai zis %c\n", string);
  switch (string) {
  case ('S'):
  case ('s'): {
    puts("Deci tii cu PSD Comunistule!!!");
    break;
  }
  case ('D'):
  case ('d'): {
    puts("PDL huh Basistule!!!");
    break;
  default:
    puts("..Okey..");
  }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
xor    %eax,%eax
mov    %al,-0xd(%rbp)
call   1040 <printf@plt>
mov    -0xd(%rbp),%al
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xd(%rbp),%al
movsbl -0x5(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x44,%eax
je     11db <main+0xab>
jmp    1197 <main+0x67>
mov    -0xc(%rbp),%eax
sub    $0x53,%eax
je     11ca <main+0x9a>
jmp    11a8 <main+0x78>
mov    -0xc(%rbp),%eax
sub    $0x64,%eax
je     11db <main+0xab>
jmp    11b9 <main+0x89>
mov    -0xc(%rbp),%eax
sub    $0x73,%eax
jne    11ec <main+0xbc>
jmp    11ca <main+0x9a>
lea    0xe7e(%rip),%rdi
call   1030 <puts@plt>
jmp    11f8 <main+0xc8>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
jmp    11f8 <main+0xc8>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%esi
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rsp),%eax
lea    0xeb0(%rip),%rdi
cmp    $0x63,%eax
jg     118c <main+0x5c>
cmp    $0x44,%eax
je     1196 <main+0x66>
cmp    $0x53,%eax
je     11a6 <main+0x76>
jmp    119f <main+0x6f>
cmp    $0x73,%eax
je     11a6 <main+0x76>
cmp    $0x64,%eax
jne    119f <main+0x6f>
lea    0xead(%rip),%rdi
jmp    11a6 <main+0x76>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Recensamanat: Partidul preferat:\0A\0A\0A\00"
@.str.1 = [29 x i8] c"Deci, \22cu ce partid tii\22? : \00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [11 x i8] c"Ai zis %c\0A\00"
@.str.4 = [31 x i8] c"Deci tii cu PSD Comunistule!!!\00"
@.str.5 = [21 x i8] c"PDL huh Basistule!!!\00"
@.str.6 = [9 x i8] c"..Okey..\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
switch i32 %10, label %15 [
i32 83, label %11
i32 115, label %11
i32 68, label %13
i32 100, label %13
]
11: ; preds = %0, %0
%12 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %17
13: ; preds = %0, %0
%14 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %17
15: ; preds = %0
%16 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %17
17: ; preds = %15, %13, %11
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"Deci, \22cu ce partid tii\22? : \00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [11 x i8] c"Ai zis %c\0A\00"
@.str.4 = [31 x i8] c"Deci tii cu PSD Comunistule!!!\00"
@.str.5 = [21 x i8] c"PDL huh Basistule!!!\00"
@.str.6 = [9 x i8] c"..Okey..\00"
@str = [35 x i8] c"Recensamanat: Partidul preferat:\0A\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
switch i32 %9, label %11 [
i32 83, label %12
i32 115, label %12
i32 68, label %10
i32 100, label %10
]
10: ; preds = %0, %0
br label %12
11: ; preds = %0
br label %12
12: ; preds = %0, %0, %11, %10
%13 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), %11 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), %0 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), %0 ]
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}