	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amd_ntb_init_pci
_amd_ntb_init_pci:                      ## @amd_ntb_init_pci
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movq	%r14, %rsi
	callq	_pci_set_drvdata
	movq	%r15, %rdi
	callq	_pci_enable_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	_NTB_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_request_regions
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%r15, %rdi
	callq	_pci_set_master
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_5:
	movl	$64, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_8:
	leaq	16(%r14), %rbx
	movq	%r15, %rdi
	callq	_dma_get_mask
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_coerce_mask_and_coherent
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	%r15, %rdi
	callq	_pci_clear_master
LBB0_12:
	movq	%r15, %rdi
	callq	_pci_disable_device
LBB0_13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_set_drvdata
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_pci_iomap
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.15:
	movq	_AMD_PEER_OFFSET@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_14
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_NTB_NAME,4,2                   ## @NTB_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot DMA highmem\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot DMA consistent highmem\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AMD_PEER_OFFSET,8,3            ## @AMD_PEER_OFFSET
	.no_dead_strip	_amd_ntb_init_pci
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amd_ntb_init_pci
_amd_ntb_init_pci:                      ; @amd_ntb_init_pci
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, x20
	bl	_pci_set_drvdata
	mov	x0, x19
	bl	_pci_enable_device
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.1:
Lloh0:
	adrp	x8, _NTB_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NTB_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.2:
	mov	x0, x19
	bl	_pci_set_master
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_5:
	mov	w0, #64
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_consistent_dma_mask
	cbz	w0, LBB0_8
; %bb.6:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_consistent_dma_mask
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_8:
	add	x21, x20, #16
	mov	x0, x19
	bl	_dma_get_mask
	mov	x1, x0
	mov	x0, x21
	bl	_dma_coerce_mask_and_coherent
	mov	x21, x0
	cbz	w0, LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_pci_clear_master
LBB0_10:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_11:
	mov	x0, x19
	mov	x1, #0
	bl	_pci_set_drvdata
LBB0_12:
	mov	x0, x21
	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
LBB0_13:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_pci_iomap
	str	x0, [x20]
	cbz	x0, LBB0_15
; %bb.14:
	mov	w21, #0
Lloh7:
	adrp	x8, _AMD_PEER_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AMD_PEER_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x8, x8, x0
	str	x8, [x20, #8]
	b	LBB0_12
LBB0_15:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NTB_NAME,4,2                   ; @NTB_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot DMA highmem\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot DMA consistent highmem\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AMD_PEER_OFFSET,8,3            ; @AMD_PEER_OFFSET
	.no_dead_strip	_amd_ntb_init_pci
.subsections_via_symbols
