	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avs2_find_frame_end
_avs2_find_frame_end:                   ## @avs2_find_frame_end
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r12
	movl	(%rdi), %ecx
	movl	4(%rdi), %r15d
	xorl	%r13d, %r13d
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.6:
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_7:
	cmpl	%ebx, %r13d
	jge	LBB0_15
## %bb.8:
	movq	_SLICE_MAX_START_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %eax
	movl	%ebx, %esi
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rax
	cmpq	%rax, %rsi
	je	LBB0_15
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	shll	$8, %r15d
	orl	(%r12,%rax,4), %r15d
	movl	%r15d, %ebx
	andl	$-256, %ebx
	cmpl	$256, %ebx                      ## imm = 0x100
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%edx, %r15d
	jle	LBB0_14
## %bb.11:
	movabsq	$-4294967296, %rcx              ## imm = 0xFFFFFFFF00000000
	movq	%rcx, (%rdi)
	addl	$-3, %eax
	jmp	LBB0_17
LBB0_1:
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.3:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	shll	$8, %r15d
	movl	(%r12,%r13,4), %edi
	orl	%edi, %r15d
	callq	_ISUNIT
	testq	%rax, %rax
	jne	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	cmpq	%r13, %r14
	jne	LBB0_4
## %bb.13:
	xorl	%ecx, %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_2:
	xorl	%ecx, %ecx
LBB0_15:
	movl	%ecx, (%rdi)
	movl	%r15d, 4(%rdi)
LBB0_16:
	movq	_END_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	incl	%r13d
	movl	$1, %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_7
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_END_NOT_FOUND,4,2              ## @END_NOT_FOUND
	.comm	_SLICE_MAX_START_CODE,4,2       ## @SLICE_MAX_START_CODE
	.no_dead_strip	_avs2_find_frame_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avs2_find_frame_end
_avs2_find_frame_end:                   ; @avs2_find_frame_end
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	w8, w22, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	mov	w11, #0
	cbz	w21, LBB0_12
LBB0_2:
	cmp	w11, w21
	b.ge	LBB0_11
; %bb.3:
Lloh0:
	adrp	x9, _SLICE_MAX_START_CODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SLICE_MAX_START_CODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w12, w21
	sub	w0, w11, #3
	add	x10, x20, w11, uxtw #2
	sub	x11, x12, w11, uxtw
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	orr	w22, w12, w22, lsl #8
	and	w12, w22, #0xffffff00
	cmp	w12, #256
	ccmp	w22, w9, #4, eq
	b.gt	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w0, w0, #1
	add	x10, x10, #4
	subs	x11, x11, #1
	b.ne	LBB0_4
	b	LBB0_11
LBB0_6:
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x23, #0
	mov	w24, w21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, x23, lsl #2]
	orr	w22, w0, w22, lsl #8
	bl	_ISUNIT
	cbnz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_8
LBB0_10:
	mov	w8, #0
LBB0_11:
	stp	w8, w22, [x19]
LBB0_12:
Lloh3:
	adrp	x8, _END_NOT_FOUND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _END_NOT_FOUND@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	movi	d0, #0xffffffff00000000
	str	d0, [x19]
	b	LBB0_13
LBB0_15:
	add	w11, w23, #1
	mov	w8, #1
	cbnz	w21, LBB0_2
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_END_NOT_FOUND,4,2              ; @END_NOT_FOUND
	.comm	_SLICE_MAX_START_CODE,4,2       ; @SLICE_MAX_START_CODE
	.no_dead_strip	_avs2_find_frame_end
.subsections_via_symbols
