	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmp401_update_device_reg16
_tmp401_update_device_reg16:            ## @tmp401_update_device_reg16
	.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	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_tmp411@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	movq	%rdi, %r14
	sete	%dl
	movq	_tmp432@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	orq	$2, %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%rdx), %r13
	addq	$4, %r13
	xorl	%r12d, %r12d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rcx
	movq	_TMP401_TEMP_MSB_READ@GOTPCREL(%rip), %rax
	movq	_tmp432@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_TMP432_TEMP_MSB_READ@GOTPCREL(%rip), %rax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rax
	movl	(%rax,%r12,4), %esi
	movq	%r14, %rdi
	cmpq	$3, %r15
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	jns	LBB0_8
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=2
	callq	_i2c_smbus_read_word_swapped
	testl	%eax, %eax
	js	LBB0_11
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	%eax, %ecx
	shll	$8, %ecx
	cmpq	$3, %r15
	cmovnel	%eax, %ecx
	movq	8(%rbx), %rax
	movq	(%rax,%r15,8), %rax
	movl	%ecx, (%rax,%r12,4)
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%r12
	cmpq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	jne	LBB0_1
## %bb.10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tmp411,8,3                     ## @tmp411
	.comm	_tmp432,8,3                     ## @tmp432
	.comm	_TMP432_TEMP_MSB_READ,8,3       ## @TMP432_TEMP_MSB_READ
	.comm	_TMP401_TEMP_MSB_READ,8,3       ## @TMP401_TEMP_MSB_READ
	.no_dead_strip	_tmp401_update_device_reg16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmp401_update_device_reg16
_tmp401_update_device_reg16:            ; @tmp401_update_device_reg16
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	mov	x27, #0
	ldr	x25, [x1]
Lloh0:
	adrp	x8, _tmp411@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tmp411@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _tmp432@GOTPAGE
Lloh4:
	ldr	x21, [x21, _tmp432@GOTPAGEOFF]
	ldr	x26, [x21]
	mov	w9, #4
	mov	w10, #6
	cmp	x25, x8
	csel	x8, x10, x9, eq
	lsl	x22, x8, #3
Lloh5:
	adrp	x23, _TMP432_TEMP_MSB_READ@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TMP432_TEMP_MSB_READ@GOTPAGEOFF]
Lloh7:
	adrp	x24, _TMP401_TEMP_MSB_READ@GOTPAGE
Lloh8:
	ldr	x24, [x24, _TMP401_TEMP_MSB_READ@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	csel	x8, x23, x24, eq
	ldr	x8, [x8]
	ldr	x8, [x8, x27]
	ldr	w1, [x8]
	mov	x0, x20
	cmp	x27, #24
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_i2c_smbus_read_byte_data
	tbz	w0, #31, LBB0_4
	b	LBB0_17
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_i2c_smbus_read_word_swapped
	tbnz	w0, #31, LBB0_17
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	lsl	w8, w0, #8
	cmp	x27, #24
	csel	w8, w8, w0, eq
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x27]
	str	w8, [x9]
	add	x27, x27, #8
	cmp	x22, x27
	b.ne	LBB0_1
; %bb.5:
	mov	x27, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	csel	x8, x23, x24, eq
	ldr	x8, [x8]
	ldr	x8, [x8, x27]
	ldr	w1, [x8, #4]
	mov	x0, x20
	cmp	x27, #24
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_i2c_smbus_read_byte_data
	tbz	w0, #31, LBB0_9
	b	LBB0_17
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_i2c_smbus_read_word_swapped
	tbnz	w0, #31, LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	w8, w0, #8
	cmp	x27, #24
	csel	w8, w8, w0, eq
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x27]
	str	w8, [x9, #4]
	add	x27, x27, #8
	cmp	x22, x27
	b.ne	LBB0_6
; %bb.10:
	cmp	x25, x26
	b.ne	LBB0_16
; %bb.11:
	mov	x25, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	csel	x8, x23, x24, eq
	ldr	x8, [x8]
	ldr	x8, [x8, x25]
	ldr	w1, [x8, #8]
	mov	x0, x20
	cmp	x25, #24
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_i2c_smbus_read_byte_data
	tbz	w0, #31, LBB0_15
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_i2c_smbus_read_word_swapped
	tbnz	w0, #31, LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	lsl	w8, w0, #8
	cmp	x25, #24
	csel	w8, w8, w0, eq
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x25]
	str	w8, [x9, #8]
	add	x25, x25, #8
	cmp	x22, x25
	b.ne	LBB0_12
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_tmp411,8,3                     ; @tmp411
	.comm	_tmp432,8,3                     ; @tmp432
	.comm	_TMP432_TEMP_MSB_READ,8,3       ; @TMP432_TEMP_MSB_READ
	.comm	_TMP401_TEMP_MSB_READ,8,3       ; @TMP401_TEMP_MSB_READ
	.no_dead_strip	_tmp401_update_device_reg16
.subsections_via_symbols
