#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*/ shift_left_f(float *);
void dump_out(float *out, float sum[][4], int n) {
  int i;
  for (i = 0; i < n; i++) {
    out[i] = sum[i][0];
    shift_left_f(sum[i]);
  }
}


x86 assembly (clang, -O0):
<dump_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1178 <dump_out+0x68>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rdi
movslq -0x18(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
call   1030 <shift_left_f@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <dump_out+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_out>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1151 <dump_out+0x41>
mov    %rsi,%r12
mov    %rdi,%r14
mov    %edx,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movss  (%r12),%xmm0
movss  %xmm0,(%r14,%rbx,4)
mov    %r12,%rdi
call   1030 <shift_left_f@plt>
add    $0x1,%rbx
add    $0x10,%r12
cmp    %rbx,%r15
jne    1130 <dump_out+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @dump_out(float* %0, [4 x float]* %1, i32 %2) {
%4 = alloca float*
%5 = alloca [4 x float]*
%6 = alloca i32
%7 = alloca i32
store float* %0, float** %4
store [4 x float]* %1, [4 x float]** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %29, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = load [4 x float]*, [4 x float]** %5
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x float], [4 x float]* %13, i64 %15
%17 = getelementptr inbounds [4 x float], [4 x float]* %16, i64 0, i64 0
%18 = load float, float* %17
%19 = load float*, float** %4
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %19, i64 %21
store float %18, float* %22
%23 = load [4 x float]*, [4 x float]** %5
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [4 x float], [4 x float]* %23, i64 %25
%27 = getelementptr inbounds [4 x float], [4 x float]* %26, i64 0, i64 0
%28 = call i32 @shift_left_f(float* %27)
br label %29
29: ; preds = %12
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %8
32: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @dump_out(float* nocapture writeonly %0, [4 x float]* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 %8, i64 0
%10 = load float, float* %9
%11 = getelementptr inbounds float, float* %0, i64 %8
store float %10, float* %11
%12 = tail call i32 @shift_left_f(float* %9)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}