#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 */
struct _float_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ float_list_add(struct _float_list *, float);
struct _float_list *float_list_initial();
struct _float_list *float_list_initial_fill(int length, float value) {
  struct _float_list *s = float_list_initial();
  int i;
  for (i = 0; i < length; i++)
    float_list_add(s, value);
  return s;
}


x86 assembly (clang, -O0):
<float_list_initial_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <float_list_initial@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    116a <float_list_initial_fill+0x4a>
mov    -0x10(%rbp),%rdi
movss  -0x8(%rbp),%xmm0
call   1040 <float_list_add@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <float_list_initial_fill+0x22>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_list_initial_fill>:
push   %r14
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <float_list_initial@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1153 <float_list_initial_fill+0x33>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
movss  0x4(%rsp),%xmm0
call   1040 <float_list_add@plt>
add    $0xffffffff,%ebx
jne    1140 <float_list_initial_fill+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct._float_list = type { i32 }
define %struct._float_list* @float_list_initial_fill(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca %struct._float_list*
%6 = alloca i32
store i32 %0, i32* %3
store float %1, float* %4
%7 = call %struct._float_list* (...) @float_list_initial()
store %struct._float_list* %7, %struct._float_list** %5
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load %struct._float_list*, %struct._float_list** %5
%14 = load float, float* %4
%15 = call i32 @float_list_add(%struct._float_list* %13, float %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %8
19: ; preds = %8
%20 = load %struct._float_list*, %struct._float_list** %5
ret %struct._float_list* %20
}

LLVM IR (-O2):
%struct._float_list = type { i32 }
define %struct._float_list* @float_list_initial_fill(i32 %0, float %1) {
%3 = tail call %struct._float_list* (...) @float_list_initial()
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @float_list_add(%struct._float_list* %3, float %1)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret %struct._float_list* %3
}