	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cts_cbc_decrypt
_cts_cbc_decrypt:                       ## @cts_cbc_decrypt
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movl	12(%rsi), %edi
	callq	_crypto_blkcipher_blocksize
	movl	%eax, %r14d
	movl	%eax, %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leal	(%r14,%r14), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movl	%r13d, -72(%rbp)                ## 4-byte Spill
	subl	%r14d, %r13d
	js	LBB0_1
## %bb.2:
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	-56(%rbp), %rdi
	movl	$1, %esi
	callq	_sg_init_table
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_sg_init_table
	movq	%r12, %rbx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -116(%rbp)
	movq	%r15, -128(%rbp)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	8(%rax), %eax
	movl	%eax, -120(%rbp)
	leal	(,%r14,4), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%edx, -80(%rbp)                 ## 4-byte Spill
	callq	_memset
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movq	%rbx, %r12
	movl	%r14d, %edx
	callq	_sg_set_buf
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_sg_set_buf
	leaq	-128(%rbp), %rdi
	movq	%rbx, %rsi
	leaq	-56(%rbp), %rdx
	movl	%r14d, %ecx
	callq	_crypto_blkcipher_decrypt_iv
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
	movslq	%r14d, %rbx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,4), %rsi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_crypto_xor
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rbx,4), %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%r13d, %eax
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rdi
	leaq	(%r12,%rax,4), %rsi
	movl	%r14d, %edx
	subl	%r13d, %edx
	callq	_memcpy
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_sg_set_buf
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_sg_set_buf
	leaq	-128(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_crypto_blkcipher_decrypt_iv
	movl	%eax, %ebx
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movq	(%r15), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_crypto_xor
	movq	%r12, %rdi
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	movl	$1, %r8d
	callq	_scatterwalk_map_and_copy
	movq	(%r15), %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cts_cbc_decrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cts_cbc_decrypt
_cts_cbc_decrypt:                       ; @cts_cbc_decrypt
	.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, #64
	mov	x20, x5
	stur	w4, [x29, #-124]                ; 4-byte Folded Spill
	mov	x21, x3
	stur	x2, [x29, #-136]                ; 8-byte Folded Spill
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	w0, [x1, #12]
	bl	_crypto_blkcipher_blocksize
	mov	x23, x0
	mov	w8, w0
	lsl	x8, x8, #2
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x27, x9, x12
	mov	sp, x27
	sub	w28, w20, w0
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x26, x8, x12
	mov	sp, x26
	lsl	w8, w0, #1
	lsl	x8, x8, #2
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x24, x9, x12
	mov	sp, x24
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x25, x8, x12
	mov	sp, x25
	tbnz	w28, #31, LBB0_3
; %bb.1:
	sub	x0, x29, #112
	mov	w1, #1
	bl	_sg_init_table
	sub	x0, x29, #120
	mov	w1, #1
	bl	_sg_init_table
	mov	x0, x24
	mov	x1, x21
	ldur	w2, [x29, #-124]                ; 4-byte Folded Reload
	mov	x3, x20
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
	ldr	w8, [x22]
	stur	x26, [x29, #-104]
	ldr	w9, [x19, #8]
	stp	w9, w8, [x29, #-96]
	lsl	w22, w23, #2
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	sub	x0, x29, #112
	mov	x1, x24
	mov	x2, x23
	bl	_sg_set_buf
	sub	x0, x29, #120
	mov	x1, x27
	mov	x2, x23
	bl	_sg_set_buf
	sub	x0, x29, #104
	sub	x1, x29, #120
	sub	x2, x29, #112
	mov	x3, x23
	bl	_crypto_blkcipher_decrypt_iv
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	stur	w20, [x29, #-140]               ; 4-byte Folded Spill
	sbfiz	x20, x23, #2, #32
	add	x21, x24, x20
	mov	x0, x26
	mov	x1, x21
	mov	x2, x28
	bl	_memcpy
	mov	x0, x27
	mov	x1, x26
	mov	x2, x23
	bl	_crypto_xor
	add	x0, x25, x20
	mov	x1, x27
	mov	x2, x28
	bl	_memcpy
	lsl	x8, x28, #2
	add	x0, x21, x8
	add	x1, x27, x8
	sub	w2, w23, w28
	bl	_memcpy
	mov	x0, x26
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	sub	x0, x29, #112
	mov	x1, x21
	mov	x2, x23
	bl	_sg_set_buf
	sub	x0, x29, #120
	mov	x1, x25
	mov	x2, x23
	bl	_sg_set_buf
	sub	x0, x29, #104
	sub	x1, x29, #120
	sub	x2, x29, #112
	mov	x3, x23
	bl	_crypto_blkcipher_decrypt_iv
	mov	x21, x0
	ldr	x1, [x19]
	mov	x0, x25
	mov	x2, x23
	bl	_crypto_xor
	mov	x0, x25
	ldur	x1, [x29, #-136]                ; 8-byte Folded Reload
	ldur	w2, [x29, #-124]                ; 4-byte Folded Reload
	ldur	w3, [x29, #-140]                ; 4-byte Folded Reload
	mov	w4, #1
	bl	_scatterwalk_map_and_copy
	ldr	x0, [x19]
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x21
	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_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cts_cbc_decrypt
.subsections_via_symbols
