// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: drawrooms
void drawrooms(int daposx, int daposy, int daposz,
		 short daang, int dahoriz, short dacursectnum)
{
	int i, j, z, cz, fz, closest;
	short *shortptr1, *shortptr2;

#if defined(DEBUGGINGAIDS)
	if (numscans > MAXWALLSB) debugprintf("damage report: numscans %d exceeded %d\n", numscans, MAXWALLSB);
	if (numbunches > MAXWALLSB) debugprintf("damage report: numbunches %d exceeded %d\n", numbunches, MAXWALLSB);
	if (maskwallcnt > MAXWALLSB) debugprintf("damage report: maskwallcnt %d exceeded %d\n", maskwallcnt, MAXWALLSB);
	if (smostwallcnt > MAXWALLSB) debugprintf("damage report: smostwallcnt %d exceeded %d\n", smostwallcnt, MAXWALLSB);
#endif

	beforedrawrooms = 0;

	globalposx = daposx; globalposy = daposy; globalposz = daposz;
	globalang = (daang&2047);

	globalhoriz = mulscale16(dahoriz-100,xdimenscale)+(ydimen>>1);
	globaluclip = (0-globalhoriz)*xdimscale;
	globaldclip = (ydimen-globalhoriz)*xdimscale;

	i = mulscale16(xdimenscale,viewingrangerecip);
	globalpisibility = mulscale16(parallaxvisibility,i);
	globalvisibility = mulscale16(visibility,i);
	globalhisibility = mulscale16(globalvisibility,xyaspect);
	globalcisibility = mulscale8(globalhisibility,320);

	globalcursectnum = dacursectnum;
	totalclocklock = totalclock;

	cosglobalang = sintable[(globalang+512)&2047];
	singlobalang = sintable[globalang&2047];
	cosviewingrangeglobalang = mulscale16(cosglobalang,viewingrange);
	sinviewingrangeglobalang = mulscale16(singlobalang,viewingrange);

	if ((xyaspect != oxyaspect) || (xdimen != oxdimen) || (viewingrange != oviewingrange))
		dosetaspect();

	//clearbufbyte(&gotsector[0],(int)((numsectors+7)>>3),0L);
	Bmemset(&gotsector[0],0,(int)((numsectors+7)>>3));

	shortptr1 = (short *)&startumost[windowx1];
	shortptr2 = (short *)&startdmost[windowx1];
	i = xdimen-1;
	do
	{
		umost[i] = shortptr1[i]-windowy1;
		dmost[i] = shortptr2[i]-windowy1;
		i--;
	} while (i != 0);
	umost[0] = shortptr1[0]-windowy1;
	dmost[0] = shortptr2[0]-windowy1;

	//============================================================================= //POLYMOST BEGINS
#if USE_POLYMOST
	polymost_drawrooms(); if (rendmode) { return; }
#endif
	//============================================================================= //POLYMOST ENDS

	frameoffset = frameplace + windowy1*bytesperline + windowx1;

	numhits = xdimen; numscans = 0; numbunches = 0;
	maskwallcnt = 0; smostwallcnt = 0; smostcnt = 0; spritesortcnt = 0;

	if (globalcursectnum >= MAXSECTORS)
		globalcursectnum -= MAXSECTORS;
	else
	{
		i = globalcursectnum;
		updatesector(globalposx,globalposy,&globalcursectnum);
		if (globalcursectnum < 0) globalcursectnum = i;
	}

	globparaceilclip = 1;
	globparaflorclip = 1;
	getzsofslope(globalcursectnum,globalposx,globalposy,&cz,&fz);
	if (globalposz < cz) globparaceilclip = 0;
	if (globalposz > fz) globparaflorclip = 0;

	scansector(globalcursectnum);

	if (inpreparemirror)
	{
		inpreparemirror = 0;
		mirrorsx1 = xdimen-1; mirrorsx2 = 0;
		for(i=numscans-1;i>=0;i--)
		{
			if (wall[thewall[i]].nextsector < 0) continue;
			if (xb1[i] < mirrorsx1) mirrorsx1 = xb1[i];
			if (xb2[i] > mirrorsx2) mirrorsx2 = xb2[i];
		}

		for(i=0;i<mirrorsx1;i++)
			if (umost[i] <= dmost[i])
				{ umost[i] = 1; dmost[i] = 0; numhits--; }
		for(i=mirrorsx2+1;i<xdimen;i++)
			if (umost[i] <= dmost[i])
				{ umost[i] = 1; dmost[i] = 0; numhits--; }

		drawalls(0L);
		numbunches--;
		bunchfirst[0] = bunchfirst[numbunches];
		bunchlast[0] = bunchlast[numbunches];

		mirrorsy1 = min(umost[mirrorsx1],umost[mirrorsx2]);
		mirrorsy2 = max(dmost[mirrorsx1],dmost[mirrorsx2]);
	}

	while ((numbunches > 0) && (numhits > 0))
	{
		clearbuf(&tempbuf[0],(int)((numbunches+3)>>2),0L);
		tempbuf[0] = 1;

		closest = 0;              //Almost works, but not quite :(
		for(i=1;i<numbunches;i++)
		{
			if ((j = bunchfront(i,closest)) < 0) continue;
			tempbuf[i] = 1;
			if (j == 0) tempbuf[closest] = 1, closest = i;
		}
		for(i=0;i<numbunches;i++) //Double-check
		{
			if (tempbuf[i]) continue;
			if ((j = bunchfront(i,closest)) < 0) continue;
			tempbuf[i] = 1;
			if (j == 0) tempbuf[closest] = 1, closest = i, i = 0;
		}

		drawalls(closest);

		if (automapping)
		{
			for(z=bunchfirst[closest];z>=0;z=p2[z])
				show2dwall[thewall[z]>>3] |= pow2char[thewall[z]&7];
		}

		numbunches--;
		bunchfirst[closest] = bunchfirst[numbunches];
		bunchlast[closest] = bunchlast[numbunches];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %r9w, %ax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movw %cx, -0xe(%rbp)
movl %r8d, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movl $0x0, 0xa851d(%rip)     # 0xe0c78
movl -0x4(%rbp), %eax
movl %eax, 0x23ee4c(%rip)    # 0x2775b0
movl -0x8(%rbp), %eax
movl %eax, 0x23ee47(%rip)    # 0x2775b4
movl -0xc(%rbp), %eax
movl %eax, 0x26fe4a(%rip)    # 0x2a85c0
movswl -0xe(%rbp), %eax
andl $0x7ff, %eax            # imm = 0x7FF
movw %ax, 0x3d310a(%rip)     # 0x40b890
movl -0x14(%rbp), %edi
subl $0x64, %edi
movl 0x27fe66(%rip), %esi    # 0x2b85f8
callq 0x39010
movl 0x27fe57(%rip), %ecx    # 0x2b85f4
sarl %ecx
addl %ecx, %eax
movl %eax, 0x27fe55(%rip)    # 0x2b85fc
xorl %eax, %eax
subl 0x27fe4d(%rip), %eax    # 0x2b85fc
imull 0x3d30de(%rip), %eax    # 0x40b894
movl %eax, 0x277e24(%rip)    # 0x2b05e0
movl 0x27fe32(%rip), %eax    # 0x2b85f4
subl 0x27fe34(%rip), %eax    # 0x2b85fc
imull 0x3d30c5(%rip), %eax    # 0x40b894
movl %eax, 0x27fe1b(%rip)    # 0x2b85f0
movl 0x27fe1d(%rip), %edi    # 0x2b85f8
movl 0x3d30b7(%rip), %esi    # 0x40b898
callq 0x39010
movl %eax, -0x1c(%rbp)
movl 0x3b0861(%rip), %edi    # 0x3e9050
movl -0x1c(%rbp), %esi
callq 0x39010
movl %eax, 0x3d309f(%rip)    # 0x40b89c
movl 0x3b0849(%rip), %edi    # 0x3e904c
movl -0x1c(%rbp), %esi
callq 0x39010
movl %eax, 0x3d308f(%rip)    # 0x40b8a0
movl 0x3d3089(%rip), %edi    # 0x40b8a0
movl 0x361bfb(%rip), %esi    # 0x39a418
callq 0x39010
movl %eax, 0x3d307c(%rip)    # 0x40b8a4
movl 0x3d3076(%rip), %edi    # 0x40b8a4
movl $0x140, %esi            # imm = 0x140
callq 0x39030
movl %eax, 0x3d306a(%rip)    # 0x40b8a8
movw -0x16(%rbp), %ax
movw %ax, 0x3d3063(%rip)     # 0x40b8ac
movl 0x3b07f9(%rip), %eax    # 0x3e9048
movl %eax, 0x23ed63(%rip)    # 0x2775b8
movswl 0x3d3034(%rip), %eax    # 0x40b890
addl $0x200, %eax            # imm = 0x200
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3d3040(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %eax
movl %eax, 0x273d56(%rip)    # 0x2ac5d0
movswl 0x3d300f(%rip), %eax    # 0x40b890
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3d3020(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %eax
movl %eax, 0x273d3e(%rip)    # 0x2ac5d8
movl 0x273d30(%rip), %edi    # 0x2ac5d0
movl 0x3d400a(%rip), %esi    # 0x40c8b0
callq 0x39010
movl %eax, 0x273d2b(%rip)    # 0x2ac5dc
movl 0x273d21(%rip), %edi    # 0x2ac5d8
movl 0x3d3ff3(%rip), %esi    # 0x40c8b0
callq 0x39010
movl %eax, 0x273d0c(%rip)    # 0x2ac5d4
movl 0x361b4a(%rip), %eax    # 0x39a418
cmpl 0xa886c(%rip), %eax     # 0xe1140
jne 0x388f2
movl 0xa8444(%rip), %eax     # 0xe0d20
cmpl 0xa8862(%rip), %eax     # 0xe1144
jne 0x388f2
movl 0x3d3fc6(%rip), %eax    # 0x40c8b0
cmpl 0xa8858(%rip), %eax     # 0xe1148
je 0x388f7
callq 0x39050
movswl 0x3d41c2(%rip), %eax    # 0x40cac0
addl $0x7, %eax
sarl $0x3, %eax
movslq %eax, %rdx
leaq 0x3d3fb2(%rip), %rdi    # 0x40c8c0
xorl %esi, %esi
callq 0x62d0
movslq 0x3d5834(%rip), %rcx    # 0x40e150
leaq 0x3d41ad(%rip), %rax    # 0x40cad0
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movslq 0x3d581c(%rip), %rcx    # 0x40e150
leaq 0x3d5825(%rip), %rax    # 0x40e160
shlq %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl 0xa83d5(%rip), %eax     # 0xe0d20
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
subl 0x3d6e7d(%rip), %eax    # 0x40f7e0
movw %ax, %dx
movslq -0x1c(%rbp), %rcx
leaq 0x3d6e7f(%rip), %rax    # 0x40f7f0
movw %dx, (%rax,%rcx,2)
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
subl 0x3d6e59(%rip), %eax    # 0x40f7e0
movw %ax, %dx
movslq -0x1c(%rbp), %rcx
leaq 0x3d84db(%rip), %rax    # 0x410e70
movw %dx, (%rax,%rcx,2)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x38951
movq -0x38(%rbp), %rax
movswl (%rax), %eax
subl 0x3d6e2b(%rip), %eax    # 0x40f7e0
movw %ax, 0x3d6e34(%rip)     # 0x40f7f0
movq -0x40(%rbp), %rax
movswl (%rax), %eax
subl 0x3d6e17(%rip), %eax    # 0x40f7e0
movw %ax, 0x3d84a0(%rip)     # 0x410e70
callq 0x78a10
leaq 0x5b4f44(%rip), %rax    # 0x5ed920
cmpl $0x0, (%rax)
je 0x389e6
jmp 0x38ffd
leaq 0x182223(%rip), %rax    # 0x1bac10
movq (%rax), %rax
movl 0x3d6dea(%rip), %ecx    # 0x40f7e0
leaq 0x1823e7(%rip), %rdx    # 0x1bade4
imull (%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq 0x3d5743(%rip), %rcx    # 0x40e150
addq %rcx, %rax
movq %rax, 0x3d9ad9(%rip)    # 0x4124f0
movl 0xa8303(%rip), %eax     # 0xe0d20
movw %ax, 0x3d9ad4(%rip)     # 0x4124f8
movw $0x0, 0x3d9acd(%rip)    # 0x4124fa
movw $0x0, 0x3d9ac6(%rip)    # 0x4124fc
movw $0x0, 0x3d9abf(%rip)    # 0x4124fe
movl $0x0, 0xa8703(%rip)     # 0xe114c
movw $0x0, 0x3d9aae(%rip)    # 0x412500
movl $0x0, 0x3d9aa8(%rip)    # 0x412504
movswl 0x3d2e49(%rip), %eax    # 0x40b8ac
cmpl $0x1000, %eax           # imm = 0x1000
jl 0x38a7f
movswl 0x3d2e3b(%rip), %eax    # 0x40b8ac
subl $0x1000, %eax           # imm = 0x1000
movw %ax, 0x3d2e2f(%rip)     # 0x40b8ac
jmp 0x38ab9
movswl 0x3d2e26(%rip), %eax    # 0x40b8ac
movl %eax, -0x1c(%rbp)
movl 0x23eb21(%rip), %edi    # 0x2775b0
movl 0x23eb1f(%rip), %esi    # 0x2775b4
leaq 0x3d2e10(%rip), %rdx    # 0x40b8ac
callq 0x392a0
movswl 0x3d2e04(%rip), %eax    # 0x40b8ac
cmpl $0x0, %eax
jge 0x38ab7
movl -0x1c(%rbp), %eax
movw %ax, 0x3d2df5(%rip)     # 0x40b8ac
jmp 0x38ab9
movb $0x1, 0x3d9a48(%rip)    # 0x412508
movb $0x1, 0x3d9a42(%rip)    # 0x412509
movw 0x3d2dde(%rip), %ax     # 0x40b8ac
movl 0x23eadc(%rip), %esi    # 0x2775b0
movl 0x23eada(%rip), %edx    # 0x2775b4
leaq -0x28(%rbp), %rcx
leaq -0x2c(%rbp), %r8
movswl %ax, %edi
callq 0x393f0
movl 0x26fad0(%rip), %eax    # 0x2a85c0
cmpl -0x28(%rbp), %eax
jge 0x38afc
movb $0x0, 0x3d9a0c(%rip)    # 0x412508
movl 0x26fabe(%rip), %eax    # 0x2a85c0
cmpl -0x2c(%rbp), %eax
jle 0x38b0e
movb $0x0, 0x3d99fb(%rip)    # 0x412509
movswl 0x3d2d97(%rip), %edi    # 0x40b8ac
callq 0x39570
cmpb $0x0, 0x1bca7d(%rip)    # 0x1f559e
je 0x38de1
movb $0x0, 0x1bca70(%rip)    # 0x1f559e
movl 0xa81ec(%rip), %eax     # 0xe0d20
subl $0x1, %eax
movl %eax, 0x3d99cf(%rip)    # 0x41250c
movl $0x0, 0x3d99c9(%rip)    # 0x412510
movswl 0x3d99ac(%rip), %eax    # 0x4124fa
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x38beb
movslq -0x1c(%rbp), %rcx
leaq 0x23ca47(%rip), %rax    # 0x2755b0
movswq (%rax,%rcx,2), %rcx
leaq 0x1bca3b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xc(%rax), %eax
cmpl $0x0, %eax
jge 0x38b87
jmp 0x38bdd
movslq -0x1c(%rbp), %rcx
leaq 0x26fa3e(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
cmpl 0x3d9971(%rip), %eax    # 0x41250c
jge 0x38bb1
movslq -0x1c(%rbp), %rcx
leaq 0x26fa28(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, 0x3d995b(%rip)    # 0x41250c
movslq -0x1c(%rbp), %rcx
leaq 0x273a24(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
cmpl 0x3d994b(%rip), %eax    # 0x412510
jle 0x38bdb
movslq -0x1c(%rbp), %rcx
leaq 0x273a0e(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
movl %eax, 0x3d9935(%rip)    # 0x412510
jmp 0x38bdd
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38b54
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x3d9911(%rip), %eax    # 0x41250c
jge 0x38c60
movslq -0x1c(%rbp), %rcx
leaq 0x3d6be8(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movslq -0x1c(%rbp), %rdx
leaq 0x3d8259(%rip), %rcx    # 0x410e70
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jg 0x38c53
movslq -0x1c(%rbp), %rcx
leaq 0x3d6bc6(%rip), %rax    # 0x40f7f0
movw $0x1, (%rax,%rcx,2)
movslq -0x1c(%rbp), %rcx
leaq 0x3d8235(%rip), %rax    # 0x410e70
movw $0x0, (%rax,%rcx,2)
movw 0x3d98b0(%rip), %ax     # 0x4124f8
addw $-0x1, %ax
movw %ax, 0x3d98a5(%rip)     # 0x4124f8
jmp 0x38c55
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38bf2
movl 0x3d98aa(%rip), %eax    # 0x412510
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xa80ab(%rip), %eax     # 0xe0d20
jge 0x38cda
movslq -0x1c(%rbp), %rcx
leaq 0x3d6b6e(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movslq -0x1c(%rbp), %rdx
leaq 0x3d81df(%rip), %rcx    # 0x410e70
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jg 0x38ccd
movslq -0x1c(%rbp), %rcx
leaq 0x3d6b4c(%rip), %rax    # 0x40f7f0
movw $0x1, (%rax,%rcx,2)
movslq -0x1c(%rbp), %rcx
leaq 0x3d81bb(%rip), %rax    # 0x410e70
movw $0x0, (%rax,%rcx,2)
movw 0x3d9836(%rip), %ax     # 0x4124f8
addw $-0x1, %ax
movw %ax, 0x3d982b(%rip)     # 0x4124f8
jmp 0x38ccf
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38c6c
xorl %edi, %edi
callq 0x39fa0
movw 0x3d9814(%rip), %ax     # 0x4124fc
addw $-0x1, %ax
movw %ax, 0x3d9809(%rip)     # 0x4124fc
movswq 0x3d9801(%rip), %rcx    # 0x4124fc
leaq 0x3d981e(%rip), %rax    # 0x412520
movw (%rax,%rcx,2), %ax
movw %ax, 0x3d9813(%rip)     # 0x412520
movswq 0x3d97e7(%rip), %rcx    # 0x4124fc
leaq 0x3db804(%rip), %rax    # 0x414520
movw (%rax,%rcx,2), %ax
movw %ax, 0x3db7f9(%rip)     # 0x414520
movslq 0x3d97de(%rip), %rcx    # 0x41250c
leaq 0x3d6abb(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movslq 0x3d97d0(%rip), %rdx    # 0x412510
leaq 0x3d6aa9(%rip), %rcx    # 0x40f7f0
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jge 0x38d66
movslq 0x3d97b6(%rip), %rcx    # 0x41250c
leaq 0x3d6a93(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
jmp 0x38d7b
movslq 0x3d97a3(%rip), %rcx    # 0x412510
leaq 0x3d6a7c(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, 0x3dd79c(%rip)    # 0x416520
movslq 0x3d9781(%rip), %rcx    # 0x41250c
leaq 0x3d80de(%rip), %rax    # 0x410e70
movswl (%rax,%rcx,2), %eax
movslq 0x3d9773(%rip), %rdx    # 0x412510
leaq 0x3d80cc(%rip), %rcx    # 0x410e70
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jle 0x38dc3
movslq 0x3d9759(%rip), %rcx    # 0x41250c
leaq 0x3d80b6(%rip), %rax    # 0x410e70
movswl (%rax,%rcx,2), %eax
movl %eax, -0x48(%rbp)
jmp 0x38dd8
movslq 0x3d9746(%rip), %rcx    # 0x412510
leaq 0x3d809f(%rip), %rax    # 0x410e70
movswl (%rax,%rcx,2), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, 0x3dd743(%rip)    # 0x416524
jmp 0x38de3
movswl 0x3d9712(%rip), %ecx    # 0x4124fc
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x49(%rbp)
jle 0x38e04
movswl 0x3d96fd(%rip), %eax    # 0x4124f8
cmpl $0x0, %eax
setg %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x38e10
jmp 0x38ffd
movswl 0x3d96e5(%rip), %esi    # 0x4124fc
addl $0x3, %esi
sarl $0x2, %esi
leaq 0x3dd70c(%rip), %rdi    # 0x416530
xorl %edx, %edx
callq 0x6ed50
movb $0x1, 0x3dd6fe(%rip)    # 0x416530
movl $0x0, -0x30(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movswl 0x3d96b2(%rip), %ecx    # 0x4124fc
cmpl %ecx, %eax
jge 0x38e9a
movl -0x1c(%rbp), %edi
movl -0x30(%rbp), %esi
callq 0x3ba30
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0x38e63
jmp 0x38e8f
movslq -0x1c(%rbp), %rcx
leaq 0x3dd6c2(%rip), %rax    # 0x416530
movb $0x1, (%rax,%rcx)
cmpl $0x0, -0x20(%rbp)
jne 0x38e8d
movslq -0x30(%rbp), %rcx
leaq 0x3dd6ad(%rip), %rax    # 0x416530
movb $0x1, (%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x38e8f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38e40
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movswl 0x3d9651(%rip), %ecx    # 0x4124fc
cmpl %ecx, %eax
jge 0x38f15
movslq -0x1c(%rbp), %rcx
leaq 0x3dd676(%rip), %rax    # 0x416530
cmpb $0x0, (%rax,%rcx)
je 0x38ec2
jmp 0x38f0a
movl -0x1c(%rbp), %edi
movl -0x30(%rbp), %esi
callq 0x3ba30
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0x38ed7
jmp 0x38f0a
movslq -0x1c(%rbp), %rcx
leaq 0x3dd64e(%rip), %rax    # 0x416530
movb $0x1, (%rax,%rcx)
cmpl $0x0, -0x20(%rbp)
jne 0x38f08
movslq -0x30(%rbp), %rcx
leaq 0x3dd639(%rip), %rax    # 0x416530
movb $0x1, (%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x38f0a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x38ea1
movl -0x30(%rbp), %edi
callq 0x39fa0
cmpb $0x0, 0x3b011c(%rip)    # 0x3e9040
je 0x38fa2
movslq -0x30(%rbp), %rcx
leaq 0x3d95ef(%rip), %rax    # 0x412520
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x38fa0
movslq -0x24(%rbp), %rcx
leaq 0x23c667(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %eax
andl $0x7, %eax
movslq %eax, %rcx
leaq 0xa7d36(%rip), %rax     # 0xe0c90
movzbl (%rax,%rcx), %edx
movslq -0x24(%rbp), %rcx
leaq 0x23c647(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %eax
sarl $0x3, %eax
movslq %eax, %rcx
leaq 0x3af8c6(%rip), %rax    # 0x3e8840
movzbl (%rax,%rcx), %eax
orl %edx, %eax
movb %al, %dl
leaq 0x3af8b7(%rip), %rax    # 0x3e8840
movb %dl, (%rax,%rcx)
movslq -0x24(%rbp), %rcx
leaq 0x3e1599(%rip), %rax    # 0x41a530
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
jmp 0x38f38
jmp 0x38fa2
movw 0x3d9553(%rip), %ax     # 0x4124fc
addw $-0x1, %ax
movw %ax, 0x3d9548(%rip)     # 0x4124fc
movswq 0x3d9540(%rip), %rcx    # 0x4124fc
leaq 0x3d955d(%rip), %rax    # 0x412520
movw (%rax,%rcx,2), %dx
movslq -0x30(%rbp), %rcx
leaq 0x3d954e(%rip), %rax    # 0x412520
movw %dx, (%rax,%rcx,2)
movswq 0x3d951e(%rip), %rcx    # 0x4124fc
leaq 0x3db53b(%rip), %rax    # 0x414520
movw (%rax,%rcx,2), %dx
movslq -0x30(%rbp), %rcx
leaq 0x3db52c(%rip), %rax    # 0x414520
movw %dx, (%rax,%rcx,2)
jmp 0x38de3
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)