	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypto_write
_crypto_write:                          ## @crypto_write
	.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	%edx, %r12d
	movq	%rsi, %r14
	movq	(%rdi), %r13
	movslq	(%r13), %rdi
	leal	(%rdi,%r12), %ebx
	movq	_BLOCKSIZE@GOTPCREL(%rip), %rcx
	movl	%ebx, %eax
	cltd
	idivl	(%rcx)
	movl	%edx, %r15d
	subl	%edx, %ebx
	jne	LBB0_1
## %bb.8:
	addq	8(%r13), %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	jmp	LBB0_9
LBB0_1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	16(%r13), %rdi
	leaq	36(%r13), %rsi
	movl	%ebx, %edx
	callq	_av_fast_malloc
	movq	16(%r13), %r9
	testq	%r9, %r9
	je	LBB0_11
## %bb.2:
	movslq	(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	movq	%rcx, %rdi
	addq	8(%r13), %rdi
	movq	_BLOCKSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%ecx, %edx
	movq	%r14, %rsi
	callq	_memcpy
	movl	32(%r13), %edi
	movq	8(%r13), %rdx
	movq	16(%r13), %rsi
	movl	28(%r13), %r8d
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	_av_aes_crypt
	movq	_BLOCKSIZE@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	decl	%ecx
	movq	16(%r13), %r9
	movl	(%r13), %eax
	jmp	LBB0_5
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	xorl	%eax, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_BLOCKSIZE@GOTPCREL(%rip), %rdx
LBB0_5:
	movl	28(%r13), %r8d
	movl	32(%r13), %edi
	movl	(%rdx), %esi
	movl	%esi, %edx
	subl	%eax, %edx
	testl	%eax, %eax
	cmovel	%eax, %esi
	movslq	%esi, %rsi
	leaq	(%r9,%rsi,4), %rsi
	cmovel	%eax, %edx
	movslq	%edx, %rdx
	addq	%r14, %rdx
	xorl	%r9d, %r9d
	callq	_av_aes_crypt
	movl	24(%r13), %edi
	movq	16(%r13), %rsi
	movl	%ebx, %edx
	callq	_ffurl_write
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	8(%r13), %rdi
	movl	%r12d, %eax
	subl	%r15d, %eax
	cltq
	addq	%rax, %r14
	movq	%r14, %rsi
	movl	%r15d, %edx
LBB0_9:
	callq	_memcpy
	movl	%r15d, (%r13)
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%eax, %r12d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_BLOCKSIZE,4,2                  ## @BLOCKSIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_crypto_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypto_write
_crypto_write:                          ; @crypto_write
	.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, x2
	mov	x21, x1
	ldr	x24, [x0]
Lloh0:
	adrp	x25, _BLOCKSIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BLOCKSIZE@GOTPAGEOFF]
	ldrsw	x8, [x24]
	ldr	w9, [x25]
	add	w10, w8, w2
	sdiv	w23, w10, w9
	msub	w20, w23, w9, w10
	subs	w22, w10, w20
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x24, #8]
	add	x0, x9, x8
	mov	x1, x21
	mov	x2, x19
	b	LBB0_7
LBB0_2:
	add	x0, x24, #16
	add	x1, x24, #36
	mov	x2, x22
	bl	_av_fast_malloc
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_9
; %bb.3:
	ldrsw	x9, [x24]
	cbz	w9, LBB0_5
; %bb.4:
	ldr	x8, [x24, #8]
	add	x0, x8, x9
	ldr	w8, [x25]
	sub	w2, w8, w9
	mov	x1, x21
	bl	_memcpy
	ldp	x2, x1, [x24, #8]
	ldp	w4, w0, [x24, #28]
	mov	w3, #1
	mov	w5, #0
	bl	_av_aes_crypt
	sub	w23, w23, #1
	ldr	x8, [x24, #16]
	ldr	w9, [x24]
LBB0_5:
	ldr	w10, [x25]
	sub	w11, w10, w9
	cmp	w9, #0
	csel	w9, wzr, w10, eq
	add	x1, x8, w9, sxtw #2
	csel	w8, wzr, w11, eq
	add	x2, x21, w8, sxtw
	ldp	w4, w0, [x24, #28]
	mov	x3, x23
	mov	w5, #0
	bl	_av_aes_crypt
	ldr	w0, [x24, #24]
	ldr	x1, [x24, #16]
	mov	x2, x22
	bl	_ffurl_write
	tbnz	w0, #31, LBB0_10
; %bb.6:
	ldr	x0, [x24, #8]
	sub	w8, w19, w20
	add	x1, x21, w8, sxtw
	mov	x2, x20
LBB0_7:
	bl	_memcpy
	str	w20, [x24]
LBB0_8:
	mov	x0, x19
	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
LBB0_9:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_10:
	mov	x19, x0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BLOCKSIZE,4,2                  ; @BLOCKSIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_crypto_write
.subsections_via_symbols
