	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen3_init_dev                  ## -- Begin function gen3_init_dev
	.p2align	4, 0x90
_gen3_init_dev:                         ## @gen3_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	_gen3_reg@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rdi)
	movq	_XEON_PPD_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_byte
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	-28(%rbp), %esi
	movq	%rbx, %rdi
	callq	_xeon_ppd_topo
	movl	%eax, 8(%rbx)
	movl	-28(%rbp), %r15d
	movl	%eax, %edi
	callq	_ntb_topo_string
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	8(%rbx), %eax
	movq	_NTB_TOPO_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_NTB_HWERR_MSIX_VECTOR32_BAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_gen3_init_ntb
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_gen3_init_isr
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_gen3_reg,4,2                   ## @gen3_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_HWERR_MSIX_VECTOR32_BAD,4,2 ## @NTB_HWERR_MSIX_VECTOR32_BAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen3_init_dev                  ; -- Begin function gen3_init_dev
	.p2align	2
_gen3_init_dev:                         ; @gen3_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]
Lloh0:
	adrp	x8, _gen3_reg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gen3_reg@GOTPAGEOFF]
	str	x8, [x0, #24]
Lloh2:
	adrp	x8, _XEON_PPD_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XEON_PPD_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_byte
	cbz	w0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_xeon_ppd_topo
	str	w0, [x19, #8]
	ldr	w21, [sp, #12]
	bl	_ntb_topo_string
	mov	x3, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _NTB_TOPO_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NTB_TOPO_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
Lloh14:
	adrp	x8, _NTB_HWERR_MSIX_VECTOR32_BAD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NTB_HWERR_MSIX_VECTOR32_BAD@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_gen3_init_ntb
	cbnz	w0, LBB0_5
; %bb.7:
	mov	x0, x19
	bl	_gen3_init_isr
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_gen3_reg,4,2                   ; @gen3_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_HWERR_MSIX_VECTOR32_BAD,4,2 ; @NTB_HWERR_MSIX_VECTOR32_BAD
.subsections_via_symbols
