#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 */
typedef int pid_t;

/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *, int, float);
int main(int argc, char **argv) {
  float f = 1000000.0f;
  int x;
  pid_t p = fork();
  for (x = 0; x < 10; x++) {
    f = f / 1.5f;
    printf("%d: number: %f\n", p, f);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    1196 <main+0x76>
movss  -0x14(%rbp),%xmm0
movss  0xe99(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x1c(%rbp),%esi
movss  -0x14(%rbp),%xmm0
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1154 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
mov    %eax,%ebx
lea    0xef4(%rip),%r14
movss  0xec4(%rip),%xmm0
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movss  0xeb6(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xea8(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe9a(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe8c(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe7e(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe70(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe62(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe54(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movss  0xe46(%rip),%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"%d: number: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fork()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x4124585560000000)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x411B2071E0000000)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x411215A140000000)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x41081CD700000000)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x4100133A00000000)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 8.779150e+04)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x40EC93F560000000)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x40E30D4E40000000)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x40D9671300000000)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, float 0x40D0EF6200000000)
ret i32 0
}