	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvbsky_stream_ctrl
_dvbsky_stream_ctrl:                    ## @dvbsky_stream_ctrl
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_d_to_priv
	movq	%rax, %r14
	movl	l___const.dvbsky_stream_ctrl.obuf_pre+8(%rip), %eax
	movl	%eax, -48(%rbp)
	movq	l___const.dvbsky_stream_ctrl.obuf_pre(%rip), %rax
	movq	%rax, -56(%rbp)
	movl	l___const.dvbsky_stream_ctrl.obuf_post+8(%rip), %eax
	movl	%eax, -64(%rbp)
	movq	l___const.dvbsky_stream_ctrl.obuf_post(%rip), %rax
	movq	%rax, -72(%rbp)
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_dvbsky_usb_generic_rw
	movl	%eax, %ebx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.2:
	movl	$20, %edi
	callq	_msleep
	leaq	-72(%rbp), %rsi
	movq	%r12, %rdi
	movl	$3, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_dvbsky_usb_generic_rw
	movl	%eax, %ebx
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.dvbsky_stream_ctrl.obuf_pre
l___const.dvbsky_stream_ctrl.obuf_pre:
	.long	55                              ## 0x37
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.p2align	2                               ## @__const.dvbsky_stream_ctrl.obuf_post
l___const.dvbsky_stream_ctrl.obuf_post:
	.long	54                              ## 0x36
	.long	3                               ## 0x3
	.long	0                               ## 0x0

	.no_dead_strip	_dvbsky_stream_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvbsky_stream_ctrl
_dvbsky_stream_ctrl:                    ; @dvbsky_stream_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_d_to_priv
	mov	x19, x0
Lloh3:
	adrp	x8, l___const.dvbsky_stream_ctrl.obuf_pre@PAGE
Lloh4:
	add	x8, x8, l___const.dvbsky_stream_ctrl.obuf_pre@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #24]
	ldr	w8, [x8, #8]
	str	w8, [sp, #32]
Lloh5:
	adrp	x8, l___const.dvbsky_stream_ctrl.obuf_post@PAGE
Lloh6:
	add	x8, x8, l___const.dvbsky_stream_ctrl.obuf_post@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #8]
	ldr	w8, [x8, #8]
	str	w8, [sp, #16]
	bl	_mutex_lock
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #3
	mov	x3, #0
	mov	w4, #0
	bl	_dvbsky_usb_generic_rw
	mov	x21, x0
	cbz	w22, LBB0_3
; %bb.1:
	cbnz	w21, LBB0_3
; %bb.2:
	mov	w0, #20
	bl	_msleep
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #3
	mov	x3, #0
	mov	w4, #0
	bl	_dvbsky_usb_generic_rw
	mov	x21, x0
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x8, [sp, #40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.dvbsky_stream_ctrl.obuf_pre
l___const.dvbsky_stream_ctrl.obuf_pre:
	.long	55                              ; 0x37
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.p2align	2                               ; @__const.dvbsky_stream_ctrl.obuf_post
l___const.dvbsky_stream_ctrl.obuf_post:
	.long	54                              ; 0x36
	.long	3                               ; 0x3
	.long	0                               ; 0x0

	.no_dead_strip	_dvbsky_stream_ctrl
.subsections_via_symbols
