// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: yrbrend
static void yrbrend (int x, int y)
{
	int i, j, ox, oy, xx, yy, xxx, yyy, xxxend, yyyend, yv, cr=0, cb=0, *odc, *dc, *dc2;
	intptr_t p, pp;

	odc = dct[0]; dc2 = dct[10];
	for(yy=0;yy<(lcompvsamp[0]<<3);yy+=8)
	{
		oy = y+yy+globyoffs; if ((unsigned)oy >= (unsigned)clipydim) { odc += (lcomphsamp[0]<<6); continue; }
		pp = oy*bytesperline + ((x+globxoffs)<<2) + frameplace;
		for(xx=0;xx<(lcomphsamp[0]<<3);xx+=8,odc+=64)
		{
			ox = x+xx+globxoffs; if ((unsigned)ox >= (unsigned)clipxdim) continue;
			p = pp+(xx<<2);
			dc = odc;
			if (lnumcomponents > 1) dc2 = &dct[lcomphvsamp0][((yy>>lcompvsampshift0)<<3)+(xx>>lcomphsampshift0)];
			xxxend = min(clipxdim-ox,8);
			yyyend = min(clipydim-oy,8);
			if ((lcomphsamp[0] == 1) && (xxxend == 8))
			{
				for(yyy=0;yyy<yyyend;yyy++)
				{
					for(xxx=0;xxx<8;xxx++)
					{
						yv = dc[xxx];
						cr = (dc2[xxx+64]>>13)&~1;
						cb = (dc2[xxx   ]>>13)&~1;
						((int *)p)[xxx] = colclipup16[(unsigned)(yv+crmul[cr+2048]               )>>22]+
												  colclipup8[(unsigned)(yv+crmul[cr+2049]+cbmul[cb+2048])>>22]+
													  colclip[(unsigned)(yv+cbmul[cb+2049]               )>>22];
					}
					p += bytesperline;
					dc += 8;
					if (!((yyy+1)&(lcompvsamp[0]-1))) dc2 += 8;
				}
			}
			else if ((lcomphsamp[0] == 2) && (xxxend == 8))
			{
				for(yyy=0;yyy<yyyend;yyy++)
				{
					for(xxx=0;xxx<8;xxx+=2)
					{
						yv = dc[xxx];
						cr = (dc2[(xxx>>1)+64]>>13)&~1;
						cb = (dc2[(xxx>>1)   ]>>13)&~1;
						i = crmul[cr+2049]+cbmul[cb+2048];
						cr = crmul[cr+2048];
						cb = cbmul[cb+2049];
						((int *)p)[xxx] = colclipup16[(unsigned)(yv+cr)>>22]+
												  colclipup8[(unsigned)(yv+ i)>>22]+
													  colclip[(unsigned)(yv+cb)>>22];
						yv = dc[xxx+1];
						((int *)p)[xxx+1] = colclipup16[(unsigned)(yv+cr)>>22]+
													 colclipup8[(unsigned)(yv+ i)>>22]+
														 colclip[(unsigned)(yv+cb)>>22];
					}
					p += bytesperline;
					dc += 8;
					if (!((yyy+1)&(lcompvsamp[0]-1))) dc2 += 8;
				}
			}
			else
			{
				for(yyy=0;yyy<yyyend;yyy++)
				{
					i = 0; j = 1;
					for(xxx=0;xxx<xxxend;xxx++)
					{
						yv = dc[xxx];
						j--;
						if (!j)
						{
							j = lcomphsamp[0];
							cr = (dc2[i+64]>>13)&~1;
							cb = (dc2[i   ]>>13)&~1;
							i++;
						}
						((int *)p)[xxx] = colclipup16[(unsigned)(yv+crmul[cr+2048]               )>>22]+
												  colclipup8[(unsigned)(yv+crmul[cr+2049]+cbmul[cb+2048])>>22]+
													  colclip[(unsigned)(yv+cbmul[cb+2049]               )>>22];
					}
					p += bytesperline;
					dc += 8;
					if (!((yyy+1)&(lcompvsamp[0]-1))) dc2 += 8;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
leaq 0x568b01(%rip), %rax    # 0x5d4220
movq %rax, -0x48(%rbp)
leaq 0x568af6(%rip), %rax    # 0x5d4220
addq $0xa00, %rax            # imm = 0xA00
movq %rax, -0x58(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl 0x568a9c(%rip), %ecx    # 0x5d41e0
shll $0x3, %ecx
cmpl %ecx, %eax
jge 0x6bdce
movl -0x8(%rbp), %eax
addl -0x20(%rbp), %eax
addl 0x557665(%rip), %eax    # 0x5c2dc0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x568aa9(%rip), %eax    # 0x5d4210
jb 0x6b789
movl 0x568a61(%rip), %ecx    # 0x5d41d0
shll $0x6, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x6bdc0
movl -0x18(%rbp), %eax
imull 0x55761d(%rip), %eax    # 0x5c2db0
movl -0x4(%rbp), %ecx
addl 0x557620(%rip), %ecx    # 0x5c2dbc
shll $0x2, %ecx
addl %ecx, %eax
cltq
addq 0x5575fe(%rip), %rax    # 0x5c2da8
movq %rax, -0x68(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl 0x568a12(%rip), %ecx    # 0x5d41d0
shll $0x3, %ecx
cmpl %ecx, %eax
jge 0x6bdbe
movl -0x4(%rbp), %eax
addl -0x1c(%rbp), %eax
addl 0x5575e7(%rip), %eax    # 0x5c2dbc
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x568a2b(%rip), %eax    # 0x5d420c
jb 0x6b7e8
jmp 0x6bda2
movq -0x68(%rbp), %rax
movl -0x1c(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x1, 0x568985(%rip)    # 0x5d4190
jle 0x6b853
movslq 0x5689f4(%rip), %rcx    # 0x5d4208
leaq 0x568a05(%rip), %rax    # 0x5d4220
shlq $0x8, %rcx
addq %rcx, %rax
movl -0x20(%rbp), %edx
movl 0x5689d9(%rip), %ecx    # 0x5d4204
sarl %cl, %edx
movl %edx, %ecx
shll $0x3, %ecx
movl %ecx, -0x6c(%rbp)
movl -0x1c(%rbp), %edx
movl 0x5689c2(%rip), %ecx    # 0x5d4200
sarl %cl, %edx
movl -0x6c(%rbp), %ecx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movl 0x5689b3(%rip), %eax    # 0x5d420c
subl -0x14(%rbp), %eax
cmpl $0x8, %eax
jge 0x6b86f
movl 0x5689a5(%rip), %eax    # 0x5d420c
subl -0x14(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0x6b879
movl $0x8, %eax
movl %eax, -0x70(%rbp)
jmp 0x6b879
movl -0x70(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl 0x56898b(%rip), %eax    # 0x5d4210
subl -0x18(%rbp), %eax
cmpl $0x8, %eax
jge 0x6b89b
movl 0x56897d(%rip), %eax    # 0x5d4210
subl -0x18(%rbp), %eax
movl %eax, -0x74(%rbp)
jmp 0x6b8a5
movl $0x8, %eax
movl %eax, -0x74(%rbp)
jmp 0x6b8a5
movl -0x74(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x1, 0x56891e(%rip)    # 0x5d41d0
jne 0x6ba20
cmpl $0x8, -0x2c(%rbp)
jne 0x6ba20
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x6ba1b
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x24(%rbp)
jge 0x6b9ce
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x3c(%rbp)
movl -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq %ecx, %rdx
leaq 0x56c629(%rip), %rcx    # 0x5d7f60
addl (%rcx,%rdx,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56b618(%rip), %rax    # 0x5d6f60
movl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x801, %ecx            # imm = 0x801
movslq %ecx, %rsi
leaq 0x56c5ff(%rip), %rcx    # 0x5d7f60
addl (%rcx,%rsi,4), %eax
movl -0x3c(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq %ecx, %rsi
leaq 0x5705e9(%rip), %rcx    # 0x5dbf60
addl (%rcx,%rsi,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56a5d8(%rip), %rax    # 0x5d5f60
addl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl $0x801, %ecx            # imm = 0x801
movslq %ecx, %rsi
leaq 0x5705bf(%rip), %rcx    # 0x5dbf60
addl (%rcx,%rsi,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x5695ae(%rip), %rax    # 0x5d4f60
addl (%rax,%rcx,4), %edx
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6b8dc
movslq 0x5573db(%rip), %rax    # 0x5c2db0
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl 0x5687eb(%rip), %ecx    # 0x5d41e0
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x6ba0b
movq -0x58(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
jmp 0x6ba0d
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6b8c9
jmp 0x6bda0
cmpl $0x2, 0x5687a9(%rip)    # 0x5d41d0
jne 0x6bc12
cmpl $0x8, -0x2c(%rbp)
jne 0x6bc12
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x6bc0d
movl $0x0, -0x24(%rbp)
cmpl $0x8, -0x24(%rbp)
jge 0x6bbc0
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
movl -0x24(%rbp), %ecx
sarl %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rax
movl -0x24(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
addl $0x801, %eax            # imm = 0x801
movslq %eax, %rcx
leaq 0x56c4b2(%rip), %rax    # 0x5d7f60
movl (%rax,%rcx,4), %eax
movl -0x3c(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq %ecx, %rdx
leaq 0x57049c(%rip), %rcx    # 0x5dbf60
addl (%rcx,%rdx,4), %eax
movl %eax, -0xc(%rbp)
movl -0x38(%rbp), %eax
addl $0x800, %eax            # imm = 0x800
movslq %eax, %rcx
leaq 0x56c484(%rip), %rax    # 0x5d7f60
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
addl $0x801, %eax            # imm = 0x801
movslq %eax, %rcx
leaq 0x57046c(%rip), %rax    # 0x5dbf60
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56b452(%rip), %rax    # 0x5d6f60
movl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
addl -0xc(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56a43b(%rip), %rax    # 0x5d5f60
addl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
addl -0x3c(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x569424(%rip), %rax    # 0x5d4f60
addl (%rax,%rcx,4), %edx
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56b3ef(%rip), %rax    # 0x5d6f60
movl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
addl -0xc(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56a3d8(%rip), %rax    # 0x5d5f60
addl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
addl -0x3c(%rbp), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x5693c1(%rip), %rax    # 0x5d4f60
addl (%rax,%rcx,4), %edx
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0x6ba51
movslq 0x5571e9(%rip), %rax    # 0x5c2db0
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl 0x5685f9(%rip), %ecx    # 0x5d41e0
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x6bbfd
movq -0x58(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
jmp 0x6bbff
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6ba3e
jmp 0x6bd9e
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x6bd9c
movl $0x0, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x6bd4f
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x6bca2
movl 0x568567(%rip), %eax    # 0x5d41d0
movl %eax, -0x10(%rbp)
movq -0x58(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x40, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x38(%rbp)
movq -0x58(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
sarl $0xd, %eax
andl $-0x2, %eax
movl %eax, -0x3c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq %ecx, %rdx
leaq 0x56c2a8(%rip), %rcx    # 0x5d7f60
addl (%rcx,%rdx,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56b297(%rip), %rax    # 0x5d6f60
movl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
addl $0x801, %ecx            # imm = 0x801
movslq %ecx, %rsi
leaq 0x56c27e(%rip), %rcx    # 0x5d7f60
addl (%rcx,%rsi,4), %eax
movl -0x3c(%rbp), %ecx
addl $0x800, %ecx            # imm = 0x800
movslq %ecx, %rsi
leaq 0x570268(%rip), %rcx    # 0x5dbf60
addl (%rcx,%rsi,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56a257(%rip), %rax    # 0x5d5f60
addl (%rax,%rcx,4), %edx
movl -0x34(%rbp), %eax
movl -0x3c(%rbp), %ecx
addl $0x801, %ecx            # imm = 0x801
movslq %ecx, %rsi
leaq 0x57023e(%rip), %rcx    # 0x5dbf60
addl (%rcx,%rsi,4), %eax
shrl $0x16, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x56922d(%rip), %rax    # 0x5d4f60
addl (%rax,%rcx,4), %edx
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6bc3a
movslq 0x55705a(%rip), %rax    # 0x5c2db0
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl 0x56846a(%rip), %ecx    # 0x5d41e0
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x6bd8c
movq -0x58(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x58(%rbp)
jmp 0x6bd8e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6bc19
jmp 0x6bd9e
jmp 0x6bda0
jmp 0x6bda2
movl -0x1c(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x48(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x48(%rbp)
jmp 0x6b7b5
jmp 0x6bdc0
movl -0x20(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x20(%rbp)
jmp 0x6b73b
popq %rbp
retq