	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypt_ctr_cipher
_crypt_ctr_cipher:                      ## @crypt_ctr_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kstrdup
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strstarts
	leaq	-48(%rbp), %rcx
	leaq	-40(%rbp), %r8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	callq	_crypt_ctr_cipher_new
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_4:
	callq	_crypt_ctr_cipher_old
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_20:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_crypt_ctr_ivmode
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_crypt_set_key
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.12:
	movq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*%rcx
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_18
LBB0_15:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	%r14, %rdi
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
LBB0_18:
	cmpq	$0, 8(%r14)
	je	LBB0_20
## %bb.19:
	movl	(%r14), %edx
	movl	4(%r14), %edi
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_20
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_9:
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r15)
	jmp	LBB0_20
LBB0_13:
	leaq	L_.str.3(%rip), %rax
	movq	%rax, (%r15)
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.4(%rip), %rax
	movq	%rax, (%r15)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate cipher strings"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"capi:"

L_.str.2:                               ## @.str.2
	.asciz	"Error decoding and setting key"

L_.str.3:                               ## @.str.3
	.asciz	"Error creating IV"

L_.str.4:                               ## @.str.4
	.asciz	"Error initialising IV"

	.no_dead_strip	_crypt_ctr_cipher
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypt_ctr_cipher
_crypt_ctr_cipher:                      ; @crypt_ctr_cipher
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	stp	xzr, xzr, [sp]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kstrdup
	str	w0, [x19, #24]
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strstarts
	add	x3, sp, #8
	mov	x4, sp
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_crypt_ctr_cipher_new
	mov	x21, x0
	cbnz	w0, LBB0_18
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, l_.str@PAGE
Lloh6:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_18
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_crypt_ctr_cipher_old
	mov	x21, x0
	cbnz	w0, LBB0_18
LBB0_5:
	ldr	x1, [sp, #8]
	mov	x0, x20
	bl	_crypt_ctr_ivmode
	tbnz	w0, #31, LBB0_15
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	bl	_crypt_set_key
	mov	x21, x0
	tbnz	w0, #31, LBB0_16
; %bb.7:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.8:
	ldr	x9, [x8]
	cbz	x9, LBB0_11
; %bb.9:
	ldr	x2, [sp]
	mov	x0, x19
	mov	x1, x20
	blr	x9
	mov	x21, x0
	tbnz	w0, #31, LBB0_19
; %bb.10:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
LBB0_11:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	blr	x8
	mov	x21, x0
	tbnz	w0, #31, LBB0_20
LBB0_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_18
; %bb.14:
	ldp	w8, w0, [x19]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	b	LBB0_18
LBB0_15:
	mov	x21, x0
	b	LBB0_18
LBB0_16:
Lloh10:
	adrp	x8, l_.str.2@PAGE
Lloh11:
	add	x8, x8, l_.str.2@PAGEOFF
LBB0_17:
	str	x8, [x20]
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_19:
Lloh12:
	adrp	x8, l_.str.3@PAGE
Lloh13:
	add	x8, x8, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_20:
Lloh14:
	adrp	x8, l_.str.4@PAGE
Lloh15:
	add	x8, x8, l_.str.4@PAGEOFF
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate cipher strings"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"capi:"

l_.str.2:                               ; @.str.2
	.asciz	"Error decoding and setting key"

l_.str.3:                               ; @.str.3
	.asciz	"Error creating IV"

l_.str.4:                               ; @.str.4
	.asciz	"Error initialising IV"

	.no_dead_strip	_crypt_ctr_cipher
.subsections_via_symbols
