	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cipher_do_cipher
_cipher_do_cipher:                      ## @cipher_do_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_EVP_CIPHER_CTX_get_cipher_data
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_iv_noconst
	movq	%rax, %r14
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_EVP_MAX_IV_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	leaq	-144(%rbp), %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movl	20(%rbx), %eax
	movl	%eax, -96(%rbp)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -144(%rbp)
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -104(%rbp)
	movq	%rbx, %r12
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -112(%rbp)
	movq	%r14, -120(%rbp)
	movl	16(%rbx), %eax
	movl	%eax, -128(%rbp)
	movq	$0, -136(%rbp)
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_iv_length
	movq	%rax, %rbx
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_3
## %bb.4:
	xorl	%edi, %edi
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	setbe	%dil
	callq	_assert
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_encrypting
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	addq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	subq	%rbx, %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
LBB0_6:
	movq	_cfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CIOCCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-144(%rbp), %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.10:
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$129, %eax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	$0, %eax
	jne	LBB0_22
## %bb.12:
	xorl	%edi, %edi
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	setbe	%dil
	callq	_assert
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_encrypting
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	addq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	subq	%rbx, %rsi
	testl	%eax, %eax
	cmoveq	-72(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_memcpy
	jmp	LBB0_21
LBB0_7:
	movq	_ERR_LIB_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_ERR_raise_data
LBB0_3:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_9:
	movl	$1, %eax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_13:
	movq	8(%r12), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%rcx, %rax
	decq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_14
## %bb.15:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_16
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_16:
	leaq	-1(%rbx), %rsi
	andq	$3, %rbx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_17
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r15), %rcx
	movzbl	-1(%r14,%r15), %edx
	addq	%rax, %rdx
	movb	%dl, -1(%r14,%r15)
	shrq	$8, %rdx
	movq	%rdx, %rax
	movq	%rcx, %r15
	decq	%rbx
	jne	LBB0_18
## %bb.19:
	cmpq	$3, %rsi
	jb	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%r14,%rcx), %eax
	addq	%rdx, %rax
	movb	%al, -1(%r14,%rcx)
	shrq	$8, %rax
	movzbl	-2(%r14,%rcx), %edx
	addq	%rax, %rdx
	movb	%dl, -2(%r14,%rcx)
	shrq	$8, %rdx
	movzbl	-3(%r14,%rcx), %eax
	addq	%rdx, %rax
	movb	%al, -3(%r14,%rcx)
	shrq	$8, %rax
	movzbl	-4(%r14,%rcx), %edx
	addq	%rax, %rdx
	movb	%dl, -4(%r14,%rcx)
	shrq	$8, %rdx
	addq	$-4, %rcx
	jne	LBB0_20
LBB0_21:
	movl	$1, %eax
LBB0_22:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_24
## %bb.23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%rax, %rdx
	movq	%r15, %rcx
	cmpq	$3, %rsi
	jae	LBB0_20
	jmp	LBB0_21
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_MAX_IV_LENGTH,4,2          ## @EVP_MAX_IV_LENGTH
	.comm	_cfd,4,2                        ## @cfd
	.comm	_CIOCCRYPT,4,2                  ## @CIOCCRYPT
	.comm	_ERR_LIB_SYS,4,2                ## @ERR_LIB_SYS
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"calling ioctl()"

	.comm	_COP_FLAG_WRITE_IV,8,3          ## @COP_FLAG_WRITE_IV
	.no_dead_strip	_cipher_do_cipher
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cipher_do_cipher
_cipher_do_cipher:                      ; @cipher_do_cipher
	.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	x19, x3
	mov	x26, x2
	mov	x20, 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]
	bl	_EVP_CIPHER_CTX_get_cipher_data
	mov	x24, x0
	mov	x0, x22
	bl	_EVP_CIPHER_CTX_iv_noconst
	mov	x21, x0
	mov	x27, sp
Lloh3:
	adrp	x8, _EVP_MAX_IV_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVP_MAX_IV_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	sub	x0, x29, #144
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	ldr	w8, [x24, #20]
	stur	w8, [x29, #-96]
	stp	x20, x26, [x29, #-112]
	stur	x21, [x29, #-120]
	ldr	w8, [x24, #16]
	stur	w8, [x29, #-128]
	stp	x19, xzr, [x29, #-144]
	mov	x0, x22
	bl	_EVP_CIPHER_CTX_iv_length
	mov	x23, x0
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.3:
	cmp	x23, x19
	cset	w0, ls
	bl	_assert
	mov	x0, x22
	bl	_EVP_CIPHER_CTX_encrypting
	cbnz	w0, LBB0_5
; %bb.4:
	add	x8, x26, x19
	sub	x1, x8, x23
	mov	x0, x25
	mov	x2, x23
	bl	_memcpy
LBB0_5:
Lloh8:
	adrp	x8, _cfd@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cfd@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _CIOCCRYPT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CIOCCRYPT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	sub	x2, x29, #144
	bl	_ioctl
	tbnz	x0, #63, LBB0_10
; %bb.6:
	cbz	x23, LBB0_14
; %bb.7:
	ldr	w8, [x24]
	cmp	w8, #128
	b.eq	LBB0_12
; %bb.8:
	cmp	w8, #129
	b.ne	LBB0_11
; %bb.9:
	cmp	x23, x19
	cset	w0, ls
	bl	_assert
	mov	x0, x22
	bl	_EVP_CIPHER_CTX_encrypting
	add	x8, x20, x19
	sub	x8, x8, x23
	cmp	w0, #0
	csel	x1, x25, x8, eq
	mov	x0, x21
	mov	x2, x23
	bl	_memcpy
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x8, _ERR_LIB_SYS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_LIB_SYS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ERR_raise_data
LBB0_11:
	mov	w0, #0
	b	LBB0_15
LBB0_12:
	ldr	x9, [x24, #8]
	add	x8, x19, x9
	sub	x10, x8, #1
	sub	x8, x21, #1
	udiv	x9, x10, x9
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x8, x23]
	add	x9, x9, x10
	strb	w9, [x8, x23]
	lsr	x9, x9, #8
	subs	x23, x23, #1
	b.ne	LBB0_13
LBB0_14:
	mov	w0, #1
LBB0_15:
	mov	sp, x27
	ldur	x8, [x29, #-88]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_MAX_IV_LENGTH,4,2          ; @EVP_MAX_IV_LENGTH
	.comm	_cfd,4,2                        ; @cfd
	.comm	_CIOCCRYPT,4,2                  ; @CIOCCRYPT
	.comm	_ERR_LIB_SYS,4,2                ; @ERR_LIB_SYS
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"calling ioctl()"

	.comm	_COP_FLAG_WRITE_IV,8,3          ; @COP_FLAG_WRITE_IV
	.no_dead_strip	_cipher_do_cipher
.subsections_via_symbols
