	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_helpers_dp_mst_write_payload_allocation_table ## -- Begin function dm_helpers_dp_mst_write_payload_allocation_table
	.p2align	4, 0x90
_dm_helpers_dp_mst_write_payload_allocation_table: ## @dm_helpers_dp_mst_write_payload_allocation_table
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rsi), %rbx
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	movq	8(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.2:
	cmpl	$0, (%r12)
	je	LBB0_10
## %bb.3:
	movq	%rdx, %r14
	movq	(%rbx), %rax
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.4:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movslq	(%rsi), %rax
	imulq	$1717986919, %rax, %r13         ## imm = 0x66666667
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$34, %r13
	addl	%eax, %r13d
	movl	4(%rsi), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	jae	LBB0_5
## %bb.6:
	cltq
	leaq	l_switch.table.dm_helpers_dp_mst_write_payload_allocation_table(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	jmp	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_drm_dp_mst_reset_vcpi_slots
	jmp	LBB0_9
LBB0_5:
	xorl	%edi, %edi
	callq	_ASSERT
	xorl	%esi, %esi
LBB0_7:
	movl	%r13d, %edi
	callq	_drm_dp_calc_pbn_mode
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_drm_dp_find_vcpi_slots
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_drm_dp_mst_allocate_vcpi
	testl	%eax, %eax
	je	LBB0_10
LBB0_9:
	movq	%r12, %rdi
	callq	_drm_dp_update_payload_part1
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_payload_table
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	sete	%r15b
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.dm_helpers_dp_mst_write_payload_allocation_table
l_switch.table.dm_helpers_dp_mst_write_payload_allocation_table:
	.long	24                              ## 0x18
	.long	18                              ## 0x12
	.long	48                              ## 0x30
	.long	42                              ## 0x2a
	.long	36                              ## 0x24
	.long	30                              ## 0x1e

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_helpers_dp_mst_write_payload_allocation_table ; -- Begin function dm_helpers_dp_mst_write_payload_allocation_table
	.p2align	2
_dm_helpers_dp_mst_write_payload_allocation_table: ; @dm_helpers_dp_mst_write_payload_allocation_table
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x1, #8]
	cbz	x20, LBB0_6
; %bb.1:
	ldr	x21, [x20, #8]
	cbz	x21, LBB0_6
; %bb.2:
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.3:
	mov	x19, x2
	ldr	x22, [x20]
	cbz	w3, LBB0_7
; %bb.4:
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	ldp	w9, w10, [x1]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	mul	x8, x9, x8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w23, w8, w9
	sub	w8, w10, #128
	cmp	w8, #6
	b.hs	LBB0_8
; %bb.5:
Lloh0:
	adrp	x9, l_switch.table.dm_helpers_dp_mst_write_payload_allocation_table@PAGE
Lloh1:
	add	x9, x9, l_switch.table.dm_helpers_dp_mst_write_payload_allocation_table@PAGEOFF
	ldr	w1, [x9, w8, sxtw #2]
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	b	LBB0_11
LBB0_7:
	mov	x0, x21
	mov	x1, x22
	bl	_drm_dp_mst_reset_vcpi_slots
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	bl	_ASSERT
	mov	w1, #0
LBB0_9:
	mov	x0, x23
	bl	_drm_dp_calc_pbn_mode
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	bl	_drm_dp_find_vcpi_slots
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_drm_dp_mst_allocate_vcpi
	cbz	w0, LBB0_11
LBB0_10:
	mov	x0, x21
	bl	_drm_dp_update_payload_part1
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_get_payload_table
	cmp	w21, #0
	cset	w0, eq
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.dm_helpers_dp_mst_write_payload_allocation_table
l_switch.table.dm_helpers_dp_mst_write_payload_allocation_table:
	.long	24                              ; 0x18
	.long	18                              ; 0x12
	.long	48                              ; 0x30
	.long	42                              ; 0x2a
	.long	36                              ; 0x24
	.long	30                              ; 0x1e

.subsections_via_symbols
