// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/c4_swfdump.c
// Function: main
int main(int argc,char **argv) {
	swf_reader *swf;
	swf_tag tag;
	int fd;

	if (argc < 2) {
		fprintf(stderr,"c4_swfdump <file>\n");
		return 1;
	}

	fd = open(argv[1],O_RDONLY);
	if (fd < 0) {
		fprintf(stderr,"Unable to open file %s\n",argv[1]);
		return 1;
	}
	if ((swf=swf_reader_create()) == NULL) {
		fprintf(stderr,"Cannot create SWF reader\n");
		return 1;
	}
	if (swf_reader_assign_fd(swf,fd)) {
		fprintf(stderr,"Cannot assign fd\n");
		return 1;
	}
	swf_reader_assign_fd_ownership(swf);
	if (swf_reader_get_file_header(swf)) {
		fprintf(stderr,"Unable to read file header.\n");
		return 1;
	}

	printf("SWF version %u (%c%c%c), file length %lu\n",
		swf->header.Version,
		swf->header.Signature[0],
		swf->header.Signature[1],
		swf->header.Signature[2],
		(unsigned long)swf->header.FileLength);
	printf("   FrameSize: Nbits=%u (%.3f,%.3f)-(%.3f,%.3f) or in twips (%u,%u)-(%u,%u)\n",
		swf->header.FrameSize.Nbits,
		(double)swf->header.FrameSize.Xmin / SWF_TWIPS_PER_PIXEL,
		(double)swf->header.FrameSize.Ymin / SWF_TWIPS_PER_PIXEL,
		(double)swf->header.FrameSize.Xmax / SWF_TWIPS_PER_PIXEL,
		(double)swf->header.FrameSize.Ymax / SWF_TWIPS_PER_PIXEL,
		swf->header.FrameSize.Xmin,
		swf->header.FrameSize.Ymin,
		swf->header.FrameSize.Xmax,
		swf->header.FrameSize.Ymax);
	printf("   Frame rate: %.3f    Frame count: %lu\n",
		(double)swf->header.FrameRate / 256,
		(unsigned long)swf->header.FrameCount);
	printf("   Header ends at offset %llu\n",
		(unsigned long long)swf->header_end);

	while (swf_reader_read_record(swf,&tag)) {
		printf("Tag %u (%s), length %lu at %llu (data %llu)\n",(unsigned int)tag.record.TagCode,
			swf_TagCode_to_str(tag.record.TagCode),
			(unsigned long)tag.record.Length,
			(unsigned long long)tag.absolute_tag_offset,
			(unsigned long long)tag.absolute_offset);

		/* set read stop, so we can read the bitfields */
		swf->read_stop = swf->next_tag;

		switch (tag.record.TagCode) {
			case swftag_SetBackgroundColor: {
				swf_RGB BackgroundColor;

				swf_reader_read_RGB(swf,&BackgroundColor);
				printf("    BackgroundColor:      ");
				dump_RGB(&BackgroundColor);
				printf("\n");
				dump_tag_raw_remainder(swf);
				} break;
			case swftag_DefineShape:
			case swftag_DefineShape2:
			case swftag_DefineShape3: {
				swf_DefineShape nfo;

				if (swf_reader_read_DefineShape_header(swf,&nfo) == 0) {
					printf("    ShapeId:              %u\n",nfo.ShapeId);
					printf("    ShapeBounds:          (%.3f,%.3f)-(%.3f,%.3f) or (%d,%d)-(%d,%d) twips\n",
						(double)nfo.ShapeBounds.Xmin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Ymin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Xmax / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Ymax / SWF_TWIPS_PER_PIXEL,

						nfo.ShapeBounds.Xmin,
						nfo.ShapeBounds.Ymin,
						nfo.ShapeBounds.Xmax,
						nfo.ShapeBounds.Ymax);

					/* SHAPEWITHSTYLE follows, which means we read a FILLSTYLEARRAY followed by
					 * a LINESTYLEARRAY, followed by a normal SHAPE definition */
					if (dump_FILLSTYLEARRAY(swf,tag.record.TagCode) == 0) {
						if (dump_LINESTYLEARRAY(swf,tag.record.TagCode) == 0) {
							dump_SHAPE(swf,0,tag.record.TagCode);
						}
					}
				}

				dump_tag_raw_remainder(swf);
				} break;
			case swftag_PlaceObject: {
				swf_PlaceObject nfo;

				if (swf_reader_read_PlaceObject(swf,&nfo) == 0) {
					printf("    CharacterId:          %u\n",nfo.CharacterId);
					printf("    Depth:                %u\n",nfo.Depth);
					printf("    Matrix:               ");
					dump_MATRIX(&nfo.Matrix);
					printf("\n");
					/* TODO: CXFORM */
				}
				} break;
			case swftag_RemoveObject: {
				swf_RemoveObject nfo;

				if (swf_reader_read_RemoveObject(swf,&nfo) == 0) {
					printf("    CharacterId:          %u\n",nfo.CharacterId);
					printf("    Depth:                %u\n",nfo.Depth);
				}
				} break;
			case swftag_DefineShape4: {
				swf_DefineShape nfo;

				if (swf_reader_read_DefineShape4_header(swf,&nfo) == 0) {
					printf("    ShapeId:              %u\n",nfo.ShapeId);
					printf("    ShapeBounds:          (%.3f,%.3f)-(%.3f,%.3f) or (%d,%d)-(%d,%d) twips\n",
						(double)nfo.ShapeBounds.Xmin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Ymin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Xmax / SWF_TWIPS_PER_PIXEL,
						(double)nfo.ShapeBounds.Ymax / SWF_TWIPS_PER_PIXEL,

						nfo.ShapeBounds.Xmin,
						nfo.ShapeBounds.Ymin,
						nfo.ShapeBounds.Xmax,
						nfo.ShapeBounds.Ymax);
					printf("    EdgeBounds:           (%.3f,%.3f)-(%.3f,%.3f) or (%d,%d)-(%d,%d) twips\n",
						(double)nfo.EdgeBounds.Xmin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.EdgeBounds.Ymin / SWF_TWIPS_PER_PIXEL,
						(double)nfo.EdgeBounds.Xmax / SWF_TWIPS_PER_PIXEL,
						(double)nfo.EdgeBounds.Ymax / SWF_TWIPS_PER_PIXEL,

						nfo.EdgeBounds.Xmin,
						nfo.EdgeBounds.Ymin,
						nfo.EdgeBounds.Xmax,
						nfo.EdgeBounds.Ymax);
					printf("    UsesFillWindingRule:  %u\n",
						nfo.UsesFillWindingRule);
					printf("    UsesNonScalingStrokes:%u\n",
						nfo.UsesNonScalingStrokes);
					printf("    UsesScalingStrokes:   %u\n",
						nfo.UsesScalingStrokes);

					/* SHAPEWITHSTYLE follows, which means we read a FILLSTYLEARRAY followed by
					 * a LINESTYLEARRAY, followed by a normal SHAPE definition */
					if (dump_FILLSTYLEARRAY(swf,tag.record.TagCode) == 0) {
						if (dump_LINESTYLEARRAY(swf,tag.record.TagCode) == 0) {
							dump_SHAPE(swf,0,tag.record.TagCode);
						}
					}
				}

				dump_tag_raw_remainder(swf);
				} break;
			case swftag_DefineSound: {
				swf_DefineSound nfo;

				if (swf_reader_read_DefineSound(swf,&nfo) == 0) {
					printf("    SoundId:              %u\n",nfo.SoundId);
					printf("    SoundFormat:          %u (%s)\n",nfo.SoundFormat,nfo.SoundFormat_str);
					printf("    SoundRate:            %u (%uHz)\n",nfo.SoundRate,nfo.SoundRate_value);
					printf("    SoundSize:            %u (%u bits)\n",nfo.SoundSize,nfo.SoundSize_value);
					printf("    SoundType:            %u (%u channels)\n",nfo.SoundType,nfo.SoundType_value);
					printf("    SoundSampleCount:     %u\n",nfo.SoundSampleCount);

					if (nfo.SoundFormat == 2/*MP3*/) {
						swf_UI16 t16;

						t16 = swf_reader_read_UI16(swf);
						printf("    SampleCount [MP3]:    %u\n",t16);
					}
				}

				dump_tag_raw_remainder(swf);
				} break;
			case swftag_DefineFont: {
				swf_DefineFont nfo;

				swf_DefineFont_init(&nfo);
				if (swf_reader_read_DefineFont_step1(swf,&nfo) == 0) {
					printf("    FontID:               %u\n",nfo.FontID);
					printf("    nGlyphs:              %u\n",nfo.nGlyphs);
				}
				if (nfo.nGlyphs != 0 && swf_reader_read_DefineFont_alloc_OffsetTable(&nfo) == 0 &&
					swf_reader_read_DefineFont_read_OffsetTable(swf,&nfo) == 0) {
					unsigned int i;
					uint64_t ofs;

					printf("    OffsetTable:\n");
					for (i=0;i < nfo.nGlyphs;i++) {
						ofs = (unsigned long long)nfo.absoluteOffsetTable + (unsigned long long)nfo.OffsetTable[i];
						printf("        %u from start of OffsetTable (%u into GlyphShapeTable or %llu)\n",
							(unsigned int)nfo.OffsetTable[i],
							(unsigned int)(nfo.OffsetTable[i] - nfo._OffsetTableEntry0),
							(unsigned long long)ofs);
					}

					for (i=0;i < nfo.nGlyphs;i++) {
						ofs = (unsigned long long)nfo.absoluteOffsetTable + (unsigned long long)nfo.OffsetTable[i];
						if (swf_reader_seek(swf,ofs) == 0)
							dump_SHAPE(swf,i,tag.record.TagCode);
						else
							fprintf(stderr,"!! Unable to seek to offset (likely reason: non-sequential offsets)\n");
					}
				}

				swf_DefineFont_free(&nfo);
				dump_tag_raw_remainder(swf);
				} break;
			case swftag_SoundStreamHead:
			case swftag_SoundStreamHead2: {
				swf_SoundStreamHead nfo;

				if (swf_reader_read_SoundStreamHead(swf,&nfo) == 0) {
					printf("    PlaybackSoundRate:    %u (%uHz)\n",nfo.PlaybackSoundRate,nfo.PlaybackSoundRate_value);
					printf("    PlaybackSoundSize:    %u (%u bits)\n",nfo.PlaybackSoundSize,nfo.PlaybackSoundSize_value);
					printf("    PlaybackSoundType:    %u (%u channels)\n",nfo.PlaybackSoundType,nfo.PlaybackSoundType_value);
					printf("    StreamSoundCompression: %u (%s)\n",nfo.StreamSoundCompression,nfo.StreamSoundCompression_str);
					printf("    StreamSoundRate:      %u (%uHz)\n",nfo.StreamSoundRate,nfo.StreamSoundRate_value);
					printf("    StreamSoundSize:      %u (%u bits)\n",nfo.StreamSoundSize,nfo.StreamSoundSize_value);
					printf("    StreamSoundType:      %u (%u channels)\n",nfo.StreamSoundType,nfo.StreamSoundType_value);
					printf("    StreamSoundSampleCount: %u\n",nfo.StreamSoundSampleCount);
					if (nfo.LatencySeek_present)
						printf("    LatencySeek:          %u\n",nfo.LatencySeek);
				}

				dump_tag_raw_remainder(swf);
				} break;
			case swftag_FileAttributes: {
				swf_FileAttributes nfo;

				if (swf_reader_read_FileAttributes(swf,&nfo) == 0) {
					printf("    UseDirectBlit:        %u\n",nfo.UseDirectBlit);
					printf("    UseGPU:               %u\n",nfo.UseGPU);
					printf("    HasMetadata:          %u\n",nfo.HasMetadata);
					printf("    ActionScript3:        %u\n",nfo.ActionScript3);
					printf("    UseNetwork:           %u\n",nfo.UseNetwork);
				}

				dump_tag_raw_remainder(swf);
				} break;
			case swftag_Metadata:
				dump_tag_raw_text(swf);
				break;
			default:
				dump_tag_raw(swf,&tag);
				break;
		}

		/* clear read stop */
		swf->read_stop = 0;
	}

	swf = swf_reader_destroy(swf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x12b3
movq 0xad62(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x6fe0(%rip), %rsi      # 0x8280
movb $0x0, %al
callq 0x10c0
movl $0x1, -0x4(%rbp)
jmp 0x1d99
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x1150
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x12f9
movq 0xad24(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x6fad(%rip), %rsi      # 0x8293
movb $0x0, %al
callq 0x10c0
movl $0x1, -0x4(%rbp)
jmp 0x1d99
movb $0x0, %al
callq 0x3a70
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x132e
movq 0xace7(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x6f90(%rip), %rsi      # 0x82ab
movb $0x0, %al
callq 0x10c0
movl $0x1, -0x4(%rbp)
jmp 0x1d99
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3c90
cmpl $0x0, %eax
je 0x1363
movq 0xacb2(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x6f75(%rip), %rsi      # 0x82c5
movb $0x0, %al
callq 0x10c0
movl $0x1, -0x4(%rbp)
jmp 0x1d99
movq -0x18(%rbp), %rdi
callq 0x3b00
movq -0x18(%rbp), %rdi
callq 0x3d10
cmpl $0x0, %eax
je 0x139e
movq 0xac77(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x6f4c(%rip), %rsi      # 0x82d7
movb $0x0, %al
callq 0x10c0
movl $0x1, -0x4(%rbp)
jmp 0x1d99
movq -0x18(%rbp), %rax
movzbl 0x3b(%rax), %esi
movzbl 0x38(%rax), %edx
movzbl 0x39(%rax), %ecx
movzbl 0x3a(%rax), %r8d
movl 0x3c(%rax), %eax
movl %eax, %r9d
leaq 0x6f34(%rip), %rdi      # 0x82f4
xorl %eax, %eax
callq 0x1060
movq -0x18(%rbp), %rax
movzbl 0x40(%rax), %esi
movl 0x44(%rax), %edx
movl 0x48(%rax), %r8d
cvtsi2sd %edx, %xmm0
movsd 0x6c2e(%rip), %xmm4     # 0x8010
divsd %xmm4, %xmm0
movl 0x4c(%rax), %ecx
cvtsi2sd %ecx, %xmm1
divsd %xmm4, %xmm1
cvtsi2sd %r8d, %xmm2
divsd %xmm4, %xmm2
movl 0x50(%rax), %r9d
cvtsi2sd %r9d, %xmm3
divsd %xmm4, %xmm3
leaq 0x6f10(%rip), %rdi      # 0x831e
movb $0x4, %al
callq 0x1060
movq -0x18(%rbp), %rax
movzwl 0x54(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x6bdf(%rip), %xmm1     # 0x8008
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movzwl 0x56(%rax), %eax
movl %eax, %esi
leaq 0x6f2c(%rip), %rdi      # 0x836a
movb $0x1, %al
callq 0x1060
movq -0x18(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, %esi
leaq 0x6f3e(%rip), %rdi      # 0x8393
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3b20
cmpl $0x0, %eax
je 0x1d85
movzwl -0x30(%rbp), %edi
movl %edi, -0x14c(%rbp)
callq 0x2d00
movl -0x14c(%rbp), %esi
movq %rax, %rdx
movl -0x2c(%rbp), %eax
movl %eax, %ecx
movq -0x28(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x6f14(%rip), %rdi      # 0x83b2
xorl %eax, %eax
callq 0x1060
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
movq %rcx, 0x60(%rax)
movzwl -0x30(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x148(%rbp)
subl $0x51, %eax
ja 0x1d67
movq -0x148(%rbp), %rax
leaq 0x6b50(%rip), %rcx      # 0x8028
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
leaq -0x37(%rbp), %rsi
callq 0x32c0
leaq 0x6eea(%rip), %rdi      # 0x83df
movb $0x0, %al
callq 0x1060
leaq -0x37(%rbp), %rdi
callq 0x1db0
leaq 0x7932(%rip), %rdi      # 0x8e3e
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4a40
cmpl $0x0, %eax
jne 0x15df
movzwl -0x68(%rbp), %esi
leaq 0x6eb8(%rip), %rdi      # 0x83fa
movb $0x0, %al
callq 0x1060
cvtsi2sdl -0x60(%rbp), %xmm0
movsd 0x6aba(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0x58(%rbp), %xmm1
movsd 0x6aa9(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
cvtsi2sdl -0x5c(%rbp), %xmm2
movsd 0x6a98(%rip), %xmm3     # 0x8010
divsd %xmm3, %xmm2
cvtsi2sdl -0x54(%rbp), %xmm3
movsd 0x6a87(%rip), %xmm4     # 0x8010
divsd %xmm4, %xmm3
movl -0x60(%rbp), %esi
movl -0x58(%rbp), %edx
movl -0x5c(%rbp), %ecx
movl -0x54(%rbp), %r8d
leaq 0x6e77(%rip), %rdi      # 0x8418
movb $0x4, %al
callq 0x1060
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %esi
callq 0x1ef0
cmpl $0x0, %eax
jne 0x15dd
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %esi
callq 0x1fb0
cmpl $0x0, %eax
jne 0x15db
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %edx
xorl %esi, %esi
callq 0x20d0
jmp 0x15dd
jmp 0x15df
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4800
cmpl $0x0, %eax
jne 0x1658
movzwl -0x98(%rbp), %esi
leaq 0x6e54(%rip), %rdi      # 0x8464
movb $0x0, %al
callq 0x1060
movzwl -0x96(%rbp), %esi
leaq 0x6e5d(%rip), %rdi      # 0x8482
movb $0x0, %al
callq 0x1060
leaq 0x6e6d(%rip), %rdi      # 0x84a0
movb $0x0, %al
callq 0x1060
leaq -0x98(%rbp), %rdi
addq $0x4, %rdi
callq 0x24f0
leaq 0x77ed(%rip), %rdi      # 0x8e3e
movb $0x0, %al
callq 0x1060
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x9c(%rbp), %rsi
callq 0x4a00
cmpl $0x0, %eax
jne 0x169c
movzwl -0x9c(%rbp), %esi
leaq 0x6de4(%rip), %rdi      # 0x8464
movb $0x0, %al
callq 0x1060
movzwl -0x9a(%rbp), %esi
leaq 0x6ded(%rip), %rdi      # 0x8482
movb $0x0, %al
callq 0x1060
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
callq 0x4a80
cmpl $0x0, %eax
jne 0x1844
movzwl -0xcc(%rbp), %esi
leaq 0x6d32(%rip), %rdi      # 0x83fa
movb $0x0, %al
callq 0x1060
cvtsi2sdl -0xc4(%rbp), %xmm0
movsd 0x6931(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0xbc(%rbp), %xmm1
movsd 0x691d(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
cvtsi2sdl -0xc0(%rbp), %xmm2
movsd 0x6909(%rip), %xmm3     # 0x8010
divsd %xmm3, %xmm2
cvtsi2sdl -0xb8(%rbp), %xmm3
movsd 0x68f5(%rip), %xmm4     # 0x8010
divsd %xmm4, %xmm3
movl -0xc4(%rbp), %esi
movl -0xbc(%rbp), %edx
movl -0xc0(%rbp), %ecx
movl -0xb8(%rbp), %r8d
leaq 0x6cd9(%rip), %rdi      # 0x8418
movb $0x4, %al
callq 0x1060
cvtsi2sdl -0xb0(%rbp), %xmm0
movsd 0x68ba(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0xa8(%rbp), %xmm1
movsd 0x68a6(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
cvtsi2sdl -0xac(%rbp), %xmm2
movsd 0x6892(%rip), %xmm3     # 0x8010
divsd %xmm3, %xmm2
cvtsi2sdl -0xa4(%rbp), %xmm3
movsd 0x687e(%rip), %xmm4     # 0x8010
divsd %xmm4, %xmm3
movl -0xb0(%rbp), %esi
movl -0xa8(%rbp), %edx
movl -0xac(%rbp), %ecx
movl -0xa4(%rbp), %r8d
leaq 0x6d05(%rip), %rdi      # 0x84bb
movb $0x4, %al
callq 0x1060
movb -0xa0(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6d38(%rip), %rdi      # 0x8507
movb $0x0, %al
callq 0x1060
movb -0xa0(%rbp), %al
shrb %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6d3b(%rip), %rdi      # 0x8525
movb $0x0, %al
callq 0x1060
movb -0xa0(%rbp), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6d3d(%rip), %rdi      # 0x8543
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %esi
callq 0x1ef0
cmpl $0x0, %eax
jne 0x1842
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %esi
callq 0x1fb0
cmpl $0x0, %eax
jne 0x1840
movq -0x18(%rbp), %rdi
movzwl -0x30(%rbp), %edx
xorl %esi, %esi
callq 0x20d0
jmp 0x1842
jmp 0x1844
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x4070
cmpl $0x0, %eax
jne 0x1952
movzwl -0xf0(%rbp), %esi
leaq 0x6ce8(%rip), %rdi      # 0x8561
movb $0x0, %al
callq 0x1060
movb -0xe0(%rbp), %al
andb $0xf, %al
movzbl %al, %esi
movq -0xe8(%rbp), %rdx
leaq 0x6ce6(%rip), %rdi      # 0x857f
movb $0x0, %al
callq 0x1060
movb -0xe0(%rbp), %al
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %esi
movzwl -0xde(%rbp), %edx
leaq 0x6ce6(%rip), %rdi      # 0x85a2
movb $0x0, %al
callq 0x1060
movb -0xe0(%rbp), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %esi
movzbl -0xdc(%rbp), %edx
leaq 0x6ce8(%rip), %rdi      # 0x85c7
movb $0x0, %al
callq 0x1060
movb -0xe0(%rbp), %al
shrb $0x7, %al
movzbl %al, %esi
movzbl -0xdb(%rbp), %edx
leaq 0x6cef(%rip), %rdi      # 0x85ef
movb $0x0, %al
callq 0x1060
movl -0xd8(%rbp), %esi
leaq 0x6d07(%rip), %rdi      # 0x861b
movb $0x0, %al
callq 0x1060
movb -0xe0(%rbp), %al
andb $0xf, %al
movzbl %al, %eax
cmpl $0x2, %eax
jne 0x1950
movq -0x18(%rbp), %rdi
callq 0x35d0
movw %ax, -0xf2(%rbp)
movzwl -0xf2(%rbp), %esi
leaq 0x6cf0(%rip), %rdi      # 0x8639
movb $0x0, %al
callq 0x1060
jmp 0x1952
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
leaq -0x110(%rbp), %rdi
callq 0x4610
movq -0x18(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4680
cmpl $0x0, %eax
jne 0x19ab
movzwl -0x110(%rbp), %esi
leaq 0x6cc8(%rip), %rdi      # 0x8657
movb $0x0, %al
callq 0x1060
movzwl -0x10e(%rbp), %esi
leaq 0x6cd1(%rip), %rdi      # 0x8675
movb $0x0, %al
callq 0x1060
movzwl -0x10e(%rbp), %eax
cmpl $0x0, %eax
je 0x1b1f
leaq -0x110(%rbp), %rdi
callq 0x46f0
cmpl $0x0, %eax
jne 0x1b1f
movq -0x18(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x4760
cmpl $0x0, %eax
jne 0x1b1f
leaq 0x6ca3(%rip), %rdi      # 0x8693
movb $0x0, %al
callq 0x1060
movl $0x0, -0x114(%rbp)
movl -0x114(%rbp), %eax
movzwl -0x10e(%rbp), %ecx
cmpl %ecx, %eax
jae 0x1a88
movq -0x100(%rbp), %rax
movq -0x108(%rbp), %rcx
movl -0x114(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x108(%rbp), %rax
movl -0x114(%rbp), %ecx
movzwl (%rax,%rcx,2), %esi
movq -0x108(%rbp), %rax
movl -0x114(%rbp), %ecx
movzwl (%rax,%rcx,2), %edx
movzwl -0x10c(%rbp), %eax
subl %eax, %edx
movq -0x120(%rbp), %rcx
leaq 0x6c38(%rip), %rdi      # 0x86a5
movb $0x0, %al
callq 0x1060
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x1a01
movl $0x0, -0x114(%rbp)
movl -0x114(%rbp), %eax
movzwl -0x10e(%rbp), %ecx
cmpl %ecx, %eax
jae 0x1b1d
movq -0x100(%rbp), %rax
movq -0x108(%rbp), %rcx
movl -0x114(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x3130
cmpl $0x0, %eax
jne 0x1aef
movq -0x18(%rbp), %rdi
movl -0x114(%rbp), %esi
movzwl -0x30(%rbp), %edx
callq 0x20d0
jmp 0x1b07
movq 0xa502(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x6bed(%rip), %rsi      # 0x86ed
movb $0x0, %al
callq 0x10c0
jmp 0x1b09
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x1a92
jmp 0x1b1f
leaq -0x110(%rbp), %rdi
callq 0x4640
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x41e0
cmpl $0x0, %eax
jne 0x1ca2
movw -0x138(%rbp), %ax
andw $0x3, %ax
movzwl %ax, %esi
movzwl -0x136(%rbp), %edx
leaq 0x6bc4(%rip), %rdi      # 0x8732
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x2, %ax
andw $0x1, %ax
movzwl %ax, %esi
movzbl -0x134(%rbp), %edx
leaq 0x6bc2(%rip), %rdi      # 0x8757
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x3, %ax
andw $0x1, %ax
movzwl %ax, %esi
movzbl -0x133(%rbp), %edx
leaq 0x6bc3(%rip), %rdi      # 0x877f
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x8, %ax
andw $0xf, %ax
movzwl %ax, %esi
movq -0x128(%rbp), %rdx
leaq 0x6bc8(%rip), %rdi      # 0x87ab
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x5, %ax
andw $0x3, %ax
movzwl %ax, %esi
movzwl -0x132(%rbp), %edx
leaq 0x6bc6(%rip), %rdi      # 0x87d0
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x7, %ax
andw $0x1, %ax
movzwl %ax, %esi
movzbl -0x130(%rbp), %edx
leaq 0x6bc4(%rip), %rdi      # 0x87f5
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0xc, %ax
andw $0x1, %ax
movzwl %ax, %esi
movzbl -0x12f(%rbp), %edx
leaq 0x6bc5(%rip), %rdi      # 0x881d
movb $0x0, %al
callq 0x1060
movzwl -0x12e(%rbp), %esi
leaq 0x6bdc(%rip), %rdi      # 0x8849
movb $0x0, %al
callq 0x1060
movw -0x138(%rbp), %ax
shrw $0x4, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x1ca0
movzwl -0x12c(%rbp), %esi
leaq 0x6bd0(%rip), %rdi      # 0x8869
movb $0x0, %al
callq 0x1060
jmp 0x1ca2
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x13c(%rbp), %rsi
callq 0x4510
cmpl $0x0, %eax
jne 0x1d51
movb -0x13c(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6bac(%rip), %rdi      # 0x8887
movb $0x0, %al
callq 0x1060
movb -0x13c(%rbp), %al
shrb %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6baf(%rip), %rdi      # 0x88a5
movb $0x0, %al
callq 0x1060
movb -0x13c(%rbp), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6bb1(%rip), %rdi      # 0x88c3
movb $0x0, %al
callq 0x1060
movb -0x13c(%rbp), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6bb3(%rip), %rdi      # 0x88e1
movb $0x0, %al
callq 0x1060
movb -0x13c(%rbp), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x6bb5(%rip), %rdi      # 0x88ff
movb $0x0, %al
callq 0x1060
movq -0x18(%rbp), %rdi
callq 0x1df0
jmp 0x1d74
movq -0x18(%rbp), %rdi
callq 0x2600
jmp 0x1d74
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2660
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
jmp 0x145c
movq -0x18(%rbp), %rdi
callq 0x3ad0
movq %rax, -0x18(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)