	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_mst_handle_down_rep
_drm_dp_mst_handle_down_rep:            ## @drm_dp_mst_handle_down_rep
	.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, %rbx
	xorl	%esi, %esi
	callq	_drm_dp_get_one_sb_msg
	leaq	8(%rbx), %r14
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpq	$0, 40(%rbx)
	je	LBB0_10
## %bb.3:
	movl	32(%rbx), %esi
	movq	24(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_get_mst_branch_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movslq	16(%rbx), %r13
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax,%r13,8), %r13
	movq	%r12, %rdi
	callq	_mutex_unlock
	testq	%r13, %r13
	je	LBB0_6
## %bb.7:
	leaq	8(%r13), %rsi
	movq	%r14, %rdi
	callq	_drm_dp_sideband_parse_reply
	movq	8(%r13), %rax
	movq	_DP_SIDEBAND_REPLY_NAK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	24(%r13), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_drm_dp_mst_req_type_str
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	20(%r13), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_drm_dp_mst_nak_reason_str
	movl	16(%r13), %r9d
	leaq	L_.str.2(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r15, %rdi
	callq	_drm_dp_mst_topology_put_mstb
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_DRM_DP_SIDEBAND_TX_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	(%r15), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	$0, (%rax,%rcx,8)
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_wake_up_all
	jmp	LBB0_10
LBB0_4:
	movslq	32(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_1
LBB0_6:
	movl	16(%rbx), %edx
	movl	32(%rbx), %ecx
	movq	24(%rbx), %rax
	movl	(%rax), %r8d
	movq	8(%rbx), %rax
	movl	(%rax), %r9d
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r15, %rdi
	callq	_drm_dp_mst_topology_put_mstb
LBB0_1:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_10:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got MST reply from unknown device %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Got MST reply with no msg %p %d %d %02x %02x\n"

	.comm	_DP_SIDEBAND_REPLY_NAK,8,3      ## @DP_SIDEBAND_REPLY_NAK
L_.str.2:                               ## @.str.2
	.asciz	"Got NAK reply: req 0x%02x (%s), reason 0x%02x (%s), nak data 0x%02x\n"

	.comm	_DRM_DP_SIDEBAND_TX_RX,4,2      ## @DRM_DP_SIDEBAND_TX_RX
	.no_dead_strip	_drm_dp_mst_handle_down_rep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_mst_handle_down_rep
_drm_dp_mst_handle_down_rep:            ; @drm_dp_mst_handle_down_rep
	.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	x20, x0
	mov	w1, #0
	bl	_drm_dp_get_one_sb_msg
	add	x19, x20, #8
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_10
; %bb.2:
	ldr	w1, [x20, #32]
	ldr	x2, [x20, #24]
	mov	x0, x20
	bl	_drm_dp_get_mst_branch_device
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	ldrsw	x26, [x20, #16]
	add	x22, x20, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21]
	ldr	x27, [x8, x26, lsl #3]
	mov	x0, x22
	bl	_mutex_unlock
	cbz	x27, LBB0_8
; %bb.4:
	add	x1, x27, #8
	mov	x0, x19
	bl	_drm_dp_sideband_parse_reply
	ldr	x8, [x27, #8]
Lloh0:
	adrp	x9, _DP_SIDEBAND_REPLY_NAK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DP_SIDEBAND_REPLY_NAK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x23, [x27, #24]
	mov	x0, x23
	bl	_drm_dp_mst_req_type_str
	mov	x24, x0
	ldr	w25, [x27, #20]
	mov	x0, x25
	bl	_drm_dp_mst_nak_reason_str
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x27, #16]
	stp	x0, x8, [sp, #16]
	stp	x24, x25, [sp]
Lloh3:
	adrp	x0, l_.str.2@PAGE
Lloh4:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_DRM_DEBUG_KMS
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x21
	bl	_drm_dp_mst_topology_put_mstb
	mov	x0, x22
	bl	_mutex_lock
Lloh5:
	adrp	x8, _DRM_DP_SIDEBAND_TX_RX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_DP_SIDEBAND_TX_RX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x27]
	ldr	x8, [x21]
	str	xzr, [x8, x26, lsl #3]
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x20
	bl	_wake_up_all
	b	LBB0_10
LBB0_7:
	ldrsw	x1, [x20, #32]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_9
LBB0_8:
	ldr	x8, [x20, #24]
	ldr	x9, [x20, #8]
	ldr	w10, [x20, #16]
	ldr	w11, [x20, #32]
	ldr	w8, [x8]
	ldr	w9, [x9]
	stp	x8, x9, [sp, #16]
	stp	x10, x11, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_DRM_DEBUG_KMS
	mov	x0, x21
	bl	_drm_dp_mst_topology_put_mstb
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_10:
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got MST reply from unknown device %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Got MST reply with no msg %p %d %d %02x %02x\n"

	.comm	_DP_SIDEBAND_REPLY_NAK,8,3      ; @DP_SIDEBAND_REPLY_NAK
l_.str.2:                               ; @.str.2
	.asciz	"Got NAK reply: req 0x%02x (%s), reason 0x%02x (%s), nak data 0x%02x\n"

	.comm	_DRM_DP_SIDEBAND_TX_RX,4,2      ; @DRM_DP_SIDEBAND_TX_RX
	.no_dead_strip	_drm_dp_mst_handle_down_rep
.subsections_via_symbols
