	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt_tune2      ## -- Begin function cxd2880_tnrdmd_dvbt_tune2
	.p2align	4, 0x90
_cxd2880_tnrdmd_dvbt_tune2:             ## @cxd2880_tnrdmd_dvbt_tune2
	.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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_SUB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.4:
	movq	8(%rbx), %rax
	movq	_CXD2880_TNRDMD_STATE_SLEEP@GOTPCREL(%rip), %rcx
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %r15
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	cmpq	(%r15), %rax
	je	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_CXD2880_DTV_SYS_DVBT@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_cxd2880_tnrdmd_common_tune_setting2
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	(%r15), %r8
	movq	%r8, 8(%rbx)
	movl	4(%r14), %ecx
	movl	%ecx, 40(%rbx)
	movq	(%r12), %rdx
	movq	%rdx, 32(%rbx)
	movl	(%r14), %esi
	movl	%esi, 24(%rbx)
	movq	(%rbx), %rdi
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_9
## %bb.8:
	movq	16(%rbx), %rax
	movq	%r8, 24(%rax)
	movl	%ecx, 16(%rax)
	movq	%rdx, 8(%rax)
	movl	%esi, (%rax)
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.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_DTV_SYS_DVBT,8,3       ## @CXD2880_DTV_SYS_DVBT
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ## @CXD2880_TNRDMD_DIVERMODE_MAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt_tune2      ; -- Begin function cxd2880_tnrdmd_dvbt_tune2
	.p2align	2
_cxd2880_tnrdmd_dvbt_tune2:             ; @cxd2880_tnrdmd_dvbt_tune2
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_7
; %bb.2:
	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_7
; %bb.3:
	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	x21, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
	ldr	x10, [x21]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.4:
Lloh8:
	adrp	x22, _CXD2880_DTV_SYS_DVBT@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CXD2880_DTV_SYS_DVBT@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_cxd2880_tnrdmd_common_tune_setting2
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x21]
	str	x8, [x19, #8]
	ldp	w10, w9, [x20]
	str	w9, [x19, #40]
	ldr	x11, [x22]
	str	x11, [x19, #32]
	str	w10, [x19, #24]
	ldr	x12, [x19]
Lloh10:
	adrp	x13, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh11:
	ldr	x13, [x13, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
Lloh12:
	ldr	x13, [x13]
	cmp	x12, x13
	b.ne	LBB0_9
; %bb.6:
	mov	w0, #0
	ldr	x12, [x19, #16]
	str	x8, [x12, #24]
	str	w9, [x12, #16]
	str	x11, [x12, #8]
	str	w10, [x12]
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.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_DTV_SYS_DVBT,8,3       ; @CXD2880_DTV_SYS_DVBT
	.comm	_CXD2880_TNRDMD_DIVERMODE_MAIN,8,3 ; @CXD2880_TNRDMD_DIVERMODE_MAIN
.subsections_via_symbols
