	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_mst_assign_payload_id
_drm_dp_mst_assign_payload_id:          ## @drm_dp_mst_assign_payload_id
	.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	%rsi, %r15
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	20(%rbx), %r13
	movl	(%rbx), %esi
	incl	%esi
	movq	%r13, %rdi
	callq	_find_first_zero_bit
	movl	(%rbx), %esi
	cmpl	%esi, %eax
	jle	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movl	%eax, %r12d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %rdi
	incl	%esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_find_first_zero_bit
	cmpl	(%rbx), %eax
	jle	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	movl	%r12d, %esi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r15d
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_set_bit
	movl	%r15d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_set_bit
	incl	%r15d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, (%rdx)
	movq	8(%rbx), %rax
	movslq	%r12d, %rcx
	movq	%rdx, -8(%rax,%rcx,8)
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of payload ids %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"out of vcpi ids %d\n"

	.no_dead_strip	_drm_dp_mst_assign_payload_id
.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_assign_payload_id
_drm_dp_mst_assign_payload_id:          ; @drm_dp_mst_assign_payload_id
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x22, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x23, x22, #20
	ldr	w8, [x22]
	add	w1, w8, #1
	mov	x0, x23
	bl	_find_first_zero_bit
	ldr	w8, [x22]
	cmp	w0, w8
	b.le	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x20, x0
	add	x24, x22, #16
	add	w1, w8, #1
	mov	x0, x24
	bl	_find_first_zero_bit
	ldr	w8, [x22]
	cmp	w0, w8
	b.le	LBB0_5
; %bb.3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	mov	x1, x20
	bl	_DRM_DEBUG_KMS
	b	LBB0_6
LBB0_5:
	mov	x25, x0
	mov	x0, x20
	mov	x1, x23
	bl	_set_bit
	mov	x0, x25
	mov	x1, x24
	bl	_set_bit
	add	w8, w25, #1
	str	w8, [x21]
	ldr	x8, [x22, #8]
	sub	w9, w20, #1
	str	x21, [x8, w9, sxtw #3]
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of payload ids %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"out of vcpi ids %d\n"

	.no_dead_strip	_drm_dp_mst_assign_payload_id
.subsections_via_symbols
