// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4b50
cmpl $0x0, %eax
jne 0x24e9
movl -0xc(%rbp), %esi
movw -0x38(%rbp), %ax
andw $0xf, %ax
movzwl %ax, %edx
movw -0x38(%rbp), %ax
shrw $0x4, %ax
andw $0xf, %ax
movzwl %ax, %ecx
leaq 0x6af2(%rip), %rdi      # 0x8c0e
movb $0x0, %al
callq 0x1060
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4bd0
cmpl $0x0, %eax
jne 0x24e7
movq -0x30(%rbp), %rsi
movw -0x38(%rbp), %ax
shrw $0x8, %ax
andw $0x1, %ax
movzwl %ax, %edx
leaq 0x6aed(%rip), %rdi      # 0x8c40
movb $0x0, %al
callq 0x1060
movzbl -0x28(%rbp), %eax
cmpl $0x0, %eax
jne 0x2168
jmp 0x24e7
movzbl -0x28(%rbp), %eax
cmpl $0x1, %eax
jne 0x23ab
movw -0x24(%rbp), %ax
andw $0x1, %ax
movzwl %ax, %ecx
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
leaq 0x6ac6(%rip), %rdi      # 0x8c5a
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw %ax
andw $0x1, %ax
movzwl %ax, %ecx
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
leaq 0x6abd(%rip), %rdi      # 0x8c7a
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x2, %ax
andw $0x1, %ax
movzwl %ax, %ecx
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
leaq 0x6ab3(%rip), %rdi      # 0x8c9a
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x3, %ax
andw $0x1, %ax
movzwl %ax, %ecx
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
leaq 0x6aaa(%rip), %rdi      # 0x8cbb
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x4, %ax
andw $0x1, %ax
movzwl %ax, %ecx
xorl %esi, %esi
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
leaq 0x6aa1(%rip), %rdi      # 0x8cdc
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x4, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x22a9
movw -0x24(%rbp), %ax
shrw $0x5, %ax
andw $0x1f, %ax
movzwl %ax, %esi
leaq 0x6a8d(%rip), %rdi      # 0x8cf9
movb $0x0, %al
callq 0x1060
cvtsi2sdl -0x20(%rbp), %xmm0
movsd 0x5d90(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
movsd 0x5d7f(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq 0x6a71(%rip), %rdi      # 0x8d13
movb $0x2, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x2, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x22cf
movzwl -0x16(%rbp), %esi
leaq 0x6a86(%rip), %rdi      # 0x8d4e
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw $0x3, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x22f5
movzwl -0x18(%rbp), %esi
leaq 0x6a7c(%rip), %rdi      # 0x8d6a
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
shrw %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x231a
movzwl -0x14(%rbp), %esi
leaq 0x6a73(%rip), %rdi      # 0x8d86
movb $0x0, %al
callq 0x1060
movw -0x24(%rbp), %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x23a6
leaq 0x6a70(%rip), %rdi      # 0x8da1
movb $0x0, %al
callq 0x1060
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x1ef0
cmpl $0x0, %eax
je 0x234e
jmp 0x24e7
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x1fb0
cmpl $0x0, %eax
je 0x2364
jmp 0x24e7
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4b50
cmpl $0x0, %eax
je 0x237b
jmp 0x24e7
movl -0xc(%rbp), %esi
movw -0x38(%rbp), %ax
andw $0xf, %ax
movzwl %ax, %edx
movw -0x38(%rbp), %ax
shrw $0x4, %ax
andw $0xf, %ax
movzwl %ax, %ecx
leaq 0x686f(%rip), %rdi      # 0x8c0e
movb $0x0, %al
callq 0x1060
jmp 0x24e0
movzbl -0x28(%rbp), %eax
cmpl $0x2, %eax
jne 0x244b
movb -0x24(%rbp), %al
shrb %al
andb $0x1f, %al
movzbl %al, %esi
leaq 0x69f1(%rip), %rdi      # 0x8dba
movb $0x0, %al
callq 0x1060
movb -0x24(%rbp), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %esi
leaq 0x69f1(%rip), %rdi      # 0x8dd3
movb $0x0, %al
callq 0x1060
movb -0x24(%rbp), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2410
movb -0x24(%rbp), %al
shrb $0x7, %al
movzbl %al, %esi
leaq 0x69eb(%rip), %rdi      # 0x8df4
movb $0x0, %al
callq 0x1060
cvtsi2sdl -0x20(%rbp), %xmm0
movsd 0x5bf3(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
movsd 0x5be2(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq 0x69d3(%rip), %rdi      # 0x8e12
movb $0x2, %al
callq 0x1060
jmp 0x24de
movzbl -0x28(%rbp), %eax
cmpl $0x3, %eax
jne 0x24dc
movb -0x24(%rbp), %al
shrb %al
andb $0x1f, %al
movzbl %al, %esi
leaq 0x6951(%rip), %rdi      # 0x8dba
movb $0x0, %al
callq 0x1060
cvtsi2sdl -0x20(%rbp), %xmm0
movsd 0x5b93(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
movsd 0x5b82(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
movl -0x20(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq 0x69a1(%rip), %rdi      # 0x8e40
movb $0x2, %al
callq 0x1060
cvtsi2sdl -0x18(%rbp), %xmm0
movsd 0x5b5d(%rip), %xmm1     # 0x8010
divsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm1
movsd 0x5b4c(%rip), %xmm2     # 0x8010
divsd %xmm2, %xmm1
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
leaq 0x69a1(%rip), %rdi      # 0x8e76
movb $0x2, %al
callq 0x1060
jmp 0x24de
jmp 0x24e0
jmp 0x24e2
jmp 0x2123
jmp 0x24e9
addq $0x40, %rsp
popq %rbp
retq
nop