	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function peak_pciefd_probe
_peak_pciefd_probe:                     ## @peak_pciefd_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_pci_enable_device
	testl	%eax, %eax
	jne	LBB0_17
## %bb.1:
	movq	_PCIEFD_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_pci_request_regions
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.2:
	movq	_PCI_SUBSYSTEM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_15:
	movq	%r12, %rdi
	callq	_pci_release_regions
LBB0_16:
	movq	%r12, %rdi
	callq	_pci_disable_device
	movl	%ebx, %edi
	callq	_pcibios_err_to_errno
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	movl	-44(%rbp), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_dbg
	movl	-44(%rbp), %eax
	movl	$4, %r15d
	cmpl	$17, %eax
	jg	LBB0_6
## %bb.4:
	movl	$3, %r15d
	cmpl	$15, %eax
	jg	LBB0_6
## %bb.5:
	xorl	%r15d, %r15d
	cmpl	$4, %eax
	setge	%r15b
	incl	%r15d
LBB0_6:
	movq	_can@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	callq	_struct_size
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r14
	movq	%r12, 16(%rax)
	movq	%rax, %rdi
	addq	$8, %rdi
	callq	_spin_lock_init
	movq	_PCIEFD_BAR0_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_pci_iomap
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	_PCIEFD_REG_SYS_VER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pciefd_sys_readreg
	movl	%eax, %ecx
	shrl	$12, %ecx
	andl	$15, %ecx
	movl	%eax, %r8d
	shrl	$8, %r8d
	andl	$15, %r8d
	shrl	$4, %eax
	andl	$15, %eax
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%eax, %r9d
	callq	_dev_info
	movq	_PCIEFD_SYS_CTL_CLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCIEFD_REG_SYS_CTL_CLR@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_pciefd_sys_writereg
	movq	%r12, %rdi
	callq	_pci_set_master
	cmpl	%r15d, (%r14)
	jge	LBB0_13
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_pciefd_can_probe
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14), %eax
	incl	%eax
	movl	%eax, (%r14)
	cmpl	%r15d, %eax
	jl	LBB0_11
LBB0_13:
	movq	_PCIEFD_SYS_CTL_TS_RST@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PCIEFD_REG_SYS_CTL_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_pciefd_sys_writereg
	movq	_PCIEFD_REG_SYS_VER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pciefd_sys_readreg
	movl	(%rbx), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_pciefd_sys_writereg
	movq	_PCIEFD_SYS_CTL_CLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_pciefd_sys_writereg
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pci_set_drvdata
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_14:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_pciefd_can_remove_all
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_pci_iounmap
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIEFD_DRV_NAME,4,2            ## @PCIEFD_DRV_NAME
	.comm	_PCI_SUBSYSTEM_ID,4,2           ## @PCI_SUBSYSTEM_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"probing device %04x:%04x:%04x\n"

	.comm	_can,4,2                        ## @can
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PCIEFD_BAR0_SIZE,4,2           ## @PCIEFD_BAR0_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"failed to map PCI resource #0\n"

	.comm	_PCIEFD_REG_SYS_VER2,4,2        ## @PCIEFD_REG_SYS_VER2
L_.str.2:                               ## @.str.2
	.asciz	"%ux CAN-FD PCAN-PCIe FPGA v%u.%u.%u:\n"

	.comm	_PCIEFD_SYS_CTL_CLK_EN,4,2      ## @PCIEFD_SYS_CTL_CLK_EN
	.comm	_PCIEFD_REG_SYS_CTL_CLR,4,2     ## @PCIEFD_REG_SYS_CTL_CLR
	.comm	_PCIEFD_SYS_CTL_TS_RST,4,2      ## @PCIEFD_SYS_CTL_TS_RST
	.comm	_PCIEFD_REG_SYS_CTL_SET,4,2     ## @PCIEFD_REG_SYS_CTL_SET
	.comm	_PCIEFD_REG_SYS_VER1,4,2        ## @PCIEFD_REG_SYS_VER1
	.no_dead_strip	_peak_pciefd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function peak_pciefd_probe
_peak_pciefd_probe:                     ; @peak_pciefd_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_pci_enable_device
	cbnz	w0, LBB0_13
; %bb.1:
Lloh0:
	adrp	x8, _PCIEFD_DRV_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIEFD_DRV_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.2:
Lloh3:
	adrp	x8, _PCI_SUBSYSTEM_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_SUBSYSTEM_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.3:
	ldp	w3, w2, [x19, #4]
	ldr	w4, [sp, #12]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [sp, #12]
	mov	w9, #4
	mov	w10, #3
	cmp	w8, #3
	mov	w11, #1
	cinc	w11, w11, gt
	cmp	w8, #15
	csel	w10, w10, w11, gt
	cmp	w8, #17
	csel	w21, w9, w10, gt
Lloh8:
	adrp	x8, _can@GOTPAGE
Lloh9:
	ldr	x8, [x8, _can@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_struct_size
	mov	x1, x0
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x20, x0
	str	x19, [x0, #16]
	add	x0, x0, #8
	bl	_spin_lock_init
Lloh14:
	adrp	x8, _PCIEFD_BAR0_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCIEFD_BAR0_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_pci_iomap
	str	w0, [x20, #4]
	cbz	w0, LBB0_9
; %bb.5:
Lloh17:
	adrp	x8, _PCIEFD_REG_SYS_VER2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCIEFD_REG_SYS_VER2@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pciefd_sys_readreg
	ubfx	w3, w0, #12, #4
	ubfx	w4, w0, #8, #4
	ubfx	w5, w0, #4, #4
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
Lloh22:
	adrp	x23, _PCIEFD_SYS_CTL_CLK_EN@GOTPAGE
Lloh23:
	ldr	x23, [x23, _PCIEFD_SYS_CTL_CLK_EN@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh24:
	adrp	x24, _PCIEFD_REG_SYS_CTL_CLR@GOTPAGE
Lloh25:
	ldr	x24, [x24, _PCIEFD_REG_SYS_CTL_CLR@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_pciefd_sys_writereg
	mov	x0, x19
	bl	_pci_set_master
	ldr	w8, [x20]
	cmp	w8, w21
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_pciefd_can_probe
	cbnz	w0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	cmp	w8, w21
	b.lt	LBB0_6
LBB0_8:
Lloh26:
	adrp	x21, _PCIEFD_SYS_CTL_TS_RST@GOTPAGE
Lloh27:
	ldr	x21, [x21, _PCIEFD_SYS_CTL_TS_RST@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh28:
	adrp	x22, _PCIEFD_REG_SYS_CTL_SET@GOTPAGE
Lloh29:
	ldr	x22, [x22, _PCIEFD_REG_SYS_CTL_SET@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_pciefd_sys_writereg
Lloh30:
	adrp	x8, _PCIEFD_REG_SYS_VER1@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PCIEFD_REG_SYS_VER1@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pciefd_sys_readreg
	ldr	w1, [x21]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_pciefd_sys_writereg
	ldr	w1, [x23]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_pciefd_sys_writereg
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
	mov	w0, #0
	b	LBB0_13
LBB0_9:
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_10:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x19
	bl	_pci_release_regions
LBB0_12:
	mov	x0, x19
	bl	_pci_disable_device
	mov	x0, x22
	bl	_pcibios_err_to_errno
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	mov	x22, x0
	mov	x0, x20
	bl	_pciefd_can_remove_all
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_pci_iounmap
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIEFD_DRV_NAME,4,2            ; @PCIEFD_DRV_NAME
	.comm	_PCI_SUBSYSTEM_ID,4,2           ; @PCI_SUBSYSTEM_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"probing device %04x:%04x:%04x\n"

	.comm	_can,4,2                        ; @can
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PCIEFD_BAR0_SIZE,4,2           ; @PCIEFD_BAR0_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"failed to map PCI resource #0\n"

	.comm	_PCIEFD_REG_SYS_VER2,4,2        ; @PCIEFD_REG_SYS_VER2
l_.str.2:                               ; @.str.2
	.asciz	"%ux CAN-FD PCAN-PCIe FPGA v%u.%u.%u:\n"

	.comm	_PCIEFD_SYS_CTL_CLK_EN,4,2      ; @PCIEFD_SYS_CTL_CLK_EN
	.comm	_PCIEFD_REG_SYS_CTL_CLR,4,2     ; @PCIEFD_REG_SYS_CTL_CLR
	.comm	_PCIEFD_SYS_CTL_TS_RST,4,2      ; @PCIEFD_SYS_CTL_TS_RST
	.comm	_PCIEFD_REG_SYS_CTL_SET,4,2     ; @PCIEFD_REG_SYS_CTL_SET
	.comm	_PCIEFD_REG_SYS_VER1,4,2        ; @PCIEFD_REG_SYS_VER1
	.no_dead_strip	_peak_pciefd_probe
.subsections_via_symbols
