	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function set_matrix_3d
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0x3e000000                      ## float 0.125
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_set_matrix_3d
	.p2align	4, 0x90
_set_matrix_3d:                         ## @set_matrix_3d
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$232, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cvtsi2ss	%esi, %xmm6
	movl	%ecx, %r15d
	movss	%xmm5, -184(%rbp)               ## 4-byte Spill
	movss	%xmm4, -188(%rbp)               ## 4-byte Spill
	movaps	%xmm3, -208(%rbp)               ## 16-byte Spill
	movaps	%xmm2, -272(%rbp)               ## 16-byte Spill
	movaps	%xmm1, -256(%rbp)               ## 16-byte Spill
	movaps	%xmm0, -240(%rbp)               ## 16-byte Spill
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	divss	%xmm0, %xmm6
	movss	%xmm6, -180(%rbp)               ## 4-byte Spill
	shll	$5, %r8d
	addl	$64, %r8d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r8d, %xmm0
	movaps	%xmm0, -224(%rbp)               ## 16-byte Spill
	leaq	-112(%rbp), %r12
	movq	%r12, %rdi
	callq	_mat_identity
	movaps	LCPI0_0(%rip), %xmm3            ## xmm3 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movaps	-240(%rbp), %xmm0               ## 16-byte Reload
	xorps	%xmm3, %xmm0
	movaps	-256(%rbp), %xmm1               ## 16-byte Reload
	xorps	%xmm3, %xmm1
	movaps	-272(%rbp), %xmm2               ## 16-byte Reload
	xorps	%xmm3, %xmm2
	leaq	-176(%rbp), %r13
	movq	%r13, %rdi
	callq	_mat_translate
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_mat_multiply
	movaps	-208(%rbp), %xmm0               ## 16-byte Reload
	callq	_cosf
	movl	%eax, %ebx
	movaps	-208(%rbp), %xmm0               ## 16-byte Reload
	callq	_sinf
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movss	-188(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_mat_rotate
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_mat_multiply
	movaps	-208(%rbp), %xmm0               ## 16-byte Reload
	xorps	LCPI0_0(%rip), %xmm0
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_mat_rotate
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_mat_multiply
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movl	%r15d, %ecx
	negl	%ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	movss	-180(%rbp), %xmm1               ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	cvttss2si	%xmm0, %esi
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	mulss	%xmm1, %xmm0
	cvttss2si	%xmm0, %edx
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movaps	-224(%rbp), %xmm1               ## 16-byte Reload
	xorps	%xmm1, %xmm0
	leaq	-176(%rbp), %rdi
	movl	%r15d, %r8d
	callq	_mat_ortho
	jmp	LBB0_3
LBB0_2:
	leaq	-176(%rbp), %rdi
	movss	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movss	-184(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	-180(%rbp), %xmm1               ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movaps	-224(%rbp), %xmm3               ## 16-byte Reload
	callq	_mat_perspective
LBB0_3:
	leaq	-176(%rbp), %rsi
	leaq	-112(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_mat_multiply
	movq	%r14, %rdi
	callq	_mat_identity
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_mat_multiply
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$232, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_matrix_3d                  ; -- Begin function set_matrix_3d
	.p2align	2
_set_matrix_3d:                         ; @set_matrix_3d
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	d15, d14, [sp, #144]            ; 16-byte Folded Spill
	stp	d13, d12, [sp, #160]            ; 16-byte Folded Spill
	stp	d11, d10, [sp, #176]            ; 16-byte Folded Spill
	stp	d9, d8, [sp, #192]              ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset b8, -56
	.cfi_offset b9, -64
	.cfi_offset b10, -72
	.cfi_offset b11, -80
	.cfi_offset b12, -88
	.cfi_offset b13, -96
	.cfi_offset b14, -104
	.cfi_offset b15, -112
	mov	x20, x3
	fmov	s9, s5
	fmov	s11, s4
	fmov	s12, s3
	fmov	s13, s2
	fmov	s14, s1
	fmov	s15, s0
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	scvtf	s0, w1
	scvtf	s1, w2
	stur	x8, [x29, #-104]
	fdiv	s10, s0, s1
	lsl	w8, w4, #5
	add	w8, w8, #64
	scvtf	s8, w8
	add	x0, sp, #72
	bl	_mat_identity
	fneg	s0, s15
	fneg	s1, s14
	fneg	s2, s13
	add	x0, sp, #8
	bl	_mat_translate
	add	x0, sp, #72
	add	x1, sp, #8
	add	x2, sp, #72
	bl	_mat_multiply
	fmov	s0, s12
	bl	_cosf
	mov	x21, x0
	fmov	s0, s12
	bl	_sinf
	mov	x3, x0
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #0
	fmov	s0, s11
	bl	_mat_rotate
	add	x0, sp, #72
	add	x1, sp, #8
	add	x2, sp, #72
	bl	_mat_multiply
	fneg	s0, s12
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #1
	mov	w3, #0
	bl	_mat_rotate
	add	x0, sp, #72
	add	x1, sp, #8
	add	x2, sp, #72
	bl	_mat_multiply
	cbz	w20, LBB0_2
; %bb.1:
	neg	w3, w20
	scvtf	s0, w3
	fmul	s0, s10, s0
	fcvtzs	w1, s0
	scvtf	s0, w20
	fmul	s0, s10, s0
	fcvtzs	w2, s0
	fneg	s0, s8
	add	x0, sp, #8
	mov	x4, x20
	fmov	s1, s8
	bl	_mat_ortho
	b	LBB0_3
LBB0_2:
	add	x0, sp, #8
	fmov	s2, #0.12500000
	fmov	s0, s9
	fmov	s1, s10
	fmov	s3, s8
	bl	_mat_perspective
LBB0_3:
	add	x0, sp, #72
	add	x1, sp, #8
	add	x2, sp, #72
	bl	_mat_multiply
	mov	x0, x19
	bl	_mat_identity
	add	x1, sp, #72
	mov	x0, x19
	mov	x2, x19
	bl	_mat_multiply
	ldur	x8, [x29, #-104]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #192]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #176]            ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #160]            ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
