	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cobalt_s_fmt_vid_cap
_cobalt_s_fmt_vid_cap:                  ## @cobalt_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_video_drvdata
	movq	%rax, %r12
	leaq	20(%rax), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_cobalt_try_fmt_vid_cap
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movl	12(%r14), %eax
	movl	%eax, 16(%r12)
	movl	8(%r14), %eax
	movl	%eax, 12(%r12)
	movl	4(%r14), %eax
	movl	%eax, 8(%r12)
	movl	(%r14), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_4
## %bb.6:
	movslq	%ecx, %rcx
	leaq	l_switch.table.cobalt_s_fmt_vid_cap(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r12)
	movl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_cobalt_enable_input
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ## @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_COBALT_BYTES_PER_PIXEL_RGB24,4,2 ## @COBALT_BYTES_PER_PIXEL_RGB24
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ## @COBALT_BYTES_PER_PIXEL_RGB32
	.no_dead_strip	_cobalt_s_fmt_vid_cap
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cobalt_s_fmt_vid_cap
l_switch.table.cobalt_s_fmt_vid_cap:
	.quad	_COBALT_BYTES_PER_PIXEL_YUYV
	.quad	_COBALT_BYTES_PER_PIXEL_RGB24
	.quad	_COBALT_BYTES_PER_PIXEL_RGB32

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cobalt_s_fmt_vid_cap
_cobalt_s_fmt_vid_cap:                  ; @cobalt_s_fmt_vid_cap
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_video_drvdata
	mov	x19, x0
	add	x0, x0, #20
	bl	_vb2_is_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_cobalt_try_fmt_vid_cap
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w8, [x20, #12]
	str	w8, [x19, #16]
	ldur	d0, [x20, #4]
	str	d0, [x19, #8]
	ldr	w8, [x20]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hs	LBB0_5
; %bb.4:
Lloh2:
	adrp	x10, l_switch.table.cobalt_s_fmt_vid_cap@PAGE
Lloh3:
	add	x10, x10, l_switch.table.cobalt_s_fmt_vid_cap@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	stp	w8, w9, [x19]
	mov	x0, x19
	bl	_cobalt_enable_input
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ; @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_COBALT_BYTES_PER_PIXEL_RGB24,4,2 ; @COBALT_BYTES_PER_PIXEL_RGB24
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ; @COBALT_BYTES_PER_PIXEL_RGB32
	.no_dead_strip	_cobalt_s_fmt_vid_cap
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cobalt_s_fmt_vid_cap
l_switch.table.cobalt_s_fmt_vid_cap:
	.quad	_COBALT_BYTES_PER_PIXEL_YUYV
	.quad	_COBALT_BYTES_PER_PIXEL_RGB24
	.quad	_COBALT_BYTES_PER_PIXEL_RGB32

.subsections_via_symbols
