	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i810_driver_reclaim_buffers    ## -- Begin function i810_driver_reclaim_buffers
	.p2align	4, 0x90
_i810_driver_reclaim_buffers:           ## @i810_driver_reclaim_buffers
	.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
	movq	8(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_12
## %bb.1:
	cmpl	$0, (%rdi)
	je	LBB0_12
## %bb.2:
	cmpq	$0, 8(%r12)
	je	LBB0_12
## %bb.3:
	movq	%rsi, %r15
	callq	_i810_flush_queue
	cmpl	$0, (%r12)
	jle	LBB0_12
## %bb.4:
	xorl	%ebx, %ebx
	movq	_I810_BUF_CLIENT@GOTPCREL(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rax), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r14), %edi
	movl	(%r13), %esi
	movq	_I810_BUF_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_cmpxchg
	cmpl	(%r13), %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rax
	movq	_I810_BUF_MAPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_I810_BUF_UNMAPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I810_BUF_CLIENT,4,2            ## @I810_BUF_CLIENT
	.comm	_I810_BUF_FREE,4,2              ## @I810_BUF_FREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reclaimed from client\n"

	.comm	_I810_BUF_MAPPED,8,3            ## @I810_BUF_MAPPED
	.comm	_I810_BUF_UNMAPPED,8,3          ## @I810_BUF_UNMAPPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i810_driver_reclaim_buffers    ; -- Begin function i810_driver_reclaim_buffers
	.p2align	2
_i810_driver_reclaim_buffers:           ; @i810_driver_reclaim_buffers
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_11
; %bb.1:
	ldr	w8, [x0]
	cbz	w8, LBB0_11
; %bb.2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_11
; %bb.3:
	mov	x19, x1
	bl	_i810_flush_queue
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.4:
	mov	x22, #0
Lloh0:
	adrp	x23, _I810_BUF_CLIENT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I810_BUF_CLIENT@GOTPAGEOFF]
Lloh2:
	adrp	x24, _I810_BUF_FREE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _I810_BUF_FREE@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
Lloh6:
	adrp	x25, _I810_BUF_MAPPED@GOTPAGE
Lloh7:
	ldr	x25, [x25, _I810_BUF_MAPPED@GOTPAGEOFF]
Lloh8:
	adrp	x26, _I810_BUF_UNMAPPED@GOTPAGE
Lloh9:
	ldr	x26, [x26, _I810_BUF_UNMAPPED@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldp	x8, x27, [x8]
	cmp	x8, x19
	ccmp	x27, #0, #4, eq
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x27, #8]
	ldr	w1, [x23]
	ldr	w2, [x24]
	bl	_cmpxchg
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_DRM_DEBUG
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	str	x8, [x27]
	b	LBB0_5
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I810_BUF_CLIENT,4,2            ; @I810_BUF_CLIENT
	.comm	_I810_BUF_FREE,4,2              ; @I810_BUF_FREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reclaimed from client\n"

	.comm	_I810_BUF_MAPPED,8,3            ; @I810_BUF_MAPPED
	.comm	_I810_BUF_UNMAPPED,8,3          ; @I810_BUF_UNMAPPED
.subsections_via_symbols
