	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_remap_bar
_nvme_remap_bar:                        ## @nvme_remap_bar
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	24(%rdi), %edi
	callq	_to_pci_dev
	xorl	%ebx, %ebx
	cmpq	%r14, (%r15)
	jae	LBB0_9
## %bb.1:
	movq	%rax, %r12
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	cmpq	%r14, %rax
	jae	LBB0_3
## %bb.2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_3:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_iounmap
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_ioremap
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r14, (%r15)
	movq	_NVME_REG_DBS@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 16(%r15)
	jmp	LBB0_9
LBB0_7:
	movq	$0, (%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NVME_REG_DBS,8,3               ## @NVME_REG_DBS
	.no_dead_strip	_nvme_remap_bar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_remap_bar
_nvme_remap_bar:                        ; @nvme_remap_bar
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_to_pci_dev
	ldr	x8, [x19]
	cmp	x8, x20
	b.hs	LBB0_6
; %bb.1:
	mov	x21, x0
	mov	w1, #0
	bl	_pci_resource_len
	cmp	x0, x20
	b.lo	LBB0_8
; %bb.2:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_iounmap
LBB0_4:
	mov	x0, x21
	mov	w1, #0
	bl	_pci_resource_start
	mov	x1, x20
	bl	_ioremap
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	str	x20, [x19]
Lloh0:
	adrp	x9, _NVME_REG_DBS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_REG_DBS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19, #16]
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	str	xzr, [x19]
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NVME_REG_DBS,8,3               ; @NVME_REG_DBS
	.no_dead_strip	_nvme_remap_bar
.subsections_via_symbols
