	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function n2_crypto_probe
_n2_crypto_probe:                       ## @n2_crypto_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, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_n2_spu_driver_version
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	xorl	%eax, %eax
	callq	_alloc_n2cp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_grab_global_resources
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_1:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mdesc_grab
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movq	%r14, %r13
	addq	$4, %r13
	leaq	L_.str.4(%rip), %rcx
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_grab_mdesc_irq_props
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movl	(%r15), %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r12, %rdi
	callq	_mdesc_release
	jmp	LBB0_12
LBB0_5:
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_8:
	movq	_HV_NCS_QTYPE_CWQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_cwq_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_cpu_to_cwq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	leaq	L_.str.6(%rip), %r8
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	pushq	%rbx
	pushq	%rax
	callq	_spu_mdesc_scan
	addq	$16, %rsp
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mdesc_release
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.9:
	movl	(%r15), %edx
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_n2_register_algs
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %r12d
	movl	(%r15), %edx
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_spu_list_destroy
	movl	%r12d, %ebx
LBB0_12:
	xorl	%eax, %eax
	callq	_release_global_resources
LBB0_13:
	movq	%r14, %rdi
	callq	_free_n2cp
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_dev_set_drvdata
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found N2CP at %pOF\n"

L_.str.1:                               ## @.str.1
	.asciz	"%pOF: Unable to allocate n2cp.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"%pOF: Unable to grab global resources.\n"

L_.str.3:                               ## @.str.3
	.asciz	"%pOF: Unable to grab MDESC.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.4:                               ## @.str.4
	.asciz	"n2cp"

L_.str.5:                               ## @.str.5
	.asciz	"%pOF: Unable to grab IRQ props.\n"

L_.str.6:                               ## @.str.6
	.asciz	"cwq"

	.comm	_HV_NCS_QTYPE_CWQ,4,2           ## @HV_NCS_QTYPE_CWQ
	.comm	_cwq_intr,4,2                   ## @cwq_intr
	.comm	_cpu_to_cwq,4,2                 ## @cpu_to_cwq
L_.str.7:                               ## @.str.7
	.asciz	"%pOF: CWQ MDESC scan failed.\n"

L_.str.8:                               ## @.str.8
	.asciz	"%pOF: Unable to register algorithms.\n"

	.no_dead_strip	_n2_crypto_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function n2_crypto_probe
_n2_crypto_probe:                       ; @n2_crypto_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_n2_spu_driver_version
	ldr	w1, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	bl	_alloc_n2cp
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_grab_global_resources
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	w2, [x20]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_13
LBB0_3:
	ldr	w2, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_4:
	bl	_mdesc_grab
	cbz	x0, LBB0_7
; %bb.5:
	mov	x22, x0
	add	x23, x19, #4
Lloh9:
	adrp	x3, l_.str.4@PAGE
Lloh10:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x1, x20
	mov	x2, x23
	bl	_grab_mdesc_irq_props
	cbz	w0, LBB0_8
; %bb.6:
	mov	x21, x0
	ldr	w2, [x20]
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x22
	bl	_mdesc_release
	b	LBB0_12
LBB0_7:
	ldr	w2, [x20]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_8:
Lloh18:
	adrp	x8, _HV_NCS_QTYPE_CWQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HV_NCS_QTYPE_CWQ@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
Lloh21:
	adrp	x8, _cwq_intr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _cwq_intr@GOTPAGEOFF]
Lloh23:
	ldr	w6, [x8]
Lloh24:
	adrp	x8, _cpu_to_cwq@GOTPAGE
Lloh25:
	ldr	x8, [x8, _cpu_to_cwq@GOTPAGEOFF]
Lloh26:
	ldr	w7, [x8]
Lloh27:
	adrp	x4, l_.str.6@PAGE
Lloh28:
	add	x4, x4, l_.str.6@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	x3, x19
	bl	_spu_mdesc_scan
	mov	x21, x0
	mov	x0, x22
	bl	_mdesc_release
	cbz	w21, LBB0_10
; %bb.9:
	ldr	w2, [x20]
Lloh29:
	adrp	x1, l_.str.7@PAGE
Lloh30:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_10:
	bl	_n2_register_algs
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.11:
	ldr	w2, [x20]
Lloh31:
	adrp	x1, l_.str.8@PAGE
Lloh32:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_spu_list_destroy
LBB0_12:
	bl	_release_global_resources
LBB0_13:
	mov	x0, x19
	bl	_free_n2cp
LBB0_14:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found N2CP at %pOF\n"

l_.str.1:                               ; @.str.1
	.asciz	"%pOF: Unable to allocate n2cp.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"%pOF: Unable to grab global resources.\n"

l_.str.3:                               ; @.str.3
	.asciz	"%pOF: Unable to grab MDESC.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.4:                               ; @.str.4
	.asciz	"n2cp"

l_.str.5:                               ; @.str.5
	.asciz	"%pOF: Unable to grab IRQ props.\n"

l_.str.6:                               ; @.str.6
	.asciz	"cwq"

	.comm	_HV_NCS_QTYPE_CWQ,4,2           ; @HV_NCS_QTYPE_CWQ
	.comm	_cwq_intr,4,2                   ; @cwq_intr
	.comm	_cpu_to_cwq,4,2                 ; @cpu_to_cwq
l_.str.7:                               ; @.str.7
	.asciz	"%pOF: CWQ MDESC scan failed.\n"

l_.str.8:                               ; @.str.8
	.asciz	"%pOF: Unable to register algorithms.\n"

	.no_dead_strip	_n2_crypto_probe
.subsections_via_symbols
