	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_capture_start           ## -- Begin function em28xx_capture_start
	.p2align	4, 0x90
_em28xx_capture_start:                  ## @em28xx_capture_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CHIP_ID_EM2874@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_EM2874_R5F_TS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EM2874_TS1_CAPTURE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.4:
	movl	%ecx, %edx
	jmp	LBB0_3
LBB0_5:
	movq	_EM28XX_R0C_USBSUSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testl	%r14d, %r14d
	setne	%dl
	shll	$4, %edx
	movq	%rbx, %rdi
	movl	$16, %ecx
	callq	_em28xx_write_reg_bits
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.7:
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	movl	$19, %esi
	movl	$12, %edx
	callq	_em28xx_write_reg
LBB0_9:
	movq	%rbx, %rdi
	movl	$72, %esi
	xorl	%edx, %edx
	callq	_em28xx_write_reg
	movq	8(%rbx), %rax
	movq	_EM28XX_ANALOG_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_EM28XX_R12_VINENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$103, %eax
	movl	$55, %edx
	cmovel	%eax, %edx
	movq	%rbx, %rdi
	callq	_em28xx_write_reg
	movl	%eax, %ebx
	movl	$6, %edi
	callq	_msleep
	movl	%ebx, %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	xorl	%edx, %edx
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_em28xx_write_reg_bits          ## TAILCALL
LBB0_11:
	movq	_EM28XX_R12_VINENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$39, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_em28xx_write_reg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_ID_EM2874,8,3             ## @CHIP_ID_EM2874
	.comm	_EM2874_R5F_TS_ENABLE,4,2       ## @EM2874_R5F_TS_ENABLE
	.comm	_EM2874_TS1_CAPTURE_ENABLE,4,2  ## @EM2874_TS1_CAPTURE_ENABLE
	.comm	_EM28XX_R0C_USBSUSP,4,2         ## @EM28XX_R0C_USBSUSP
	.comm	_EM28XX_R12_VINENABLE,4,2       ## @EM28XX_R12_VINENABLE
	.comm	_EM28XX_ANALOG_MODE,8,3         ## @EM28XX_ANALOG_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_capture_start           ; -- Begin function em28xx_capture_start
	.p2align	2
_em28xx_capture_start:                  ; @em28xx_capture_start
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_ID_EM2874@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_ID_EM2874@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EM2874_R5F_TS_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM2874_R5F_TS_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _EM2874_TS1_CAPTURE_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EM2874_TS1_CAPTURE_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	cbz	w20, LBB0_9
; %bb.2:
	mov	x2, x3
	b	LBB0_10
LBB0_3:
Lloh9:
	adrp	x8, _EM28XX_R0C_USBSUSP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EM28XX_R0C_USBSUSP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	cmp	w20, #0
	cset	w8, ne
	lsl	w2, w8, #4
	mov	x0, x19
	mov	w3, #16
	bl	_em28xx_write_reg_bits
	tbnz	w0, #31, LBB0_8
; %bb.4:
	cbz	w20, LBB0_11
; %bb.5:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #19
	mov	w2, #12
	bl	_em28xx_write_reg
LBB0_7:
	mov	x0, x19
	mov	w1, #72
	mov	w2, #0
	bl	_em28xx_write_reg
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _EM28XX_ANALOG_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EM28XX_ANALOG_MODE@GOTPAGEOFF]
Lloh14:
	adrp	x10, _EM28XX_R12_VINENABLE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _EM28XX_R12_VINENABLE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	ldr	w1, [x10]
	cmp	x8, x9
	mov	w8, #55
	mov	w9, #103
	csel	w2, w9, w8, eq
	mov	x0, x19
	bl	_em28xx_write_reg
	mov	x19, x0
	mov	w0, #6
	bl	_msleep
	mov	x0, x19
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	w2, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_em28xx_write_reg_bits
LBB0_11:
Lloh18:
	adrp	x8, _EM28XX_R12_VINENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EM28XX_R12_VINENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #39
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_em28xx_write_reg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_ID_EM2874,8,3             ; @CHIP_ID_EM2874
	.comm	_EM2874_R5F_TS_ENABLE,4,2       ; @EM2874_R5F_TS_ENABLE
	.comm	_EM2874_TS1_CAPTURE_ENABLE,4,2  ; @EM2874_TS1_CAPTURE_ENABLE
	.comm	_EM28XX_R0C_USBSUSP,4,2         ; @EM28XX_R0C_USBSUSP
	.comm	_EM28XX_R12_VINENABLE,4,2       ; @EM28XX_R12_VINENABLE
	.comm	_EM28XX_ANALOG_MODE,8,3         ; @EM28XX_ANALOG_MODE
.subsections_via_symbols
