	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_s_fmt_vid_cap
_ivtv_s_fmt_vid_cap:                    ## @ivtv_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	%rsi, %rdi
	callq	_fh2id
	movq	(%rax), %r12
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_ivtv_try_fmt_vid_cap
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	(%r14), %r13d
	movl	4(%r14), %ecx
	cmpl	%r13d, 4(%r12)
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	cmpl	%ecx, 8(%r12)
	je	LBB0_8
LBB0_3:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leaq	16(%r12), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_5:
	movl	%r13d, 4(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r12)
	movl	12(%r12), %edi
	callq	_v4l2_ctrl_g_ctrl
	movq	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPCREL(%rip), %rdx
	movl	(%r14), %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, (%r14)
	movl	%eax, %ecx
LBB0_7:
	movl	%ecx, -64(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -60(%rbp)
	movq	_MEDIA_BUS_FMT_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	(%r12), %edi
	movq	_pad@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_set_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_v4l2_subdev_call
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_ivtv_g_fmt_vid_cap
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ## @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_MEDIA_BUS_FMT_FIXED,4,2        ## @MEDIA_BUS_FMT_FIXED
	.comm	_pad,4,2                        ## @pad
	.comm	_set_fmt,4,2                    ## @set_fmt
	.no_dead_strip	_ivtv_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 ivtv_s_fmt_vid_cap
_ivtv_s_fmt_vid_cap:                    ; @ivtv_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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_fh2id
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ivtv_try_fmt_vid_cap
	cbnz	w0, LBB0_9
; %bb.1:
	ldp	w24, w23, [x19]
	ldr	w8, [x22, #4]
	cmp	w8, w24
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x22, #8]
	cmp	w8, w23
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	add	x0, x22, #16
	bl	_atomic_read
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	stp	w24, w23, [x22, #4]
	ldr	w0, [x22, #12]
	bl	_v4l2_ctrl_g_ctrl
Lloh6:
	adrp	x8, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_ENCODING_MPEG_1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x8]
	ldr	w8, [x19]
	cmp	x0, x9
	b.ne	LBB0_8
; %bb.7:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x19]
LBB0_8:
	stp	w8, w23, [sp]
Lloh9:
	adrp	x8, _MEDIA_BUS_FMT_FIXED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MEDIA_BUS_FMT_FIXED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x22]
Lloh12:
	adrp	x8, _pad@GOTPAGE
Lloh13:
	ldr	x8, [x8, _pad@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _set_fmt@GOTPAGE
Lloh16:
	ldr	x8, [x8, _set_fmt@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x4, sp
	mov	x3, #0
	bl	_v4l2_subdev_call
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ivtv_g_fmt_vid_cap
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_MPEG_VIDEO_ENCODING_MPEG_1,8,3 ; @V4L2_MPEG_VIDEO_ENCODING_MPEG_1
	.comm	_MEDIA_BUS_FMT_FIXED,4,2        ; @MEDIA_BUS_FMT_FIXED
	.comm	_pad,4,2                        ; @pad
	.comm	_set_fmt,4,2                    ; @set_fmt
	.no_dead_strip	_ivtv_s_fmt_vid_cap
.subsections_via_symbols
