	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resource_map_pool_resources    ## -- Begin function resource_map_pool_resources
	.p2align	4, 0x90
_resource_map_pool_resources:           ## @resource_map_pool_resources
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	(%rdi), %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movq	%rdx, %rdi
	callq	_calculate_phy_pix_clks
	cmpq	$0, 8(%r13)
	je	LBB0_4
## %bb.1:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	32(%r12), %esi
	leaq	28(%r12), %rdx
	movq	%r13, %rdi
	callq	_dc_validate_seamless_boot_timing
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$1, (%r12)
LBB0_4:
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.5:
	leaq	24(%r14), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_acquire_resource_from_hw_enabled_state
	testl	%eax, %eax
	jns	LBB0_7
LBB0_6:
	leaq	24(%r14), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_acquire_first_free_pipe
	testl	%eax, %eax
	js	LBB0_19
LBB0_7:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r14), %rbx
	movl	%eax, %eax
	leaq	(%rax,%rax,4), %r15
	cmpq	$0, 16(%rbx,%r15,8)
	je	LBB0_19
## %bb.8:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	addq	$24, %r14
	movq	(%r13), %rax
	movq	8(%rax), %rax
	movq	%r14, %rdi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	*(%rax)
	movq	%rax, 8(%rbx,%r15,8)
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	leaq	(%rbx,%r15,8), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movl	$1, %ecx
	callq	_update_stream_engine_usage
	cmpl	$0, 24(%r12)
	je	LBB0_21
LBB0_10:
	movq	32(%rbx,%r15,8), %rax
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
## %bb.11:
	movl	(%rax), %edi
	callq	_dc_is_embedded_signal
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 24(%rbx,%r15,8)
LBB0_13:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.14:
	leaq	(%rbx,%r15,8), %rcx
	addq	$16, %rcx
	movq	16(%r14), %rdx
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, (%rdx)
	je	LBB0_26
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	addq	$12, %rax
	addq	$8, %rdx
	cmpq	%rax, %rsi
	jne	LBB0_15
LBB0_17:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_DC_ERROR
	movq	_DC_ERROR_UNEXPECTED@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_19:
	movq	_DC_NO_CONTROLLER_RESOURCE@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_20:
	movq	_DC_NO_STREAM_ENC_RESOURCE@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_21:
	movq	32(%rbx,%r15,8), %rax
	movl	(%rax), %edi
	callq	_dc_is_audio_capable_signal
	testq	%rax, %rax
	je	LBB0_10
## %bb.22:
	cmpq	$0, 16(%r12)
	je	LBB0_10
## %bb.23:
	cmpq	$0, 8(%r12)
	je	LBB0_10
## %bb.24:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_find_first_free_audio
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.25:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rdx
	movl	$1, %ecx
	callq	_update_audio_usage
	jmp	LBB0_10
LBB0_26:
	movq	(%rcx), %rcx
	movl	(%rcx), %edx
	movq	8(%r14), %rcx
	movl	%edx, 8(%rcx,%rax)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rdx
	movl	(%rdx), %edx
	movl	%edx, 4(%rcx,%rax)
	movq	(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_28
## %bb.27:
	movl	(%rdx), %edx
	jmp	LBB0_29
LBB0_28:
	movl	$-1, %edx
LBB0_29:
	movl	%edx, (%rcx,%rax)
	movq	_DC_OK@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_NO_CONTROLLER_RESOURCE,4,2  ## @DC_NO_CONTROLLER_RESOURCE
	.comm	_DC_NO_STREAM_ENC_RESOURCE,4,2  ## @DC_NO_STREAM_ENC_RESOURCE
	.comm	_DC_OK,4,2                      ## @DC_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stream %p not found in new ctx!\n"

	.comm	_DC_ERROR_UNEXPECTED,4,2        ## @DC_ERROR_UNEXPECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resource_map_pool_resources    ; -- Begin function resource_map_pool_resources
	.p2align	2
_resource_map_pool_resources:           ; @resource_map_pool_resources
	.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	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x21, [x0]
	ldr	x8, [x0, #16]
	ldr	x23, [x8]
	mov	x0, x2
	bl	_calculate_phy_pix_clks
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x23]
	ldr	x8, [x8]
	mov	x0, x23
	blr	x8
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w1, [x19, #32]
	add	x2, x19, #28
	mov	x0, x22
	bl	_dc_validate_seamless_boot_timing
	cbz	x0, LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.5:
	add	x0, x20, #24
	mov	x1, x21
	mov	x2, x19
	bl	_acquire_resource_from_hw_enabled_state
	tbz	w0, #31, LBB0_7
LBB0_6:
	add	x0, x20, #24
	mov	x1, x21
	mov	x2, x19
	bl	_acquire_first_free_pipe
	tbnz	w0, #31, LBB0_18
LBB0_7:
	mov	x23, x20
	ldr	x26, [x23, #24]!
	mov	w8, #40
	umaddl	x24, w0, w8, x26
	mov	x25, x24
	ldr	x8, [x25, #16]!
	cbz	x8, LBB0_18
; %bb.8:
	mov	w27, w0
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	blr	x8
	mov	w8, #40
	madd	x22, x27, x8, x26
	str	x0, [x22, #8]!
	cbz	x0, LBB0_19
; %bb.9:
	mov	x2, x0
	mov	x0, x23
	mov	x1, x21
	mov	w3, #1
	bl	_update_stream_engine_usage
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_20
LBB0_10:
	mov	w8, #40
	madd	x8, x27, x8, x26
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w0, [x8]
	bl	_dc_is_embedded_signal
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w8, [x21]
	mov	w9, #40
	madd	x9, x27, x9, x26
	str	w8, [x9, #24]
LBB0_13:
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_17
; %bb.14:
	mov	x8, #0
	ldr	x9, [x20, #16]
	add	x10, x10, x10, lsl #1
	lsl	x10, x10, #2
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cmp	x11, x19
	b.eq	LBB0_25
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x8, x8, #12
	add	x9, x9, #8
	cmp	x10, x8
	b.ne	LBB0_15
LBB0_17:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DC_ERROR
Lloh2:
	adrp	x8, _DC_ERROR_UNEXPECTED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DC_ERROR_UNEXPECTED@GOTPAGEOFF]
	b	LBB0_29
LBB0_18:
Lloh4:
	adrp	x8, _DC_NO_CONTROLLER_RESOURCE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DC_NO_CONTROLLER_RESOURCE@GOTPAGEOFF]
	b	LBB0_29
LBB0_19:
Lloh6:
	adrp	x8, _DC_NO_STREAM_ENC_RESOURCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DC_NO_STREAM_ENC_RESOURCE@GOTPAGEOFF]
	b	LBB0_29
LBB0_20:
	mov	w8, #40
	madd	x8, x27, x8, x26
	ldr	x8, [x8, #32]
	ldr	w0, [x8]
	bl	_dc_is_audio_capable_signal
	cbz	x0, LBB0_10
; %bb.21:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.22:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.23:
	ldr	x8, [x22]
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x21
	bl	_find_first_free_audio
	str	x0, [x24]
	cbz	x0, LBB0_10
; %bb.24:
	mov	x2, x0
	mov	x0, x23
	mov	x1, x21
	mov	w3, #1
	bl	_update_audio_usage
	b	LBB0_10
LBB0_25:
	ldr	x9, [x25]
	ldr	w10, [x9]
	ldr	x9, [x20, #8]
	add	x11, x9, x8
	ldr	x12, [x22]
	ldr	w12, [x12]
	stp	w12, w10, [x11, #4]
	ldr	x10, [x24]
	cbz	x10, LBB0_27
; %bb.26:
	ldr	w10, [x10]
	b	LBB0_28
LBB0_27:
	mov	w10, #-1
LBB0_28:
	str	w10, [x9, x8]
Lloh8:
	adrp	x8, _DC_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DC_OK@GOTPAGEOFF]
LBB0_29:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_NO_CONTROLLER_RESOURCE,4,2  ; @DC_NO_CONTROLLER_RESOURCE
	.comm	_DC_NO_STREAM_ENC_RESOURCE,4,2  ; @DC_NO_STREAM_ENC_RESOURCE
	.comm	_DC_OK,4,2                      ; @DC_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stream %p not found in new ctx!\n"

	.comm	_DC_ERROR_UNEXPECTED,4,2        ; @DC_ERROR_UNEXPECTED
.subsections_via_symbols
