	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atlas_check_ec_calibration
_atlas_check_ec_calibration:            ## @atlas_check_ec_calibration
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	movq	_ATLAS_REG_EC_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movl	-24(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, -20(%rbp)
	movl	%eax, %ecx
	imulq	$1374389535, %rcx, %rdx         ## imm = 0x51EB851F
	shrq	$37, %rdx
	imull	$100, %edx, %ecx
	subl	%ecx, %eax
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%eax, %ecx
	callq	_dev_info
	movl	(%rbx), %edi
	movq	_ATLAS_REG_EC_CALIB_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movl	-20(%rbp), %ecx
	movq	_ATLAS_REG_EC_CALIB_STATUS_MASK@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_ATLAS_REG_EC_CALIB_STATUS_DRY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movl	-20(%rbp), %ecx
LBB0_6:
	movq	_ATLAS_REG_EC_CALIB_STATUS_SINGLE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_8:
	movq	_ATLAS_REG_EC_CALIB_STATUS_LOW@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movl	-20(%rbp), %ecx
LBB0_10:
	movq	_ATLAS_REG_EC_CALIB_STATUS_HIGH@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_13
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
LBB0_12:
	movq	%r14, %rdi
	callq	_dev_warn
	xorl	%eax, %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATLAS_REG_EC_PROBE,4,2         ## @ATLAS_REG_EC_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"probe set to K = %d.%.2d"

	.comm	_ATLAS_REG_EC_CALIB_STATUS,4,2  ## @ATLAS_REG_EC_CALIB_STATUS
	.comm	_ATLAS_REG_EC_CALIB_STATUS_MASK,4,2 ## @ATLAS_REG_EC_CALIB_STATUS_MASK
L_.str.1:                               ## @.str.1
	.asciz	"device has not been calibrated\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_DRY,4,2 ## @ATLAS_REG_EC_CALIB_STATUS_DRY
L_.str.2:                               ## @.str.2
	.asciz	"device missing dry point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_SINGLE,4,2 ## @ATLAS_REG_EC_CALIB_STATUS_SINGLE
L_.str.3:                               ## @.str.3
	.asciz	"device using single point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_LOW,4,2 ## @ATLAS_REG_EC_CALIB_STATUS_LOW
L_.str.4:                               ## @.str.4
	.asciz	"device missing low point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_HIGH,4,2 ## @ATLAS_REG_EC_CALIB_STATUS_HIGH
L_.str.5:                               ## @.str.5
	.asciz	"device missing high point calibration\n"

	.no_dead_strip	_atlas_check_ec_calibration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atlas_check_ec_calibration
_atlas_check_ec_calibration:            ; @atlas_check_ec_calibration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _ATLAS_REG_EC_PROBE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATLAS_REG_EC_PROBE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #2
	bl	_regmap_bulk_read
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w0, [sp, #8]
	bl	_be16_to_cpu
	str	w0, [sp, #12]
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	umull	x8, w0, w8
	lsr	x2, x8, #37
	mov	w8, #100
	msub	w3, w2, w8, w0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_info
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _ATLAS_REG_EC_CALIB_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATLAS_REG_EC_CALIB_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_14
; %bb.2:
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _ATLAS_REG_EC_CALIB_STATUS_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ATLAS_REG_EC_CALIB_STATUS_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh11:
	adrp	x9, _ATLAS_REG_EC_CALIB_STATUS_DRY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATLAS_REG_EC_CALIB_STATUS_DRY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w8, [sp, #12]
LBB0_5:
Lloh16:
	adrp	x9, _ATLAS_REG_EC_CALIB_STATUS_SINGLE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATLAS_REG_EC_CALIB_STATUS_SINGLE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_7:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh23:
	adrp	x9, _ATLAS_REG_EC_CALIB_STATUS_LOW@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ATLAS_REG_EC_CALIB_STATUS_LOW@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w8, [sp, #12]
LBB0_10:
Lloh28:
	adrp	x9, _ATLAS_REG_EC_CALIB_STATUS_HIGH@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ATLAS_REG_EC_CALIB_STATUS_HIGH@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.11:
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_dev_warn
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ATLAS_REG_EC_PROBE,4,2         ; @ATLAS_REG_EC_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"probe set to K = %d.%.2d"

	.comm	_ATLAS_REG_EC_CALIB_STATUS,4,2  ; @ATLAS_REG_EC_CALIB_STATUS
	.comm	_ATLAS_REG_EC_CALIB_STATUS_MASK,4,2 ; @ATLAS_REG_EC_CALIB_STATUS_MASK
l_.str.1:                               ; @.str.1
	.asciz	"device has not been calibrated\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_DRY,4,2 ; @ATLAS_REG_EC_CALIB_STATUS_DRY
l_.str.2:                               ; @.str.2
	.asciz	"device missing dry point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_SINGLE,4,2 ; @ATLAS_REG_EC_CALIB_STATUS_SINGLE
l_.str.3:                               ; @.str.3
	.asciz	"device using single point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_LOW,4,2 ; @ATLAS_REG_EC_CALIB_STATUS_LOW
l_.str.4:                               ; @.str.4
	.asciz	"device missing low point calibration\n"

	.comm	_ATLAS_REG_EC_CALIB_STATUS_HIGH,4,2 ; @ATLAS_REG_EC_CALIB_STATUS_HIGH
l_.str.5:                               ; @.str.5
	.asciz	"device missing high point calibration\n"

	.no_dead_strip	_atlas_check_ec_calibration
.subsections_via_symbols
