	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv680_start_stream
_stv680_start_stream:                   ## @stv680_start_stream
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$1, (%rdi)
	movq	_STV680_NUMFRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_5
## %bb.1:
	movq	80(%r15), %r8
	movq	88(%r15), %r9
	movslq	4(%r15), %r11
	cmpl	$1, %r10d
	jne	LBB0_9
## %bb.2:
	xorl	%edi, %edi
	jmp	LBB0_3
LBB0_9:
	movl	%r10d, %edx
	andl	$-2, %edx
	leaq	(%r11,%r11), %rax
	leaq	24(%r8), %rcx
	xorl	%edi, %edi
	movq	%r9, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -16(%rcx)
	movq	$0, -24(%rcx)
	leaq	(%r11,%rbx), %rsi
	movq	%rsi, (%rcx)
	movq	$0, -8(%rcx)
	addq	$2, %rdi
	addq	%rax, %rbx
	addq	$32, %rcx
	cmpq	%rdi, %rdx
	jne	LBB0_10
LBB0_3:
	testb	$1, %r10b
	je	LBB0_5
## %bb.4:
	imulq	%rdi, %r11
	addq	%r11, %r9
	shlq	$4, %rdi
	movq	%r9, 8(%r8,%rdi)
	movq	$0, (%r8,%rdi)
LBB0_5:
	movq	_STV680_NUMSBUF@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.6:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	40(%r15), %edi
	movl	(%r14), %esi
	callq	_kmalloc
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_12:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r15)
	movq	$0, 72(%r15)
	movq	_STV680_NUMSCRATCH@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_18
## %bb.13:
	movl	$8, %ebx
	xorl	%r12d, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movq	_BUFFER_UNUSED@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	40(%r15), %edi
	movl	(%r13), %esi
	callq	_kmalloc
	movq	8(%r15), %rcx
	movq	%rax, -8(%rcx,%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	(%r14), %eax
	movl	%eax, (%rcx,%rbx)
	incq	%r12
	movq	_STV680_NUMSCRATCH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jl	LBB0_14
## %bb.17:
	movq	_STV680_NUMSBUF@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
LBB0_18:
	testl	%eax, %eax
	jle	LBB0_31
## %bb.19:
	xorl	%r14d, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, %rbx
	movl	44(%r15), %esi
	movl	48(%r15), %r12d
	movl	%r12d, %edi
	callq	_usb_rcvbulkpipe
	movq	16(%r15), %rcx
	movq	(%rcx,%r14,8), %rcx
	movl	40(%r15), %r8d
	movq	_stv680_video_irq@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	%r15, (%rsp)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	%eax, %edx
	callq	_usb_fill_bulk_urb
	movq	24(%r15), %rax
	movq	%rbx, (%rax,%r14,8)
	movq	24(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	movl	(%r12), %esi
	callq	_usb_submit_urb
	testl	%eax, %eax
	jne	LBB0_22
## %bb.30:                              ##   in Loop: Header=BB0_20 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_20
LBB0_31:
	movq	$0, 32(%r15)
	xorl	%eax, %eax
	jmp	LBB0_32
LBB0_8:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpl	$0, (%r13)
	jg	LBB0_24
	jmp	LBB0_26
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_STV680_NUMSBUF@GOTPCREL(%rip), %r13
LBB0_23:
	cmpl	$0, (%r13)
	jle	LBB0_26
LBB0_24:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_usb_kill_urb
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_usb_free_urb
	movq	24(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_kfree
	movq	16(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_25
LBB0_26:
	movq	_STV680_NUMSCRATCH@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_29
## %bb.27:
	movq	8(%r15), %rax
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, (%rax,%rbx)
	incq	%r12
	movslq	(%r14), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r12
	jl	LBB0_28
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_32:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	movl	%eax, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpl	$0, (%r13)
	jg	LBB0_24
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_STV680_NUMFRAMES,4,2           ## @STV680_NUMFRAMES
	.comm	_STV680_NUMSBUF,4,2             ## @STV680_NUMSBUF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STV(e): Could not kmalloc raw data buffer %i"

	.comm	_STV680_NUMSCRATCH,4,2          ## @STV680_NUMSCRATCH
L_.str.1:                               ## @.str.1
	.asciz	"STV(e): Could not kmalloc raw scratch buffer %i"

	.comm	_BUFFER_UNUSED,4,2              ## @BUFFER_UNUSED
	.comm	_stv680_video_irq,4,2           ## @stv680_video_irq
L_.str.2:                               ## @.str.2
	.asciz	"STV(e): urb burned down with err %d in start stream %d"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_stv680_start_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv680_start_stream
_stv680_start_stream:                   ; @stv680_start_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	w8, #1
	str	w8, [x0]
Lloh0:
	adrp	x8, _STV680_NUMFRAMES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STV680_NUMFRAMES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	ldrsw	x8, [x19, #4]
	ldp	x10, x11, [x19, #80]
	cmp	w9, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x12, #0
	b	LBB0_6
LBB0_3:
	and	x12, x9, #0xfffffffc
	lsl	x13, x8, #1
	add	x14, x13, x8
	lsl	x15, x8, #2
	add	x16, x10, #32
	mov	x17, x12
	mov	x0, x11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x8, x0
	add	x2, x13, x0
	add	x3, x14, x0
	stp	xzr, x0, [x16, #-32]
	stp	xzr, x1, [x16, #-16]
	stp	xzr, x2, [x16]
	add	x0, x0, x15
	stp	xzr, x3, [x16, #16]
	add	x16, x16, #64
	subs	x17, x17, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x12, x9
	b.eq	LBB0_8
LBB0_6:
	madd	x11, x12, x8, x11
	add	x10, x10, x12, lsl #4
	add	x10, x10, #8
	sub	x9, x9, x12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, x11, [x10, #-8]
	add	x11, x11, x8
	add	x10, x10, #16
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_8:
Lloh3:
	adrp	x23, _STV680_NUMSBUF@GOTPAGE
Lloh4:
	ldr	x23, [x23, _STV680_NUMSBUF@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x22, _STV680_NUMSCRATCH@GOTPAGE
Lloh6:
	ldr	x22, [x22, _STV680_NUMSCRATCH@GOTPAGEOFF]
Lloh7:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #40]
	ldr	w1, [x24]
	bl	_kmalloc
	ldr	x8, [x19, #16]
	str	x0, [x8, x20, lsl #3]
	cbz	x0, LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x23]
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_12:
	stp	xzr, xzr, [x19, #56]
	str	xzr, [x19, #72]
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.13:
	mov	x21, #0
	mov	x20, #0
Lloh9:
	adrp	x25, _BUFFER_UNUSED@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BUFFER_UNUSED@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #40]
	ldr	w1, [x24]
	bl	_kmalloc
	ldr	x8, [x19, #8]
	str	x0, [x8, x21]
	cbz	x0, LBB0_24
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w9, [x25]
	add	x8, x8, x21
	str	w9, [x8, #8]
	add	x20, x20, #1
	ldrsw	x8, [x22]
	add	x21, x21, #16
	cmp	x20, x8
	b.lt	LBB0_14
; %bb.16:
	ldr	w8, [x23]
LBB0_17:
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.18:
	mov	x25, #0
Lloh11:
	adrp	x26, _stv680_video_irq@GOTPAGE
Lloh12:
	ldr	x26, [x26, _stv680_video_irq@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_27
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x20, x0
	ldp	w1, w21, [x19, #44]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	ldr	x8, [x19, #16]
	lsl	x27, x25, #3
	ldr	x3, [x8, x27]
	ldr	w4, [x19, #40]
	ldr	w5, [x26]
	mov	x0, x20
	mov	x1, x21
	mov	x6, x19
	bl	_usb_fill_bulk_urb
	ldr	x8, [x19, #24]
	str	x20, [x8, x27]
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x27]
	ldr	w1, [x24]
	bl	_usb_submit_urb
	cbnz	w0, LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_19
LBB0_22:
	mov	w0, #0
	str	xzr, [x19, #32]
	b	LBB0_34
LBB0_23:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	b	LBB0_26
LBB0_24:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	b	LBB0_26
LBB0_25:
	mov	x2, x0
	str	x25, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #0
LBB0_26:
	bl	_PDEBUG
LBB0_27:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.28:
	mov	x20, #0
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	lsl	x21, x20, #3
	ldr	x0, [x8, x21]
	bl	_usb_kill_urb
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21]
	bl	_usb_free_urb
	ldr	x8, [x19, #24]
	str	xzr, [x8, x21]
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21]
	bl	_kfree
	ldr	x8, [x19, #16]
	str	xzr, [x8, x21]
	add	x20, x20, #1
	ldrsw	x8, [x23]
	cmp	x20, x8
	b.lt	LBB0_29
LBB0_30:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.31:
	mov	x20, #0
	mov	x21, #0
	ldr	x8, [x19, #8]
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x8, x20]
	bl	_kfree
	ldr	x8, [x19, #8]
	str	xzr, [x8, x20]
	add	x21, x21, #1
	ldrsw	x9, [x22]
	add	x20, x20, #16
	cmp	x21, x9
	b.lt	LBB0_32
LBB0_33:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_34:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_STV680_NUMFRAMES,4,2           ; @STV680_NUMFRAMES
	.comm	_STV680_NUMSBUF,4,2             ; @STV680_NUMSBUF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STV(e): Could not kmalloc raw data buffer %i"

	.comm	_STV680_NUMSCRATCH,4,2          ; @STV680_NUMSCRATCH
l_.str.1:                               ; @.str.1
	.asciz	"STV(e): Could not kmalloc raw scratch buffer %i"

	.comm	_BUFFER_UNUSED,4,2              ; @BUFFER_UNUSED
	.comm	_stv680_video_irq,4,2           ; @stv680_video_irq
l_.str.2:                               ; @.str.2
	.asciz	"STV(e): urb burned down with err %d in start stream %d"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_stv680_start_stream
.subsections_via_symbols
