	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_display_s_fmt
_vpbe_display_s_fmt:                    ## @vpbe_display_s_fmt
	.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, %r12
	callq	_video_drvdata
	movq	%rax, %rbx
	movq	88(%rax), %r14
	movq	(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %r13
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	84(%rbx), %r8d
	leaq	L_.str(%rip), %rcx
	xorl	%r15d, %r15d
	movl	$1, %edi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	leaq	80(%rbx), %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_2:
	movq	_debug@GOTPCREL(%rip), %rcx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.3:
	leaq	8(%r12), %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_vpbe_try_format
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	%rbx, %r15
	movq	16(%r13), %rax
	movq	%rax, 72(%rbx)
	movups	(%r13), %xmm0
	movups	%xmm0, 56(%rbx)
	movq	(%r13), %rax
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	__vpbe_display_get_other_win_layer
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	*(%r13)
	testl	%eax, %eax
	js	LBB0_16
LBB0_6:
	addq	$8, %rbx
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	*16(%r13)
	movl	24(%r12), %eax
	movl	%eax, 48(%r15)
	movl	20(%r12), %eax
	movl	%eax, 44(%r15)
	movl	16(%r12), %eax
	movl	%eax, 40(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %eax
	movq	%r15, %rdx
	movl	%eax, 16(%r15)
	movq	_V4L2_PIX_FMT_UYVY@GOTPCREL(%rip), %rcx
	movq	8(%r12), %rax
	cmpq	%rax, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_PIXFMT_YCBCRI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
LBB0_8:
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	movq	%rdx, %r15
	jne	LBB0_10
## %bb.9:
	movq	_PIXFMT_NV12@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, 8(%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	__vpbe_display_get_other_win_layer
	movq	(%r14), %rcx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
LBB0_10:
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	*8(%r13)
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	*16(%r13)
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_12:
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rcx
	xorl	%r15d, %r15d
	movl	$1, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_v4l2_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_FMT, layer id = %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
L_.str.1:                               ## @.str.1
	.asciz	"invalid type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
L_.str.2:                               ## @.str.2
	.asciz	"Display Manager failed to allocate layer\n"

	.comm	_V4L2_PIX_FMT_UYVY,8,3          ## @V4L2_PIX_FMT_UYVY
	.comm	_PIXFMT_YCBCRI,8,3              ## @PIXFMT_YCBCRI
	.comm	_PIXFMT_NV12,8,3                ## @PIXFMT_NV12
L_.str.3:                               ## @.str.3
	.asciz	"Error in S_FMT params:\n"

	.no_dead_strip	_vpbe_display_s_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_display_s_fmt
_vpbe_display_s_fmt:                    ; @vpbe_display_s_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	bl	_video_drvdata
	mov	x20, x0
	ldr	x22, [x0, #88]
	ldp	x21, x19, [x22]
Lloh0:
	adrp	x24, _debug@GOTPAGE
Lloh1:
	ldr	x24, [x24, _debug@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w8, [x0, #84]
	str	x8, [sp]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	add	x0, x20, #80
	bl	_vb2_is_busy
	cbz	x0, LBB0_2
LBB0_1:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
Lloh6:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.3:
	add	x24, x23, #8
	mov	x0, x22
	mov	x1, x24
	mov	w2, #1
	bl	_vpbe_try_format
	cbnz	w0, LBB0_15
; %bb.4:
	ldr	q0, [x24]
	ldr	x8, [x24, #16]
	str	x8, [x20, #72]
	stur	q0, [x20, #56]
	ldr	x8, [x24]
Lloh9:
	adrp	x25, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh10:
	ldr	x25, [x25, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x20
	bl	__vpbe_display_get_other_win_layer
	ldr	x8, [x21]
	ldr	w1, [x0]
	mov	x0, x21
	blr	x8
	tbnz	w0, #31, LBB0_17
LBB0_6:
	add	x24, x20, #8
	ldr	x8, [x21, #16]
	ldr	w1, [x20]
	mov	x0, x21
	mov	x2, x24
	blr	x8
	ldr	w8, [x23, #24]
	str	w8, [x20, #48]
	ldr	d0, [x23, #16]
	str	d0, [x20, #40]
	stp	xzr, xzr, [x20, #24]
	ldr	w8, [x19, #4]
	str	w8, [x20, #16]
Lloh11:
	adrp	x8, _V4L2_PIX_FMT_UYVY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_PIX_FMT_UYVY@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x8]
	ldr	x8, [x23, #8]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
Lloh14:
	adrp	x9, _PIXFMT_YCBCRI@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PIXFMT_YCBCRI@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	str	x9, [x24]
LBB0_8:
	ldr	x9, [x25]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
Lloh17:
	adrp	x23, _PIXFMT_NV12@GOTPAGE
Lloh18:
	ldr	x23, [x23, _PIXFMT_NV12@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x20, #8]
	mov	x0, x22
	mov	x1, x20
	bl	__vpbe_display_get_other_win_layer
	ldr	x8, [x23]
	str	x8, [x0, #8]
LBB0_10:
	ldr	x8, [x21, #8]
	ldr	w1, [x20]
	mov	x0, x21
	mov	x2, x24
	blr	x8
	tbnz	w0, #31, LBB0_16
; %bb.11:
	ldr	x8, [x21, #16]
	ldr	w1, [x20]
	mov	x0, x21
	mov	x2, x24
	blr	x8
	mov	w0, #0
	b	LBB0_15
LBB0_12:
	ldr	w1, [x24]
Lloh19:
	adrp	x3, l_.str.1@PAGE
Lloh20:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
LBB0_13:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_16:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
	b	LBB0_13
LBB0_17:
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
	b	LBB0_1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_FMT, layer id = %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
l_.str.1:                               ; @.str.1
	.asciz	"invalid type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
l_.str.2:                               ; @.str.2
	.asciz	"Display Manager failed to allocate layer\n"

	.comm	_V4L2_PIX_FMT_UYVY,8,3          ; @V4L2_PIX_FMT_UYVY
	.comm	_PIXFMT_YCBCRI,8,3              ; @PIXFMT_YCBCRI
	.comm	_PIXFMT_NV12,8,3                ; @PIXFMT_NV12
l_.str.3:                               ; @.str.3
	.asciz	"Error in S_FMT params:\n"

	.no_dead_strip	_vpbe_display_s_fmt
.subsections_via_symbols
