#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 *, double);
int geraVetorNumerosNaoAleatorios(int n) {
  int i;
  printf("%d\n", n);
  for (i = 0; i < n * 2; 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)
cvtsi2sdl -0x4(%rbp),%xmm0
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1174 <geraVetorNumerosNaoAleatorios+0x64>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <geraVetorNumerosNaoAleatorios+0x23>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraVetorNumerosNaoAleatorios>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%r15d
cvtsi2sd %edi,%xmm0
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
test   %r15d,%r15d
jle    1172 <geraVetorNumerosNaoAleatorios+0x62>
add    %r15d,%r15d
cmp    $0x2,%r15d
mov    $0x1,%ebx
cmovl  %ebx,%r15d
neg    %r15d
lea    0xebd(%rip),%r14
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
lea    (%r15,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1150 <geraVetorNumerosNaoAleatorios+0x40>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
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 = sitofp i32 %4 to double
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
store i32 0, i32* %3
br label %7
7: ; preds = %18, %1
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 2
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %21
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
%15 = sitofp i32 %14 to double
%16 = fmul double 1.000000e+00, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %7
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 = sitofp i32 %0 to double
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = shl nuw i32 %0, 1
%7 = call i32 @llvm.smax.i32(i32 %6, i32 1)
br label %8
8: ; preds = %5, %8
%9 = phi i32 [ %10, %8 ], [ 0, %5 ]
%10 = add nuw nsw i32 %9, 1
%11 = sitofp i32 %10 to double
%12 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %11)
%13 = icmp eq i32 %10, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %1
ret i32 1
}