#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 snprintf(char *, int, char *, ...);
int /*<<< orphan*/ system(char *);
void display_times(int lanes, float *times) {
  int i;
  int pos;
  char cmdline[80];
  pos = snprintf(cmdline, 80, "toilet -f future");
  for (i = 0; i < lanes; i++) {
    pos += snprintf(cmdline + pos, 80 - pos, " %1.4f", times[i]);
  }
  system(cmdline);
}


x86 assembly (clang, -O0):
<display_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x50,%esi
lea    0xec1(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11a2 <display_times+0x82>
lea    -0x70(%rbp),%rdi
movslq -0x18(%rbp),%rax
add    %rax,%rdi
mov    $0x50,%esi
sub    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8a(%rip),%rdx
mov    $0x1,%al
call   1040 <snprintf@plt>
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <display_times+0x30>
lea    -0x70(%rbp),%rdi
call   1030 <system@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_times>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0xec8(%rip),%rdx
mov    %rsp,%rdi
mov    $0x50,%esi
xor    %eax,%eax
call   1040 <snprintf@plt>
test   %ebp,%ebp
jle    118d <display_times+0x6d>
mov    %ebp,%r12d
xor    %ebx,%ebx
lea    0xeba(%rip),%r14
nopw   0x0(%rax,%rax,1)
movslq %eax,%rbp
lea    (%rsp,%rbp,1),%rdi
mov    $0x50,%esi
sub    %ebp,%esi
movss  (%r15,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdx
mov    $0x1,%al
call   1040 <snprintf@plt>
add    %ebp,%eax
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1160 <display_times+0x40>
mov    %rsp,%rdi
call   1030 <system@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"toilet -f future\00"
@.str.1 = [7 x i8] c" %1.4f\00"
define void @display_times(i32 %0, float* %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [80 x i8]
store i32 %0, i32* %3
store float* %1, float** %4
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%9 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %8, i32 80, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 %9, i32* %6
store i32 0, i32* %5
br label %10
10: ; preds = %30, %2
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %33
14: ; preds = %10
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i32, i32* %6
%20 = sub nsw i32 80, %19
%21 = load float*, float** %4
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
%25 = load float, float* %24
%26 = fpext float %25 to double
%27 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %18, i32 %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = load i32, i32* %6
%29 = add nsw i32 %28, %27
store i32 %29, i32* %6
br label %30
30: ; preds = %14
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %10
33: ; preds = %10
%34 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%35 = call i32 @system(i8* %34)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"toilet -f future\00"
@.str.1 = [7 x i8] c" %1.4f\00"
define void @display_times(i32 %0, float* nocapture %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %4, i32 80, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %22
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %20, %9 ]
%11 = phi i32 [ %5, %7 ], [ %19, %9 ]
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %12
%14 = sub nsw i32 80, %11
%15 = getelementptr inbounds float, float* %1, i64 %10
%16 = load float, float* %15
%17 = fpext float %16 to double
%18 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %13, i32 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = add nsw i32 %18, %11
%20 = add nuw nsw i64 %10, 1
%21 = icmp eq i64 %20, %8
br i1 %21, label %22, label %9
22: ; preds = %9, %2
%23 = call i32 @system(i8* %4)
ret void
}