	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avformat_close_input           ## -- Begin function avformat_close_input
	.p2align	4, 0x90
_avformat_close_input:                  ## @avformat_close_input
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.2:
	movq	8(%rbx), %rax
	movq	16(%rbx), %r15
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	16(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	8(%rbx), %rax
	movq	_AVFMT_NOFILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_6
LBB0_5:
	movq	_AVFMT_FLAG_CUSTOM_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movq	%rbx, %rdi
	callq	_flush_packet_queue
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_10:
	movq	%rbx, %rdi
	callq	_avformat_free_context
	movq	$0, (%r14)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_avio_close                     ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"image2"

	.comm	_AVFMT_NOFILE,4,2               ## @AVFMT_NOFILE
	.comm	_AVFMT_FLAG_CUSTOM_IO,4,2       ## @AVFMT_FLAG_CUSTOM_IO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avformat_close_input           ; -- Begin function avformat_close_input
	.p2align	2
_avformat_close_input:                  ; @avformat_close_input
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0]
	cbz	x20, LBB0_11
; %bb.2:
	ldp	x8, x21, [x20, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x8, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _AVFMT_NOFILE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AVFMT_NOFILE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
LBB0_5:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _AVFMT_FLAG_CUSTOM_IO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AVFMT_FLAG_CUSTOM_IO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_6:
	mov	x21, #0
LBB0_7:
	mov	x0, x20
	bl	_flush_packet_queue
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	blr	x8
LBB0_10:
	mov	x0, x20
	bl	_avformat_free_context
	str	xzr, [x19]
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_avio_close
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"image2"

	.comm	_AVFMT_NOFILE,4,2               ; @AVFMT_NOFILE
	.comm	_AVFMT_FLAG_CUSTOM_IO,4,2       ; @AVFMT_FLAG_CUSTOM_IO
.subsections_via_symbols
