// File: /workspace/github_c_makefile_star2_O0/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: processInfoWithStage
void processInfoWithStage(FILE *f, stageinfo info, tocStageEntry stage, unsigned int flags) {
	FILE *o = NULL;
	char outputname[64] = {0};
	char *foldername = NULL, *filename = NULL;
	uint32_t folderhash = 0;
	uint32_t name = 0, extension = 0, offset = 0, size = 0;
	fileinfoverybig *verybigfiles = NULL;
	fileinfobig *bigfiles = NULL;
	fileinfosmall *smallfiles = NULL;
	fileinfo *files = NULL;
	
	unsigned int i, j, dataoffset = stage.offset*0x800, unpackedoffset, toread, numentries;
	long unsigned int towrite;
	
	if(info.size%0x800) dataoffset += info.size + (0x800-(info.size%0x800));
	else dataoffset += info.size;
	
	/* the trial requires a shift in offsets */
	unpackedoffset = (flags & TRIALSTAGE) ? (dataoffset-0x800) : dataoffset;
	
	if(flags & IS_VERYBIGENTRY) {
		verybigfiles = (fileinfoverybig *)info.data;
		numentries = (info.size-4)/16;
		files = malloc(sizeof(fileinfo)*numentries);
		for(i = 0; i < numentries; i++) {
			files[i].hash = bswap_32(verybigfiles[i].hash);
			files[i].extension = bswap_32(verybigfiles[i].hash);
			files[i].compressed = bswap_32(verybigfiles[i].compressed);
			files[i].offset = bswap_32(verybigfiles[i].offset);
		}
	}
	
	else if(flags & IS_BIGENTRY) {
		bigfiles = (fileinfobig *)info.data;
		numentries = (info.size-4)/12;
		files = malloc(sizeof(fileinfo)*numentries);
		for(i = 0; i < numentries; i++) {
			files[i].hash = bigfiles[i].hash;
			files[i].extension = bigfiles[i].extension;
			files[i].offset = bigfiles[i].offset;
		}
	}
			
	else {
		smallfiles = (fileinfosmall *)info.data;
		numentries = (info.size-4)/8;
		files = malloc(sizeof(fileinfo)*numentries);
		if(flags & IS_BIGENDIAN) {
			for(i = 0; i < numentries; i++) {
				files[i].hash = bswap_32(smallfiles[i].hash);
				files[i].extension = bswap_32(smallfiles[i].hash);
				files[i].offset = bswap_32(smallfiles[i].offset);
			}
		}
		else {
			for(i = 0; i < numentries; i++) {
				files[i].hash = smallfiles[i].hash;
				files[i].extension = smallfiles[i].hash;
				files[i].offset = smallfiles[i].offset;
			}
		}
	}
	
	unsigned char *comdata = NULL, *uncomdata = NULL;
	uint32_t *comvalues = NULL;
	
	snprintf(outputname, 64, "%s.hdr", stage.name);
	o = fopen(outputname, "wb");
	fwrite(info.data, info.size-4, 1, o);
	fclose(o);
	
	printf("%s: ", stage.name);
	
	i = 0;
	
	while((files[i].extension && files[i].offset) || ((flags & IS_VERYBIGENTRY) && files[i].extension)) {
		
		folderhash = files[i].extension;
		foldername = getFolderNameFromHash(folderhash, flags);
		
		if(!(flags & GAME_TTS) && ((files[i].extension == 0x7F000010) || (files[i].extension == 0x7F000005) || (files[i].extension == 0x7F000004))) {
			//~ printf("extracting plain...");
			if(flags & IS_VERYBIGENTRY) {
				uncomdata = malloc(files[i+1].offset);
				towrite = files[i+1].offset;
				snprintf(outputname, 64, "%s/%s", stage.name, foldername);
				createDirectory(outputname);
			}
			else {
				uncomdata = malloc(files[i].offset);
				towrite = files[i].offset;
				snprintf(outputname, 64, "%s/", stage.name);
				createDirectory(outputname);
			}
			
			i++;
			
			/* in unencrypted and trial files, this seems to be a thing */
			if(!(flags & ENCRYPTED) && !(flags & GAME_TTS)) unpackedoffset += 0x800;
			
			fseek(f, unpackedoffset, SEEK_SET);
			fread(uncomdata, towrite, 1, f);
			while(files[i].extension != 0x7F000000) {
				if(flags & IS_BIGENTRY) name = files[i].extension;
				else name = files[i].hash & 0x00FFFFFF;
				if(flags & IS_VERYBIGENTRY) {
					extension = files[i].hash >> 24;
					offset = files[i+1].offset;
					size = files[i+2].offset - files[i+1].offset;
					filename = getFileNameFromHashes(name, extension, flags);
				}
				else {
					offset = files[i].offset;
					size = files[i+1].offset - files[i].offset;
				}
				
				if(flags & IS_VERYBIGENTRY) snprintf(outputname, 64, "%s/%s/%s", stage.name, foldername, filename);
				else if(flags & GAME_MGS3) snprintf(outputname, 64, "%s/%05x.psq", stage.name, name);
				else snprintf(outputname, 64, "%s/pk%06x.sdx", stage.name, name);
				if( !(o = fopen( outputname, "wb" ))) {
					printf("Couldnt open file %s\n", outputname);
					return;
				}
				fwrite(uncomdata+offset, size, 1, o);
				fclose(o);
				i++;
				if(filename) {
					free(filename);
					filename = NULL;
				}
			}
			free(uncomdata);
			uncomdata = NULL;
			if(flags & IS_VERYBIGENTRY) unpackedoffset += files[i+1].offset;
			else unpackedoffset += files[i].offset;
			if(unpackedoffset%0x800) unpackedoffset += 0x800-(unpackedoffset%0x800);
		}
		else {
			snprintf(outputname, 64, "%s/%s", stage.name, foldername);
			createDirectory(outputname);
			
			if(flags & COMPRESSED) {
				if(flags & IS_VERYBIGENTRY) {
					fseek(f, unpackedoffset, SEEK_SET);
					
					i++;
					uncomdata = malloc(files[i].offset);
					towrite = files[i].offset;
					if(files[i].compressed%4) toread = files[i].compressed + (4-(files[i].compressed%4));
					else toread = files[i].compressed;
				}
				else {
					uncomdata = malloc(files[i].offset);
					towrite = files[i].offset;
					i++;
					if((files[i].extension&0x00FFFFFF)%4) toread = (files[i].extension&0x00FFFFFF) + (4-((files[i].extension&0x00FFFFFF)%4));
					else toread = (files[i].extension&0x00FFFFFF);
					fseek(f, dataoffset+files[i].offset, SEEK_SET);
				}
				
				comdata = malloc(toread);
				
				comvalues = (uint32_t *)comdata;
				fread(comdata, toread, 1, f);
				
				if(flags & ENCRYPTED) {
					//~ printf("decrypting...");
					key5 = comvalues[0] & 0x0000FFFF;
					decryptContent(comdata, toread/4);
					
					j = comvalues[0] & 0x0000FFFF;
					j += 0x8F3;
					comvalues[0] = (comvalues[0] & 0xFFFF0000) | (j & 0x0000FFFF);
				}
				//~ printf("decompressing...");
				if((j = uncompress(uncomdata, &towrite, comdata, toread)) != Z_OK) {
					printf("\n=====================================couldnt decompress data :");
					switch(j) {
						case Z_MEM_ERROR: {
							printf("memory error\n");
							break;
						}
						case Z_NEED_DICT: {
							printf("need dictionary\n");
							break;
						}
						case Z_DATA_ERROR: {
							printf("input corrupted\n");
							//~ printf("%s\n", strm.msg);
							break;
						}
						case Z_STREAM_ERROR: {
							printf("broken stream\n");
							break;
						}
						case Z_BUF_ERROR: {
							printf("buffer error\n");
							break;
						}
						default: {
							printf("unknown error\n");
							break;
						}
					}
					printf("\ntowrite %08lx\n", towrite);
					return;
				}
				i++;
			}
			else {
				uncomdata = malloc(files[i].offset);
				towrite = files[i].offset;
				fseek(f, unpackedoffset, SEEK_SET);
				fread(uncomdata, towrite, 1, f);
				i++;
			}
			
			//~ printf("extracting decompressed...");
			
			while(files[i].extension != 0x7F000000) {
				if(flags & IS_BIGENTRY) {
					name = files[i].hash;
					extension = files[i].extension;
				}
				else {
					name = files[i].hash & 0x00FFFFFF;
					extension = files[i].hash >> 24;
				}
				
				if(extension == 0x7D) { // slot file
					//~ printf("hash %08x - extension %08x - offset %08x - compressed %08x\n", files[i].hash, files[i].extension, files[i].offset, files[i].compressed);
		//~ printf("%s - i %d\n", stage.name, i);
					//~ printf("encountered subdir\n");
					//~ subdirhash = name;
					// name.slot
					
					filename = getFileNameFromHashes(name, extension, flags);
					
					snprintf(outputname, 64, "%s/%s/%s.txt", stage.name, foldername, filename);
					
					//~ offset = files[i].offset;
					//~ snprintf(outputname, 64, "%s/%s/%06x/", stage.name, foldername, subdirhash);
					//~ createDirectory(outputname);
					//~ snprintf(outputname, 64, "%s/%s/%06x.%02x", stage.name, foldername, name, extension);
					i++;
					// blank
					//~ printf("hash %08x - extension %08x - offset %08x - compressed %08x\n", files[i].hash, files[i].extension, files[i].offset, files[i].compressed);
		//~ printf("%s - i %d\n", stage.name, i);
					/*subdiritems = files[i].offset >> 24;
					subdirsize = files[i].offset & 0x00FFFFFF;*/
					//~ printf("Subdir found: size %06x - items %02x (%d)\n\t%s\n", subdirsize, subdiritems, subdiritems, outputname);
					i++;
					// has group and offset in offset
					//~ printf("hash %08x - extension %08x - offset %08x - compressed %08x\n", files[i].hash, files[i].extension, files[i].offset, files[i].compressed);
					
					
					if(flags & IS_BIGENTRY) {
						printf("!!!UNDEFINED!!!\n");
						//~ name = files[i].hash;
						//~ extension = files[i].extension;
					}
					else {
						offset = files[i].offset & 0x00FFFFFF;
						size = files[i].offset >> 24;
					}
					
					
					if( !(o = fopen( outputname, "wb" ))) {
						printf("Couldnt open file %s\n", outputname);
						return;
					}
					
					fprintf(o, "Info for SLOT file:\nGroupno: %d\nOffset (sectors): 0x%06X\nOffset (bytes): 0x%08X", size, offset, offset*0x800);
					fclose(o);
					
					free(filename);
					filename = NULL;
					i++;
					continue;
				}
				
				if(flags & IS_VERYBIGENTRY) {
					/* this looks like an off by one, gz konani */
					offset = files[i+1].offset;
					size = files[i+2].offset - files[i+1].offset;
				}
				else {
					offset = files[i].offset;
					size = files[i+1].offset - files[i].offset;
				}
				fflush(stdout);
				filename = getFileNameFromHashes(name, extension, flags);
				snprintf(outputname, 64, "%s/%s/%s", stage.name, foldername, filename);
				
				if( !(o = fopen( outputname, "wb" ))) {
					printf("Couldnt open file %s\n", outputname);
					return;
				}
				fwrite(uncomdata+offset, size, 1, o);
				fclose(o);
				free(filename);
				filename = NULL;
				i++;
			}
			if(comdata) free(comdata);
			comdata = NULL;
			comvalues = NULL;
			free(uncomdata);
			uncomdata = NULL;
			if(flags & ENCRYPTED) unpackedoffset += toread;
			else unpackedoffset += towrite;
			if(unpackedoffset%0x800) unpackedoffset += 0x800-(unpackedoffset%0x800);
		}
		free(foldername);
		i++;
	}
	printf("done\n");
	free(files);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movl %esi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x5100
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movl $0x0, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
movl -0x18(%rbp), %eax
shll $0xb, %eax
movl %eax, -0xd4(%rbp)
movl -0x10(%rbp), %eax
andl $0x7ff, %eax            # imm = 0x7FF
cmpl $0x0, %eax
je 0x665a
movl -0x10(%rbp), %eax
movl -0x10(%rbp), %edx
andl $0x7ff, %edx            # imm = 0x7FF
movl $0x800, %ecx            # imm = 0x800
subl %edx, %ecx
addl %ecx, %eax
addl -0xd4(%rbp), %eax
movl %eax, -0xd4(%rbp)
jmp 0x6669
movl -0x10(%rbp), %eax
addl -0xd4(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0x2c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6687
movl -0xd4(%rbp), %eax
subl $0x800, %eax            # imm = 0x800
movl %eax, -0x104(%rbp)
jmp 0x6693
movl -0xd4(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x67e7
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x10(%rbp), %eax
subl $0x4, %eax
shrl $0x4, %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x5160
movq %rax, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0xe0(%rbp), %eax
jae 0x67e2
movq -0xb0(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0xb0(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0xb0(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0xb0(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x66ea
jmp 0x6a96
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x68eb
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x10(%rbp), %eax
subl $0x4, %eax
movl $0xc, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x5160
movq %rax, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0xe0(%rbp), %eax
jae 0x68e6
movq -0xb8(%rbp), %rax
movl -0xcc(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0xb8(%rbp), %rax
movl -0xcc(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0xb8(%rbp), %rax
movl -0xcc(%rbp), %ecx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x6838
jmp 0x6a94
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x10(%rbp), %eax
subl $0x4, %eax
shrl $0x3, %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %edi
shlq $0x4, %rdi
callq 0x5160
movq %rax, -0xc8(%rbp)
movl -0x2c(%rbp), %eax
andl $0x14, %eax
cmpl $0x0, %eax
je 0x69eb
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0xe0(%rbp), %eax
jae 0x69e6
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl (%rax,%rcx,8), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl (%rax,%rcx,8), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %edi
callq 0x6530
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x6936
jmp 0x6a92
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
cmpl -0xe0(%rbp), %eax
jae 0x6a90
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl (%rax,%rcx,8), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl (%rax,%rcx,8), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0xc0(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl 0x4(%rax,%rcx,8), %ecx
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x69f5
jmp 0x6a92
jmp 0x6a94
jmp 0x6a96
movq $0x0, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
movq $0x0, -0x100(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x40, %esi
leaq 0x2b75(%rip), %rdx      # 0x9640
movb $0x0, %al
callq 0x50e0
leaq -0x80(%rbp), %rdi
leaq 0x2b6a(%rip), %rsi      # 0x9647
callq 0x51b0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
subl $0x4, %eax
movl %eax, %eax
movl %eax, %esi
movq -0x38(%rbp), %rcx
movl $0x1, %edx
callq 0x5220
movq -0x38(%rbp), %rdi
callq 0x5090
movq -0x20(%rbp), %rsi
leaq 0x2b34(%rip), %rdi      # 0x964a
movb $0x0, %al
callq 0x50c0
movl $0x0, -0xcc(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
je 0x6b63
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
movb $0x1, %al
cmpl $0x0, 0x8(%rcx)
movb %al, -0x105(%rbp)
jne 0x6ba3
movl -0x2c(%rbp), %ecx
andl $0x4, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x106(%rbp)
je 0x6b97
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
setne %al
movb %al, -0x106(%rbp)
movb -0x106(%rbp), %al
movb %al, -0x105(%rbp)
movb -0x105(%rbp), %al
testb $0x1, %al
jne 0x6bb2
jmp 0x79ca
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x5c00
movq %rax, -0x88(%rbp)
movl -0x2c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x70d9
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x7f000010, 0x4(%rax)  # imm = 0x7F000010
je 0x6c4e
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x7f000005, 0x4(%rax)  # imm = 0x7F000005
je 0x6c4e
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x7f000004, 0x4(%rax)  # imm = 0x7F000004
jne 0x70d9
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6cd8
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %r8
movl $0x40, %esi
leaq 0x2995(%rip), %rdx      # 0x9656
movb $0x0, %al
callq 0x50e0
leaq -0x80(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x5070
jmp 0x6d44
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x40, %esi
leaq 0x2920(%rip), %rdx      # 0x964f
movb $0x0, %al
callq 0x50e0
leaq -0x80(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x5070
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movl -0x2c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x6d7c
movl -0x2c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x6d7c
movl -0xd8(%rbp), %eax
addl $0x800, %eax            # imm = 0x800
movl %eax, -0xd8(%rbp)
movq -0x28(%rbp), %rdi
movl -0xd8(%rbp), %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5190
movq -0xf8(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x5080
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x7f000000, 0x4(%rax)  # imm = 0x7F000000
je 0x7036
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6df6
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x98(%rbp)
jmp 0x6e17
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x98(%rbp)
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6ec2
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x18, %eax
movl %eax, -0x9c(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rcx
subl 0x8(%rcx), %eax
movl %eax, -0xa4(%rbp)
movl -0x98(%rbp), %edi
movl -0x9c(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x5d70
movq %rax, -0x90(%rbp)
jmp 0x6f18
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
subl 0x8(%rcx), %eax
movl %eax, -0xa4(%rbp)
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6f4e
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x90(%rbp), %r9
movl $0x40, %esi
leaq 0x270e(%rip), %rdx      # 0x9653
movb $0x0, %al
callq 0x50e0
jmp 0x6fa1
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x6f7d
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl -0x98(%rbp), %r8d
movl $0x40, %esi
leaq 0x26e8(%rip), %rdx      # 0x965c
movb $0x0, %al
callq 0x50e0
jmp 0x6f9f
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl -0x98(%rbp), %r8d
movl $0x40, %esi
leaq 0x26d0(%rip), %rdx      # 0x9668
movb $0x0, %al
callq 0x50e0
jmp 0x6fa1
leaq -0x80(%rbp), %rdi
leaq 0x269b(%rip), %rsi      # 0x9647
callq 0x51b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x6fd2
leaq -0x80(%rbp), %rsi
leaq 0x26b0(%rip), %rdi      # 0x9676
movb $0x0, %al
callq 0x50c0
jmp 0x79e4
movq -0xf8(%rbp), %rdi
movl -0xa0(%rbp), %eax
addq %rax, %rdi
movl -0xa4(%rbp), %eax
movl %eax, %esi
movq -0x38(%rbp), %rcx
movl $0x1, %edx
callq 0x5220
movq -0x38(%rbp), %rdi
callq 0x5090
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x7031
movq -0x90(%rbp), %rdi
callq 0x5030
movq $0x0, -0x90(%rbp)
jmp 0x6dab
movq -0xf8(%rbp), %rdi
callq 0x5030
movq $0x0, -0xf8(%rbp)
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7082
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0x70a5
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
andl $0x7ff, %eax            # imm = 0x7FF
cmpl $0x0, %eax
je 0x70d4
movl -0xd8(%rbp), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
movl $0x800, %eax            # imm = 0x800
subl %ecx, %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0x79aa
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %r8
movl $0x40, %esi
leaq 0x2562(%rip), %rdx      # 0x9656
movb $0x0, %al
callq 0x50e0
leaq -0x80(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x5070
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x74da
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7211
movq -0x28(%rbp), %rdi
movl -0xd8(%rbp), %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5190
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x71ef
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %edx
andl $0x3, %edx
movl $0x4, %ecx
subl %edx, %ecx
addl %ecx, %eax
movl %eax, -0xdc(%rbp)
jmp 0x720c
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0xdc(%rbp)
jmp 0x7322
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
andl $0x3, %eax
cmpl $0x0, %eax
je 0x72d4
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
andl $0x3, %edx
movl $0x4, %ecx
subl %edx, %ecx
addl %ecx, %eax
movl %eax, -0xdc(%rbp)
jmp 0x72f6
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0xdc(%rbp)
movq -0x28(%rbp), %rdi
movl -0xd4(%rbp), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
addl 0x8(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5190
movl -0xdc(%rbp), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf0(%rbp), %rdi
movl -0xdc(%rbp), %eax
movl %eax, %esi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x5080
movl -0x2c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x73e1
movq -0x100(%rbp), %rax
movl (%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x4dba(%rip)      # 0xc13c
movq -0xf0(%rbp), %rdi
movl -0xdc(%rbp), %esi
shrl $0x2, %esi
callq 0x6090
movq -0x100(%rbp), %rax
movl (%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
addl $0x8f3, %eax            # imm = 0x8F3
movl %eax, -0xd0(%rbp)
movq -0x100(%rbp), %rax
movl (%rax), %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
movl -0xd0(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
orl %eax, %ecx
movq -0x100(%rbp), %rax
movl %ecx, (%rax)
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rdx
movl -0xdc(%rbp), %eax
movl %eax, %ecx
leaq -0xe8(%rbp), %rsi
callq 0x50a0
movl %eax, -0xd0(%rbp)
cmpl $0x0, %eax
je 0x74c6
leaq 0x2273(%rip), %rdi      # 0x968c
xorl %eax, %eax
callq 0x50c0
movl -0xd0(%rbp), %eax
addl $0x5, %eax
movl %eax, %ecx
movq %rcx, -0x110(%rbp)
subl $0x7, %eax
ja 0x749e
movq -0x110(%rbp), %rax
leaq 0x1c7b(%rip), %rcx      # 0x90c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2277(%rip), %rdi      # 0x96cc
movb $0x0, %al
callq 0x50c0
jmp 0x74ac
leaq 0x2275(%rip), %rdi      # 0x96da
movb $0x0, %al
callq 0x50c0
jmp 0x74ac
leaq 0x2276(%rip), %rdi      # 0x96eb
movb $0x0, %al
callq 0x50c0
jmp 0x74ac
leaq 0x2277(%rip), %rdi      # 0x96fc
movb $0x0, %al
callq 0x50c0
jmp 0x74ac
leaq 0x2276(%rip), %rdi      # 0x970b
movb $0x0, %al
callq 0x50c0
jmp 0x74ac
leaq 0x2274(%rip), %rdi      # 0x9719
movb $0x0, %al
callq 0x50c0
movq -0xe8(%rbp), %rsi
leaq 0x226e(%rip), %rdi      # 0x9728
movb $0x0, %al
callq 0x50c0
jmp 0x79e4
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x755b
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x5160
movq %rax, -0xf8(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0xe8(%rbp)
movq -0x28(%rbp), %rdi
movl -0xd8(%rbp), %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5190
movq -0xf8(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x5080
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x755d
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x7f000000, 0x4(%rax)  # imm = 0x7F000000
je 0x78ff
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x75c4
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x98(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x9c(%rbp)
jmp 0x7604
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x98(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x18, %eax
movl %eax, -0x9c(%rbp)
cmpl $0x7d, -0x9c(%rbp)
jne 0x775e
movl -0x98(%rbp), %edi
movl -0x9c(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x5d70
movq %rax, -0x90(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x90(%rbp), %r9
movl $0x40, %esi
leaq 0x20ea(%rip), %rdx      # 0x9738
movb $0x0, %al
callq 0x50e0
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
movl -0x2c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x768e
leaq 0x20c0(%rip), %rdi      # 0x9745
movb $0x0, %al
callq 0x50c0
jmp 0x76d0
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
shrl $0x18, %eax
movl %eax, -0xa4(%rbp)
leaq -0x80(%rbp), %rdi
leaq 0x1f6c(%rip), %rsi      # 0x9647
callq 0x51b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x7701
leaq -0x80(%rbp), %rsi
leaq 0x1f81(%rip), %rdi      # 0x9676
movb $0x0, %al
callq 0x50c0
jmp 0x79e4
movq -0x38(%rbp), %rdi
movl -0xa4(%rbp), %edx
movl -0xa0(%rbp), %ecx
movl -0xa0(%rbp), %r8d
shll $0xb, %r8d
leaq 0x2033(%rip), %rsi      # 0x9756
movb $0x0, %al
callq 0x5140
movq -0x38(%rbp), %rdi
callq 0x5090
movq -0x90(%rbp), %rdi
callq 0x5030
movq $0x0, -0x90(%rbp)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x755d
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x77cb
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rcx
subl 0x8(%rcx), %eax
movl %eax, -0xa4(%rbp)
jmp 0x7821
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0xc8(%rbp), %rcx
movl -0xcc(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
subl 0x8(%rcx), %eax
movl %eax, -0xa4(%rbp)
movq 0x47b8(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
callq 0x5170
movl -0x98(%rbp), %edi
movl -0x9c(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x5d70
movq %rax, -0x90(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x90(%rbp), %r9
movl $0x40, %esi
leaq 0x1de6(%rip), %rdx      # 0x9653
movb $0x0, %al
callq 0x50e0
leaq -0x80(%rbp), %rdi
leaq 0x1dc8(%rip), %rsi      # 0x9647
callq 0x51b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x78a5
leaq -0x80(%rbp), %rsi
leaq 0x1ddd(%rip), %rdi      # 0x9676
movb $0x0, %al
callq 0x50c0
jmp 0x79e4
movq -0xf8(%rbp), %rdi
movl -0xa0(%rbp), %eax
addq %rax, %rdi
movl -0xa4(%rbp), %eax
movl %eax, %esi
movq -0x38(%rbp), %rcx
movl $0x1, %edx
callq 0x5220
movq -0x38(%rbp), %rdi
callq 0x5090
movq -0x90(%rbp), %rdi
callq 0x5030
movq $0x0, -0x90(%rbp)
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x755d
cmpq $0x0, -0xf0(%rbp)
je 0x7915
movq -0xf0(%rbp), %rdi
callq 0x5030
movq $0x0, -0xf0(%rbp)
movq $0x0, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x5030
movq $0x0, -0xf8(%rbp)
movl -0x2c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7963
movl -0xdc(%rbp), %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0x7979
movq -0xe8(%rbp), %rcx
movl -0xd8(%rbp), %eax
addq %rcx, %rax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
andl $0x7ff, %eax            # imm = 0x7FF
cmpl $0x0, %eax
je 0x79a8
movl -0xd8(%rbp), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
movl $0x800, %eax            # imm = 0x800
subl %ecx, %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0x79aa
movq -0x88(%rbp), %rdi
callq 0x5030
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x6b27
leaq 0x1dd5(%rip), %rdi      # 0x97a6
movb $0x0, %al
callq 0x50c0
movq -0xc8(%rbp), %rdi
callq 0x5030
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)