	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wilco_charge_get_property
_wilco_charge_get_property:             ## @wilco_charge_get_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	addl	$-128, %ebx
	cmpl	$3, %ebx
	jae	LBB0_1
## %bb.3:
	movslq	%ebx, %rcx
	leaq	l_switch.table.wilco_charge_get_property(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movq	(%rcx), %rbx
	leaq	-20(%rbp), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_wilco_ec_get_byte_property
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	_PID_CHARGE_MODE@GOTPCREL(%rip), %rcx
	movl	-20(%rbp), %eax
	cmpq	(%rcx), %rbx
	jne	LBB0_7
## %bb.5:
	movl	%eax, %edi
	callq	_charge_mode_to_psp_val
	testl	%eax, %eax
	js	LBB0_6
LBB0_7:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_PID_CHARGE_MODE,8,3            ## @PID_CHARGE_MODE
	.comm	_PID_CHARGE_LOWER_LIMIT,8,3     ## @PID_CHARGE_LOWER_LIMIT
	.comm	_PID_CHARGE_UPPER_LIMIT,8,3     ## @PID_CHARGE_UPPER_LIMIT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.no_dead_strip	_wilco_charge_get_property
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.wilco_charge_get_property
l_switch.table.wilco_charge_get_property:
	.quad	_PID_CHARGE_MODE
	.quad	_PID_CHARGE_LOWER_LIMIT
	.quad	_PID_CHARGE_UPPER_LIMIT

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wilco_charge_get_property
_wilco_charge_get_property:             ; @wilco_charge_get_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	bl	_power_supply_get_drvdata
	sub	w8, w20, #128
	cmp	w8, #3
	b.hs	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.wilco_charge_get_property@PAGE
Lloh1:
	add	x9, x9, l_switch.table.wilco_charge_get_property@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	x20, [x8]
	add	x2, sp, #12
	mov	x1, x20
	bl	_wilco_ec_get_byte_property
	tbnz	w0, #31, LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _PID_CHARGE_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PID_CHARGE_MODE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x8]
	ldr	w8, [sp, #12]
	cmp	x20, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x8
	bl	_charge_mode_to_psp_val
	mov	x8, x0
	tbnz	w0, #31, LBB0_8
LBB0_4:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
Lloh7:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PID_CHARGE_MODE,8,3            ; @PID_CHARGE_MODE
	.comm	_PID_CHARGE_LOWER_LIMIT,8,3     ; @PID_CHARGE_LOWER_LIMIT
	.comm	_PID_CHARGE_UPPER_LIMIT,8,3     ; @PID_CHARGE_UPPER_LIMIT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.no_dead_strip	_wilco_charge_get_property
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.wilco_charge_get_property
l_switch.table.wilco_charge_get_property:
	.quad	_PID_CHARGE_MODE
	.quad	_PID_CHARGE_LOWER_LIMIT
	.quad	_PID_CHARGE_UPPER_LIMIT

.subsections_via_symbols
