	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_proc_acpi_sysfs_battery
_check_proc_acpi_sysfs_battery:         ## @check_proc_acpi_sysfs_battery
	.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
	subq	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -1096(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_proc_acpi_sysfs_battery_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	$0, -1080(%rbp)
	movl	$0, -1084(%rbp)
	movb	$0, -1072(%rbp)
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.1(%rip), %r9
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rbx, %rcx
	movq	%r15, %r8
	callq	_snprintf
	movq	%r14, %rdi
	callq	_filestream_exists
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	leaq	-1072(%rbp), %rdi
	leaq	-1080(%rbp), %rsi
	leaq	-1084(%rbp), %rdx
	callq	_filestream_read_file
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.2:
	movq	-1080(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	-1080(%rbp), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	$1, (%r12)
	movq	%r13, %r12
	jmp	LBB0_7
LBB0_6:
	movq	-1080(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movl	$1, (%r12)
LBB0_8:
	movq	-1080(%rbp), %rdi
	callq	_free
LBB0_9:
	movq	$0, -1080(%rbp)
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.5(%rip), %r9
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rbx, %rcx
	movq	%r15, %r8
	callq	_snprintf
	leaq	-1080(%rbp), %rsi
	leaq	-1084(%rbp), %rdx
	movq	%r14, %rdi
	callq	_filestream_read_file
	movq	-1080(%rbp), %rbx
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_atoi
	movq	-1096(%rbp), %rcx               ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_11:
	movq	%rbx, %rdi
	callq	_free
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_proc_acpi_sysfs_battery_path,8,3 ## @proc_acpi_sysfs_battery_path
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s/%s"

L_.str.1:                               ## @.str.1
	.asciz	"status"

L_.str.2:                               ## @.str.2
	.asciz	"Discharging"

L_.str.3:                               ## @.str.3
	.asciz	"Charging"

L_.str.4:                               ## @.str.4
	.asciz	"Full"

L_.str.5:                               ## @.str.5
	.asciz	"capacity"

	.no_dead_strip	_check_proc_acpi_sysfs_battery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_proc_acpi_sysfs_battery
_check_proc_acpi_sysfs_battery:         ; @check_proc_acpi_sysfs_battery
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #1056
	mov	x19, x4
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _proc_acpi_sysfs_battery_path@GOTPAGE
Lloh4:
	ldr	x8, [x8, _proc_acpi_sysfs_battery_path@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
	str	xzr, [sp, #16]
	str	wzr, [sp, #12]
	strb	wzr, [sp, #24]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
Lloh8:
	adrp	x5, l_.str.1@PAGE
Lloh9:
	add	x5, x5, l_.str.1@PAGEOFF
	add	x0, sp, #24
	mov	w1, #1024
	mov	x3, x21
	mov	x4, x20
	bl	_snprintf
	add	x0, sp, #24
	bl	_filestream_exists
	cbz	w0, LBB0_12
; %bb.1:
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #12
	bl	_filestream_read_file
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.2:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_9
; %bb.3:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strstr
	cbnz	x0, LBB0_7
; %bb.4:
	ldr	x0, [sp, #16]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x22]
	mov	x22, x23
	b	LBB0_7
LBB0_6:
	ldr	x0, [sp, #16]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x22]
LBB0_8:
	ldr	x0, [sp, #16]
	bl	_free
LBB0_9:
	str	xzr, [sp, #16]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
Lloh18:
	adrp	x5, l_.str.5@PAGE
Lloh19:
	add	x5, x5, l_.str.5@PAGEOFF
	add	x0, sp, #24
	mov	w1, #1024
	mov	x3, x21
	mov	x4, x20
	bl	_snprintf
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #12
	bl	_filestream_read_file
	ldr	x20, [sp, #16]
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_atoi
	str	w0, [x19]
LBB0_11:
	mov	x0, x20
	bl	_free
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_proc_acpi_sysfs_battery_path,8,3 ; @proc_acpi_sysfs_battery_path
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s/%s"

l_.str.1:                               ; @.str.1
	.asciz	"status"

l_.str.2:                               ; @.str.2
	.asciz	"Discharging"

l_.str.3:                               ; @.str.3
	.asciz	"Charging"

l_.str.4:                               ; @.str.4
	.asciz	"Full"

l_.str.5:                               ; @.str.5
	.asciz	"capacity"

	.no_dead_strip	_check_proc_acpi_sysfs_battery
.subsections_via_symbols
