	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function close_slave
_close_slave:                           ## @close_slave
	.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
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	cmpq	$0, 24(%rdi)
	je	LBB0_3
## %bb.4:
	movq	%r13, %rdi
	callq	_av_write_trailer
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	8(%r14), %r12
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.6:
	cmpl	$0, (%r13)
	je	LBB0_10
## %bb.7:
	callq	_av_bsf_free
	cmpl	$2, (%r13)
	jb	LBB0_10
## %bb.8:
	movl	$1, %ebx
	movl	$4, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%r15, %rdi
	callq	_av_bsf_free
	incq	%rbx
	movl	(%r13), %eax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_10:
	leaq	16(%r14), %rdi
	callq	_av_freep
	movq	%r12, %rdi
	callq	_av_freep
	leaq	4(%r13), %rsi
	movq	%r13, %rdi
	callq	_ff_format_io_close
	movq	%r13, %rdi
	callq	_avformat_free_context
	movq	$0, (%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_close_slave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function close_slave
_close_slave:                           ; @close_slave
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_av_write_trailer
	mov	x21, x0
	b	LBB0_5
LBB0_3:
	mov	w21, #0
	b	LBB0_11
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x22, x19
	ldr	x0, [x22, #8]!
	cbz	x0, LBB0_10
; %bb.6:
	ldr	w8, [x20]
	cbz	w8, LBB0_10
; %bb.7:
	bl	_av_bsf_free
	ldr	w8, [x20]
	cmp	w8, #2
	b.lo	LBB0_10
; %bb.8:
	mov	w23, #1
	mov	w24, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x0, x8, x24
	bl	_av_bsf_free
	add	x23, x23, #1
	ldr	w8, [x20]
	add	x24, x24, #4
	cmp	x23, x8
	b.lo	LBB0_9
LBB0_10:
	add	x0, x19, #16
	bl	_av_freep
	mov	x0, x22
	bl	_av_freep
	add	x1, x20, #4
	mov	x0, x20
	bl	_ff_format_io_close
	mov	x0, x20
	bl	_avformat_free_context
	str	xzr, [x19]
LBB0_11:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_close_slave
.subsections_via_symbols
