	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_sig_strength
_get_sig_strength:                      ## @get_sig_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
	movq	%rsi, %r14
	movq	(%rdi), %r15
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	movq	_IQM_AF_AGC_IF__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_read_reg16
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_IQM_AF_AGC_IF__M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, -28(%rbp)
	movq	_IQM_AF_AGC_RF__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_read_reg16
	testl	%eax, %eax
	je	LBB0_3
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_IQM_AF_AGC_RF__M@GOTPCREL(%rip), %rcx
	movl	-32(%rbp), %eax
	andl	(%rcx), %eax
	movl	%eax, -32(%rbp)
	movq	_DRXJ_AGC_TOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	-28(%rbp), %edx
	cmpl	%ecx, %edx
	jle	LBB0_12
## %bb.4:
	movq	_DRXJ_RFAGC_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_6
## %bb.5:
	movl	$100, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_12:
	movq	_DRXJ_AGC_SNS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	jle	LBB0_16
## %bb.13:
	subl	%esi, %ecx
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_6:
	movq	_DRXJ_RFAGC_MIN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	subl	%edx, %eax
	jle	LBB0_11
## %bb.7:
	subl	%edx, %ecx
	jne	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_16:
	testl	%esi, %esi
	je	LBB0_17
## %bb.18:
	shll	$2, %edx
	leal	(%rdx,%rdx,4), %eax
	cltd
	idivl	%esi
	jmp	LBB0_19
LBB0_15:
	imull	$55, %eax, %eax
	cltd
	idivl	%ecx
	addl	$20, %eax
	jmp	LBB0_19
LBB0_11:
	movl	$75, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_10:
	leal	(%rax,%rax,4), %eax
	leal	(%rax,%rax,4), %eax
	cltd
	idivl	%ecx
	addl	$75, %eax
LBB0_19:
	xorl	%ebx, %ebx
	cmpl	$8, %eax
	cmovll	%ebx, %eax
	movl	%eax, (%r14)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IQM_AF_AGC_IF__A,4,2           ## @IQM_AF_AGC_IF__A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d\n"

	.comm	_IQM_AF_AGC_IF__M,4,2           ## @IQM_AF_AGC_IF__M
	.comm	_IQM_AF_AGC_RF__A,4,2           ## @IQM_AF_AGC_RF__A
	.comm	_IQM_AF_AGC_RF__M,4,2           ## @IQM_AF_AGC_RF__M
	.comm	_DRXJ_AGC_SNS,4,2               ## @DRXJ_AGC_SNS
	.comm	_DRXJ_AGC_TOP,4,2               ## @DRXJ_AGC_TOP
	.comm	_DRXJ_RFAGC_MAX,4,2             ## @DRXJ_RFAGC_MAX
	.comm	_DRXJ_RFAGC_MIN,4,2             ## @DRXJ_RFAGC_MIN
L_.str.1:                               ## @.str.1
	.asciz	"error: rf_agc_max == rf_agc_min\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"error: if_agc_top == if_agc_sns\n"

L_.str.3:                               ## @.str.3
	.asciz	"error: if_agc_sns is zero!\n"

	.no_dead_strip	_get_sig_strength
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_sig_strength
_get_sig_strength:                      ; @get_sig_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
	mov	x19, x1
	ldr	x21, [x0]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _IQM_AF_AGC_IF__A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IQM_AF_AGC_IF__A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #0
	bl	_drxj_dap_read_reg16
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x20, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_22
LBB0_2:
Lloh5:
	adrp	x8, _IQM_AF_AGC_IF__M@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IQM_AF_AGC_IF__M@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	and	w8, w9, w8
	str	w8, [sp, #8]
Lloh8:
	adrp	x8, _IQM_AF_AGC_RF__A@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IQM_AF_AGC_RF__A@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	mov	w3, #0
	bl	_drxj_dap_read_reg16
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	str	x20, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_22
LBB0_4:
Lloh13:
	adrp	x8, _IQM_AF_AGC_RF__M@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IQM_AF_AGC_RF__M@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
Lloh16:
	adrp	x9, _DRXJ_AGC_TOP@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DRXJ_AGC_TOP@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x9]
	ldr	w9, [sp, #8]
	cmp	w9, w10
	b.le	LBB0_7
; %bb.5:
Lloh19:
	adrp	x9, _DRXJ_RFAGC_MAX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DRXJ_RFAGC_MAX@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_10
; %bb.6:
	mov	w20, #0
	mov	w8, #100
	b	LBB0_21
LBB0_7:
Lloh22:
	adrp	x8, _DRXJ_AGC_SNS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DRXJ_AGC_SNS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	subs	w11, w9, w8
	b.le	LBB0_13
; %bb.8:
	subs	w8, w10, w8
	b.ne	LBB0_15
; %bb.9:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_10:
Lloh27:
	adrp	x10, _DRXJ_RFAGC_MIN@GOTPAGE
Lloh28:
	ldr	x10, [x10, _DRXJ_RFAGC_MIN@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	subs	w8, w8, w10
	b.le	LBB0_16
; %bb.11:
	subs	w9, w9, w10
	b.ne	LBB0_19
; %bb.12:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_13:
	cbz	w8, LBB0_17
; %bb.14:
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #2
	sdiv	w8, w9, w8
	b	LBB0_20
LBB0_15:
	mov	w9, #55
	mul	w9, w11, w9
	sdiv	w8, w9, w8
	add	w8, w8, #20
	b	LBB0_20
LBB0_16:
	mov	w20, #0
	mov	w8, #75
	b	LBB0_21
LBB0_17:
Lloh32:
	adrp	x0, l_.str.3@PAGE
Lloh33:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_18:
	bl	_pr_err
Lloh34:
	adrp	x8, _EIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_19:
	mov	w10, #25
	mul	w8, w8, w10
	sdiv	w8, w8, w9
	add	w8, w8, #75
LBB0_20:
	mov	w20, #0
	cmp	w8, #8
	csel	w8, wzr, w8, lt
LBB0_21:
	str	w8, [x19]
LBB0_22:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_IQM_AF_AGC_IF__A,4,2           ; @IQM_AF_AGC_IF__A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d\n"

	.comm	_IQM_AF_AGC_IF__M,4,2           ; @IQM_AF_AGC_IF__M
	.comm	_IQM_AF_AGC_RF__A,4,2           ; @IQM_AF_AGC_RF__A
	.comm	_IQM_AF_AGC_RF__M,4,2           ; @IQM_AF_AGC_RF__M
	.comm	_DRXJ_AGC_SNS,4,2               ; @DRXJ_AGC_SNS
	.comm	_DRXJ_AGC_TOP,4,2               ; @DRXJ_AGC_TOP
	.comm	_DRXJ_RFAGC_MAX,4,2             ; @DRXJ_RFAGC_MAX
	.comm	_DRXJ_RFAGC_MIN,4,2             ; @DRXJ_RFAGC_MIN
l_.str.1:                               ; @.str.1
	.asciz	"error: rf_agc_max == rf_agc_min\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"error: if_agc_top == if_agc_sns\n"

l_.str.3:                               ; @.str.3
	.asciz	"error: if_agc_sns is zero!\n"

	.no_dead_strip	_get_sig_strength
.subsections_via_symbols
