	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rj54n1_set_clock
_rj54n1_set_clock:                      ## @rj54n1_set_clock
	.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
	movq	%rdi, %r15
	callq	_to_rj54n1
	movq	%rax, %r14
	movq	_RJ54N1_RESET_STANDBY@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_E_EXCLK@GOTPCREL(%rip), %r12
	movq	_SOFT_STDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.2:
	movq	_RJ54N1_PLL_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PLL_L@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movq	_RJ54N1_PLL_N@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PLL_N@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	_RJ54N1_RATIO_TG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movq	_RJ54N1_RATIO_T@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	_RJ54N1_RATIO_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	_RJ54N1_RAMP_TGCLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	_RJ54N1_OCLK_DSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	_RJ54N1_RATIO_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	_RJ54N1_RATIO_O@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	movq	_RJ54N1_OCLK_SEL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	_RJ54N1_TG_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movl	(%r13), %esi
	movq	_SEN_RSTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_15
LBB0_14:
	movl	$10, %edi
	callq	_msleep
LBB0_18:
	cmpl	$1, %ebx
	jne	LBB0_19
## %bb.20:
	movq	_RJ54N1_OCLK_DSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_reg_set
	testl	%eax, %eax
	jne	LBB0_21
## %bb.22:
	movq	_RJ54N1_OCLK_SEL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reg_write                      ## TAILCALL
LBB0_19:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_RJ54N1_PLL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_reg_write
	movl	%eax, %ebx
	movl	$10, %edi
	callq	_msleep
	testl	%ebx, %ebx
	jne	LBB0_18
## %bb.16:
	movq	_RJ54N1_CLK_RST@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_RJ54N1_RESET_STANDBY,4,2       ## @RJ54N1_RESET_STANDBY
	.comm	_E_EXCLK,4,2                    ## @E_EXCLK
	.comm	_SOFT_STDBY,4,2                 ## @SOFT_STDBY
	.comm	_RJ54N1_PLL_L,4,2               ## @RJ54N1_PLL_L
	.comm	_PLL_L,4,2                      ## @PLL_L
	.comm	_RJ54N1_PLL_N,4,2               ## @RJ54N1_PLL_N
	.comm	_PLL_N,4,2                      ## @PLL_N
	.comm	_RJ54N1_RATIO_TG,4,2            ## @RJ54N1_RATIO_TG
	.comm	_RJ54N1_RATIO_T,4,2             ## @RJ54N1_RATIO_T
	.comm	_RJ54N1_RATIO_R,4,2             ## @RJ54N1_RATIO_R
	.comm	_RJ54N1_RAMP_TGCLK_EN,4,2       ## @RJ54N1_RAMP_TGCLK_EN
	.comm	_RJ54N1_OCLK_DSP,4,2            ## @RJ54N1_OCLK_DSP
	.comm	_RJ54N1_RATIO_OP,4,2            ## @RJ54N1_RATIO_OP
	.comm	_RJ54N1_RATIO_O,4,2             ## @RJ54N1_RATIO_O
	.comm	_RJ54N1_OCLK_SEL_EN,4,2         ## @RJ54N1_OCLK_SEL_EN
	.comm	_RJ54N1_TG_BYPASS,4,2           ## @RJ54N1_TG_BYPASS
	.comm	_SEN_RSTX,4,2                   ## @SEN_RSTX
	.comm	_RJ54N1_PLL_EN,4,2              ## @RJ54N1_PLL_EN
	.comm	_RJ54N1_CLK_RST,4,2             ## @RJ54N1_CLK_RST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Resetting RJ54N1CB0C clock failed: %d!\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_rj54n1_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rj54n1_set_clock
_rj54n1_set_clock:                      ; @rj54n1_set_clock
	.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, x0
	bl	_to_rj54n1
	mov	x20, x0
Lloh0:
	adrp	x22, _RJ54N1_RESET_STANDBY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RJ54N1_RESET_STANDBY@GOTPAGEOFF]
Lloh2:
	adrp	x23, _E_EXCLK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _E_EXCLK@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w8, [x23]
Lloh4:
	adrp	x9, _SOFT_STDBY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SOFT_STDBY@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.2:
Lloh7:
	adrp	x8, _RJ54N1_PLL_L@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RJ54N1_PLL_L@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _PLL_L@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PLL_L@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.3:
Lloh13:
	adrp	x8, _RJ54N1_PLL_N@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RJ54N1_PLL_N@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _PLL_N@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PLL_N@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.4:
Lloh19:
	adrp	x8, _RJ54N1_RATIO_TG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RJ54N1_RATIO_TG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.5:
Lloh22:
	adrp	x8, _RJ54N1_RATIO_T@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RJ54N1_RATIO_T@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.6:
Lloh25:
	adrp	x8, _RJ54N1_RATIO_R@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RJ54N1_RATIO_R@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.7:
Lloh28:
	adrp	x8, _RJ54N1_RAMP_TGCLK_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RJ54N1_RAMP_TGCLK_EN@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.8:
Lloh31:
	adrp	x8, _RJ54N1_OCLK_DSP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RJ54N1_OCLK_DSP@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.9:
Lloh34:
	adrp	x8, _RJ54N1_RATIO_OP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RJ54N1_RATIO_OP@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.10:
Lloh37:
	adrp	x8, _RJ54N1_RATIO_O@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RJ54N1_RATIO_O@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.11:
Lloh40:
	adrp	x8, _RJ54N1_OCLK_SEL_EN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RJ54N1_OCLK_SEL_EN@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.12:
Lloh43:
	adrp	x8, _RJ54N1_TG_BYPASS@GOTPAGE
Lloh44:
	ldr	x8, [x8, _RJ54N1_TG_BYPASS@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	w1, [x22]
	ldr	w8, [x23]
Lloh46:
	adrp	x9, _SEN_RSTX@GOTPAGE
Lloh47:
	ldr	x9, [x9, _SEN_RSTX@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbz	w0, LBB0_20
LBB0_14:
	mov	w0, #10
	bl	_msleep
LBB0_15:
	cmp	w21, #1
	b.ne	LBB0_18
; %bb.16:
Lloh49:
	adrp	x8, _RJ54N1_OCLK_DSP@GOTPAGE
Lloh50:
	ldr	x8, [x8, _RJ54N1_OCLK_DSP@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	bl	_reg_set
	cbnz	w0, LBB0_19
; %bb.17:
Lloh52:
	adrp	x8, _RJ54N1_OCLK_SEL_EN@GOTPAGE
Lloh53:
	ldr	x8, [x8, _RJ54N1_OCLK_SEL_EN@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	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
	b	_reg_write
LBB0_18:
Lloh55:
	adrp	x1, l_.str@PAGE
Lloh56:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
Lloh57:
	adrp	x8, _EIO@GOTPAGE
Lloh58:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	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
LBB0_20:
Lloh60:
	adrp	x8, _RJ54N1_PLL_EN@GOTPAGE
Lloh61:
	ldr	x8, [x8, _RJ54N1_PLL_EN@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_reg_write
	mov	x21, x0
	mov	w0, #10
	bl	_msleep
	cbnz	w21, LBB0_15
; %bb.21:
Lloh63:
	adrp	x20, _RJ54N1_CLK_RST@GOTPAGE
Lloh64:
	ldr	x20, [x20, _RJ54N1_CLK_RST@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.22:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	mov	x21, x0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_RJ54N1_RESET_STANDBY,4,2       ; @RJ54N1_RESET_STANDBY
	.comm	_E_EXCLK,4,2                    ; @E_EXCLK
	.comm	_SOFT_STDBY,4,2                 ; @SOFT_STDBY
	.comm	_RJ54N1_PLL_L,4,2               ; @RJ54N1_PLL_L
	.comm	_PLL_L,4,2                      ; @PLL_L
	.comm	_RJ54N1_PLL_N,4,2               ; @RJ54N1_PLL_N
	.comm	_PLL_N,4,2                      ; @PLL_N
	.comm	_RJ54N1_RATIO_TG,4,2            ; @RJ54N1_RATIO_TG
	.comm	_RJ54N1_RATIO_T,4,2             ; @RJ54N1_RATIO_T
	.comm	_RJ54N1_RATIO_R,4,2             ; @RJ54N1_RATIO_R
	.comm	_RJ54N1_RAMP_TGCLK_EN,4,2       ; @RJ54N1_RAMP_TGCLK_EN
	.comm	_RJ54N1_OCLK_DSP,4,2            ; @RJ54N1_OCLK_DSP
	.comm	_RJ54N1_RATIO_OP,4,2            ; @RJ54N1_RATIO_OP
	.comm	_RJ54N1_RATIO_O,4,2             ; @RJ54N1_RATIO_O
	.comm	_RJ54N1_OCLK_SEL_EN,4,2         ; @RJ54N1_OCLK_SEL_EN
	.comm	_RJ54N1_TG_BYPASS,4,2           ; @RJ54N1_TG_BYPASS
	.comm	_SEN_RSTX,4,2                   ; @SEN_RSTX
	.comm	_RJ54N1_PLL_EN,4,2              ; @RJ54N1_PLL_EN
	.comm	_RJ54N1_CLK_RST,4,2             ; @RJ54N1_CLK_RST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Resetting RJ54N1CB0C clock failed: %d!\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_rj54n1_set_clock
.subsections_via_symbols
