	.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, %r14
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr_2
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	shlq	$8, %rdx
	subq	%rax, %rdx
	movq	_ABIT_UGURU_FAN_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	movq	%rax, -48(%rbp)
	movq	_abituguru_bank2_min_threshold@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_6
## %bb.5:
	movq	_abituguru_bank2_max_threshold@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_6
## %bb.7:
	movq	%r15, %rbx
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	(%r12), %rdx
	movq	8(%r12), %rcx
	movq	(%rax,%rdx,8), %rdx
	movq	(%rdx,%rcx,8), %r13
	movq	-48(%rbp), %rsi
	cmpq	%rsi, %r13
	je	LBB0_10
## %bb.8:
	movq	%rsi, (%rdx,%rcx,8)
	movq	_ABIT_UGURU_SENSOR_BANK2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	$2, %rsi
	movq	(%r12), %rdx
	movq	(%rax,%rdx,8), %rcx
	movq	%r15, %rdi
	movl	$2, %r8d
	callq	_abituguru_write
	movq	8(%r12), %rcx
	cmpq	%rcx, %rax
	ja	LBB0_10
## %bb.9:
	movq	(%r15), %rax
	movq	(%r12), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%r13, (%rax,%rcx,8)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_10:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r14, %rax
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_11:
	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:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	cbnz	x0, LBB0_7
; %bb.1:
	ldr	x8, [sp, #8]
	lsl	x9, x8, #8
	sub	x8, x9, x8
Lloh0:
	adrp	x9, _ABIT_UGURU_FAN_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ABIT_UGURU_FAN_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w10, w10, #1
	add	x8, x8, w10, sxtw
	udiv	x8, x8, x9
	str	x8, [sp, #8]
Lloh3:
	adrp	x9, _abituguru_bank2_min_threshold@GOTPAGE
Lloh4:
	ldr	x9, [x9, _abituguru_bank2_min_threshold@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _abituguru_bank2_max_threshold@GOTPAGE
Lloh7:
	ldr	x10, [x10, _abituguru_bank2_max_threshold@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #2, hs
	b.ls	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_7
LBB0_3:
	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]
	ldr	x11, [sp, #8]
	cmp	x23, x11
	b.eq	LBB0_6
; %bb.4:
	str	x11, [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_6
; %bb.5:
	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_6:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	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
