	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_gem_object_put_pages_phys
_i915_gem_object_put_pages_phys:        ## @i915_gem_object_put_pages_phys
	.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, %rbx
	movq	%rdi, %r12
	xorl	%edx, %edx
	callq	___i915_gem_object_release_shmem
	cmpl	$0, 24(%r12)
	je	LBB0_10
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movq	16(%r12), %rax
	movq	(%rax), %r15
	movq	(%r12), %rax
	movq	(%rax), %r13
	xorl	%ebx, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_put_page
	movslq	(%r12), %rcx
	addq	%rcx, %r13
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	8(%r12), %eax
	cltd
	idivl	%ecx
	cmpl	%eax, %ebx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_shmem_read_mapping_page
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_kmap_atomic
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	%rax, %r15
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_drm_clflush_virt_range
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_memcpy
	movq	%r15, %rdi
	callq	_kunmap_atomic
	movq	%r14, %rdi
	callq	_set_page_dirty
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax), %rax
	movq	_I915_MADV_WILLNEED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_mark_page_accessed
	jmp	LBB0_7
LBB0_9:
	movl	$0, 24(%r12)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_10:
	movq	%rbx, %rdi
	callq	_sg_free_table
	movq	%rbx, %rdi
	callq	_kfree
	movl	12(%r12), %edi
	movq	(%r12), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_pci_free                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_I915_MADV_WILLNEED,8,3         ## @I915_MADV_WILLNEED
	.no_dead_strip	_i915_gem_object_put_pages_phys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_gem_object_put_pages_phys
_i915_gem_object_put_pages_phys:        ; @i915_gem_object_put_pages_phys
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w2, #0
	bl	___i915_gem_object_release_shmem
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_10
; %bb.1:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x26]
	sdiv	w8, w8, w9
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	w21, #0
	ldr	x8, [x19, #16]
	ldr	x22, [x8]
	ldr	x8, [x19]
	ldr	x23, [x8]
Lloh2:
	adrp	x27, _I915_MADV_WILLNEED@GOTPAGE
Lloh3:
	ldr	x27, [x27, _I915_MADV_WILLNEED@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_put_page
	ldrsw	x8, [x26]
	add	x23, x23, x8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	ldr	w9, [x19, #8]
	sdiv	w8, w9, w8
	cmp	w21, w8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_shmem_read_mapping_page
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	b	LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_kmap_atomic
	mov	x25, x0
	ldr	w1, [x26]
	mov	x0, x23
	bl	_drm_clflush_virt_range
	ldr	w2, [x26]
	mov	x0, x25
	mov	x1, x23
	bl	_memcpy
	mov	x0, x25
	bl	_kunmap_atomic
	mov	x0, x24
	bl	_set_page_dirty
	ldr	x8, [x19, #32]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_mark_page_accessed
	b	LBB0_3
LBB0_9:
	str	wzr, [x19, #24]
LBB0_10:
	mov	x0, x20
	bl	_sg_free_table
	mov	x0, x20
	bl	_kfree
	ldr	w0, [x19, #12]
	ldr	x1, [x19]
	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
	b	_drm_pci_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_I915_MADV_WILLNEED,8,3         ; @I915_MADV_WILLNEED
	.no_dead_strip	_i915_gem_object_put_pages_phys
.subsections_via_symbols
