	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_read_signal_strength
_cxd2880_read_signal_strength:          ## @cxd2880_read_signal_strength
	.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
	movl	$0, -28(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	(%r15), %edi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_SYS_DVBT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_SYS_DVBT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_debug
	movl	(%r15), %edi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	leaq	4(%r15), %rdi
	leaq	-28(%rbp), %rsi
	callq	_cxd2880_tnrdmd_mon_rf_lvl
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_mutex_unlock
	movslq	-28(%rbp), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$35, %rdi
	addl	%eax, %edi
	movl	%edi, -28(%rbp)
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$-840, %esi                     ## imm = 0xFCB8
	movl	$-240, %edx
	callq	_clamp
	movl	%eax, -28(%rbp)
	movl	%eax, %ecx
	shll	$16, %ecx
	subl	%eax, %ecx
	addl	$55049400, %ecx                 ## imm = 0x347FCB8
	movslq	%ecx, %rax
	imulq	$458129845, %rax, %rax          ## imm = 0x1B4E81B5
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, (%r14)
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_9
LBB0_6:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SYS_DVBT,8,3                   ## @SYS_DVBT
	.comm	_SYS_DVBT2,8,3                  ## @SYS_DVBT2
L_.str.1:                               ## @.str.1
	.asciz	"invalid system\n"

L_.str.2:                               ## @.str.2
	.asciz	"ret = %d\n"

	.no_dead_strip	_cxd2880_read_signal_strength
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_read_signal_strength
_cxd2880_read_signal_strength:          ; @cxd2880_read_signal_strength
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	wzr, [sp, #12]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x21]
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _SYS_DVBT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SYS_DVBT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _SYS_DVBT2@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SYS_DVBT2@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.3:
	add	x0, x21, #4
	add	x1, sp, #12
	bl	_cxd2880_tnrdmd_mon_rf_lvl
	mov	x20, x0
	ldr	w0, [x21]
	bl	_mutex_unlock
	ldrsw	x8, [sp, #12]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #35
	add	w0, w8, w9
	str	w0, [sp, #12]
	mov	w1, #-840
	mov	w2, #-240
	bl	_clamp
	str	w0, [sp, #12]
	lsl	w8, w0, #16
	mov	w9, #64696
	movk	w9, #839, lsl #16
	sub	w8, w8, w0
	add	w8, w8, w9
	mov	w9, #33205
	movk	w9, #6990, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [x19]
	cbz	w20, LBB0_8
; %bb.4:
	str	x20, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	w0, [x21]
	bl	_mutex_unlock
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SYS_DVBT,8,3                   ; @SYS_DVBT
	.comm	_SYS_DVBT2,8,3                  ; @SYS_DVBT2
l_.str.1:                               ; @.str.1
	.asciz	"invalid system\n"

l_.str.2:                               ; @.str.2
	.asciz	"ret = %d\n"

	.no_dead_strip	_cxd2880_read_signal_strength
.subsections_via_symbols
