#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 */
float float_rand(double, double);
int /*<<< orphan*/ snprintf(char *, int, char *, float, float, float, float,
                            float);
int strlen(char *);
int getRandomValues(char *buf) {
  int i;
  int ret;
  float randomPorte = float_rand(0.0, 90.0);
  float randomFleche = float_rand(-30.0, 30.0);
  float randomLevage = float_rand(0.0, 45.0);
  float randomInclinoX = float_rand(-10.0, 10.0);
  float randomInclinoY = float_rand(-10.0, 10.0);
  snprintf(buf, 50, "/%.1f/%.1f/%.1f/%.1f/%.1f/", randomFleche, randomLevage,
           randomPorte, randomInclinoX, randomInclinoY);
  ret = strlen(buf);
  return ret;
}


x86 assembly (clang, -O0):
<getRandomValues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,-0x14(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  0xebf(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  0xe9a(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,-0x1c(%rbp)
movsd  0xe78(%rip),%xmm0
movsd  0xe78(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,-0x20(%rbp)
movsd  0xe5e(%rip),%xmm0
movsd  0xe5e(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0x18(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x24(%rbp),%xmm4
mov    $0x32,%esi
lea    0xe53(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomValues>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  0xec0(%rip),%xmm1
xorps  %xmm0,%xmm0
call   1050 <float_rand@plt>
movss  %xmm0,0xc(%rsp)
movsd  0xeb2(%rip),%xmm0
movsd  0xeb2(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,0x8(%rsp)
movsd  0xea7(%rip),%xmm1
xorps  %xmm0,%xmm0
call   1050 <float_rand@plt>
movss  %xmm0,0x4(%rsp)
movsd  0xe99(%rip),%xmm0
movsd  0xe99(%rip),%xmm1
call   1050 <float_rand@plt>
movss  %xmm0,(%rsp)
movsd  0xe7f(%rip),%xmm0
movsd  0xe7f(%rip),%xmm1
call   1050 <float_rand@plt>
movaps %xmm0,%xmm4
lea    0xe78(%rip),%rdx
mov    %rbx,%rdi
mov    $0x32,%esi
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
movss  (%rsp),%xmm3
call   1040 <snprintf@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"/%.1f/%.1f/%.1f/%.1f/%.1f/\00"
define i32 @getRandomValues(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i8* %0, i8** %2
%10 = call float @float_rand(double 0.000000e+00, double 9.000000e+01)
store float %10, float* %5
%11 = call float @float_rand(double -3.000000e+01, double 3.000000e+01)
store float %11, float* %6
%12 = call float @float_rand(double 0.000000e+00, double 4.500000e+01)
store float %12, float* %7
%13 = call float @float_rand(double -1.000000e+01, double 1.000000e+01)
store float %13, float* %8
%14 = call float @float_rand(double -1.000000e+01, double 1.000000e+01)
store float %14, float* %9
%15 = load i8*, i8** %2
%16 = load float, float* %6
%17 = load float, float* %7
%18 = load float, float* %5
%19 = load float, float* %8
%20 = load float, float* %9
%21 = call i32 @snprintf(i8* %15, i32 50, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), float %16, float %17, float %18, float %19, float %20)
%22 = load i8*, i8** %2
%23 = call i32 @strlen(i8* %22)
store i32 %23, i32* %4
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
@.str = [27 x i8] c"/%.1f/%.1f/%.1f/%.1f/%.1f/\00"
define i32 @getRandomValues(i8* %0) {
%2 = tail call float @float_rand(double 0.000000e+00, double 9.000000e+01)
%3 = tail call float @float_rand(double -3.000000e+01, double 3.000000e+01)
%4 = tail call float @float_rand(double 0.000000e+00, double 4.500000e+01)
%5 = tail call float @float_rand(double -1.000000e+01, double 1.000000e+01)
%6 = tail call float @float_rand(double -1.000000e+01, double 1.000000e+01)
%7 = tail call i32 @snprintf(i8* %0, i32 50, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), float %3, float %4, float %2, float %5, float %6)
%8 = tail call i32 @strlen(i8* %0)
ret i32 %8
}