	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_smp_assign                ## -- Begin function mdp5_smp_assign
	.p2align	4, 0x90
_mdp5_smp_assign:                       ## @mdp5_smp_assign
	.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
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_get_kms
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_pipe2nclients
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	%r13d, %edi
	callq	_pipe2nclients
	cmpl	%eax, %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_pipe2client
	movl	%r14d, %r15d
	andl	$255, %r15d
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_pipe2name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_DBG
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_smp_request_block
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	sarl	$8, %r14d
	jmp	LBB0_5
LBB0_6:
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_8:
	movl	%eax, %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_DRM_DEV_ERROR
LBB0_7:
	movl	%r12d, %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	"%s[%d]: request %d SMP blocks"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot allocate %d SMP blocks: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_smp_assign                ; -- Begin function mdp5_smp_assign
	.p2align	2
_mdp5_smp_assign:                       ; @mdp5_smp_assign
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	bl	_get_kms
	ldr	x27, [x0]
	mov	x0, x20
	bl	_pipe2nclients
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w23, #0
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	mov	x0, x20
	bl	_pipe2nclients
	cmp	w23, w0
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_pipe2client
	ands	w25, w21, #0xff
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	mov	x0, x20
	bl	_pipe2name
	mov	x1, x0
	mov	x0, x24
	mov	x2, x23
	mov	x3, x25
	bl	_DBG
	mov	x0, x22
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	bl	_smp_request_block
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	asr	w21, w21, #8
	b	LBB0_2
LBB0_6:
	mov	w26, #0
	mov	w8, #1
	lsl	w8, w8, w20
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_8
LBB0_7:
	mov	x26, x0
	ldr	w0, [x27]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x25
	mov	x3, x26
	bl	_DRM_DEV_ERROR
LBB0_8:
	mov	x0, x26
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s[%d]: request %d SMP blocks"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot allocate %d SMP blocks: %d\n"

.subsections_via_symbols
