	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_earliest_filled_buffer
_find_earliest_filled_buffer:           ## @find_earliest_filled_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.2:
	movq	8(%rdi), %r8
	movq	_FRAME_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	leaq	8(%r8), %rdi
	movl	$-1, %eax
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	addq	$16, %rdi
	cmpq	%rdx, %r9
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r10, -8(%rdi)
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdi), %r11
	movl	%eax, %esi
	shlq	$4, %rsi
	movl	%edx, %ecx
	cmpq	8(%r8,%rsi), %r11
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%edx, %eax
	jmp	LBB0_9
LBB0_10:
	popq	%rbp
	retq
LBB0_1:
	movl	$-1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRAME_READY,8,3                ## @FRAME_READY
	.no_dead_strip	_find_earliest_filled_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_earliest_filled_buffer
_find_earliest_filled_buffer:           ; @find_earliest_filled_buffer
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x9, #0
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x11, _FRAME_READY@GOTPAGE
Lloh1:
	ldr	x11, [x11, _FRAME_READY@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	add	x12, x10, #8
	mov	w0, #-1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x12]
	add	x14, x10, w0, uxtw #4
	ldr	x14, [x14, #8]
	cmp	x13, x14
	csel	w0, w9, w0, lt
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	add	x12, x12, #16
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x12, #-8]
	cmp	x13, x11
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	tbz	w0, #31, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x9
	b	LBB0_3
LBB0_7:
	ret
LBB0_8:
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FRAME_READY,8,3                ; @FRAME_READY
	.no_dead_strip	_find_earliest_filled_buffer
.subsections_via_symbols
