	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_g_fmt_vid_out
_ivtv_g_fmt_vid_out:                    ## @ivtv_g_fmt_vid_out
	.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
	movq	_V4L2_CAP_VIDEO_OUTPUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	20(%rcx), %edx
	movl	%edx, 16(%rbx)
	movl	16(%rcx), %edx
	movl	%edx, (%rbx)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rbx)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%rbx)
	movq	(%rax), %rax
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_11
## %bb.3:
	movl	4(%rcx), %eax
	movq	_IVTV_YUV_MODE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	cmpl	$128, %edx
	je	LBB0_8
## %bb.4:
	cmpl	$129, %edx
	jne	LBB0_9
## %bb.5:
	movq	_IVTV_YUV_SYNC_MASK@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_6
## %bb.7:
	movq	_V4L2_FIELD_INTERLACED_TB@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_11:
	movq	_V4L2_PIX_FMT_MPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movabsq	$562949953421312, %rax          ## imm = 0x2000000000000
	movq	%rax, 4(%rbx)
	jmp	LBB0_12
LBB0_8:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_V4L2_FIELD_INTERLACED_BT@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_V4L2_PIX_FMT_HM12@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	$720, 4(%rbx)                   ## imm = 0x2D0
	movl	12(%rcx), %eax
	movl	%eax, 16(%rbx)
	movl	8(%rcx), %eax
	movl	%eax, (%rbx)
	addl	$31, %eax
	andl	$-32, %eax
	imull	$1080, %eax, %eax               ## imm = 0x438
	movl	%eax, 8(%rbx)
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ## @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ## @V4L2_FIELD_INTERLACED
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ## @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_IVTV_YUV_MODE_MASK,4,2         ## @IVTV_YUV_MODE_MASK
	.comm	_IVTV_YUV_SYNC_MASK,4,2         ## @IVTV_YUV_SYNC_MASK
	.comm	_V4L2_FIELD_INTERLACED_BT,4,2   ## @V4L2_FIELD_INTERLACED_BT
	.comm	_V4L2_FIELD_INTERLACED_TB,4,2   ## @V4L2_FIELD_INTERLACED_TB
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
	.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_out
.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_out
lCPI0_0:
	.long	0                               ; 0x0
	.long	131072                          ; 0x20000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ivtv_g_fmt_vid_out:                    ; @ivtv_g_fmt_vid_out
	.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
	ldr	x8, [x0, #8]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.1:
	ldp	w10, w9, [x8, #16]
	str	w10, [x19]
Lloh3:
	adrp	x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	str	w10, [x19, #24]
Lloh6:
	adrp	x10, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	stp	w9, w10, [x19, #16]
	ldr	x9, [x0]
Lloh9:
	adrp	x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.2:
	ldr	w9, [x8, #4]
Lloh12:
	adrp	x10, _IVTV_YUV_MODE_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IVTV_YUV_MODE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	and	w10, w10, w9
	cmp	w10, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w10, #129
	b.ne	LBB0_8
; %bb.4:
Lloh15:
	adrp	x10, _IVTV_YUV_SYNC_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IVTV_YUV_SYNC_MASK@GOTPAGEOFF]
Lloh17:
	adrp	x11, _V4L2_FIELD_INTERLACED_BT@GOTPAGE
Lloh18:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED_BT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
Lloh20:
	adrp	x12, _V4L2_FIELD_INTERLACED_TB@GOTPAGE
Lloh21:
	ldr	x12, [x12, _V4L2_FIELD_INTERLACED_TB@GOTPAGEOFF]
	tst	w10, w9
	csel	x9, x12, x11, eq
	b	LBB0_9
LBB0_5:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	mov	w0, #0
Lloh25:
	adrp	x8, _V4L2_PIX_FMT_MPEG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _V4L2_PIX_FMT_MPEG@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh28:
	adrp	x8, lCPI0_0@PAGE
Lloh29:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_10
LBB0_7:
Lloh30:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh32:
	adrp	x9, _V4L2_FIELD_ANY@GOTPAGE
Lloh33:
	ldr	x9, [x9, _V4L2_FIELD_ANY@GOTPAGEOFF]
LBB0_9:
	ldr	w9, [x9]
	mov	w0, #0
Lloh34:
	adrp	x10, _V4L2_PIX_FMT_HM12@GOTPAGE
Lloh35:
	ldr	x10, [x10, _V4L2_PIX_FMT_HM12@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	ldp	w8, w11, [x8, #8]
	stp	w11, w9, [x19, #16]
	mov	w9, #720
	stp	w8, w9, [x19]
	add	w8, w8, #31
	and	w8, w8, #0xffffffe0
	mov	w9, #1080
	mul	w8, w8, w9
	stp	w8, w10, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdr	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ; @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_FIELD_INTERLACED,4,2      ; @V4L2_FIELD_INTERLACED
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ; @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_IVTV_YUV_MODE_MASK,4,2         ; @IVTV_YUV_MODE_MASK
	.comm	_IVTV_YUV_SYNC_MASK,4,2         ; @IVTV_YUV_SYNC_MASK
	.comm	_V4L2_FIELD_INTERLACED_BT,4,2   ; @V4L2_FIELD_INTERLACED_BT
	.comm	_V4L2_FIELD_INTERLACED_TB,4,2   ; @V4L2_FIELD_INTERLACED_TB
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
	.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_out
.subsections_via_symbols
