	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_vidioc_s_fmt_vid_cap
_stk_vidioc_s_fmt_vid_cap:              ## @stk_vidioc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	callq	_video_drvdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_is_present
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	%rbx, %rdi
	callq	_is_streaming
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	cmpq	$0, 16(%rbx)
	je	LBB0_7
LBB0_5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_stk_try_fmt_vid_cap
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	4(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_stk_free_buffers
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	_stk_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-28(%rbp), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_stk_initialise
	movq	%rbx, %rdi
	callq	_stk_setup_format
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_stk_sizes,8,3                  ## @stk_sizes
	.no_dead_strip	_stk_vidioc_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 stk_vidioc_s_fmt_vid_cap
_stk_vidioc_s_fmt_vid_cap:              ; @stk_vidioc_s_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x0
	bl	_video_drvdata
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_is_present
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_is_streaming
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
LBB0_4:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_stk_try_fmt_vid_cap
	cbnz	w0, LBB0_7
; %bb.9:
	ldr	w8, [x20, #4]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_stk_free_buffers
	ldr	w8, [x20]
Lloh4:
	adrp	x9, _stk_sizes@GOTPAGE
Lloh5:
	ldr	x9, [x9, _stk_sizes@GOTPAGEOFF]
	str	w8, [x19, #8]
Lloh6:
	ldr	x8, [x9]
	ldrsw	x9, [sp, #12]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
	mov	x0, x19
	bl	_stk_initialise
	mov	x0, x19
	bl	_stk_setup_format
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_stk_sizes,8,3                  ; @stk_sizes
	.no_dead_strip	_stk_vidioc_s_fmt_vid_cap
.subsections_via_symbols
