	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iec61883_close
_iec61883_close:                        ## @iec61883_close
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	_CONFIG_MPEGTS_DEMUXER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	movq	_IEC61883_HDV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	56(%rbx), %edi
	callq	_iec61883_mpeg2_recv_stop
	movl	56(%rbx), %edi
	callq	_iec61883_mpeg2_close
	movl	52(%rbx), %edi
	callq	_avpriv_mpegts_parse_close
	jmp	LBB0_4
LBB0_3:
	movl	48(%rbx), %edi
	callq	_iec61883_dv_fb_stop
	movl	48(%rbx), %edi
	callq	_iec61883_dv_fb_close
	leaq	40(%rbx), %rdi
	callq	_av_freep
LBB0_4:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:
	leaq	-40(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -40(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, 32(%rbx)
	callq	_av_freep
	movq	%r14, %rdi
	callq	_av_freep
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_6
LBB0_7:
	movl	28(%rbx), %r14d
	movl	8(%rbx), %r12d
	movl	24(%rbx), %r15d
	movl	%r12d, %edi
	callq	_raw1394_get_local_id
	movl	20(%rbx), %r8d
	movl	12(%rbx), %ecx
	movl	16(%rbx), %r9d
	movl	%ecx, (%rsp)
	movl	%r12d, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_iec61883_cmp_disconnect
	movl	8(%rbx), %edi
	callq	_raw1394_destroy_handle
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_MPEGTS_DEMUXER,8,3      ## @CONFIG_MPEGTS_DEMUXER
	.comm	_IEC61883_HDV,8,3               ## @IEC61883_HDV
	.no_dead_strip	_iec61883_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iec61883_close
_iec61883_close:                        ; @iec61883_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _CONFIG_MPEGTS_DEMUXER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_MPEGTS_DEMUXER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _IEC61883_HDV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEC61883_HDV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x22, #56]
	bl	_iec61883_mpeg2_recv_stop
	ldr	w0, [x22, #56]
	bl	_iec61883_mpeg2_close
	ldr	w0, [x22, #52]
	bl	_avpriv_mpegts_parse_close
	b	LBB0_6
LBB0_3:
	ldr	w0, [x22, #48]
	bl	_iec61883_dv_fb_stop
	ldr	w0, [x22, #48]
	bl	_iec61883_dv_fb_close
	add	x0, x22, #40
	b	LBB0_5
LBB0_4:
	str	x0, [sp, #8]
	ldr	x8, [x0, #8]
	str	x8, [x22, #32]
	bl	_av_freep
	add	x0, sp, #8
LBB0_5:
	bl	_av_freep
LBB0_6:
	ldr	x0, [x22, #32]
	cbnz	x0, LBB0_4
; %bb.7:
	ldr	w19, [x22, #8]
	ldp	w21, w20, [x22, #24]
	mov	x0, x19
	bl	_raw1394_get_local_id
	mov	x3, x0
	ldp	w5, w4, [x22, #16]
	ldr	w6, [x22, #12]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_iec61883_cmp_disconnect
	ldr	w0, [x22, #8]
	bl	_raw1394_destroy_handle
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_MPEGTS_DEMUXER,8,3      ; @CONFIG_MPEGTS_DEMUXER
	.comm	_IEC61883_HDV,8,3               ; @IEC61883_HDV
	.no_dead_strip	_iec61883_close
.subsections_via_symbols
