	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ASE_GetSurfaceAnimation        ## -- Begin function ASE_GetSurfaceAnimation
	.p2align	4, 0x90
_ASE_GetSurfaceAnimation:               ## @ASE_GetSurfaceAnimation
	.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	_ase@GOTPCREL(%rip), %rax
	movq	8(%rax), %r15
	movslq	%edi, %r12
	shlq	$5, %r12
	movl	8(%r15,%r12), %ebx
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	cmpl	%r8d, %ebx
	movl	%ebx, %r13d
	cmovgl	%r8d, %r13d
	cmpl	$-1, %r8d
	cmovel	%ebx, %r13d
	cmpl	%r8d, %ebx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jg	LBB0_5
## %bb.3:
	cmpl	$-1, %r8d
	je	LBB0_5
## %bb.4:
	leaq	L_str(%rip), %rdi
	movl	%ecx, %r13d
	callq	_puts
	movl	%r13d, %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %r13d
LBB0_5:
	movl	%ecx, %eax
	notl	%eax
	addl	%edx, %eax
	xorl	%esi, %esi
	cmpl	$-1, %ecx
	cmovel	%esi, %eax
	addl	%r13d, %eax
	movl	%eax, (%r14)
	shll	$3, %eax
	leal	(%rax,%rax,2), %edi
	movl	$1, %esi
	movl	%edx, %r14d
	movl	%ecx, %ebx
	callq	_calloc
	testl	%r13d, %r13d
	jle	LBB0_25
## %bb.6:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r12), %rax
	addq	$16, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%r13d, %edx
	movq	16(%r15,%r12), %r13
	xorl	%r15d, %r15d
	movl	%r14d, %eax
	xorl	%ecx, %ecx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	incl	%ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	cmpq	%rdx, %r15
	je	LBB0_24
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	-104(%rbp), %r15                ## 8-byte Folded Reload
	jl	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	-88(%rbp), %r15                 ## 8-byte Folded Reload
	jle	LBB0_23
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movslq	%ecx, %rax
	leaq	(%rax,%rax,2), %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	20(%rbx,%r13,8), %edi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r14), %esi
	callq	_strcpy
	movl	16(%rbx,%r13,8), %edi
	movq	_ase@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_strcpy
	movq	(%r14), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	(%r15,%r15,4), %r14
	movl	(%rax,%r14,8), %r12d
	leal	(,%r12,4), %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, 8(%rbx,%r13,8)
	movl	%r12d, (%rbx,%r13,8)
	movq	-112(%rbp), %r13                ## 8-byte Reload
	testl	%r12d, %r12d
	jle	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	(,%r14,8), %r8
	addq	%r13, %r8
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx,%r14,8), %rdx
	movq	8(%rcx,%r14,8), %r9
	movq	24(%rcx,%r14,8), %r11
	leaq	(%rcx,%r14,8), %r10
	addq	$16, %r10
	xorl	%ecx, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=2
	incq	%rcx
	movslq	(%r8), %rsi
	addq	$16, %rax
	cmpq	%rsi, %rcx
	jge	LBB0_22
LBB0_12:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r9,%rcx,8), %r12
	movq	8(%rax), %r14
	movq	(%r12), %rdi
	leaq	(%rdi,%rdi,2), %rdi
	movl	8(%rdx,%rdi,4), %esi
	movq	(%r14), %rbx
	movl	%esi, (%rbx)
	movl	4(%rdx,%rdi,4), %esi
	movl	%esi, 4(%rbx)
	movl	(%rdx,%rdi,4), %esi
	movl	%esi, 8(%rbx)
	testq	%r11, %r11
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%r10), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%rdi,%rcx,8), %rsi
	movq	(%rsi), %rsi
	movl	4(%r11,%rsi,8), %edi
	movq	(%rax), %rbx
	movq	(%rbx), %rbx
	movl	%edi, (%rbx)
	movl	(%r11,%rsi,8), %esi
	movl	%esi, 4(%rbx)
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	8(%r12), %rsi
	leaq	(%rsi,%rsi,2), %rsi
	movl	8(%rdx,%rsi,4), %edi
	movq	8(%r14), %rbx
	movl	%edi, (%rbx)
	movl	4(%rdx,%rsi,4), %edi
	movl	%edi, 4(%rbx)
	movl	(%rdx,%rsi,4), %esi
	movl	%esi, 8(%rbx)
	testq	%r11, %r11
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%r10), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%rdi,%rcx,8), %rsi
	movq	8(%rsi), %rsi
	movl	4(%r11,%rsi,8), %edi
	movq	(%rax), %rbx
	movq	8(%rbx), %rbx
	movl	%edi, (%rbx)
	movl	(%r11,%rsi,8), %esi
	movl	%esi, 4(%rbx)
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	16(%r12), %rsi
	leaq	(%rsi,%rsi,2), %rsi
	movl	8(%rdx,%rsi,4), %edi
	movq	16(%r14), %rbx
	movl	%edi, (%rbx)
	movl	4(%rdx,%rsi,4), %edi
	movl	%edi, 4(%rbx)
	movl	(%rdx,%rsi,4), %esi
	movl	%esi, 8(%rbx)
	testq	%r11, %r11
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%r10), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	(%rsi,%rcx,8), %rsi
	movq	16(%rsi), %rsi
	movl	4(%r11,%rsi,8), %edi
	movq	(%rax), %rbx
	movq	16(%rbx), %rbx
	movl	%edi, (%rbx)
	movl	(%r11,%rsi,8), %esi
	movl	%esi, 4(%rbx)
	jmp	LBB0_21
LBB0_24:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_1:
	xorl	%eax, %eax
LBB0_25:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ase,16,3                       ## @ase
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ASE_GetSurfaceAnimation        ; -- Begin function ASE_GetSurfaceAnimation
	.p2align	2
_ASE_GetSurfaceAnimation:               ; @ASE_GetSurfaceAnimation
	.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
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
Lloh0:
	adrp	x8, _ase@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ase@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8, #8]
	add	x8, x25, x22, lsl #5
	ldr	w23, [x8, #8]
	cbz	w23, LBB0_22
; %bb.1:
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	cmp	w23, w4
	mov	w8, #-1
	ccmp	w4, w8, #4, gt
	csel	w26, w4, w23, ne
	cmp	w23, w4
	ccmn	w4, #1, #4, le
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_str@PAGE
Lloh4:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x26, x23
LBB0_3:
	mvn	w8, w21
	add	w8, w8, w19
	cmn	w21, #1
	csel	w8, wzr, w8, eq
	add	w8, w26, w8
	str	w8, [x20]
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #3
	mov	w1, #1
	bl	_calloc
	cmp	w26, #1
	b.lt	LBB0_23
; %bb.4:
	mov	x23, #0
	mov	w24, #0
	add	x8, x25, x22, lsl #5
	mov	x9, x8
	ldr	x20, [x9, #16]!
	stp	x9, x8, [sp, #16]               ; 16-byte Folded Spill
	add	x10, x8, #24
	sxtw	x11, w21
	sxtw	x8, w19
	stp	x11, x8, [sp, #32]              ; 16-byte Folded Spill
	mov	w9, w26
	mov	w27, #12
	stp	x9, x10, [sp]                   ; 16-byte Folded Spill
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w24, #1
	mov	x20, x25
	mov	x0, x19
	mov	x19, x22
	ldr	x9, [sp]                        ; 8-byte Folded Reload
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	cmp	x23, x9
	b.eq	LBB0_23
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cmn	w19, #1
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cmp	x23, x8
	b.lt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	x23, x8
	b.le	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x22, x19
	mov	x19, x0
	mov	w8, #24
	smaddl	x21, w24, w8, x0
	ldr	w0, [x21, #20]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w1, [x8]
	bl	_strcpy
	ldr	w0, [x21, #16]
Lloh5:
	adrp	x8, _ase@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ase@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	bl	_strcpy
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x25, [x8]
	mov	w8, #40
	madd	x26, x23, x8, x25
	ldr	w28, [x26]
	lsl	w0, w28, #2
	mov	w1, #1
	bl	_calloc
	str	x0, [x21, #8]
	str	w28, [x21]
	cmp	w28, #1
	b.lt	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x8, #0
	mov	w9, #40
	madd	x12, x23, x9, x20
	ldr	x9, [x12, #8]
	ldp	x11, x10, [x12, #24]
	add	x12, x12, #16
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x8, x8, #1
	ldrsw	x13, [x26]
	add	x0, x0, #16
	cmp	x8, x13
	b.ge	LBB0_5
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x14, [x9, x8, lsl #3]
	ldr	x13, [x0, #8]
	ldr	x15, [x14]
	madd	x15, x15, x27, x10
	ldr	w16, [x15, #8]
	ldr	x17, [x13]
	str	w16, [x17]
	ldr	w16, [x15, #4]
	str	w16, [x17, #4]
	ldr	w15, [x15]
	str	w15, [x17, #8]
	cbz	x11, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x15, [x12]
	cbz	x15, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x15, [x15, x8, lsl #3]
	ldr	x15, [x15]
	add	x15, x11, x15, lsl #3
	ldr	w16, [x15, #4]
	ldr	x17, [x0]
	ldr	x17, [x17]
	str	w16, [x17]
	ldr	w15, [x15]
	str	w15, [x17, #4]
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x15, [x14, #8]
	madd	x15, x15, x27, x10
	ldr	w16, [x15, #8]
	ldr	x17, [x13, #8]
	str	w16, [x17]
	ldr	w16, [x15, #4]
	str	w16, [x17, #4]
	ldr	w15, [x15]
	str	w15, [x17, #8]
	cbz	x11, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x15, [x12]
	cbz	x15, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x15, [x15, x8, lsl #3]
	ldr	x15, [x15, #8]
	add	x15, x11, x15, lsl #3
	ldr	w16, [x15, #4]
	ldr	x17, [x0]
	ldr	x17, [x17, #8]
	str	w16, [x17]
	ldr	w15, [x15]
	str	w15, [x17, #4]
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=2
	ldr	x14, [x14, #16]
	madd	x14, x14, x27, x10
	ldr	w15, [x14, #8]
	ldr	x13, [x13, #16]
	str	w15, [x13]
	ldr	w15, [x14, #4]
	str	w15, [x13, #4]
	ldr	w14, [x14]
	str	w14, [x13, #8]
	cbz	x11, LBB0_12
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x13, [x12]
	cbz	x13, LBB0_12
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x13, [x13, x8, lsl #3]
	ldr	x13, [x13, #16]
	add	x13, x11, x13, lsl #3
	ldr	w14, [x13, #4]
	ldr	x15, [x0]
	ldr	x15, [x15, #16]
	str	w14, [x15]
	ldr	w13, [x13]
	str	w13, [x15, #4]
	b	LBB0_12
LBB0_22:
	mov	x0, #0
LBB0_23:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ase,16,3                       ; @ase
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"WARNING: ASE_GetSurfaceAnimation maxFrames > numFramesInAnimation"

.subsections_via_symbols
