	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function safexcel_aead_setkey
_safexcel_aead_setkey:                  ## @safexcel_aead_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	$56, %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, %rbx
	movq	%rdi, %r14
	callq	_crypto_aead_tfm
	movq	%rax, %rdi
	callq	_crypto_tfm_ctx
	movq	%rax, %r15
	movq	72(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	-64(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_crypto_authenc_extractkeys
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_crypto_aead_set_flags
LBB0_30:
	leaq	-64(%rbp), %rdi
	movl	$24, %esi
	callq	_memzero_explicit
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	(%r15), %rax
	movq	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	-64(%rbp), %rcx
	movq	_AES_MIN_KEY_SIZE@GOTPCREL(%rip), %rsi
	movq	_CTR_RFC3686_NONCE_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rsi), %rsi
	addq	%rdx, %rsi
	cmpq	%rsi, %rcx
	jl	LBB0_8
## %bb.3:
	movq	-56(%rbp), %rsi
	movq	%rcx, %rdi
	subq	%rdx, %rdi
	movl	(%rdi,%rsi), %edx
	movl	%edx, 64(%r15)
	subq	%rax, %rcx
	movq	%rcx, -64(%rbp)
LBB0_4:
	movl	8(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_6
## %bb.9:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_verify_aead_des3_key
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_30
	jmp	LBB0_11
LBB0_10:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rsi
	leaq	-96(%rbp), %rdi
	callq	_aes_expandkey
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_8
LBB0_11:
	movq	_EIP197_TRC_CACHE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_15
## %bb.12:
	cmpq	$0, 56(%r15)
	je	LBB0_15
## %bb.13:
	movl	40(%r15), %edi
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rsi
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	$1, 48(%r15)
LBB0_15:
	movl	$-130, %eax
	addl	12(%r15), %eax
	cmpl	$4, %eax
	ja	LBB0_16
## %bb.17:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_22:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_23
LBB0_6:
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movl	4(%rbx), %edi
	callq	_dev_err
	jmp	LBB0_8
LBB0_16:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_7
LBB0_21:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_23
LBB0_20:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_23
LBB0_19:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_23
LBB0_18:
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_23:
	leaq	-80(%rbp), %rcx
	leaq	-72(%rbp), %r8
	callq	_safexcel_hmac_setkey
	testl	%eax, %eax
	jne	LBB0_8
## %bb.24:
	movq	%r14, %rdi
	callq	_crypto_aead_get_flags
	movq	_CRYPTO_TFM_RES_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_crypto_aead_set_flags
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	je	LBB0_29
## %bb.25:
	cmpq	$0, 56(%r15)
	je	LBB0_29
## %bb.26:
	movl	36(%r15), %edi
	movq	-80(%rbp), %rsi
	movq	16(%r15), %rdx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_28
## %bb.27:
	movl	32(%r15), %edi
	movq	-72(%rbp), %rsi
	movq	16(%r15), %rdx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_29
LBB0_28:
	movl	$1, 48(%r15)
LBB0_29:
	movl	40(%r15), %edi
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rsi
	callq	_memcpy
	movq	-64(%rbp), %rax
	movq	%rax, 24(%r15)
	movl	36(%r15), %edi
	movq	16(%r15), %rdx
	leaq	-80(%rbp), %rsi
	callq	_memcpy
	movl	32(%r15), %edi
	movq	16(%r15), %rdx
	leaq	-72(%rbp), %rsi
	callq	_memcpy
	xorl	%r12d, %r12d
	jmp	LBB0_30
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_22
	.long	L0_0_set_21
	.long	L0_0_set_20
	.long	L0_0_set_19
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,8,3 ## @CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD
	.comm	_AES_MIN_KEY_SIZE,8,3           ## @AES_MIN_KEY_SIZE
	.comm	_CTR_RFC3686_NONCE_SIZE,8,3     ## @CTR_RFC3686_NONCE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aead: unsupported cipher algorithm\n"

	.comm	_EIP197_TRC_CACHE,4,2           ## @EIP197_TRC_CACHE
L_.str.1:                               ## @.str.1
	.asciz	"safexcel-sha1"

L_.str.2:                               ## @.str.2
	.asciz	"safexcel-sha224"

L_.str.3:                               ## @.str.3
	.asciz	"safexcel-sha256"

L_.str.4:                               ## @.str.4
	.asciz	"safexcel-sha384"

L_.str.5:                               ## @.str.5
	.asciz	"safexcel-sha512"

L_.str.6:                               ## @.str.6
	.asciz	"aead: unsupported hash algorithm\n"

	.comm	_CRYPTO_TFM_RES_MASK,4,2        ## @CRYPTO_TFM_RES_MASK
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.no_dead_strip	_safexcel_aead_setkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function safexcel_aead_setkey
_safexcel_aead_setkey:                  ; @safexcel_aead_setkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	bl	_crypto_aead_tfm
	bl	_crypto_tfm_ctx
	mov	x19, x0
	ldr	x24, [x0, #72]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x22
	bl	_crypto_authenc_extractkeys
	cbz	x0, LBB0_3
LBB0_1:
Lloh3:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_crypto_aead_set_flags
LBB0_2:
	add	x0, sp, #8
	mov	w1, #24
	bl	_memzero_explicit
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
LBB0_3:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x9, [sp, #8]
Lloh9:
	adrp	x10, _AES_MIN_KEY_SIZE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AES_MIN_KEY_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x10]
Lloh12:
	adrp	x10, _CTR_RFC3686_NONCE_SIZE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CTR_RFC3686_NONCE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	add	x11, x10, x11
	cmp	x9, x11
	b.lt	LBB0_1
; %bb.5:
	ldr	x11, [sp, #16]
	sub	x10, x9, x10
	ldr	w10, [x10, x11]
	str	w10, [x19, #64]
	sub	x8, x9, x8
	str	x8, [sp, #8]
LBB0_6:
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_17
; %bb.8:
	ldp	x2, x1, [sp, #8]
	mov	x0, x20
	bl	_verify_aead_des3_key
	mov	x21, x0
	bl	_unlikely
	cbnz	w0, LBB0_2
	b	LBB0_10
LBB0_9:
	ldp	x2, x1, [sp, #8]
	mov	x0, sp
	bl	_aes_expandkey
	mov	x21, x0
	bl	_unlikely
	cbnz	w0, LBB0_1
LBB0_10:
	ldr	w8, [x24]
Lloh15:
	adrp	x22, _EIP197_TRC_CACHE@GOTPAGE
Lloh16:
	ldr	x22, [x22, _EIP197_TRC_CACHE@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.11:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	w0, [x19, #40]
	ldp	x2, x1, [sp, #8]
	bl	_memcmp
	cbz	x0, LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x19, #48]
LBB0_14:
	ldr	w8, [x19, #12]
	sub	w8, w8, #130
	cmp	w8, #4
	b.hi	LBB0_19
; %bb.15:
Lloh17:
	adrp	x9, lJTI0_0@PAGE
Lloh18:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_16
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_16:
	ldp	w2, w1, [sp, #24]
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_24
LBB0_17:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
LBB0_18:
	ldr	w0, [x24, #4]
	bl	_dev_err
	b	LBB0_1
LBB0_19:
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_18
LBB0_20:
	ldp	w2, w1, [sp, #24]
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_24
LBB0_21:
	ldp	w2, w1, [sp, #24]
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_24
LBB0_22:
	ldp	w2, w1, [sp, #24]
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_24
LBB0_23:
	ldp	w2, w1, [sp, #24]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_24:
	add	x3, sp, #40
	add	x4, sp, #32
	bl	_safexcel_hmac_setkey
	cbnz	w0, LBB0_1
; %bb.25:
	mov	x0, x20
	bl	_crypto_aead_get_flags
Lloh33:
	adrp	x8, _CRYPTO_TFM_RES_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CRYPTO_TFM_RES_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	and	w1, w8, w0
	mov	x0, x20
	bl	_crypto_aead_set_flags
	ldr	w8, [x24]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_30
; %bb.26:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_30
; %bb.27:
	ldr	w0, [x19, #36]
	ldr	x1, [sp, #40]
	ldr	x2, [x19, #16]
	bl	_memcmp
	cbnz	x0, LBB0_29
; %bb.28:
	ldr	w0, [x19, #32]
	ldr	x1, [sp, #32]
	ldr	x2, [x19, #16]
	bl	_memcmp
	cbz	x0, LBB0_30
LBB0_29:
	mov	w8, #1
	str	w8, [x19, #48]
LBB0_30:
	ldr	w0, [x19, #40]
	ldp	x2, x1, [sp, #8]
	bl	_memcpy
	ldr	x8, [sp, #8]
	str	x8, [x19, #24]
	ldr	w0, [x19, #36]
	ldr	x2, [x19, #16]
	add	x1, sp, #40
	bl	_memcpy
	ldr	w0, [x19, #32]
	ldr	x2, [x19, #16]
	add	x1, sp, #32
	bl	_memcpy
	mov	w21, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_16-LBB0_16)>>2
	.byte	(LBB0_20-LBB0_16)>>2
	.byte	(LBB0_21-LBB0_16)>>2
	.byte	(LBB0_22-LBB0_16)>>2
	.byte	(LBB0_23-LBB0_16)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,8,3 ; @CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD
	.comm	_AES_MIN_KEY_SIZE,8,3           ; @AES_MIN_KEY_SIZE
	.comm	_CTR_RFC3686_NONCE_SIZE,8,3     ; @CTR_RFC3686_NONCE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aead: unsupported cipher algorithm\n"

	.comm	_EIP197_TRC_CACHE,4,2           ; @EIP197_TRC_CACHE
l_.str.1:                               ; @.str.1
	.asciz	"safexcel-sha1"

l_.str.2:                               ; @.str.2
	.asciz	"safexcel-sha224"

l_.str.3:                               ; @.str.3
	.asciz	"safexcel-sha256"

l_.str.4:                               ; @.str.4
	.asciz	"safexcel-sha384"

l_.str.5:                               ; @.str.5
	.asciz	"safexcel-sha512"

l_.str.6:                               ; @.str.6
	.asciz	"aead: unsupported hash algorithm\n"

	.comm	_CRYPTO_TFM_RES_MASK,4,2        ; @CRYPTO_TFM_RES_MASK
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.no_dead_strip	_safexcel_aead_setkey
.subsections_via_symbols
