	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resource_map_clock_resources   ## -- Begin function resource_map_clock_resources
	.p2align	4, 0x90
_resource_map_clock_resources:          ## @resource_map_clock_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	callq	_resource_get_head_pipe_for_stream
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	(%rax), %rdi
	callq	_dc_is_dp_signal
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_SIGNAL_TYPE_VIRTUAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	movq	(%r14), %rdx
	movq	%rdx, (%rbx)
	testq	%rdx, %rdx
	je	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_resource_reference_clock_source
	movq	_DC_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_DC_ERROR_UNEXPECTED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	$0, (%rbx)
	cmpl	$0, (%r12)
	je	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_dc_resource_find_first_free_pll
	movq	%rax, %rdx
	movq	%rax, (%rbx)
	testq	%rdx, %rdx
	jne	LBB0_10
LBB0_9:
	movq	_DC_NO_CLOCK_SOURCE_RESOURCE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_resource_find_used_clk_src_for_sharing
	movq	%rax, %rdx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_ERROR_UNEXPECTED,4,2        ## @DC_ERROR_UNEXPECTED
	.comm	_SIGNAL_TYPE_VIRTUAL,8,3        ## @SIGNAL_TYPE_VIRTUAL
	.comm	_DC_NO_CLOCK_SOURCE_RESOURCE,4,2 ## @DC_NO_CLOCK_SOURCE_RESOURCE
	.comm	_DC_OK,4,2                      ## @DC_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resource_map_clock_resources   ; -- Begin function resource_map_clock_resources
	.p2align	2
_resource_map_clock_resources:          ; @resource_map_clock_resources
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x22, x0
	ldr	x20, [x0, #8]
	mov	x0, x1
	mov	x1, x2
	bl	_resource_get_head_pipe_for_stream
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	bl	_dc_is_dp_signal
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SIGNAL_TYPE_VIRTUAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIGNAL_TYPE_VIRTUAL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
LBB0_3:
	ldr	x2, [x20]
	str	x2, [x21]
	cbz	x2, LBB0_8
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_resource_reference_clock_source
Lloh3:
	adrp	x8, _DC_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DC_OK@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _DC_ERROR_UNEXPECTED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DC_ERROR_UNEXPECTED@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	str	xzr, [x21]
	ldr	w8, [x22]
	cbz	w8, LBB0_10
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_dc_resource_find_first_free_pll
	mov	x2, x0
	str	x0, [x21]
	cbnz	x2, LBB0_4
LBB0_8:
Lloh7:
	adrp	x8, _DC_NO_CLOCK_SOURCE_RESOURCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DC_NO_CLOCK_SOURCE_RESOURCE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_resource_find_used_clk_src_for_sharing
	mov	x2, x0
	str	x0, [x21]
	cbnz	x0, LBB0_4
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_ERROR_UNEXPECTED,4,2        ; @DC_ERROR_UNEXPECTED
	.comm	_SIGNAL_TYPE_VIRTUAL,8,3        ; @SIGNAL_TYPE_VIRTUAL
	.comm	_DC_NO_CLOCK_SOURCE_RESOURCE,4,2 ; @DC_NO_CLOCK_SOURCE_RESOURCE
	.comm	_DC_OK,4,2                      ; @DC_OK
.subsections_via_symbols
