#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_DequantReorder(int *, int *, int *);
int /*<<< orphan*/ BTIC2D_TransIBHT8Stride(int *, int *, int, int, int, int);
void BTIC2D_DecodeBlockYUV(int *iblk, int *oblky, int *oblku, int *oblkv,
                           int *yqtab, int *uvqtab, int yxstride, int yystride,
                           int uvxstride, int uvystride) {
  int tblk[512];
  BTIC2D_DequantReorder(iblk + 0, tblk + 0, yqtab);
  BTIC2D_DequantReorder(iblk + 64, tblk + 64, yqtab);
  BTIC2D_DequantReorder(iblk + 128, tblk + 128, yqtab);
  BTIC2D_DequantReorder(iblk + 192, tblk + 192, yqtab);
  BTIC2D_DequantReorder(iblk + 256, tblk + 256, uvqtab);
  BTIC2D_DequantReorder(iblk + 320, tblk + 320, uvqtab);
  BTIC2D_TransIBHT8Stride(tblk + 0, oblky + 0 * yystride + 0 * yxstride, 1, 8,
                          yxstride, yystride);
  BTIC2D_TransIBHT8Stride(tblk + 64, oblky + 0 * yystride + 8 * yxstride, 1, 8,
                          yxstride, yystride);
  BTIC2D_TransIBHT8Stride(tblk + 128, oblky + 8 * yystride + 0 * yxstride, 1, 8,
                          yxstride, yystride);
  BTIC2D_TransIBHT8Stride(tblk + 192, oblky + 8 * yystride + 8 * yxstride, 1, 8,
                          yxstride, yystride);
  BTIC2D_TransIBHT8Stride(tblk + 256, oblku, 1, 8, uvxstride, uvystride);
  BTIC2D_TransIBHT8Stride(tblk + 320, oblkv, 1, 8, uvxstride, uvystride);
}


x86 assembly (clang, -O0):
<BTIC2D_DecodeBlockYUV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x830(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    -0x8(%rbp),%rdi
add    $0x100,%rdi
lea    -0x830(%rbp),%rsi
add    $0x100,%rsi
mov    -0x28(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    -0x8(%rbp),%rdi
add    $0x200,%rdi
lea    -0x830(%rbp),%rsi
add    $0x200,%rsi
mov    -0x28(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    -0x8(%rbp),%rdi
add    $0x300,%rdi
lea    -0x830(%rbp),%rsi
add    $0x300,%rsi
mov    -0x28(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    -0x8(%rbp),%rdi
add    $0x400,%rdi
lea    -0x830(%rbp),%rsi
add    $0x400,%rsi
mov    -0x30(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    -0x8(%rbp),%rdi
add    $0x500,%rdi
lea    -0x830(%rbp),%rsi
add    $0x500,%rsi
mov    -0x30(%rbp),%rdx
call   1040 <BTIC2D_DequantReorder@plt>
lea    -0x830(%rbp),%rdi
mov    -0x10(%rbp),%rsi
imul   $0x0,0x18(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
imul   $0x0,0x10(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    -0x830(%rbp),%rdi
add    $0x100,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x0,0x18(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    -0x830(%rbp),%rdi
add    $0x200,%rdi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
imul   $0x0,0x10(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    -0x830(%rbp),%rdi
add    $0x300,%rdi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    -0x830(%rbp),%rdi
add    $0x400,%rdi
mov    -0x18(%rbp),%rsi
mov    0x20(%rbp),%r8d
mov    0x28(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    -0x830(%rbp),%rdi
add    $0x500,%rdi
mov    -0x20(%rbp),%rsi
mov    0x20(%rbp),%r8d
mov    0x28(%rbp),%r9d
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <BTIC2D_TransIBHT8Stride@plt>
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTIC2D_DecodeBlockYUV>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    %r9,%r13
mov    %r8,%r15
mov    %rcx,0x8(%rsp)
mov    %rdx,(%rsp)
mov    %rsi,%r14
mov    %rdi,%r12
mov    0x850(%rsp),%ebx
lea    0x10(%rsp),%rbp
mov    %rbp,%rsi
mov    %r8,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
lea    0x100(%r12),%rdi
lea    0x110(%rsp),%rsi
mov    %r15,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
lea    0x200(%r12),%rdi
lea    0x210(%rsp),%rsi
mov    %r15,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
lea    0x300(%r12),%rdi
lea    0x310(%rsp),%rsi
mov    %r15,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
lea    0x400(%r12),%rdi
lea    0x410(%rsp),%rsi
mov    %r13,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
add    $0x500,%r12
lea    0x510(%rsp),%rsi
mov    %r12,%rdi
mov    %r13,%rdx
call   1040 <BTIC2D_DequantReorder@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    %rbx,%r15
mov    %r15d,%r8d
mov    0x858(%rsp),%r12d
mov    %r12d,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    0x0(,%r15,8),%eax
movslq %eax,%rbp
lea    (%r14,%rbp,4),%rsi
lea    0x110(%rsp),%rdi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    %r15d,%r8d
mov    %r12d,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    0x0(,%r12,8),%eax
cltq
lea    (%r14,%rax,4),%rbx
lea    0x210(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    %r15d,%r8d
mov    %r12d,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    (%rbx,%rbp,4),%rsi
lea    0x310(%rsp),%rdi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    %r15d,%r8d
mov    %r12d,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    0x410(%rsp),%rdi
mov    (%rsp),%rsi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    0x860(%rsp),%ebx
mov    %ebx,%r8d
mov    0x868(%rsp),%ebp
mov    %ebp,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
lea    0x510(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    $0x1,%edx
mov    $0x8,%ecx
mov    %ebx,%r8d
mov    %ebp,%r9d
call   1030 <BTIC2D_TransIBHT8Stride@plt>
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @BTIC2D_DecodeBlockYUV(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca [512 x i32]
store i32* %0, i32** %11
store i32* %1, i32** %12
store i32* %2, i32** %13
store i32* %3, i32** %14
store i32* %4, i32** %15
store i32* %5, i32** %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%22 = load i32*, i32** %11
%23 = getelementptr inbounds i32, i32* %22, i64 0
%24 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%25 = getelementptr inbounds i32, i32* %24, i64 0
%26 = load i32*, i32** %15
%27 = call i32 @BTIC2D_DequantReorder(i32* %23, i32* %25, i32* %26)
%28 = load i32*, i32** %11
%29 = getelementptr inbounds i32, i32* %28, i64 64
%30 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%31 = getelementptr inbounds i32, i32* %30, i64 64
%32 = load i32*, i32** %15
%33 = call i32 @BTIC2D_DequantReorder(i32* %29, i32* %31, i32* %32)
%34 = load i32*, i32** %11
%35 = getelementptr inbounds i32, i32* %34, i64 128
%36 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%37 = getelementptr inbounds i32, i32* %36, i64 128
%38 = load i32*, i32** %15
%39 = call i32 @BTIC2D_DequantReorder(i32* %35, i32* %37, i32* %38)
%40 = load i32*, i32** %11
%41 = getelementptr inbounds i32, i32* %40, i64 192
%42 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%43 = getelementptr inbounds i32, i32* %42, i64 192
%44 = load i32*, i32** %15
%45 = call i32 @BTIC2D_DequantReorder(i32* %41, i32* %43, i32* %44)
%46 = load i32*, i32** %11
%47 = getelementptr inbounds i32, i32* %46, i64 256
%48 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%49 = getelementptr inbounds i32, i32* %48, i64 256
%50 = load i32*, i32** %16
%51 = call i32 @BTIC2D_DequantReorder(i32* %47, i32* %49, i32* %50)
%52 = load i32*, i32** %11
%53 = getelementptr inbounds i32, i32* %52, i64 320
%54 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%55 = getelementptr inbounds i32, i32* %54, i64 320
%56 = load i32*, i32** %16
%57 = call i32 @BTIC2D_DequantReorder(i32* %53, i32* %55, i32* %56)
%58 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%59 = getelementptr inbounds i32, i32* %58, i64 0
%60 = load i32*, i32** %12
%61 = load i32, i32* %18
%62 = mul nsw i32 0, %61
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %60, i64 %63
%65 = load i32, i32* %17
%66 = mul nsw i32 0, %65
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i32, i32* %64, i64 %67
%69 = load i32, i32* %17
%70 = load i32, i32* %18
%71 = call i32 @BTIC2D_TransIBHT8Stride(i32* %59, i32* %68, i32 1, i32 8, i32 %69, i32 %70)
%72 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%73 = getelementptr inbounds i32, i32* %72, i64 64
%74 = load i32*, i32** %12
%75 = load i32, i32* %18
%76 = mul nsw i32 0, %75
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i32, i32* %74, i64 %77
%79 = load i32, i32* %17
%80 = mul nsw i32 8, %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i32, i32* %78, i64 %81
%83 = load i32, i32* %17
%84 = load i32, i32* %18
%85 = call i32 @BTIC2D_TransIBHT8Stride(i32* %73, i32* %82, i32 1, i32 8, i32 %83, i32 %84)
%86 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%87 = getelementptr inbounds i32, i32* %86, i64 128
%88 = load i32*, i32** %12
%89 = load i32, i32* %18
%90 = mul nsw i32 8, %89
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i32, i32* %88, i64 %91
%93 = load i32, i32* %17
%94 = mul nsw i32 0, %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %92, i64 %95
%97 = load i32, i32* %17
%98 = load i32, i32* %18
%99 = call i32 @BTIC2D_TransIBHT8Stride(i32* %87, i32* %96, i32 1, i32 8, i32 %97, i32 %98)
%100 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%101 = getelementptr inbounds i32, i32* %100, i64 192
%102 = load i32*, i32** %12
%103 = load i32, i32* %18
%104 = mul nsw i32 8, %103
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i32, i32* %102, i64 %105
%107 = load i32, i32* %17
%108 = mul nsw i32 8, %107
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i32, i32* %106, i64 %109
%111 = load i32, i32* %17
%112 = load i32, i32* %18
%113 = call i32 @BTIC2D_TransIBHT8Stride(i32* %101, i32* %110, i32 1, i32 8, i32 %111, i32 %112)
%114 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%115 = getelementptr inbounds i32, i32* %114, i64 256
%116 = load i32*, i32** %13
%117 = load i32, i32* %19
%118 = load i32, i32* %20
%119 = call i32 @BTIC2D_TransIBHT8Stride(i32* %115, i32* %116, i32 1, i32 8, i32 %117, i32 %118)
%120 = getelementptr inbounds [512 x i32], [512 x i32]* %21, i64 0, i64 0
%121 = getelementptr inbounds i32, i32* %120, i64 320
%122 = load i32*, i32** %14
%123 = load i32, i32* %19
%124 = load i32, i32* %20
%125 = call i32 @BTIC2D_TransIBHT8Stride(i32* %121, i32* %122, i32 1, i32 8, i32 %123, i32 %124)
ret void
}

LLVM IR (-O2):
define void @BTIC2D_DecodeBlockYUV(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca [512 x i32]
%12 = bitcast [512 x i32]* %11 to i8*
%13 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 0
%14 = call i32 @BTIC2D_DequantReorder(i32* %0, i32* %13, i32* %4)
%15 = getelementptr inbounds i32, i32* %0, i64 64
%16 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 64
%17 = call i32 @BTIC2D_DequantReorder(i32* %15, i32* %16, i32* %4)
%18 = getelementptr inbounds i32, i32* %0, i64 128
%19 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 128
%20 = call i32 @BTIC2D_DequantReorder(i32* %18, i32* %19, i32* %4)
%21 = getelementptr inbounds i32, i32* %0, i64 192
%22 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 192
%23 = call i32 @BTIC2D_DequantReorder(i32* %21, i32* %22, i32* %4)
%24 = getelementptr inbounds i32, i32* %0, i64 256
%25 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 256
%26 = call i32 @BTIC2D_DequantReorder(i32* %24, i32* %25, i32* %5)
%27 = getelementptr inbounds i32, i32* %0, i64 320
%28 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 320
%29 = call i32 @BTIC2D_DequantReorder(i32* %27, i32* %28, i32* %5)
%30 = call i32 @BTIC2D_TransIBHT8Stride(i32* %13, i32* %1, i32 1, i32 8, i32 %6, i32 %7)
%31 = shl nsw i32 %6, 3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %1, i64 %32
%34 = call i32 @BTIC2D_TransIBHT8Stride(i32* %16, i32* %33, i32 1, i32 8, i32 %6, i32 %7)
%35 = shl nsw i32 %7, 3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32, i32* %1, i64 %36
%38 = call i32 @BTIC2D_TransIBHT8Stride(i32* %19, i32* %37, i32 1, i32 8, i32 %6, i32 %7)
%39 = getelementptr inbounds i32, i32* %37, i64 %32
%40 = call i32 @BTIC2D_TransIBHT8Stride(i32* %22, i32* %39, i32 1, i32 8, i32 %6, i32 %7)
%41 = call i32 @BTIC2D_TransIBHT8Stride(i32* %25, i32* %2, i32 1, i32 8, i32 %8, i32 %9)
%42 = call i32 @BTIC2D_TransIBHT8Stride(i32* %28, i32* %3, i32 1, i32 8, i32 %8, i32 %9)
ret void
}