	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen3_init_ntb
_gen3_init_ntb:                         ## @gen3_init_ntb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_XEON_MW_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rdi)
	movq	_GEN3_SPAD_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rdi)
	movq	_GEN3_DB_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movq	_GEN3_DB_LINK_BIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%rdi)
	movq	_NTB_HWERR_MSIX_VECTOR32_BAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rdi)
	je	LBB0_2
## %bb.1:
	movl	$31, %edi
	callq	_BIT_ULL
	orq	%rax, 64(%rbx)
LBB0_2:
	movl	40(%rbx), %eax
	movl	%eax, %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	jne	LBB0_8
## %bb.3:
	movq	_gen3_pri_reg@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rbx)
	movq	_gen3_b2b_reg@GOTPCREL(%rip), %rcx
	movq	%rcx, 56(%rbx)
	movq	_gen3_sec_xlat@GOTPCREL(%rip), %rcx
	movq	%rcx, 48(%rbx)
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.4:
	movq	_xeon_b2b_dsd_addr@GOTPCREL(%rip), %rsi
	movq	_xeon_b2b_usd_addr@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movq	_xeon_b2b_usd_addr@GOTPCREL(%rip), %rsi
	movq	_xeon_b2b_dsd_addr@GOTPCREL(%rip), %rdx
LBB0_6:
	movq	%rbx, %rdi
	callq	_gen3_setup_b2b_mw
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %rax
	movq	_PCI_COMMAND_MASTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_GEN3_SPCICMD_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite16
	movl	(%rbx), %edi
	callq	_BIT_ULL
	leaq	-1(%rax), %rdi
	movq	%rdi, 24(%rbx)
	movq	8(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	*(%rcx)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XEON_MW_COUNT,4,2              ## @XEON_MW_COUNT
	.comm	_GEN3_SPAD_COUNT,4,2            ## @GEN3_SPAD_COUNT
	.comm	_GEN3_DB_COUNT,4,2              ## @GEN3_DB_COUNT
	.comm	_GEN3_DB_LINK_BIT,8,3           ## @GEN3_DB_LINK_BIT
	.comm	_NTB_HWERR_MSIX_VECTOR32_BAD,4,2 ## @NTB_HWERR_MSIX_VECTOR32_BAD
	.comm	_gen3_pri_reg,8,3               ## @gen3_pri_reg
	.comm	_gen3_b2b_reg,4,2               ## @gen3_b2b_reg
	.comm	_gen3_sec_xlat,4,2              ## @gen3_sec_xlat
	.comm	_xeon_b2b_dsd_addr,4,2          ## @xeon_b2b_dsd_addr
	.comm	_xeon_b2b_usd_addr,4,2          ## @xeon_b2b_usd_addr
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ## @PCI_COMMAND_MASTER
	.comm	_GEN3_SPCICMD_OFFSET,8,3        ## @GEN3_SPCICMD_OFFSET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gen3_init_ntb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen3_init_ntb
_gen3_init_ntb:                         ; @gen3_init_ntb
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _XEON_MW_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XEON_MW_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GEN3_SPAD_COUNT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GEN3_SPAD_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _GEN3_DB_COUNT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GEN3_DB_COUNT@GOTPAGEOFF]
	stp	w9, w8, [x0, #72]
Lloh8:
	ldr	w8, [x10]
	str	w8, [x0]
Lloh9:
	adrp	x8, _GEN3_DB_LINK_BIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GEN3_DB_LINK_BIT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x0, #64]
	ldr	w8, [x0, #4]
Lloh12:
	adrp	x9, _NTB_HWERR_MSIX_VECTOR32_BAD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NTB_HWERR_MSIX_VECTOR32_BAD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #31
	bl	_BIT_ULL
	ldr	x8, [x19, #64]
	orr	x8, x8, x0
	str	x8, [x19, #64]
LBB0_2:
	ldr	w8, [x19, #40]
	and	w9, w8, #0xfffffffe
	cmp	w9, #128
	b.ne	LBB0_5
; %bb.3:
Lloh15:
	adrp	x9, _gen3_pri_reg@GOTPAGE
Lloh16:
	ldr	x9, [x9, _gen3_pri_reg@GOTPAGEOFF]
Lloh17:
	adrp	x10, _gen3_b2b_reg@GOTPAGE
Lloh18:
	ldr	x10, [x10, _gen3_b2b_reg@GOTPAGEOFF]
	str	x9, [x19, #8]
Lloh19:
	adrp	x9, _gen3_sec_xlat@GOTPAGE
Lloh20:
	ldr	x9, [x9, _gen3_sec_xlat@GOTPAGEOFF]
	stp	x9, x10, [x19, #48]
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.4:
Lloh21:
	adrp	x1, _xeon_b2b_dsd_addr@GOTPAGE
Lloh22:
	ldr	x1, [x1, _xeon_b2b_dsd_addr@GOTPAGEOFF]
Lloh23:
	adrp	x2, _xeon_b2b_usd_addr@GOTPAGE
Lloh24:
	ldr	x2, [x2, _xeon_b2b_usd_addr@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
Lloh28:
	adrp	x1, _xeon_b2b_usd_addr@GOTPAGE
Lloh29:
	ldr	x1, [x1, _xeon_b2b_usd_addr@GOTPAGEOFF]
Lloh30:
	adrp	x2, _xeon_b2b_dsd_addr@GOTPAGE
Lloh31:
	ldr	x2, [x2, _xeon_b2b_dsd_addr@GOTPAGEOFF]
LBB0_7:
	mov	x0, x19
	bl	_gen3_setup_b2b_mw
	cbnz	w0, LBB0_9
; %bb.8:
Lloh32:
	adrp	x8, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _PCI_COMMAND_MASTER@GOTPAGE
Lloh36:
	ldr	x9, [x9, _PCI_COMMAND_MASTER@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #16]
Lloh38:
	adrp	x9, _GEN3_SPCICMD_OFFSET@GOTPAGE
Lloh39:
	ldr	x9, [x9, _GEN3_SPCICMD_OFFSET@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite16
	ldr	w0, [x19]
	bl	_BIT_ULL
	sub	x0, x0, #1
	str	x0, [x19, #24]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldp	x10, x9, [x19, #8]
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_XEON_MW_COUNT,4,2              ; @XEON_MW_COUNT
	.comm	_GEN3_SPAD_COUNT,4,2            ; @GEN3_SPAD_COUNT
	.comm	_GEN3_DB_COUNT,4,2              ; @GEN3_DB_COUNT
	.comm	_GEN3_DB_LINK_BIT,8,3           ; @GEN3_DB_LINK_BIT
	.comm	_NTB_HWERR_MSIX_VECTOR32_BAD,4,2 ; @NTB_HWERR_MSIX_VECTOR32_BAD
	.comm	_gen3_pri_reg,8,3               ; @gen3_pri_reg
	.comm	_gen3_b2b_reg,4,2               ; @gen3_b2b_reg
	.comm	_gen3_sec_xlat,4,2              ; @gen3_sec_xlat
	.comm	_xeon_b2b_dsd_addr,4,2          ; @xeon_b2b_dsd_addr
	.comm	_xeon_b2b_usd_addr,4,2          ; @xeon_b2b_usd_addr
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ; @PCI_COMMAND_MASTER
	.comm	_GEN3_SPCICMD_OFFSET,8,3        ; @GEN3_SPCICMD_OFFSET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gen3_init_ntb
.subsections_via_symbols
