	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_fragment
_write_fragment:                        ## @write_fragment
	.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	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -152(%rbp)
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-152(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_avio_open2
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-152(%rbp), %rbx
	movl	$109, %edi
	movl	$111, %esi
	movl	$111, %edx
	movl	$102, %ecx
	callq	_MKBETAG
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_copy_tag
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	-152(%rbp), %rbx
	movl	$109, %edi
	movl	$100, %esi
	movl	$97, %edx
	movl	$116, %ecx
	callq	_MKBETAG
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_copy_tag
	movl	%eax, %ebx
LBB0_4:
	movq	-152(%rbp), %rdi
	callq	_avio_flush
	movq	-152(%rbp), %rdi
	callq	_avio_close
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	leaq	-144(%rbp), %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$100, %edx
	callq	_av_strerror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_fprintf
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to open %s: %s\n"

	.no_dead_strip	_write_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_fragment
_write_fragment:                        ; @write_fragment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	xzr, [sp, #8]
Lloh3:
	adrp	x8, _AVIO_FLAG_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x0, sp, #8
	mov	x1, x21
	mov	x3, #0
	mov	x4, #0
	bl	_avio_open2
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x20, [sp, #8]
	mov	w0, #109
	mov	w1, #111
	mov	w2, #111
	mov	w3, #102
	bl	_MKBETAG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_copy_tag
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x20, [sp, #8]
	mov	w0, #109
	mov	w1, #100
	mov	w2, #97
	mov	w3, #116
	bl	_MKBETAG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_copy_tag
	mov	x20, x0
LBB0_3:
	ldr	x0, [sp, #8]
	bl	_avio_flush
	ldr	x0, [sp, #8]
	bl	_avio_close
	b	LBB0_5
LBB0_4:
	mov	x20, x0
	add	x1, sp, #20
	mov	w2, #100
	bl	_av_strerror
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #20
	mov	x2, x21
	bl	_fprintf
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to open %s: %s\n"

	.no_dead_strip	_write_fragment
.subsections_via_symbols
