	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reloc_kmap
_reloc_kmap:                            ## @reloc_kmap
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_unmask_page
	movl	%eax, %edi
	callq	_kunmap_atomic
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_i915_gem_object_get_dirty_page
	movl	%eax, %edi
	callq	_kmap_atomic
	movq	%rax, %rbx
	movq	(%r12), %rdi
	callq	_unmask_flags
	orq	%rbx, %rax
	movq	%rax, (%r12)
	movq	%r14, 8(%r12)
	jmp	LBB0_6
LBB0_2:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_i915_gem_object_prepare_write
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_KMAP@GOTPCREL(%rip), %r13
	movq	_CLFLUSH_FLAGS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	andl	(%r13), %edi
	callq	_BUILD_BUG_ON
	movl	(%rbx), %edi
	orl	(%r13), %edi
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_BUILD_BUG_ON
	movl	-44(%rbp), %eax
	movl	(%r13), %ecx
	orl	%eax, %ecx
	movq	%rcx, (%r12)
	movq	%r15, 16(%r12)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_mb
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_KMAP,4,2                       ## @KMAP
	.comm	_CLFLUSH_FLAGS,4,2              ## @CLFLUSH_FLAGS
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.no_dead_strip	_reloc_kmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reloc_kmap
_reloc_kmap:                            ; @reloc_kmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x0, [x1]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_unmask_page
	bl	_kunmap_atomic
LBB0_2:
	mov	x0, x21
	mov	x1, x19
	bl	_i915_gem_object_get_dirty_page
	bl	_kmap_atomic
	mov	x21, x0
	ldr	x0, [x20]
	bl	_unmask_flags
	orr	x8, x0, x21
	stp	x8, x19, [x20]
	b	LBB0_5
LBB0_3:
	add	x1, sp, #12
	mov	x0, x21
	bl	_i915_gem_object_prepare_write
	cbz	w0, LBB0_6
; %bb.4:
	bl	_ERR_PTR
	mov	x21, x0
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh0:
	adrp	x22, _KMAP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KMAP@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _CLFLUSH_FLAGS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CLFLUSH_FLAGS@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w0, w9, w8
	bl	_BUILD_BUG_ON
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh4:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w0, w8, w9
	bl	_BUILD_BUG_ON
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	orr	w9, w9, w8
	str	x9, [x20]
	str	x21, [x20, #16]
	cbz	w8, LBB0_2
; %bb.7:
	bl	_mb
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KMAP,4,2                       ; @KMAP
	.comm	_CLFLUSH_FLAGS,4,2              ; @CLFLUSH_FLAGS
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.no_dead_strip	_reloc_kmap
.subsections_via_symbols
