// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/c4_swfdump.c
// Function: dump_SHAPE
static void dump_SHAPE(swf_reader *swf,unsigned int i,unsigned int tag_code) {
	swf_SHAPE_reading r;

	if (swf_reader_read_SHAPE_beginning(swf,&r) == 0) {
		printf("        SHAPE[%u]: NumFillBits=%u NumLineBits=%u\n",
				i,r.NumFillBits,r.NumLineBits);

		while (swf_reader_read_SHAPE_record(swf,&r) == 0) {
			printf("          %s TypeFlag=%u\n",
					r.ShapeRecord_str,
					r.ShapeRecordTypeFlag);

			if (r.ShapeRecord_type == swf_shrec_EndShapeRecord)
				break;
			else if (r.ShapeRecord_type == swf_shrec_StyleChangeRecord) {
				printf("            StateNewStyles: %u\n",
						r.shrec.style.StyleChangeRecord.StateNewStyles?1:0);
				printf("            StateLineStyle: %u\n",
						r.shrec.style.StyleChangeRecord.StateLineStyle?1:0);
				printf("            StateFillStyle1: %u\n",
						r.shrec.style.StyleChangeRecord.StateFillStyle1?1:0);
				printf("            StateFillStyle0: %u\n",
						r.shrec.style.StyleChangeRecord.StateFillStyle0?1:0);
				printf("            StateMoveTo: %u\n",
						r.shrec.style.StyleChangeRecord.StateMoveTo?1:0);
				if (r.shrec.style.StyleChangeRecord.StateMoveTo) {
					printf("            MoveBits: %u\n",
							r.shrec.style.StyleChangeRecord.MoveBits);
					printf("            Move DeltaX/DeltaY: %.3f, %.3f (%d, %d twips)\n",
							(double)r.shrec.style.StyleChangeRecord.MoveDeltaX /
							SWF_TWIPS_PER_PIXEL,
							(double)r.shrec.style.StyleChangeRecord.MoveDeltaY /
							SWF_TWIPS_PER_PIXEL,
							r.shrec.style.StyleChangeRecord.MoveDeltaX,
							r.shrec.style.StyleChangeRecord.MoveDeltaY);
				}
				if (r.shrec.style.StyleChangeRecord.StateFillStyle1)
					printf("            FillStyle1: %u\n",
							r.shrec.style.StyleChangeRecord.FillStyle1);
				if (r.shrec.style.StyleChangeRecord.StateFillStyle0)
					printf("            FillStyle0: %u\n",
							r.shrec.style.StyleChangeRecord.FillStyle0);
				if (r.shrec.style.StyleChangeRecord.StateLineStyle)
					printf("            LineStyle: %u\n",
							r.shrec.style.StyleChangeRecord.LineStyle);

				if (r.shrec.style.StyleChangeRecord.StateNewStyles) {
					printf("        Style Change...\n");
					if (dump_FILLSTYLEARRAY(swf,tag_code)) break;
					if (dump_LINESTYLEARRAY(swf,tag_code)) break;
					/* NumFillBits and NumLineBits follow */
					if (swf_reader_read_SHAPE_beginning(swf,&r)) break;
					printf("        SHAPE[%u]: NumFillBits=%u NumLineBits=%u\n",
						i,r.NumFillBits,r.NumLineBits);
				}
			}
			else if (r.ShapeRecord_type == swf_shrec_StraightEdgeRecord) {
				printf("            NumBits: %u\n",
						r.shrec.edge.StraightEdgeRecord.NumBits);
				printf("            GeneralLineFlag: %u\n",
						r.shrec.edge.StraightEdgeRecord.GeneralLineFlag);
				if (!r.shrec.edge.StraightEdgeRecord.GeneralLineFlag)
					printf("            VertLineFlag: %u\n",
							r.shrec.edge.StraightEdgeRecord.VertLineFlag);
				printf("            DeltaX/Y: %.3f, %.3f (or %d, %d)\n",
						(double)r.shrec.edge.StraightEdgeRecord.DeltaX /
						SWF_TWIPS_PER_PIXEL,
						(double)r.shrec.edge.StraightEdgeRecord.DeltaY /
						SWF_TWIPS_PER_PIXEL,
						r.shrec.edge.StraightEdgeRecord.DeltaX,
						r.shrec.edge.StraightEdgeRecord.DeltaY);
			}
			else if (r.ShapeRecord_type == swf_shrec_CurvedEdgeRecord) {
				printf("            NumBits: %u\n",
						r.shrec.edge.CurvedEdgeRecord.NumBits);
				printf("            Control DeltaX/Y: %.3f, %.3f (or %d, %d)\n",
						(double)r.shrec.edge.CurvedEdgeRecord.ControlDeltaX /
						SWF_TWIPS_PER_PIXEL,
						(double)r.shrec.edge.CurvedEdgeRecord.ControlDeltaY /
						SWF_TWIPS_PER_PIXEL,
						r.shrec.edge.CurvedEdgeRecord.ControlDeltaX,
						r.shrec.edge.CurvedEdgeRecord.ControlDeltaY);
				printf("            Anchor DeltaX/Y: %.3f, %.3f (or %d, %d)\n",
						(double)r.shrec.edge.CurvedEdgeRecord.AnchorDeltaX /
						SWF_TWIPS_PER_PIXEL,
						(double)r.shrec.edge.CurvedEdgeRecord.AnchorDeltaY /
						SWF_TWIPS_PER_PIXEL,
						r.shrec.edge.CurvedEdgeRecord.AnchorDeltaX,
						r.shrec.edge.CurvedEdgeRecord.AnchorDeltaY);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
leaq -0x50(%rbp), %rsi
callq 0x3bed
testl %eax, %eax
jne 0x26f7
leaq -0x50(%rbp), %r12
movzwl (%r12), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
andl $0xf, %ecx
leaq 0x4562(%rip), %rdi      # 0x6976
movl %r14d, %esi
xorl %eax, %eax
callq 0x1080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3c3b
testl %eax, %eax
jne 0x26f7
leaq -0x50(%rbp), %r13
leaq 0x3c30(%rip), %r12      # 0x606c
movq -0x48(%rbp), %rsi
movl -0x50(%rbp), %edx
shrl $0x8, %edx
andl $0x1, %edx
leaq 0x4558(%rip), %rdi      # 0x69a8
xorl %eax, %eax
callq 0x1080
movzbl -0x40(%rbp), %eax
cmpq $0x3, %rax
ja 0x26e4
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movzwl -0x3c(%rbp), %esi
andl $0x1, %esi
leaq 0x4546(%rip), %rdi      # 0x69c2
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1, %esi
leaq 0x4550(%rip), %rdi      # 0x69e2
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x2, %esi
andl $0x1, %esi
leaq 0x4559(%rip), %rdi      # 0x6a02
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x3, %esi
andl $0x1, %esi
leaq 0x4563(%rip), %rdi      # 0x6a23
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x4, %esi
andl $0x1, %esi
leaq 0x456d(%rip), %rdi      # 0x6a44
xorl %eax, %eax
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x10, %sil
je 0x252f
shrl $0x5, %esi
andl $0x1f, %esi
leaq 0x456c(%rip), %rdi      # 0x6a61
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x3af7(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x4557(%rip), %rdi      # 0x6a7b
movb $0x2, %al
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x4, %sil
je 0x254b
movzwl -0x2e(%rbp), %esi
leaq 0x4576(%rip), %rdi      # 0x6ab6
xorl %eax, %eax
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x8, %sil
je 0x2567
movzwl -0x30(%rbp), %esi
leaq 0x4576(%rip), %rdi      # 0x6ad2
xorl %eax, %eax
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x2, %sil
je 0x2583
movzwl -0x2c(%rbp), %esi
leaq 0x4576(%rip), %rdi      # 0x6aee
xorl %eax, %eax
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x1, %sil
je 0x26e4
leaq 0x474d(%rip), %rdi      # 0x6ce1
callq 0x1070
movq %r15, %rdi
movl %ebx, %esi
callq 0x20cd
testl %eax, %eax
jne 0x26f7
movq %r15, %rdi
movl %ebx, %esi
callq 0x2176
testl %eax, %eax
jne 0x26f7
movq %r15, %rdi
movq %r13, %rsi
callq 0x3bed
testl %eax, %eax
jne 0x26f7
movzwl -0x50(%rbp), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
andl $0xf, %ecx
leaq 0x4390(%rip), %rdi      # 0x6976
movl %r14d, %esi
xorl %eax, %eax
callq 0x1080
jmp 0x26e4
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1f, %esi
leaq 0x4505(%rip), %rdi      # 0x6b09
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x39e8(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x4559(%rip), %rdi      # 0x6b8f
movb $0x2, %al
callq 0x1080
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x39b6(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x455d(%rip), %rdi      # 0x6bc5
jmp 0x26dd
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1f, %esi
leaq 0x4490(%rip), %rdi      # 0x6b09
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x6, %esi
andl $0x1, %esi
leaq 0x4492(%rip), %rdi      # 0x6b22
xorl %eax, %eax
callq 0x1080
movzbl -0x3c(%rbp), %esi
testb $0x40, %sil
jne 0x26b2
shrl $0x7, %esi
leaq 0x4498(%rip), %rdi      # 0x6b43
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x3941(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x4484(%rip), %rdi      # 0x6b61
movb $0x2, %al
callq 0x1080
movq %r15, %rdi
movq %r13, %rsi
callq 0x3c3b
testl %eax, %eax
je 0x243c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq