	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_g_fmt_vid_cap
_ivtv_g_fmt_vid_cap:                    ## @ivtv_g_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movq	%rsi, %rdi
	callq	_fh2id
	movq	8(%rax), %rcx
	movl	4(%rcx), %edx
	movl	%edx, 24(%rbx)
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%rbx)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 16(%rbx)
	movq	(%rax), %rax
	movq	_IVTV_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_1
## %bb.2:
	imull	$2160, %ecx, %eax               ## imm = 0x870
	sarl	%eax
	movl	$720, %ecx                      ## imm = 0x2D0
	movq	_V4L2_PIX_FMT_HM12@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
	movl	$131072, %eax                   ## imm = 0x20000
	movq	_V4L2_PIX_FMT_MPEG@GOTPCREL(%rip), %rdx
LBB0_3:
	movl	(%rdx), %edx
	movl	%edx, 12(%rbx)
	movl	%eax, 4(%rbx)
	movl	%ecx, 8(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_IVTV_ENC_STREAM_TYPE_YUV,8,3   ## @IVTV_ENC_STREAM_TYPE_YUV
	.comm	_V4L2_PIX_FMT_HM12,4,2          ## @V4L2_PIX_FMT_HM12
	.comm	_V4L2_PIX_FMT_MPEG,4,2          ## @V4L2_PIX_FMT_MPEG
	.no_dead_strip	_ivtv_g_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ivtv_g_fmt_vid_cap
lCPI0_0:
	.long	131072                          ; 0x20000
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ivtv_g_fmt_vid_cap:                    ; @ivtv_g_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x0, x1
	bl	_fh2id
	ldp	x9, x8, [x0]
	ldp	w8, w10, [x8]
	str	w10, [x19, #24]
	str	w8, [x19]
Lloh0:
	adrp	x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh4:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	stp	w11, w10, [x19, #16]
Lloh6:
	adrp	x10, _IVTV_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IVTV_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	mov	w9, #2160
	mul	w8, w8, w9
	orr	w9, w8, #0x1
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #1
	mov	w9, #720
	dup.2s	v0, w9
	mov.s	v0[0], w8
Lloh9:
	adrp	x8, _V4L2_PIX_FMT_HM12@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_PIX_FMT_HM12@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
Lloh13:
	adrp	x8, _V4L2_PIX_FMT_MPEG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_PIX_FMT_MPEG@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	stur	d0, [x19, #4]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdrp	Lloh11, Lloh13
	.loh AdrpLdr	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_IVTV_ENC_STREAM_TYPE_YUV,8,3   ; @IVTV_ENC_STREAM_TYPE_YUV
	.comm	_V4L2_PIX_FMT_HM12,4,2          ; @V4L2_PIX_FMT_HM12
	.comm	_V4L2_PIX_FMT_MPEG,4,2          ; @V4L2_PIX_FMT_MPEG
	.no_dead_strip	_ivtv_g_fmt_vid_cap
.subsections_via_symbols
