#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 potencia2(int);
int /*<<< orphan*/ printf(char *, double);
int geraVetorNumerosNaoAleatorios(int n) {
  int i;
  printf("%d\n", potencia2(n));
  for (i = 0; i < potencia2(n); i++) {
    printf("%.1lf ", 1.0 * (i + 1));
  }
  return 1;
}


x86 assembly (clang, -O0):
<geraVetorNumerosNaoAleatorios>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <potencia2@plt>
cvtsi2sd %eax,%xmm0
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <potencia2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    1195 <geraVetorNumerosNaoAleatorios+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe89(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <geraVetorNumerosNaoAleatorios+0x2a>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraVetorNumerosNaoAleatorios>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1040 <potencia2@plt>
cvtsi2sd %eax,%xmm0
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <potencia2@plt>
test   %eax,%eax
jle    116d <geraVetorNumerosNaoAleatorios+0x4d>
xor    %ebp,%ebp
lea    0xeb5(%rip),%r14
nop
add    $0x1,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <potencia2@plt>
cmp    %eax,%ebp
jl     1150 <geraVetorNumerosNaoAleatorios+0x30>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%.1lf \00"
define i32 @geraVetorNumerosNaoAleatorios(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @potencia2(i32 %4)
%6 = sitofp i32 %5 to double
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
store i32 0, i32* %3
br label %8
8: ; preds = %19, %1
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @potencia2(i32 %10)
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %22
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
%16 = sitofp i32 %15 to double
%17 = fmul double 1.000000e+00, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %17)
br label %19
19: ; preds = %13
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %8
22: ; preds = %8
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"%.1lf \00"
define i32 @geraVetorNumerosNaoAleatorios(i32 %0) {
%2 = tail call i32 @potencia2(i32 %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call i32 @potencia2(i32 %0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %1, %7
%8 = phi i32 [ %9, %7 ], [ 0, %1 ]
%9 = add nuw nsw i32 %8, 1
%10 = sitofp i32 %9 to double
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = tail call i32 @potencia2(i32 %0)
%13 = icmp slt i32 %9, %12
br i1 %13, label %7, label %14
14: ; preds = %7, %1
ret i32 1
}