	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_pre_bit_err_t2
_cxd2880_pre_bit_err_t2:                ## @cxd2880_pre_bit_err_t2
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.5:
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	_CXD2880_TNRDMD_DIVERMODE_SUB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.6:
	movq	8(%r12), %rax
	movq	_CXD2880_TNRDMD_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.7:
	movq	16(%r12), %rax
	movq	_CXD2880_DTV_SYS_DVBT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.8:
	movq	%r12, %rdi
	callq	_slvt_freeze_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.9:
	movq	24(%r12), %rdi
	movq	_CXD2880_IO_TGT_DMD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%edx, %edx
	movl	$11, %ecx
	callq	*(%rdi)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:
	movq	24(%r12), %rdi
	movl	(%r13), %esi
	leaq	-80(%rbp), %rcx
	movl	$60, %edx
	movl	$20, %r8d
	callq	*8(%rdi)
	testl	%eax, %eax
	je	LBB0_12
LBB0_10:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_slvt_unfreeze_reg
	jmp	LBB0_18
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	testb	$1, -80(%rbp)
	jne	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_slvt_unfreeze_reg
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_14:
	movl	-76(%rbp), %eax
	movl	-72(%rbp), %ecx
	andl	$15, %eax
	shll	$24, %eax
	shll	$16, %ecx
	movl	-68(%rbp), %edx
	shll	$8, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	orl	-64(%rbp), %edx
	movl	%edx, (%r15)
	movq	24(%r12), %rdi
	movl	(%r13), %esi
	leaq	-80(%rbp), %rcx
	movl	$160, %edx
	movl	$1, %r8d
	callq	*8(%rdi)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.15:
	movl	-80(%rbp), %eax
	andl	$3, %eax
	movq	_CXD2880_DVBT2_FEC_LDPC_16K@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	$16200, %eax                    ## imm = 0x3F48
	movl	$64800, %r15d                   ## imm = 0xFD20
	cmovel	%eax, %r15d
	movq	%r12, %rdi
	callq	_slvt_unfreeze_reg
	movq	24(%r12), %rdi
	movl	(%r13), %esi
	xorl	%edx, %edx
	movl	$32, %ecx
	callq	*(%rdi)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	movq	24(%r12), %rdi
	movl	(%r13), %esi
	leaq	-80(%rbp), %rcx
	movl	$111, %edx
	movl	$1, %r8d
	callq	*8(%rdi)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movb	-80(%rbp), %cl
	andb	$15, %cl
	shll	%cl, %r15d
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CXD2880_TNRDMD_DIVERMODE_SUB,8,3 ## @CXD2880_TNRDMD_DIVERMODE_SUB
	.comm	_CXD2880_TNRDMD_STATE_ACTIVE,8,3 ## @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT2,8,3      ## @CXD2880_DTV_SYS_DVBT2
	.comm	_CXD2880_IO_TGT_DMD,4,2         ## @CXD2880_IO_TGT_DMD
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CXD2880_DVBT2_FEC_LDPC_16K,4,2 ## @CXD2880_DVBT2_FEC_LDPC_16K
	.no_dead_strip	_cxd2880_pre_bit_err_t2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_pre_bit_err_t2
_cxd2880_pre_bit_err_t2:                ; @cxd2880_pre_bit_err_t2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
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_10
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_10
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_10
; %bb.3:
	mov	x20, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CXD2880_TNRDMD_DIVERMODE_SUB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.4:
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CXD2880_TNRDMD_STATE_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.5:
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x9, _CXD2880_DTV_SYS_DVBT2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CXD2880_DTV_SYS_DVBT2@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	mov	x0, x20
	bl	_slvt_freeze_reg
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.7:
	ldr	x0, [x20, #24]
	ldr	x8, [x0]
Lloh12:
	adrp	x23, _CXD2880_IO_TGT_DMD@GOTPAGE
Lloh13:
	ldr	x23, [x23, _CXD2880_IO_TGT_DMD@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w2, #0
	mov	w3, #11
	blr	x8
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x0, [x20, #24]
	ldr	x8, [x0, #8]
	ldr	w1, [x23]
	add	x3, sp, #4
	mov	w2, #60
	mov	w4, #20
	blr	x8
	cbz	w0, LBB0_14
LBB0_9:
	mov	x22, x0
	mov	x0, x20
	bl	_slvt_unfreeze_reg
	b	LBB0_12
LBB0_10:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.13:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_14:
	ldrb	w8, [sp, #4]
	tbnz	w8, #0, LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_slvt_unfreeze_reg
Lloh19:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_11
LBB0_16:
	ldp	w8, w9, [sp, #8]
	ubfiz	w8, w8, #24, #4
	orr	w8, w8, w9, lsl #16
	ldp	w9, w10, [sp, #16]
	orr	w8, w8, w9, lsl #8
	orr	w8, w8, w10
	str	w8, [x21]
	ldr	x0, [x20, #24]
	ldr	x8, [x0, #8]
	ldr	w1, [x23]
	add	x3, sp, #4
	mov	w2, #160
	mov	w4, #1
	blr	x8
	cbnz	w0, LBB0_9
; %bb.17:
	ldr	w8, [sp, #4]
Lloh21:
	adrp	x9, _CXD2880_DVBT2_FEC_LDPC_16K@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CXD2880_DVBT2_FEC_LDPC_16K@GOTPAGEOFF]
	and	w8, w8, #0x3
Lloh23:
	ldr	w9, [x9]
	mov	w10, #64800
	mov	w11, #16200
	cmp	w8, w9
	csel	w21, w11, w10, eq
	mov	x0, x20
	bl	_slvt_unfreeze_reg
	ldr	x0, [x20, #24]
	ldr	x8, [x0]
	ldr	w1, [x23]
	mov	w2, #0
	mov	w3, #32
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.18:
	ldr	x0, [x20, #24]
	ldr	x8, [x0, #8]
	ldr	w1, [x23]
	add	x3, sp, #4
	mov	w2, #111
	mov	w4, #1
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.19:
	ldr	w8, [sp, #4]
	and	x8, x8, #0xf
	lsl	w8, w21, w8
	str	w8, [x19]
	b	LBB0_12
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	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_ACTIVE,8,3 ; @CXD2880_TNRDMD_STATE_ACTIVE
	.comm	_CXD2880_DTV_SYS_DVBT2,8,3      ; @CXD2880_DTV_SYS_DVBT2
	.comm	_CXD2880_IO_TGT_DMD,4,2         ; @CXD2880_IO_TGT_DMD
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CXD2880_DVBT2_FEC_LDPC_16K,4,2 ; @CXD2880_DVBT2_FEC_LDPC_16K
	.no_dead_strip	_cxd2880_pre_bit_err_t2
.subsections_via_symbols
