	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_mstm_new
_nv50_mstm_new:                         ## @nv50_mstm_new
	.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	%r8, %rbx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_hweight8
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	8(%r12), %r14
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	movq	%r13, %rdi
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	cmpl	$18, -60(%rbp)
	jl	LBB0_3
## %bb.2:
	movq	_DP_MSTM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_drm_dp_dpcd_writeb
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r15
	movq	%r12, 16(%rax)
	movq	%rax, %rdi
	addq	$8, %rdi
	movq	_nv50_mstm@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	%r14, %rbx
	movq	%r14, %rsi
	movq	%r13, %rdx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_drm_dp_mst_topology_mgr_init
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	testl	%r14d, %r14d
	jle	LBB0_12
## %bb.6:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r13d
	shlq	$2, %r13
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	(%r15), %r8
	addq	%r14, %r8
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_nv50_msto_new
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	addq	$4, %r14
	cmpq	%r14, %r13
	jne	LBB0_7
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_DPCD_REV,4,2                ## @DP_DPCD_REV
	.comm	_DP_MSTM_CTRL,4,2               ## @DP_MSTM_CTRL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nv50_mstm,4,2                  ## @nv50_mstm
	.no_dead_strip	_nv50_mstm_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_mstm_new
_nv50_mstm_new:                         ; @nv50_mstm_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x26, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_hweight8
	mov	x21, x0
	ldr	x20, [x19, #8]
Lloh0:
	adrp	x8, _DP_DPCD_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_DPCD_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x25
	bl	_drm_dp_dpcd_readb
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #18
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _DP_MSTM_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_MSTM_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x25
	mov	w2, #0
	bl	_drm_dp_dpcd_writeb
LBB0_3:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	str	x0, [x26]
	cbz	x0, LBB0_10
; %bb.4:
	mov	x22, x0
Lloh9:
	adrp	x8, _nv50_mstm@GOTPAGE
Lloh10:
	ldr	x8, [x8, _nv50_mstm@GOTPAGEOFF]
	stp	x8, x19, [x0, #8]!
	mov	x1, x20
	mov	x2, x25
	mov	x3, x24
	mov	x4, x21
	mov	x5, x23
	bl	_drm_dp_mst_topology_mgr_init
	cbnz	w0, LBB0_11
; %bb.5:
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x24, #0
	mov	w23, #0
	mov	w8, w21
	lsl	x21, x8, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	ldr	w2, [x19]
	ldr	x8, [x22]
	add	x4, x8, x24
	mov	x0, x20
	mov	x3, x23
	bl	_nv50_msto_new
	cbnz	w0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	add	x24, x24, #4
	cmp	x21, x24
	b.ne	LBB0_7
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_DPCD_REV,4,2                ; @DP_DPCD_REV
	.comm	_DP_MSTM_CTRL,4,2               ; @DP_MSTM_CTRL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nv50_mstm,4,2                  ; @nv50_mstm
	.no_dead_strip	_nv50_mstm_new
.subsections_via_symbols
