// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/build.c
// Function: menuselect
int menuselect(int newpathmode)
{
	int listsize;
	int i;
	char ch, buffer[90];
	CACHE1D_FIND_REC *dir;

	int bakpathsearchmode = pathsearchmode;

	listsize = (ydim16-32)/8;

	if (newpathmode != pathsearchmode) {
		strcpy(selectedboardfilename, "");
		pathsearchmode = newpathmode;
	}
	if (pathsearchmode == PATHSEARCH_SYSTEM) {
		Bcanonicalisefilename(selectedboardfilename, 1);		// clips off the last token and compresses relative path
	} else {
		Bcorrectfilename(selectedboardfilename, 1);
	}

	getfilenames(selectedboardfilename, "*.map");

	printmessage16("Select .MAP file with arrows&enter.");

	do {
		clearbuf((unsigned char *)frameplace, (bytesperline*ydim16) >> 2, 0l);

		if (pathsearchmode == PATHSEARCH_SYSTEM) {
			strcpy(buffer,"Local filesystem mode. Press F for game filesystem.");
		} else {
			strcpy(buffer,"Game filesystem");
			if (grponlymode) strcat(buffer, " GRP-only");
			strcat(buffer, " mode. Press F for local filesystem, G for ");
			if (grponlymode) strcat(buffer, "all files.");
			else strcat(buffer, "GRP files only.");
		}
		printext16(halfxdim16-(8*(int)strlen(buffer)/2), 4, 14,0,buffer,0);

		snprintf(buffer,sizeof(buffer),"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename);
		printext16(1,ydim16-8-1,8,0,buffer,0);

		if (finddirshigh) {
			dir = finddirshigh;
			for(i=listsize/2-1; i>=0; i--) if (!dir->prev) break; else dir=dir->prev;
			for(i=0; i<listsize && dir; i++, dir=dir->next) {
				int c = dir->type == CACHE1D_FIND_DIR ? 4 : 3;
				memset(buffer,0,sizeof(buffer));
				strncpy(buffer,dir->name,25);
				if (strlen(buffer) == 25)
					buffer[21] = buffer[22] = buffer[23] = '.', buffer[24] = 0;
				if (dir == finddirshigh) {
					if (currentlist == 0) printext16(8,16+8*i,c|8,0,"->",0);
					printext16(32,16+8*i,c|8,0,buffer,0);
				} else {
					printext16(32,16+8*i,c,0,buffer,0);
				}
			}
		}

		if (findfileshigh) {
			dir = findfileshigh;
			for(i=listsize/2-1; i>=0; i--) if (!dir->prev) break; else dir=dir->prev;
			for(i=0; i<listsize && dir; i++, dir=dir->next) {
				if (dir == findfileshigh) {
					if (currentlist == 1) printext16(240,16+8*i,7|8,0,"->",0);
					printext16(240+24,16+8*i,7|8,0,dir->name,0);
				} else {
					printext16(240+24,16+8*i,7,0,dir->name,0);
				}
			}
		}
		showframe();

		keystatus[0xcb] = 0;
		keystatus[0xcd] = 0;
		keystatus[0xc8] = 0;
		keystatus[0xd0] = 0;
		keystatus[0x1c] = 0;	//enter
		keystatus[0xf] = 0;		//tab
		keystatus[1] = 0;		//esc
		ch = 0;                      //Interesting fakery of ch = getch()
		while (ch == 0)
		{
			if (handleevents()) {
				if (quitevent) {
					keystatus[1] = 1;
					quitevent = 0;
				}
			}
			ch = bgetchar();
			if (keystatus[0xcb] > 0) ch = 9;		// left arr
			if (keystatus[0xcd] > 0) ch = 9;		// right arr
			if (keystatus[0xc8] > 0) ch = 72;		// up arr
			if (keystatus[0xd0] > 0) ch = 80;		// down arr

		}

		if (ch == 'f' || ch == 'F') {
			currentlist = 0;
			pathsearchmode = 1-pathsearchmode;
			if (pathsearchmode == PATHSEARCH_SYSTEM) {
				strcpy(selectedboardfilename, "");
				Bcanonicalisefilename(selectedboardfilename, 1);
			} else strcpy(selectedboardfilename, "/");
			getfilenames(selectedboardfilename, "*.map");
		} else if (ch == 'g' || ch == 'G') {
			if (pathsearchmode == PATHSEARCH_GAME) {
				grponlymode = 1-grponlymode;
				getfilenames(selectedboardfilename, "*.map");
			}
		} else if (ch == 9) {
			if ((currentlist == 0 && findfiles) || (currentlist == 1 && finddirs))
				currentlist = 1-currentlist;
		} else if ((ch == 75) || (ch == 72)) {
			if (currentlist == 0) {
				if (finddirshigh && finddirshigh->prev) finddirshigh = finddirshigh->prev;
			} else {
				if (findfileshigh && findfileshigh->prev) findfileshigh = findfileshigh->prev;
			}
		} else if ((ch == 77) || (ch == 80)) {
			if (currentlist == 0) {
				if (finddirshigh && finddirshigh->next) finddirshigh = finddirshigh->next;
			} else {
				if (findfileshigh && findfileshigh->next) findfileshigh = findfileshigh->next;
			}
		} else if ((ch == 13) && (currentlist == 0) && finddirshigh) {
			if (finddirshigh->type == CACHE1D_FIND_DRIVE) {
				strcpy(selectedboardfilename, finddirshigh->name);
			} else {
				strcat(selectedboardfilename, finddirshigh->name);
			}
			strcat(selectedboardfilename, "/");
			if (pathsearchmode == PATHSEARCH_SYSTEM)
				Bcanonicalisefilename(selectedboardfilename, 1);
			else
				Bcorrectfilename(selectedboardfilename, 1);

			//printf("Changing directories to: %s\n", selectedboardfilename);

			getfilenames(selectedboardfilename, "*.map");
			ch = 0;

			clearbuf((unsigned char *)frameplace, (bytesperline*ydim16) >> 2, 0l);
			showframe();
		}
		if (ch == 13 && !findfileshigh) ch = 0;
	}
	while ((ch != 13) && (ch != 27));
	if (ch == 13)
	{
		Bstrcat(selectedboardfilename, findfileshigh->name);
		//printf("Selected file: %s\n", selectedboardfilename);

		return(0);
	}
	pathsearchmode = bakpathsearchmode;
	return(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x8(%rbp)
leaq 0x1c639b(%rip), %rax    # 0x1f1260
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movl 0x13f5f8(%rip), %eax    # 0x16a4c8
subl $0x20, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
leaq 0x1c6378(%rip), %rcx    # 0x1f1260
cmpl (%rcx), %eax
je 0x2af0b
leaq 0x18ba3d(%rip), %rdi    # 0x1b6930
leaq 0x88003(%rip), %rsi     # 0xb2efd
callq 0x63e0
movl -0x8(%rbp), %ecx
leaq 0x1c6357(%rip), %rax    # 0x1f1260
movl %ecx, (%rax)
leaq 0x1c634e(%rip), %rax    # 0x1f1260
cmpl $0x1, (%rax)
jne 0x2af2a
leaq 0x18ba12(%rip), %rdi    # 0x1b6930
movl $0x1, %esi
callq 0x32dd0
jmp 0x2af3b
leaq 0x18b9ff(%rip), %rdi    # 0x1b6930
movl $0x1, %esi
callq 0x328d0
leaq 0x18b9ee(%rip), %rdi    # 0x1b6930
leaq 0x859df(%rip), %rsi     # 0xb0928
callq 0x2bab0
leaq 0x859d9(%rip), %rdi     # 0xb092e
callq 0x25760
leaq 0x18fcaf(%rip), %rax    # 0x1bac10
movq (%rax), %rdi
leaq 0x18fe79(%rip), %rax    # 0x1bade4
movl (%rax), %esi
imull 0x13f554(%rip), %esi    # 0x16a4c8
sarl $0x2, %esi
xorl %edx, %edx
callq 0x6ed50
leaq 0x1c62db(%rip), %rax    # 0x1f1260
cmpl $0x1, (%rax)
jne 0x2af9c
leaq -0x70(%rbp), %rdi
leaq 0x859bd(%rip), %rsi     # 0xb0952
callq 0x63e0
jmp 0x2b002
leaq -0x70(%rbp), %rdi
leaq 0x859df(%rip), %rsi     # 0xb0986
callq 0x63e0
cmpl $0x0, 0x13f0c5(%rip)    # 0x16a078
je 0x2afc5
leaq -0x70(%rbp), %rdi
leaq 0x859d6(%rip), %rsi     # 0xb0996
callq 0x6690
leaq -0x70(%rbp), %rdi
leaq 0x859d0(%rip), %rsi     # 0xb09a0
callq 0x6690
cmpl $0x0, 0x13f09c(%rip)    # 0x16a078
je 0x2aff0
leaq -0x70(%rbp), %rdi
leaq 0x859e3(%rip), %rsi     # 0xb09cc
callq 0x6690
jmp 0x2b000
leaq -0x70(%rbp), %rdi
leaq 0x859dc(%rip), %rsi     # 0xb09d7
callq 0x6690
jmp 0x2b002
movl 0x18b91c(%rip), %eax    # 0x1b6924
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x63d0
movl -0x84(%rbp), %edi
shll $0x3, %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl %eax, %edi
leaq -0x70(%rbp), %r8
movl $0x4, %esi
movl $0xe, %edx
xorl %r9d, %r9d
movl %r9d, %ecx
callq 0x255b0
leaq -0x70(%rbp), %rdi
movl 0x18bcf3(%rip), %ecx    # 0x1b6d40
movl 0x18bcf0(%rip), %r8d    # 0x1b6d44
movl $0x5a, %esi
leaq 0x85987(%rip), %rdx     # 0xb09e7
leaq 0x18b8c9(%rip), %r9     # 0x1b6930
movb $0x0, %al
callq 0x6490
movl 0x13f454(%rip), %esi    # 0x16a4c8
subl $0x8, %esi
subl $0x1, %esi
leaq -0x70(%rbp), %r8
movl $0x1, %edi
movl $0x8, %edx
xorl %r9d, %r9d
movl %r9d, %ecx
callq 0x255b0
cmpq $0x0, 0x18bcad(%rip)    # 0x1b6d48
je 0x2b223
movq 0x18bca0(%rip), %rax    # 0x1b6d48
movq %rax, -0x78(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x2b0e9
movq -0x78(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x2b0d0
jmp 0x2b0e9
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x2b0de
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b0bd
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x85(%rbp)
jge 0x2b10e
cmpq $0x0, -0x78(%rbp)
setne %al
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
testb $0x1, %al
jne 0x2b11d
jmp 0x2b221
movq -0x78(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x3, %eax
movl $0x4, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0x80(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x5a, %edx
callq 0x62d0
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rsi
movl $0x19, %edx
callq 0x6180
leaq -0x70(%rbp), %rdi
callq 0x63d0
cmpq $0x19, %rax
jne 0x2b17b
movb $0x2e, -0x59(%rbp)
movb $0x2e, -0x5a(%rbp)
movb $0x2e, -0x5b(%rbp)
movb $0x0, -0x58(%rbp)
movq -0x78(%rbp), %rax
cmpq 0x18bbc2(%rip), %rax    # 0x1b6d48
jne 0x2b1e2
cmpl $0x0, 0x18bbc9(%rip)    # 0x1b6d58
jne 0x2b1ba
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movl -0x80(%rbp), %eax
orl $0x8, %eax
movl $0x8, %edi
xorl %r9d, %r9d
leaq 0x8584f(%rip), %r8      # 0xb09fe
movswl %ax, %edx
movl %r9d, %ecx
callq 0x255b0
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movl -0x80(%rbp), %eax
orl $0x8, %eax
leaq -0x70(%rbp), %r8
movl $0x20, %edi
xorl %r9d, %r9d
movswl %ax, %edx
movl %r9d, %ecx
callq 0x255b0
jmp 0x2b205
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movl -0x80(%rbp), %eax
leaq -0x70(%rbp), %r8
movl $0x20, %edi
xorl %r9d, %r9d
movswl %ax, %edx
movl %r9d, %ecx
callq 0x255b0
jmp 0x2b207
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x2b0f0
jmp 0x2b223
cmpq $0x0, 0x18bb25(%rip)    # 0x1b6d50
je 0x2b352
movq 0x18bb18(%rip), %rax    # 0x1b6d50
movq %rax, -0x78(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x2b279
movq -0x78(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x2b260
jmp 0x2b279
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x2b26e
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b24d
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x86(%rbp)
jge 0x2b29e
cmpq $0x0, -0x78(%rbp)
setne %al
movb %al, -0x86(%rbp)
movb -0x86(%rbp), %al
testb $0x1, %al
jne 0x2b2ad
jmp 0x2b350
movq -0x78(%rbp), %rax
cmpq 0x18ba98(%rip), %rax    # 0x1b6d50
jne 0x2b30f
cmpl $0x1, 0x18ba97(%rip)    # 0x1b6d58
jne 0x2b2e8
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movl $0xf0, %edi
movl $0xf, %edx
xorl %r9d, %r9d
leaq 0x8571e(%rip), %r8      # 0xb09fe
movl %r9d, %ecx
callq 0x255b0
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movq -0x78(%rbp), %rax
movq (%rax), %r8
movl $0x108, %edi            # imm = 0x108
movl $0xf, %edx
xorl %r9d, %r9d
movl %r9d, %ecx
callq 0x255b0
jmp 0x2b334
movl -0x10(%rbp), %esi
shll $0x3, %esi
addl $0x10, %esi
movq -0x78(%rbp), %rax
movq (%rax), %r8
movl $0x108, %edi            # imm = 0x108
movl $0x7, %edx
xorl %r9d, %r9d
movl %r9d, %ecx
callq 0x255b0
jmp 0x2b336
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x2b280
jmp 0x2b352
callq 0xa67c0
leaq 0x18fa92(%rip), %rax    # 0x1badf0
movb $0x0, 0xcb(%rax)
leaq 0x18fa84(%rip), %rax    # 0x1badf0
movb $0x0, 0xcd(%rax)
leaq 0x18fa76(%rip), %rax    # 0x1badf0
movb $0x0, 0xc8(%rax)
leaq 0x18fa68(%rip), %rax    # 0x1badf0
movb $0x0, 0xd0(%rax)
leaq 0x18fa5a(%rip), %rax    # 0x1badf0
movb $0x0, 0x1c(%rax)
leaq 0x18fa4f(%rip), %rax    # 0x1badf0
movb $0x0, 0xf(%rax)
leaq 0x18fa44(%rip), %rax    # 0x1badf0
movb $0x0, 0x1(%rax)
movb $0x0, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x2b457
callq 0xa6ab0
cmpl $0x0, %eax
je 0x2b3ee
leaq 0x18f82e(%rip), %rax    # 0x1bac00
cmpb $0x0, (%rax)
je 0x2b3ec
leaq 0x18fa12(%rip), %rax    # 0x1badf0
movb $0x1, 0x1(%rax)
leaq 0x18f817(%rip), %rax    # 0x1bac00
movb $0x0, (%rax)
jmp 0x2b3ee
callq 0x2de70
movb %al, -0x11(%rbp)
leaq 0x18f9f3(%rip), %rax    # 0x1badf0
movsbl 0xcb(%rax), %eax
cmpl $0x0, %eax
jle 0x2b40d
movb $0x9, -0x11(%rbp)
leaq 0x18f9dc(%rip), %rax    # 0x1badf0
movsbl 0xcd(%rax), %eax
cmpl $0x0, %eax
jle 0x2b424
movb $0x9, -0x11(%rbp)
leaq 0x18f9c5(%rip), %rax    # 0x1badf0
movsbl 0xc8(%rax), %eax
cmpl $0x0, %eax
jle 0x2b43b
movb $0x48, -0x11(%rbp)
leaq 0x18f9ae(%rip), %rax    # 0x1badf0
movsbl 0xd0(%rax), %eax
cmpl $0x0, %eax
jle 0x2b452
movb $0x50, -0x11(%rbp)
jmp 0x2b3b4
movsbl -0x11(%rbp), %eax
cmpl $0x66, %eax
je 0x2b469
movsbl -0x11(%rbp), %eax
cmpl $0x46, %eax
jne 0x2b4e7
movl $0x0, 0x18b8e5(%rip)    # 0x1b6d58
movl $0x1, %ecx
leaq 0x1c5de1(%rip), %rax    # 0x1f1260
subl (%rax), %ecx
leaq 0x1c5dd8(%rip), %rax    # 0x1f1260
movl %ecx, (%rax)
leaq 0x1c5dcf(%rip), %rax    # 0x1f1260
cmpl $0x1, (%rax)
jne 0x2b4bc
leaq 0x18b493(%rip), %rdi    # 0x1b6930
leaq 0x87a59(%rip), %rsi     # 0xb2efd
callq 0x63e0
leaq 0x18b480(%rip), %rdi    # 0x1b6930
movl $0x1, %esi
callq 0x32dd0
jmp 0x2b4cf
leaq 0x18b46d(%rip), %rdi    # 0x1b6930
leaq 0x86b21(%rip), %rsi     # 0xb1feb
callq 0x63e0
leaq 0x18b45a(%rip), %rdi    # 0x1b6930
leaq 0x8544b(%rip), %rsi     # 0xb0928
callq 0x2bab0
jmp 0x2b753
movsbl -0x11(%rbp), %eax
cmpl $0x67, %eax
je 0x2b4f9
movsbl -0x11(%rbp), %eax
cmpl $0x47, %eax
jne 0x2b52e
leaq 0x1c5d60(%rip), %rax    # 0x1f1260
cmpl $0x0, (%rax)
jne 0x2b529
movl $0x1, %eax
subl 0x13eb68(%rip), %eax    # 0x16a078
movl %eax, 0x13eb62(%rip)    # 0x16a078
leaq 0x18b413(%rip), %rdi    # 0x1b6930
leaq 0x85404(%rip), %rsi     # 0xb0928
callq 0x2bab0
jmp 0x2b751
movsbl -0x11(%rbp), %eax
cmpl $0x9, %eax
jne 0x2b573
cmpl $0x0, 0x18b81a(%rip)    # 0x1b6d58
jne 0x2b54a
cmpq $0x0, 0x18b7f0(%rip)    # 0x1b6d38
jne 0x2b55d
cmpl $0x1, 0x18b807(%rip)    # 0x1b6d58
jne 0x2b56e
cmpq $0x0, 0x18b7d5(%rip)    # 0x1b6d30
je 0x2b56e
movl $0x1, %eax
subl 0x18b7f0(%rip), %eax    # 0x1b6d58
movl %eax, 0x18b7ea(%rip)    # 0x1b6d58
jmp 0x2b74f
movsbl -0x11(%rbp), %eax
cmpl $0x4b, %eax
je 0x2b585
movsbl -0x11(%rbp), %eax
cmpl $0x48, %eax
jne 0x2b5eb
cmpl $0x0, 0x18b7cc(%rip)    # 0x1b6d58
jne 0x2b5ba
cmpq $0x0, 0x18b7b2(%rip)    # 0x1b6d48
je 0x2b5b8
movq 0x18b7a9(%rip), %rax    # 0x1b6d48
cmpq $0x0, 0x18(%rax)
je 0x2b5b8
movq 0x18b79b(%rip), %rax    # 0x1b6d48
movq 0x18(%rax), %rax
movq %rax, 0x18b790(%rip)    # 0x1b6d48
jmp 0x2b5e6
cmpq $0x0, 0x18b78e(%rip)    # 0x1b6d50
je 0x2b5e4
movq 0x18b785(%rip), %rax    # 0x1b6d50
cmpq $0x0, 0x18(%rax)
je 0x2b5e4
movq 0x18b777(%rip), %rax    # 0x1b6d50
movq 0x18(%rax), %rax
movq %rax, 0x18b76c(%rip)    # 0x1b6d50
jmp 0x2b5e6
jmp 0x2b74d
movsbl -0x11(%rbp), %eax
cmpl $0x4d, %eax
je 0x2b5fd
movsbl -0x11(%rbp), %eax
cmpl $0x50, %eax
jne 0x2b663
cmpl $0x0, 0x18b754(%rip)    # 0x1b6d58
jne 0x2b632
cmpq $0x0, 0x18b73a(%rip)    # 0x1b6d48
je 0x2b630
movq 0x18b731(%rip), %rax    # 0x1b6d48
cmpq $0x0, 0x10(%rax)
je 0x2b630
movq 0x18b723(%rip), %rax    # 0x1b6d48
movq 0x10(%rax), %rax
movq %rax, 0x18b718(%rip)    # 0x1b6d48
jmp 0x2b65e
cmpq $0x0, 0x18b716(%rip)    # 0x1b6d50
je 0x2b65c
movq 0x18b70d(%rip), %rax    # 0x1b6d50
cmpq $0x0, 0x10(%rax)
je 0x2b65c
movq 0x18b6ff(%rip), %rax    # 0x1b6d50
movq 0x10(%rax), %rax
movq %rax, 0x18b6f4(%rip)    # 0x1b6d50
jmp 0x2b65e
jmp 0x2b74b
movsbl -0x11(%rbp), %eax
cmpl $0xd, %eax
jne 0x2b749
cmpl $0x0, 0x18b6e1(%rip)    # 0x1b6d58
jne 0x2b749
cmpq $0x0, 0x18b6c3(%rip)    # 0x1b6d48
je 0x2b749
movq 0x18b6b6(%rip), %rax    # 0x1b6d48
cmpl $0x4, 0x8(%rax)
jne 0x2b6b0
movq 0x18b6a9(%rip), %rax    # 0x1b6d48
movq (%rax), %rsi
leaq 0x18b287(%rip), %rdi    # 0x1b6930
callq 0x63e0
jmp 0x2b6c6
movq 0x18b691(%rip), %rax    # 0x1b6d48
movq (%rax), %rsi
leaq 0x18b26f(%rip), %rdi    # 0x1b6930
callq 0x6690
leaq 0x18b263(%rip), %rdi    # 0x1b6930
leaq 0x86917(%rip), %rsi     # 0xb1feb
callq 0x6690
leaq 0x1c5b80(%rip), %rax    # 0x1f1260
cmpl $0x1, (%rax)
jne 0x2b6f8
leaq 0x18b244(%rip), %rdi    # 0x1b6930
movl $0x1, %esi
callq 0x32dd0
jmp 0x2b709
leaq 0x18b231(%rip), %rdi    # 0x1b6930
movl $0x1, %esi
callq 0x328d0
leaq 0x18b220(%rip), %rdi    # 0x1b6930
leaq 0x85211(%rip), %rsi     # 0xb0928
callq 0x2bab0
movb $0x0, -0x11(%rbp)
leaq 0x18f4e9(%rip), %rax    # 0x1bac10
movq (%rax), %rdi
leaq 0x18f6b3(%rip), %rax    # 0x1bade4
movl (%rax), %esi
imull 0x13ed8e(%rip), %esi    # 0x16a4c8
sarl $0x2, %esi
xorl %edx, %edx
callq 0x6ed50
callq 0xa67c0
jmp 0x2b74b
jmp 0x2b74d
jmp 0x2b74f
jmp 0x2b751
jmp 0x2b753
movsbl -0x11(%rbp), %eax
cmpl $0xd, %eax
jne 0x2b76a
cmpq $0x0, 0x18b5ec(%rip)    # 0x1b6d50
jne 0x2b76a
movb $0x0, -0x11(%rbp)
jmp 0x2b76c
movsbl -0x11(%rbp), %ecx
xorl %eax, %eax
cmpl $0xd, %ecx
movb %al, -0x87(%rbp)
je 0x2b78d
movsbl -0x11(%rbp), %eax
cmpl $0x1b, %eax
setne %al
movb %al, -0x87(%rbp)
movb -0x87(%rbp), %al
testb $0x1, %al
jne 0x2af5a
movsbl -0x11(%rbp), %eax
cmpl $0xd, %eax
jne 0x2b7c3
movq 0x18b5a5(%rip), %rax    # 0x1b6d50
movq (%rax), %rsi
leaq 0x18b17b(%rip), %rdi    # 0x1b6930
callq 0x6690
movl $0x0, -0x4(%rbp)
jmp 0x2b7d6
movl -0x7c(%rbp), %ecx
leaq 0x1c5a93(%rip), %rax    # 0x1f1260
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)