	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_mem_reg_ioremap            ## -- Begin function ttm_mem_reg_ioremap
	.p2align	4, 0x90
_ttm_mem_reg_ioremap:                   ## @ttm_mem_reg_ioremap
	.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, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rbx
	shlq	$2, %rbx
	addq	(%rdi), %rbx
	movq	$0, (%rdx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ttm_mem_io_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ttm_mem_io_reserve
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_ttm_mem_io_unlock
	testl	%r13d, %r13d
	jne	LBB0_10
## %bb.1:
	cmpl	$0, 48(%r14)
	je	LBB0_9
## %bb.2:
	movq	40(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	_TTM_PL_FLAG_WC@GOTPCREL(%rip), %rax
	movq	24(%r14), %rdi
	addq	32(%r14), %rdi
	movl	(%rax), %eax
	movl	16(%r14), %esi
	testl	%eax, 8(%r14)
	je	LBB0_5
## %bb.4:
	callq	_ioremap_wc
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	%rax, (%r12)
LBB0_9:
	xorl	%r13d, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	_ioremap_nocache
	testq	%rax, %rax
	jne	LBB0_8
LBB0_7:
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ttm_mem_io_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ttm_mem_io_free
	movq	%rbx, %rdi
	callq	_ttm_mem_io_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_FLAG_WC,4,2             ## @TTM_PL_FLAG_WC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_mem_reg_ioremap            ; -- Begin function ttm_mem_reg_ioremap
	.p2align	2
_ttm_mem_reg_ioremap:                   ; @ttm_mem_reg_ioremap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x9, [x1]
	add	x20, x8, x9, lsl #2
	str	xzr, [x2]
	mov	x0, x20
	mov	w1, #0
	bl	_ttm_mem_io_lock
	mov	x0, x21
	mov	x1, x19
	bl	_ttm_mem_io_reserve
	mov	x23, x0
	mov	x0, x20
	bl	_ttm_mem_io_unlock
	cbnz	w23, LBB0_9
; %bb.1:
	ldr	w8, [x19, #48]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x0, [x19, #40]
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _TTM_PL_FLAG_WC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_PL_FLAG_WC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldp	x11, x10, [x19, #24]
	add	x0, x11, x10
	ldr	w1, [x19, #16]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	bl	_ioremap_wc
	cbz	x0, LBB0_8
LBB0_5:
	mov	w23, #0
	str	x0, [x22]
	b	LBB0_9
LBB0_6:
	mov	w23, #0
	b	LBB0_9
LBB0_7:
	bl	_ioremap_nocache
	cbnz	x0, LBB0_5
LBB0_8:
	mov	x0, x20
	mov	w1, #0
	bl	_ttm_mem_io_lock
	mov	x0, x21
	mov	x1, x19
	bl	_ttm_mem_io_free
	mov	x0, x20
	bl	_ttm_mem_io_unlock
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_FLAG_WC,4,2             ; @TTM_PL_FLAG_WC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
