	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fuel_gauge_set_property
_fuel_gauge_set_property:               ## @fuel_gauge_set_property
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	cmpl	$128, %ebx
	jne	LBB0_4
## %bb.1:
	cmpl	$16, (%r14)
	jb	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_AXP288_FG_LOW_CAP_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_fuel_gauge_reg_readb
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	andl	$240, %ebx
	movl	(%r14), %edx
	andl	$15, %edx
	orl	%ebx, %edx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_fuel_gauge_reg_writeb
	movl	%eax, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AXP288_FG_LOW_CAP_REG,4,2      ## @AXP288_FG_LOW_CAP_REG
	.no_dead_strip	_fuel_gauge_set_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fuel_gauge_set_property
_fuel_gauge_set_property:               ; @fuel_gauge_set_property
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	mov	x19, x0
	bl	_mutex_lock
	cmp	w21, #128
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #16
	b.lo	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh3:
	adrp	x22, _AXP288_FG_LOW_CAP_REG@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AXP288_FG_LOW_CAP_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_fuel_gauge_reg_readb
	mov	x21, x0
	tbnz	w0, #31, LBB0_3
; %bb.5:
	and	w2, w21, #0xf0
	ldr	w8, [x20]
	bfxil	w2, w8, #0, #4
	ldr	w1, [x22]
	mov	x0, x19
	bl	_fuel_gauge_reg_writeb
	mov	x21, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AXP288_FG_LOW_CAP_REG,4,2      ; @AXP288_FG_LOW_CAP_REG
	.no_dead_strip	_fuel_gauge_set_property
.subsections_via_symbols
