	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_pages
_put_pages:                             ## @put_pages
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_to_msm_bo
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	movq	_MSM_BO_WC@GOTPCREL(%rip), %rax
	movq	_MSM_BO_UNCACHED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_sync_for_cpu
	movq	16(%rbx), %rdi
LBB0_4:
	callq	_sg_free_table
	movq	16(%rbx), %rdi
	callq	_kfree
LBB0_5:
	movq	%r14, %rdi
	callq	_use_pages
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_drm_gem_put_pages
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_put_pages_vram
LBB0_8:
	movq	$0, 8(%rbx)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSM_BO_WC,4,2                  ## @MSM_BO_WC
	.comm	_MSM_BO_UNCACHED,4,2            ## @MSM_BO_UNCACHED
	.no_dead_strip	_put_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_pages
_put_pages:                             ; @put_pages
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_to_msm_bo
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MSM_BO_WC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSM_BO_WC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _MSM_BO_UNCACHED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MSM_BO_UNCACHED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_sync_for_cpu
	ldr	x0, [x19, #16]
LBB0_4:
	bl	_sg_free_table
	ldr	x0, [x19, #16]
	bl	_kfree
LBB0_5:
	mov	x0, x20
	bl	_use_pages
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x1, [x19, #8]
	mov	x0, x20
	mov	w2, #1
	mov	w3, #0
	bl	_drm_gem_put_pages
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_put_pages_vram
LBB0_8:
	str	xzr, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSM_BO_WC,4,2                  ; @MSM_BO_WC
	.comm	_MSM_BO_UNCACHED,4,2            ; @MSM_BO_UNCACHED
	.no_dead_strip	_put_pages
.subsections_via_symbols
