	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc90522s_get_frontend
_tc90522s_get_frontend:                 ## @tc90522s_get_frontend
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	_SYS_ISDBS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rsi)
	movl	$28860000, (%rsi)               ## imm = 0x1B85E60
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	$230, %esi
	movl	$5, %ecx
	callq	_reg_read
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	-96(%rbp), %eax
	shll	$8, %eax
	orl	-92(%rbp), %eax
	movl	%eax, 4(%r13)
	movl	-88(%rbp), %ecx
	shrl	$4, %ecx
	andl	$7, %ecx
	movq	_QPSK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	cmpl	$7, %ecx
	jne	LBB0_3
## %bb.2:
	movq	_PSK_8@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_3:
	movq	%rdx, 80(%r13)
	movq	_fec_conv_sat@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rsi,%rcx,8), %rdi
	movq	%rdi, 88(%r13)
	movq	72(%r13), %rcx
	movq	%rdi, 16(%rcx)
	movq	%rdx, 8(%rcx)
	movl	-84(%rbp), %edx
	andl	$63, %edx
	movl	%edx, (%rcx)
	movl	-88(%rbp), %edx
	andl	$7, %edx
	movq	(%rsi,%rdx,8), %rsi
	movq	%rsi, 40(%rcx)
	movl	-80(%rbp), %esi
	andl	$63, %esi
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	testq	%rdx, %rdx
	sete	%bl
	cmovnel	%esi, %edi
	movl	$2, %r12d
	subl	%ebx, %r12d
	movl	%edi, 24(%rcx)
	movq	%rax, 32(%rcx)
LBB0_4:
	movl	$0, 56(%r13)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	-100(%rbp), %rsi
	movq	%r15, %rdi
	callq	*%rax
LBB0_6:
	movl	$1, 40(%r13)
	movq	_FE_SCALE_NOT_AVAILABLE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	48(%r13), %rcx
	movq	%rax, 16(%rcx)
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	$188, %esi
	movl	$2, %ecx
	callq	_reg_read
	movl	-96(%rbp), %ecx
	shll	$8, %ecx
	orl	-92(%rbp), %ecx
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovel	%ecx, %ebx
	cmpl	$3000, %ebx                     ## imm = 0xBB8
	jl	LBB0_8
## %bb.7:
	addl	$-3000, %ebx                    ## imm = 0xF448
	movl	%ebx, %edi
	shll	$16, %edi
	callq	_int_sqrt
	imull	%ebx, %ebx
	cltq
	imulq	%rbx, %rax
	imulq	$-16346, %rax, %rdi             ## imm = 0xC026
	movl	$10, %esi
	callq	_div64_s64
	movq	_FE_SCALE_DECIBEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	48(%r13), %rcx
	movq	%rax, 16(%rcx)
LBB0_8:
	leaq	24(%r13), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r12d, 24(%r13)
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	$235, %esi
	movl	$10, %ecx
	callq	_reg_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	testl	%r12d, %r12d
	je	LBB0_26
## %bb.10:
	movq	32(%r13), %rax
	movq	_FE_SCALE_COUNTER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movl	-96(%rbp), %edx
	movl	-92(%rbp), %esi
	shll	$16, %edx
	shll	$8, %esi
	orl	%edx, %esi
	orl	-88(%rbp), %esi
	movl	%esi, 8(%rax)
	cmpl	$1, %r12d
	je	LBB0_17
## %bb.11:
	movq	(%rcx), %rdx
	movq	%rdx, 40(%rax)
	movl	-76(%rbp), %edx
	movl	-72(%rbp), %esi
	shll	$16, %edx
	shll	$8, %esi
	orl	%edx, %esi
	orl	-68(%rbp), %esi
	movl	%esi, 32(%rax)
	cmpl	$2, %r12d
	je	LBB0_17
## %bb.12:
	movq	(%rcx), %rcx
	movq	%rcx, 64(%rax)
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	shll	$16, %ecx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	-48(%rbp), %edx
	movl	%edx, 56(%rax)
	jmp	LBB0_17
LBB0_13:
	testl	%r12d, %r12d
	je	LBB0_26
## %bb.14:
	movq	32(%r13), %rax
	movq	(%r15), %rcx
	movq	%rcx, 16(%rax)
	cmpl	$1, %r12d
	je	LBB0_17
## %bb.15:
	movq	(%r15), %rcx
	movq	%rcx, 40(%rax)
	cmpl	$2, %r12d
	je	LBB0_17
## %bb.16:
	movq	(%r15), %rcx
	movq	%rcx, 64(%rax)
LBB0_17:
	leaq	8(%r13), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r12d, 8(%r13)
	testl	%r14d, %r14d
	js	LBB0_22
## %bb.18:
	testl	%r12d, %r12d
	je	LBB0_27
## %bb.19:
	movq	16(%r13), %rax
	movq	_FE_SCALE_COUNTER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movl	-84(%rbp), %edx
	shll	$8, %edx
	orl	-80(%rbp), %edx
	imull	$1632, %edx, %edx               ## imm = 0x660
	movl	%edx, 8(%rax)
	cmpl	$1, %r12d
	je	LBB0_27
## %bb.20:
	movq	(%rcx), %rdx
	movq	%rdx, 40(%rax)
	movl	-64(%rbp), %edx
	shll	$8, %edx
	orl	-60(%rbp), %edx
	imull	$1632, %edx, %edx               ## imm = 0x660
	movl	%edx, 32(%rax)
	cmpl	$2, %r12d
	je	LBB0_27
## %bb.21:
	movq	(%rcx), %rcx
	movq	%rcx, 64(%rax)
	movl	-44(%rbp), %ecx
	shll	$8, %ecx
	orl	-40(%rbp), %ecx
	imull	$1632, %ecx, %ecx               ## imm = 0x660
	movl	%ecx, 56(%rax)
	jmp	LBB0_27
LBB0_26:
	leaq	8(%r13), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r12d, 8(%r13)
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	testl	%r12d, %r12d
	je	LBB0_27
## %bb.23:
	movq	16(%r13), %rax
	movq	(%r15), %rcx
	movq	%rcx, 16(%rax)
	cmpl	$1, %r12d
	je	LBB0_27
## %bb.24:
	movq	(%r15), %rcx
	movq	%rcx, 40(%rax)
	cmpl	$2, %r12d
	je	LBB0_27
## %bb.25:
	movq	(%r15), %rcx
	movq	%rcx, 64(%rax)
	jmp	LBB0_27
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_ISDBS,4,2                  ## @SYS_ISDBS
	.comm	_PSK_8,8,3                      ## @PSK_8
	.comm	_QPSK,8,3                       ## @QPSK
	.comm	_fec_conv_sat,8,3               ## @fec_conv_sat
	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ## @FE_SCALE_NOT_AVAILABLE
	.comm	_FE_SCALE_DECIBEL,8,3           ## @FE_SCALE_DECIBEL
	.comm	_FE_SCALE_COUNTER,8,3           ## @FE_SCALE_COUNTER
	.no_dead_strip	_tc90522s_get_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc90522s_get_frontend
_tc90522s_get_frontend:                 ; @tc90522s_get_frontend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x8, _SYS_ISDBS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_ISDBS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x1, #96]
	mov	w8, #24160
	movk	w8, #440, lsl #16
	str	w8, [x1]
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #230
	mov	w3, #5
	bl	_reg_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
	ldp	w8, w9, [sp, #16]
	orr	w8, w9, w8, lsl #8
	str	w8, [x19, #4]
	ldr	w8, [sp, #24]
	ubfx	x8, x8, #4, #3
Lloh6:
	adrp	x9, _PSK_8@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PSK_8@GOTPAGEOFF]
Lloh8:
	adrp	x10, _QPSK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _QPSK@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	ldr	x10, [x10]
	cmp	w8, #7
	csel	x9, x9, x10, eq
Lloh12:
	adrp	x11, _fec_conv_sat@GOTPAGE
Lloh13:
	ldr	x11, [x11, _fec_conv_sat@GOTPAGEOFF]
	str	x9, [x19, #80]
Lloh14:
	ldr	x11, [x11]
	ldr	x8, [x11, x8, lsl #3]
	str	x8, [x19, #88]
	ldr	x12, [x19, #72]
	stp	x9, x8, [x12, #8]
	ldr	w8, [sp, #28]
	and	w8, w8, #0x3f
	str	w8, [x12]
	ldr	w8, [sp, #24]
	ldr	w9, [sp, #32]
	and	x8, x8, #0x7
	ldr	x11, [x11, x8, lsl #3]
	and	w9, w9, #0x3f
	cmp	w8, #0
	csel	w8, wzr, w9, eq
	mov	w9, #1
	cinc	w22, w9, ne
	str	w8, [x12, #24]
	stp	x10, x11, [x12, #32]
LBB0_3:
	str	wzr, [x19, #56]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
	add	x1, sp, #12
	mov	x0, x21
	blr	x8
LBB0_5:
	mov	w8, #1
	str	w8, [x19, #40]
Lloh15:
	adrp	x21, _FE_SCALE_NOT_AVAILABLE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _FE_SCALE_NOT_AVAILABLE@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x19, #48]
	str	x8, [x9, #16]
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #188
	mov	w3, #2
	bl	_reg_read
	ldp	w8, w9, [sp, #16]
	orr	w8, w9, w8, lsl #8
	cmp	w0, #0
	csel	w8, w8, wzr, eq
	subs	w23, w8, #3000
	b.lt	LBB0_7
; %bb.6:
	lsl	w0, w23, #16
	bl	_int_sqrt
                                        ; kill: def $w0 killed $w0 def $x0
	mul	w8, w23, w23
	sxtw	x9, w0
	mul	x8, x8, x9
	mov	x9, #-16346
	mul	x0, x8, x9
	mov	w1, #10
	bl	_div64_s64
Lloh17:
	adrp	x8, _FE_SCALE_DECIBEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FE_SCALE_DECIBEL@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x9, [x19, #48]
	str	x8, [x9, #16]
LBB0_7:
	add	x0, x19, #24
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w22, [x19, #24]
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #235
	mov	w3, #10
	bl	_reg_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_12
; %bb.8:
	cbz	w22, LBB0_21
; %bb.9:
	ldr	x8, [x19, #32]
Lloh20:
	adrp	x9, _FE_SCALE_COUNTER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _FE_SCALE_COUNTER@GOTPAGEOFF]
	ldr	x10, [x9]
	str	x10, [x8, #16]
	ldp	w10, w11, [sp, #16]
	lsl	w11, w11, #8
	orr	w10, w11, w10, lsl #16
	ldr	w11, [sp, #24]
	orr	w10, w10, w11
	str	w10, [x8, #8]
	cmp	w22, #1
	b.eq	LBB0_16
; %bb.10:
	ldr	x10, [x9]
	str	x10, [x8, #40]
	ldp	w10, w11, [sp, #36]
	lsl	w11, w11, #8
	orr	w10, w11, w10, lsl #16
	ldr	w11, [sp, #44]
	orr	w10, w10, w11
	str	w10, [x8, #32]
	cmp	w22, #2
	b.eq	LBB0_16
; %bb.11:
	ldr	x9, [x9]
	str	x9, [x8, #64]
	ldp	w9, w10, [sp, #56]
	lsl	w10, w10, #8
	orr	w9, w10, w9, lsl #16
	ldr	w10, [sp, #64]
	orr	w9, w9, w10
	str	w9, [x8, #56]
	b	LBB0_16
LBB0_12:
	cbz	w22, LBB0_21
; %bb.13:
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	str	x9, [x8, #16]
	cmp	w22, #1
	b.eq	LBB0_16
; %bb.14:
	ldr	x9, [x21]
	str	x9, [x8, #40]
	cmp	w22, #2
	b.eq	LBB0_16
; %bb.15:
	ldr	x9, [x21]
	str	x9, [x8, #64]
LBB0_16:
	add	x0, x19, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w22, [x19, #8]
	tbnz	w20, #31, LBB0_24
; %bb.17:
	cbz	w22, LBB0_22
; %bb.18:
	ldr	x8, [x19, #16]
Lloh22:
	adrp	x9, _FE_SCALE_COUNTER@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FE_SCALE_COUNTER@GOTPAGEOFF]
	ldr	x10, [x9]
	str	x10, [x8, #16]
	ldp	w10, w11, [sp, #28]
	orr	w11, w11, w10, lsl #8
	mov	w10, #1632
	mul	w11, w11, w10
	str	w11, [x8, #8]
	cmp	w22, #1
	b.eq	LBB0_22
; %bb.19:
	ldr	x11, [x9]
	str	x11, [x8, #40]
	ldp	w11, w12, [sp, #48]
	orr	w11, w12, w11, lsl #8
	mul	w10, w11, w10
	str	w10, [x8, #32]
	cmp	w22, #2
	b.eq	LBB0_22
; %bb.20:
	ldr	x9, [x9]
	str	x9, [x8, #64]
	ldp	w9, w10, [sp, #68]
	orr	w9, w10, w9, lsl #8
	mov	w10, #1632
	mul	w9, w9, w10
	str	w9, [x8, #56]
	b	LBB0_22
LBB0_21:
	add	x0, x19, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w22, [x19, #8]
LBB0_22:
	ldr	x8, [sp, #56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.23:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	cbz	w22, LBB0_22
; %bb.25:
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
	str	x9, [x8, #16]
	cmp	w22, #1
	b.eq	LBB0_22
; %bb.26:
	ldr	x9, [x21]
	str	x9, [x8, #40]
	cmp	w22, #2
	b.eq	LBB0_22
; %bb.27:
	ldr	x9, [x21]
	str	x9, [x8, #64]
	b	LBB0_22
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_ISDBS,4,2                  ; @SYS_ISDBS
	.comm	_PSK_8,8,3                      ; @PSK_8
	.comm	_QPSK,8,3                       ; @QPSK
	.comm	_fec_conv_sat,8,3               ; @fec_conv_sat
	.comm	_FE_SCALE_NOT_AVAILABLE,8,3     ; @FE_SCALE_NOT_AVAILABLE
	.comm	_FE_SCALE_DECIBEL,8,3           ; @FE_SCALE_DECIBEL
	.comm	_FE_SCALE_COUNTER,8,3           ; @FE_SCALE_COUNTER
	.no_dead_strip	_tc90522s_get_frontend
.subsections_via_symbols
