	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_wait_for_rlc_serdes
_gfx_v8_0_wait_for_rlc_serdes:          ## @gfx_v8_0_wait_for_rlc_serdes
	.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	%rdi, %r12
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	16(%r12), %rcx
	testq	%rcx, %rcx
	jle	LBB0_12
## %bb.1:
	movq	24(%r12), %rax
	xorl	%r15d, %r15d
	movq	_mmRLC_SERDES_CU_MASTER_BUSY@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	cmpq	%rcx, %r15
	jge	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_5 Depth 3
	testq	%rax, %rax
	jle	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_5 Depth 3
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	$-1, %ecx
	callq	_gfx_v8_0_select_se_sh
	movq	(%r12), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r13), %edi
	callq	_RREG32
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=3
	movl	$1, %edi
	callq	_udelay
	incq	%r14
	movq	(%r12), %rax
	cmpq	%rax, %r14
	jl	LBB0_5
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	cmpq	%rax, %r14
	jne	LBB0_9
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r12), %rax
	cmpq	%rax, %r14
	je	LBB0_17
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movq	24(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rcx
	jmp	LBB0_11
LBB0_17:
	movq	%r12, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	_gfx_v8_0_select_se_sh
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_INFO                       ## TAILCALL
LBB0_12:
	movq	%r12, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	_gfx_v8_0_select_se_sh
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	cmpq	$0, (%r12)
	jle	LBB0_16
## %bb.13:
	movq	_RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK@GOTPCREL(%rip), %rax
	movq	_RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	orq	(%rax), %r14
	movq	_RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %r14
	movq	_RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %r14
	xorl	%ebx, %ebx
	movq	_mmRLC_SERDES_NONCU_MASTER_BUSY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_RREG32
	testq	%r14, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$1, %edi
	callq	_udelay
	incq	%rbx
	cmpq	(%r12), %rbx
	jl	LBB0_14
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmRLC_SERDES_CU_MASTER_BUSY,4,2 ## @mmRLC_SERDES_CU_MASTER_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout wait for RLC serdes %u,%u\n"

	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK,8,3 ## @RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK,8,3 ## @RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK,8,3 ## @RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK,8,3 ## @RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK
	.comm	_mmRLC_SERDES_NONCU_MASTER_BUSY,4,2 ## @mmRLC_SERDES_NONCU_MASTER_BUSY
	.no_dead_strip	_gfx_v8_0_wait_for_rlc_serdes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v8_0_wait_for_rlc_serdes
_gfx_v8_0_wait_for_rlc_serdes:          ; @gfx_v8_0_wait_for_rlc_serdes
	.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
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x9, [x19, #16]
	cmp	x9, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x21, #0
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x23, _mmRLC_SERDES_CU_MASTER_BUSY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mmRLC_SERDES_CU_MASTER_BUSY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	cmp	x21, x9
	b.ge	LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_7 Depth 3
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_7 Depth 3
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	w3, #-1
	bl	_gfx_v8_0_select_se_sh
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x24, #0
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x23]
	bl	_RREG32
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=3
	mov	w0, #1
	bl	_udelay
	add	x24, x24, #1
	ldr	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_7
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x24, #0
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	x24, x8
	b.ne	LBB0_12
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x8, [x19]
	cmp	x24, x8
	b.eq	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x22, x22, #1
	ldr	x8, [x19, #24]
	cmp	x22, x8
	b.lt	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #16]
	b	LBB0_2
LBB0_14:
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-1
	mov	w3, #-1
	bl	_gfx_v8_0_select_se_sh
	mov	x0, x20
	bl	_mutex_unlock
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	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
	b	_DRM_INFO
LBB0_15:
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-1
	mov	w3, #-1
	bl	_gfx_v8_0_select_se_sh
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.16:
	mov	x20, #0
Lloh4:
	adrp	x8, _RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	orr	x8, x9, x8
Lloh10:
	adrp	x9, _RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh13:
	adrp	x9, _RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	orr	x21, x8, x9
Lloh16:
	adrp	x22, _mmRLC_SERDES_NONCU_MASTER_BUSY@GOTPAGE
Lloh17:
	ldr	x22, [x22, _mmRLC_SERDES_NONCU_MASTER_BUSY@GOTPAGEOFF]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_RREG32
	tst	x0, x21
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	w0, #1
	bl	_udelay
	add	x20, x20, #1
	ldr	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_17
LBB0_19:
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_mmRLC_SERDES_CU_MASTER_BUSY,4,2 ; @mmRLC_SERDES_CU_MASTER_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout wait for RLC serdes %u,%u\n"

	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK,8,3 ; @RLC_SERDES_NONCU_MASTER_BUSY__SE_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK,8,3 ; @RLC_SERDES_NONCU_MASTER_BUSY__GC_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK,8,3 ; @RLC_SERDES_NONCU_MASTER_BUSY__TC0_MASTER_BUSY_MASK
	.comm	_RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK,8,3 ; @RLC_SERDES_NONCU_MASTER_BUSY__TC1_MASTER_BUSY_MASK
	.comm	_mmRLC_SERDES_NONCU_MASTER_BUSY,4,2 ; @mmRLC_SERDES_NONCU_MASTER_BUSY
	.no_dead_strip	_gfx_v8_0_wait_for_rlc_serdes
.subsections_via_symbols
