	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_encrypt
_do_encrypt:                            ## @do_encrypt
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -168(%rbp)                ## 8-byte Spill
	movq	%rdi, %r15
	movq	%rsp, -176(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	80(%rdi), %rbx
	movq	_KEYSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	(,%r12,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	72(%r15), %rdi
	callq	_strlen
	movl	%eax, %r14d
	addl	$5, %r14d
	movl	%r14d, %edi
	callq	_av_mallocz
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	72(%r15), %rsi
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_av_strlcpy
	movq	56(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_av_strlcat
	movq	32(%rbx), %rdi
	movq	64(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	leaq	64(%rbx), %r14
	jmp	LBB0_5
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_4:
	leaq	56(%rbx), %r14
	movq	(%r14), %rsi
LBB0_5:
	movl	$8, %edx
	callq	_av_strlcpy
	movq	40(%rbx), %rdi
	movq	(%r14), %rsi
	movl	$8, %edx
	callq	_av_strlcpy
	movq	48(%rbx), %rax
	cmpl	$0, (%rax)
	jne	LBB0_10
## %bb.6:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	leaq	-112(%rbp), %rdi
	movl	$64, %edx
	callq	_memcpy
	jmp	LBB0_9
LBB0_8:
	leaq	-80(%rbp), %rdi
	movq	-168(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %esi
	callq	_AV_WB64
LBB0_9:
	leaq	-160(%rbp), %r14
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdi
	movl	$64, %edx
	xorl	%ecx, %ecx
	callq	_ff_data_to_hex
	movb	$0, -128(%rbp)
	movq	48(%rbx), %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_memcpy
LBB0_10:
	movq	40(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.11:
	movq	32(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.12:
	movq	%r13, %r14
	movq	8(%rbx), %rax
	xorl	%r13d, %r13d
	cmpb	$0, (%rax)
	jne	LBB0_20
## %bb.13:
	movq	16(%rbx), %rsi
	shll	$2, %r12d
	movq	%r14, %rdi
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.14:
	movl	%r12d, %edx
	callq	_memcpy
	jmp	LBB0_23
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_17
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_17:
	movq	%rbx, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_19:
	movl	%eax, %r13d
LBB0_20:
	movq	-176(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.21:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	%r12d, %esi
	callq	_randomize
	testl	%eax, %eax
	js	LBB0_26
LBB0_23:
	movq	8(%rbx), %rdi
	xorl	%r13d, %r13d
	movq	%r14, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_ff_data_to_hex
	movq	32(%rbx), %rdx
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-112(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	callq	*24(%r15)
	testl	%eax, %eax
	js	LBB0_19
## %bb.24:
	movq	-112(%rbp), %rdi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_avio_seek
	movq	-112(%rbp), %rdi
	movq	_KEYSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_avio_write
	movq	-112(%rbp), %rdi
	callq	_avio_close
	jmp	LBB0_20
LBB0_26:
	movl	%eax, %r13d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	jmp	LBB0_20
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_KEYSIZE,4,2                    ## @KEYSIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".key"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"no key URI specified in key info file\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"no key file specified in key info file\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot generate a strong random key\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.no_dead_strip	_do_encrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_encrypt
_do_encrypt:                            ; @do_encrypt
	.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, #128
	mov	x22, x1
	mov	x20, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x21, [x0, #80]
Lloh3:
	adrp	x25, _KEYSIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _KEYSIZE@GOTPAGEOFF]
	ldr	w26, [x25]
	lsl	x8, x26, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	ldr	x0, [x0, #72]
	bl	_strlen
	add	w23, w0, #5
	mov	x0, x23
	bl	_av_mallocz
	mov	x27, x21
	str	x0, [x27, #56]!
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x1, [x20, #72]
	mov	x2, x23
	bl	_av_strlcpy
	ldr	x0, [x21, #56]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_av_strlcat
	mov	x23, x21
	ldr	x1, [x23, #64]!
	ldur	x0, [x23, #-32]
	cbz	x1, LBB0_4
; %bb.2:
	mov	w2, #8
	bl	_av_strlcpy
	mov	x27, x23
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_18
LBB0_4:
	ldr	x1, [x27]
	mov	w2, #8
	bl	_av_strlcpy
LBB0_5:
	ldr	x0, [x21, #40]
	ldr	x1, [x27]
	mov	w2, #8
	bl	_av_strlcpy
	ldr	x8, [x21, #48]
	ldr	w8, [x8]
	cbnz	w8, LBB0_10
; %bb.6:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x29, #-128]
	stp	q0, q0, [x29, #-160]
	ldr	x1, [x21]
	cbz	x1, LBB0_8
; %bb.7:
	sub	x0, x29, #160
	mov	w2, #64
	bl	_memcpy
	b	LBB0_9
LBB0_8:
	sub	x8, x29, #160
	add	x0, x8, #32
	ldr	w1, [x22]
	bl	_AV_WB64
LBB0_9:
	sub	x0, x29, #193
	sub	x1, x29, #160
	mov	w2, #64
	mov	w3, #0
	bl	_ff_data_to_hex
	sturb	wzr, [x29, #-161]
	ldr	x0, [x21, #48]
	sub	x1, x29, #193
	mov	w2, #8
	bl	_memcpy
LBB0_10:
	ldr	x8, [x21, #40]
	ldr	w8, [x8]
	cbz	w8, LBB0_15
; %bb.11:
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.12:
	ldr	x8, [x21, #8]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_22
; %bb.13:
	ldr	x1, [x21, #16]
	lsl	w23, w26, #2
	mov	x0, x19
	cbz	x1, LBB0_19
; %bb.14:
	mov	x2, x23
	bl	_memcpy
	b	LBB0_20
LBB0_15:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_17:
	mov	x0, x21
	bl	_av_log
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	b	LBB0_23
LBB0_19:
	mov	x1, x23
	bl	_randomize
	tbnz	w0, #31, LBB0_26
LBB0_20:
	ldr	x0, [x21, #8]
	mov	x1, x19
	mov	x2, x23
	mov	w3, #0
	bl	_ff_data_to_hex
	ldr	x8, [x20, #24]
	ldr	x2, [x21, #32]
Lloh23:
	adrp	x9, _AVIO_FLAG_WRITE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x9]
	sub	x1, x29, #160
	mov	x0, x20
	mov	x4, #0
	blr	x8
	tbnz	w0, #31, LBB0_25
; %bb.21:
	ldur	x0, [x29, #-160]
Lloh26:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_avio_seek
	ldur	x0, [x29, #-160]
	ldr	w2, [x25]
	mov	x1, x19
	bl	_avio_write
	ldur	x0, [x29, #-160]
	bl	_avio_close
LBB0_22:
	mov	w22, #0
LBB0_23:
	mov	sp, x24
	ldur	x8, [x29, #-88]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.24:
	mov	x0, x22
	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_25:
	mov	x22, x0
	b	LBB0_23
LBB0_26:
	mov	x22, x0
Lloh32:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x2, l_.str.3@PAGE
Lloh36:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
	b	LBB0_23
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_KEYSIZE,4,2                    ; @KEYSIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".key"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"no key URI specified in key info file\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"no key file specified in key info file\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot generate a strong random key\n"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.no_dead_strip	_do_encrypt
.subsections_via_symbols
