	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9033_read_signal_strength
_af9033_read_signal_strength:           ## @af9033_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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %r12
	movq	24(%r12), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpq	$0, 8(%r12)
	movl	(%r12), %edi
	leaq	-84(%rbp), %rdx
	je	LBB0_3
## %bb.1:
	movl	$8388680, %esi                  ## imm = 0x800048
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movl	-84(%rbp), %ecx
LBB0_12:
	movl	%ecx, %eax
	shll	$16, %eax
	subl	%ecx, %eax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	shrq	$37, %rax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_3:
	movl	$8388855, %esi                  ## imm = 0x8000F7
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movl	(%r12), %edi
	leaq	-80(%rbp), %rdx
	movl	$8452352, %esi                  ## imm = 0x80F900
	movl	$7, %ecx
	callq	_regmap_bulk_read
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	cmpl	$300000001, 16(%r12)            ## imm = 0x11E1A301
	setge	%al
	leal	(%rax,%rax,2), %eax
	addl	-84(%rbp), %eax
	movq	_power_reference@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-68(%rbp), %edx
	movl	-56(%rbp), %esi
	andl	$3, %edx
	movq	(%rcx,%rdx,8), %rcx
	andl	$7, %esi
	subl	(%rcx,%rsi,4), %eax
	addl	$-107, %eax
	xorl	%ecx, %ecx
	cmpl	$-15, %eax
	jl	LBB0_12
## %bb.6:
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	cmpl	$19, %eax
	ja	LBB0_10
## %bb.9:
	leal	10(,%rax,4), %ecx
	jmp	LBB0_12
LBB0_7:
	addb	%al, %al
	addb	$30, %al
	movzbl	%al, %eax
	imull	$171, %eax, %ecx
	shrl	$9, %ecx
	jmp	LBB0_12
LBB0_10:
	movl	$100, %ecx
	cmpl	$34, %eax
	ja	LBB0_12
## %bb.11:
	addb	%al, %al
	addb	$-40, %al
	movzbl	%al, %eax
	imull	$171, %eax, %eax
	shrl	$9, %eax
	addb	$90, %al
	movzbl	%al, %ecx
	jmp	LBB0_12
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_power_reference,8,3            ## @power_reference
L_.str.1:                               ## @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9033_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 af9033_read_signal_strength
_af9033_read_signal_strength:           ; @af9033_read_signal_strength
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	w21, #72
	movk	w21, #128, lsl #16
	ldr	x22, [x0]
	ldr	x20, [x22, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x22, #8]
	ldr	w0, [x22]
	cbz	x8, LBB0_4
; %bb.1:
	add	x2, sp, #8
	mov	w1, #72
	movk	w1, #128, lsl #16
	bl	_regmap_read
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w8, [sp, #8]
LBB0_3:
	mov	w21, #0
	lsl	w9, w8, #16
	sub	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #37
	str	w8, [x19]
	b	LBB0_7
LBB0_4:
	add	w1, w21, #175
	add	x2, sp, #8
	bl	_regmap_read
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x22]
	add	x2, sp, #12
	mov	w1, #63744
	movk	w1, #128, lsl #16
	mov	w3, #7
	bl	_regmap_bulk_read
	mov	x21, x0
	cbz	w0, LBB0_9
LBB0_6:
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
LBB0_7:
	ldr	x8, [sp, #40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.8:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w8, [x22, #16]
	mov	w9, #41729
	movk	w9, #4577, lsl #16
Lloh10:
	adrp	x10, _power_reference@GOTPAGE
Lloh11:
	ldr	x10, [x10, _power_reference@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	ldr	w11, [sp, #24]
	ldr	w12, [sp, #36]
	and	x11, x11, #0x3
	ldr	x10, [x10, x11, lsl #3]
	mov	w11, #-4
	and	x12, x12, #0x7
	ldr	w10, [x10, x12, lsl #2]
	mov	w12, #-7
	cmp	w8, w9
	csel	w8, w12, w11, lt
	ldr	w9, [sp, #8]
	add	w8, w9, w8
	sub	w8, w8, w10
	sub	w8, w8, #100
	cmn	w8, #15
	b.ge	LBB0_11
; %bb.10:
	mov	w8, #0
	b	LBB0_3
LBB0_11:
	tbnz	w8, #31, LBB0_14
; %bb.12:
	cmp	w8, #19
	b.hi	LBB0_15
; %bb.13:
	lsl	w8, w8, #2
	add	w8, w8, #10
	b	LBB0_3
LBB0_14:
	lsl	w8, w8, #1
	add	w8, w8, #30
	and	w8, w8, #0xfe
	mov	w9, #171
	mul	w8, w8, w9
	lsr	w8, w8, #9
	b	LBB0_3
LBB0_15:
	cmp	w8, #34
	b.hi	LBB0_17
; %bb.16:
	lsl	w8, w8, #1
	sub	w8, w8, #40
	and	w8, w8, #0xfe
	mov	w9, #171
	mul	w8, w8, w9
	lsr	w8, w8, #9
	add	w8, w8, #90
	b	LBB0_3
LBB0_17:
	mov	w8, #100
	b	LBB0_3
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_power_reference,8,3            ; @power_reference
l_.str.1:                               ; @.str.1
	.asciz	"failed=%d\n"

	.no_dead_strip	_af9033_read_signal_strength
.subsections_via_symbols
