#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 s[6];
  printf("Digite o primeiro termo: ");
  scanf("%d", &s[0]);
  s[1] = s[0] + 2;
  s[2] = s[1] * 2;
  s[3] = s[2] + 4;
  s[4] = s[3] + 1;
  s[5] = 60 - s[0];
  printf("%d, %d, %d, %d, %d, %d\n", s[0], s[1], s[2], s[3], s[4], s[5]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    $0x3c,%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0xc(%rbp),%eax
lea    0xe86(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
lea    0x2(%rsi),%edx
mov    %edx,0x14(%rsp)
lea    (%rsi,%rsi,1),%ecx
add    $0x4,%ecx
mov    %ecx,0x18(%rsp)
lea    0x8(%rsi,%rsi,1),%r8d
mov    %r8d,0x1c(%rsp)
lea    (%rsi,%rsi,1),%r9d
add    $0x9,%r9d
mov    %r9d,0x20(%rsp)
mov    $0x3c,%eax
sub    %esi,%eax
mov    %eax,0x24(%rsp)
mov    %eax,(%rsp)
lea    0xe99(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Digite o primeiro termo: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"%d, %d, %d, %d, %d, %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 2
%9 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
store i32 %8, i32* %9
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%11 = load i32, i32* %10
%12 = mul nsw i32 %11, 2
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
store i32 %12, i32* %13
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 4
%17 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
store i32 %16, i32* %17
%18 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%19 = load i32, i32* %18
%20 = add nsw i32 %19, 1
%21 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
store i32 %20, i32* %21
%22 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%23 = load i32, i32* %22
%24 = sub nsw i32 60, %23
%25 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
store i32 %24, i32* %25
%26 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%27 = load i32, i32* %26
%28 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%29 = load i32, i32* %28
%30 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%31 = load i32, i32* %30
%32 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%33 = load i32, i32* %32
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%35 = load i32, i32* %34
%36 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %27, i32 %29, i32 %31, i32 %33, i32 %35, i32 %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Digite o primeiro termo: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"%d, %d, %d, %d, %d, %d\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 2
%8 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 1
store i32 %7, i32* %8
%9 = shl nsw i32 %7, 1
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 2
store i32 %9, i32* %10
%11 = add nsw i32 %9, 4
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 3
store i32 %11, i32* %12
%13 = add nsw i32 %9, 5
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 4
store i32 %13, i32* %14
%15 = sub nsw i32 60, %6
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 5
store i32 %15, i32* %16
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7, i32 %9, i32 %11, i32 %13, i32 %15)
ret i32 0
}