	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ms_sensors_convert_and_read    ## -- Begin function ms_sensors_convert_and_read
	.p2align	4, 0x90
_ms_sensors_convert_and_read:           ## @ms_sensors_convert_and_read
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	callq	_i2c_smbus_write_byte
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	leal	1000(%r13), %esi
	movl	%r13d, %edi
	callq	_usleep_range
	movq	_MS_SENSORS_NO_READ_CMD@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_2
## %bb.3:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_i2c_master_recv
	jmp	LBB0_4
LBB0_2:
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$3, %edx
	callq	_i2c_smbus_read_i2c_block_data
LBB0_4:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rdi
	callq	_be32_to_cpu
	sarl	$8, %eax
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	-48(%rbp), %rdi
	callq	_be32_to_cpu
	sarl	$8, %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MS_SENSORS_NO_READ_CMD,4,2     ## @MS_SENSORS_NO_READ_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ADC raw value : %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to make sensor adc conversion\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ms_sensors_convert_and_read    ; -- Begin function ms_sensors_convert_and_read
	.p2align	2
_ms_sensors_convert_and_read:           ; @ms_sensors_convert_and_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x23, x3
	mov	x21, x2
	mov	x20, x0
	str	xzr, [sp, #8]
	bl	_i2c_smbus_write_byte
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_6
LBB0_2:
	add	w1, w23, #1000
	mov	x0, x23
	bl	_usleep_range
Lloh2:
	adrp	x8, _MS_SENSORS_NO_READ_CMD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MS_SENSORS_NO_READ_CMD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.3:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #3
	bl	_i2c_master_recv
	mov	x22, x0
	tbz	w0, #31, LBB0_5
	b	LBB0_1
LBB0_4:
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	mov	w2, #3
	bl	_i2c_smbus_read_i2c_block_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_1
LBB0_5:
	ldr	x0, [sp, #8]
	bl	_be32_to_cpu
	asr	w2, w0, #8
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x0, [sp, #8]
	bl	_be32_to_cpu
	mov	w22, #0
	asr	w8, w0, #8
	str	w8, [x19]
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MS_SENSORS_NO_READ_CMD,4,2     ; @MS_SENSORS_NO_READ_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ADC raw value : %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to make sensor adc conversion\n"

.subsections_via_symbols
