#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*/ drmp3_L3_imdct36(float *, float *, float const *,
                                    unsigned int);
int /*<<< orphan*/ drmp3_L3_imdct_short(float *, float *, unsigned int);
void drmp3_L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type,
                       unsigned n_long_bands) {
  static const float g_mdct_window[2][18] = {
      {0.99904822f, 0.99144486f, 0.97629601f, 0.95371695f, 0.92387953f,
       0.88701083f, 0.84339145f, 0.79335334f, 0.73727734f, 0.04361938f,
       0.13052619f, 0.21643961f, 0.30070580f, 0.38268343f, 0.46174861f,
       0.53729961f, 0.60876143f, 0.67559021f},
      {1, 1, 1, 1, 1, 1, 0.99144486f, 0.92387953f, 0.79335334f, 0, 0, 0, 0, 0,
       0, 0.13052619f, 0.38268343f, 0.60876143f}};
  if (n_long_bands) {
    drmp3_L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands);
    grbuf += 18 * n_long_bands;
    overlap += 9 * n_long_bands;
  }
  if (block_type == 2)
    drmp3_L3_imdct_short(grbuf, overlap, 32 - n_long_bands);
  else
    drmp3_L3_imdct36(grbuf, overlap, g_mdct_window[block_type == 3],
                     32 - n_long_bands);
}


x86 assembly (clang, -O0):
<drmp3_L3_imdct_gr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1181 <drmp3_L3_imdct_gr+0x61>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%ecx
lea    0xeae(%rip),%rdx
call   1040 <drmp3_L3_imdct36@plt>
imul   $0x12,-0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
imul   $0x9,-0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x2,-0x14(%rbp)
jne    11a5 <drmp3_L3_imdct_gr+0x85>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x20,%edx
sub    -0x18(%rbp),%edx
call   1030 <drmp3_L3_imdct_short@plt>
jmp    11d6 <drmp3_L3_imdct_gr+0xb6>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
cmpl   $0x3,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
lea    0xe3e(%rip),%rdx
imul   $0x48,%rax,%rax
add    %rax,%rdx
mov    $0x20,%ecx
sub    -0x18(%rbp),%ecx
call   1040 <drmp3_L3_imdct36@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drmp3_L3_imdct_gr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r15
test   %ecx,%ecx
je     115a <drmp3_L3_imdct_gr+0x3a>
lea    0xec4(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%ecx
call   1040 <drmp3_L3_imdct36@plt>
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,8),%eax
lea    (%r15,%rax,4),%r15
lea    (%rbx,%rbx,8),%eax
lea    (%r14,%rax,4),%r14
cmp    $0x2,%ebp
jne    117b <drmp3_L3_imdct_gr+0x5b>
mov    $0x20,%edx
sub    %ebx,%edx
mov    %r15,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <drmp3_L3_imdct_short@plt>
xor    %eax,%eax
cmp    $0x3,%ebp
sete   %al
lea    (%rax,%rax,8),%rax
lea    0xe72(%rip),%rcx
lea    (%rcx,%rax,8),%rdx
mov    $0x20,%ecx
sub    %ebx,%ecx
mov    %r15,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <drmp3_L3_imdct36@plt>

LLVM IR (-O0):
@drmp3_L3_imdct_gr.g_mdct_window = internal constant [2 x [18 x float]] [[18 x float] [float 0x3FEFF83400000000, float 0x3FEFB9EAA0000000, float 0x3FEF3DD120000000, float 0x3FEE84D960000000, float 0x3FED906BC0000000, float 0x3FEC626480000000, float 0x3FEAFD1020000000, float 0x3FE9632680000000, float 0x3FE797C6A0000000, float 0x3FA6554780000000, float 0x3FC0B51500000000, float 0x3FCBB44B00000000, float 0x3FD33EC380000000, float 0x3FD87DE2A0000000, float 0x3FDD8D4A00000000, float 0x3FE1318F00000000, float 0x3FE37AF940000000, float 0x3FE59E6F60000000], [18 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0x3FEFB9EAA0000000, float 0x3FED906BC0000000, float 0x3FE9632680000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0x3FC0B51500000000, float 0x3FD87DE2A0000000, float 0x3FE37AF940000000]]
define void @drmp3_L3_imdct_gr(float* %0, float* %1, i32 %2, i32 %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %4
%12 = load float*, float** %5
%13 = load float*, float** %6
%14 = load i32, i32* %8
%15 = call i32 @drmp3_L3_imdct36(float* %12, float* %13, float* getelementptr inbounds ([2 x [18 x float]], [2 x [18 x float]]* @drmp3_L3_imdct_gr.g_mdct_window, i64 0, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %8
%17 = mul i32 18, %16
%18 = load float*, float** %5
%19 = zext i32 %17 to i64
%20 = getelementptr inbounds float, float* %18, i64 %19
store float* %20, float** %5
%21 = load i32, i32* %8
%22 = mul i32 9, %21
%23 = load float*, float** %6
%24 = zext i32 %22 to i64
%25 = getelementptr inbounds float, float* %23, i64 %24
store float* %25, float** %6
br label %26
26: ; preds = %11, %4
%27 = load i32, i32* %7
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %35
29: ; preds = %26
%30 = load float*, float** %5
%31 = load float*, float** %6
%32 = load i32, i32* %8
%33 = sub i32 32, %32
%34 = call i32 @drmp3_L3_imdct_short(float* %30, float* %31, i32 %33)
br label %47
35: ; preds = %26
%36 = load float*, float** %5
%37 = load float*, float** %6
%38 = load i32, i32* %7
%39 = icmp eq i32 %38, 3
%40 = zext i1 %39 to i32
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [2 x [18 x float]], [2 x [18 x float]]* @drmp3_L3_imdct_gr.g_mdct_window, i64 0, i64 %41
%43 = getelementptr inbounds [18 x float], [18 x float]* %42, i64 0, i64 0
%44 = load i32, i32* %8
%45 = sub i32 32, %44
%46 = call i32 @drmp3_L3_imdct36(float* %36, float* %37, float* %43, i32 %45)
br label %47
47: ; preds = %35, %29
ret void
}

LLVM IR (-O2):
@drmp3_L3_imdct_gr.g_mdct_window = internal constant [2 x [18 x float]] [[18 x float] [float 0x3FEFF83400000000, float 0x3FEFB9EAA0000000, float 0x3FEF3DD120000000, float 0x3FEE84D960000000, float 0x3FED906BC0000000, float 0x3FEC626480000000, float 0x3FEAFD1020000000, float 0x3FE9632680000000, float 0x3FE797C6A0000000, float 0x3FA6554780000000, float 0x3FC0B51500000000, float 0x3FCBB44B00000000, float 0x3FD33EC380000000, float 0x3FD87DE2A0000000, float 0x3FDD8D4A00000000, float 0x3FE1318F00000000, float 0x3FE37AF940000000, float 0x3FE59E6F60000000], [18 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0x3FEFB9EAA0000000, float 0x3FED906BC0000000, float 0x3FE9632680000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0x3FC0B51500000000, float 0x3FD87DE2A0000000, float 0x3FE37AF940000000]]
define void @drmp3_L3_imdct_gr(float* %0, float* %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %14, label %6
6: ; preds = %4
%7 = tail call i32 @drmp3_L3_imdct36(float* %0, float* %1, float* getelementptr inbounds ([2 x [18 x float]], [2 x [18 x float]]* @drmp3_L3_imdct_gr.g_mdct_window, i64 0, i64 0, i64 0), i32 %3)
%8 = mul i32 %3, 18
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds float, float* %0, i64 %9
%11 = mul i32 %3, 9
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds float, float* %1, i64 %12
br label %14
14: ; preds = %6, %4
%15 = phi float* [ %13, %6 ], [ %1, %4 ]
%16 = phi float* [ %10, %6 ], [ %0, %4 ]
%17 = icmp eq i32 %2, 2
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = sub i32 32, %3
%20 = tail call i32 @drmp3_L3_imdct_short(float* %16, float* %15, i32 %19)
br label %27
21: ; preds = %14
%22 = icmp eq i32 %2, 3
%23 = zext i1 %22 to i64
%24 = getelementptr inbounds [2 x [18 x float]], [2 x [18 x float]]* @drmp3_L3_imdct_gr.g_mdct_window, i64 0, i64 %23, i64 0
%25 = sub i32 32, %3
%26 = tail call i32 @drmp3_L3_imdct36(float* %16, float* %15, float* %24, i32 %25)
br label %27
27: ; preds = %21, %18
ret void
}