	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_set_output
_vpbe_set_output:                       ## @vpbe_set_output
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_vpbe_current_encoder_info
	movq	48(%r15), %r13
	cmpl	%ebx, (%r13)
	jle	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	40(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%r15), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	movslq	%ebx, %r12
	shlq	$4, %r12
	movl	8(%rax,%r12), %esi
	movl	12(%rax,%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%r14), %edi
	callq	_strcmp
	testq	%rax, %rax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_7
## %bb.3:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_vpbe_find_encoder_sd_index
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	8(%r13), %rax
	movl	4(%rax,%r12), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
LBB0_7:
	movq	32(%r15), %rax
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %edi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	_v4l2_subdev_call
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	8(%r13), %rax
	movl	(%rax,%r12), %esi
	movq	%r15, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_vpbe_get_mode_info
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	24(%r15), %r14
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	*8(%r14)
	movl	12(%r15), %esi
	movq	%r14, %rdi
	callq	*(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_11:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_video,4,2                      ## @video
	.comm	_s_routing,4,2                  ## @s_routing
	.no_dead_strip	_vpbe_set_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_set_output
_vpbe_set_output:                       ; @vpbe_set_output
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x21, x0
	bl	_vpbe_current_encoder_info
	ldr	x23, [x21, #48]
	ldr	w8, [x23]
	cmp	w8, w19
	b.le	LBB0_7
; %bb.1:
	mov	x24, x0
	ldr	x25, [x21, #40]
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w22, [x21]
	ldr	x8, [x23, #8]
	sxtw	x26, w19
	add	x8, x8, w19, sxtw #4
	ldr	w0, [x24]
	ldp	w1, w24, [x8, #8]
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x23
	mov	x1, x19
	bl	_vpbe_find_encoder_sd_index
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x22, x0
	ldr	x8, [x25]
	ldr	x9, [x23, #8]
	add	x9, x9, x26, lsl #4
	ldr	w0, [x9, #4]
	blr	x8
	mov	x25, x0
	cbnz	w0, LBB0_9
LBB0_4:
	ldr	x8, [x21, #32]
	ldr	w0, [x8, w22, sxtw #2]
Lloh0:
	adrp	x8, _video@GOTPAGE
Lloh1:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _s_routing@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_routing@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w3, #0
	mov	x4, x24
	mov	w5, #0
	bl	_v4l2_subdev_call
	mov	x25, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x8, [x23, #8]
	lsl	x9, x26, #4
	ldr	w1, [x8, x9]
	mov	x0, x21
	mov	x2, x19
	bl	_vpbe_get_mode_info
	mov	x25, x0
	cbnz	w0, LBB0_9
; %bb.6:
	ldr	x23, [x21, #24]
	ldr	x8, [x23, #8]
	ldr	w1, [x21, #16]
	mov	x0, x23
	blr	x8
	ldr	x8, [x23]
	ldr	w1, [x21, #12]
	mov	x0, x23
	blr	x8
	stp	w22, w19, [x21]
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_9:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_10:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_video,4,2                      ; @video
	.comm	_s_routing,4,2                  ; @s_routing
	.no_dead_strip	_vpbe_set_output
.subsections_via_symbols
