	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_bank2_setting
_store_bank2_setting:                   ## @store_bank2_setting
	.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	%rcx, %r12
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	movq	_ABIT_UGURU_FAN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%esi
	movslq	%eax, %r13
	movq	_abituguru_bank2_min_threshold@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jg	LBB0_2
## %bb.1:
	movq	_abituguru_bank2_max_threshold@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	(%r14), %rdx
	movq	8(%r14), %rcx
	movq	(%rax,%rdx,8), %rdx
	movq	(%rdx,%rcx,8), %rsi
	cmpq	%r13, %rsi
	je	LBB0_6
## %bb.4:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, (%rdx,%rcx,8)
	movq	_ABIT_UGURU_SENSOR_BANK2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	$2, %rsi
	movq	(%r14), %rdx
	movq	(%rax,%rdx,8), %rcx
	movq	%r15, %rdi
	movl	$2, %r8d
	callq	_abituguru_write
	movq	8(%r14), %rcx
	cmpq	%rcx, %rax
	ja	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movq	(%r14), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
LBB0_6:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
LBB0_7:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABIT_UGURU_FAN_MAX,4,2         ## @ABIT_UGURU_FAN_MAX
	.comm	_abituguru_bank2_min_threshold,8,3 ## @abituguru_bank2_min_threshold
	.comm	_abituguru_bank2_max_threshold,8,3 ## @abituguru_bank2_max_threshold
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_ABIT_UGURU_SENSOR_BANK2,8,3    ## @ABIT_UGURU_SENSOR_BANK2
	.comm	_EIO,8,3                        ## @EIO
	.no_dead_strip	_store_bank2_setting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_bank2_setting
_store_bank2_setting:                   ; @store_bank2_setting
	.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	x19, x3
	mov	x22, x2
	mov	x21, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr_2
	mov	x20, x0
	mov	x0, x21
	bl	_dev_get_drvdata
	mov	x21, x0
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	lsl	w8, w0, #8
	sub	w8, w8, w0
Lloh0:
	adrp	x9, _ABIT_UGURU_FAN_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ABIT_UGURU_FAN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #0
	cinc	w10, w9, lt
	add	w8, w8, w10, asr #1
	sdiv	w8, w8, w9
	sxtw	x24, w8
Lloh3:
	adrp	x8, _abituguru_bank2_min_threshold@GOTPAGE
Lloh4:
	ldr	x8, [x8, _abituguru_bank2_min_threshold@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _abituguru_bank2_max_threshold@GOTPAGE
Lloh7:
	ldr	x9, [x9, _abituguru_bank2_max_threshold@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x24
	ccmp	x9, x24, #8, le
	b.ge	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_6
LBB0_2:
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21]
	ldp	x10, x9, [x20]
	ldr	x10, [x8, x10, lsl #3]
	ldr	x23, [x10, x9, lsl #3]
	cmp	x23, x24
	b.eq	LBB0_5
; %bb.3:
	str	x24, [x10, x9, lsl #3]
Lloh12:
	adrp	x9, _ABIT_UGURU_SENSOR_BANK2@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ABIT_UGURU_SENSOR_BANK2@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, #2
	ldr	x2, [x20]
	ldr	x3, [x8, x2, lsl #3]
	mov	x0, x21
	mov	w4, #2
	bl	_abituguru_write
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.hi	LBB0_5
; %bb.4:
	ldr	x9, [x21]
	ldr	x10, [x20]
	ldr	x9, [x9, x10, lsl #3]
	str	x23, [x9, x8, lsl #3]
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_5:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ABIT_UGURU_FAN_MAX,4,2         ; @ABIT_UGURU_FAN_MAX
	.comm	_abituguru_bank2_min_threshold,8,3 ; @abituguru_bank2_min_threshold
	.comm	_abituguru_bank2_max_threshold,8,3 ; @abituguru_bank2_max_threshold
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_ABIT_UGURU_SENSOR_BANK2,8,3    ; @ABIT_UGURU_SENSOR_BANK2
	.comm	_EIO,8,3                        ; @EIO
	.no_dead_strip	_store_bank2_setting
.subsections_via_symbols
