#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*/ BGBBTJ_JPG_TransIDCT_Vert2(int *, short *, int);
int /*<<< orphan*/ PDJPG_TransIDCT_Horiz(short *, int *);
void PDJPG_TransIDCT(short *iblk, short *oblk, int dcbias, int rtm) {
  int s[64];
  int t[64];
  short *ob, *obe;
  int i, j, k;
  if (rtm == 2) {
    k = ((iblk[0] * 8281 + 32768) >> 16) + dcbias;
    ob = oblk;
    obe = ob + 64;
    while (ob < obe) {
      ob[0] = k;
      ob[1] = k;
      ob[2] = k;
      ob[3] = k;
      ob[4] = k;
      ob[5] = k;
      ob[6] = k;
      ob[7] = k;
      ob[8] = k;
      ob[9] = k;
      ob[10] = k;
      ob[11] = k;
      ob[12] = k;
      ob[13] = k;
      ob[14] = k;
      ob[15] = k;
      ob += 16;
    }
    return;
  }
  PDJPG_TransIDCT_Horiz(iblk + 0, s + 0);
  PDJPG_TransIDCT_Horiz(iblk + 8, s + 8);
  PDJPG_TransIDCT_Horiz(iblk + 16, s + 16);
  PDJPG_TransIDCT_Horiz(iblk + 24, s + 24);
  PDJPG_TransIDCT_Horiz(iblk + 32, s + 32);
  PDJPG_TransIDCT_Horiz(iblk + 40, s + 40);
  PDJPG_TransIDCT_Horiz(iblk + 48, s + 48);
  PDJPG_TransIDCT_Horiz(iblk + 56, s + 56);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 0, oblk + 0, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 1, oblk + 1, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 2, oblk + 2, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 3, oblk + 3, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 4, oblk + 4, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 5, oblk + 5, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 6, oblk + 6, dcbias);
  BGBBTJ_JPG_TransIDCT_Vert2(s + 7, oblk + 7, dcbias);
}


x86 assembly (clang, -O0):
<PDJPG_TransIDCT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
jne    12ef <PDJPG_TransIDCT+0x1cf>
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
imul   $0x2059,%eax,%eax
add    $0x8000,%eax
sar    $0x10,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x23c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x228(%rbp)
mov    -0x228(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x230(%rbp)
mov    -0x228(%rbp),%rax
cmp    -0x230(%rbp),%rax
jae    12ea <PDJPG_TransIDCT+0x1ca>
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x2(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x4(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x6(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x8(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0xa(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0xc(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0xe(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x10(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x12(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x14(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x16(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x18(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x1a(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x1c(%rax)
mov    -0x23c(%rbp),%eax
mov    %ax,%cx
mov    -0x228(%rbp),%rax
mov    %cx,0x1e(%rax)
mov    -0x228(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x228(%rbp)
jmp    1180 <PDJPG_TransIDCT+0x60>
jmp    1483 <PDJPG_TransIDCT+0x363>
mov    -0x8(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
lea    -0x120(%rbp),%rsi
add    $0x20,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x20,%rdi
lea    -0x120(%rbp),%rsi
add    $0x40,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
lea    -0x120(%rbp),%rsi
add    $0x60,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
lea    -0x120(%rbp),%rsi
add    $0x80,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x50,%rdi
lea    -0x120(%rbp),%rsi
add    $0xa0,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x60,%rdi
lea    -0x120(%rbp),%rsi
add    $0xc0,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    -0x8(%rbp),%rdi
add    $0x70,%rdi
lea    -0x120(%rbp),%rsi
add    $0xe0,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    -0x120(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
add    $0x2,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0xc,%rdi
mov    -0x10(%rbp),%rsi
add    $0x6,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x10,%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x14,%rdi
mov    -0x10(%rbp),%rsi
add    $0xa,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x18,%rdi
mov    -0x10(%rbp),%rsi
add    $0xc,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    -0x120(%rbp),%rdi
add    $0x1c,%rdi
mov    -0x10(%rbp),%rsi
add    $0xe,%rsi
mov    -0x14(%rbp),%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDJPG_TransIDCT>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
cmp    $0x2,%ecx
jne    118a <PDJPG_TransIDCT+0x6a>
movswl 0x0(%rbp),%eax
imul   $0x2059,%eax,%eax
add    $0x8000,%eax
shr    $0x10,%eax
add    %r14d,%eax
movd   %eax,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x44,%xmm0,%xmm0
movdqu %xmm0,(%rbx)
movdqu %xmm0,0x10(%rbx)
movdqu %xmm0,0x20(%rbx)
movdqu %xmm0,0x30(%rbx)
movdqu %xmm0,0x40(%rbx)
movdqu %xmm0,0x50(%rbx)
movdqu %xmm0,0x60(%rbx)
movdqu %xmm0,0x70(%rbx)
jmp    1291 <PDJPG_TransIDCT+0x171>
mov    %rsp,%r15
mov    %rbp,%rdi
mov    %r15,%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x10(%rbp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x20(%rbp),%rdi
lea    0x40(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x30(%rbp),%rdi
lea    0x60(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x40(%rbp),%rdi
lea    0x80(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x50(%rbp),%rdi
lea    0xa0(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
lea    0x60(%rbp),%rdi
lea    0xc0(%rsp),%rsi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
add    $0x70,%rbp
lea    0xe0(%rsp),%rsi
mov    %rbp,%rdi
call   1040 <PDJPG_TransIDCT_Horiz@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x4(%rsp),%rdi
lea    0x2(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x8(%rsp),%rdi
lea    0x4(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0xc(%rsp),%rdi
lea    0x6(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x10(%rsp),%rdi
lea    0x8(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x14(%rsp),%rdi
lea    0xa(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x18(%rsp),%rdi
lea    0xc(%rbx),%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
lea    0x1c(%rsp),%rdi
add    $0xe,%rbx
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <BGBBTJ_JPG_TransIDCT_Vert2@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @PDJPG_TransIDCT(i16* %0, i16* %1, i32 %2, i32 %3) {
%5 = alloca i16*
%6 = alloca i16*
%7 = alloca i32
%8 = alloca i32
%9 = alloca [64 x i32]
%10 = alloca [64 x i32]
%11 = alloca i16*
%12 = alloca i16*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i16* %0, i16** %5
store i16* %1, i16** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%16 = load i32, i32* %8
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %103
18: ; preds = %4
%19 = load i16*, i16** %5
%20 = getelementptr inbounds i16, i16* %19, i64 0
%21 = load i16, i16* %20
%22 = sext i16 %21 to i32
%23 = mul nsw i32 %22, 8281
%24 = add nsw i32 %23, 32768
%25 = ashr i32 %24, 16
%26 = load i32, i32* %7
%27 = add nsw i32 %25, %26
store i32 %27, i32* %15
%28 = load i16*, i16** %6
store i16* %28, i16** %11
%29 = load i16*, i16** %11
%30 = getelementptr inbounds i16, i16* %29, i64 64
store i16* %30, i16** %12
br label %31
31: ; preds = %35, %18
%32 = load i16*, i16** %11
%33 = load i16*, i16** %12
%34 = icmp ult i16* %32, %33
br i1 %34, label %35, label %102
35: ; preds = %31
%36 = load i32, i32* %15
%37 = trunc i32 %36 to i16
%38 = load i16*, i16** %11
%39 = getelementptr inbounds i16, i16* %38, i64 0
store i16 %37, i16* %39
%40 = load i32, i32* %15
%41 = trunc i32 %40 to i16
%42 = load i16*, i16** %11
%43 = getelementptr inbounds i16, i16* %42, i64 1
store i16 %41, i16* %43
%44 = load i32, i32* %15
%45 = trunc i32 %44 to i16
%46 = load i16*, i16** %11
%47 = getelementptr inbounds i16, i16* %46, i64 2
store i16 %45, i16* %47
%48 = load i32, i32* %15
%49 = trunc i32 %48 to i16
%50 = load i16*, i16** %11
%51 = getelementptr inbounds i16, i16* %50, i64 3
store i16 %49, i16* %51
%52 = load i32, i32* %15
%53 = trunc i32 %52 to i16
%54 = load i16*, i16** %11
%55 = getelementptr inbounds i16, i16* %54, i64 4
store i16 %53, i16* %55
%56 = load i32, i32* %15
%57 = trunc i32 %56 to i16
%58 = load i16*, i16** %11
%59 = getelementptr inbounds i16, i16* %58, i64 5
store i16 %57, i16* %59
%60 = load i32, i32* %15
%61 = trunc i32 %60 to i16
%62 = load i16*, i16** %11
%63 = getelementptr inbounds i16, i16* %62, i64 6
store i16 %61, i16* %63
%64 = load i32, i32* %15
%65 = trunc i32 %64 to i16
%66 = load i16*, i16** %11
%67 = getelementptr inbounds i16, i16* %66, i64 7
store i16 %65, i16* %67
%68 = load i32, i32* %15
%69 = trunc i32 %68 to i16
%70 = load i16*, i16** %11
%71 = getelementptr inbounds i16, i16* %70, i64 8
store i16 %69, i16* %71
%72 = load i32, i32* %15
%73 = trunc i32 %72 to i16
%74 = load i16*, i16** %11
%75 = getelementptr inbounds i16, i16* %74, i64 9
store i16 %73, i16* %75
%76 = load i32, i32* %15
%77 = trunc i32 %76 to i16
%78 = load i16*, i16** %11
%79 = getelementptr inbounds i16, i16* %78, i64 10
store i16 %77, i16* %79
%80 = load i32, i32* %15
%81 = trunc i32 %80 to i16
%82 = load i16*, i16** %11
%83 = getelementptr inbounds i16, i16* %82, i64 11
store i16 %81, i16* %83
%84 = load i32, i32* %15
%85 = trunc i32 %84 to i16
%86 = load i16*, i16** %11
%87 = getelementptr inbounds i16, i16* %86, i64 12
store i16 %85, i16* %87
%88 = load i32, i32* %15
%89 = trunc i32 %88 to i16
%90 = load i16*, i16** %11
%91 = getelementptr inbounds i16, i16* %90, i64 13
store i16 %89, i16* %91
%92 = load i32, i32* %15
%93 = trunc i32 %92 to i16
%94 = load i16*, i16** %11
%95 = getelementptr inbounds i16, i16* %94, i64 14
store i16 %93, i16* %95
%96 = load i32, i32* %15
%97 = trunc i32 %96 to i16
%98 = load i16*, i16** %11
%99 = getelementptr inbounds i16, i16* %98, i64 15
store i16 %97, i16* %99
%100 = load i16*, i16** %11
%101 = getelementptr inbounds i16, i16* %100, i64 16
store i16* %101, i16** %11
br label %31
102: ; preds = %31
br label %192
103: ; preds = %4
%104 = load i16*, i16** %5
%105 = getelementptr inbounds i16, i16* %104, i64 0
%106 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%107 = getelementptr inbounds i32, i32* %106, i64 0
%108 = call i32 @PDJPG_TransIDCT_Horiz(i16* %105, i32* %107)
%109 = load i16*, i16** %5
%110 = getelementptr inbounds i16, i16* %109, i64 8
%111 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%112 = getelementptr inbounds i32, i32* %111, i64 8
%113 = call i32 @PDJPG_TransIDCT_Horiz(i16* %110, i32* %112)
%114 = load i16*, i16** %5
%115 = getelementptr inbounds i16, i16* %114, i64 16
%116 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%117 = getelementptr inbounds i32, i32* %116, i64 16
%118 = call i32 @PDJPG_TransIDCT_Horiz(i16* %115, i32* %117)
%119 = load i16*, i16** %5
%120 = getelementptr inbounds i16, i16* %119, i64 24
%121 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%122 = getelementptr inbounds i32, i32* %121, i64 24
%123 = call i32 @PDJPG_TransIDCT_Horiz(i16* %120, i32* %122)
%124 = load i16*, i16** %5
%125 = getelementptr inbounds i16, i16* %124, i64 32
%126 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%127 = getelementptr inbounds i32, i32* %126, i64 32
%128 = call i32 @PDJPG_TransIDCT_Horiz(i16* %125, i32* %127)
%129 = load i16*, i16** %5
%130 = getelementptr inbounds i16, i16* %129, i64 40
%131 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%132 = getelementptr inbounds i32, i32* %131, i64 40
%133 = call i32 @PDJPG_TransIDCT_Horiz(i16* %130, i32* %132)
%134 = load i16*, i16** %5
%135 = getelementptr inbounds i16, i16* %134, i64 48
%136 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%137 = getelementptr inbounds i32, i32* %136, i64 48
%138 = call i32 @PDJPG_TransIDCT_Horiz(i16* %135, i32* %137)
%139 = load i16*, i16** %5
%140 = getelementptr inbounds i16, i16* %139, i64 56
%141 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%142 = getelementptr inbounds i32, i32* %141, i64 56
%143 = call i32 @PDJPG_TransIDCT_Horiz(i16* %140, i32* %142)
%144 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%145 = getelementptr inbounds i32, i32* %144, i64 0
%146 = load i16*, i16** %6
%147 = getelementptr inbounds i16, i16* %146, i64 0
%148 = load i32, i32* %7
%149 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %145, i16* %147, i32 %148)
%150 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%151 = getelementptr inbounds i32, i32* %150, i64 1
%152 = load i16*, i16** %6
%153 = getelementptr inbounds i16, i16* %152, i64 1
%154 = load i32, i32* %7
%155 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %151, i16* %153, i32 %154)
%156 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%157 = getelementptr inbounds i32, i32* %156, i64 2
%158 = load i16*, i16** %6
%159 = getelementptr inbounds i16, i16* %158, i64 2
%160 = load i32, i32* %7
%161 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %157, i16* %159, i32 %160)
%162 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%163 = getelementptr inbounds i32, i32* %162, i64 3
%164 = load i16*, i16** %6
%165 = getelementptr inbounds i16, i16* %164, i64 3
%166 = load i32, i32* %7
%167 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %163, i16* %165, i32 %166)
%168 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%169 = getelementptr inbounds i32, i32* %168, i64 4
%170 = load i16*, i16** %6
%171 = getelementptr inbounds i16, i16* %170, i64 4
%172 = load i32, i32* %7
%173 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %169, i16* %171, i32 %172)
%174 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%175 = getelementptr inbounds i32, i32* %174, i64 5
%176 = load i16*, i16** %6
%177 = getelementptr inbounds i16, i16* %176, i64 5
%178 = load i32, i32* %7
%179 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %175, i16* %177, i32 %178)
%180 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%181 = getelementptr inbounds i32, i32* %180, i64 6
%182 = load i16*, i16** %6
%183 = getelementptr inbounds i16, i16* %182, i64 6
%184 = load i32, i32* %7
%185 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %181, i16* %183, i32 %184)
%186 = getelementptr inbounds [64 x i32], [64 x i32]* %9, i64 0, i64 0
%187 = getelementptr inbounds i32, i32* %186, i64 7
%188 = load i16*, i16** %6
%189 = getelementptr inbounds i16, i16* %188, i64 7
%190 = load i32, i32* %7
%191 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %187, i16* %189, i32 %190)
br label %192
192: ; preds = %103, %102
ret void
}

LLVM IR (-O2):
define void @PDJPG_TransIDCT(i16* %0, i16* %1, i32 %2, i32 %3) {
%5 = alloca [64 x i32]
%6 = bitcast [64 x i32]* %5 to i8*
%7 = icmp eq i32 %3, 2
br i1 %7, label %8, label %49
8: ; preds = %4
%9 = load i16, i16* %0
%10 = sext i16 %9 to i32
%11 = mul nsw i32 %10, 8281
%12 = add nsw i32 %11, 32768
%13 = lshr i32 %12, 16
%14 = add i32 %13, %2
%15 = trunc i32 %14 to i16
%16 = insertelement <4 x i16> poison, i16 %15, i64 0
%17 = shufflevector <4 x i16> %16, <4 x i16> poison, <4 x i32> zeroinitializer
%18 = bitcast i16* %1 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %18
%19 = getelementptr inbounds i16, i16* %1, i64 4
%20 = bitcast i16* %19 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %20
%21 = getelementptr inbounds i16, i16* %1, i64 8
%22 = bitcast i16* %21 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %22
%23 = getelementptr inbounds i16, i16* %1, i64 12
%24 = bitcast i16* %23 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %24
%25 = getelementptr inbounds i16, i16* %1, i64 16
%26 = bitcast i16* %25 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %26
%27 = getelementptr inbounds i16, i16* %1, i64 20
%28 = bitcast i16* %27 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %28
%29 = getelementptr inbounds i16, i16* %1, i64 24
%30 = bitcast i16* %29 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %30
%31 = getelementptr inbounds i16, i16* %1, i64 28
%32 = bitcast i16* %31 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %32
%33 = getelementptr inbounds i16, i16* %1, i64 32
%34 = bitcast i16* %33 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %34
%35 = getelementptr inbounds i16, i16* %1, i64 36
%36 = bitcast i16* %35 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %36
%37 = getelementptr inbounds i16, i16* %1, i64 40
%38 = bitcast i16* %37 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %38
%39 = getelementptr inbounds i16, i16* %1, i64 44
%40 = bitcast i16* %39 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %40
%41 = getelementptr inbounds i16, i16* %1, i64 48
%42 = bitcast i16* %41 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %42
%43 = getelementptr inbounds i16, i16* %1, i64 52
%44 = bitcast i16* %43 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %44
%45 = getelementptr inbounds i16, i16* %1, i64 56
%46 = bitcast i16* %45 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %46
%47 = getelementptr inbounds i16, i16* %1, i64 60
%48 = bitcast i16* %47 to <4 x i16>*
store <4 x i16> %17, <4 x i16>* %48
br label %95
49: ; preds = %4
%50 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%51 = call i32 @PDJPG_TransIDCT_Horiz(i16* %0, i32* %50)
%52 = getelementptr inbounds i16, i16* %0, i64 8
%53 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 8
%54 = call i32 @PDJPG_TransIDCT_Horiz(i16* %52, i32* %53)
%55 = getelementptr inbounds i16, i16* %0, i64 16
%56 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 16
%57 = call i32 @PDJPG_TransIDCT_Horiz(i16* %55, i32* %56)
%58 = getelementptr inbounds i16, i16* %0, i64 24
%59 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 24
%60 = call i32 @PDJPG_TransIDCT_Horiz(i16* %58, i32* %59)
%61 = getelementptr inbounds i16, i16* %0, i64 32
%62 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 32
%63 = call i32 @PDJPG_TransIDCT_Horiz(i16* %61, i32* %62)
%64 = getelementptr inbounds i16, i16* %0, i64 40
%65 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 40
%66 = call i32 @PDJPG_TransIDCT_Horiz(i16* %64, i32* %65)
%67 = getelementptr inbounds i16, i16* %0, i64 48
%68 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 48
%69 = call i32 @PDJPG_TransIDCT_Horiz(i16* %67, i32* %68)
%70 = getelementptr inbounds i16, i16* %0, i64 56
%71 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 56
%72 = call i32 @PDJPG_TransIDCT_Horiz(i16* %70, i32* %71)
%73 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %50, i16* %1, i32 %2)
%74 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 1
%75 = getelementptr inbounds i16, i16* %1, i64 1
%76 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %74, i16* %75, i32 %2)
%77 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 2
%78 = getelementptr inbounds i16, i16* %1, i64 2
%79 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %77, i16* %78, i32 %2)
%80 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 3
%81 = getelementptr inbounds i16, i16* %1, i64 3
%82 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %80, i16* %81, i32 %2)
%83 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 4
%84 = getelementptr inbounds i16, i16* %1, i64 4
%85 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %83, i16* %84, i32 %2)
%86 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 5
%87 = getelementptr inbounds i16, i16* %1, i64 5
%88 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %86, i16* %87, i32 %2)
%89 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 6
%90 = getelementptr inbounds i16, i16* %1, i64 6
%91 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %89, i16* %90, i32 %2)
%92 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 7
%93 = getelementptr inbounds i16, i16* %1, i64 7
%94 = call i32 @BGBBTJ_JPG_TransIDCT_Vert2(i32* %92, i16* %93, i32 %2)
br label %95
95: ; preds = %8, %49
ret void
}