	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bat_set_property
_bat_set_property:                      ## @bat_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%ebx, %ebx
	cmpl	$128, %esi
	jne	LBB0_7
## %bb.1:
	movl	(%rdx), %esi
	testl	%esi, %esi
	js	LBB0_3
## %bb.2:
	movq	_BAT_CHARGE_LIMIT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jg	LBB0_3
## %bb.4:
	movq	_BAT_CHARGE_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ec_write
	testl	%eax, %eax
	jns	LBB0_7
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAT_CHARGE_LIMIT_MAX,4,2       ## @BAT_CHARGE_LIMIT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BAT_CHARGE_LIMIT,4,2           ## @BAT_CHARGE_LIMIT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_bat_set_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bat_set_property
_bat_set_property:                      ; @bat_set_property
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	cmp	w1, #128
	b.ne	LBB0_4
; %bb.1:
	ldr	w1, [x2]
	tbnz	w1, #31, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _BAT_CHARGE_LIMIT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAT_CHARGE_LIMIT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w1, w8
	b.gt	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _BAT_CHARGE_LIMIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BAT_CHARGE_LIMIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ec_write
	tbnz	w0, #31, LBB0_6
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BAT_CHARGE_LIMIT_MAX,4,2       ; @BAT_CHARGE_LIMIT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BAT_CHARGE_LIMIT,4,2           ; @BAT_CHARGE_LIMIT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_bat_set_property
.subsections_via_symbols
