	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function safexcel_aead_gcm_setkey
_safexcel_aead_gcm_setkey:              ## @safexcel_aead_gcm_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	$72, %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, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_crypto_aead_tfm
	movq	%rax, %rdi
	callq	_crypto_tfm_ctx
	movq	%rax, %r14
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	48(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	sarl	$2, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %rdi
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rsi
	movl	%r13d, %r15d
	movl	%r13d, %edx
	callq	_aes_expandkey
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_crypto_aead_set_flags
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_26:
	leaq	-72(%rbp), %rdi
	movl	$8, %esi
	callq	_memzero_explicit
	jmp	LBB0_27
LBB0_2:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	_EIP197_TRC_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.3:
	cmpq	$0, 32(%r14)
	je	LBB0_9
## %bb.4:
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	$8, %r15d
	jb	LBB0_12
## %bb.5:
	movl	%r15d, %r13d
	shrl	$3, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %r15
	movq	-72(%rbp), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	cmpq	%rax, %r15
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_7
	jmp	LBB0_9
LBB0_8:
	movl	$1, 24(%r14)
LBB0_9:
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	$8, %r15d
	jb	LBB0_12
## %bb.10:
	movl	%r15d, %r13d
	shrl	$3, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_11
LBB0_12:
	movl	%r15d, 8(%r14)
	movl	40(%r14), %edi
	movq	_CRYPTO_TFM_REQ_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_crypto_cipher_clear_flags
	movl	40(%r14), %r13d
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_crypto_aead_get_flags
	andl	(%r12), %eax
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_crypto_cipher_set_flags
	movl	40(%r14), %edi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_crypto_cipher_setkey
	movl	%eax, %r13d
	movl	40(%r14), %edi
	callq	_crypto_cipher_get_flags
	movq	_CRYPTO_TFM_RES_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_crypto_aead_set_flags
	testl	%r13d, %r13d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_13
LBB0_27:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	40(%r14), %edi
	movq	%r13, %rsi
	movq	%r13, %rdx
	callq	_crypto_cipher_encrypt_one
	movq	_EIP197_TRC_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_21
## %bb.14:
	cmpq	$0, 32(%r14)
	je	LBB0_21
## %bb.15:
	movl	(%r12), %esi
	cmpl	$8, %esi
	jb	LBB0_25
## %bb.16:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %r15
	movq	(%r13,%rbx,8), %rdi
	callq	_cpu_to_be32
	cmpq	%rax, %r15
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	movslq	(%r12), %rsi
	movq	%rsi, %rax
	shrq	$3, %rax
	cmpq	%rbx, %rax
	ja	LBB0_17
## %bb.19:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_20:
	movl	$1, 24(%r14)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_21:
	movl	(%r12), %esi
LBB0_22:
	cmpl	$8, %esi
	jb	LBB0_25
## %bb.23:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_cpu_to_be32
	movq	16(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r12), %rsi
	movq	%rsi, %rax
	shrq	$3, %rax
	cmpq	%rbx, %rax
	ja	LBB0_24
LBB0_25:
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_memzero_explicit
	xorl	%r13d, %r13d
	jmp	LBB0_26
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AES_BLOCK_SIZE,4,2             ## @AES_BLOCK_SIZE
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EIP197_TRC_CACHE,4,2           ## @EIP197_TRC_CACHE
	.comm	_CRYPTO_TFM_REQ_MASK,4,2        ## @CRYPTO_TFM_REQ_MASK
	.comm	_CRYPTO_TFM_RES_MASK,4,2        ## @CRYPTO_TFM_RES_MASK
	.no_dead_strip	_safexcel_aead_gcm_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_gcm_setkey
_safexcel_aead_gcm_setkey:              ; @safexcel_aead_gcm_setkey
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_crypto_aead_tfm
	bl	_crypto_tfm_ctx
	mov	x19, x0
	mov	x25, sp
	ldr	x27, [x0, #48]
Lloh3:
	adrp	x26, _AES_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _AES_BLOCK_SIZE@GOTPAGEOFF]
	ldr	w8, [x26]
	asr	w8, w8, #2
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x20, x9, x8
	mov	sp, x20
	sub	x0, x29, #96
	mov	x1, x23
	mov	x2, x22
	bl	_aes_expandkey
	cbz	w0, LBB0_3
; %bb.1:
	mov	x24, x0
Lloh7:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_crypto_aead_set_flags
LBB0_2:
	sub	x0, x29, #96
	mov	w1, #8
	bl	_memzero_explicit
	b	LBB0_14
LBB0_3:
	stur	x25, [x29, #-104]               ; 8-byte Folded Spill
	ldr	w8, [x27]
Lloh10:
	adrp	x9, _EIP197_TRC_CACHE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EIP197_TRC_CACHE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.4:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.5:
	cmp	w22, #8
	b.lo	LBB0_13
; %bb.6:
	mov	x24, #0
	lsr	w28, w22, #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x25, [x8, x24, lsl #3]
	ldur	x8, [x29, #-96]
	ldr	w0, [x8, x24, lsl #2]
	bl	_cpu_to_le32
	cmp	x25, x0
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	cmp	x28, x24
	b.ne	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_10:
	cmp	w22, #8
	b.lo	LBB0_13
; %bb.11:
	mov	x24, #0
	lsr	w28, w22, #3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	x8, [x29, #-96]
	ldr	w0, [x8, x24, lsl #2]
	bl	_cpu_to_le32
	ldr	x8, [x19]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	cmp	x28, x24
	b.ne	LBB0_12
LBB0_13:
	str	w22, [x19, #8]
	ldr	w0, [x19, #40]
Lloh13:
	adrp	x25, _CRYPTO_TFM_REQ_MASK@GOTPAGE
Lloh14:
	ldr	x25, [x25, _CRYPTO_TFM_REQ_MASK@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_crypto_cipher_clear_flags
	ldr	w24, [x19, #40]
	mov	x0, x21
	bl	_crypto_aead_get_flags
	ldr	w8, [x25]
	and	w1, w8, w0
	mov	x0, x24
	bl	_crypto_cipher_set_flags
	ldr	w0, [x19, #40]
	mov	x1, x23
	mov	x2, x22
	bl	_crypto_cipher_setkey
	mov	x24, x0
	ldr	w0, [x19, #40]
	bl	_crypto_cipher_get_flags
Lloh15:
	adrp	x8, _CRYPTO_TFM_RES_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CRYPTO_TFM_RES_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w1, w8, w0
	mov	x0, x21
	bl	_crypto_aead_set_flags
	ldur	x25, [x29, #-104]               ; 8-byte Folded Reload
	cbz	w24, LBB0_16
LBB0_14:
	mov	sp, x25
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.15:
	mov	x0, x24
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	w2, [x26]
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	w0, [x19, #40]
	mov	x1, x20
	mov	x2, x20
	bl	_crypto_cipher_encrypt_one
	ldr	w8, [x27]
Lloh21:
	adrp	x9, _EIP197_TRC_CACHE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _EIP197_TRC_CACHE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.17:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_23
; %bb.18:
	ldr	w1, [x26]
	cmp	w1, #8
	b.lo	LBB0_28
; %bb.19:
	mov	x21, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	lsl	x9, x21, #3
	ldr	x22, [x8, x9]
	ldr	x0, [x20, x9]
	bl	_cpu_to_be32
	cmp	x22, x0
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x21, x21, #1
	ldrsw	x1, [x26]
	cmp	x21, x1, lsr #3
	b.lo	LBB0_20
	b	LBB0_24
LBB0_22:
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_23:
	ldr	w1, [x26]
LBB0_24:
	cmp	w1, #8
	b.lo	LBB0_28
; %bb.25:
	mov	x21, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	lsl	x22, x21, #3
	ldr	x0, [x20, x22]
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	str	x0, [x8, x22]
	add	x21, x21, #1
	ldrsw	x1, [x26]
	cmp	x21, x1, lsr #3
	b.lo	LBB0_26
; %bb.27:
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
LBB0_28:
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_memzero_explicit
	mov	w24, #0
	b	LBB0_2
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EIP197_TRC_CACHE,4,2           ; @EIP197_TRC_CACHE
	.comm	_CRYPTO_TFM_REQ_MASK,4,2        ; @CRYPTO_TFM_REQ_MASK
	.comm	_CRYPTO_TFM_RES_MASK,4,2        ; @CRYPTO_TFM_RES_MASK
	.no_dead_strip	_safexcel_aead_gcm_setkey
.subsections_via_symbols
