	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bdisp_s_fmt
_bdisp_s_fmt:                           ## @bdisp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_bdisp_try_fmt
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_2:
	movl	120(%r14), %edi
	movl	(%r15), %esi
	callq	_v4l2_m2m_get_vq
	movq	%rax, %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_4:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %r12
	leaq	8(%r14), %rax
	movq	%r14, %rbx
	addq	$64, %rbx
	movl	(%r15), %ecx
	movl	28(%r15), %edi
	cmpl	(%r12), %ecx
	cmovneq	%rax, %rbx
	callq	_bdisp_find_fmt
	movl	%eax, 48(%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	24(%r15), %eax
	movl	%eax, 28(%rbx)
	movl	20(%r15), %ecx
	movl	%ecx, 24(%rbx)
	movl	16(%r15), %edx
	movl	%edx, 44(%rbx)
	movl	12(%r15), %edx
	movl	%edx, 40(%rbx)
	movl	8(%r15), %edx
	movl	%edx, 36(%rbx)
	movl	(%r15), %edx
	cmpl	(%r12), %edx
	jne	LBB0_8
## %bb.7:
	movl	4(%r15), %esi
	movl	%esi, 32(%rbx)
LBB0_8:
	movl	%eax, 20(%rbx)
	movl	%ecx, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	_BDISP_PARAMS@GOTPCREL(%rip), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_9
## %bb.10:
	movq	_BDISP_DST_FMT@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_5:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	28(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_9:
	movq	_BDISP_SRC_FMT@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	%r14, %rsi
	callq	_bdisp_ctx_state_lock_set
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot set format\n"

L_.str.1:                               ## @.str.1
	.asciz	"queue (%d) busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
L_.str.2:                               ## @.str.2
	.asciz	"Unknown format 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BDISP_PARAMS,4,2               ## @BDISP_PARAMS
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_BDISP_DST_FMT,4,2              ## @BDISP_DST_FMT
	.comm	_BDISP_SRC_FMT,4,2              ## @BDISP_SRC_FMT
	.no_dead_strip	_bdisp_s_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bdisp_s_fmt
_bdisp_s_fmt:                           ; @bdisp_s_fmt
	.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, x1
	mov	x22, x0
	mov	x0, x1
	bl	_fh_to_ctx
	mov	x19, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_bdisp_try_fmt
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_2:
	ldr	w0, [x19, #120]
	ldr	w1, [x20]
	bl	_v4l2_m2m_get_vq
	bl	_vb2_is_streaming
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_5:
	ldr	w8, [x20]
Lloh6:
	adrp	x22, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
	ldr	w9, [x22]
	add	x10, x19, #64
	add	x11, x19, #8
	cmp	w8, w9
	csel	x21, x10, x11, eq
	ldr	w0, [x20, #28]
	bl	_bdisp_find_fmt
	str	w0, [x21, #48]
	cbz	w0, LBB0_10
; %bb.6:
	ldp	w10, w9, [x20, #20]
	ldr	w8, [x20, #16]
	stp	w10, w9, [x21, #24]
	str	w8, [x21, #44]
	ldr	d0, [x20, #8]
	stur	d0, [x21, #36]
	ldr	w8, [x20]
	ldr	w11, [x22]
	cmp	w8, w11
	b.ne	LBB0_8
; %bb.7:
	ldr	w11, [x20, #4]
	str	w11, [x21, #32]
LBB0_8:
	stp	w10, w9, [x21, #16]
	stp	xzr, xzr, [x21]
Lloh8:
	adrp	x9, _BDISP_PARAMS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BDISP_PARAMS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _BDISP_DST_FMT@GOTPAGE
Lloh15:
	ldr	x11, [x11, _BDISP_DST_FMT@GOTPAGEOFF]
Lloh16:
	adrp	x12, _BDISP_SRC_FMT@GOTPAGE
Lloh17:
	ldr	x12, [x12, _BDISP_SRC_FMT@GOTPAGEOFF]
	cmp	w8, w10
	csel	x8, x11, x12, eq
	ldr	w8, [x8]
	orr	w0, w8, w9
	mov	x1, x19
	bl	_bdisp_ctx_state_lock_set
	mov	w21, #0
LBB0_9:
	mov	x0, x21
	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_10:
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w8, [x20, #28]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot set format\n"

l_.str.1:                               ; @.str.1
	.asciz	"queue (%d) busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
l_.str.2:                               ; @.str.2
	.asciz	"Unknown format 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BDISP_PARAMS,4,2               ; @BDISP_PARAMS
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_BDISP_DST_FMT,4,2              ; @BDISP_DST_FMT
	.comm	_BDISP_SRC_FMT,4,2              ; @BDISP_SRC_FMT
	.no_dead_strip	_bdisp_s_fmt
.subsections_via_symbols
