// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x36f4(%rip), %rcx      # 0x8e3f
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x43, %rax
ja 0x598d
movq -0x20(%rbp), %rax
leaq 0x392a(%rip), %rcx      # 0x90ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
leaq 0x3f47(%rip), %rcx      # 0x96dd
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x57bd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x3310
jmp 0x57ce
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x3370
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3f0a(%rip), %rcx      # 0x96e8
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x4850
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x1c, %rsi
movq -0x18(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x52e0
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3ee0(%rip), %rcx      # 0x9703
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x4850
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x1c, %rsi
movq -0x18(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x52e0
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3e95(%rip), %rcx      # 0x96fd
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x4850
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x1c, %rsi
movq -0x18(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x51a0
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3e78(%rip), %rcx      # 0x9725
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x4, %rsi
callq 0x4850
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3e5e(%rip), %rcx      # 0x9748
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x4, %rsi
callq 0x4850
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3df4(%rip), %rcx      # 0x9718
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x4, %rsi
callq 0x4850
jmp 0x5996
movq -0x18(%rbp), %rax
leaq 0x3ddd(%rip), %rcx      # 0x973b
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
addq $0x4, %rsi
callq 0x4850
jmp 0x5996
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x599d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)