	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function safexcel_skcipher_aesxts_setkey
_safexcel_skcipher_aesxts_setkey:       ## @safexcel_skcipher_aesxts_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, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_crypto_skcipher_tfm
	movq	%rax, %rdi
	callq	_crypto_tfm_ctx
	movq	%rax, %r12
	movq	32(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_xts_verify_key
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_29
## %bb.1:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	shrl	%ebx
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_aes_expandkey
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r14d
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_crypto_skcipher_set_flags
	jmp	LBB0_29
LBB0_3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	_EIP197_TRC_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	%ebx, -72(%rbp)                 ## 4-byte Spill
	je	LBB0_11
## %bb.4:
	cmpq	$0, 24(%r13)
	je	LBB0_11
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$8, %eax
	jae	LBB0_7
## %bb.6:
	movl	$0, -68(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_7:
	movl	%eax, %r12d
	shrl	$3, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%r14,8), %rbx
	movq	-64(%rbp), %rax
	movl	(%rax,%r14,4), %edi
	callq	_cpu_to_le32
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_9
	jmp	LBB0_11
LBB0_10:
	movl	$1, 16(%r13)
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ecx
	shrl	$3, %ecx
	cmpl	$8, %eax
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	jae	LBB0_13
LBB0_12:
	movb	$1, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_16
LBB0_13:
	cmpl	$2, %ecx
	movl	$1, %r14d
	cmovael	%ecx, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	movq	(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_14
## %bb.15:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_16:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %eax
	leaq	(%r15,%rax,4), %rsi
	leaq	-64(%rbp), %rdi
	callq	_aes_expandkey
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r14d
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_crypto_skcipher_set_flags
	jmp	LBB0_29
LBB0_18:
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movq	_EIP197_TRC_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_25
## %bb.19:
	cmpq	$0, 24(%r13)
	je	LBB0_25
## %bb.20:
	cmpl	$8, -44(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_25
## %bb.21:
	cmpl	$2, %r14d
	movl	$1, %r15d
	cmovael	%r14d, %r15d
	leaq	(,%r14,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	addq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movq	(%rax,%rbx,8), %r12
	movq	-64(%rbp), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	cmpq	%rax, %r12
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_23 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_23
	jmp	LBB0_25
LBB0_24:
	movl	$1, 16(%r13)
LBB0_25:
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_28
## %bb.26:
	cmpl	$2, %r14d
	movl	$1, %r15d
	cmovael	%r14d, %r15d
	shlq	$3, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	movq	(%r13), %rcx
	addq	%r14, %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_27
LBB0_28:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	$-2, %eax
	movl	%eax, 8(%r13)
	leaq	-64(%rbp), %rdi
	movl	$8, %esi
	callq	_memzero_explicit
	xorl	%r14d, %r14d
LBB0_29:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EIP197_TRC_CACHE,4,2           ## @EIP197_TRC_CACHE
	.no_dead_strip	_safexcel_skcipher_aesxts_setkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function safexcel_skcipher_aesxts_setkey
_safexcel_skcipher_aesxts_setkey:       ; @safexcel_skcipher_aesxts_setkey
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_crypto_skcipher_tfm
	bl	_crypto_tfm_ctx
	mov	x20, x0
	ldr	x25, [x0, #32]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_xts_verify_key
	mov	x24, x0
	cbnz	w0, LBB0_17
; %bb.1:
	lsr	w23, w19, #1
	add	x0, sp, #8
	mov	x1, x22
	mov	x2, x23
	bl	_aes_expandkey
	cbnz	w0, LBB0_16
; %bb.2:
	ldr	w8, [x25]
Lloh0:
	adrp	x26, _EIP197_TRC_CACHE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EIP197_TRC_CACHE@GOTPAGEOFF]
	ldr	w9, [x26]
	lsr	w27, w19, #3
	tst	w9, w8
	b.eq	LBB0_10
; %bb.3:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_10
; %bb.4:
	cmp	w19, #8
	b.hs	LBB0_6
; %bb.5:
	mov	w27, #0
	mov	w28, #1
	b	LBB0_15
LBB0_6:
	mov	x24, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x28, [x8, x24, lsl #3]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, x24, lsl #2]
	bl	_cpu_to_le32
	cmp	x28, x0
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	cmp	x27, x24
	b.ne	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	w8, #1
	str	w8, [x20, #16]
LBB0_10:
	cmp	w19, #8
	b.hs	LBB0_12
; %bb.11:
	mov	w28, #1
	b	LBB0_15
LBB0_12:
	mov	x24, #0
	cmp	w27, #1
	csinc	w28, w27, wzr, hi
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	w0, [x8, x24, lsl #2]
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	cmp	x28, x24
	b.ne	LBB0_13
; %bb.14:
	mov	w28, #0
LBB0_15:
	add	x1, x22, w23, uxtw #2
	add	x0, sp, #8
	mov	x2, x23
	bl	_aes_expandkey
	cbz	w0, LBB0_18
LBB0_16:
	mov	x24, x0
Lloh2:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_crypto_skcipher_set_flags
LBB0_17:
	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_18:
	mov	w21, w27
	ldr	w8, [x25]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_25
; %bb.19:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_25
; %bb.20:
	cmp	w19, #8
	b.lo	LBB0_25
; %bb.21:
	mov	x22, #0
	cmp	w21, #1
	csinc	w23, w21, wzr, hi
	lsl	x24, x21, #3
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x24
	ldr	x25, [x8, x22, lsl #3]
	ldr	x8, [sp, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_cpu_to_le32
	cmp	x25, x0
	b.ne	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x22, x22, #1
	cmp	x23, x22
	b.ne	LBB0_22
	b	LBB0_25
LBB0_24:
	mov	w8, #1
	str	w8, [x20, #16]
LBB0_25:
	tbnz	w28, #0, LBB0_28
; %bb.26:
	mov	x22, #0
	cmp	w21, #1
	csinc	w23, w21, wzr, hi
	lsl	x21, x21, #3
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_cpu_to_le32
	ldr	x8, [x20]
	add	x8, x8, x21
	str	x0, [x8, x22, lsl #3]
	add	x22, x22, #1
	cmp	x23, x22
	b.ne	LBB0_27
LBB0_28:
	and	w8, w19, #0xfffffffe
	str	w8, [x20, #8]
	add	x0, sp, #8
	mov	w1, #8
	bl	_memzero_explicit
	mov	w24, #0
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EIP197_TRC_CACHE,4,2           ; @EIP197_TRC_CACHE
	.no_dead_strip	_safexcel_skcipher_aesxts_setkey
.subsections_via_symbols
