	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viacam_s_fmt_vid_cap
_viacam_s_fmt_vid_cap:                  ## @viacam_s_fmt_vid_cap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_via_find_format
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_S_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_viacam_do_try_fmt
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	-32(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	(%r15), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_viacam_configure_sensor
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_viacam_config_controller
	jmp	LBB0_5
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_IDLE,8,3                     ## @S_IDLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_viacam_s_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function viacam_s_fmt_vid_cap
_viacam_s_fmt_vid_cap:                  ; @viacam_s_fmt_vid_cap
	.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
	bl	_video_drvdata
	mov	x19, x0
	ldr	w0, [x20]
	bl	_via_find_format
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _S_IDLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S_IDLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_viacam_do_try_fmt
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w8, [x20]
	ldr	w9, [sp, #8]
	stp	w9, w8, [x19, #12]
	ldr	w8, [x21]
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_viacam_configure_sensor
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_viacam_config_controller
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	_S_IDLE,8,3                     ; @S_IDLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_viacam_s_fmt_vid_cap
.subsections_via_symbols
