	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cgx_probe
_cgx_probe:                             ## @cgx_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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 24(%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_pci_set_drvdata
	movq	%r14, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_4:
	movq	_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_request_regions
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_17
LBB0_6:
	movq	_PCI_CFG_REG_BAR_NUM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_pcim_iomap
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_CGX_NVEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r12d, %edx
	callq	_pci_alloc_irq_vectors
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	cmpl	%r12d, %r15d
	jne	LBB0_10
## %bb.11:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_pci_resource_start
	sarl	$24, %eax
	movq	_CGX_ID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, (%rbx)
	leaq	12(%rbx), %rdi
	movq	_cgx_lmac_linkup_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	L_.str.4(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_alloc_workqueue
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	%rbx, %r12
	addq	$4, %r12
	movq	_cgx_list@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_list_add
	xorl	%eax, %eax
	callq	_cgx_link_usertable_init
	movq	%rbx, %rdi
	callq	_cgx_lmac_init
	testl	%eax, %eax
	je	LBB0_19
## %bb.14:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_cgx_lmac_exit
	movq	%r12, %rdi
	callq	_list_del
	movl	%r13d, %r15d
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_15:
	movq	%r14, %rdi
	callq	_pci_free_irq_vectors
LBB0_16:
	movq	%r14, %rdi
	callq	_pci_release_regions
LBB0_17:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_18:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_pci_set_drvdata
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable PCI device\n"

	.comm	_DRV_NAME,4,2                   ## @DRV_NAME
L_.str.1:                               ## @.str.1
	.asciz	"PCI request regions failed 0x%x\n"

	.comm	_PCI_CFG_REG_BAR_NUM,4,2        ## @PCI_CFG_REG_BAR_NUM
L_.str.2:                               ## @.str.2
	.asciz	"CGX: Cannot map CSR memory space, aborting\n"

	.comm	_CGX_NVEC,4,2                   ## @CGX_NVEC
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
L_.str.3:                               ## @.str.3
	.asciz	"Request for %d msix vectors failed, err %d\n"

	.comm	_CGX_ID_MASK,4,2                ## @CGX_ID_MASK
	.comm	_cgx_lmac_linkup_work,4,2       ## @cgx_lmac_linkup_work
L_.str.4:                               ## @.str.4
	.asciz	"cgx_cmd_workq"

L_.str.5:                               ## @.str.5
	.asciz	"alloc workqueue failed for cgx cmd"

	.comm	_cgx_list,4,2                   ## @cgx_list
	.no_dead_strip	_cgx_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cgx_probe
_cgx_probe:                             ; @cgx_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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #24]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_18
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_4:
Lloh8:
	adrp	x8, _DRV_NAME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRV_NAME@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_request_regions
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_17
LBB0_6:
Lloh13:
	adrp	x23, _PCI_CFG_REG_BAR_NUM@GOTPAGE
Lloh14:
	ldr	x23, [x23, _PCI_CFG_REG_BAR_NUM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_pcim_iomap
	str	w0, [x20, #16]
	cbz	w0, LBB0_12
; %bb.7:
Lloh15:
	adrp	x8, _CGX_NVEC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CGX_NVEC@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
Lloh18:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x22
	bl	_pci_alloc_irq_vectors
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.8:
	cmp	w21, w22
	b.ne	LBB0_13
; %bb.9:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_pci_resource_start
Lloh21:
	adrp	x8, _CGX_ID_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CGX_ID_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w8, w8, w0, asr #24
	str	w8, [x20]
	add	x0, x20, #12
Lloh24:
	adrp	x8, _cgx_lmac_linkup_work@GOTPAGE
Lloh25:
	ldr	x8, [x8, _cgx_lmac_linkup_work@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	bl	_alloc_workqueue
	str	w0, [x20, #8]
	cbz	w0, LBB0_14
; %bb.10:
	add	x22, x20, #4
Lloh29:
	adrp	x1, _cgx_list@GOTPAGE
Lloh30:
	ldr	x1, [x1, _cgx_list@GOTPAGEOFF]
	mov	x0, x22
	bl	_list_add
	bl	_cgx_link_usertable_init
	mov	x0, x20
	bl	_cgx_lmac_init
	mov	x21, x0
	cbz	w0, LBB0_19
; %bb.11:
	mov	x0, x20
	bl	_cgx_lmac_exit
	mov	x0, x22
	bl	_list_del
	b	LBB0_15
LBB0_12:
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_13:
	stp	x22, x21, [sp]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_16
LBB0_14:
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh40:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	mov	x0, x19
	bl	_pci_free_irq_vectors
LBB0_16:
	mov	x0, x19
	bl	_pci_release_regions
LBB0_17:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_18:
	mov	x0, x19
	mov	x1, #0
	bl	_pci_set_drvdata
LBB0_19:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable PCI device\n"

	.comm	_DRV_NAME,4,2                   ; @DRV_NAME
l_.str.1:                               ; @.str.1
	.asciz	"PCI request regions failed 0x%x\n"

	.comm	_PCI_CFG_REG_BAR_NUM,4,2        ; @PCI_CFG_REG_BAR_NUM
l_.str.2:                               ; @.str.2
	.asciz	"CGX: Cannot map CSR memory space, aborting\n"

	.comm	_CGX_NVEC,4,2                   ; @CGX_NVEC
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
l_.str.3:                               ; @.str.3
	.asciz	"Request for %d msix vectors failed, err %d\n"

	.comm	_CGX_ID_MASK,4,2                ; @CGX_ID_MASK
	.comm	_cgx_lmac_linkup_work,4,2       ; @cgx_lmac_linkup_work
l_.str.4:                               ; @.str.4
	.asciz	"cgx_cmd_workq"

l_.str.5:                               ; @.str.5
	.asciz	"alloc workqueue failed for cgx cmd"

	.comm	_cgx_list,4,2                   ; @cgx_list
	.no_dead_strip	_cgx_probe
.subsections_via_symbols
