	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switchtec_pci_probe
_switchtec_pci_probe:                   ## @switchtec_pci_probe
	.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	_PCI_CLASS_BRIDGE_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$8, %eax
	cmpl	%eax, (%rdi)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_request_module_nowait
LBB0_2:
	movq	%rbx, %rdi
	callq	_stdev_create
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.13:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_switchtec_init_pci
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	%r15, %rdi
	callq	_switchtec_init_isr
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_6:
	movq	_SWITCHTEC_EVENT_CLEAR@GOTPCREL(%rip), %rax
	movq	_SWITCHTEC_EVENT_EN_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	16(%r15), %rsi
	callq	_iowrite32
	movq	%r15, %rdi
	callq	_enable_link_state_events
	cmpq	$0, 8(%r15)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_enable_dma_mrpc
LBB0_8:
	movq	%r15, %rdi
	addq	$4, %rdi
	movq	%r15, %rsi
	callq	_cdev_device_add
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_stdev_kill
LBB0_11:
	movl	(%r15), %edi
	callq	_MINOR
	movq	_switchtec_minor_ida@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_ida_simple_remove
	movq	%r15, %rdi
	callq	_put_device
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CLASS_BRIDGE_OTHER,4,2     ## @PCI_CLASS_BRIDGE_OTHER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ntb_hw_switchtec"

L_.str.1:                               ## @.str.1
	.asciz	"failed to init isr.\n"

	.comm	_SWITCHTEC_EVENT_CLEAR,4,2      ## @SWITCHTEC_EVENT_CLEAR
	.comm	_SWITCHTEC_EVENT_EN_IRQ,4,2     ## @SWITCHTEC_EVENT_EN_IRQ
L_.str.2:                               ## @.str.2
	.asciz	"Management device registered.\n"

	.comm	_switchtec_minor_ida,4,2        ## @switchtec_minor_ida
	.no_dead_strip	_switchtec_pci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switchtec_pci_probe
_switchtec_pci_probe:                   ; @switchtec_pci_probe
	.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	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PCI_CLASS_BRIDGE_OTHER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_CLASS_BRIDGE_OTHER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9, lsl #8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_request_module_nowait
LBB0_2:
	mov	x0, x20
	bl	_stdev_create
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_switchtec_init_pci
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_switchtec_init_isr
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x8, _SWITCHTEC_EVENT_CLEAR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SWITCHTEC_EVENT_CLEAR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _SWITCHTEC_EVENT_EN_IRQ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SWITCHTEC_EVENT_EN_IRQ@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x1, [x19, #16]
	bl	_iowrite32
	mov	x0, x19
	bl	_enable_link_state_events
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_enable_dma_mrpc
LBB0_9:
	add	x0, x19, #4
	mov	x1, x19
	bl	_cdev_device_add
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.10:
	mov	x0, x19
	bl	_stdev_kill
LBB0_11:
	ldr	w0, [x19]
	bl	_MINOR
	mov	x1, x0
Lloh13:
	adrp	x0, _switchtec_minor_ida@GOTPAGE
Lloh14:
	ldr	x0, [x0, _switchtec_minor_ida@GOTPAGEOFF]
	bl	_ida_simple_remove
	mov	x0, x19
	bl	_put_device
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CLASS_BRIDGE_OTHER,4,2     ; @PCI_CLASS_BRIDGE_OTHER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ntb_hw_switchtec"

l_.str.1:                               ; @.str.1
	.asciz	"failed to init isr.\n"

	.comm	_SWITCHTEC_EVENT_CLEAR,4,2      ; @SWITCHTEC_EVENT_CLEAR
	.comm	_SWITCHTEC_EVENT_EN_IRQ,4,2     ; @SWITCHTEC_EVENT_EN_IRQ
l_.str.2:                               ; @.str.2
	.asciz	"Management device registered.\n"

	.comm	_switchtec_minor_ida,4,2        ; @switchtec_minor_ida
	.no_dead_strip	_switchtec_pci_probe
.subsections_via_symbols
