	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_zip_probe
_hisi_zip_probe:                        ## @hisi_zip_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_hisi_qm_get_hw_version
	movl	%eax, %r12d
	movq	_QM_HW_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_1
## %bb.3:
	leaq	8(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_pci_set_drvdata
	movq	%rbx, 48(%r15)
	movl	%r12d, (%r15)
	movq	_HZIP_SQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	_hisi_zip_name@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	(%rbx), %rax
	movq	_PCI_DEVICE_ID_ZIP_PF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	_QM_HW_PF@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_QM_HW_VF@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	_uacce_mode@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	$3, %rax
	jae	LBB0_1
## %bb.9:
	leaq	l_switch.table.hisi_zip_probe(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 16(%r15)
	movq	%r15, %rdi
	callq	_hisi_qm_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_24
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	8(%r15), %rax
	movq	_QM_HW_PF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	callq	_hisi_zip_pf_probe_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.13:
	movq	_HZIP_PF_DEF_Q_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	_pf_q_num@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	jmp	LBB0_19
LBB0_14:
	movq	_QM_HW_VF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.15:
	movslq	(%r15), %rax
	movq	_QM_HW_V1@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_17
## %bb.16:
	movq	_HZIP_PF_DEF_Q_NUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	_HZIP_QUEUE_NUM_V1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	subq	%rax, %rcx
	movq	%rcx, 24(%r15)
	jmp	LBB0_19
LBB0_17:
	movq	_QM_HW_V2@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_19
## %bb.18:
	leaq	32(%r15), %rsi
	movq	%r15, %rdx
	addq	$24, %rdx
	movq	%r15, %rdi
	callq	_hisi_qm_get_vft
LBB0_19:
	movq	%r15, %rdi
	callq	_hisi_qm_start
	testl	%eax, %eax
	je	LBB0_20
## %bb.23:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_hisi_qm_uninit
	jmp	LBB0_24
LBB0_20:
	movq	%r15, %rdi
	callq	_hisi_zip_debugfs_init
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_22:
	movq	%r15, %rdi
	callq	_hisi_zip_add_to_list
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_HW_UNKNOWN,4,2              ## @QM_HW_UNKNOWN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HZIP_SQE_SIZE,4,2              ## @HZIP_SQE_SIZE
	.comm	_hisi_zip_name,4,2              ## @hisi_zip_name
	.comm	_PCI_DEVICE_ID_ZIP_PF,8,3       ## @PCI_DEVICE_ID_ZIP_PF
	.comm	_QM_HW_PF,8,3                   ## @QM_HW_PF
	.comm	_QM_HW_VF,8,3                   ## @QM_HW_VF
	.comm	_uacce_mode,4,2                 ## @uacce_mode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init qm!\n"

	.comm	_HZIP_PF_DEF_Q_BASE,8,3         ## @HZIP_PF_DEF_Q_BASE
	.comm	_pf_q_num,8,3                   ## @pf_q_num
	.comm	_QM_HW_V1,8,3                   ## @QM_HW_V1
	.comm	_HZIP_PF_DEF_Q_NUM,8,3          ## @HZIP_PF_DEF_Q_NUM
	.comm	_HZIP_QUEUE_NUM_V1,8,3          ## @HZIP_QUEUE_NUM_V1
	.comm	_QM_HW_V2,8,3                   ## @QM_HW_V2
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init debugfs (%d)!\n"

	.no_dead_strip	_hisi_zip_probe
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.hisi_zip_probe
l_switch.table.hisi_zip_probe:
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_zip_probe
_hisi_zip_probe:                        ; @hisi_zip_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	x21, x0
	bl	_hisi_qm_get_hw_version
Lloh0:
	adrp	x8, _QM_HW_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_HW_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x22, x0
	add	x19, x21, #8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x21
	mov	x1, x20
	bl	_pci_set_drvdata
	str	x21, [x20, #48]
	str	w22, [x20]
Lloh6:
	adrp	x8, _HZIP_SQE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HZIP_SQE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _hisi_zip_name@GOTPAGE
Lloh10:
	ldr	x9, [x9, _hisi_zip_name@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
	ldr	x8, [x21]
Lloh12:
	adrp	x9, _PCI_DEVICE_ID_ZIP_PF@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PCI_DEVICE_ID_ZIP_PF@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x23, _QM_HW_PF@GOTPAGE
Lloh16:
	ldr	x23, [x23, _QM_HW_PF@GOTPAGEOFF]
Lloh17:
	adrp	x22, _QM_HW_VF@GOTPAGE
Lloh18:
	ldr	x22, [x22, _QM_HW_VF@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x23, x22, eq
	ldr	x8, [x8]
	str	x8, [x20, #8]
Lloh19:
	adrp	x8, _uacce_mode@GOTPAGE
Lloh20:
	ldr	x8, [x8, _uacce_mode@GOTPAGEOFF]
Lloh21:
	ldrsw	x8, [x8]
	cmp	w8, #3
	b.hs	LBB0_5
; %bb.3:
Lloh22:
	adrp	x9, l_switch.table.hisi_zip_probe@PAGE
Lloh23:
	add	x9, x9, l_switch.table.hisi_zip_probe@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x20, #16]
	mov	x0, x20
	bl	_hisi_qm_init
	cbz	w0, LBB0_9
; %bb.4:
	mov	x21, x0
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_5:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	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
LBB0_9:
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_hisi_zip_pf_probe_init
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.11:
Lloh30:
	adrp	x8, _HZIP_PF_DEF_Q_BASE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HZIP_PF_DEF_Q_BASE@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
Lloh33:
	adrp	x9, _pf_q_num@GOTPAGE
Lloh34:
	ldr	x9, [x9, _pf_q_num@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	b	LBB0_15
LBB0_12:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
	ldrsw	x8, [x20]
Lloh36:
	adrp	x9, _QM_HW_V1@GOTPAGE
Lloh37:
	ldr	x9, [x9, _QM_HW_V1@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.14:
Lloh39:
	adrp	x8, _HZIP_PF_DEF_Q_NUM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HZIP_PF_DEF_Q_NUM@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
Lloh42:
	adrp	x9, _HZIP_QUEUE_NUM_V1@GOTPAGE
Lloh43:
	ldr	x9, [x9, _HZIP_QUEUE_NUM_V1@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	sub	x9, x9, x8
LBB0_15:
	stp	x9, x8, [x20, #24]
LBB0_16:
	mov	x0, x20
	bl	_hisi_qm_start
	cbz	w0, LBB0_18
; %bb.17:
	mov	x21, x0
	mov	x0, x20
	bl	_hisi_qm_uninit
	b	LBB0_8
LBB0_18:
	mov	x0, x20
	bl	_hisi_zip_debugfs_init
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_20
; %bb.19:
	str	x0, [sp]
Lloh45:
	adrp	x1, l_.str.1@PAGE
Lloh46:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_20:
	mov	x0, x20
	bl	_hisi_zip_add_to_list
	mov	w21, #0
	b	LBB0_8
LBB0_21:
Lloh47:
	adrp	x9, _QM_HW_V2@GOTPAGE
Lloh48:
	ldr	x9, [x9, _QM_HW_V2@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.22:
	add	x1, x20, #32
	add	x2, x20, #24
	mov	x0, x20
	bl	_hisi_qm_get_vft
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_HW_UNKNOWN,4,2              ; @QM_HW_UNKNOWN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HZIP_SQE_SIZE,4,2              ; @HZIP_SQE_SIZE
	.comm	_hisi_zip_name,4,2              ; @hisi_zip_name
	.comm	_PCI_DEVICE_ID_ZIP_PF,8,3       ; @PCI_DEVICE_ID_ZIP_PF
	.comm	_QM_HW_PF,8,3                   ; @QM_HW_PF
	.comm	_QM_HW_VF,8,3                   ; @QM_HW_VF
	.comm	_uacce_mode,4,2                 ; @uacce_mode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init qm!\n"

	.comm	_HZIP_PF_DEF_Q_BASE,8,3         ; @HZIP_PF_DEF_Q_BASE
	.comm	_pf_q_num,8,3                   ; @pf_q_num
	.comm	_QM_HW_V1,8,3                   ; @QM_HW_V1
	.comm	_HZIP_PF_DEF_Q_NUM,8,3          ; @HZIP_PF_DEF_Q_NUM
	.comm	_HZIP_QUEUE_NUM_V1,8,3          ; @HZIP_QUEUE_NUM_V1
	.comm	_QM_HW_V2,8,3                   ; @QM_HW_V2
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init debugfs (%d)!\n"

	.no_dead_strip	_hisi_zip_probe
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.hisi_zip_probe
l_switch.table.hisi_zip_probe:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	1                               ; 0x1

.subsections_via_symbols
