#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*/ print_done(int);
float randf();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ test_mul_32(float, float);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  test_mul_32(2.718281, 3.141592);
  test_mul_32(2.718281, 3.141592);
  test_mul_32(3.141592, 2.718281);
  test_mul_32(3.141592, 2.718281);
  test_mul_32(1.42341, 0.09842);
  for (int i = 0; i < 5000; i++) {
    float a = randf();
    float b = randf();
    test_mul_32(a, b);
  }
  print_done(64);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movss  0xe95(%rip),%xmm0
movss  0xe89(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe80(%rip),%xmm0
movss  0xe74(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe67(%rip),%xmm0
movss  0xe63(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe52(%rip),%xmm0
movss  0xe4e(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe35(%rip),%xmm0
movss  0xe31(%rip),%xmm1
call   1050 <test_mul_32@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1388,-0x8(%rbp)
jge    1221 <main+0xd1>
mov    $0x0,%al
call   1070 <randf@plt>
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1070 <randf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1050 <test_mul_32@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11df <main+0x8f>
mov    $0x40,%edi
call   1060 <print_done@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movss  0xe95(%rip),%xmm0
movss  0xe91(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe80(%rip),%xmm0
movss  0xe7c(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe6f(%rip),%xmm0
movss  0xe63(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe5a(%rip),%xmm0
movss  0xe4e(%rip),%xmm1
call   1050 <test_mul_32@plt>
movss  0xe49(%rip),%xmm0
movss  0xe45(%rip),%xmm1
call   1050 <test_mul_32@plt>
mov    $0x1388,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <randf@plt>
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1070 <randf@plt>
movaps %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
call   1050 <test_mul_32@plt>
add    $0xffffffff,%ebx
jne    11e0 <main+0x90>
mov    $0x40,%edi
call   1060 <print_done@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @time(i32* null)
%6 = call i32 @srand(i32 %5)
%7 = call i32 @test_mul_32(float 0x4005BF0A20000000, float 0x400921FB00000000)
%8 = call i32 @test_mul_32(float 0x4005BF0A20000000, float 0x400921FB00000000)
%9 = call i32 @test_mul_32(float 0x400921FB00000000, float 0x4005BF0A20000000)
%10 = call i32 @test_mul_32(float 0x400921FB00000000, float 0x4005BF0A20000000)
%11 = call i32 @test_mul_32(float 0x3FF6C649A0000000, float 0x3FB9320DA0000000)
store i32 0, i32* %2
br label %12
12: ; preds = %21, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 5000
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = call float (...) @randf()
store float %16, float* %3
%17 = call float (...) @randf()
store float %17, float* %4
%18 = load float, float* %3
%19 = load float, float* %4
%20 = call i32 @test_mul_32(float %18, float %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %12
24: ; preds = %12
%25 = call i32 @print_done(i32 64)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 @test_mul_32(float 0x4005BF0A20000000, float 0x400921FB00000000)
%4 = tail call i32 @test_mul_32(float 0x4005BF0A20000000, float 0x400921FB00000000)
%5 = tail call i32 @test_mul_32(float 0x400921FB00000000, float 0x4005BF0A20000000)
%6 = tail call i32 @test_mul_32(float 0x400921FB00000000, float 0x4005BF0A20000000)
%7 = tail call i32 @test_mul_32(float 0x3FF6C649A0000000, float 0x3FB9320DA0000000)
br label %10
8: ; preds = %10
%9 = tail call i32 @print_done(i32 64)
ret i32 0
10: ; preds = %0, %10
%11 = phi i32 [ 0, %0 ], [ %15, %10 ]
%12 = tail call float (...) @randf()
%13 = tail call float (...) @randf()
%14 = tail call i32 @test_mul_32(float %12, float %13)
%15 = add nuw nsw i32 %11, 1
%16 = icmp eq i32 %15, 5000
br i1 %16, label %8, label %10
}