// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_Manipulate
static void OSD_Manipulate(int op) {
	int i, j;
	symbol_t *tabc = NULL;

	switch (op) {
		case OSDOP_START:
			osdeditcursor = 0;
			osdeditwinstart = osdeditcursor;
			osdeditwinend = osdeditwinstart+editlinewidth;
			break;
		case OSDOP_END:
			osdeditcursor = osdeditlen;
			osdeditwinend = osdeditcursor;
			osdeditwinstart = osdeditwinend-editlinewidth;
			if (osdeditwinstart<0) {
				osdeditwinstart=0;
				osdeditwinend = editlinewidth;
			}
			break;
		case OSDOP_LEFT:
			if (osdeditcursor>0) {
				osdeditcursor--;
			}
			if (osdeditcursor<osdeditwinstart) {
				osdeditwinend-=(osdeditwinstart-osdeditcursor);
				osdeditwinstart-=(osdeditwinstart-osdeditcursor);
			}
			break;
		case OSDOP_LEFT_WORD:
			if (osdeditcursor>0) {
				while (osdeditcursor>0) {
					if (osdeditbuf[osdeditcursor-1] != 32) break;
					osdeditcursor--;
				}
				while (osdeditcursor>0) {
					if (osdeditbuf[osdeditcursor-1] == 32) break;
					osdeditcursor--;
				}
			}
			if (osdeditcursor<osdeditwinstart) {
				osdeditwinend-=(osdeditwinstart-osdeditcursor);
				osdeditwinstart-=(osdeditwinstart-osdeditcursor);
			}
			break;
		case OSDOP_RIGHT:
			if (osdeditcursor<osdeditlen) {
				osdeditcursor++;
			}
			if (osdeditcursor>=osdeditwinend) {
				osdeditwinstart+=(osdeditcursor-osdeditwinend);
				osdeditwinend+=(osdeditcursor-osdeditwinend);
			}
			break;
		case OSDOP_RIGHT_WORD:
			if (osdeditcursor<osdeditlen) {
				while (osdeditcursor<osdeditlen) {
					if (osdeditbuf[osdeditcursor] == 32) break;
					osdeditcursor++;
				}
				while (osdeditcursor<osdeditlen) {
					if (osdeditbuf[osdeditcursor] != 32) break;
					osdeditcursor++;
				}
			}
			if (osdeditcursor>=osdeditwinend) {
				osdeditwinstart+=(osdeditcursor-osdeditwinend);
				osdeditwinend+=(osdeditcursor-osdeditwinend);
			}
			break;
		case OSDOP_BACKSPACE:
			if (!osdeditcursor || !osdeditlen) return;
			if (!osdovertype) {
				if (osdeditcursor < osdeditlen)
					Bmemmove(osdeditbuf+osdeditcursor-1, osdeditbuf+osdeditcursor, osdeditlen-osdeditcursor);
				osdeditlen--;
			}
			osdeditcursor--;
			if (osdeditcursor<osdeditwinstart) {
				osdeditwinstart--;
				osdeditwinend--;
			}
			break;
		case OSDOP_DELETE:
			if (osdeditcursor == osdeditlen || !osdeditlen) return;
			if (osdeditcursor <= osdeditlen-1) Bmemmove(osdeditbuf+osdeditcursor, osdeditbuf+osdeditcursor+1, osdeditlen-osdeditcursor-1);
			osdeditlen--;
			break;
		case OSDOP_DELETE_START:
			if (osdeditcursor>0 && osdeditlen) {
				if (osdeditcursor<osdeditlen)
					Bmemmove(osdeditbuf, osdeditbuf+osdeditcursor, osdeditlen-osdeditcursor);
				osdeditlen-=osdeditcursor;
				osdeditcursor = 0;
				osdeditwinstart = 0;
				osdeditwinend = editlinewidth;
			}
			break;
		case OSDOP_DELETE_END:
			osdeditlen = osdeditcursor;
			break;
		case OSDOP_DELETE_WORD:
			if (osdeditcursor>0 && osdeditlen>0) {
				i=osdeditcursor;
				while (i>0 && osdeditbuf[i-1]==32) i--;
				while (i>0 && osdeditbuf[i-1]!=32) i--;
				if (osdeditcursor<osdeditlen)
					Bmemmove(osdeditbuf+i, osdeditbuf+osdeditcursor, osdeditlen-osdeditcursor);
				osdeditlen -= (osdeditcursor-i);
				osdeditcursor = i;
				if (osdeditcursor < osdeditwinstart) {
					osdeditwinstart=osdeditcursor;
					osdeditwinend=osdeditwinstart+editlinewidth;
				}
			}
			break;
		case OSDOP_CANCEL:
			osdeditlen=0;
			osdeditcursor=0;
			osdeditwinstart=0;
			osdeditwinend=editlinewidth;
			break;
		case OSDOP_COMPLETE:
			if (!lastmatch) {
				for (i=osdeditcursor;i>0;i--) if (osdeditbuf[i-1] == ' ') break;
				for (j=0;osdeditbuf[i] != ' ' && i < osdeditlen;j++,i++)
					osdedittmp[j] = osdeditbuf[i];
				osdedittmp[j] = 0;

				if (j > 0)
					tabc = findsymbol(osdedittmp, NULL);
			} else {
				tabc = findsymbol(osdedittmp, lastmatch->next);
				if (!tabc && lastmatch)
					tabc = findsymbol(osdedittmp, NULL);	// wrap
			}

			if (tabc) {
				for (i=osdeditcursor;i>0;i--) if (osdeditbuf[i-1] == ' ') break;
				osdeditlen = i;
				for (j=0;tabc->name[j] && osdeditlen <= EDITLENGTH;i++,j++,osdeditlen++)
					osdeditbuf[i] = tabc->name[j];
				osdeditcursor = osdeditlen;
				osdeditwinend = osdeditcursor;
				osdeditwinstart = osdeditwinend-editlinewidth;
				if (osdeditwinstart<0) {
					osdeditwinstart=0;
					osdeditwinend = editlinewidth;
				}

				lastmatch = tabc;
			}
			break;
		case OSDOP_SUBMIT:
			if (osdeditlen>0) {
				osdeditbuf[osdeditlen] = 0;
				Bmemmove(osdhistorybuf[1], osdhistorybuf[0], (HISTORYDEPTH-1)*(EDITLENGTH+1));
				Bmemmove(osdhistorybuf[0], osdeditbuf, EDITLENGTH+1);
				if (osdhistorysize < HISTORYDEPTH) osdhistorysize++;
				if (osdexeccount == HISTORYDEPTH)
					OSD_Printf("Command Buffer Warning: Failed queueing command "
							"for execution. Buffer full.\n");
				else
					osdexeccount++;
				osdhistorypos=-1;
			}

			osdeditlen=0;
			osdeditcursor=0;
			osdeditwinstart=0;
			osdeditwinend=editlinewidth;
			break;
		case OSDOP_HISTORY_UP:
			if (osdhistorypos < osdhistorysize-1) {
				osdhistorypos++;
				memcpy(osdeditbuf, osdhistorybuf[osdhistorypos], EDITLENGTH+1);
				osdeditlen = osdeditcursor = 0;
				while (osdeditbuf[osdeditcursor]) {
					osdeditlen++;
					osdeditcursor++;
				}
				if (osdeditcursor<osdeditwinstart) {
					osdeditwinend = osdeditcursor;
					osdeditwinstart = osdeditwinend-editlinewidth;

					if (osdeditwinstart<0) {
						osdeditwinend-=osdeditwinstart;
						osdeditwinstart=0;
					}
				} else if (osdeditcursor>=osdeditwinend) {
					osdeditwinstart+=(osdeditcursor-osdeditwinend);
					osdeditwinend+=(osdeditcursor-osdeditwinend);
				}
			}
			break;
		case OSDOP_HISTORY_DOWN:
			if (osdhistorypos >= 0) {
				if (osdhistorypos == 0) {
					osdeditlen=0;
					osdeditcursor=0;
					osdeditwinstart=0;
					osdeditwinend=editlinewidth;
					osdhistorypos = -1;
				} else {
					osdhistorypos--;
					memcpy(osdeditbuf, osdhistorybuf[osdhistorypos], EDITLENGTH+1);
					osdeditlen = osdeditcursor = 0;
					while (osdeditbuf[osdeditcursor]) {
						osdeditlen++;
						osdeditcursor++;
					}
					if (osdeditcursor<osdeditwinstart) {
						osdeditwinend = osdeditcursor;
						osdeditwinstart = osdeditwinend-editlinewidth;

						if (osdeditwinstart<0) {
							osdeditwinend-=osdeditwinstart;
							osdeditwinstart=0;
						}
					} else if (osdeditcursor>=osdeditwinend) {
						osdeditwinstart+=(osdeditcursor-osdeditwinend);
						osdeditwinend+=(osdeditcursor-osdeditwinend);
					}
				}
			}
			break;
		case OSDOP_SCROLL_TOP:
			osdhead = osdlines-1;
			break;
		case OSDOP_SCROLL_BOTTOM:
			osdhead = 0;
			break;
		case OSDOP_PAGE_UP:
			if (osdhead < osdlines-1)
				osdhead++;
			break;
		case OSDOP_PAGE_DOWN:
			if (osdhead > 0)
				osdhead--;
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
leaq 0x2d064(%rip), %rcx     # 0x768cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x5ada95(%rip), %ecx    # 0x5f730c
movl %ecx, 0x5adc93(%rip)    # 0x5f7510
movl %ecx, 0x5a465(%rip)     # 0xa3ce8
movl 0x5a453(%rip), %eax     # 0xa3cdc
addl $-0x4, %eax
subl %eax, %ecx
movl %ecx, 0x5ada74(%rip)    # 0x5f7308
jns 0x49e17
movl $0x0, 0x5ada64(%rip)    # 0x5f7308
jmp 0x49e11
movl 0x5a3d1(%rip), %eax     # 0xa3c80
jmp 0x49d88
movslq 0x5a445(%rip), %rax     # 0xa3d00
movl 0x5afe5f(%rip), %ecx    # 0x5f9720
decl %ecx
cmpl %ecx, %eax
jge 0x49e17
incq %rax
movl %eax, 0x5a42c(%rip)     # 0xa3d00
shlq $0x9, %rax
leaq 0x5adc41(%rip), %rsi    # 0x5f7520
addq %rax, %rsi
leaq 0x5ada27(%rip), %rbx    # 0x5f7310
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
callq 0x60c0
xorl %eax, %eax
movl %eax, 0x5adc12(%rip)    # 0x5f7510
movl %eax, 0x5ada08(%rip)    # 0x5f730c
cmpb $0x0, 0x5ada05(%rip)    # 0x5f7310
je 0x49a03
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rax), %rax
jne 0x49913
jmp 0x499f7
movl 0x5adbe7(%rip), %eax    # 0x5f7510
cmpl 0x5ad9dd(%rip), %eax    # 0x5f730c
jge 0x49baa
incl %eax
movl %eax, 0x5adbd3(%rip)    # 0x5f7510
jmp 0x49baa
movq 0x5ad9a7(%rip), %rax    # 0x5f72f0
testq %rax, %rax
je 0x49db1
movq 0x8(%rax), %rdi
callq 0x4ab3b
testq %rax, %rax
jne 0x49f38
jmp 0x49f2d
movl 0x5adba1(%rip), %eax    # 0x5f7510
movl %eax, 0x5ad997(%rip)    # 0x5f730c
jmp 0x49e17
movl 0x5adb90(%rip), %eax    # 0x5f7510
testl %eax, %eax
jle 0x49ab2
decl %eax
movl %eax, 0x5adb80(%rip)    # 0x5f7510
jmp 0x49ab2
movl 0x5a365(%rip), %eax     # 0xa3d00
testl %eax, %eax
js 0x49e17
je 0x49e9a
decl %eax
movl %eax, 0x5a34f(%rip)     # 0xa3d00
shlq $0x9, %rax
leaq 0x5adb64(%rip), %rsi    # 0x5f7520
addq %rax, %rsi
leaq 0x5ad94a(%rip), %rbx    # 0x5f7310
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
callq 0x60c0
xorl %eax, %eax
movl %eax, 0x5adb35(%rip)    # 0x5f7510
movl %eax, 0x5ad92b(%rip)    # 0x5f730c
cmpb $0x0, 0x5ad928(%rip)    # 0x5f7310
je 0x49a03
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rax), %rax
jne 0x499ec
movl %eax, 0x5ad90f(%rip)    # 0x5f730c
movl %eax, 0x5adb0d(%rip)    # 0x5f7510
movl 0x5ad8ff(%rip), %ecx    # 0x5f7308
cmpl %ecx, %eax
jge 0x49d95
movl %eax, 0x5a2d1(%rip)     # 0xa3ce8
movl 0x5a2bf(%rip), %ecx     # 0xa3cdc
addl $-0x4, %ecx
subl %ecx, %eax
movl %eax, 0x5ad8e0(%rip)    # 0x5f7308
jns 0x49e17
movl %ecx, 0x5a2b4(%rip)     # 0xa3ce8
movl $0x0, 0x5ad8ca(%rip)    # 0x5f7308
jmp 0x49e17
cmpl $0x0, 0x5adac6(%rip)    # 0x5f7510
jle 0x49ab2
movslq 0x5adabd(%rip), %rax    # 0x5f7510
testq %rax, %rax
jle 0x49a7f
leaq 0x5ad8b1(%rip), %rcx    # 0x5f7310
cmpb $0x20, -0x1(%rax,%rcx)
jne 0x49a7f
leaq -0x1(%rax), %rdx
decl %eax
movl %eax, 0x5ada9e(%rip)    # 0x5f7510
leaq 0x1(%rdx), %rsi
movq %rdx, %rax
cmpq $0x1, %rsi
jg 0x49a5f
movslq 0x5ada8a(%rip), %rax    # 0x5f7510
testq %rax, %rax
jle 0x49ab2
leaq 0x5ad87e(%rip), %rcx    # 0x5f7310
cmpb $0x20, -0x1(%rax,%rcx)
je 0x49ab2
leaq -0x1(%rax), %rdx
decl %eax
movl %eax, 0x5ada6b(%rip)    # 0x5f7510
leaq 0x1(%rdx), %rsi
movq %rdx, %rax
cmpq $0x1, %rsi
jg 0x49a92
movl 0x5ada58(%rip), %eax    # 0x5f7510
movl %eax, %ecx
subl 0x5ad848(%rip), %ecx    # 0x5f7308
jge 0x49e17
addl %ecx, 0x5a21c(%rip)     # 0xa3ce8
movl %eax, 0x5ad836(%rip)    # 0x5f7308
jmp 0x49e17
movslq 0x5ada32(%rip), %rax    # 0x5f7510
movl 0x5ad828(%rip), %ebx    # 0x5f730c
cmpl %ebx, %eax
sete %cl
testl %ebx, %ebx
sete %dl
orb %cl, %dl
jne 0x49e17
cmpl %ebx, %eax
jge 0x49b18
leaq 0x5ad80f(%rip), %rcx    # 0x5f7310
leaq (%rcx,%rax), %rdi
leaq (%rax,%rcx), %rsi
incq %rsi
notl %eax
addl %ebx, %eax
movslq %eax, %rdx
callq 0x61a0
decl %ebx
movl %ebx, 0x5ad7ec(%rip)    # 0x5f730c
jmp 0x49e17
movl $0x0, 0x5ad7d5(%rip)    # 0x5f7304
jmp 0x49e17
movl 0x5ad7d2(%rip), %eax    # 0x5f730c
cmpl %eax, 0x5ad9d0(%rip)    # 0x5f7510
jge 0x49baa
movslq 0x5ad9c7(%rip), %rsi    # 0x5f7510
cmpl %eax, %esi
jge 0x49b77
leaq 0x5ad7bc(%rip), %rcx    # 0x5f7310
addq %rsi, %rcx
movl %eax, %edx
negl %edx
incl %esi
cmpb $0x20, (%rcx)
je 0x49b77
movl %esi, 0x5ad9a8(%rip)    # 0x5f7510
incq %rcx
leal (%rdx,%rsi), %edi
incl %edi
incl %esi
cmpl $0x1, %edi
jne 0x49b5d
movslq 0x5ad992(%rip), %rdx    # 0x5f7510
cmpl %eax, %edx
jge 0x49baa
leaq 0x5ad787(%rip), %rcx    # 0x5f7310
addq %rdx, %rcx
negl %eax
incl %edx
cmpb $0x20, (%rcx)
jne 0x49baa
movl %edx, 0x5ad975(%rip)    # 0x5f7510
incq %rcx
leal (%rax,%rdx), %esi
incl %esi
incl %edx
cmpl $0x1, %esi
jne 0x49b90
movl 0x5ad960(%rip), %eax    # 0x5f7510
movl %eax, %ecx
subl 0x5a130(%rip), %ecx     # 0xa3ce8
jl 0x49e17
addl %ecx, 0x5ad744(%rip)    # 0x5f7308
jmp 0x49e11
movslq 0x5ad73c(%rip), %rax    # 0x5f730c
testq %rax, %rax
jle 0x49df4
leaq 0x5ad730(%rip), %rbx    # 0x5f7310
movb $0x0, (%rax,%rbx)
leaq 0x5adb35(%rip), %rdi    # 0x5f7720
leaq 0x5ad92e(%rip), %r14    # 0x5f7520
movl $0x1e00, %edx           # imm = 0x1E00
movq %r14, %rsi
callq 0x61a0
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60c0
movl 0x5afb0b(%rip), %eax    # 0x5f9720
cmpl $0xf, %eax
jg 0x49c22
incl %eax
movl %eax, 0x5afafe(%rip)    # 0x5f9720
movl 0x5ad8ec(%rip), %eax    # 0x5f7514
cmpl $0x10, %eax
jne 0x49de2
leaq 0x2d075(%rip), %rdi     # 0x76cad
xorl %eax, %eax
callq 0x4a654
jmp 0x49dea
movslq 0x5ad8c5(%rip), %rbx    # 0x5f7510
testq %rbx, %rbx
setne %al
movl 0x5ad6b5(%rip), %ebp    # 0x5f730c
testl %ebp, %ebp
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x49e17
cmpl $0x0, 0x5ad68a(%rip)    # 0x5f72f8
jne 0x49c99
cmpl %ebx, %ebp
jle 0x49c91
leaq 0x5ad695(%rip), %rsi    # 0x5f7310
leaq (%rbx,%rsi), %rdi
decq %rdi
addq %rbx, %rsi
movl %ebp, %eax
subl %ebx, %eax
movslq %eax, %rdx
callq 0x61a0
decl %ebp
movl %ebp, 0x5ad673(%rip)    # 0x5f730c
leal -0x1(%rbx), %eax
movl %eax, 0x5ad86e(%rip)    # 0x5f7510
movl 0x5ad660(%rip), %eax    # 0x5f7308
cmpl %eax, %ebx
jg 0x49e17
decl %eax
movl %eax, 0x5ad650(%rip)    # 0x5f7308
decl 0x5a02a(%rip)           # 0xa3ce8
jmp 0x49e17
movl 0x5ad63b(%rip), %eax    # 0x5f7304
movl 0x59fb1(%rip), %ecx     # 0xa3c80
decl %ecx
cmpl %ecx, %eax
jge 0x49e17
incl %eax
jmp 0x49d8a
movslq 0x5ad829(%rip), %r14    # 0x5f7510
testq %r14, %r14
setg %al
movl 0x5ad619(%rip), %ebx    # 0x5f730c
testl %ebx, %ebx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x49e17
leal 0x1(%r14), %r15d
leaq 0x5ad602(%rip), %rsi    # 0x5f7310
movq %r14, %rax
testq %rax, %rax
jle 0x49e22
decl %r15d
cmpb $0x20, -0x1(%rax,%rsi)
leaq -0x1(%rax), %rax
je 0x49d11
jmp 0x49e25
movslq 0x5ad7dc(%rip), %rbx    # 0x5f7510
testq %rbx, %rbx
setg %al
movl 0x5ad5cc(%rip), %ebp    # 0x5f730c
testl %ebp, %ebp
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x49e17
cmpl %ebx, %ebp
jle 0x49d6b
leaq 0x5ad5b5(%rip), %rdi    # 0x5f7310
leaq (%rdi,%rbx), %rsi
movl %ebp, %eax
subl %ebx, %eax
movslq %eax, %rdx
callq 0x61a0
subl %ebx, %ebp
movl %ebp, 0x5ad599(%rip)    # 0x5f730c
xorl %eax, %eax
jmp 0x49dfc
movl 0x5ad584(%rip), %eax    # 0x5f7304
testl %eax, %eax
jle 0x49e17
decl %eax
movl %eax, 0x5ad574(%rip)    # 0x5f7304
jmp 0x49e17
movl 0x59f4d(%rip), %edx     # 0xa3ce8
cmpl %edx, %eax
jl 0x49e17
addl %eax, %ecx
subl %edx, %ecx
movl %ecx, 0x5ad55f(%rip)    # 0x5f7308
movl %eax, 0x59f39(%rip)     # 0xa3ce8
jmp 0x49e17
movl 0x5ad759(%rip), %edx    # 0x5f7510
movl %edx, %ecx
sarl $0x1f, %ecx
andl %edx, %ecx
leal 0x1(%rdx), %esi
leaq 0x5ad548(%rip), %rax    # 0x5f7310
testl %edx, %edx
jle 0x49ecc
decl %esi
cmpb $0x20, -0x1(%rdx,%rax)
leaq -0x1(%rdx), %rdx
jne 0x49dc8
jmp 0x49ece
incl %eax
movl %eax, 0x5ad72a(%rip)    # 0x5f7514
movl $0xffffffff, 0x59f0c(%rip) # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, 0x5ad510(%rip)    # 0x5f730c
movl %eax, 0x5ad70e(%rip)    # 0x5f7510
movl %eax, 0x5ad500(%rip)    # 0x5f7308
movl 0x59ece(%rip), %eax     # 0xa3cdc
addl $-0x4, %eax
movl %eax, 0x59ed1(%rip)     # 0xa3ce8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
movl %r15d, %ecx
movl %r15d, %eax
sarl $0x1f, %eax
andl %r15d, %eax
incl %r15d
testl %ecx, %ecx
jle 0x49e48
decl %r15d
cmpb $0x20, -0x1(%rcx,%rsi)
leaq -0x1(%rcx), %rcx
jne 0x49e34
jmp 0x49e4b
movl %eax, %r15d
cmpl %r14d, %ebx
jle 0x49e66
movl %r15d, %edi
addq %rsi, %rdi
addq %r14, %rsi
movl %ebx, %eax
subl %r14d, %eax
movslq %eax, %rdx
callq 0x61a0
subl %r14d, %ebx
addl %r15d, %ebx
movl %ebx, 0x5ad49a(%rip)    # 0x5f730c
movl %r15d, 0x5ad697(%rip)   # 0x5f7510
cmpl 0x5ad488(%rip), %r15d   # 0x5f7308
jge 0x49e17
movl %r15d, 0x5ad47f(%rip)   # 0x5f7308
movl 0x59e4d(%rip), %eax     # 0xa3cdc
addl %r15d, %eax
addl $-0x4, %eax
jmp 0x49e11
xorl %eax, %eax
movl %eax, 0x5ad46a(%rip)    # 0x5f730c
movl %eax, 0x5ad668(%rip)    # 0x5f7510
movl %eax, 0x5ad45a(%rip)    # 0x5f7308
movl 0x59e28(%rip), %eax     # 0xa3cdc
addl $-0x4, %eax
movl %eax, 0x59e2b(%rip)     # 0xa3ce8
movl $0xffffffff, 0x59e39(%rip) # imm = 0xFFFFFFFF
jmp 0x49e17
movl %ecx, %esi
movl 0x5ad438(%rip), %edi    # 0x5f730c
movslq %esi, %rcx
movb (%rcx,%rax), %sil
cmpb $0x20, %sil
setne %dl
cmpl %edi, %ecx
setl %r8b
andb %dl, %r8b
xorl %edx, %edx
cmpb $0x1, %r8b
jne 0x49f1c
movslq %edi, %rdi
incq %rcx
xorl %edx, %edx
leaq 0x5af61e(%rip), %r8     # 0x5f9520
movb %sil, (%rdx,%r8)
leaq (%rcx,%rdx), %r9
incq %rdx
movb (%rax,%r9), %sil
cmpb $0x20, %sil
je 0x49f1c
cmpq %rdi, %r9
jl 0x49f02
movl %edx, %eax
leaq 0x5af5fb(%rip), %rcx    # 0x5f9520
movb $0x0, (%rax,%rcx)
testl %edx, %edx
je 0x49f36
xorl %edi, %edi
callq 0x4ab3b
jmp 0x49f38
xorl %eax, %eax
testq %rax, %rax
je 0x49e17
movl 0x5ad5c9(%rip), %edi    # 0x5f7510
movl %edi, %esi
sarl $0x1f, %esi
andl %edi, %esi
leal 0x1(%rdi), %ecx
leaq 0x5ad3b8(%rip), %rdx    # 0x5f7310
testl %edi, %edi
jle 0x49f6b
decl %ecx
cmpb $0x20, -0x1(%rdi,%rdx)
leaq -0x1(%rdi), %rdi
jne 0x49f58
jmp 0x49f6d
movl %esi, %ecx
movq (%rax), %rsi
movl %ecx, 0x5ad396(%rip)    # 0x5f730c
movb (%rsi), %dil
testb %dil, %dil
je 0x49fb1
cmpl $0x1ff, %ecx            # imm = 0x1FF
jg 0x49fb1
movslq %ecx, %r8
incq %rsi
movb %dil, (%r8,%rdx)
leaq 0x1(%r8), %rcx
movl %ecx, 0x5ad372(%rip)    # 0x5f730c
movb (%rsi), %dil
testb %dil, %dil
je 0x49fb1
incq %rsi
cmpl $0x1ff, %r8d            # imm = 0x1FF
movq %rcx, %r8
jl 0x49f8c
movl %ecx, 0x5ad559(%rip)    # 0x5f7510
movl %ecx, 0x59d2b(%rip)     # 0xa3ce8
movl 0x59d19(%rip), %edx     # 0xa3cdc
addl $-0x4, %edx
subl %edx, %ecx
movl %ecx, 0x5ad33a(%rip)    # 0x5f7308
jns 0x49fe0
movl $0x0, 0x5ad32e(%rip)    # 0x5f7308
movl %edx, 0x59d08(%rip)     # 0xa3ce8
movq %rax, 0x5ad309(%rip)    # 0x5f72f0
jmp 0x49e17