#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() {
  printf("---Sexo---\n");
  printf("1 - Masculino\n");
  printf("2 - Feminino\n");
  int sexo;
  scanf("%d", &sexo);
  if (sexo != 1 && sexo != 2)
    printf("\nOpção Inválida\n");
}


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    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1183 <main+0x63>
cmpl   $0x2,-0x8(%rbp)
je     1183 <main+0x63>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xfffffffd,%eax
cmp    $0xfffffffd,%eax
ja     116e <main+0x4e>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"---Sexo---\0A\00"
@.str.1 = [15 x i8] c"1 - Masculino\0A\00"
@.str.2 = [14 x i8] c"2 - Feminino\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [20 x i8] c"\0AOp\C3\A7\C3\A3o Inv\C3\A1lida\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %14
14: ; preds = %12, %9, %0
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str.3 = [3 x i8] c"%d\00"
@str = [11 x i8] c"---Sexo---\00"
@str.5 = [14 x i8] c"1 - Masculino\00"
@str.6 = [13 x i8] c"2 - Feminino\00"
@str.7 = [19 x i8] c"\0AOp\C3\A7\C3\A3o Inv\C3\A1lida\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = add i32 %7, -3
%9 = icmp ult i32 %8, -2
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.7, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
ret i32 0
}