	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_reset_trigger_to_occur
_wait_for_reset_trigger_to_occur:       ## @wait_for_reset_trigger_to_occur
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	xorl	%r14d, %r14d
	movq	_CRTC_STATE_VACTIVE@GOTPCREL(%rip), %r15
	movq	_CRTC_STATE_VBLANK@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	(%rbx), %rax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	*(%rax)
	incl	%r14d
	cmpl	$10, %r14d
	jne	LBB0_1
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DC_ERROR
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_DC_ERROR
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_DC_SYNC_INFO
	movl	$1, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TG counter is not moving!\n"

L_.str.1:                               ## @.str.1
	.asciz	"GSL: reset occurred at wait count: %d\n"

	.comm	_CRTC_STATE_VACTIVE,4,2         ## @CRTC_STATE_VACTIVE
	.comm	_CRTC_STATE_VBLANK,4,2          ## @CRTC_STATE_VBLANK
L_.str.2:                               ## @.str.2
	.asciz	"GSL: Timeout on reset trigger!\n"

	.no_dead_strip	_wait_for_reset_trigger_to_occur
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_reset_trigger_to_occur
_wait_for_reset_trigger_to_occur:       ; @wait_for_reset_trigger_to_occur
	.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
	mov	x20, x1
	mov	w19, #0
Lloh0:
	adrp	x21, _CRTC_STATE_VACTIVE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CRTC_STATE_VACTIVE@GOTPAGEOFF]
Lloh2:
	adrp	x22, _CRTC_STATE_VBLANK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CRTC_STATE_VBLANK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w1, [x21]
	mov	x0, x20
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w1, [x22]
	mov	x0, x20
	blr	x8
	add	w19, w19, #1
	cmp	w19, #10
	b.ne	LBB0_1
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DC_ERROR
LBB0_5:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DC_ERROR
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_DC_SYNC_INFO
	mov	w0, #1
LBB0_7:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TG counter is not moving!\n"

l_.str.1:                               ; @.str.1
	.asciz	"GSL: reset occurred at wait count: %d\n"

	.comm	_CRTC_STATE_VACTIVE,4,2         ; @CRTC_STATE_VACTIVE
	.comm	_CRTC_STATE_VBLANK,4,2          ; @CRTC_STATE_VBLANK
l_.str.2:                               ; @.str.2
	.asciz	"GSL: Timeout on reset trigger!\n"

	.no_dead_strip	_wait_for_reset_trigger_to_occur
.subsections_via_symbols
