	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_setkey
_hifn_setkey:                           ## @hifn_setkey
	.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	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_crypto_ablkcipher_tfm
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_crypto_tfm_ctx
	movq	%rax, %r15
	movq	_HIFN_MAX_CRYPT_KEY_LENGTH@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_crypto_ablkcipher_set_flags
	movl	$-1, %eax
	jmp	LBB0_7
LBB0_2:
	movq	8(%r15), %rbx
	movq	_HIFN_DES_KEY_LENGTH@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_6
## %bb.3:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_DES_EXPKEY_WORDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdi
	movq	%r14, %rsi
	callq	_des_ekey
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %eax
	movq	_CRYPTO_TFM_REQ_WEAK_KEY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.9:
	movq	_CRYPTO_TFM_RES_WEAK_KEY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_5:
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
LBB0_6:
	movq	_HIFN_FLAG_OLD_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movl	4(%r15), %edi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%r13d, (%r15)
	xorl	%eax, %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HIFN_MAX_CRYPT_KEY_LENGTH,4,2  ## @HIFN_MAX_CRYPT_KEY_LENGTH
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_HIFN_DES_KEY_LENGTH,4,2        ## @HIFN_DES_KEY_LENGTH
	.comm	_DES_EXPKEY_WORDS,4,2           ## @DES_EXPKEY_WORDS
	.comm	_CRYPTO_TFM_REQ_WEAK_KEY,4,2    ## @CRYPTO_TFM_REQ_WEAK_KEY
	.comm	_CRYPTO_TFM_RES_WEAK_KEY,4,2    ## @CRYPTO_TFM_RES_WEAK_KEY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HIFN_FLAG_OLD_KEY,4,2          ## @HIFN_FLAG_OLD_KEY
	.no_dead_strip	_hifn_setkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hifn_setkey
_hifn_setkey:                           ; @hifn_setkey
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_crypto_ablkcipher_tfm
	mov	x22, x0
	bl	_crypto_tfm_ctx
Lloh3:
	adrp	x8, _HIFN_MAX_CRYPT_KEY_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HIFN_MAX_CRYPT_KEY_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.hs	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_crypto_ablkcipher_set_flags
	mov	w0, #-1
	b	LBB0_8
LBB0_2:
	mov	x21, x0
	ldr	x23, [x0, #8]
Lloh9:
	adrp	x8, _HIFN_DES_KEY_LENGTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIFN_DES_KEY_LENGTH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_7
; %bb.3:
	mov	x24, sp
Lloh12:
	adrp	x8, _DES_EXPKEY_WORDS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DES_EXPKEY_WORDS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x0, x9, x8
	mov	sp, x0
	mov	x1, x20
	bl	_des_ekey
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w8, [x22]
Lloh17:
	adrp	x9, _CRYPTO_TFM_REQ_WEAK_KEY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CRYPTO_TFM_REQ_WEAK_KEY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh20:
	adrp	x9, _CRYPTO_TFM_RES_WEAK_KEY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CRYPTO_TFM_RES_WEAK_KEY@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22]
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	mov	sp, x24
	b	LBB0_8
LBB0_6:
	mov	sp, x24
LBB0_7:
Lloh26:
	adrp	x8, _HIFN_FLAG_OLD_KEY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HIFN_FLAG_OLD_KEY@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x23]
	bic	w8, w9, w8
	str	w8, [x23]
	ldr	w0, [x21, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	mov	w0, #0
	str	w19, [x21]
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #48
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_HIFN_MAX_CRYPT_KEY_LENGTH,4,2  ; @HIFN_MAX_CRYPT_KEY_LENGTH
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_HIFN_DES_KEY_LENGTH,4,2        ; @HIFN_DES_KEY_LENGTH
	.comm	_DES_EXPKEY_WORDS,4,2           ; @DES_EXPKEY_WORDS
	.comm	_CRYPTO_TFM_REQ_WEAK_KEY,4,2    ; @CRYPTO_TFM_REQ_WEAK_KEY
	.comm	_CRYPTO_TFM_RES_WEAK_KEY,4,2    ; @CRYPTO_TFM_RES_WEAK_KEY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HIFN_FLAG_OLD_KEY,4,2          ; @HIFN_FLAG_OLD_KEY
	.no_dead_strip	_hifn_setkey
.subsections_via_symbols
