	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_zip_ctx_init
_hisi_zip_ctx_init:                     ## @hisi_zip_ctx_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %edi
	callq	_cpu_to_node
	movl	%eax, %edi
	callq	_find_zip_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_HZIP_CTX_Q_NUM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rsi
	movq	$-1, %r15
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addq	%r14, %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_hisi_zip_create_qp
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	%r12, (%rsi,%r14)
	incq	%rbx
	movq	_HZIP_CTX_Q_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %r14
	decq	%r15
	cmpq	%rax, %rbx
	jl	LBB0_4
## %bb.9:
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_5:
	movl	%eax, %r13d
	cmpl	$-1, %r15d
	je	LBB0_10
## %bb.6:
	addq	$-8, %r14
	negq	%r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_hisi_zip_release_qp
	decq	%r15
	addq	$-8, %r14
	cmpq	$1, %r15
	jg	LBB0_7
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find a proper ZIP device!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_HZIP_CTX_Q_NUM,4,2             ## @HZIP_CTX_Q_NUM
	.no_dead_strip	_hisi_zip_ctx_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_zip_ctx_init
_hisi_zip_ctx_init:                     ; @hisi_zip_ctx_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	bl	_smp_processor_id
	bl	_cpu_to_node
	bl	_find_zip_device
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x25, _HZIP_CTX_Q_NUM@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HZIP_CTX_Q_NUM@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x24, #0
	ldr	x8, [x19]
	mov	w23, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x8, x24
	sub	w2, w23, #1
	mov	x0, x21
	mov	x3, x20
	bl	_hisi_zip_create_qp
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	str	x21, [x8, x24]
	ldrsw	x9, [x25]
	add	x10, x23, #1
	add	x24, x24, #8
	cmp	x23, x9
	mov	x23, x10
	b.lt	LBB0_3
LBB0_5:
	mov	w22, #0
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x22, x0
	cmp	w23, #1
	b.eq	LBB0_7
; %bb.9:
	sub	x20, x24, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x8, x20
	bl	_hisi_zip_release_qp
	sub	x23, x23, #1
	sub	x20, x20, #8
	cmp	x23, #1
	b.gt	LBB0_10
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find a proper ZIP device!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_HZIP_CTX_Q_NUM,4,2             ; @HZIP_CTX_Q_NUM
	.no_dead_strip	_hisi_zip_ctx_init
.subsections_via_symbols
