	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_stop_capture
_fimc_stop_capture:                     ## @fimc_stop_capture
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_fimc_capture_active
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_ST_CAPT_SHUT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_fimc_deactivate_capture
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%rbx), %r15d
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rdx         ## imm = 0x66666667
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$33, %rdx
	addl	%eax, %edx
	movl	%r15d, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_wait_event_timeout
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fimc_capture_state_cleanup     ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_CAPT_SHUT,4,2               ## @ST_CAPT_SHUT
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_fimc_stop_capture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_stop_capture
_fimc_stop_capture:                     ; @fimc_stop_capture
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_fimc_capture_active
	cbz	w0, LBB0_2
; %bb.1:
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x22, _ST_CAPT_SHUT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ST_CAPT_SHUT@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_set_bit
	mov	x0, x20
	bl	_fimc_deactivate_capture
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w21, [x20, #4]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cmp	w0, #0
	cset	w1, eq
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w2, w8, w9
	mov	x0, x21
	bl	_wait_event_timeout
	mov	x0, x20
	mov	x1, x19
	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	_fimc_capture_state_cleanup
LBB0_2:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_CAPT_SHUT,4,2               ; @ST_CAPT_SHUT
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_fimc_stop_capture
.subsections_via_symbols
