	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function SerialiseSurface
_SerialiseSurface:                      ## @SerialiseSurface
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -128(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MD3_IDENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LittleLong
	movq	%rax, 88(%r13)
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	80(%r13), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*64(%r12)
	movq	$0, 72(%r13)
	movl	$1, %edi
	callq	_LittleLong
	movq	%rax, 64(%r13)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*(%r12)
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %edi
	callq	_LittleLong
	movq	%rax, 56(%r13)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*8(%r12)
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	%eax, %edi
	callq	_LittleLong
	movq	%rax, 48(%r13)
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*16(%r12)
	movq	%rax, %r15
	movl	%r15d, %edi
	callq	_LittleLong
	movq	%rax, 40(%r13)
	movl	$96, %edi
	callq	_LittleLong
	movq	%rax, 32(%r13)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	shll	$4, %ebx
	leal	96(%rbx), %edi
	callq	_LittleLong
	movq	%rax, 24(%r13)
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%r15,8), %ebx
	addl	$96, %ebx
	movl	%ebx, %edi
	callq	_LittleLong
	movq	%rax, 16(%r13)
	movq	-112(%rbp), %r15                ## 8-byte Reload
	leal	(%rbx,%r15,8), %ebx
	movl	%ebx, %edi
	callq	_LittleLong
	movq	%rax, 8(%r13)
	movl	%r15d, %edi
	shll	$4, %edi
	addl	%ebx, %edi
	callq	_LittleLong
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	%rax, (%r13)
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	392(%rax), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	*56(%r12)
	movq	$0, -8(%r13)
	incq	%rbx
	addq	$16, %r13
	cmpq	%rbx, %r15
	jne	LBB0_2
LBB0_3:
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	movq	-120(%rbp), %r15                ## 8-byte Reload
	je	LBB0_6
## %bb.4:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	shlq	$6, %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax), %r13
	addq	$384, %r13                      ## imm = 0x180
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	leaq	-60(%rbp), %rcx
	callq	*48(%r12)
	movl	-60(%rbp), %edi
	callq	_LittleLong
	movq	(%r13,%rbx,8), %rcx
	movq	%rax, (%rcx)
	movl	-56(%rbp), %edi
	callq	_LittleLong
	movq	(%r13,%rbx,8), %rcx
	movq	%rax, 8(%rcx)
	movl	-52(%rbp), %edi
	callq	_LittleLong
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	(%r13,%rbx,8), %rcx
	movq	%rax, 16(%rcx)
	incq	%rbx
	cmpq	%rbx, %rdx
	jne	LBB0_5
LBB0_6:
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_11
## %bb.7:
	movq	%r15, %rsi
	movq	%r14, %r15
	leaq	(,%rdx,4), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	addq	$384, %r13                      ## imm = 0x180
	xorl	%ebx, %ebx
	movq	%r12, %r14
	movq	%rsi, %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	leaq	-60(%rbp), %rcx
	callq	*40(%r14)
	movss	-60(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	callq	_LittleFloat
	movq	(%r13,%rbx,8), %rcx
	movl	%eax, (%rcx)
	movss	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	callq	_LittleFloat
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movq	(%r13,%rbx,8), %rcx
	movl	%eax, 4(%rcx)
	incq	%rbx
	cmpq	%rbx, %rdx
	jne	LBB0_8
## %bb.9:
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%rdx, %rcx
	shlq	$2, %rcx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %rax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	addq	$392, %r13                      ## imm = 0x188
	movq	%r15, %rax
	xorl	%r15d, %r15d
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	leaq	-60(%rbp), %rcx
	callq	*32(%rbx)
	movss	-60(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movq	_MD3_XYZ_SCALE@GOTPCREL(%rip), %r12
	divss	(%r12), %xmm0
	cvttss2si	%xmm0, %eax
	movswl	%ax, %edi
	callq	_LittleShort
	movq	(%r13), %rcx
	movq	%rax, (%rcx)
	movss	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	divss	(%r12), %xmm0
	cvttss2si	%xmm0, %eax
	movswl	%ax, %edi
	callq	_LittleShort
	movq	(%r13), %rcx
	movq	%rax, 8(%rcx)
	movss	-52(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	divss	(%r12), %xmm0
	cvttss2si	%xmm0, %eax
	movswl	%ax, %edi
	callq	_LittleShort
	movq	(%r13), %rcx
	movq	%rax, 16(%rcx)
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	leaq	-72(%rbp), %r12
	movq	%r12, %rcx
	callq	*24(%rbx)
	movq	%r12, %rdi
	leaq	-82(%rbp), %rsi
	callq	_NormalToLatLong
	movswl	-82(%rbp), %edi
	callq	_LittleShort
	movq	%rax, -8(%r13)
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	leaq	-60(%rbp), %rsi
	callq	_AABBExtendByPoint
	incq	%r15
	addq	$16, %r13
	cmpq	%r15, -112(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_10
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MD3_IDENT,4,2                  ## @MD3_IDENT
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.comm	_MD3_XYZ_SCALE,4,2              ## @MD3_XYZ_SCALE
	.no_dead_strip	_SerialiseSurface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SerialiseSurface
_SerialiseSurface:                      ; @SerialiseSurface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, _MD3_IDENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MD3_IDENT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_LittleLong
	str	x0, [x24, #88]
	ldr	x8, [x21, #64]
Lloh6:
	adrp	x28, _MAX_QPATH@GOTPAGE
Lloh7:
	ldr	x28, [x28, _MAX_QPATH@GOTPAGEOFF]
	ldr	w2, [x28]
	ldr	w3, [x24, #80]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	str	xzr, [x24, #72]
	mov	w0, #1
	bl	_LittleLong
	str	x0, [x24, #64]
	ldr	x8, [x21]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x26, x0
	bl	_LittleLong
	str	x0, [x24, #56]
	ldr	x8, [x21, #8]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x23, x0
	bl	_LittleLong
	str	x0, [x24, #48]
	ldr	x8, [x21, #16]
	mov	x0, x20
	mov	x1, x22
	blr	x8
	mov	x25, x0
	bl	_LittleLong
	str	x0, [x24, #40]
	mov	w0, #96
	bl	_LittleLong
	str	x0, [x24, #32]
	lsl	w8, w26, #4
	add	w27, w8, #96
	mov	x0, x27
	bl	_LittleLong
	str	x0, [x24, #24]
	add	w27, w27, w25, lsl #3
	mov	x0, x27
	bl	_LittleLong
	str	x0, [x24, #16]
	add	w27, w27, w23, lsl #3
	mov	x0, x27
	bl	_LittleLong
	str	x0, [x24, #8]
	add	w0, w27, w23, lsl #4
	bl	_LittleLong
	str	x24, [sp]                       ; 8-byte Folded Spill
	str	x0, [x24]
	cbz	x26, LBB0_3
; %bb.1:
	mov	x27, #0
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x24, x8, #392
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #56]
	ldr	w3, [x28]
	ldr	w4, [x24]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x27
	blr	x8
	stur	xzr, [x24, #-8]
	add	x27, x27, #1
	add	x24, x24, #16
	cmp	x26, x27
	b.ne	LBB0_2
LBB0_3:
	cbz	x25, LBB0_6
; %bb.4:
	mov	x27, #0
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x8, x8, x26, lsl #6
	add	x28, x8, #384
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #48]
	add	x3, sp, #28
	mov	x0, x20
	mov	x1, x22
	mov	x2, x27
	blr	x8
	lsl	x24, x27, #3
	ldr	w0, [sp, #28]
	bl	_LittleLong
	ldr	x8, [x28, x24]
	str	x0, [x8]
	ldr	w0, [sp, #32]
	bl	_LittleLong
	ldr	x8, [x28, x24]
	str	x0, [x8, #8]
	ldr	w0, [sp, #36]
	bl	_LittleLong
	ldr	x8, [x28, x24]
	str	x0, [x8, #16]
	add	x27, x27, #1
	cmp	x25, x27
	b.ne	LBB0_5
LBB0_6:
	cbz	x23, LBB0_11
; %bb.7:
	mov	x27, #0
	lsl	x28, x26, #3
	add	x8, x28, x25, lsl #2
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x8, x9, x8, lsl #3
	add	x26, x8, #384
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #40]
	add	x3, sp, #28
	mov	x0, x20
	mov	x1, x22
	mov	x2, x27
	blr	x8
	lsl	x24, x27, #3
	ldr	s0, [sp, #28]
	bl	_LittleFloat
	ldr	x8, [x26, x24]
	str	w0, [x8]
	ldr	s0, [sp, #32]
	bl	_LittleFloat
	ldr	x8, [x26, x24]
	str	w0, [x8, #4]
	add	x27, x27, #1
	cmp	x23, x27
	b.ne	LBB0_8
; %bb.9:
	mov	x26, #0
	add	x8, x25, x23
	add	x8, x28, x8, lsl #2
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x8, x9, x8, lsl #3
	add	x24, x8, #392
Lloh8:
	adrp	x25, _MD3_XYZ_SCALE@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MD3_XYZ_SCALE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #32]
	add	x3, sp, #28
	mov	x0, x20
	mov	x1, x22
	mov	x2, x26
	blr	x8
	ldr	s0, [sp, #28]
	ldr	s1, [x25]
	fdiv	s0, s0, s1
	fcvtzs	w0, s0
	bl	_LittleShort
	ldr	x8, [x24]
	str	x0, [x8]
	ldr	s0, [sp, #32]
	ldr	s1, [x25]
	fdiv	s0, s0, s1
	fcvtzs	w0, s0
	bl	_LittleShort
	ldr	x8, [x24]
	str	x0, [x8, #8]
	ldr	s0, [sp, #36]
	ldr	s1, [x25]
	fdiv	s0, s0, s1
	fcvtzs	w0, s0
	bl	_LittleShort
	ldr	x8, [x24]
	str	x0, [x8, #16]
	ldr	x8, [x21, #24]
	add	x3, sp, #16
	mov	x0, x20
	mov	x1, x22
	mov	x2, x26
	blr	x8
	add	x0, sp, #16
	add	x1, sp, #14
	bl	_NormalToLatLong
	ldrsh	w0, [sp, #14]
	bl	_LittleShort
	stur	x0, [x24, #-8]
	add	x1, sp, #28
	mov	x0, x19
	bl	_AABBExtendByPoint
	add	x26, x26, #1
	add	x24, x24, #16
	cmp	x23, x26
	b.ne	LBB0_10
LBB0_11:
	ldr	x8, [sp, #40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MD3_IDENT,4,2                  ; @MD3_IDENT
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.comm	_MD3_XYZ_SCALE,4,2              ; @MD3_XYZ_SCALE
	.no_dead_strip	_SerialiseSurface
.subsections_via_symbols
