	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function camif_stop_capture
_camif_stop_capture:                    ## @camif_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	%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, %r15
	movq	8(%rdi), %r14
	callq	_s3c_vp_active
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_ST_VP_OFF@GOTPCREL(%rip), %rcx
	movq	_ST_VP_LASTIRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	notl	%eax
	andl	(%r15), %eax
	movl	%eax, (%r15)
	movq	_ST_VP_ABORTING@GOTPCREL(%rip), %r13
	orl	(%r13), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %eax
	xorl	%ebx, %ebx
	andl	(%r15), %eax
	movl	4(%r15), %r12d
	sete	%bl
	movq	_CAMIF_STOP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.2:
	movl	(%r15), %eax
	movq	_ST_VP_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_4
## %bb.3:
	orl	(%r13), %ecx
	movq	_ST_VP_LASTIRQ@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_camif_hw_disable_capture
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_camif_hw_enable_scaler
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_camif_reinitialize             ## TAILCALL
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ST_VP_OFF,4,2                  ## @ST_VP_OFF
	.comm	_ST_VP_LASTIRQ,4,2              ## @ST_VP_LASTIRQ
	.comm	_ST_VP_ABORTING,4,2             ## @ST_VP_ABORTING
	.comm	_CAMIF_STOP_TIMEOUT,4,2         ## @CAMIF_STOP_TIMEOUT
	.no_dead_strip	_camif_stop_capture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function camif_stop_capture
_camif_stop_capture:                    ; @camif_stop_capture
	.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
	ldr	x20, [x0, #8]
	bl	_s3c_vp_active
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x24, _ST_VP_OFF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ST_VP_OFF@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x23, _ST_VP_LASTIRQ@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ST_VP_LASTIRQ@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh4:
	adrp	x25, _ST_VP_ABORTING@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ST_VP_ABORTING@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldp	w8, w21, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	cset	w22, eq
Lloh6:
	adrp	x8, _CAMIF_STOP_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAMIF_STOP_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_wait_event_timeout
	mov	x21, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	cbnz	w21, LBB0_4
; %bb.2:
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w10, [x25]
	orr	w9, w10, w9
	ldr	w10, [x23]
	orr	w9, w9, w10
	bic	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_camif_hw_disable_capture
	mov	x0, x19
	mov	w1, #0
	bl	_camif_hw_enable_scaler
LBB0_4:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	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
	b	_camif_reinitialize
LBB0_5:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ST_VP_OFF,4,2                  ; @ST_VP_OFF
	.comm	_ST_VP_LASTIRQ,4,2              ; @ST_VP_LASTIRQ
	.comm	_ST_VP_ABORTING,4,2             ; @ST_VP_ABORTING
	.comm	_CAMIF_STOP_TIMEOUT,4,2         ; @CAMIF_STOP_TIMEOUT
	.no_dead_strip	_camif_stop_capture
.subsections_via_symbols
