	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_tune1     ## -- Begin function cxd2880_tnrdmd_dvbt2_tune1
	.p2align	4, 0x90
_cxd2880_tnrdmd_dvbt2_tune1:            ## @cxd2880_tnrdmd_dvbt2_tune1
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -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.5:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_SUB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.6:
	movq	8(%rbx), %rcx
	movq	_CXD2880_TNRDMD_STATE_SLEEP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.7:
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_11
## %bb.9:
	movq	(%r14), %rax
	movq	_CXD2880_DVBT2_PROFILE_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_11:
	movq	_CXD2880_DTV_SYS_DVBT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %ecx
	movl	20(%r14), %edx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_cxd2880_tnrdmd_common_tune_setting1
	testl	%eax, %eax
	jne	LBB0_4
## %bb.12:
	movl	16(%r14), %esi
	movl	24(%rbx), %edx
	movq	%rbx, %rdi
	callq	_x_tune_dvbt2_demod_setting
	testl	%eax, %eax
	jne	LBB0_4
## %bb.13:
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_15
## %bb.14:
	movq	16(%rbx), %rdi
	movl	16(%r14), %esi
	movl	24(%rdi), %edx
	callq	_x_tune_dvbt2_demod_setting
	testl	%eax, %eax
	jne	LBB0_4
LBB0_15:
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_dvbt2_set_profile
	testl	%eax, %eax
	jne	LBB0_4
## %bb.16:
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_18
## %bb.17:
	movq	16(%rbx), %rdi
	movq	(%r14), %rsi
	callq	_dvbt2_set_profile
	testl	%eax, %eax
	jne	LBB0_4
LBB0_18:
	movq	8(%r14), %rdx
	movq	_CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	jmp	LBB0_20
LBB0_21:
	movq	%rbx, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cxd2880_tnrdmd_dvbt2_set_plp_cfg ## TAILCALL
	.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_TNRDMD_DIVERMODE_MAIN,8,3 ## @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_DVBT2_PROFILE_ANY,8,3  ## @CXD2880_DVBT2_PROFILE_ANY
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_CXD2880_DTV_SYS_DVBT2,4,2      ## @CXD2880_DTV_SYS_DVBT2
	.comm	_CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO,8,3 ## @CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt2_tune1     ; -- Begin function cxd2880_tnrdmd_dvbt2_tune1
	.p2align	2
_cxd2880_tnrdmd_dvbt2_tune1:            ; @cxd2880_tnrdmd_dvbt2_tune1
	.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	x9, [x19, #8]
Lloh3:
	adrp	x10, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CXD2880_TNRDMD_STATE_SLEEP@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_7
; %bb.4:
Lloh9:
	adrp	x21, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGE
Lloh10:
	ldr	x21, [x21, _CXD2880_TNRDMD_DIVERMODE_MAIN@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _CXD2880_DVBT2_PROFILE_ANY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CXD2880_DVBT2_PROFILE_ANY@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
Lloh14:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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:
Lloh18:
	adrp	x8, _CXD2880_DTV_SYS_DVBT2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CXD2880_DTV_SYS_DVBT2@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldp	w3, w2, [x20, #16]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_cxd2880_tnrdmd_common_tune_setting1
	cbnz	w0, LBB0_9
; %bb.11:
	ldr	w1, [x20, #16]
	ldr	w2, [x19, #24]
	mov	x0, x19
	bl	_x_tune_dvbt2_demod_setting
	cbnz	w0, LBB0_9
; %bb.12:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldr	x0, [x19, #16]
	ldr	w1, [x20, #16]
	ldr	w2, [x0, #24]
	bl	_x_tune_dvbt2_demod_setting
	cbnz	w0, LBB0_9
LBB0_14:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_dvbt2_set_profile
	cbnz	w0, LBB0_9
; %bb.15:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	ldr	x0, [x19, #16]
	ldr	x1, [x20]
	bl	_dvbt2_set_profile
	cbnz	w0, LBB0_9
LBB0_17:
	ldr	x2, [x20, #8]
Lloh21:
	adrp	x8, _CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	mov	x0, x19
	cmp	x2, x8
	b.ne	LBB0_19
; %bb.18:
	mov	w1, #1
	mov	w2, #0
	b	LBB0_20
LBB0_19:
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_20:
	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
	b	_cxd2880_tnrdmd_dvbt2_set_plp_cfg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.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_TNRDMD_DIVERMODE_MAIN,8,3 ; @CXD2880_TNRDMD_DIVERMODE_MAIN
	.comm	_CXD2880_DVBT2_PROFILE_ANY,8,3  ; @CXD2880_DVBT2_PROFILE_ANY
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_CXD2880_DTV_SYS_DVBT2,4,2      ; @CXD2880_DTV_SYS_DVBT2
	.comm	_CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO,8,3 ; @CXD2880_DVBT2_TUNE_PARAM_PLPID_AUTO
.subsections_via_symbols
