// File: /workspace/github_c_makefile_star2_O1/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 0x3c3b
testl %eax, %eax
jne 0x2722
leaq -0x50(%rbp), %r12
movzwl (%r12), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
andl $0xf, %ecx
leaq 0x4527(%rip), %rdi      # 0x6976
movl %r14d, %esi
xorl %eax, %eax
callq 0x1080
movq %r15, %rdi
movq %r12, %rsi
callq 0x3c89
testl %eax, %eax
jne 0x2722
leaq -0x50(%rbp), %r13
leaq 0x3bf5(%rip), %r12      # 0x606c
movq -0x48(%rbp), %rsi
movl -0x50(%rbp), %edx
shrl $0x8, %edx
andl $0x1, %edx
leaq 0x451d(%rip), %rdi      # 0x69a8
xorl %eax, %eax
callq 0x1080
movzbl -0x40(%rbp), %eax
cmpq $0x3, %rax
ja 0x270f
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movzwl -0x3c(%rbp), %esi
andl $0x1, %esi
leaq 0x450b(%rip), %rdi      # 0x69c2
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1, %esi
leaq 0x4515(%rip), %rdi      # 0x69e2
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x2, %esi
andl $0x1, %esi
leaq 0x451e(%rip), %rdi      # 0x6a02
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x3, %esi
andl $0x1, %esi
leaq 0x4528(%rip), %rdi      # 0x6a23
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x4, %esi
andl $0x1, %esi
leaq 0x4532(%rip), %rdi      # 0x6a44
xorl %eax, %eax
callq 0x1080
movzwl -0x3c(%rbp), %esi
testb $0x10, %sil
je 0x2566
shrl $0x5, %esi
andl $0x1f, %esi
leaq 0x4531(%rip), %rdi      # 0x6a61
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x3abc(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x451c(%rip), %rdi      # 0x6a7b
movb $0x2, %al
callq 0x1080
testb $0x4, -0x3c(%rbp)
je 0x257e
movzwl -0x2e(%rbp), %esi
leaq 0x453f(%rip), %rdi      # 0x6ab6
xorl %eax, %eax
callq 0x1080
testb $0x8, -0x3c(%rbp)
je 0x2596
movzwl -0x30(%rbp), %esi
leaq 0x4543(%rip), %rdi      # 0x6ad2
xorl %eax, %eax
callq 0x1080
testb $0x2, -0x3c(%rbp)
je 0x25ae
movzwl -0x2c(%rbp), %esi
leaq 0x4547(%rip), %rdi      # 0x6aee
xorl %eax, %eax
callq 0x1080
testb $0x1, -0x3c(%rbp)
je 0x270f
leaq 0x4722(%rip), %rdi      # 0x6ce1
callq 0x1070
movq %r15, %rdi
movl %ebx, %esi
callq 0x20e7
testl %eax, %eax
jne 0x2722
movq %r15, %rdi
movl %ebx, %esi
callq 0x2190
testl %eax, %eax
jne 0x2722
movq %r15, %rdi
movq %r13, %rsi
callq 0x3c3b
testl %eax, %eax
jne 0x2722
movzwl -0x50(%rbp), %ecx
movl %ecx, %edx
andl $0xf, %edx
shrl $0x4, %ecx
andl $0xf, %ecx
leaq 0x4365(%rip), %rdi      # 0x6976
movl %r14d, %esi
xorl %eax, %eax
callq 0x1080
jmp 0x270f
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1f, %esi
leaq 0x44da(%rip), %rdi      # 0x6b09
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x39bd(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x452e(%rip), %rdi      # 0x6b8f
movb $0x2, %al
callq 0x1080
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x398b(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x4532(%rip), %rdi      # 0x6bc5
jmp 0x2708
movl -0x3c(%rbp), %esi
shrl %esi
andl $0x1f, %esi
leaq 0x4465(%rip), %rdi      # 0x6b09
xorl %eax, %eax
callq 0x1080
movl -0x3c(%rbp), %esi
shrl $0x6, %esi
andl $0x1, %esi
leaq 0x4467(%rip), %rdi      # 0x6b22
xorl %eax, %eax
callq 0x1080
movzbl -0x3c(%rbp), %esi
testb $0x40, %sil
jne 0x26dd
shrl $0x7, %esi
leaq 0x446d(%rip), %rdi      # 0x6b43
xorl %eax, %eax
callq 0x1080
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x3916(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm2, %xmm1
leaq 0x4459(%rip), %rdi      # 0x6b61
movb $0x2, %al
callq 0x1080
movq %r15, %rdi
movq %r13, %rsi
callq 0x3c89
testl %eax, %eax
je 0x2477
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq