	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_zip_do_work
_hisi_zip_do_work:                      ## @hisi_zip_do_work
	.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
	movq	%rsi, %r15
	movl	16(%rdi), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r13
	cmpl	$0, 40(%rdi)
	je	LBB0_4
## %bb.2:
	cmpl	$0, 32(%r13)
	je	LBB0_4
## %bb.3:
	cmpl	$0, 36(%r13)
	je	LBB0_4
## %bb.6:
	movq	8(%r15), %r12
	movq	8(%r12), %rax
	movq	(%rax), %r14
	movl	(%r13), %ecx
	addl	%ecx, %ecx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hisi_acc_sg_buf_map_to_hw_sgl
	movq	%rax, 8(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	8(%r13), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-48(%rbp), %rax
	movq	%rax, 56(%r13)
	movl	(%r13), %eax
	movl	32(%r13), %esi
	leal	(%rax,%rax), %ecx
	incl	%ecx
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_hisi_acc_sg_buf_map_to_hw_sgl
	movq	%rax, 24(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	24(%r13), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_13:
	movl	16(%r13), %esi
	movq	8(%r13), %rdx
	movq	%r14, %rdi
	callq	_hisi_acc_sg_buf_unmap
	jmp	LBB0_14
LBB0_10:
	addq	$16, %r15
	movq	-56(%rbp), %rcx
	movq	%rcx, 48(%r13)
	movl	(%r12), %esi
	movq	-48(%rbp), %rdx
	movl	36(%r13), %r9d
	movl	40(%r13), %r8d
	movq	%r15, %rdi
	callq	_hisi_zip_fill_sqe
	movq	_HZIP_SGL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hisi_zip_config_buf_type
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_hisi_zip_config_tag
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_hisi_qp_send
	testl	%eax, %eax
	js	LBB0_12
## %bb.11:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movl	%eax, %ebx
	movl	32(%r13), %esi
	movq	24(%r13), %rdx
	movq	%r14, %rdi
	callq	_hisi_acc_sg_buf_unmap
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HZIP_SGL,4,2                   ## @HZIP_SGL
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.no_dead_strip	_hisi_zip_do_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_zip_do_work
_hisi_zip_do_work:                      ; @hisi_zip_do_work
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x1
	ldr	w1, [x0, #16]
	cbz	w1, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_6
; %bb.3:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	x21, [x22, #8]
	ldr	x8, [x21, #8]
	ldr	x20, [x8]
	ldr	w8, [x19]
	lsl	w3, w8, #1
	add	x4, sp, #8
	mov	x0, x20
	mov	x2, x22
	bl	_hisi_acc_sg_buf_map_to_hw_sgl
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	ldr	x8, [sp, #8]
	str	x8, [x19, #56]
	ldr	w1, [x19, #32]
	ldr	w8, [x19]
	mov	w3, #1
	bfi	w3, w8, #1, #31
	mov	x4, sp
	mov	x0, x20
	mov	x2, x22
	bl	_hisi_acc_sg_buf_map_to_hw_sgl
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
	mov	x21, x0
LBB0_11:
	ldr	w1, [x19, #16]
	ldr	x2, [x19, #8]
	mov	x0, x20
	bl	_hisi_acc_sg_buf_unmap
	b	LBB0_8
LBB0_12:
	add	x22, x22, #16
	ldp	x3, x2, [sp]
	str	x3, [x19, #48]
	ldr	w1, [x21]
	ldp	w5, w4, [x19, #36]
	mov	x0, x22
	bl	_hisi_zip_fill_sqe
Lloh2:
	adrp	x8, _HZIP_SGL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZIP_SGL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_hisi_zip_config_buf_type
	ldr	w1, [x19]
	mov	x0, x22
	bl	_hisi_zip_config_tag
	mov	x0, x21
	mov	x1, x22
	bl	_hisi_qp_send
	tbnz	w0, #31, LBB0_14
; %bb.13:
Lloh5:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
	b	LBB0_7
LBB0_14:
	mov	x21, x0
	ldr	w1, [x19, #32]
	ldr	x2, [x19, #24]
	mov	x0, x20
	bl	_hisi_acc_sg_buf_unmap
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HZIP_SGL,4,2                   ; @HZIP_SGL
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.no_dead_strip	_hisi_zip_do_work
.subsections_via_symbols
