#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 getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Digite seu estado civil: ");
  char est_civil = getchar();
  if (est_civil == 'C' || est_civil == 'c') {
    printf("Casado");
  } else if (est_civil == 'S' || est_civil == 's') {
    printf("Solteiro");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x43,%eax
je     115f <main+0x3f>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
jne    1170 <main+0x50>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    119b <main+0x7b>
movsbl -0x5(%rbp),%eax
cmp    $0x53,%eax
je     118a <main+0x6a>
movsbl -0x5(%rbp),%eax
cmp    $0x73,%eax
jne    1196 <main+0x76>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    119b <main+0x7b>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
and    $0xdf,%al
cmp    $0x43,%al
je     1147 <main+0x27>
cmp    $0x53,%al
jne    1153 <main+0x33>
lea    0xedc(%rip),%rdi
jmp    114e <main+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Digite seu estado civil: \00"
@.str.1 = [7 x i8] c"Casado\00"
@.str.2 = [9 x i8] c"Solteiro\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 67
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 99
br i1 %11, label %12, label %14
12: ; preds = %8, %0
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %25
14: ; preds = %8
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 83
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 115
br i1 %21, label %22, label %24
22: ; preds = %18, %14
%23 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22, %18
br label %25
25: ; preds = %24, %12
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [26 x i8] c"Digite seu estado civil: \00"
@.str.1 = [7 x i8] c"Casado\00"
@.str.2 = [9 x i8] c"Solteiro\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = and i8 %2, -33
switch i8 %3, label %8 [
i8 67, label %5
i8 83, label %4
]
4: ; preds = %0
br label %5
5: ; preds = %0, %4
%6 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %0 ]
%7 = tail call i32 @printf(i8* dereferenceable(1) %6)
br label %8
8: ; preds = %5, %0
ret i32 0
}