	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max31785_configure_dual_tach
_max31785_configure_dual_tach:          ## @max31785_configure_dual_tach
	.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	_MAX31785_NR_FAN_PAGES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	movq	_PMBUS_PAGE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpl	(%r12), %ebx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MFR_FAN_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_word_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MFR_FAN_CONFIG_DUAL_TACH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX31785_NR_PAGES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rbx, %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	movq	8(%r14), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	_PMBUS_HAVE_FAN12@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	%edx, (%rcx,%rax,4)
	movq	_PMBUS_PAGE_VIRTUAL@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	%edx, (%rcx,%rax,4)
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX31785_NR_FAN_PAGES,4,2      ## @MAX31785_NR_FAN_PAGES
	.comm	_PMBUS_PAGE,4,2                 ## @PMBUS_PAGE
	.comm	_MFR_FAN_CONFIG,4,2             ## @MFR_FAN_CONFIG
	.comm	_MFR_FAN_CONFIG_DUAL_TACH,4,2   ## @MFR_FAN_CONFIG_DUAL_TACH
	.comm	_MAX31785_NR_PAGES,4,2          ## @MAX31785_NR_PAGES
	.comm	_PMBUS_HAVE_FAN12,4,2           ## @PMBUS_HAVE_FAN12
	.comm	_PMBUS_PAGE_VIRTUAL,4,2         ## @PMBUS_PAGE_VIRTUAL
	.no_dead_strip	_max31785_configure_dual_tach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max31785_configure_dual_tach
_max31785_configure_dual_tach:          ; @max31785_configure_dual_tach
	.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
Lloh0:
	adrp	x22, _MAX31785_NR_FAN_PAGES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX31785_NR_FAN_PAGES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x21, #0
Lloh2:
	adrp	x23, _PMBUS_PAGE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PMBUS_PAGE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MFR_FAN_CONFIG@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MFR_FAN_CONFIG@GOTPAGEOFF]
Lloh6:
	adrp	x25, _MFR_FAN_CONFIG_DUAL_TACH@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MFR_FAN_CONFIG_DUAL_TACH@GOTPAGEOFF]
Lloh8:
	adrp	x26, _MAX31785_NR_PAGES@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MAX31785_NR_PAGES@GOTPAGEOFF]
Lloh10:
	adrp	x27, _PMBUS_HAVE_FAN12@GOTPAGE
Lloh11:
	ldr	x27, [x27, _PMBUS_HAVE_FAN12@GOTPAGEOFF]
Lloh12:
	adrp	x28, _PMBUS_PAGE_VIRTUAL@GOTPAGE
Lloh13:
	ldr	x28, [x28, _PMBUS_PAGE_VIRTUAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	add	x21, x21, #1
	cmp	w21, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
	tbnz	w0, #31, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x26]
	add	x8, x21, x8
	add	w9, w8, #1
	str	w9, [x19]
	ldr	w9, [x27]
	ldr	x10, [x19, #8]
	lsl	x8, x8, #2
	ldr	w11, [x10, x8]
	orr	w9, w11, w9
	str	w9, [x10, x8]
	ldr	w11, [x28]
	orr	w9, w11, w9
	str	w9, [x10, x8]
	b	LBB0_2
LBB0_7:
	mov	w0, #0
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX31785_NR_FAN_PAGES,4,2      ; @MAX31785_NR_FAN_PAGES
	.comm	_PMBUS_PAGE,4,2                 ; @PMBUS_PAGE
	.comm	_MFR_FAN_CONFIG,4,2             ; @MFR_FAN_CONFIG
	.comm	_MFR_FAN_CONFIG_DUAL_TACH,4,2   ; @MFR_FAN_CONFIG_DUAL_TACH
	.comm	_MAX31785_NR_PAGES,4,2          ; @MAX31785_NR_PAGES
	.comm	_PMBUS_HAVE_FAN12,4,2           ; @PMBUS_HAVE_FAN12
	.comm	_PMBUS_PAGE_VIRTUAL,4,2         ; @PMBUS_PAGE_VIRTUAL
	.no_dead_strip	_max31785_configure_dual_tach
.subsections_via_symbols
