	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_dvb_stream_do_start
_pvr2_dvb_stream_do_start:              ## @pvr2_dvb_stream_do_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %r13
	leaq	16(%rdi), %r14
	movq	32(%rdi), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pvr2_channel_claim_stream
	testl	%eax, %eax
	js	LBB0_20
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rax
	movq	(%rax), %r14
	movq	_PVR2_DVB_BUFFER_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	movq	_PVR2_DVB_BUFFER_SIZE@GOTPCREL(%rip), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r15), %esi
	callq	_kmalloc
	movq	40(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	_PVR2_DVB_BUFFER_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jb	LBB0_7
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_pvr2_dvb_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_pvr2_stream_set_callback
	movq	_PVR2_DVB_BUFFER_COUNT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_pvr2_stream_set_buffer_count
	testl	%eax, %eax
	js	LBB0_20
## %bb.10:
	cmpl	$0, (%r15)
	je	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	movq	_PVR2_DVB_BUFFER_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pvr2_stream_get_buffer
	movq	40(%r13), %rcx
	movl	(%rcx,%rbx,4), %esi
	movl	(%r12), %edx
	movq	%rax, %rdi
	callq	_pvr2_buffer_set_buffer
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_12
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_pvr2_hdw_set_streaming
	testl	%eax, %eax
	js	LBB0_20
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_pvr2_stream_get_idle_buffer
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%rax, %rdi
	callq	_pvr2_buffer_queue
	testl	%eax, %eax
	jns	LBB0_15
	jmp	LBB0_20
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_17:
	movq	_pvr2_dvb_feed_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rsi
	callq	_kthread_run
	movq	%rax, 8(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	8(%r13), %rdi
	callq	_PTR_ERR
	movq	$0, 8(%r13)
	jmp	LBB0_20
LBB0_19:
	movl	$1, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PVR2_DVB_BUFFER_COUNT,4,2      ## @PVR2_DVB_BUFFER_COUNT
	.comm	_PVR2_DVB_BUFFER_SIZE,4,2       ## @PVR2_DVB_BUFFER_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pvr2_dvb_notify,8,3            ## @pvr2_dvb_notify
	.comm	_pvr2_dvb_feed_thread,4,2       ## @pvr2_dvb_feed_thread
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pvrusb2-dvb"

	.no_dead_strip	_pvr2_dvb_stream_do_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_dvb_stream_do_start
_pvr2_dvb_stream_do_start:              ; @pvr2_dvb_stream_do_start
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
	ldr	w8, [x21], #16
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	ldr	x22, [x0, #32]
	mov	x0, x21
	mov	x1, x22
	bl	_pvr2_channel_claim_stream
	tbnz	w0, #31, LBB0_3
; %bb.5:
	ldr	x8, [x19, #24]
	ldr	x20, [x8]
Lloh2:
	adrp	x23, _PVR2_DVB_BUFFER_COUNT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PVR2_DVB_BUFFER_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_9
; %bb.6:
	mov	x24, #0
Lloh4:
	adrp	x25, _PVR2_DVB_BUFFER_SIZE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PVR2_DVB_BUFFER_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	w1, [x26]
	bl	_kmalloc
	ldr	x8, [x19, #40]
	str	w0, [x8, x24, lsl #2]
	cbz	w0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	ldr	w8, [x23]
	cmp	x24, x8
	b.lo	LBB0_7
LBB0_9:
	ldr	w0, [x22]
Lloh8:
	adrp	x8, _pvr2_dvb_notify@GOTPAGE
Lloh9:
	ldr	x8, [x8, _pvr2_dvb_notify@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_pvr2_stream_set_callback
	ldr	w1, [x23]
	mov	x0, x20
	bl	_pvr2_stream_set_buffer_count
	tbnz	w0, #31, LBB0_3
; %bb.10:
	ldr	w8, [x23]
	cbz	w8, LBB0_13
; %bb.11:
	mov	x22, #0
Lloh11:
	adrp	x24, _PVR2_DVB_BUFFER_SIZE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _PVR2_DVB_BUFFER_SIZE@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_pvr2_stream_get_buffer
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x22, lsl #2]
	ldr	w2, [x24]
	bl	_pvr2_buffer_set_buffer
	add	x22, x22, #1
	ldr	w8, [x23]
	cmp	x22, x8
	b.lo	LBB0_12
LBB0_13:
	ldr	w0, [x21]
	mov	w1, #1
	bl	_pvr2_hdw_set_streaming
	tbnz	w0, #31, LBB0_3
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_pvr2_stream_get_idle_buffer
	cbz	x0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_pvr2_buffer_queue
	tbz	w0, #31, LBB0_14
	b	LBB0_3
LBB0_16:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_17:
Lloh15:
	adrp	x8, _pvr2_dvb_feed_thread@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pvr2_dvb_feed_thread@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	bl	_kthread_run
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_19
; %bb.18:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	str	xzr, [x19, #8]
	b	LBB0_3
LBB0_19:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PVR2_DVB_BUFFER_COUNT,4,2      ; @PVR2_DVB_BUFFER_COUNT
	.comm	_PVR2_DVB_BUFFER_SIZE,4,2       ; @PVR2_DVB_BUFFER_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pvr2_dvb_notify,8,3            ; @pvr2_dvb_notify
	.comm	_pvr2_dvb_feed_thread,4,2       ; @pvr2_dvb_feed_thread
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pvrusb2-dvb"

	.no_dead_strip	_pvr2_dvb_stream_do_start
.subsections_via_symbols
