	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_setup_session
_hifn_setup_session:                    ## @hifn_setup_session
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	callq	_crypto_tfm_ctx
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ablkcipher_request_ctx
	movq	%rax, %r12
	movq	8(%r13), %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r14d
	xorl	%ebx, %ebx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, 24(%rax)
	je	LBB0_4
## %bb.1:
	cmpl	$0, 16(%r12)
	jne	LBB0_4
## %bb.2:
	movq	(%r12), %rax
	movq	_ACRYPTO_MODE_ECB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_4:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	addq	$32, -48(%rbp)                  ## 8-byte Folded Spill
	movl	$0, 32(%r12)
	movl	$0, %r15d
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.5:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_ASYNC_FLAGS_MISALIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	subl	%ebx, %r14d
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r13
	movl	%r15d, %r12d
	shlq	$4, %r12
	movl	8(%r13,%r12), %edi
	movl	%r14d, %esi
	callq	_min
	movq	%rax, %rbx
	movq	(%r13,%r12), %rdi
	movq	_HIFN_D_DST_DALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_HIFN_D_DST_DALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_11:
	movq	_ASYNC_FLAGS_MISALIGNED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.12:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_hifn_cipher_walk_init
	testl	%eax, %eax
	js	LBB0_13
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_hifn_cipher_walk
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.17:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	%ebx, %eax
	addq	(%r15), %rax
	movq	_HIFN_QUEUE_LENGTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_21
## %bb.18:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_15:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %ecx
	movq	8(%rax), %r8
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	pushq	%rax
	callq	_hifn_setup_dma
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_22
LBB0_19:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_20
LBB0_13:
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_20:
	testl	%ebx, %ebx
	je	LBB0_23
LBB0_16:
	movq	8(%r15), %rdi
	movq	24(%r12), %rdx
	movl	16(%r12), %ecx
	movl	(%r13), %r9d
	movl	4(%r13), %r8d
	movl	12(%r12), %r10d
	movl	8(%r12), %eax
	leaq	L_.str(%rip), %rsi
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	pushq	(%r12)
	callq	_dev_info
	addq	$32, %rsp
	jmp	LBB0_24
LBB0_22:
	incl	24(%r15)
	movq	_HIFN_DEFAULT_ACTIVE_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_23:
	xorl	%ebx, %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ACRYPTO_MODE_ECB,8,3           ## @ACRYPTO_MODE_ECB
	.comm	_HIFN_D_DST_DALIGN,4,2          ## @HIFN_D_DST_DALIGN
	.comm	_ASYNC_FLAGS_MISALIGNED,4,2     ## @ASYNC_FLAGS_MISALIGNED
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_HIFN_QUEUE_LENGTH,8,3          ## @HIFN_QUEUE_LENGTH
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_HIFN_DEFAULT_ACTIVE_NUM,4,2    ## @HIFN_DEFAULT_ACTIVE_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iv: %p [%d], key: %p [%d], mode: %u, op: %u, type: %u, err: %d.\n"

	.no_dead_strip	_hifn_setup_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hifn_setup_session
_hifn_setup_session:                    ; @hifn_setup_session
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
	ldr	w0, [x0, #20]
	bl	_crypto_tfm_ctx
	mov	x19, x0
	mov	x0, x22
	bl	_ablkcipher_request_ctx
	mov	x20, x0
	ldr	x21, [x19, #8]
	ldr	w24, [x22]
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _ACRYPTO_MODE_ECB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACRYPTO_MODE_ECB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
LBB0_3:
	mov	x23, x20
	str	wzr, [x23, #32]!
Lloh3:
	adrp	x27, _ASYNC_FLAGS_MISALIGNED@GOTPAGE
Lloh4:
	ldr	x27, [x27, _ASYNC_FLAGS_MISALIGNED@GOTPAGEOFF]
	cbz	w24, LBB0_10
; %bb.4:
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	w25, #0
Lloh5:
	adrp	x28, _HIFN_D_DST_DALIGN@GOTPAGE
Lloh6:
	ldr	x28, [x28, _HIFN_D_DST_DALIGN@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x23]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #1
	subs	w24, w24, w26
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	add	x21, x8, w25, uxtw #4
	ldr	w0, [x21, #8]
	mov	x1, x24
	bl	_min
	mov	x26, x0
	ldr	x0, [x21]
	ldr	w1, [x28]
	bl	_IS_ALIGNED
	cbz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x28]
	mov	x0, x26
	bl	_IS_ALIGNED
	cbnz	w0, LBB0_6
	b	LBB0_5
LBB0_9:
	ldr	w8, [x23]
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_11
LBB0_10:
	mov	w8, #0
	mov	w25, #0
LBB0_11:
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh7:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x25
	bl	_hifn_cipher_walk_init
	tbnz	w0, #31, LBB0_18
LBB0_13:
	mov	x0, x22
	mov	x1, x23
	bl	_hifn_cipher_walk
	mov	x24, x0
	tbnz	w0, #31, LBB0_20
; %bb.14:
	add	x23, x21, #16
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
	add	x8, x8, w24, uxtw
Lloh10:
	adrp	x9, _HIFN_QUEUE_LENGTH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HIFN_QUEUE_LENGTH@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_16
; %bb.15:
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_17
LBB0_16:
	ldr	w3, [x22, #16]
	ldr	x4, [x22, #8]
	ldr	w5, [x22]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	x6, x22
	bl	_hifn_setup_dma
	mov	x24, x0
	cbz	w0, LBB0_22
LBB0_17:
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	cbnz	w24, LBB0_20
	b	LBB0_21
LBB0_18:
	mov	x24, x0
	b	LBB0_21
LBB0_19:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w24, w8
	cbz	w24, LBB0_21
LBB0_20:
	ldr	x0, [x21, #8]
	ldr	x2, [x20, #24]
	ldp	w7, w3, [x20, #12]
	ldp	w5, w4, [x19]
	ldr	x6, [x20]
	ldr	w8, [x20, #8]
	stp	w8, w24, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
LBB0_21:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
	ldr	w8, [x21, #24]
	add	w8, w8, #1
Lloh21:
	adrp	x9, _HIFN_DEFAULT_ACTIVE_NUM@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HIFN_DEFAULT_ACTIVE_NUM@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #20]
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ACRYPTO_MODE_ECB,8,3           ; @ACRYPTO_MODE_ECB
	.comm	_HIFN_D_DST_DALIGN,4,2          ; @HIFN_D_DST_DALIGN
	.comm	_ASYNC_FLAGS_MISALIGNED,4,2     ; @ASYNC_FLAGS_MISALIGNED
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_HIFN_QUEUE_LENGTH,8,3          ; @HIFN_QUEUE_LENGTH
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_HIFN_DEFAULT_ACTIVE_NUM,4,2    ; @HIFN_DEFAULT_ACTIVE_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iv: %p [%d], key: %p [%d], mode: %u, op: %u, type: %u, err: %d.\n"

	.no_dead_strip	_hifn_setup_session
.subsections_via_symbols
