	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsp1_video_set_format
_vsp1_video_set_format:                 ## @vsp1_video_set_format
	.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	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_vsp1_video
	movq	%rax, %r14
	movq	(%r15), %rax
	cmpq	16(%r14), %rax
	jne	LBB0_1
## %bb.2:
	addq	$8, %r15
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___vsp1_video_try_format
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movq	%r14, %r12
	addq	$16, %r12
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movl	(%r15), %eax
	movq	8(%r14), %rcx
	movl	%eax, 8(%rcx)
	movq	-40(%rbp), %rax
	movq	%rax, (%rcx)
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_vsp1_video_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsp1_video_set_format
_vsp1_video_set_format:                 ; @vsp1_video_set_format
	.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
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_vsp1_video
	ldr	x8, [x20]
	mov	x22, x0
	ldr	x9, [x22, #16]!
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	add	x21, x20, #8
	add	x2, sp, #8
	mov	x1, x21
	bl	___vsp1_video_try_format
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x22
	bl	_vb2_is_busy
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_5:
	ldr	w8, [x21]
	ldr	x9, [x19, #8]
	str	w8, [x9, #8]
	ldr	x8, [sp, #8]
	str	x8, [x9]
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_vsp1_video_set_format
.subsections_via_symbols
