#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int var1, var2, var3, var4, var5, var6;
  scanf("%d", &var1);
  printf("Sistema de Atrib de variaveis - Comparando vars\n");
  var2 = var1;
  var3 = var2;
  var4 = var3;
  var5 = var4;
  var6 = 6;
  if (var5 > var6) {
    var5 = var5 * 2 + var6 - var1;
  } else
    printf("erro do senao\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x6,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    119a <main+0x6a>
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
add    -0x1c(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11a6 <main+0x76>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x6,0x4(%rsp)
jg     1161 <main+0x31>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [49 x i8] c"Sistema de Atrib de variaveis - Comparando vars\0A\00"
@.str.2 = [15 x i8] c"erro do senao\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %2
store i32 %10, i32* %3
%11 = load i32, i32* %3
store i32 %11, i32* %4
%12 = load i32, i32* %4
store i32 %12, i32* %5
%13 = load i32, i32* %5
store i32 %13, i32* %6
store i32 6, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %24
17: ; preds = %0
%18 = load i32, i32* %6
%19 = mul nsw i32 %18, 2
%20 = load i32, i32* %7
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %2
%23 = sub nsw i32 %21, %22
store i32 %23, i32* %6
br label %26
24: ; preds = %0
%25 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %17
%27 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [48 x i8] c"Sistema de Atrib de variaveis - Comparando vars\00"
@str.3 = [14 x i8] c"erro do senao\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 6
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.3, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = call i32 @exit(i32 0)
unreachable
}