	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_set_outfmt
_em28xx_set_outfmt:                     ## @em28xx_set_outfmt
	.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	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	24(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	orl	$32, %edx
	cmpl	$0, (%rdi)
	cmovnel	%eax, %edx
	movq	_EM28XX_R27_OUTFMT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_em28xx_write_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_EM28XX_R10_VINMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_em28xx_write_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movl	4(%r15), %r14d
	movq	%rbx, %rdi
	callq	_em28xx_vbi_supported
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.3:
	movq	_EM28XX_VINCTRL_VBI_RAW@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_EM28XX_R34_VBI_START_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_em28xx_write_reg
	movq	_EM28XX_R36_VBI_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	movq	%rbx, %rdi
	callq	_em28xx_write_reg
	movq	_EM28XX_R37_VBI_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	movq	%rbx, %rdi
	callq	_em28xx_write_reg
	movl	16(%r15), %eax
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rcx
	movl	$9, %edx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rcx
	movl	$7, %edx
	testl	%eax, (%rcx)
	je	LBB0_6
LBB0_5:
	movq	_EM28XX_R35_VBI_START_V@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_em28xx_write_reg
LBB0_6:
	movq	_EM28XX_R11_VINCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_em28xx_write_reg               ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EM28XX_R27_OUTFMT,4,2          ## @EM28XX_R27_OUTFMT
	.comm	_EM28XX_R10_VINMODE,4,2         ## @EM28XX_R10_VINMODE
	.comm	_EM28XX_VINCTRL_VBI_RAW,4,2     ## @EM28XX_VINCTRL_VBI_RAW
	.comm	_EM28XX_R34_VBI_START_H,4,2     ## @EM28XX_R34_VBI_START_H
	.comm	_EM28XX_R36_VBI_WIDTH,4,2       ## @EM28XX_R36_VBI_WIDTH
	.comm	_EM28XX_R37_VBI_HEIGHT,4,2      ## @EM28XX_R37_VBI_HEIGHT
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_EM28XX_R35_VBI_START_V,4,2     ## @EM28XX_R35_VBI_START_V
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_EM28XX_R11_VINCTRL,4,2         ## @EM28XX_R11_VINCTRL
	.no_dead_strip	_em28xx_set_outfmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_set_outfmt
_em28xx_set_outfmt:                     ; @em28xx_set_outfmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w10, w8, #0x20
	cmp	w9, #0
	csel	w2, w10, w8, eq
Lloh0:
	adrp	x8, _EM28XX_R27_OUTFMT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EM28XX_R27_OUTFMT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_em28xx_write_reg
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _EM28XX_R10_VINMODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM28XX_R10_VINMODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_em28xx_write_reg
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w20, [x21, #4]
	mov	x0, x19
	bl	_em28xx_vbi_supported
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.3:
Lloh6:
	adrp	x8, _EM28XX_VINCTRL_VBI_RAW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EM28XX_VINCTRL_VBI_RAW@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w20, w8, w20
Lloh9:
	adrp	x8, _EM28XX_R34_VBI_START_H@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EM28XX_R34_VBI_START_H@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_em28xx_write_reg
Lloh12:
	adrp	x8, _EM28XX_R36_VBI_WIDTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EM28XX_R36_VBI_WIDTH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x21, #8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	mov	x0, x19
	bl	_em28xx_write_reg
Lloh15:
	adrp	x8, _EM28XX_R37_VBI_HEIGHT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EM28XX_R37_VBI_HEIGHT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w2, [x21, #12]
	mov	x0, x19
	bl	_em28xx_write_reg
	ldr	w8, [x21, #16]
Lloh18:
	adrp	x9, _V4L2_STD_525_60@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_STD_525_60@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	mov	w2, #9
	b	LBB0_8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh21:
	adrp	x9, _V4L2_STD_625_50@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	mov	w2, #7
LBB0_8:
Lloh24:
	adrp	x8, _EM28XX_R35_VBI_START_V@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EM28XX_R35_VBI_START_V@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_em28xx_write_reg
LBB0_9:
Lloh27:
	adrp	x8, _EM28XX_R11_VINCTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EM28XX_R11_VINCTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_em28xx_write_reg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EM28XX_R27_OUTFMT,4,2          ; @EM28XX_R27_OUTFMT
	.comm	_EM28XX_R10_VINMODE,4,2         ; @EM28XX_R10_VINMODE
	.comm	_EM28XX_VINCTRL_VBI_RAW,4,2     ; @EM28XX_VINCTRL_VBI_RAW
	.comm	_EM28XX_R34_VBI_START_H,4,2     ; @EM28XX_R34_VBI_START_H
	.comm	_EM28XX_R36_VBI_WIDTH,4,2       ; @EM28XX_R36_VBI_WIDTH
	.comm	_EM28XX_R37_VBI_HEIGHT,4,2      ; @EM28XX_R37_VBI_HEIGHT
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_EM28XX_R35_VBI_START_V,4,2     ; @EM28XX_R35_VBI_START_V
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_EM28XX_R11_VINCTRL,4,2         ; @EM28XX_R11_VINCTRL
	.no_dead_strip	_em28xx_set_outfmt
.subsections_via_symbols
