// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: invdct8x8
static void invdct8x8 (int *dc, unsigned char dcflag)
{
	#define SQRT2 23726566   //(sqrt(2))<<24
	#define C182 31000253    //(cos(PI/8)*2)<<24
	#define C18S22 43840978  //(cos(PI/8)*sqrt(2)*2)<<24
	#define C38S22 18159528  //(cos(PI*3/8)*sqrt(2)*2)<<24
	int *edc, t0, t1, t2, t3, t4, t5, t6, t7;

	edc = dc+64;
	do
	{
		if (dcflag&1) //pow2char[z])
		{
			t3 = dc[2] + dc[6];
			t2 = (mulshr32(dc[2]-dc[6],SQRT2<<6)<<2) - t3;
			t4 = dc[0] + dc[4]; t5 = dc[0] - dc[4];
			t0 = t4+t3; t3 = t4-t3; t1 = t5+t2; t2 = t5-t2;
			t4 = (mulshr32(dc[5]-dc[3]+dc[1]-dc[7],C182<<6)<<2);
			t7 = dc[1] + dc[7] + dc[5] + dc[3];
			t6 = (mulshr32(dc[3]-dc[5],C18S22<<5)<<3) + t4 - t7;
			t5 = (mulshr32(dc[1]+dc[7]-dc[5]-dc[3],SQRT2<<6)<<2) - t6;
			t4 = (mulshr32(dc[1]-dc[7],C38S22<<6)<<2) - t4 + t5;
			dc[0] = t0+t7; dc[7] = t0-t7; dc[1] = t1+t6; dc[6] = t1-t6;
			dc[2] = t2+t5; dc[5] = t2-t5; dc[4] = t3+t4; dc[3] = t3-t4;
		}
		dc += 8; dcflag >>= 1;
	} while (dc < edc);
	dc -= 32; edc -= 24;
	do
	{
		t3 = dc[2*8-32] + dc[6*8-32];
		t2 = (mulshr32(dc[2*8-32]-dc[6*8-32],SQRT2<<6)<<2) - t3;
		t4 = dc[0*8-32] + dc[4*8-32]; t5 = dc[0*8-32] - dc[4*8-32];
		t0 = t4+t3; t3 = t4-t3; t1 = t5+t2; t2 = t5-t2;
		t4 = (mulshr32(dc[5*8-32]-dc[3*8-32]+dc[1*8-32]-dc[7*8-32],C182<<6)<<2);
		t7 = dc[1*8-32] + dc[7*8-32] + dc[5*8-32] + dc[3*8-32];
		t6 = (mulshr32(dc[3*8-32]-dc[5*8-32],C18S22<<5)<<3) + t4 - t7;
		t5 = (mulshr32(dc[1*8-32]+dc[7*8-32]-dc[5*8-32]-dc[3*8-32],SQRT2<<6)<<2) - t6;
		t4 = (mulshr32(dc[1*8-32]-dc[7*8-32],C38S22<<6)<<2) - t4 + t5;
		dc[0*8-32] = t0+t7; dc[7*8-32] = t0-t7; dc[1*8-32] = t1+t6; dc[6*8-32] = t1-t6;
		dc[2*8-32] = t2+t5; dc[5*8-32] = t2-t5; dc[4*8-32] = t3+t4; dc[3*8-32] = t3-t4;
		dc++;
	} while (dc < edc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x18(%rbp)
movzbl -0x9(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6b4ff
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x18(%rcx), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x18(%rax), %edi
movl $0x5a827980, %esi       # imm = 0x5A827980
callq 0x6bdd0
shll $0x2, %eax
subl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x10(%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x30(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edi
movq -0x8(%rbp), %rax
subl 0xc(%rax), %edi
movq -0x8(%rbp), %rax
addl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x1c(%rax), %edi
movl $0x7641af40, %esi       # imm = 0x7641AF40
callq 0x6bdd0
shll $0x2, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x1c(%rcx), %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
movq -0x8(%rbp), %rcx
addl 0xc(%rcx), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x14(%rax), %edi
movl $0x539eba40, %esi       # imm = 0x539EBA40
callq 0x6bdd0
shll $0x3, %eax
addl -0x2c(%rbp), %eax
subl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x14(%rax), %edi
movq -0x8(%rbp), %rax
subl 0xc(%rax), %edi
movl $0x5a827980, %esi       # imm = 0x5A827980
callq 0x6bdd0
shll $0x2, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x1c(%rax), %edi
movl $0x4545ea00, %esi       # imm = 0x4545EA00
callq 0x6bdd0
shll $0x2, %eax
subl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %ecx
addl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %ecx
subl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x20(%rbp), %ecx
addl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x20(%rbp), %ecx
subl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x24(%rbp), %ecx
addl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %ecx
subl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x28(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x8(%rbp)
movzbl -0x9(%rbp), %eax
sarl %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x6b350
movq -0x8(%rbp), %rax
addq $-0x80, %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
addq $-0x60, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0x40(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x40(%rcx), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl -0x40(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x40(%rax), %edi
movl $0x5a827980, %esi       # imm = 0x5A827980
callq 0x6bdd0
shll $0x2, %eax
subl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl -0x80(%rax), %eax
movq -0x8(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl -0x80(%rax), %eax
movq -0x8(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x30(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edi
movq -0x8(%rbp), %rax
subl -0x20(%rax), %edi
movq -0x8(%rbp), %rax
addl -0x60(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x60(%rax), %edi
movl $0x7641af40, %esi       # imm = 0x7641AF40
callq 0x6bdd0
shll $0x2, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl -0x60(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x60(%rcx), %eax
movq -0x8(%rbp), %rcx
addl 0x20(%rcx), %eax
movq -0x8(%rbp), %rcx
addl -0x20(%rcx), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0x20(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x20(%rax), %edi
movl $0x539eba40, %esi       # imm = 0x539EBA40
callq 0x6bdd0
shll $0x3, %eax
addl -0x2c(%rbp), %eax
subl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl -0x60(%rax), %edi
movq -0x8(%rbp), %rax
addl 0x60(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x20(%rax), %edi
movq -0x8(%rbp), %rax
subl -0x20(%rax), %edi
movl $0x5a827980, %esi       # imm = 0x5A827980
callq 0x6bdd0
shll $0x2, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x60(%rax), %edi
movq -0x8(%rbp), %rax
subl 0x60(%rax), %edi
movl $0x4545ea00, %esi       # imm = 0x4545EA00
callq 0x6bdd0
shll $0x2, %eax
subl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %ecx
addl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, -0x80(%rax)
movl -0x1c(%rbp), %ecx
subl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
movl -0x20(%rbp), %ecx
addl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, -0x60(%rax)
movl -0x20(%rbp), %ecx
subl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movl -0x24(%rbp), %ecx
addl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, -0x40(%rax)
movl -0x24(%rbp), %ecx
subl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x28(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x28(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, -0x20(%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x6b53a
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)