#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 */
float log(float);
scalar_t__ pow(float, float);
void coupleNoiseFloor(float *noise_level_left, float *noise_level_right) {
  int i;
  ;
  ;
  ;
  for (i = 0; i < 10; i++) {
    float temp1, temp2;
    ;
    ;
    ;
    temp1 = (float)pow(2.0f, (-noise_level_right[i] + 6));
    temp2 = (float)pow(2.0f, (-noise_level_left[i] + 6));
    ;
    ;
    ;
    ;
    ;
    noise_level_left[i] = (float)(6 - log((temp1 + temp2) / 2) * 1.442695041f);
    ;
    ;
    ;
    ;
    noise_level_right[i] = (float)(log(temp2 / temp1) * 1.442695041f);
  };
}


x86 assembly (clang, -O0):
<coupleNoiseFloor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    123e <coupleNoiseFloor+0x11e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  0xea1(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xe99(%rip),%xmm0
call   1040 <pow@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  0xe64(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xe5c(%rip),%xmm0
call   1040 <pow@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  0xe3b(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <log@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe15(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe0d(%rip),%xmm1
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x1c(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
call   1030 <log@plt>
movss  0xde1(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <coupleNoiseFloor+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coupleNoiseFloor>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  0xeb8(%rip),%xmm1
subss  (%r14,%rbx,4),%xmm1
movss  0xeae(%rip),%xmm0
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x8(%rsp)
movss  0xe8f(%rip),%xmm1
subss  (%r15,%rbx,4),%xmm1
movss  0xe85(%rip),%xmm0
call   1040 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
movss  %xmm1,0xc(%rsp)
movss  0x8(%rsp),%xmm0
addss  %xmm1,%xmm0
mulss  0xe64(%rip),%xmm0
call   1030 <log@plt>
movss  0xe5b(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe43(%rip),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,(%r15,%rbx,4)
movss  0xc(%rsp),%xmm0
divss  0x8(%rsp),%xmm0
call   1030 <log@plt>
mulss  0xe2c(%rip),%xmm0
movss  %xmm0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0xa,%rbx
jne    1140 <coupleNoiseFloor+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @coupleNoiseFloor(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
%6 = alloca float
%7 = alloca float
store float* %0, float** %3
store float* %1, float** %4
store i32 0, i32* %5
br label %8
8: ; preds = %50, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %53
11: ; preds = %8
%12 = load float*, float** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds float, float* %12, i64 %14
%16 = load float, float* %15
%17 = fneg float %16
%18 = fadd float %17, 6.000000e+00
%19 = call i64 @pow(float 2.000000e+00, float %18)
%20 = sitofp i64 %19 to float
store float %20, float* %6
%21 = load float*, float** %3
%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 = fneg float %25
%27 = fadd float %26, 6.000000e+00
%28 = call i64 @pow(float 2.000000e+00, float %27)
%29 = sitofp i64 %28 to float
store float %29, float* %7
%30 = load float, float* %6
%31 = load float, float* %7
%32 = fadd float %30, %31
%33 = fdiv float %32, 2.000000e+00
%34 = call float @log(float %33)
%35 = fneg float %34
%36 = call float @llvm.fmuladd.f32(float %35, float 0x3FF7154760000000, float 6.000000e+00)
%37 = load float*, float** %3
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
store float %36, float* %40
%41 = load float, float* %7
%42 = load float, float* %6
%43 = fdiv float %41, %42
%44 = call float @log(float %43)
%45 = fmul float %44, 0x3FF7154760000000
%46 = load float*, float** %4
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds float, float* %46, i64 %48
store float %45, float* %49
br label %50
50: ; preds = %11
%51 = load i32, i32* %5
%52 = add nsw i32 %51, 1
store i32 %52, i32* %5
br label %8
53: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @coupleNoiseFloor(float* nocapture %0, float* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %23, %3 ]
%5 = getelementptr inbounds float, float* %1, i64 %4
%6 = load float, float* %5
%7 = fsub float 6.000000e+00, %6
%8 = tail call i64 @pow(float 2.000000e+00, float %7)
%9 = sitofp i64 %8 to float
%10 = getelementptr inbounds float, float* %0, i64 %4
%11 = load float, float* %10
%12 = fsub float 6.000000e+00, %11
%13 = tail call i64 @pow(float 2.000000e+00, float %12)
%14 = sitofp i64 %13 to float
%15 = fadd float %9, %14
%16 = fmul float %15, 5.000000e-01
%17 = tail call float @log(float %16)
%18 = fneg float %17
%19 = tail call float @llvm.fmuladd.f32(float %18, float 0x3FF7154760000000, float 6.000000e+00)
store float %19, float* %10
%20 = fdiv float %14, %9
%21 = tail call float @log(float %20)
%22 = fmul float %21, 0x3FF7154760000000
store float %22, float* %5
%23 = add nuw nsw i64 %4, 1
%24 = icmp eq i64 %23, 10
br i1 %24, label %25, label %3
25: ; preds = %3
ret void
}