	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_toggle_pipe
_vx_toggle_pipe:                        ## @vx_toggle_pipe
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-44(%rbp), %rdx
	callq	_vx_get_pipe_state
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	cmpl	%r14d, -44(%rbp)
	je	LBB0_18
## %bb.3:
	movq	_MAX_WAIT_FOR_DSP@GOTPCREL(%rip), %r13
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.4:
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vx_pipe_can_start
	testl	%eax, %eax
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	callq	_mdelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_6
LBB0_8:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_vx_conf_pipe
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	%r12, %rdi
	callq	_vx_send_irqa
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.11:
	cmpl	$0, (%r13)
	jle	LBB0_17
## %bb.12:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	leaq	-44(%rbp), %rdx
	callq	_vx_get_pipe_state
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%r14d, -44(%rbp)
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	callq	_mdelay
	incl	%r13d
	movq	_MAX_WAIT_FOR_DSP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jl	LBB0_13
## %bb.16:
	negl	%ebx
LBB0_17:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	sarl	$31, %ebx
	andl	%ecx, %ebx
	jmp	LBB0_18
LBB0_1:
	movq	_EBADFD@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_9:
	movl	%eax, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADFD,4,2                     ## @EBADFD
	.comm	_MAX_WAIT_FOR_DSP,4,2           ## @MAX_WAIT_FOR_DSP
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_vx_toggle_pipe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_toggle_pipe
_vx_toggle_pipe:                        ; @vx_toggle_pipe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x2, sp, #12
	bl	_vx_get_pipe_state
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_18
LBB0_3:
Lloh0:
	adrp	x8, _EBADFD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_4:
Lloh3:
	adrp	x22, _MAX_WAIT_FOR_DSP@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_WAIT_FOR_DSP@GOTPAGEOFF]
	cbz	w19, LBB0_9
; %bb.5:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	w23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_vx_pipe_can_start
	cmp	w0, #0
	b.gt	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1
	bl	_mdelay
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8
	b.lt	LBB0_7
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	bl	_vx_conf_pipe
	tbnz	w0, #31, LBB0_18
; %bb.10:
	mov	x0, x21
	bl	_vx_send_irqa
	tbnz	w0, #31, LBB0_18
; %bb.11:
	ldr	w8, [x22]
Lloh5:
	adrp	x23, _EIO@GOTPAGE
Lloh6:
	ldr	x23, [x23, _EIO@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.12:
	mov	w24, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_vx_get_pipe_state
	tbnz	w0, #31, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, w19
	b.eq	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w25, [x23]
	mov	w0, #1
	bl	_mdelay
	add	w24, w24, #1
	ldr	w8, [x22]
	cmp	w24, w8
	b.lt	LBB0_13
; %bb.16:
	neg	w0, w25
LBB0_17:
	ldr	w8, [x23]
	neg	w8, w8
	and	w0, w8, w0, asr #31
LBB0_18:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADFD,4,2                     ; @EBADFD
	.comm	_MAX_WAIT_FOR_DSP,4,2           ; @MAX_WAIT_FOR_DSP
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_vx_toggle_pipe
.subsections_via_symbols
