	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypt_setkey
_crypt_setkey:                          ## @crypt_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
	movq	%rdi, %r12
	callq	_crypt_subkey_size
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_crypt_integrity_hmac
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%r12), %ecx
	movl	%r13d, %edx
	subl	%ecx, %edx
	jae	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	movq	8(%r12), %rdi
	movq	16(%r12), %rsi
	callq	_crypt_copy_authenckey
LBB0_4:
	cmpl	$0, 4(%r12)
	jle	LBB0_13
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%r12), %rax
	movl	(%rax,%r14,4), %r13d
	movq	%r12, %rdi
	callq	_crypt_authenckey_size
	movl	%r13d, %edi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	callq	_crypto_aead_setkey
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	testl	%eax, %eax
	cmovnel	%eax, %ebx
	incq	%r14
	movslq	4(%r12), %rax
	addl	%r13d, %r15d
	cmpq	%rax, %r14
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_crypt_integrity_hmac
	testq	%rax, %rax
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	callq	_crypt_integrity_aead
	movl	%r15d, %esi
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	32(%r12), %rax
	movl	(%rax,%r14,4), %edi
	addq	16(%r12), %rsi
	movl	%r13d, %edx
	jmp	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r12), %rax
	movl	(%rax,%r14,4), %edi
	addq	16(%r12), %rsi
	movl	%r13d, %edx
	callq	_crypto_skcipher_setkey
	jmp	LBB0_8
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_crypt_integrity_hmac
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	8(%r12), %r15
	movq	%r12, %rdi
	callq	_crypt_authenckey_size
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_memzero_explicit
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_crypt_setkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypt_setkey
_crypt_setkey:                          ; @crypt_setkey
	.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	x19, x0
	bl	_crypt_subkey_size
	mov	x20, x0
	mov	x0, x19
	bl	_crypt_integrity_hmac
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w3, [x19]
	subs	w2, w20, w3
	b.hs	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_3:
	ldp	x0, x1, [x19, #8]
	bl	_crypt_copy_authenckey
LBB0_4:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.5:
	mov	w24, #0
	mov	x25, #0
	mov	w21, #0
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x19, #32]
	ldr	w22, [x8, x25, lsl #2]
	ldr	x23, [x19, #8]
	mov	x0, x19
	bl	_crypt_authenckey_size
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	bl	_crypto_aead_setkey
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	cmp	w0, #0
	csel	w21, w21, w0, eq
	add	x25, x25, #1
	ldrsw	x8, [x19, #4]
	add	w24, w24, w20
	cmp	x25, x8
	b.ge	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_crypt_integrity_hmac
	cbnz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	bl	_crypt_integrity_aead
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x25, lsl #2]
	ldr	x8, [x19, #16]
	add	x1, x8, w24, uxtw
	mov	x2, x20
	b	LBB0_7
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	ldp	x9, x8, [x19, #16]
	ldr	w0, [x8, x25, lsl #2]
	add	x1, x9, w24, uxtw
	mov	x2, x20
	bl	_crypto_skcipher_setkey
	b	LBB0_8
LBB0_13:
	mov	w21, #0
LBB0_14:
	mov	x0, x19
	bl	_crypt_integrity_hmac
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_crypt_authenckey_size
	mov	x1, x0
	mov	x0, x20
	bl	_memzero_explicit
LBB0_16:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_crypt_setkey
.subsections_via_symbols
