	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_common_tune_setting1 ## -- Begin function cxd2880_tnrdmd_common_tune_setting1
	.p2align	4, 0x90
_cxd2880_tnrdmd_common_tune_setting1:   ## @cxd2880_tnrdmd_common_tune_setting1
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_SUB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.3:
	movl	%r9d, %r13d
	movl	%r8d, %r14d
	movl	%edx, %r12d
	movq	_CXD2880_TNRDMD_CLOCKMODE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%rbx), %rax
	movq	_CXD2880_TNRDMD_STATE_SLEEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_5:
	cmpl	$3999, %r12d                    ## imm = 0xF9F
	jg	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_43:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_cxd2880_tnrdmd_sleep
	testl	%eax, %eax
	jne	LBB0_43
## %bb.7:
	movq	64(%rbx), %rdi
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_43
## %bb.8:
	movq	64(%rbx), %rdi
	movq	_CXD2880_IO_TGT_SYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rcx
	movl	$43, %edx
	movl	$1, %r8d
	callq	*8(%rdi)
	testl	%eax, %eax
	jne	LBB0_43
## %bb.9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$132, %eax
	je	LBB0_26
## %bb.10:
	cmpl	$133, %eax
	jne	LBB0_1
## %bb.11:
	cmpl	$0, -52(%rbp)
	jne	LBB0_16
## %bb.12:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_t_power_x
	testl	%eax, %eax
	jne	LBB0_43
## %bb.13:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.14:
	movq	48(%rbx), %rdi
	movl	$1, %esi
	jmp	LBB0_15
LBB0_26:
	cmpl	$1, -52(%rbp)
	jne	LBB0_16
## %bb.27:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_t_power_x
	testl	%eax, %eax
	jne	LBB0_43
## %bb.28:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.29:
	movq	48(%rbx), %rdi
	xorl	%esi, %esi
LBB0_15:
	callq	_t_power_x
	testl	%eax, %eax
	jne	LBB0_43
LBB0_16:
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_spll_reset
	testl	%eax, %eax
	jne	LBB0_43
## %bb.17:
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, 16(%rbx)
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.18:
	movq	48(%rbx), %rdi
	callq	_spll_reset
	testl	%eax, %eax
	jne	LBB0_43
## %bb.19:
	movq	48(%rbx), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 16(%rax)
LBB0_20:
	movq	%rbx, %rdi
	callq	_load_cfg_mem
	testl	%eax, %eax
	jne	LBB0_43
## %bb.21:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.22:
	movq	48(%rbx), %rdi
	callq	_load_cfg_mem
	testl	%eax, %eax
	jne	LBB0_43
LBB0_23:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%r14d, %r14d
	je	LBB0_30
## %bb.24:
	movl	$350, %r14d                     ## imm = 0x15E
	cmpq	%rcx, %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_32
## %bb.25:
	testl	%r13d, %r13d
	movl	$-350, %eax                     ## imm = 0xFEA2
	movl	$350, %ecx                      ## imm = 0x15E
	cmovel	%eax, %ecx
	movl	%ecx, %r14d
	negl	%r14d
	cmpl	$128, 32(%rbx)
	cmovnel	%ecx, %r14d
	jmp	LBB0_32
LBB0_30:
	movl	$150, %r14d
	cmpq	%rcx, %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_32
## %bb.31:
	movl	32(%rbx), %eax
	xorl	%ecx, %ecx
	cmpl	$130, %eax
	movl	$150, %edx
	cmovnel	%ecx, %edx
	cmpl	$128, %eax
	movl	$-150, %r14d
	cmovnel	%edx, %r14d
LBB0_32:
	movl	56(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r9d
	callq	_x_tune1
	testl	%eax, %eax
	jne	LBB0_43
## %bb.33:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_35
## %bb.34:
	movq	48(%rbx), %rdi
	movl	56(%rbx), %r8d
	movl	%r14d, %r9d
	negl	%r9d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_x_tune1
	testl	%eax, %eax
	jne	LBB0_43
LBB0_35:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_cxd2880_tnrdmd_check_internal_cpu_status
	testl	%eax, %eax
	jne	LBB0_43
## %bb.36:
	cmpl	$0, -56(%rbp)
	je	LBB0_1
## %bb.37:
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %ecx
	callq	_x_tune2
	testl	%eax, %eax
	jne	LBB0_43
## %bb.38:
	movq	(%rbx), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_40
## %bb.39:
	movq	48(%rbx), %rdi
	movl	16(%rdi), %edx
	negl	%r14d
	movl	%r15d, %esi
	movl	%r14d, %ecx
	callq	_x_tune2
	testl	%eax, %eax
	jne	LBB0_43
LBB0_40:
	movq	40(%rbx), %rax
	movq	_CXD2880_TNRDMD_TSOUT_IF_TS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_42
## %bb.41:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_set_ts_clk_mode_and_freq
	jmp	LBB0_43
LBB0_42:
	movq	24(%rbx), %rax
	leaq	20(%rbx), %rsi
	testq	%rax, %rax
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_pid_ftr_setting
	jmp	LBB0_43
	.cfi_endproc
                                        ## -- End function
	.comm	_CXD2880_TNRDMD_CLOCKMODE_A,4,2 ## @CXD2880_TNRDMD_CLOCKMODE_A
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_SUB,8,3 ## @CXD2880_TNRDMD_DIVERMODE_SUB
	.comm	_CXD2880_TNRDMD_STATE_SLEEP,8,3 ## @CXD2880_TNRDMD_STATE_SLEEP
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_IO_TGT_SYS,4,2         ## @CXD2880_IO_TGT_SYS
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ## @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_TNRDMD_TSOUT_IF_TS,8,3 ## @CXD2880_TNRDMD_TSOUT_IF_TS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_common_tune_setting1 ; -- Begin function cxd2880_tnrdmd_common_tune_setting1
	.p2align	2
_cxd2880_tnrdmd_common_tune_setting1:   ; @cxd2880_tnrdmd_common_tune_setting1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	x22, x2
	cmp	w2, #3999
	b.gt	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	mov	x23, x5
	mov	x24, x4
	mov	x21, x3
	mov	x20, x1
Lloh12:
	adrp	x8, _CXD2880_TNRDMD_CLOCKMODE_A@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CXD2880_TNRDMD_CLOCKMODE_A@GOTPAGEOFF]
Lloh14:
	ldr	w25, [x8]
	mov	x0, x19
	bl	_cxd2880_tnrdmd_sleep
	cbnz	w0, LBB0_5
; %bb.7:
	ldr	x0, [x19, #64]
	ldr	x8, [x0]
Lloh15:
	adrp	x26, _CXD2880_IO_TGT_SYS@GOTPAGE
Lloh16:
	ldr	x26, [x26, _CXD2880_IO_TGT_SYS@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	w2, #0
	mov	w3, #0
	blr	x8
	cbnz	w0, LBB0_5
; %bb.8:
	ldr	x0, [x19, #64]
	ldr	x8, [x0, #8]
	ldr	w1, [x26]
	add	x3, sp, #12
	mov	w2, #43
	mov	w4, #1
	blr	x8
	cbnz	w0, LBB0_5
; %bb.9:
	cmp	w20, #132
	b.eq	LBB0_15
; %bb.10:
	cmp	w20, #133
	b.ne	LBB0_4
; %bb.11:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_20
; %bb.12:
	mov	x0, x19
	mov	w1, #1
	bl	_t_power_x
	cbnz	w0, LBB0_5
; %bb.13:
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.14:
	ldr	x0, [x19, #48]
	mov	w1, #1
	b	LBB0_19
LBB0_15:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_20
; %bb.16:
	mov	x0, x19
	mov	w1, #0
	bl	_t_power_x
	cbnz	w0, LBB0_5
; %bb.17:
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.18:
	ldr	x0, [x19, #48]
	mov	w1, #0
LBB0_19:
	bl	_t_power_x
	cbnz	w0, LBB0_5
LBB0_20:
	mov	x0, x19
	mov	x1, x25
	bl	_spll_reset
	cbnz	w0, LBB0_5
; %bb.21:
	str	w25, [x19, #16]
	ldr	x8, [x19]
Lloh23:
	adrp	x26, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh24:
	ldr	x26, [x26, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.22:
	ldr	x0, [x19, #48]
	mov	x1, x25
	bl	_spll_reset
	cbnz	w0, LBB0_5
; %bb.23:
	ldr	x8, [x19, #48]
	str	w25, [x8, #16]
LBB0_24:
	mov	x0, x19
	bl	_load_cfg_mem
	cbnz	w0, LBB0_5
; %bb.25:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_27
; %bb.26:
	ldr	x0, [x19, #48]
	bl	_load_cfg_mem
	cbnz	w0, LBB0_5
LBB0_27:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cbz	w24, LBB0_30
; %bb.28:
	cmp	x8, x9
	b.ne	LBB0_32
; %bb.29:
	mov	w23, #350
	b	LBB0_33
LBB0_30:
	mov	w23, #150
	cmp	x8, x9
	b.eq	LBB0_33
; %bb.31:
	ldr	w8, [x19, #32]
	cmp	w8, #130
	csel	w9, w23, wzr, eq
	mov	w10, #-150
	cmp	w8, #128
	csel	w23, w10, w9, eq
	b	LBB0_33
LBB0_32:
	cmp	w23, #0
	mov	w8, #-350
	cneg	w8, w8, ne
	ldr	w9, [x19, #32]
	cmp	w9, #128
	cneg	w23, w8, eq
LBB0_33:
	ldr	w4, [x19, #56]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	mov	x5, x23
	bl	_x_tune1
	cbnz	w0, LBB0_5
; %bb.34:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.35:
	ldr	x0, [x19, #48]
	ldr	w4, [x19, #56]
	neg	w5, w23
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_x_tune1
	cbnz	w0, LBB0_5
LBB0_36:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	add	x1, sp, #8
	mov	x0, x19
	bl	_cxd2880_tnrdmd_check_internal_cpu_status
	cbnz	w0, LBB0_5
; %bb.37:
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_4
; %bb.38:
	ldr	w2, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x23
	bl	_x_tune2
	cbnz	w0, LBB0_5
; %bb.39:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_41
; %bb.40:
	ldr	x0, [x19, #48]
	ldr	w2, [x0, #16]
	neg	w3, w23
	mov	x1, x21
	bl	_x_tune2
	cbnz	w0, LBB0_5
LBB0_41:
	ldr	x8, [x19, #40]
Lloh25:
	adrp	x9, _CXD2880_TNRDMD_TSOUT_IF_TS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CXD2880_TNRDMD_TSOUT_IF_TS@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_43
; %bb.42:
	mov	x0, x19
	mov	x1, x20
	bl	_set_ts_clk_mode_and_freq
	b	LBB0_5
LBB0_43:
	ldr	x8, [x19, #24]
	add	x9, x19, #20
	cmp	x8, #0
	csel	x1, xzr, x9, eq
	mov	x0, x19
	bl	_pid_ftr_setting
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CXD2880_TNRDMD_CLOCKMODE_A,4,2 ; @CXD2880_TNRDMD_CLOCKMODE_A
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_SUB,8,3 ; @CXD2880_TNRDMD_DIVERMODE_SUB
	.comm	_CXD2880_TNRDMD_STATE_SLEEP,8,3 ; @CXD2880_TNRDMD_STATE_SLEEP
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_IO_TGT_SYS,4,2         ; @CXD2880_IO_TGT_SYS
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ; @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_TNRDMD_TSOUT_IF_TS,8,3 ; @CXD2880_TNRDMD_TSOUT_IF_TS
.subsections_via_symbols
