	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wilco_charge_set_property
_wilco_charge_set_property:             ## @wilco_charge_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r14
	cmpl	$130, %ebx
	je	LBB0_10
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$128, %ebx
	jne	LBB0_13
## %bb.3:
	movl	(%r15), %edi
	callq	_psp_val_to_charge_mode
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_PID_CHARGE_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	jmp	LBB0_9
LBB0_10:
	movl	(%r15), %edx
	movq	_CHARGE_UPPER_LIMIT_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_13
## %bb.11:
	movq	_CHARGE_UPPER_LIMIT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jg	LBB0_13
## %bb.12:
	movq	_PID_CHARGE_UPPER_LIMIT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movl	(%r15), %edx
	movq	_CHARGE_LOWER_LIMIT_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_13
## %bb.6:
	movq	_CHARGE_LOWER_LIMIT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jg	LBB0_13
## %bb.7:
	movq	_PID_CHARGE_LOWER_LIMIT@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%r14, %rdi
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wilco_ec_set_byte_property     ## TAILCALL
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PID_CHARGE_MODE,4,2            ## @PID_CHARGE_MODE
	.comm	_CHARGE_LOWER_LIMIT_MIN,4,2     ## @CHARGE_LOWER_LIMIT_MIN
	.comm	_CHARGE_LOWER_LIMIT_MAX,4,2     ## @CHARGE_LOWER_LIMIT_MAX
	.comm	_PID_CHARGE_LOWER_LIMIT,4,2     ## @PID_CHARGE_LOWER_LIMIT
	.comm	_CHARGE_UPPER_LIMIT_MIN,4,2     ## @CHARGE_UPPER_LIMIT_MIN
	.comm	_CHARGE_UPPER_LIMIT_MAX,4,2     ## @CHARGE_UPPER_LIMIT_MAX
	.comm	_PID_CHARGE_UPPER_LIMIT,4,2     ## @PID_CHARGE_UPPER_LIMIT
	.no_dead_strip	_wilco_charge_set_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wilco_charge_set_property
_wilco_charge_set_property:             ; @wilco_charge_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
	cmp	w21, #130
	b.eq	LBB0_7
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #128
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x20]
	bl	_psp_val_to_charge_mode
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x2, x0
Lloh0:
	adrp	x8, _PID_CHARGE_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PID_CHARGE_MODE@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	ldr	w2, [x20]
Lloh2:
	adrp	x8, _CHARGE_LOWER_LIMIT_MIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHARGE_LOWER_LIMIT_MIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CHARGE_LOWER_LIMIT_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHARGE_LOWER_LIMIT_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w2, w8
	ccmp	w2, w9, #0, ge
	b.gt	LBB0_8
; %bb.6:
Lloh8:
	adrp	x8, _PID_CHARGE_LOWER_LIMIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PID_CHARGE_LOWER_LIMIT@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w2, [x20]
Lloh10:
	adrp	x8, _CHARGE_UPPER_LIMIT_MIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CHARGE_UPPER_LIMIT_MIN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _CHARGE_UPPER_LIMIT_MAX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHARGE_UPPER_LIMIT_MAX@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w2, w8
	ccmp	w2, w9, #0, ge
	b.le	LBB0_9
LBB0_8:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	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_9:
Lloh19:
	adrp	x8, _PID_CHARGE_UPPER_LIMIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PID_CHARGE_UPPER_LIMIT@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_wilco_ec_set_byte_property
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PID_CHARGE_MODE,4,2            ; @PID_CHARGE_MODE
	.comm	_CHARGE_LOWER_LIMIT_MIN,4,2     ; @CHARGE_LOWER_LIMIT_MIN
	.comm	_CHARGE_LOWER_LIMIT_MAX,4,2     ; @CHARGE_LOWER_LIMIT_MAX
	.comm	_PID_CHARGE_LOWER_LIMIT,4,2     ; @PID_CHARGE_LOWER_LIMIT
	.comm	_CHARGE_UPPER_LIMIT_MIN,4,2     ; @CHARGE_UPPER_LIMIT_MIN
	.comm	_CHARGE_UPPER_LIMIT_MAX,4,2     ; @CHARGE_UPPER_LIMIT_MAX
	.comm	_PID_CHARGE_UPPER_LIMIT,4,2     ; @PID_CHARGE_UPPER_LIMIT
	.no_dead_strip	_wilco_charge_set_property
.subsections_via_symbols
