#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 *, ...);
void main() {
  int idd, contrib;
  char sexo;
  printf("Informe seu sexo('m' ou 'f'): ");
  scanf("%c", &sexo);
  printf("Informe sua idade: ");
  scanf("%d", &idd);
  printf("Informe o tempo de contribuicao: ");
  scanf("%d", &contrib);
  if (sexo == 'm') {
    if (idd >= 65 && contrib >= 10) {
      printf("Pode aposentar!\n");
    } else if (idd >= 63 && contrib >= 15) {
      printf("Pode aposentar!\n");
    } else {
      printf("Nao pode aposentar!\n");
    }
  } else if (sexo == 'f') {
    if (idd >= 63 && contrib >= 10) {
      printf("Pode aposentar!\n");
    } else if (idd >= 61 && contrib >= 15) {
      printf("Pode aposentar!\n");
    } else {
      printf("Nao pode aposentar!\n");
    }
  } else {
    printf("Reveja os parametros informados.\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x6d,%eax
jne    11ef <main+0xcf>
cmpl   $0x41,-0x4(%rbp)
jl     11b4 <main+0x94>
cmpl   $0xa,-0x8(%rbp)
jl     11b4 <main+0x94>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
cmpl   $0x3f,-0x4(%rbp)
jl     11d9 <main+0xb9>
cmpl   $0xf,-0x8(%rbp)
jl     11d9 <main+0xb9>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
jmp    126d <main+0x14d>
movsbl -0x9(%rbp),%eax
cmp    $0x66,%eax
jne    125c <main+0x13c>
cmpl   $0x3f,-0x4(%rbp)
jl     1221 <main+0x101>
cmpl   $0xa,-0x8(%rbp)
jl     1221 <main+0x101>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    1257 <main+0x137>
cmpl   $0x3d,-0x4(%rbp)
jl     1246 <main+0x126>
cmpl   $0xf,-0x8(%rbp)
jl     1246 <main+0x126>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    1252 <main+0x132>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    1257 <main+0x137>
jmp    1268 <main+0x148>
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
jmp    126d <main+0x14d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
lea    0xecf(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x7(%rsp),%al
cmp    $0x66,%al
je     11c9 <main+0x99>
cmp    $0x6d,%al
jne    11e4 <main+0xb4>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cmp    $0x41,%eax
jl     11af <main+0x7f>
cmp    $0x9,%ecx
jg     11db <main+0xab>
cmp    $0xf,%ecx
lea    0xed7(%rip),%rdi
lea    0xebc(%rip),%rcx
cmovl  %rcx,%rdi
cmp    $0x3f,%eax
jmp    1205 <main+0xd5>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cmp    $0x3f,%eax
jl     11ed <main+0xbd>
cmp    $0x9,%ecx
jle    11ed <main+0xbd>
lea    0xeae(%rip),%rdi
jmp    1209 <main+0xd9>
lea    0xe70(%rip),%rdi
jmp    1209 <main+0xd9>
cmp    $0xf,%ecx
lea    0xe99(%rip),%rdi
lea    0xe7e(%rip),%rcx
cmovl  %rcx,%rdi
cmp    $0x3d,%eax
cmovl  %rcx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Informe seu sexo('m' ou 'f'): \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [20 x i8] c"Informe sua idade: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [34 x i8] c"Informe o tempo de contribuicao: \00"
@.str.5 = [17 x i8] c"Pode aposentar!\0A\00"
@.str.6 = [21 x i8] c"Nao pode aposentar!\0A\00"
@.str.7 = [34 x i8] c"Reveja os parametros informados.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 109
br i1 %12, label %13, label %33
13: ; preds = %0
%14 = load i32, i32* %1
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp sge i32 %17, 10
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %32
21: ; preds = %16, %13
%22 = load i32, i32* %1
%23 = icmp sge i32 %22, 63
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = load i32, i32* %2
%26 = icmp sge i32 %25, 15
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %31
29: ; preds = %24, %21
%30 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
br label %32
32: ; preds = %31, %19
br label %60
33: ; preds = %0
%34 = load i8, i8* %3
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 102
br i1 %36, label %37, label %57
37: ; preds = %33
%38 = load i32, i32* %1
%39 = icmp sge i32 %38, 63
br i1 %39, label %40, label %45
40: ; preds = %37
%41 = load i32, i32* %2
%42 = icmp sge i32 %41, 10
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %56
45: ; preds = %40, %37
%46 = load i32, i32* %1
%47 = icmp sge i32 %46, 61
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = load i32, i32* %2
%50 = icmp sge i32 %49, 15
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %55
53: ; preds = %48, %45
%54 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %55
55: ; preds = %53, %51
br label %56
56: ; preds = %55, %43
br label %59
57: ; preds = %33
%58 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
br label %59
59: ; preds = %57, %56
br label %60
60: ; preds = %59, %32
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Informe seu sexo('m' ou 'f'): \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [20 x i8] c"Informe sua idade: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [34 x i8] c"Informe o tempo de contribuicao: \00"
@str = [33 x i8] c"Reveja os parametros informados.\00"
@str.11 = [20 x i8] c"Nao pode aposentar!\00"
@str.13 = [16 x i8] c"Pode aposentar!\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%12 = load i8, i8* %3
switch i8 %12, label %35 [
i8 109, label %13
i8 102, label %24
]
13: ; preds = %0
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 64
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 9
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %35, label %19
19: ; preds = %13
%20 = icmp sgt i32 %14, 62
%21 = icmp sgt i32 %16, 14
%22 = select i1 %20, i1 %21, i1 false
%23 = select i1 %22, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.11, i64 0, i64 0)
br label %35
24: ; preds = %0
%25 = load i32, i32* %1
%26 = icmp sgt i32 %25, 62
%27 = load i32, i32* %2
%28 = icmp sgt i32 %27, 9
%29 = select i1 %26, i1 %28, i1 false
br i1 %29, label %35, label %30
30: ; preds = %24
%31 = icmp sgt i32 %25, 60
%32 = icmp sgt i32 %27, 14
%33 = select i1 %31, i1 %32, i1 false
%34 = select i1 %33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.11, i64 0, i64 0)
br label %35
35: ; preds = %0, %30, %24, %19, %13
%36 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0), %13 ], [ %23, %19 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0), %24 ], [ %34, %30 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0), %0 ]
%37 = call i32 @puts(i8* dereferenceable(1) %36)
ret void
}