	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_dvb_ctrl_feed
_pvr2_dvb_ctrl_feed:                    ## @pvr2_dvb_ctrl_feed
	.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), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	%esi, %r15d
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.3:
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	_PVR2_TRACE_DVB_FEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_pvr2_trace
	movq	%rbx, %rdi
	callq	_pvr2_dvb_stream_start
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movq	(%rbx), %rax
LBB0_6:
	incq	%rax
	movq	%rax, (%rbx)
	jmp	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_7:
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jle	LBB0_10
## %bb.8:
	decq	%rax
	movq	%rax, (%rbx)
	jne	LBB0_10
## %bb.9:
	movq	_PVR2_TRACE_DVB_FEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_pvr2_trace
	movq	%rbx, %rdi
	callq	_pvr2_dvb_stream_end
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PVR2_TRACE_DVB_FEED,4,2        ## @PVR2_TRACE_DVB_FEED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start feeding demux"

L_.str.1:                               ## @.str.1
	.asciz	"stop feeding demux"

	.no_dead_strip	_pvr2_dvb_ctrl_feed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_dvb_ctrl_feed
_pvr2_dvb_ctrl_feed:                    ; @pvr2_dvb_ctrl_feed
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
	cbz	x20, LBB0_4
; %bb.1:
	mov	x21, x1
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
	cbz	w21, LBB0_5
; %bb.2:
	cbz	x8, LBB0_9
; %bb.3:
	mov	w21, #0
	b	LBB0_11
LBB0_4:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_5:
	subs	x8, x8, #1
	b.lt	LBB0_8
; %bb.6:
	str	x8, [x20]
	b.ne	LBB0_8
; %bb.7:
Lloh3:
	adrp	x8, _PVR2_TRACE_DVB_FEED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVR2_TRACE_DVB_FEED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pvr2_trace
	mov	x0, x20
	bl	_pvr2_dvb_stream_end
LBB0_8:
	mov	w21, #0
	b	LBB0_12
LBB0_9:
Lloh8:
	adrp	x8, _PVR2_TRACE_DVB_FEED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PVR2_TRACE_DVB_FEED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pvr2_trace
	mov	x0, x20
	bl	_pvr2_dvb_stream_start
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.10:
	ldr	x8, [x20]
LBB0_11:
	add	x8, x8, #1
	str	x8, [x20]
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PVR2_TRACE_DVB_FEED,4,2        ; @PVR2_TRACE_DVB_FEED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start feeding demux"

l_.str.1:                               ; @.str.1
	.asciz	"stop feeding demux"

	.no_dead_strip	_pvr2_dvb_ctrl_feed
.subsections_via_symbols
