	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvin_set_stream
_rvin_set_stream:                       ## @rvin_set_stream
	.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, %r12d
	movq	%rdi, %r15
	movq	32(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	leaq	16(%r15), %rdi
	callq	_media_entity_remote_pad
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_media_entity_to_v4l2_subdev
	movq	%rax, %r14
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_rvin_mc_validate_format
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	(%r15), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r14), %rax
	leaq	8(%r15), %rsi
	testq	%rax, %rax
	cmovneq	%rax, %rsi
	movq	%r15, %rdi
	callq	___media_pipeline_start
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.7:
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_v4l2_subdev_call
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r14d
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	cmpl	%ecx, %r14d
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_media_pipeline_stop
	movl	%r14d, %ebx
	jmp	LBB0_10
LBB0_1:
	movq	24(%r15), %rax
	movq	(%rax), %rdi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %ecx
	callq	_v4l2_subdev_call
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %ebx
	jmp	LBB0_10
LBB0_3:
	movq	_EPIPE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_media_pipeline_stop
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_subdev_call               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_video,4,2                      ## @video
	.comm	_s_stream,4,2                   ## @s_stream
	.comm	_ENOIOCTLCMD,4,2                ## @ENOIOCTLCMD
	.comm	_EPIPE,4,2                      ## @EPIPE
	.no_dead_strip	_rvin_set_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvin_set_stream
_rvin_set_stream:                       ; @rvin_set_stream
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	add	x0, x19, #16
	bl	_media_entity_remote_pad
	cbz	x0, LBB0_9
; %bb.2:
	mov	x22, x0
	ldr	w0, [x0]
	bl	_media_entity_to_v4l2_subdev
	mov	x20, x0
	cbz	w21, LBB0_11
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_rvin_mc_validate_format
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.4:
	mov	x21, x19
	ldr	x22, [x21], #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x20]
	cmp	x8, #0
	csel	x1, x21, x8, eq
	mov	x0, x19
	bl	___media_pipeline_start
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	cbnz	w21, LBB0_10
; %bb.5:
Lloh0:
	adrp	x8, _video@GOTPAGE
Lloh1:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _s_stream@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_stream@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_v4l2_subdev_call
	cbz	w0, LBB0_12
; %bb.6:
	mov	x20, x0
	mov	w21, #0
Lloh6:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_media_pipeline_stop
	mov	x21, x20
	b	LBB0_10
LBB0_8:
	ldr	x8, [x19, #24]
	ldr	x0, [x8]
Lloh9:
	adrp	x8, _video@GOTPAGE
Lloh10:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _s_stream@GOTPAGE
Lloh13:
	ldr	x8, [x8, _s_stream@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x3, x21
	bl	_v4l2_subdev_call
Lloh15:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w21, wzr, w0, eq
	b	LBB0_10
LBB0_9:
Lloh18:
	adrp	x8, _EPIPE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	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
LBB0_11:
	mov	x0, x19
	bl	_media_pipeline_stop
Lloh21:
	adrp	x8, _video@GOTPAGE
Lloh22:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh23:
	adrp	x9, _s_stream@GOTPAGE
Lloh24:
	ldr	x9, [x9, _s_stream@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	ldr	w2, [x9]
	mov	x0, x20
	mov	w3, #0
	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	_v4l2_subdev_call
LBB0_12:
	mov	w21, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_video,4,2                      ; @video
	.comm	_s_stream,4,2                   ; @s_stream
	.comm	_ENOIOCTLCMD,4,2                ; @ENOIOCTLCMD
	.comm	_EPIPE,4,2                      ; @EPIPE
	.no_dead_strip	_rvin_set_stream
.subsections_via_symbols
