	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_dp_mst_check_status     ## -- Begin function radeon_dp_mst_check_status
	.p2align	4, 0x90
_radeon_dp_mst_check_status:            ## @radeon_dp_mst_check_status
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r15
	cmpl	$0, (%r15)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	8(%rdi), %rdi
	movq	_DP_SINK_COUNT_ESI@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	leaq	-112(%rbp), %rdx
	movl	$8, %ecx
	callq	_drm_dp_dpcd_read
	cmpl	$8, %eax
	jne	LBB0_10
## %bb.2:
	leaq	-112(%rbp), %r15
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG_KMS
	leaq	-116(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_drm_dp_mst_hpd_irq
	cmpl	$0, -116(%rbp)
	je	LBB0_9
## %bb.3:
	movl	%eax, %r15d
	leaq	-108(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rdi
	movq	(%r14), %rsi
	incq	%rsi
	movq	%r12, %rdx
	movl	$3, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$3, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	leal	1(%r13), %eax
	cmpl	$2, %r13d
	movl	%eax, %r13d
	jb	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rdi
	movq	(%r14), %rsi
	leaq	-112(%rbp), %r13
	movq	%r13, %rdx
	movl	$8, %ecx
	callq	_drm_dp_dpcd_read
	cmpl	$8, %eax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	leaq	-112(%rbp), %r15
	movl	%r15d, %esi
	callq	_DRM_DEBUG_KMS
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	movq	%r13, %rsi
	leaq	-116(%rbp), %rdx
	callq	_drm_dp_mst_hpd_irq
	movl	%eax, %r15d
	cmpl	$0, -116(%rbp)
	jne	LBB0_4
LBB0_9:
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%esi, %esi
	callq	_DRM_DEBUG_KMS
	movl	$0, (%r15)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_dp_mst_topology_mgr_set_mst
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_SINK_COUNT_ESI,8,3          ## @DP_SINK_COUNT_ESI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got esi %3ph\n"

L_.str.1:                               ## @.str.1
	.asciz	"got esi2 %3ph\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get ESI - device may have failed %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_dp_mst_check_status     ; -- Begin function radeon_dp_mst_check_status
	.p2align	2
_radeon_dp_mst_check_status:            ; @radeon_dp_mst_check_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x20, [x0, #16]
	ldr	w8, [x20]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x19, x0
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #48]
	stp	q0, q0, [sp, #16]
	ldr	x0, [x0, #8]
Lloh3:
	adrp	x24, _DP_SINK_COUNT_ESI@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DP_SINK_COUNT_ESI@GOTPAGEOFF]
	ldr	x1, [x24]
	add	x21, sp, #16
	add	x2, sp, #16
	mov	w3, #8
	bl	_drm_dp_dpcd_read
	cmp	w0, #8
	b.ne	LBB0_10
; %bb.2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #16
	bl	_DRM_DEBUG_KMS
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_drm_dp_mst_hpd_irq
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_9
; %bb.3:
	mov	x20, x0
	orr	x21, x21, #0x4
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh9:
	adrp	x23, l_.str@PAGE
Lloh10:
	add	x23, x23, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	x2, x21
	mov	w3, #3
	bl	_drm_dp_dpcd_write
	cmp	w0, #3
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	x2, x21
	mov	w3, #3
	bl	_drm_dp_dpcd_write
	cmp	w0, #3
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x24]
	add	x1, x8, #1
	mov	x2, x21
	mov	w3, #3
	bl	_drm_dp_dpcd_write
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #8]
	ldr	x1, [x24]
	add	x2, sp, #16
	mov	w3, #8
	bl	_drm_dp_dpcd_read
	cmp	w0, #8
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #16
	mov	x0, x22
	bl	_DRM_DEBUG_KMS
	add	x1, sp, #16
	mov	x0, x23
	bl	_DRM_DEBUG_KMS
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_drm_dp_mst_hpd_irq
	mov	x20, x0
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_4
LBB0_9:
	mov	w20, #0
	b	LBB0_12
LBB0_10:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	w1, #0
	bl	_DRM_DEBUG_KMS
	str	wzr, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_drm_dp_mst_topology_mgr_set_mst
LBB0_11:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_SINK_COUNT_ESI,8,3          ; @DP_SINK_COUNT_ESI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got esi %3ph\n"

l_.str.1:                               ; @.str.1
	.asciz	"got esi2 %3ph\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get ESI - device may have failed %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
