#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*/ fabsf(float);
float fmaxf(int /*<<< orphan*/, int /*<<< orphan*/);
void max_abs_division(float *output, float *data0, float *data1) {
  int i;
  for (i = 0; i < 32; i++)
    output[i] = fmaxf(fabsf(data0[i]), fabsf(data1[i]));
}


x86 assembly (clang, -O0):
<max_abs_division>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x20,-0x1c(%rbp)
jge    1191 <max_abs_division+0x71>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <fabsf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <fabsf@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
call   1040 <fmaxf@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113b <max_abs_division+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_abs_division>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  (%r15,%rbx,4),%xmm0
call   1030 <fabsf@plt>
mov    %eax,%ebp
movss  (%r14,%rbx,4),%xmm0
call   1030 <fabsf@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <fmaxf@plt>
movss  %xmm0,(%r12,%rbx,4)
movss  0x4(%r15,%rbx,4),%xmm0
call   1030 <fabsf@plt>
mov    %eax,%ebp
movss  0x4(%r14,%rbx,4),%xmm0
call   1030 <fabsf@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <fmaxf@plt>
movss  %xmm0,0x4(%r12,%rbx,4)
add    $0x2,%rbx
cmp    $0x20,%rbx
jne    1140 <max_abs_division+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @max_abs_division(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
store i32 0, i32* %7
br label %8
8: ; preds = %29, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 32
br i1 %10, label %11, label %32
11: ; preds = %8
%12 = load float*, float** %5
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds float, float* %12, i64 %14
%16 = load float, float* %15
%17 = call i32 @fabsf(float %16)
%18 = load float*, float** %6
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
%22 = load float, float* %21
%23 = call i32 @fabsf(float %22)
%24 = call float @fmaxf(i32 %17, i32 %23)
%25 = load float*, float** %4
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %25, i64 %27
store float %24, float* %28
br label %29
29: ; preds = %11
%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 @max_abs_division(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ 0, %3 ], [ %23, %4 ]
%6 = getelementptr inbounds float, float* %1, i64 %5
%7 = load float, float* %6
%8 = tail call i32 @fabsf(float %7)
%9 = getelementptr inbounds float, float* %2, i64 %5
%10 = load float, float* %9
%11 = tail call i32 @fabsf(float %10)
%12 = tail call float @fmaxf(i32 %8, i32 %11)
%13 = getelementptr inbounds float, float* %0, i64 %5
store float %12, float* %13
%14 = or i64 %5, 1
%15 = getelementptr inbounds float, float* %1, i64 %14
%16 = load float, float* %15
%17 = tail call i32 @fabsf(float %16)
%18 = getelementptr inbounds float, float* %2, i64 %14
%19 = load float, float* %18
%20 = tail call i32 @fabsf(float %19)
%21 = tail call float @fmaxf(i32 %17, i32 %20)
%22 = getelementptr inbounds float, float* %0, i64 %14
store float %21, float* %22
%23 = add nuw nsw i64 %5, 2
%24 = icmp eq i64 %23, 32
br i1 %24, label %25, label %4
25: ; preds = %4
ret void
}