	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shtc1_update_values
_shtc1_update_values:                   ## @shtc1_update_values
	.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
	movl	%ecx, %r14d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movl	12(%rsi), %esi
	movq	_SHTC1_CMD_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_i2c_master_send
	cmpl	(%r15), %eax
	jne	LBB0_1
## %bb.2:
	cmpl	$0, 8(%r13)
	jne	LBB0_4
## %bb.3:
	movq	(%r13), %rdi
	leaq	1000(%rdi), %rsi
	callq	_usleep_range
LBB0_4:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_i2c_master_recv
	movl	%eax, %r15d
	xorl	%eax, %eax
	cmpl	%r14d, %r15d
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r15d, %r15d
	cmovsl	%r15d, %eax
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%ebx, %ebx
	cmovsl	%ebx, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHTC1_CMD_LENGTH,4,2           ## @SHTC1_CMD_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to send command: %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"failed to read values: %d\n"

	.no_dead_strip	_shtc1_update_values
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shtc1_update_values
_shtc1_update_values:                   ; @shtc1_update_values
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w1, [x1, #12]
Lloh0:
	adrp	x24, _SHTC1_CMD_LENGTH@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SHTC1_CMD_LENGTH@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_i2c_master_send
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x22, #8]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	x0, [x22]
	add	x1, x0, #1000
	bl	_usleep_range
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_i2c_master_recv
	cmp	w0, w20
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x23, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_err
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w23, #0
	csneg	w0, w23, w8, lt
	b	LBB0_7
LBB0_6:
	mov	x21, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w21, #0
	csneg	w0, w21, w8, lt
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SHTC1_CMD_LENGTH,4,2           ; @SHTC1_CMD_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to send command: %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"failed to read values: %d\n"

	.no_dead_strip	_shtc1_update_values
.subsections_via_symbols
