	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_s_fmt_vid_cap
_vpif_s_fmt_vid_cap:                    ## @vpif_s_fmt_vid_cap
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	8(%rsi), %r13
	movq	16(%r13), %r14
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_debug@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdx
	movl	$2, %edi
	callq	_vpif_dbg
	shlq	$4, %rbx
	cmpq	$0, 8(%r14,%rbx)
	je	LBB0_3
## %bb.1:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	movl	$1, %edi
	callq	_vpif_dbg
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_VPIF_CHANNEL0_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%r13), %rax
	cmpq	%rax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_VPIF_CHANNEL1_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_7
LBB0_5:
	cmpl	$0, (%r15)
	je	LBB0_6
LBB0_7:
	leaq	8(%r13), %rdi
	leaq	4(%r15), %rsi
	callq	_v4l2_prio_check
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movl	$1, (%r15)
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_vpif_check_format
	testl	%eax, %eax
	je	LBB0_9
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_2
LBB0_9:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 4(%r14,%rbx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_FMT\n"

L_.str.1:                               ## @.str.1
	.asciz	"Streaming is started\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_VPIF_CHANNEL0_VIDEO,8,3        ## @VPIF_CHANNEL0_VIDEO
	.comm	_VPIF_CHANNEL1_VIDEO,8,3        ## @VPIF_CHANNEL1_VIDEO
L_.str.2:                               ## @.str.2
	.asciz	"Channel Busy\n"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.no_dead_strip	_vpif_s_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_s_fmt_vid_cap
_vpif_s_fmt_vid_cap:                    ; @vpif_s_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	ldr	x20, [x1, #8]
	ldr	x22, [x20, #16]
Lloh0:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x24, _debug@GOTPAGE
Lloh4:
	ldr	x24, [x24, _debug@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vpif_dbg
	add	x8, x22, x23, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w1, [x24]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_2:
	mov	w0, #1
	bl	_vpif_dbg
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _VPIF_CHANNEL0_VIDEO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VPIF_CHANNEL0_VIDEO@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x20]
Lloh14:
	adrp	x10, _VPIF_CHANNEL1_VIDEO@GOTPAGE
Lloh15:
	ldr	x10, [x10, _VPIF_CHANNEL1_VIDEO@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x10, x9, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x21]
	cbz	w8, LBB0_9
LBB0_6:
	add	x0, x20, #8
	add	x1, x21, #4
	bl	_v4l2_prio_check
	cbnz	w0, LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_vpif_check_format
	cbz	w0, LBB0_10
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w1, [x24]
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_10:
	add	x20, x22, x23, lsl #4
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_12
; %bb.11:
Lloh19:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_3
LBB0_12:
	ldr	w8, [x19]
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_FMT\n"

l_.str.1:                               ; @.str.1
	.asciz	"Streaming is started\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_VPIF_CHANNEL0_VIDEO,8,3        ; @VPIF_CHANNEL0_VIDEO
	.comm	_VPIF_CHANNEL1_VIDEO,8,3        ; @VPIF_CHANNEL1_VIDEO
l_.str.2:                               ; @.str.2
	.asciz	"Channel Busy\n"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.no_dead_strip	_vpif_s_fmt_vid_cap
.subsections_via_symbols
