// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_MATRIX
int swf_reader_read_MATRIX(swf_reader *swf,swf_MATRIX *m) {
	swf_reader_read_bytealign(swf);
	m->HasScale = swf_reader_read_UB(swf,1);
	if (m->HasScale) {
		m->NScaleBits = swf_reader_read_UB(swf,5);
		m->ScaleX = swf_reader_read_SB(swf,m->NScaleBits);
		m->ScaleY = swf_reader_read_SB(swf,m->NScaleBits);
	}
	else {
		m->ScaleX = m->ScaleY = 0x10000;
		m->NScaleBits = 0;
	}
	m->HasRotate = swf_reader_read_UB(swf,1);
	if (m->HasRotate) {
		m->NRotateBits = swf_reader_read_UB(swf,5);
		m->RotateSkew0 = swf_reader_read_SB(swf,m->NRotateBits);
		m->RotateSkew1 = swf_reader_read_SB(swf,m->NRotateBits);
	}
	else {
		m->NRotateBits = 0;
		m->RotateSkew0 = 0;
		m->RotateSkew1 = 0;
	}
	m->NTranslateBits = swf_reader_read_UB(swf,5);
	m->TranslateX = swf_reader_read_SB(swf,m->NTranslateBits);
	m->TranslateY = swf_reader_read_SB(swf,m->NTranslateBits);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x48e8
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x33d0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x4906
movq -0x10(%rbp), %rax
movl $0x10000, 0x8(%rax)     # imm = 0x10000
movq -0x10(%rbp), %rax
movl $0x10000, 0x4(%rax)     # imm = 0x10000
movq -0x10(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb (%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4989
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x33d0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x49a7
movq -0x10(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x33d0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)