#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*/ BTIC2D_TransWHT_Stride4(int *, int *, int, int);
void BTIC2D_TransWHT4(int *iblk, int *oblk) {
  int s[16];
  int i, j;
  BTIC2D_TransWHT_Stride4(iblk + 4 * 0, s + 4 * 0, 1, 1);
  BTIC2D_TransWHT_Stride4(iblk + 4 * 1, s + 4 * 1, 1, 1);
  BTIC2D_TransWHT_Stride4(iblk + 4 * 2, s + 4 * 2, 1, 1);
  BTIC2D_TransWHT_Stride4(iblk + 4 * 3, s + 4 * 3, 1, 1);
  BTIC2D_TransWHT_Stride4(s + 0, oblk + 0, 4, 4);
  BTIC2D_TransWHT_Stride4(s + 1, oblk + 1, 4, 4);
  BTIC2D_TransWHT_Stride4(s + 2, oblk + 2, 4, 4);
  BTIC2D_TransWHT_Stride4(s + 3, oblk + 3, 4, 4);
}


x86 assembly (clang, -O0):
<BTIC2D_TransWHT4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
lea    -0x50(%rbp),%rsi
add    $0x10,%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x50(%rbp),%rsi
add    $0x20,%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
lea    -0x50(%rbp),%rsi
add    $0x30,%rsi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    -0x50(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    -0x50(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    -0x50(%rbp),%rdi
add    $0xc,%rdi
mov    -0x10(%rbp),%rsi
add    $0xc,%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTIC2D_TransWHT4>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    0x10(%rbx),%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    0x20(%rbx),%rdi
lea    0x20(%rsp),%rsi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
add    $0x30,%rbx
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    0x4(%rsp),%rdi
lea    0x4(%r15),%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    0x8(%rsp),%rdi
lea    0x8(%r15),%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
lea    0xc(%rsp),%rdi
add    $0xc,%r15
mov    %r15,%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <BTIC2D_TransWHT_Stride4@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @BTIC2D_TransWHT4(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [16 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = call i32 @BTIC2D_TransWHT_Stride4(i32* %9, i32* %11, i32 1, i32 1)
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 4
%15 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = call i32 @BTIC2D_TransWHT_Stride4(i32* %14, i32* %16, i32 1, i32 1)
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 8
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%21 = getelementptr inbounds i32, i32* %20, i64 8
%22 = call i32 @BTIC2D_TransWHT_Stride4(i32* %19, i32* %21, i32 1, i32 1)
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 12
%25 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%26 = getelementptr inbounds i32, i32* %25, i64 12
%27 = call i32 @BTIC2D_TransWHT_Stride4(i32* %24, i32* %26, i32 1, i32 1)
%28 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%29 = getelementptr inbounds i32, i32* %28, i64 0
%30 = load i32*, i32** %4
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = call i32 @BTIC2D_TransWHT_Stride4(i32* %29, i32* %31, i32 4, i32 4)
%33 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%34 = getelementptr inbounds i32, i32* %33, i64 1
%35 = load i32*, i32** %4
%36 = getelementptr inbounds i32, i32* %35, i64 1
%37 = call i32 @BTIC2D_TransWHT_Stride4(i32* %34, i32* %36, i32 4, i32 4)
%38 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%39 = getelementptr inbounds i32, i32* %38, i64 2
%40 = load i32*, i32** %4
%41 = getelementptr inbounds i32, i32* %40, i64 2
%42 = call i32 @BTIC2D_TransWHT_Stride4(i32* %39, i32* %41, i32 4, i32 4)
%43 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%44 = getelementptr inbounds i32, i32* %43, i64 3
%45 = load i32*, i32** %4
%46 = getelementptr inbounds i32, i32* %45, i64 3
%47 = call i32 @BTIC2D_TransWHT_Stride4(i32* %44, i32* %46, i32 4, i32 4)
ret void
}

LLVM IR (-O2):
define void @BTIC2D_TransWHT4(i32* %0, i32* %1) {
%3 = alloca [16 x i32]
%4 = bitcast [16 x i32]* %3 to i8*
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%6 = call i32 @BTIC2D_TransWHT_Stride4(i32* %0, i32* %5, i32 1, i32 1)
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 4
%9 = call i32 @BTIC2D_TransWHT_Stride4(i32* %7, i32* %8, i32 1, i32 1)
%10 = getelementptr inbounds i32, i32* %0, i64 8
%11 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 8
%12 = call i32 @BTIC2D_TransWHT_Stride4(i32* %10, i32* %11, i32 1, i32 1)
%13 = getelementptr inbounds i32, i32* %0, i64 12
%14 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 12
%15 = call i32 @BTIC2D_TransWHT_Stride4(i32* %13, i32* %14, i32 1, i32 1)
%16 = call i32 @BTIC2D_TransWHT_Stride4(i32* %5, i32* %1, i32 4, i32 4)
%17 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 1
%18 = getelementptr inbounds i32, i32* %1, i64 1
%19 = call i32 @BTIC2D_TransWHT_Stride4(i32* %17, i32* %18, i32 4, i32 4)
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 2
%21 = getelementptr inbounds i32, i32* %1, i64 2
%22 = call i32 @BTIC2D_TransWHT_Stride4(i32* %20, i32* %21, i32 4, i32 4)
%23 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 3
%24 = getelementptr inbounds i32, i32* %1, i64 3
%25 = call i32 @BTIC2D_TransWHT_Stride4(i32* %23, i32* %24, i32 4, i32 4)
ret void
}