	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xeon_init_dev
_xeon_init_dev:                         ## @xeon_init_dev
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	(%r14), %ecx
	leal	-128(%rcx), %eax
	cmpl	$14, %eax
	ja	LBB0_2
## %bb.1:
	movq	_NTB_HWERR_SDOORBELL_LOCKUP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, 32(%rbx)
LBB0_2:
	addl	$-130, %ecx
	cmpl	$12, %ecx
	ja	LBB0_5
## %bb.3:
	movl	$7399, %edx                     ## imm = 0x1CE7
	btl	%ecx, %edx
	jae	LBB0_5
## %bb.4:
	movq	_NTB_HWERR_SB01BASE_LOCKUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%rbx)
LBB0_5:
	cmpl	$14, %eax
	ja	LBB0_7
## %bb.6:
	movq	_NTB_HWERR_B2BDOORBELL_BIT14@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 32(%rbx)
LBB0_7:
	movq	_xeon_reg@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	movq	_XEON_PPD_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_byte
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_10:
	movl	-36(%rbp), %esi
	movq	%rbx, %rdi
	callq	_xeon_ppd_topo
	movl	%eax, 8(%rbx)
	leaq	4(%r14), %r15
	movl	-36(%rbp), %r12d
	movl	%eax, %edi
	callq	_ntb_topo_string
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	8(%rbx), %eax
	movq	_NTB_TOPO_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_NTB_TOPO_SEC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.14:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_select_bars
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_hweight32
	movq	_HSX_SPLIT_BAR_MW_COUNT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	incq	%rdx
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	sete	%cl
	movl	%ecx, (%rbx)
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	jmp	LBB0_15
LBB0_13:
	movl	-36(%rbp), %esi
	movq	%rbx, %rdi
	callq	_xeon_ppd_bar4_split
	movl	%eax, (%rbx)
	movl	-36(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
LBB0_15:
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_xeon_init_ntb
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_xeon_init_isr
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_NTB_HWERR_SDOORBELL_LOCKUP,4,2 ## @NTB_HWERR_SDOORBELL_LOCKUP
	.comm	_NTB_HWERR_SB01BASE_LOCKUP,4,2  ## @NTB_HWERR_SB01BASE_LOCKUP
	.comm	_NTB_HWERR_B2BDOORBELL_BIT14,4,2 ## @NTB_HWERR_B2BDOORBELL_BIT14
	.comm	_xeon_reg,4,2                   ## @xeon_reg
	.comm	_XEON_PPD_OFFSET,4,2            ## @XEON_PPD_OFFSET
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ppd %#x topo %s\n"

	.comm	_NTB_TOPO_NONE,4,2              ## @NTB_TOPO_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NTB_TOPO_SEC,4,2               ## @NTB_TOPO_SEC
L_.str.1:                               ## @.str.1
	.asciz	"ppd %#x bar4_split %d\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_HSX_SPLIT_BAR_MW_COUNT,8,3     ## @HSX_SPLIT_BAR_MW_COUNT
L_.str.2:                               ## @.str.2
	.asciz	"mem %#x bar4_split %d\n"

	.no_dead_strip	_xeon_init_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xeon_init_dev
_xeon_init_dev:                         ; @xeon_init_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	w9, [x20]
	sub	w8, w9, #128
	cmp	w8, #14
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x10, _NTB_HWERR_SDOORBELL_LOCKUP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NTB_HWERR_SDOORBELL_LOCKUP@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ldr	w11, [x19, #32]
	orr	w10, w11, w10
	str	w10, [x19, #32]
LBB0_2:
	sub	w9, w9, #130
	cmp	w9, #12
	mov	w10, #1
	lsl	w9, w10, w9
	mov	w10, #7399
	and	w9, w9, w10
	ccmp	w9, #0, #4, ls
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x9, _NTB_HWERR_SB01BASE_LOCKUP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NTB_HWERR_SB01BASE_LOCKUP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19, #32]
	orr	w9, w10, w9
	str	w9, [x19, #32]
LBB0_4:
	cmp	w8, #14
	b.hi	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _NTB_HWERR_B2BDOORBELL_BIT14@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NTB_HWERR_B2BDOORBELL_BIT14@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	orr	w8, w9, w8
	str	w8, [x19, #32]
LBB0_6:
Lloh9:
	adrp	x8, _xeon_reg@GOTPAGE
Lloh10:
	ldr	x8, [x8, _xeon_reg@GOTPAGEOFF]
	str	x8, [x19, #24]
Lloh11:
	adrp	x8, _XEON_PPD_OFFSET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XEON_PPD_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_byte
	cbz	w0, LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_xeon_ppd_topo
	str	w0, [x19, #8]
	add	x21, x20, #4
	ldr	w22, [sp, #12]
	bl	_ntb_topo_string
	mov	x3, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_dbg
	ldr	w8, [x19, #8]
Lloh18:
	adrp	x9, _NTB_TOPO_NONE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NTB_TOPO_NONE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.9:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #64
	ret
LBB0_12:
Lloh23:
	adrp	x9, _NTB_TOPO_SEC@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NTB_TOPO_SEC@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.13:
Lloh26:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_select_bars
	mov	x20, x0
	bl	_hweight32
Lloh29:
	adrp	x8, _HSX_SPLIT_BAR_MW_COUNT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HSX_SPLIT_BAR_MW_COUNT@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	add	x8, x8, #1
	cmp	x0, x8
	cset	w3, eq
	str	w3, [x19]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	b	LBB0_15
LBB0_14:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_xeon_ppd_bar4_split
	mov	x3, x0
	str	w0, [x19]
	ldr	w2, [sp, #12]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
LBB0_15:
	bl	_dev_dbg
	mov	x0, x19
	bl	_xeon_init_ntb
	cbnz	w0, LBB0_11
; %bb.16:
	mov	x0, x19
	bl	_xeon_init_isr
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_NTB_HWERR_SDOORBELL_LOCKUP,4,2 ; @NTB_HWERR_SDOORBELL_LOCKUP
	.comm	_NTB_HWERR_SB01BASE_LOCKUP,4,2  ; @NTB_HWERR_SB01BASE_LOCKUP
	.comm	_NTB_HWERR_B2BDOORBELL_BIT14,4,2 ; @NTB_HWERR_B2BDOORBELL_BIT14
	.comm	_xeon_reg,4,2                   ; @xeon_reg
	.comm	_XEON_PPD_OFFSET,4,2            ; @XEON_PPD_OFFSET
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ppd %#x topo %s\n"

	.comm	_NTB_TOPO_NONE,4,2              ; @NTB_TOPO_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NTB_TOPO_SEC,4,2               ; @NTB_TOPO_SEC
l_.str.1:                               ; @.str.1
	.asciz	"ppd %#x bar4_split %d\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_HSX_SPLIT_BAR_MW_COUNT,8,3     ; @HSX_SPLIT_BAR_MW_COUNT
l_.str.2:                               ; @.str.2
	.asciz	"mem %#x bar4_split %d\n"

	.no_dead_strip	_xeon_init_dev
.subsections_via_symbols
