	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar_search_last_active_buffer
_ar_search_last_active_buffer:          ## @ar_search_last_active_buffer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movl	(%rdi), %r13d
	callq	_ar_first_buffer_index
	movl	%eax, %r12d
	movq	8(%r15), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %edi
	callq	_READ_ONCE
	movq	%rax, %rbx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	cmpl	%r13d, %r12d
	jne	LBB0_2
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %r12d
	cmpl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %edi
	callq	_ar_next_buffer_index
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_rmb
	movq	8(%r15), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %edi
	callq	_READ_ONCE
	movq	%rax, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_cpu_to_le16
	cmpq	%rax, %rbx
	jne	LBB0_1
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_AR_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%r14), %eax
	jbe	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_ar_next_buffer_index
	movl	%eax, %r13d
	xorl	%eax, %eax
	callq	_rmb
	movq	8(%r15), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %edi
	callq	_READ_ONCE
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_cpu_to_le16
	cmpq	%rax, %rbx
	jne	LBB0_1
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	xorl	%eax, %eax
	callq	_rmb
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r13d
	movq	%rbx, %rdi
	callq	_le16_to_cpu
	subl	%eax, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	cmpl	(%r14), %r13d
	jbe	LBB0_10
## %bb.9:
	movl	$0, (%rax)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_ar_context_abort
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MAX_AR_PACKET_SIZE,4,2         ## @MAX_AR_PACKET_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"corrupted descriptor"

	.no_dead_strip	_ar_search_last_active_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar_search_last_active_buffer
_ar_search_last_active_buffer:          ; @ar_search_last_active_buffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w25, [x0]
	bl	_ar_first_buffer_index
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8, w0, uxtw #2]
	bl	_READ_ONCE
	cmp	w21, w25
	ccmp	x0, #0, #0, ne
Lloh0:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	b.eq	LBB0_2
; %bb.1:
	mov	x22, x0
	b	LBB0_9
LBB0_2:
Lloh2:
	adrp	x26, _MAX_AR_PACKET_SIZE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MAX_AR_PACKET_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ar_next_buffer_index
	mov	x23, x0
	bl	_rmb
	ldr	x8, [x19, #8]
	ldr	w0, [x8, w23, uxtw #2]
	bl	_READ_ONCE
	mov	x22, x0
	ldr	w0, [x24]
	bl	_cpu_to_le16
	cmp	x22, x0
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ls	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_ar_next_buffer_index
	mov	x23, x0
	bl	_rmb
	ldr	x8, [x19, #8]
	ldr	w0, [x8, w23, uxtw #2]
	bl	_READ_ONCE
	mov	x22, x0
	ldr	w0, [x24]
	bl	_cpu_to_le16
	cmp	x22, x0
	b.eq	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x23
	cmp	w23, w25
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x22, LBB0_3
	b	LBB0_9
LBB0_8:
	mov	x22, #0
LBB0_9:
	bl	_rmb
	ldr	w23, [x24]
	mov	x0, x22
	bl	_le16_to_cpu
	sub	w8, w23, w0
	str	w8, [x20]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ls	LBB0_11
; %bb.10:
	str	wzr, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ar_context_abort
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MAX_AR_PACKET_SIZE,4,2         ; @MAX_AR_PACKET_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"corrupted descriptor"

	.no_dead_strip	_ar_search_last_active_buffer
.subsections_via_symbols
