	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cipher_init
_cipher_init:                           ## @cipher_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	callq	_EVP_CIPHER_CTX_get_cipher_data
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_EVP_CIPHER_CTX_nid
	movl	%eax, %edi
	callq	_get_cipher_data
	movq	%rax, %r15
	leaq	8(%rbx), %r14
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_clean_devcrypto_session
	testq	%rax, %rax
	je	LBB0_7
LBB0_2:
	movl	12(%r15), %eax
	movl	%eax, 28(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 24(%rbx)
	movq	%r13, 16(%rbx)
	testl	%r12d, %r12d
	jne	LBB0_3
## %bb.4:
	movq	_COP_DECRYPT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_COP_ENCRYPT@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_EVP_CIPH_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	movl	%eax, (%rbx)
	movl	4(%r15), %eax
	movl	%eax, 32(%rbx)
	movq	_cfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CIOCGSESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_ioctl
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jns	LBB0_8
## %bb.6:
	movq	_SYS_F_IOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SYSerr
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COP_ENCRYPT,4,2                ## @COP_ENCRYPT
	.comm	_COP_DECRYPT,4,2                ## @COP_DECRYPT
	.comm	_EVP_CIPH_MODE,4,2              ## @EVP_CIPH_MODE
	.comm	_cfd,4,2                        ## @cfd
	.comm	_CIOCGSESSION,4,2               ## @CIOCGSESSION
	.comm	_SYS_F_IOCTL,4,2                ## @SYS_F_IOCTL
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_cipher_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cipher_init
_cipher_init:                           ; @cipher_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x1
	mov	x20, x0
	bl	_EVP_CIPHER_CTX_get_cipher_data
	mov	x19, x0
	mov	x0, x20
	bl	_EVP_CIPHER_CTX_nid
	bl	_get_cipher_data
	mov	x23, x0
	mov	x20, x19
	ldr	x8, [x20, #8]!
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_clean_devcrypto_session
	cbz	x0, LBB0_5
LBB0_2:
	ldr	d0, [x23, #8]
	str	d0, [x19, #24]
	str	x22, [x19, #16]
Lloh0:
	adrp	x8, _COP_ENCRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COP_ENCRYPT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _COP_DECRYPT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _COP_DECRYPT@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _EVP_CIPH_MODE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EVP_CIPH_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	ldp	w10, w11, [x23]
	and	w9, w9, w10
	str	w9, [x19]
	stp	w11, w8, [x19, #32]
Lloh7:
	adrp	x8, _cfd@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cfd@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _CIOCGSESSION@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CIOCGSESSION@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_ioctl
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	w0, #1
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _SYS_F_IOCTL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SYS_F_IOCTL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_SYSerr
	mov	w0, #0
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_COP_ENCRYPT,4,2                ; @COP_ENCRYPT
	.comm	_COP_DECRYPT,4,2                ; @COP_DECRYPT
	.comm	_EVP_CIPH_MODE,4,2              ; @EVP_CIPH_MODE
	.comm	_cfd,4,2                        ; @cfd
	.comm	_CIOCGSESSION,4,2               ; @CIOCGSESSION
	.comm	_SYS_F_IOCTL,4,2                ; @SYS_F_IOCTL
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_cipher_init
.subsections_via_symbols
