	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_add_port
_drm_dp_add_port:                       ## @drm_dp_add_port
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdx), %rsi
	callq	_drm_dp_get_port
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r14, %r12
	movl	8(%r15), %esi
	movl	12(%r15), %r14d
	movq	%r15, %r13
	jmp	LBB0_4
LBB0_1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$120, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_25
## %bb.2:
	movq	%rax, %r13
	leaq	116(%rax), %rdi
	callq	_kref_init
	movq	%r13, %rdi
	addq	$112, %rdi
	callq	_kref_init
	movq	%r14, 104(%r13)
	movq	(%rbx), %rax
	movq	%rax, (%r13)
	movq	(%r14), %rax
	movq	%rax, 96(%r13)
	leaq	L_.str(%rip), %rax
	movq	%rax, 24(%r13)
	movl	(%r12), %eax
	movl	%eax, 40(%r13)
	movl	$1, 32(%r13)
	movq	%r14, %r12
	movq	%r14, %rdi
	callq	_drm_dp_mst_get_mstb_malloc
	xorl	%esi, %esi
	xorl	%r14d, %r14d
LBB0_4:
	movl	8(%rbx), %eax
	movl	%eax, 8(%r13)
	movl	36(%rbx), %eax
	movl	%eax, 56(%r13)
	movl	32(%rbx), %eax
	movl	%eax, 88(%r13)
	movl	12(%rbx), %eax
	movl	%eax, 12(%r13)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 72(%r13)
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	cmpl	%eax, %r14d
	jne	LBB0_7
	jmp	LBB0_11
LBB0_5:
	movq	%r12, %rbx
	movq	(%r12), %rdi
	addq	$8, %rdi
	movl	%esi, -308(%rbp)                ## 4-byte Spill
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_drm_dp_mst_topology_get_port
	leaq	52(%r13), %rdi
	leaq	8(%r12), %rsi
	callq	_list_add
	movq	(%r12), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
	movl	-308(%rbp), %esi                ## 4-byte Reload
	movl	12(%r13), %eax
	cmpl	%eax, %r14d
	je	LBB0_11
LBB0_7:
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$0, 56(%r13)
	jne	LBB0_11
## %bb.9:
	movq	(%r12), %rdi
	movl	%esi, %r14d
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_drm_dp_send_enum_path_resources
	movl	%r14d, %esi
LBB0_11:
	cmpl	8(%r13), %esi
	je	LBB0_15
LBB0_12:
	cmpl	$0, 56(%r13)
	jne	LBB0_15
## %bb.13:
	movq	%r13, %rdi
	callq	_drm_dp_port_teardown_pdt
	movq	%r13, %rdi
	callq	_drm_dp_port_setup_pdt
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.14:
	movq	(%r12), %rdi
	movl	60(%r13), %esi
	callq	_drm_dp_send_link_address
	jmp	LBB0_15
LBB0_10:
	movq	$0, 64(%r13)
	cmpl	8(%r13), %esi
	jne	LBB0_12
LBB0_15:
	testq	%r15, %r15
	jne	LBB0_24
## %bb.16:
	cmpl	$0, 56(%r13)
	jne	LBB0_24
## %bb.17:
	movq	(%r13), %rsi
	leaq	-304(%rbp), %r14
	movq	%r12, %rdi
	movq	%r14, %rdx
	movl	$255, %ecx
	callq	_build_mst_prop_path
	movq	(%r12), %rdi
	movq	(%rdi), %rax
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	*8(%rax)
	movl	%eax, 16(%r13)
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	8(%r13), %ecx
	movq	_DP_PEER_DEVICE_DP_LEGACY_CONV@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_21
## %bb.20:
	movq	_DP_PEER_DEVICE_SST_SINK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_23
LBB0_21:
	movq	(%r13), %rcx
	movq	_DP_MST_LOGICAL_PORT_0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_23
## %bb.22:
	leaq	36(%r13), %rsi
	movl	%eax, %edi
	callq	_drm_get_edid
	movl	%eax, 48(%r13)
	movl	16(%r13), %edi
	callq	_drm_connector_set_tile_property
	movl	16(%r13), %eax
LBB0_23:
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %edi
	callq	*(%rcx)
	jmp	LBB0_24
LBB0_18:
	movq	(%r12), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	leaq	52(%r13), %rdi
	callq	_list_del
	movq	(%r12), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_drm_dp_mst_topology_put_port
LBB0_24:
	movq	%r13, %rdi
	callq	_drm_dp_mst_topology_put_port
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPMST"

	.comm	_DP_PEER_DEVICE_DP_LEGACY_CONV,4,2 ## @DP_PEER_DEVICE_DP_LEGACY_CONV
	.comm	_DP_PEER_DEVICE_SST_SINK,4,2    ## @DP_PEER_DEVICE_SST_SINK
	.comm	_DP_MST_LOGICAL_PORT_0,8,3      ## @DP_MST_LOGICAL_PORT_0
	.no_dead_strip	_drm_dp_add_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_add_port
_drm_dp_add_port:                       ; @drm_dp_add_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #352
	.cfi_def_cfa_offset 352
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #288]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #304]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #320]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #336]            ; 16-byte Folded Spill
	add	x29, sp, #336
	.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 w27, -72
	.cfi_offset w28, -80
	mov	x23, x2
	mov	x22, x1
	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, #-72]
	ldr	x1, [x2]
	bl	_drm_dp_get_port
	mov	x21, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldp	w22, w24, [x21, #8]
	mov	x20, x21
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #120
	bl	_kzalloc
	cbz	x0, LBB0_25
; %bb.3:
	mov	x20, x0
	add	x0, x0, #116
	bl	_kref_init
	add	x0, x20, #112
	bl	_kref_init
	str	x19, [x20, #104]
	ldr	x8, [x23]
	str	x8, [x20]
	ldr	x8, [x19]
Lloh6:
	adrp	x9, l_.str@PAGE
Lloh7:
	add	x9, x9, l_.str@PAGEOFF
	str	x8, [x20, #96]
	str	x9, [x20, #24]
	ldr	w8, [x22]
	str	w8, [x20, #40]
	mov	w8, #1
	str	w8, [x20, #32]
	mov	x0, x19
	bl	_drm_dp_mst_get_mstb_malloc
	mov	w22, #0
	mov	w24, #0
LBB0_4:
	ldr	w8, [x23, #8]
	str	w8, [x20, #8]
	ldr	w8, [x23, #36]
	str	w8, [x20, #56]
	ldr	w8, [x23, #32]
	str	w8, [x20, #88]
	ldr	w8, [x23, #12]
	str	w8, [x20, #12]
	ldr	q0, [x23, #16]
	stur	q0, [x20, #72]
	cbz	x21, LBB0_6
; %bb.5:
	cmp	w24, w8
	b.ne	LBB0_7
	b	LBB0_11
LBB0_6:
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_mutex_lock
	mov	x0, x20
	bl	_drm_dp_mst_topology_get_port
	add	x0, x20, #52
	add	x1, x19, #8
	bl	_list_add
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_mutex_unlock
	ldr	w8, [x20, #12]
	cmp	w24, w8
	b.eq	LBB0_11
LBB0_7:
	cbz	w8, LBB0_10
; %bb.8:
	ldr	w8, [x20, #56]
	cbnz	w8, LBB0_11
; %bb.9:
	ldr	x0, [x19]
	mov	x1, x19
	mov	x2, x20
	bl	_drm_dp_send_enum_path_resources
	b	LBB0_11
LBB0_10:
	str	xzr, [x20, #64]
LBB0_11:
	ldr	w8, [x20, #8]
	cmp	w22, w8
	b.eq	LBB0_15
; %bb.12:
	ldr	w8, [x20, #56]
	cbnz	w8, LBB0_15
; %bb.13:
	mov	x0, x20
	mov	x1, x22
	bl	_drm_dp_port_teardown_pdt
	mov	x0, x20
	bl	_drm_dp_port_setup_pdt
	cmp	w0, #1
	b.ne	LBB0_15
; %bb.14:
	ldr	x0, [x19]
	ldr	w1, [x20, #60]
	bl	_drm_dp_send_link_address
LBB0_15:
	cbnz	x21, LBB0_24
; %bb.16:
	ldr	w8, [x20, #56]
	cbnz	w8, LBB0_24
; %bb.17:
	ldr	x1, [x20]
	add	x2, sp, #9
	mov	x0, x19
	mov	w3, #255
	bl	_build_mst_prop_path
	ldr	x0, [x19]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	add	x2, sp, #9
	mov	x1, x20
	blr	x8
	str	w0, [x20, #16]
	cbz	w0, LBB0_23
; %bb.18:
	ldr	w8, [x20, #8]
Lloh8:
	adrp	x9, _DP_PEER_DEVICE_DP_LEGACY_CONV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DP_PEER_DEVICE_DP_LEGACY_CONV@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_20
; %bb.19:
Lloh11:
	adrp	x9, _DP_PEER_DEVICE_SST_SINK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DP_PEER_DEVICE_SST_SINK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_22
LBB0_20:
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _DP_MST_LOGICAL_PORT_0@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DP_MST_LOGICAL_PORT_0@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_22
; %bb.21:
	add	x1, x20, #36
	bl	_drm_get_edid
	str	w0, [x20, #48]
	ldr	w0, [x20, #16]
	bl	_drm_connector_set_tile_property
	ldr	w0, [x20, #16]
LBB0_22:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	blr	x8
	b	LBB0_24
LBB0_23:
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_mutex_lock
	add	x0, x20, #52
	bl	_list_del
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_mutex_unlock
	mov	x0, x20
	bl	_drm_dp_mst_topology_put_port
LBB0_24:
	mov	x0, x20
	bl	_drm_dp_mst_topology_put_port
LBB0_25:
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	ldp	x29, x30, [sp, #336]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #320]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #304]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #352
	ret
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPMST"

	.comm	_DP_PEER_DEVICE_DP_LEGACY_CONV,4,2 ; @DP_PEER_DEVICE_DP_LEGACY_CONV
	.comm	_DP_PEER_DEVICE_SST_SINK,4,2    ; @DP_PEER_DEVICE_SST_SINK
	.comm	_DP_MST_LOGICAL_PORT_0,8,3      ; @DP_MST_LOGICAL_PORT_0
	.no_dead_strip	_drm_dp_add_port
.subsections_via_symbols
