	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt_mon_carrier_offset ## -- Begin function cxd2880_tnrdmd_dvbt_mon_carrier_offset
	.p2align	4, 0x90
_cxd2880_tnrdmd_dvbt_mon_carrier_offset: ## @cxd2880_tnrdmd_dvbt_mon_carrier_offset
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	movq	8(%r15), %rax
	movq	_CXD2880_DTV_SYS_DVBT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.5:
	movq	%r15, %rdi
	callq	_slvt_freeze_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%r15, %rdi
	callq	_is_tps_locked
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	movq	24(%r15), %rdi
	movq	_CXD2880_IO_TGT_DMD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%edx, %edx
	movl	$13, %ecx
	callq	*(%rdi)
	testl	%eax, %eax
	je	LBB0_9
LBB0_7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_slvt_unfreeze_reg
	jmp	LBB0_11
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	24(%r15), %rdi
	movl	(%r12), %esi
	leaq	-64(%rbp), %rcx
	movl	$29, %edx
	movl	$4, %r8d
	callq	*8(%rdi)
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_slvt_unfreeze_reg
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.10:
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %ecx
	andl	$31, %eax
	shll	$24, %eax
	shll	$16, %ecx
	movl	-56(%rbp), %edi
	shll	$8, %edi
	orl	%ecx, %edi
	orl	%eax, %edi
	orl	-52(%rbp), %edi
	movl	$29, %esi
	callq	_cxd2880_convert2s_complement
	movl	%eax, (%r14)
	imull	16(%r15), %eax
	cltq
	imulq	$1955580853, %rax, %rcx         ## imm = 0x748FCBB5
	shrq	$32, %rcx
	subl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	sarl	$7, %ecx
	addl	%eax, %ecx
	movl	%ecx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT,8,3       ## @CXD2880_DTV_SYS_DVBT
	.comm	_CXD2880_IO_TGT_DMD,4,2         ## @CXD2880_IO_TGT_DMD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_tnrdmd_dvbt_mon_carrier_offset ; -- Begin function cxd2880_tnrdmd_dvbt_mon_carrier_offset
	.p2align	2
_cxd2880_tnrdmd_dvbt_mon_carrier_offset: ; @cxd2880_tnrdmd_dvbt_mon_carrier_offset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_8
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _CXD2880_DTV_SYS_DVBT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CXD2880_DTV_SYS_DVBT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_slvt_freeze_reg
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.5:
	mov	x0, x20
	bl	_is_tps_locked
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	x0, [x20, #24]
	ldr	x8, [x0]
Lloh9:
	adrp	x22, _CXD2880_IO_TGT_DMD@GOTPAGE
Lloh10:
	ldr	x22, [x22, _CXD2880_IO_TGT_DMD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #0
	mov	w3, #13
	blr	x8
	cbz	w0, LBB0_11
LBB0_7:
	mov	x21, x0
	mov	x0, x20
	bl	_slvt_unfreeze_reg
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.10:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	ldr	x0, [x20, #24]
	ldr	x8, [x0, #8]
	ldr	w1, [x22]
	add	x3, sp, #8
	mov	w2, #29
	mov	w4, #4
	blr	x8
	mov	x21, x0
	mov	x0, x20
	bl	_slvt_unfreeze_reg
	cbnz	w21, LBB0_9
; %bb.12:
	ldp	w8, w9, [sp, #8]
	ubfiz	w8, w8, #24, #5
	orr	w8, w8, w9, lsl #16
	ldp	w9, w10, [sp, #16]
	orr	w8, w8, w9, lsl #8
	orr	w0, w8, w10
	mov	w1, #29
	bl	_cxd2880_convert2s_complement
	str	w0, [x19]
	ldr	w8, [x20, #16]
	mul	w8, w8, w0
	mov	w9, #52149
	movk	w9, #29839, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	sub	w8, w9, w8
	asr	w9, w8, #7
	add	w8, w9, w8, lsr #31
	str	w8, [x19]
	b	LBB0_9
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT,8,3       ; @CXD2880_DTV_SYS_DVBT
	.comm	_CXD2880_IO_TGT_DMD,4,2         ; @CXD2880_IO_TGT_DMD
.subsections_via_symbols
