	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_cipher
_setup_cipher:                          ## @setup_cipher
	.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
	movl	%ecx, %r15d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_crypto_tfm_ctx
	leaq	16(%rax), %r14
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	cmoveq	%rax, %r14
	movq	8(%r14), %r12
	movq	%r13, %rdi
	je	LBB0_2
## %bb.1:
	callq	_cipher_cfg_enc
	movq	_NPE_OP_CRYPT_ENCRYPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 4(%r14)
	jmp	LBB0_3
LBB0_2:
	callq	_cipher_cfg_dec
LBB0_3:
	movq	%r13, %rdi
	movq	_MOD_AES@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.4:
	cmpl	$16, %r15d
	je	LBB0_5
## %bb.6:
	cmpl	$32, %r15d
	je	LBB0_9
## %bb.7:
	cmpl	$24, %r15d
	jne	LBB0_20
## %bb.8:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_MOD_AES192@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_11:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r14d
	movq	%rbx, %rsi
	callq	_crypto_des_verify_key
	movl	%r14d, %eax
	jmp	LBB0_12
LBB0_5:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_MOD_AES128@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_9:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_MOD_AES256@GOTPCREL(%rip), %rcx
LBB0_10:
	orl	(%rcx), %eax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_12:
	movl	%eax, %edi
	movl	%eax, %r14d
	callq	_cpu_to_be32
	movl	%eax, (%r12)
	addq	$16, %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	_DES3_EDE_KEY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%r15d, %edx
	jle	LBB0_13
## %bb.14:
	testl	%r14d, (%r13)
	movl	%r14d, %esi
	jne	LBB0_16
## %bb.15:
	movq	%rax, %r14
	movslq	%r15d, %rax
	leaq	(%r12,%rax,4), %rdi
	movl	%esi, %ebx
	xorl	%esi, %esi
	callq	_memset
	movl	%ebx, %esi
	movl	(%r14), %r15d
LBB0_16:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_17
LBB0_13:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %esi
LBB0_17:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	$4, %r15d
	movl	%r15d, (%rdx)
	movq	_NPE_OP_CRYPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rdx)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_21
## %bb.18:
	andl	(%r13), %esi
	je	LBB0_21
## %bb.19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gen_rev_aes_key                ## TAILCALL
LBB0_20:
	movq	_CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rdi)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NPE_OP_CRYPT_ENCRYPT,4,2       ## @NPE_OP_CRYPT_ENCRYPT
	.comm	_MOD_AES,4,2                    ## @MOD_AES
	.comm	_MOD_AES128,4,2                 ## @MOD_AES128
	.comm	_MOD_AES192,4,2                 ## @MOD_AES192
	.comm	_MOD_AES256,4,2                 ## @MOD_AES256
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ## @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DES3_EDE_KEY_SIZE,4,2          ## @DES3_EDE_KEY_SIZE
	.comm	_NPE_OP_CRYPT_ENABLE,4,2        ## @NPE_OP_CRYPT_ENABLE
	.no_dead_strip	_setup_cipher
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_cipher
_setup_cipher:                          ; @setup_cipher
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	bl	_crypto_tfm_ctx
	add	x8, x0, #16
	cmp	w20, #0
	csel	x25, x8, x0, ne
	ldr	x23, [x25, #8]
	mov	x0, x19
	cbz	w20, LBB0_2
; %bb.1:
	bl	_cipher_cfg_enc
	mov	x22, x0
Lloh0:
	adrp	x8, _NPE_OP_CRYPT_ENCRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NPE_OP_CRYPT_ENCRYPT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x25, #4]
	orr	w8, w9, w8
	str	w8, [x25, #4]
	b	LBB0_3
LBB0_2:
	bl	_cipher_cfg_dec
	mov	x22, x0
LBB0_3:
Lloh3:
	adrp	x26, _MOD_AES@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MOD_AES@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.4:
	cmp	w21, #16
	b.eq	LBB0_9
; %bb.5:
	cmp	w21, #32
	b.eq	LBB0_10
; %bb.6:
	cmp	w21, #24
	b.ne	LBB0_18
; %bb.7:
Lloh5:
	adrp	x8, _MOD_AES192@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MOD_AES192@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	mov	x0, x19
	mov	x1, x24
	bl	_crypto_des_verify_key
	b	LBB0_12
LBB0_9:
Lloh7:
	adrp	x8, _MOD_AES128@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MOD_AES128@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh9:
	adrp	x8, _MOD_AES256@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MOD_AES256@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_12:
	mov	x0, x22
	bl	_cpu_to_be32
	str	w0, [x23], #16
	mov	x0, x23
	mov	x1, x24
	mov	x2, x21
	bl	_memcpy
Lloh11:
	adrp	x24, _DES3_EDE_KEY_SIZE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _DES3_EDE_KEY_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	subs	w2, w8, w21
	b.le	LBB0_15
; %bb.13:
	ldr	w8, [x26]
	tst	w8, w22
	b.ne	LBB0_15
; %bb.14:
	add	x0, x23, w21, sxtw #2
	mov	w1, #0
	bl	_memset
	ldr	w21, [x24]
LBB0_15:
	mov	w0, #0
	add	w8, w21, #4
	str	w8, [x25]
Lloh13:
	adrp	x8, _NPE_OP_CRYPT_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NPE_OP_CRYPT_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x25, #4]
	orr	w8, w9, w8
	str	w8, [x25, #4]
	cbnz	w20, LBB0_19
; %bb.16:
	ldr	w8, [x26]
	and	w8, w8, w22
	cbz	w8, LBB0_19
; %bb.17:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_gen_rev_aes_key
LBB0_18:
Lloh16:
	adrp	x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CRYPTO_TFM_RES_BAD_KEY_LEN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NPE_OP_CRYPT_ENCRYPT,4,2       ; @NPE_OP_CRYPT_ENCRYPT
	.comm	_MOD_AES,4,2                    ; @MOD_AES
	.comm	_MOD_AES128,4,2                 ; @MOD_AES128
	.comm	_MOD_AES192,4,2                 ; @MOD_AES192
	.comm	_MOD_AES256,4,2                 ; @MOD_AES256
	.comm	_CRYPTO_TFM_RES_BAD_KEY_LEN,4,2 ; @CRYPTO_TFM_RES_BAD_KEY_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DES3_EDE_KEY_SIZE,4,2          ; @DES3_EDE_KEY_SIZE
	.comm	_NPE_OP_CRYPT_ENABLE,4,2        ; @NPE_OP_CRYPT_ENABLE
	.no_dead_strip	_setup_cipher
.subsections_via_symbols
