	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function or51211_read_snr
_or51211_read_snr:                      ## @or51211_read_snr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rbx
	movq	$4, -44(%rbp)
	movl	$4, -36(%rbp)
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$3, %ecx
	callq	_i2c_writebytes
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_i2c_readbytes
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_pr_warn
	movl	$-1, %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	-32(%rbp), %edi
	movl	$89599047, %esi                 ## imm = 0x5572C47
	callq	_calculate_snr
	movl	%eax, (%rbx)
	sarl	$16, %eax
	movl	%eax, (%r14)
	movl	-32(%rbp), %esi
	movl	(%rbx), %eax
	movl	%eax, %edx
	sarl	$24, %edx
	shrl	$8, %eax
	movzwl	%ax, %eax
	imull	$100, %eax, %ecx
	shrl	$16, %ecx
	leaq	L_.str.2(%rip), %rdi
	callq	_dprintk
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error writing snr reg\n"

L_.str.1:                               ## @.str.1
	.asciz	"read_status read error\n"

L_.str.2:                               ## @.str.2
	.asciz	"noise = 0x%02x, snr = %d.%02d dB\n"

	.no_dead_strip	_or51211_read_snr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function or51211_read_snr
lCPI0_0:
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_or51211_read_snr:                      ; @or51211_read_snr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	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, #24]
	ldr	x20, [x0]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp]
	mov	w8, #4
	str	w8, [sp, #8]
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	mov	w3, #3
	bl	_i2c_writebytes
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x20
	mov	w3, #2
	bl	_i2c_readbytes
	cbz	x0, LBB0_7
; %bb.3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_pr_warn
	mov	w0, #-1
LBB0_5:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	w0, [sp, #16]
	mov	w1, #11335
	movk	w1, #1367, lsl #16
	bl	_calculate_snr
	str	w0, [x20]
	asr	w8, w0, #16
	str	w8, [x19]
	ldr	w1, [sp, #16]
	ldr	w8, [x20]
	asr	w2, w8, #24
	ubfx	w8, w8, #8, #16
	mov	w9, #100
	mul	w8, w8, w9
	lsr	w3, w8, #16
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	mov	w0, #0
	b	LBB0_5
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error writing snr reg\n"

l_.str.1:                               ; @.str.1
	.asciz	"read_status read error\n"

l_.str.2:                               ; @.str.2
	.asciz	"noise = 0x%02x, snr = %d.%02d dB\n"

	.no_dead_strip	_or51211_read_snr
.subsections_via_symbols
