	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gsc_m2m_ctx_stop_req
_gsc_m2m_ctx_stop_req:                  ## @gsc_m2m_ctx_stop_req
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movl	4(%rbx), %edi
	callq	_v4l2_m2m_get_curr_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_gsc_m2m_pending
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpq	%r14, %r15
	jne	LBB0_3
## %bb.2:
	movq	_GSC_CTX_STOP_REQ@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_gsc_ctx_state_lock_set
	movl	(%rbx), %ebx
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_gsc_ctx_state_is_set
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	_GSC_SHUTDOWN_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_wait_event_timeout
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovnel	%eax, %ecx
LBB0_3:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GSC_CTX_STOP_REQ,4,2           ## @GSC_CTX_STOP_REQ
	.comm	_GSC_SHUTDOWN_TIMEOUT,4,2       ## @GSC_SHUTDOWN_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_gsc_m2m_ctx_stop_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gsc_m2m_ctx_stop_req
_gsc_m2m_ctx_stop_req:                  ; @gsc_m2m_ctx_stop_req
	.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, x0
	ldr	x20, [x0]
	ldr	w0, [x20, #4]
	bl	_v4l2_m2m_get_curr_priv
	mov	x21, x0
	mov	x0, x20
	bl	_gsc_m2m_pending
	cmp	w0, #0
	ccmp	x21, x19, #0, ne
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x21, _GSC_CTX_STOP_REQ@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GSC_CTX_STOP_REQ@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_gsc_ctx_state_lock_set
	ldr	w20, [x20]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_gsc_ctx_state_is_set
	cmp	w0, #0
	cset	w1, eq
Lloh2:
	adrp	x8, _GSC_SHUTDOWN_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GSC_SHUTDOWN_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_wait_event_timeout
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, ne
LBB0_3:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GSC_CTX_STOP_REQ,4,2           ; @GSC_CTX_STOP_REQ
	.comm	_GSC_SHUTDOWN_TIMEOUT,4,2       ; @GSC_SHUTDOWN_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_gsc_m2m_ctx_stop_req
.subsections_via_symbols
