#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() {
  int idade, ts;
  printf("Digite a idade do trabalhador: ");
  scanf("%d", &idade);
  printf("Digite o tempo de serviço do trabalhador: ");
  scanf("%d", &ts);
  if (idade >= 65) {
    printf("Resultado: Pode se Aposentar!");
  } else if (ts >= 30) {
    printf("Resultado: Pode se Aposentar!");
  } else if (idade == 60 && ts == 25) {
    printf("Resultado: Pode se Aposentar!");
  } else {
    printf("Resultado: Não pode se Aposentar!");
  }
  return 0;
}


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    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x41,-0x8(%rbp)
jl     1182 <main+0x62>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
cmpl   $0x1e,-0xc(%rbp)
jl     119d <main+0x7d>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
cmpl   $0x3c,-0x8(%rbp)
jne    11c2 <main+0xa2>
cmpl   $0x19,-0xc(%rbp)
jne    11c2 <main+0xa2>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <main+0xae>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
jmp    11d8 <main+0xb8>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
lea    0xee6(%rip),%rdi
cmp    $0x40,%eax
jg     1191 <main+0x71>
mov    0x8(%rsp),%ecx
cmp    $0x1d,%ecx
jg     1191 <main+0x71>
xor    $0x3c,%eax
xor    $0x19,%ecx
lea    0xecb(%rip),%rdx
lea    0xee2(%rip),%rdi
or     %eax,%ecx
cmove  %rdx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Digite a idade do trabalhador: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"Digite o tempo de servi\C3\A7o do trabalhador: \00"
@.str.3 = [30 x i8] c"Resultado: Pode se Aposentar!\00"
@.str.4 = [35 x i8] c"Resultado: N\C3\A3o pode se Aposentar!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %29
12: ; preds = %0
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 30
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %28
17: ; preds = %12
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 60
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 25
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %27
25: ; preds = %20, %17
%26 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %15
br label %29
29: ; preds = %28, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Digite a idade do trabalhador: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"Digite o tempo de servi\C3\A7o do trabalhador: \00"
@.str.3 = [30 x i8] c"Resultado: Pode se Aposentar!\00"
@.str.4 = [35 x i8] c"Resultado: N\C3\A3o pode se Aposentar!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 64
br i1 %10, label %19, label %11
11: ; preds = %0
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 29
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = icmp eq i32 %9, 60
%16 = icmp eq i32 %12, 25
%17 = select i1 %15, i1 %16, i1 false
%18 = select i1 %17, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0)
br label %19
19: ; preds = %14, %11, %0
%20 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), %11 ], [ %18, %14 ]
%21 = call i32 @printf(i8* dereferenceable(1) %20)
ret i32 0
}