	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r600_is_display_hung
_r600_is_display_hung:                  ## @r600_is_display_hung
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	movq	_crtc_offsets@GOTPCREL(%rip), %r13
	movq	_AVIVO_CRTC_EN@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	(%r14), %rax
	cmpq	%rax, %rbx
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_AVIVO_D1CRTC_CONTROL@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_RREG32
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_AVIVO_D1CRTC_STATUS_HV_COUNT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_RREG32
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	cltq
	movq	%rax, -64(%rbp,%rbx,8)
	movslq	%edx, %rax
	orq	%rax, %r15
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
LBB0_6:
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	(%r14), %rbx
	jae	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	movslq	%r13d, %rax
	testq	%rax, %r15
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_crtc_offsets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_AVIVO_D1CRTC_STATUS_HV_COUNT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_RREG32
	cltq
	cmpq	%rax, -64(%rbp,%rbx,8)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	notl	%r13d
	movslq	%r13d, %rax
	andq	%rax, %r15
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$100, %edi
	callq	_udelay
	incq	%r12
	cmpq	$10, %r12
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_13
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	movl	$1, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIVO_D1CRTC_CONTROL,8,3       ## @AVIVO_D1CRTC_CONTROL
	.comm	_crtc_offsets,8,3               ## @crtc_offsets
	.comm	_AVIVO_CRTC_EN,4,2              ## @AVIVO_CRTC_EN
	.comm	_AVIVO_D1CRTC_STATUS_HV_COUNT,8,3 ## @AVIVO_D1CRTC_STATUS_HV_COUNT
	.no_dead_strip	_r600_is_display_hung
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r600_is_display_hung
_r600_is_display_hung:                  ; @r600_is_display_hung
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0]
Lloh3:
	adrp	x20, _AVIVO_D1CRTC_STATUS_HV_COUNT@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AVIVO_D1CRTC_STATUS_HV_COUNT@GOTPAGEOFF]
Lloh5:
	adrp	x21, _crtc_offsets@GOTPAGE
Lloh6:
	ldr	x21, [x21, _crtc_offsets@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x23, #0
	mov	x22, #0
Lloh7:
	adrp	x24, _AVIVO_D1CRTC_CONTROL@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AVIVO_D1CRTC_CONTROL@GOTPAGEOFF]
Lloh9:
	adrp	x25, _AVIVO_CRTC_EN@GOTPAGE
Lloh10:
	ldr	x25, [x25, _AVIVO_CRTC_EN@GOTPAGEOFF]
	add	x26, sp, #8
	mov	w27, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19]
	cmp	x23, x8
	b.hs	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x21]
	ldr	x9, [x9, x23, lsl #3]
	add	x0, x9, x8
	bl	_RREG32
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	lsl	x28, x23, #3
	ldr	x9, [x9, x28]
	add	x0, x9, x8
	bl	_RREG32
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [x26, x28]
	lsl	w8, w27, w23
	sxtw	x8, w8
	orr	x22, x22, x8
	b	LBB0_2
LBB0_5:
	mov	x22, #0
LBB0_6:
	mov	x23, #0
	mov	w24, #1
	add	x25, sp, #8
	cbz	x8, LBB0_12
LBB0_7:
	mov	x26, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x26, #1
	ldr	x8, [x19]
	cmp	x26, x8
	b.hs	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w27, w24, w26
	sxtw	x8, w27
	tst	x22, x8
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	lsl	x28, x26, #3
	ldr	x9, [x9, x28]
	add	x0, x9, x8
	bl	_RREG32
	ldr	x8, [x25, x28]
	cmp	x8, w0, sxtw
	b.eq	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mvn	w8, w27
	sxtw	x8, w8
	and	x22, x22, x8
	b	LBB0_8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cbz	x22, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #100
	bl	_udelay
	add	x23, x23, #1
	cmp	x23, #10
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_12
LBB0_15:
	mov	w0, #0
	b	LBB0_17
LBB0_16:
	mov	w0, #1
LBB0_17:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIVO_D1CRTC_CONTROL,8,3       ; @AVIVO_D1CRTC_CONTROL
	.comm	_crtc_offsets,8,3               ; @crtc_offsets
	.comm	_AVIVO_CRTC_EN,4,2              ; @AVIVO_CRTC_EN
	.comm	_AVIVO_D1CRTC_STATUS_HV_COUNT,8,3 ; @AVIVO_D1CRTC_STATUS_HV_COUNT
	.no_dead_strip	_r600_is_display_hung
.subsections_via_symbols
