	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_mst_topology_mgr_resume ## -- Begin function drm_dp_mst_topology_mgr_resume
	.p2align	4, 0x90
_drm_dp_mst_topology_mgr_resume:        ## @drm_dp_mst_topology_mgr_resume
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_mutex_lock
	cmpq	$0, 8(%rbx)
	je	LBB0_9
## %bb.1:
	movl	16(%rbx), %edi
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rdx
	movq	_DP_RECEIVER_CAP_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	callq	_drm_dp_dpcd_read
	cmpl	(%r14), %eax
	jne	LBB0_5
## %bb.2:
	movl	16(%rbx), %edi
	movq	_DP_MSTM_CTRL@GOTPCREL(%rip), %rax
	movq	_DP_MST_EN@GOTPCREL(%rip), %rcx
	movq	_DP_UP_REQ_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_DP_UPSTREAM_IS_SRC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_drm_dp_dpcd_writeb
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movl	16(%rbx), %edi
	movq	_DP_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rdx
	movl	$16, %ecx
	callq	_drm_dp_dpcd_read
	cmpl	$16, %eax
	jne	LBB0_5
## %bb.4:
	movq	8(%rbx), %rdi
	leaq	-96(%rbp), %rsi
	callq	_drm_dp_check_mstb_guid
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_DRM_DEBUG_KMS
LBB0_9:
	movl	$-1, %r14d
LBB0_10:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_DPCD_REV,4,2                ## @DP_DPCD_REV
	.comm	_DP_RECEIVER_CAP_SIZE,4,2       ## @DP_RECEIVER_CAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpcd read failed - undocked during suspend?\n"

	.comm	_DP_MSTM_CTRL,4,2               ## @DP_MSTM_CTRL
	.comm	_DP_MST_EN,4,2                  ## @DP_MST_EN
	.comm	_DP_UP_REQ_EN,4,2               ## @DP_UP_REQ_EN
	.comm	_DP_UPSTREAM_IS_SRC,4,2         ## @DP_UPSTREAM_IS_SRC
L_.str.1:                               ## @.str.1
	.asciz	"mst write failed - undocked during suspend?\n"

	.comm	_DP_GUID,4,2                    ## @DP_GUID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_mst_topology_mgr_resume ; -- Begin function drm_dp_mst_topology_mgr_resume
	.p2align	2
_drm_dp_mst_topology_mgr_resume:        ; @drm_dp_mst_topology_mgr_resume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _DP_DPCD_REV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_DPCD_REV@GOTPAGEOFF]
	ldr	w0, [x19, #16]
Lloh5:
	ldr	w1, [x8]
	ldr	x2, [x19, #24]
Lloh6:
	adrp	x20, _DP_RECEIVER_CAP_SIZE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DP_RECEIVER_CAP_SIZE@GOTPAGEOFF]
	ldr	w3, [x20]
	bl	_drm_dp_dpcd_read
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x8, _DP_MSTM_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DP_MSTM_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _DP_MST_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DP_MST_EN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _DP_UP_REQ_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DP_UP_REQ_EN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _DP_UPSTREAM_IS_SRC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DP_UPSTREAM_IS_SRC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_drm_dp_dpcd_writeb
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [x19, #16]
Lloh20:
	adrp	x8, _DP_GUID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DP_GUID@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #16
	bl	_drm_dp_dpcd_read
	cmp	w0, #16
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	bl	_drm_dp_check_mstb_guid
	mov	w20, #0
	b	LBB0_9
LBB0_5:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_DRM_DEBUG_KMS
LBB0_8:
	mov	w20, #-1
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	ldur	x8, [x29, #-24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_DPCD_REV,4,2                ; @DP_DPCD_REV
	.comm	_DP_RECEIVER_CAP_SIZE,4,2       ; @DP_RECEIVER_CAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpcd read failed - undocked during suspend?\n"

	.comm	_DP_MSTM_CTRL,4,2               ; @DP_MSTM_CTRL
	.comm	_DP_MST_EN,4,2                  ; @DP_MST_EN
	.comm	_DP_UP_REQ_EN,4,2               ; @DP_UP_REQ_EN
	.comm	_DP_UPSTREAM_IS_SRC,4,2         ; @DP_UPSTREAM_IS_SRC
l_.str.1:                               ; @.str.1
	.asciz	"mst write failed - undocked during suspend?\n"

	.comm	_DP_GUID,4,2                    ; @DP_GUID
.subsections_via_symbols
