	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cobalt_s_fmt_vid_out
_cobalt_s_fmt_vid_out:                  ## @cobalt_s_fmt_vid_out
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movl	$0, -40(%rbp)
	movq	$0, -48(%rbp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_cobalt_try_fmt_vid_out
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	addq	$56, %rdi
	callq	_vb2_is_busy
	movl	(%r15), %ecx
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	cmpl	(%r14), %ecx
	jne	LBB0_8
## %bb.5:
	movq	8(%r15), %rax
	cmpq	8(%r14), %rax
	jne	LBB0_8
## %bb.6:
	movq	16(%r15), %rax
	cmpq	16(%r14), %rax
	jne	LBB0_8
## %bb.7:
	movq	24(%r15), %rax
	cmpq	24(%r14), %rax
	jne	LBB0_8
LBB0_9:
	cmpl	$128, %ecx
	je	LBB0_10
## %bb.11:
	cmpl	$129, %ecx
	jne	LBB0_1
## %bb.12:
	movq	_MEDIA_BUS_FMT_RGB888_1X24@GOTPCREL(%rip), %rax
	movq	_COBALT_BYTES_PER_PIXEL_RGB32@GOTPCREL(%rip), %rdx
	jmp	LBB0_13
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_MEDIA_BUS_FMT_UYVY8_1X16@GOTPCREL(%rip), %rax
	movq	_COBALT_BYTES_PER_PIXEL_YUYV@GOTPCREL(%rip), %rdx
LBB0_13:
	movl	(%rdx), %edx
	movl	%edx, 52(%r14)
	movl	(%rax), %edx
	movups	8(%r15), %xmm0
	movups	%xmm0, 8(%r14)
	movq	24(%r15), %rax
	movq	%rax, 24(%r14)
	movl	%ecx, (%r14)
	movups	32(%r15), %xmm0
	movups	%xmm0, 36(%r14)
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_v4l2_fill_mbus_format
	movl	32(%r14), %edi
	movq	_pad@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_set_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	callq	_v4l2_subdev_call
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ## @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_MEDIA_BUS_FMT_UYVY8_1X16,4,2   ## @MEDIA_BUS_FMT_UYVY8_1X16
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ## @COBALT_BYTES_PER_PIXEL_RGB32
	.comm	_MEDIA_BUS_FMT_RGB888_1X24,4,2  ## @MEDIA_BUS_FMT_RGB888_1X24
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_pad,4,2                        ## @pad
	.comm	_set_fmt,4,2                    ## @set_fmt
	.no_dead_strip	_cobalt_s_fmt_vid_out
.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_out
_cobalt_s_fmt_vid_out:                  ; @cobalt_s_fmt_vid_out
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_video_drvdata
	mov	x20, x0
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_cobalt_try_fmt_vid_out
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	add	x0, x20, #56
	bl	_vb2_is_busy
	ldr	w8, [x19]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.4:
	ldr	x9, [x19, #8]
	ldr	x10, [x20, #8]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.5:
	ldr	x9, [x19, #16]
	ldr	x10, [x20, #16]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.6:
	ldr	x9, [x19, #24]
	ldr	x10, [x20, #24]
	cmp	x9, x10
	b.ne	LBB0_10
LBB0_7:
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.8:
	cmp	w8, #129
	b.ne	LBB0_1
; %bb.9:
Lloh2:
	adrp	x9, _MEDIA_BUS_FMT_RGB888_1X24@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MEDIA_BUS_FMT_RGB888_1X24@GOTPAGEOFF]
Lloh4:
	adrp	x10, _COBALT_BYTES_PER_PIXEL_RGB32@GOTPAGE
Lloh5:
	ldr	x10, [x10, _COBALT_BYTES_PER_PIXEL_RGB32@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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_13:
Lloh8:
	adrp	x9, _MEDIA_BUS_FMT_UYVY8_1X16@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MEDIA_BUS_FMT_UYVY8_1X16@GOTPAGEOFF]
Lloh10:
	adrp	x10, _COBALT_BYTES_PER_PIXEL_YUYV@GOTPAGE
Lloh11:
	ldr	x10, [x10, _COBALT_BYTES_PER_PIXEL_YUYV@GOTPAGEOFF]
LBB0_14:
	ldr	w10, [x10]
	str	w10, [x20, #52]
	ldr	w2, [x9]
	ldur	q0, [x19, #8]
	stur	q0, [x20, #8]
	ldr	x9, [x19, #24]
	str	x9, [x20, #24]
	str	w8, [x20]
	ldr	q0, [x19, #32]
	stur	q0, [x20, #36]
Lloh12:
	adrp	x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	mov	x0, sp
	mov	x1, x19
	bl	_v4l2_fill_mbus_format
	ldr	w0, [x20, #32]
Lloh15:
	adrp	x8, _pad@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pad@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _set_fmt@GOTPAGE
Lloh19:
	ldr	x8, [x8, _set_fmt@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x4, sp
	mov	x3, #0
	bl	_v4l2_subdev_call
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ; @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_MEDIA_BUS_FMT_UYVY8_1X16,4,2   ; @MEDIA_BUS_FMT_UYVY8_1X16
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ; @COBALT_BYTES_PER_PIXEL_RGB32
	.comm	_MEDIA_BUS_FMT_RGB888_1X24,4,2  ; @MEDIA_BUS_FMT_RGB888_1X24
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_pad,4,2                        ; @pad
	.comm	_set_fmt,4,2                    ; @set_fmt
	.no_dead_strip	_cobalt_s_fmt_vid_out
.subsections_via_symbols
