#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*/ sprintf(char *, char *, float, float);
void initBeaconsLocation(char beacon[8][20], int size) {
  float margin = 1.1;
  sprintf(beacon[0], "%.2f  %.2f ", margin, margin);
  sprintf(beacon[1], "%.2f  %.2f ", margin, (float)(12.0) / 2);
  sprintf(beacon[2], "%.2f  %.2f ", margin, (float)(12.0) - margin);
  sprintf(beacon[3], "%.2f  %.2f ", (float)(7.80) - margin,
          (float)(12.0) - margin);
  sprintf(beacon[4], "%.2f  %.2f ", (float)(7.80) - margin, (float)(12.0) / 2);
  sprintf(beacon[5], "%.2f  %.2f ", (float)(7.80) - margin, margin);
  sprintf(beacon[6], "%.2f  %.2f ", (float)(7.80) / 2,
          (float)(12.0) / 4 - margin);
  sprintf(beacon[7], "%.2f  %.2f ", (float)(7.80) / 2,
          (float)3 * (12.0) / 4 - margin);
}


x86 assembly (clang, -O0):
<initBeaconsLocation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xedf(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x14,%rdi
movss  -0x10(%rbp),%xmm0
lea    0xec6(%rip),%rsi
movss  0xeaa(%rip),%xmm1
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x28,%rdi
movss  -0x10(%rbp),%xmm0
movss  0xe94(%rip),%xmm1
subss  -0x10(%rbp),%xmm1
lea    0xe98(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x3c,%rdi
movss  0xe6b(%rip),%xmm0
subss  -0x10(%rbp),%xmm0
movss  0xe66(%rip),%xmm1
subss  -0x10(%rbp),%xmm1
lea    0xe6a(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x50,%rdi
movss  0xe3d(%rip),%xmm0
subss  -0x10(%rbp),%xmm0
lea    0xe49(%rip),%rsi
movss  0xe2d(%rip),%xmm1
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x64,%rdi
movss  0xe14(%rip),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe1b(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x78,%rdi
movss  0xdea(%rip),%xmm1
subss  -0x10(%rbp),%xmm1
lea    0xdfa(%rip),%rsi
movss  0xdd2(%rip),%xmm0
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
add    $0x8c,%rdi
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdc9(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
lea    0xdc2(%rip),%rsi
movss  0xd9a(%rip),%xmm0
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initBeaconsLocation>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xefe(%rip),%r14
movss  0xeda(%rip),%xmm0
mov    %r14,%rsi
movaps %xmm0,%xmm1
call   1030 <sprintf@plt>
lea    0x14(%rbx),%rdi
movss  0xec7(%rip),%xmm1
mov    %r14,%rsi
movss  0xeb8(%rip),%xmm0
call   1030 <sprintf@plt>
lea    0x28(%rbx),%rdi
movss  0xeaf(%rip),%xmm1
mov    %r14,%rsi
movss  0xe9c(%rip),%xmm0
call   1030 <sprintf@plt>
lea    0x3c(%rbx),%rdi
movss  0xe97(%rip),%xmm0
mov    %r14,%rsi
movss  0xe88(%rip),%xmm1
call   1030 <sprintf@plt>
lea    0x50(%rbx),%rdi
mov    %r14,%rsi
movss  0xe78(%rip),%xmm0
movss  0xe68(%rip),%xmm1
call   1030 <sprintf@plt>
lea    0x64(%rbx),%rdi
mov    %r14,%rsi
movss  0xe5c(%rip),%xmm0
movss  0xe48(%rip),%xmm1
call   1030 <sprintf@plt>
lea    0x78(%rbx),%rdi
movss  0xe47(%rip),%xmm0
movss  0xe43(%rip),%xmm1
mov    %r14,%rsi
call   1030 <sprintf@plt>
add    $0x8c,%rbx
movss  0xe30(%rip),%xmm1
mov    %rbx,%rdi
mov    %r14,%rsi
movss  0xe1a(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%.2f %.2f \00"
define void @initBeaconsLocation([20 x i8]* %0, i32 %1) {
%3 = alloca [20 x i8]*
%4 = alloca i32
%5 = alloca float
store [20 x i8]* %0, [20 x i8]** %3
store i32 %1, i32* %4
store float 0x3FF19999A0000000, float* %5
%6 = load [20 x i8]*, [20 x i8]** %3
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%9 = load float, float* %5
%10 = load float, float* %5
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %9, float %10)
%12 = load [20 x i8]*, [20 x i8]** %3
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 1
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%15 = load float, float* %5
%16 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %15, float 6.000000e+00)
%17 = load [20 x i8]*, [20 x i8]** %3
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %17, i64 2
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %18, i64 0, i64 0
%20 = load float, float* %5
%21 = load float, float* %5
%22 = fsub float 1.200000e+01, %21
%23 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %20, float %22)
%24 = load [20 x i8]*, [20 x i8]** %3
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %24, i64 3
%26 = getelementptr inbounds [20 x i8], [20 x i8]* %25, i64 0, i64 0
%27 = load float, float* %5
%28 = fsub float 0x401F333340000000, %27
%29 = load float, float* %5
%30 = fsub float 1.200000e+01, %29
%31 = call i32 @sprintf(i8* %26, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %28, float %30)
%32 = load [20 x i8]*, [20 x i8]** %3
%33 = getelementptr inbounds [20 x i8], [20 x i8]* %32, i64 4
%34 = getelementptr inbounds [20 x i8], [20 x i8]* %33, i64 0, i64 0
%35 = load float, float* %5
%36 = fsub float 0x401F333340000000, %35
%37 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %36, float 6.000000e+00)
%38 = load [20 x i8]*, [20 x i8]** %3
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %38, i64 5
%40 = getelementptr inbounds [20 x i8], [20 x i8]* %39, i64 0, i64 0
%41 = load float, float* %5
%42 = fsub float 0x401F333340000000, %41
%43 = load float, float* %5
%44 = call i32 @sprintf(i8* %40, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %42, float %43)
%45 = load [20 x i8]*, [20 x i8]** %3
%46 = getelementptr inbounds [20 x i8], [20 x i8]* %45, i64 6
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %46, i64 0, i64 0
%48 = load float, float* %5
%49 = fsub float 3.000000e+00, %48
%50 = call i32 @sprintf(i8* %47, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x400F333340000000, float %49)
%51 = load [20 x i8]*, [20 x i8]** %3
%52 = getelementptr inbounds [20 x i8], [20 x i8]* %51, i64 7
%53 = getelementptr inbounds [20 x i8], [20 x i8]* %52, i64 0, i64 0
%54 = load float, float* %5
%55 = fpext float %54 to double
%56 = fsub double 9.000000e+00, %55
%57 = fptrunc double %56 to float
%58 = call i32 @sprintf(i8* %53, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x400F333340000000, float %57)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%.2f %.2f \00"
define void @initBeaconsLocation([20 x i8]* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 0, i64 0
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x3FF19999A0000000, float 0x3FF19999A0000000)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 1, i64 0
%6 = tail call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x3FF19999A0000000, float 6.000000e+00)
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 2, i64 0
%8 = tail call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x3FF19999A0000000, float 0x4025CCCCC0000000)
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 3, i64 0
%10 = tail call i32 @sprintf(i8* %9, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x401ACCCCE0000000, float 0x4025CCCCC0000000)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 4, i64 0
%12 = tail call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x401ACCCCE0000000, float 6.000000e+00)
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 5, i64 0
%14 = tail call i32 @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x401ACCCCE0000000, float 0x3FF19999A0000000)
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 6, i64 0
%16 = tail call i32 @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x400F333340000000, float 0x3FFE666660000000)
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %0, i64 7, i64 0
%18 = tail call i32 @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float 0x400F333340000000, float 0x401F9999A0000000)
ret void
}