	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adt7470_read_temperatures
_adt7470_read_temperatures:             ## @adt7470_read_temperatures
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%edi, %edi
	callq	_ADT7470_REG_PWM_CFG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movq	%rax, %r13
	movl	$2, %edi
	callq	_ADT7470_REG_PWM_CFG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ADT7470_FAN_COUNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_ADT7470_REG_PWM
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -64(%rbp,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	xorl	%edi, %edi
	callq	_ADT7470_REG_PWM_CFG
	movq	_ADT7470_PWM_AUTO_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	notl	%edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_write_byte_data
	movl	$2, %edi
	callq	_ADT7470_REG_PWM_CFG
	movl	(%rbx), %edx
	notl	%edx
	andl	-72(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_write_byte_data
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_ADT7470_REG_PWM
	movl	-64(%rbp,%rbx,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_write_byte_data
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_ADT7470_REG_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	orl	$128, %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_i2c_smbus_write_byte_data
	movl	(%r14), %eax
	testl	%eax, %eax
	jns	LBB0_7
## %bb.8:
	movq	_TEMP_COLLECTION_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_9
LBB0_7:
	imull	$200, %eax, %edi
LBB0_9:
	callq	_msleep_interruptible
	movq	%rax, %r15
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	andl	$-129, %eax
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_i2c_smbus_write_byte_data
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_ADT7470_REG_PWM_CFG
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_i2c_smbus_write_byte_data
	movl	$2, %edi
	callq	_ADT7470_REG_PWM_CFG
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_i2c_smbus_write_byte_data
	testq	%r15, %r15
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_11:
	cmpl	$0, (%r14)
	jns	LBB0_18
## %bb.12:
	movq	_ADT7470_TEMP_COUNT@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movslq	(%r15), %rcx
	movq	%rax, %rbx
	cmpq	%rcx, %rax
	jge	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_ADT7470_TEMP_REG
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	8(%r14), %rcx
	leaq	1(%rbx), %rax
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incl	%ebx
	movl	%ebx, (%r14)
	jmp	LBB0_16
LBB0_17:
	movl	$1, 4(%r14)
	xorl	%ebx, %ebx
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ADT7470_FAN_COUNT,4,2          ## @ADT7470_FAN_COUNT
	.comm	_ADT7470_PWM_AUTO_MASK,4,2      ## @ADT7470_PWM_AUTO_MASK
	.comm	_ADT7470_REG_CFG,4,2            ## @ADT7470_REG_CFG
	.comm	_TEMP_COLLECTION_TIME,4,2       ## @TEMP_COLLECTION_TIME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ha ha, interrupted\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ADT7470_TEMP_COUNT,4,2         ## @ADT7470_TEMP_COUNT
	.no_dead_strip	_adt7470_read_temperatures
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adt7470_read_temperatures
_adt7470_read_temperatures:             ; @adt7470_read_temperatures
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	w0, #0
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	mov	w0, #2
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
Lloh3:
	adrp	x24, _ADT7470_FAN_COUNT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ADT7470_FAN_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	add	x25, sp, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_ADT7470_REG_PWM
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	str	w0, [x25, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x24]
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_3:
	mov	w0, #0
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
Lloh5:
	adrp	x23, _ADT7470_PWM_AUTO_MASK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ADT7470_PWM_AUTO_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w2, w21, w8
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	mov	w0, #2
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
	ldr	w8, [x23]
	bic	w2, w22, w8
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x23, #0
	add	x25, sp, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_ADT7470_REG_PWM
	mov	x1, x0
	ldr	w2, [x25, x23, lsl #2]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	add	x23, x23, #1
	ldrsw	x8, [x24]
	cmp	x23, x8
	b.lt	LBB0_5
LBB0_6:
Lloh7:
	adrp	x24, _ADT7470_REG_CFG@GOTPAGE
Lloh8:
	ldr	x24, [x24, _ADT7470_REG_CFG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	orr	w2, w0, #0x80
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	ldr	w8, [x19]
	mov	w9, #200
	mul	w9, w8, w9
Lloh9:
	adrp	x10, _TEMP_COLLECTION_TIME@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TEMP_COLLECTION_TIME@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, #0
	csel	w0, w10, w9, lt
	bl	_msleep_interruptible
	mov	x23, x0
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	and	w2, w0, #0xffffff7f
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	mov	w0, #0
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
	mov	x0, x20
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	mov	w0, #2
	bl	_ADT7470_REG_PWM_CFG
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	bl	_i2c_smbus_write_byte_data
	cbz	x23, LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_8:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_16
LBB0_10:
Lloh17:
	adrp	x22, _ADT7470_TEMP_COUNT@GOTPAGE
Lloh18:
	ldr	x22, [x22, _ADT7470_TEMP_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x21, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ADT7470_TEMP_REG
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	ldr	x8, [x19, #8]
	lsl	x9, x21, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w8, w21, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_15:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_16:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ADT7470_FAN_COUNT,4,2          ; @ADT7470_FAN_COUNT
	.comm	_ADT7470_PWM_AUTO_MASK,4,2      ; @ADT7470_PWM_AUTO_MASK
	.comm	_ADT7470_REG_CFG,4,2            ; @ADT7470_REG_CFG
	.comm	_TEMP_COLLECTION_TIME,4,2       ; @TEMP_COLLECTION_TIME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ha ha, interrupted\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ADT7470_TEMP_COUNT,4,2         ; @ADT7470_TEMP_COUNT
	.no_dead_strip	_adt7470_read_temperatures
.subsections_via_symbols
