	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_s_fmt_vid_cap
_bttv_s_fmt_vid_cap:                    ## @bttv_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	%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, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	24(%rsi), %r12
	movl	16(%rdx), %esi
	movq	%rbx, %rdi
	callq	_bttv_switch_type
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_bttv_try_fmt_vid_cap
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	8(%r14), %eax
	movl	%eax, -56(%rbp)
	movl	4(%r14), %eax
	movl	%eax, -52(%rbp)
	movl	(%r14), %r13d
	movl	12(%r14), %edi
	callq	_format_by_fourcc
	movq	%rax, %r15
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	callq	_bttv_get_width_mask_vid_cap
	movl	(%r14), %ecx
	movl	-48(%rbp), %r8d
	movl	-44(%rbp), %r9d
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	pushq	$1
	pushq	$1
	callq	_limit_scaled_size_lock
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	%r13d, (%r14)
	movq	%r15, 16(%rbx)
	movl	%r13d, 8(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 4(%rbx)
	movl	4(%r14), %ecx
	movl	%ecx, (%rbx)
	movq	%r15, 8(%r12)
	movl	%eax, 4(%r12)
	movl	%ecx, (%r12)
	xorl	%eax, %eax
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.no_dead_strip	_bttv_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 bttv_s_fmt_vid_cap
_bttv_s_fmt_vid_cap:                    ; @bttv_s_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x1, #24]
	ldr	w1, [x2, #16]
	mov	x0, x19
	bl	_bttv_switch_type
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_bttv_try_fmt_vid_cap
	cbnz	w0, LBB0_4
; %bb.2:
	ldp	w9, w0, [x20, #8]
	ldp	w23, w8, [x20]
	stp	w8, w9, [sp, #8]
	bl	_format_by_fourcc
	mov	x21, x0
	add	x1, sp, #4
	mov	x2, sp
	bl	_bttv_get_width_mask_vid_cap
	ldr	w3, [x20]
	ldp	w5, w4, [sp]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	mov	w6, #1
	mov	w7, #1
	bl	_limit_scaled_size_lock
	cbnz	w0, LBB0_4
; %bb.3:
	str	w23, [x20]
	str	x21, [x19, #16]
Lloh0:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w23, w8, [x19, #8]
	ldr	w8, [x20, #8]
	str	w8, [x19, #4]
	ldr	w9, [x20, #4]
	str	w9, [x19]
	str	x21, [x22, #8]
	stp	w9, w8, [x22]
LBB0_4:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.no_dead_strip	_bttv_s_fmt_vid_cap
.subsections_via_symbols
