	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsp1_video_suspend             ## -- Begin function vsp1_video_suspend
	.p2align	4, 0x90
_vsp1_video_suspend:                    ## @vsp1_video_suspend
	.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	16(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.1:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	movq	_VSP1_PIPELINE_RUNNING@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	16(%r15), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	(%rax), %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx), %r13
	testq	%r13, %r13
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	12(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r13), %rax
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_VSP1_PIPELINE_STOPPING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	jmp	LBB0_6
LBB0_8:
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movq	16(%r15), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jae	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %r14
	testq	%r14, %r14
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	8(%rdi), %r12d
	callq	_vsp1_pipeline_stopped
	movl	%eax, %r13d
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VSP1_PIPELINE_RUNNING,8,3      ## @VSP1_PIPELINE_RUNNING
	.comm	_VSP1_PIPELINE_STOPPING,8,3     ## @VSP1_PIPELINE_STOPPING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipeline %u stop timeout\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vsp1_video_suspend             ; -- Begin function vsp1_video_suspend
	.p2align	2
_vsp1_video_suspend:                    ; @vsp1_video_suspend
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #16]
	ldr	w9, [x8]
	cbz	w9, LBB0_15
; %bb.1:
	mov	x19, x0
	mov	x21, #0
Lloh0:
	adrp	x22, _VSP1_PIPELINE_RUNNING@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VSP1_PIPELINE_RUNNING@GOTPAGEOFF]
Lloh2:
	adrp	x23, _VSP1_PIPELINE_STOPPING@GOTPAGE
Lloh3:
	ldr	x23, [x23, _VSP1_PIPELINE_STOPPING@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #16]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldr	w9, [x8]
	cmp	x21, x9
	b.hs	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x21, lsl #3]
	cbz	x9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x24, [x9, #8]
	cbz	x24, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x24, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x24]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	str	x8, [x24]
	b	LBB0_2
LBB0_8:
	cbz	w9, LBB0_15
; %bb.9:
	mov	x23, #0
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	x23, x8
	b.hs	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x24, [x8, x23, lsl #3]
	cbz	x24, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x24, #8]
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w21, [x0, #8]
	bl	_vsp1_pipeline_stopped
	mov	x22, x0
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_wait_event_timeout
	cbnz	w0, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x19]
	ldr	w2, [x24]
	mov	x1, x20
	bl	_dev_warn
	b	LBB0_10
LBB0_15:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VSP1_PIPELINE_RUNNING,8,3      ; @VSP1_PIPELINE_RUNNING
	.comm	_VSP1_PIPELINE_STOPPING,8,3     ; @VSP1_PIPELINE_STOPPING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipeline %u stop timeout\n"

.subsections_via_symbols
