	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxl_map_adapter_regs
_cxl_map_adapter_regs:                  ## @cxl_map_adapter_regs
	.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, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdx
	movq	%rsi, %rdi
	movl	$2, %esi
	callq	_pci_request_region
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_request_region
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	_p1_base
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_p1_size
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_p2_base
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_p2_size
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_pr_devel
	movq	%rbx, %rdi
	callq	_p1_base
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_p1_size
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ioremap
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_p2_base
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_p2_size
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ioremap
	movq	%rax, %rcx
	movq	(%r14), %rdx
	movq	%rax, 8(%rdx)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.4:
	movq	(%rdx), %rdi
	callq	_iounmap
	movq	(%r14), %rax
	movq	$0, (%rax)
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_release_region
LBB0_6:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_pci_release_region
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"priv 2 regs"

L_.str.1:                               ## @.str.1
	.asciz	"priv 1 regs"

L_.str.2:                               ## @.str.2
	.asciz	"cxl_map_adapter_regs: p1: %#016llx %#llx, p2: %#016llx %#llx"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_cxl_map_adapter_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxl_map_adapter_regs
_cxl_map_adapter_regs:                  ; @cxl_map_adapter_regs
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x1
	mov	w1, #2
	bl	_pci_request_region
	cbnz	x0, LBB0_8
; %bb.1:
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_pci_request_region
	cbnz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_p1_base
	mov	x21, x0
	mov	x0, x19
	bl	_p1_size
	mov	x22, x0
	mov	x0, x19
	bl	_p2_base
	mov	x23, x0
	mov	x0, x19
	bl	_p2_size
	mov	x4, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_pr_devel
	mov	x0, x19
	bl	_p1_base
	mov	x21, x0
	mov	x0, x19
	bl	_p1_size
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	ldr	x8, [x20]
	str	x0, [x8]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_p2_base
	mov	x21, x0
	mov	x0, x19
	bl	_p2_size
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	ldr	x8, [x20]
	str	x0, [x8, #8]
	cbz	x0, LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	ldr	x0, [x8]
	bl	_iounmap
	ldr	x8, [x20]
	str	xzr, [x8]
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_pci_release_region
LBB0_7:
	mov	x0, x19
	mov	w1, #2
	bl	_pci_release_region
LBB0_8:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"priv 2 regs"

l_.str.1:                               ; @.str.1
	.asciz	"priv 1 regs"

l_.str.2:                               ; @.str.2
	.asciz	"cxl_map_adapter_regs: p1: %#016llx %#llx, p2: %#016llx %#llx"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_cxl_map_adapter_regs
.subsections_via_symbols
