	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cal_remove
_cal_remove:                            ## @cal_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	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_platform_get_drvdata
	movq	%rax, %r12
	movq	_CAL_MODULE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movq	%r12, %rsi
	callq	_cal_dbg
	movq	%r12, %rdi
	callq	_cal_runtime_get
	movq	_CAL_NUM_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%r14d, %r14d
	leaq	L_.str.1(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%r14,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_video_device_node_name
	movl	$1, %edi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_ctx_dbg
	movq	%rbx, %rdi
	callq	_camerarx_phy_disable
	leaq	12(%rbx), %r13
	movq	%r13, %rdi
	callq	_v4l2_async_notifier_unregister
	movq	%r13, %rdi
	callq	_v4l2_async_notifier_cleanup
	leaq	8(%rbx), %rdi
	callq	_v4l2_ctrl_handler_free
	leaq	4(%rbx), %rdi
	callq	_v4l2_device_unregister
	movq	%rbx, %rdi
	callq	_video_unregister_device
	movq	_CAL_NUM_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_cal_runtime_put
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pm_runtime_disable
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Removing %s\n"

	.comm	_CAL_MODULE_NAME,4,2            ## @CAL_MODULE_NAME
	.comm	_CAL_NUM_CONTEXT,4,2            ## @CAL_NUM_CONTEXT
L_.str.1:                               ## @.str.1
	.asciz	"unregistering %s\n"

	.no_dead_strip	_cal_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cal_remove
_cal_remove:                            ; @cal_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
	mov	x19, x0
	bl	_platform_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _CAL_MODULE_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAL_MODULE_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	x1, x20
	bl	_cal_dbg
	mov	x0, x20
	bl	_cal_runtime_get
Lloh5:
	adrp	x24, _CAL_NUM_CONTEXT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CAL_NUM_CONTEXT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x25, #0
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20]
	ldr	x22, [x9, x25, lsl #3]
	cbz	x22, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_video_device_node_name
	mov	x3, x0
	mov	w0, #1
	mov	x1, x22
	mov	x2, x21
	bl	_ctx_dbg
	mov	x0, x22
	bl	_camerarx_phy_disable
	add	x23, x22, #12
	mov	x0, x23
	bl	_v4l2_async_notifier_unregister
	mov	x0, x23
	bl	_v4l2_async_notifier_cleanup
	add	x0, x22, #8
	bl	_v4l2_ctrl_handler_free
	add	x0, x22, #4
	bl	_v4l2_device_unregister
	mov	x0, x22
	bl	_video_unregister_device
	ldr	w8, [x24]
	b	LBB0_2
LBB0_5:
	mov	x0, x20
	bl	_cal_runtime_put
	mov	x0, x19
	bl	_pm_runtime_disable
	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	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Removing %s\n"

	.comm	_CAL_MODULE_NAME,4,2            ; @CAL_MODULE_NAME
	.comm	_CAL_NUM_CONTEXT,4,2            ; @CAL_NUM_CONTEXT
l_.str.1:                               ; @.str.1
	.asciz	"unregistering %s\n"

	.no_dead_strip	_cal_remove
.subsections_via_symbols
