	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivid_remove
_vivid_remove:                          ## @vivid_remove
	.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	_n_devs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_26
## %bb.1:
	xorl	%r14d, %r14d
	movq	_vivid_devs@GOTPCREL(%rip), %rdx
	movq	_MAX_OUTPUTS@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_v4l2_device_put
	movq	_vivid_devs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	movq	$0, (%rax,%r14,8)
	movq	_n_devs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str(%rip), %rbx
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movl	%eax, %ecx
	cmpq	%rcx, %r14
	jae	LBB0_26
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movq	(%rdx), %rcx
	movq	(%rcx,%r14,8), %r15
	testq	%r15, %r15
	je	LBB0_25
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 144(%r15)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	136(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 128(%r15)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	120(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 112(%r15)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	104(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 96(%r15)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	88(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 80(%r15)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	72(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 64(%r15)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	56(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 48(%r15)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	40(%r15), %r12
	movq	%r12, %rdi
	callq	_video_device_node_name
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_video_unregister_device
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 32(%r15)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	28(%r15), %r12
	movl	28(%r15), %edx
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_v4l2_info
	movq	%r12, %rdi
	callq	_unregister_framebuffer
	movq	%r15, %rdi
	callq	_vivid_fb_release_buffers
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r15), %edi
	callq	_cec_unregister_adapter
	cmpl	$0, (%r13)
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cec_unregister_adapter
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%r15)
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_vivid_cec_bus_free_work
	movq	8(%r15), %rdi
	callq	_destroy_workqueue
	jmp	LBB0_24
LBB0_26:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_n_devs,4,2                     ## @n_devs
	.comm	_vivid_devs,8,3                 ## @vivid_devs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unregistering %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"unregistering fb%d\n"

	.comm	_MAX_OUTPUTS,4,2                ## @MAX_OUTPUTS
	.no_dead_strip	_vivid_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vivid_remove
_vivid_remove:                          ; @vivid_remove
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x23, _n_devs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _n_devs@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_26
; %bb.1:
	mov	x24, #0
Lloh2:
	adrp	x25, _vivid_devs@GOTPAGE
Lloh3:
	ldr	x25, [x25, _vivid_devs@GOTPAGEOFF]
Lloh4:
	adrp	x26, _MAX_OUTPUTS@GOTPAGE
Lloh5:
	ldr	x26, [x26, _MAX_OUTPUTS@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str.1@PAGE
Lloh7:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_v4l2_device_put
	ldr	x8, [x25]
	str	xzr, [x8, x24, lsl #3]
	ldr	w8, [x23]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, uxtw
	b.hs	LBB0_26
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
	ldr	x9, [x25]
	ldr	x21, [x9, x24, lsl #3]
	cbz	x21, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #144]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #136
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #128]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #120
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #112]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #104
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #96]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #88
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #80]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #72
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #64]
	cbz	x8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #56
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #48]
	cbz	x8, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #40
	mov	x0, x22
	bl	_video_device_node_name
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_info
	mov	x0, x22
	bl	_video_unregister_device
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x21
	ldr	w2, [x22, #28]!
	mov	x0, x21
	mov	x1, x19
	bl	_v4l2_info
	mov	x0, x22
	bl	_unregister_framebuffer
	mov	x0, x21
	bl	_vivid_fb_release_buffers
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x21, #24]
	bl	_cec_unregister_adapter
	ldr	w8, [x26]
	cbz	w8, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, #0
LBB0_23:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x22, lsl #2]
	bl	_cec_unregister_adapter
	add	x22, x22, #1
	ldr	w8, [x26]
	cmp	x22, x8
	b.lo	LBB0_23
LBB0_24:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.25:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_vivid_cec_bus_free_work
	ldr	x0, [x21, #8]
	bl	_destroy_workqueue
	b	LBB0_2
LBB0_26:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_n_devs,4,2                     ; @n_devs
	.comm	_vivid_devs,8,3                 ; @vivid_devs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unregistering %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"unregistering fb%d\n"

	.comm	_MAX_OUTPUTS,4,2                ; @MAX_OUTPUTS
	.no_dead_strip	_vivid_remove
.subsections_via_symbols
