#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 *, char *);
main() {
  char sexo;
  printf("Sexo: ");
  scanf("%c", &sexo);
  if (sexo == 'm' || sexo == 'M')
    printf("\nMasculino");
  else if (sexo == 'f' || sexo == 'F')
    printf("\nFeminino");
  else
    printf("\nOutro");
}


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>
lea    0xec5(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x6d,%eax
je     1165 <main+0x45>
movsbl -0x5(%rbp),%eax
cmp    $0x4d,%eax
jne    1176 <main+0x56>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
je     1190 <main+0x70>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jne    11a1 <main+0x81>
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ad <main+0x8d>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
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>
lea    0xed3(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x7(%rsp),%al
and    $0xdf,%al
cmp    $0x46,%al
lea    0xec8(%rip),%rcx
lea    0xecb(%rip),%rdx
cmove  %rcx,%rdx
cmp    $0x4d,%al
lea    0xea9(%rip),%rdi
cmovne %rdx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Sexo: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [11 x i8] c"\0AMasculino\00"
@.str.3 = [10 x i8] c"\0AFeminino\00"
@.str.4 = [7 x i8] c"\0AOutro\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 109
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, 77
br i1 %11, label %12, label %14
12: ; preds = %8, %0
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %27
14: ; preds = %8
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 102
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, 70
br i1 %21, label %22, label %24
22: ; preds = %18, %14
%23 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %26
24: ; preds = %18
%25 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
br label %27
27: ; preds = %26, %12
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [7 x i8] c"Sexo: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [11 x i8] c"\0AMasculino\00"
@.str.3 = [10 x i8] c"\0AFeminino\00"
@.str.4 = [7 x i8] c"\0AOutro\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = and i8 %4, -33
%6 = icmp eq i8 %5, 70
%7 = select i1 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
%8 = icmp eq i8 %5, 77
%9 = select i1 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %7
%10 = call i32 @printf(i8* dereferenceable(1) %9)
ret i32 0
}