#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 *, float, char);
void twelve() {
  float values[10];
  int i, n = 10;
  for (i = 0; i < n; i++)
    values[i] = (float)i / n;
  for (i = 0; i < n; i++)
    printf("%f%c", values[i], " \n"[i == n - 1]);
}


x86 assembly (clang, -O0):
<twelve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0xa,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1158 <twelve+0x48>
cvtsi2ssl -0x34(%rbp),%xmm0
cvtsi2ssl -0x38(%rbp),%xmm1
divss  %xmm1,%xmm0
movslq -0x34(%rbp),%rax
movss  %xmm0,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1126 <twelve+0x16>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    11b0 <twelve+0xa0>
movslq -0x34(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rcx
lea    0xe6e(%rip),%rdi
lea    0xe6c(%rip),%rax
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    115f <twelve+0x4f>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twelve>:
push   %rbx
lea    0xf0c(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xed0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xebf(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xeae(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe9d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe8c(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe7b(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe6a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe59(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
movss  0xe48(%rip),%xmm0
mov    %rbx,%rdi
mov    $0xa,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%f%c\00"
@.str.1 = [3 x i8] c" \0A\00"
define void @twelve() {
%1 = alloca [10 x float]
%2 = alloca i32
%3 = alloca i32
store i32 10, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %17, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to float
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %15
store float %13, float* %16
br label %17
17: ; preds = %8
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %4
20: ; preds = %4
store i32 0, i32* %2
br label %21
21: ; preds = %39, %20
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %42
25: ; preds = %21
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %27
%29 = load float, float* %28
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = sub nsw i32 %31, 1
%33 = icmp eq i32 %30, %32
%34 = zext i1 %33 to i32
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [3 x i8], [3 x i8]* @.str.1, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %29, i8 signext %37)
br label %39
39: ; preds = %25
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
br label %21
42: ; preds = %21
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%c\00"
define void @twelve() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0.000000e+00, i8 signext 32)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FB99999A0000000, i8 signext 32)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FC99999A0000000, i8 signext 32)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FD3333340000000, i8 signext 32)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FD99999A0000000, i8 signext 32)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 5.000000e-01, i8 signext 32)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FE3333340000000, i8 signext 32)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FE6666660000000, i8 signext 32)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FE99999A0000000, i8 signext 32)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float 0x3FECCCCCC0000000, i8 signext 10)
ret void
}