	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_config_clkout            ## -- Begin function prcmu_config_clkout
	.p2align	4, 0x90
_prcmu_config_clkout:                   ## @prcmu_config_clkout
	.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
	movl	%edx, %r14d
	movl	%esi, %r12d
	movl	%edi, %ebx
	xorl	%edi, %edi
	cmpl	$2, %ebx
	setge	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$64, %r14d
	setge	%dil
	callq	_BUG_ON
	testl	%ebx, %ebx
	sete	%al
	movq	_PRCMU_CLKSRC_CLK009@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	setl	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_BUG_ON
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.1:
	movslq	%ebx, %rax
	leaq	_prcmu_config_clkout.requests(%rip), %rcx
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_2
LBB0_3:
	testl	%ebx, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_4
## %bb.5:
	movq	_PRCM_CLKOCR_CLKODIV1_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_PRCM_CLKOCR_CLKOSEL1_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%r13d, %eax
	movq	_PRCM_CLKOCR_CLK1TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_PRCM_CLKOCR_CLKODIV1_SHIFT@GOTPCREL(%rip), %rdx
	movq	_PRCM_CLKOCR_CLKOSEL1_SHIFT@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_PRCM_CLKOCR_CLKODIV0_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_PRCM_CLKOCR_CLKOSEL0_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PRCM_CLKOCR_CLKODIV0_SHIFT@GOTPCREL(%rip), %rdx
	movq	_PRCM_CLKOCR_CLKOSEL0_SHIFT@GOTPCREL(%rip), %rcx
	movl	%ebx, %r13d
LBB0_6:
	movb	(%rcx), %cl
	shll	%cl, %r12d
	movb	(%rdx), %cl
	movl	%r14d, %r15d
	shll	%cl, %r15d
	orl	%eax, %ebx
	orl	%r12d, %r15d
	andl	%ebx, %r15d
	movq	_clkout_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_PRCM_CLKOCR@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_readl
	testl	%r13d, %eax
	je	LBB0_13
## %bb.7:
	movl	%eax, %ecx
	andl	%ebx, %ecx
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.8:
	cmpl	%r15d, %ecx
	je	LBB0_13
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_11:
	notl	%r13d
	andl	%r13d, %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_12
LBB0_13:
	notl	%ebx
	andl	%ebx, %eax
	orl	%r15d, %eax
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_writel
	xorl	%ebx, %ebx
	cmpl	$1, %r14d
	movl	$0, %eax
	sbbl	%eax, %eax
	orl	$1, %eax
	movslq	-44(%rbp), %rcx                 ## 4-byte Folded Reload
	leaq	_prcmu_config_clkout.requests(%rip), %rdx
	addl	%eax, (%rdx,%rcx,4)
	jmp	LBB0_14
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	_clkout_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_prcmu_config_clkout.requests,8,2 ## @prcmu_config_clkout.requests
	.comm	_PRCMU_CLKSRC_CLK009,4,2        ## @PRCMU_CLKSRC_CLK009
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PRCM_CLKOCR_CLKODIV0_MASK,4,2  ## @PRCM_CLKOCR_CLKODIV0_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL0_MASK,4,2  ## @PRCM_CLKOCR_CLKOSEL0_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL0_SHIFT,4,2 ## @PRCM_CLKOCR_CLKOSEL0_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV0_SHIFT,4,2 ## @PRCM_CLKOCR_CLKODIV0_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV1_MASK,4,2  ## @PRCM_CLKOCR_CLKODIV1_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL1_MASK,4,2  ## @PRCM_CLKOCR_CLKOSEL1_MASK
	.comm	_PRCM_CLKOCR_CLK1TYPE,4,2       ## @PRCM_CLKOCR_CLK1TYPE
	.comm	_PRCM_CLKOCR_CLKOSEL1_SHIFT,4,2 ## @PRCM_CLKOCR_CLKOSEL1_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV1_SHIFT,4,2 ## @PRCM_CLKOCR_CLKODIV1_SHIFT
	.comm	_clkout_lock,4,2                ## @clkout_lock
	.comm	_PRCM_CLKOCR,4,2                ## @PRCM_CLKOCR
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prcmu_config_clkout            ; -- Begin function prcmu_config_clkout
	.p2align	2
_prcmu_config_clkout:                   ; @prcmu_config_clkout
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cmp	w0, #1
	cset	w0, gt
	bl	_BUG_ON
	cmp	w19, #63
	cset	w0, gt
	bl	_BUG_ON
	cmp	w20, #0
Lloh0:
	adrp	x8, _PRCMU_CLKSRC_CLK009@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRCMU_CLKSRC_CLK009@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w21, #0, eq
	cset	w0, lt
	bl	_BUG_ON
	cbnz	w19, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _prcmu_config_clkout.requests@PAGE
Lloh4:
	add	x8, x8, _prcmu_config_clkout.requests@PAGEOFF
	ldr	w8, [x8, w20, sxtw #2]
	cbz	w8, LBB0_11
LBB0_2:
	cbz	w20, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _PRCM_CLKOCR_CLKODIV1_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PRCM_CLKOCR_CLKODIV1_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
Lloh8:
	adrp	x8, _PRCM_CLK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r	w8, w9, w8
	and	w21, w23, w8
Lloh28:
	adrp	x0, _clkout_lock@GOTPAGE
Lloh29:
	ldr	x0, [x0, _clkout_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh30:
	adrp	x24, _PRCM_CLKOCR@GOTPAGE
Lloh31:
	ldr	x24, [x24, _PRCM_CLKOCR@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_readl
	tst	w0, w22
	b.eq	LBB0_10
; %bb.6:
	and	w8, w0, w23
	cbz	w19, LBB0_9
; %bb.7:
	cmp	w8, w21
	b.eq	LBB0_10
; %bb.8:
Lloh32:
	adrp	x8, _EBUSY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	bic	w8, w8, w22
	cmp	w8, w21
	b.ne	LBB0_12
LBB0_10:
	bic	w8, w0, w23
	orr	w0, w8, w21
	ldr	w1, [x24]
	bl	_writel
	mov	w21, #0
	sbfiz	x8, x20, #2, #32
Lloh34:
	adrp	x9, _prcmu_config_clkout.requests@PAGE
Lloh35:
	add	x9, x9, _prcmu_config_clkout.requests@PAGEOFF
	ldr	w10, [x9, x8]
	sub	w11, w10, #1
	cmp	w19, #0
	csinc	w10, w11, w10, eq
	str	w10, [x9, x8]
	b	LBB0_14
LBB0_11:
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_12:
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_14:
Lloh41:
	adrp	x0, _clkout_lock@GOTPAGE
Lloh42:
	ldr	x0, [x0, _clkout_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
LBB0_15:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_prcmu_config_clkout.requests,8,2 ; @prcmu_config_clkout.requests
	.comm	_PRCMU_CLKSRC_CLK009,4,2        ; @PRCMU_CLKSRC_CLK009
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PRCM_CLKOCR_CLKODIV0_MASK,4,2  ; @PRCM_CLKOCR_CLKODIV0_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL0_MASK,4,2  ; @PRCM_CLKOCR_CLKOSEL0_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL0_SHIFT,4,2 ; @PRCM_CLKOCR_CLKOSEL0_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV0_SHIFT,4,2 ; @PRCM_CLKOCR_CLKODIV0_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV1_MASK,4,2  ; @PRCM_CLKOCR_CLKODIV1_MASK
	.comm	_PRCM_CLKOCR_CLKOSEL1_MASK,4,2  ; @PRCM_CLKOCR_CLKOSEL1_MASK
	.comm	_PRCM_CLKOCR_CLK1TYPE,4,2       ; @PRCM_CLKOCR_CLK1TYPE
	.comm	_PRCM_CLKOCR_CLKOSEL1_SHIFT,4,2 ; @PRCM_CLKOCR_CLKOSEL1_SHIFT
	.comm	_PRCM_CLKOCR_CLKODIV1_SHIFT,4,2 ; @PRCM_CLKOCR_CLKODIV1_SHIFT
	.comm	_clkout_lock,4,2                ; @clkout_lock
	.comm	_PRCM_CLKOCR,4,2                ; @PRCM_CLKOCR
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
