// File: /workspace/github_c_makefile_star2_O2/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_FILLSTYLE
int swf_reader_read_FILLSTYLE(swf_reader *swf,swf_FILLSTYLEARRAY_read *nfo) {
	nfo->FillStyleType_str = "";
	nfo->FillStyleType = swf_reader_read_UI8(swf);
	switch (nfo->FillStyleType) {
		case swf_fillstyle_solid:
			nfo->FillStyleType_str = "solid fill";
			if (nfo->color_rgba) swf_reader_read_RGBA(swf,&nfo->fsinfo.solid.Color);
			else swf_reader_read_RGB_as_RGBA(swf,&nfo->fsinfo.solid.Color);
			break;
		case swf_fillstyle_linear_gradient_fill:
			nfo->FillStyleType_str = "linear gradient fill";
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.gradient.GradientMatrix);
			swf_reader_read_GRADIENT(swf,&nfo->fsinfo.gradient.Gradient,nfo->color_rgba);
			break;
		case swf_fillstyle_radial_gradient_fill:
			nfo->FillStyleType_str = "radial gradient fill";
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.gradient.GradientMatrix);
			swf_reader_read_GRADIENT(swf,&nfo->fsinfo.gradient.Gradient,nfo->color_rgba);
			break;
		case swf_fillstyle_focal_radial_gradient_fill:
			nfo->FillStyleType_str = "focal radial gradient fill";
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.gradient.GradientMatrix);
			swf_reader_read_FOCALGRADIENT(swf,&nfo->fsinfo.gradient.Gradient,nfo->color_rgba);
			break;
		case swf_fillstyle_repeating_bitmap_fill:
			nfo->FillStyleType_str = "repeating bitmap fill";
			nfo->fsinfo.bitmap.BitmapId = swf_reader_read_UI16(swf);
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.bitmap.BitmapMatrix);
			break;
		case swf_fillstyle_clipped_bitmap_fill:
			nfo->FillStyleType_str = "clipped bitmap fill";
			nfo->fsinfo.bitmap.BitmapId = swf_reader_read_UI16(swf);
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.bitmap.BitmapMatrix);
			break;
		case swf_fillstyle_non_smoothed_repeating_bitmap_fill:
			nfo->FillStyleType_str = "non-smoothed repeating bitmap fill";
			nfo->fsinfo.bitmap.BitmapId = swf_reader_read_UI16(swf);
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.bitmap.BitmapMatrix);
			break;
		case swf_fillstyle_non_smoothed_clipped_bitmap_fill:
			nfo->FillStyleType_str = "non-smoothed clipped bitmap fill";
			nfo->fsinfo.bitmap.BitmapId = swf_reader_read_UI16(swf);
			swf_reader_read_MATRIX(swf,&nfo->fsinfo.bitmap.BitmapMatrix);
			break;
		default:
			return -1;
	};

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20ef(%rip), %rax      # 0x5b8e
movq %rax, 0x8(%rsi)
callq 0x25d3
movb %al, 0x4(%rbx)
movzbl %al, %eax
leal -0x40(%rax), %ecx
cmpl $0x3, %ecx
jbe 0x3af6
cmpl $0x13, %eax
je 0x3b0f
cmpl $0x10, %eax
je 0x3b80
cmpl $0x12, %eax
je 0x3b46
testl %eax, %eax
jne 0x3bb3
leaq 0x28f5(%rip), %rax      # 0x63cd
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %rsi
testb $0x1, (%rbx)
jne 0x3bb8
movq %r14, %rdi
callq 0x2661
jmp 0x3bac
leaq 0x223b(%rip), %rax      # 0x5d38
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x2908(%rip), %rax      # 0x6415
jmp 0x3b5f
leaq 0x28d7(%rip), %rax      # 0x63ed
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x31de
movzbl (%rbx), %edx
addq $0x2c, %rbx
andl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x371c
jmp 0x3bac
leaq 0x28c4(%rip), %rax      # 0x6408
jmp 0x3b5f
leaq 0x28a6(%rip), %rax      # 0x63f3
jmp 0x3b87
leaq 0x28d5(%rip), %rax      # 0x642b
jmp 0x3b5f
leaq 0x28d9(%rip), %rax      # 0x6438
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x27a3
movw %ax, 0x10(%rbx)
addq $0x14, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31de
jmp 0x3bac
leaq 0x2851(%rip), %rax      # 0x63d8
movq %rax, 0x8(%rbx)
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x31de
movzbl (%rbx), %edx
addq $0x2c, %rbx
andl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37dc
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x3bae
movq %r14, %rdi
callq 0x2627
jmp 0x3bac