	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_bo_kmap_atomic_page        ## -- Begin function qxl_bo_kmap_atomic_page
	.p2align	4, 0x90
_qxl_bo_kmap_atomic_page:               ## @qxl_bo_kmap_atomic_page
	.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	%rsi, %r15
	movq	8(%rsi), %rax
	movq	24(%rsi), %rcx
	leaq	(,%rax,4), %rbx
	addq	(%rcx), %rbx
	movl	%edx, %r14d
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	addq	$8, %rdi
	jmp	LBB0_2
LBB0_3:
	movq	_TTM_PL_PRIV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_2:
	leaq	8(%r15), %r12
	movq	(%rdi), %r13
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ttm_mem_io_lock
	movq	24(%r15), %rdi
	movq	%r12, %rsi
	callq	_ttm_mem_io_reserve
	movq	%rbx, %rdi
	callq	_ttm_mem_io_unlock
	movslq	%r14d, %rsi
	addq	16(%r15), %rsi
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_io_mapping_map_atomic_wc       ## TAILCALL
LBB0_4:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	%r14d, %rdx
	imulq	%rcx, %rdx
	addq	%rdx, %rax
	jmp	LBB0_9
LBB0_6:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_qxl_bo_kmap
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movslq	%r14d, %rax
	imulq	%rcx, %rax
	addq	-48(%rbp), %rax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_VRAM,8,3                ## @TTM_PL_VRAM
	.comm	_TTM_PL_PRIV,8,3                ## @TTM_PL_PRIV
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_bo_kmap_atomic_page        ; -- Begin function qxl_bo_kmap_atomic_page
	.p2align	2
_qxl_bo_kmap_atomic_page:               ; @qxl_bo_kmap_atomic_page
	.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, x1
	ldr	x8, [x21, #8]!
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
Lloh0:
	adrp	x10, _TTM_PL_VRAM@GOTPAGE
Lloh1:
	ldr	x10, [x10, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
	add	x0, x0, #8
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x10, _TTM_PL_PRIV@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TTM_PL_PRIV@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_4
LBB0_3:
	add	x22, x9, x8, lsl #2
	ldr	x23, [x0]
	mov	x0, x22
	mov	w1, #0
	bl	_ttm_mem_io_lock
	ldr	x0, [x20, #24]
	mov	x1, x21
	bl	_ttm_mem_io_reserve
	mov	x0, x22
	bl	_ttm_mem_io_unlock
	ldr	x8, [x20, #16]
	add	x1, x8, w19, sxtw
	mov	x0, x23
	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
	b	_io_mapping_map_atomic_wc
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldrsw	x9, [x9]
	sxtw	x10, w19
	madd	x0, x9, x10, x8
	b	LBB0_9
LBB0_6:
	add	x1, sp, #8
	mov	x0, x20
	bl	_qxl_bo_kmap
	cbz	w0, LBB0_8
; %bb.7:
	mov	x0, #0
	b	LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x9, w19
	ldr	x10, [sp, #8]
	madd	x0, x8, x9, x10
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_VRAM,8,3                ; @TTM_PL_VRAM
	.comm	_TTM_PL_PRIV,8,3                ; @TTM_PL_PRIV
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
