	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_destroy_config                 ## -- Begin function destroy_config
	.p2align	4, 0x90
_destroy_config:                        ## @destroy_config
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EVENT_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.1:
	xorl	%ebx, %ebx
	movq	_events@GOTPCREL(%rip), %r13
	movq	_apmctl_fd@GOTPCREL(%rip), %r15
	leaq	-44(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, -44(%rbp)
	movl	(%r15), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_err
	jmp	LBB0_5
LBB0_7:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	$0, (%rcx,%rbx,8)
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	callq	_free_event_cmd_list
	movq	(%r13), %rcx
	movl	(%r12), %eax
	jmp	LBB0_11
LBB0_12:
	movq	_battery_watch_list@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rdi
	callq	_free_event_cmd_list
	movq	(%r14), %rdi
	movq	(%rdi), %rbx
	callq	_free
	movq	%rbx, (%r14)
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_13
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVENT_MAX,4,2                  ## @EVENT_MAX
	.comm	_events,8,3                     ## @events
	.comm	_apmctl_fd,4,2                  ## @apmctl_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot disable event 0x%x"

	.comm	_battery_watch_list,8,3         ## @battery_watch_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_destroy_config                 ; -- Begin function destroy_config
	.p2align	2
_destroy_config:                        ; @destroy_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x21, _EVENT_MAX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EVENT_MAX@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x19, #0
Lloh2:
	adrp	x22, _events@GOTPAGE
Lloh3:
	ldr	x22, [x22, _events@GOTPAGEOFF]
Lloh4:
	adrp	x23, _apmctl_fd@GOTPAGE
Lloh5:
	ldr	x23, [x23, _apmctl_fd@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	cmp	x19, w8, sxtw
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x9, [x9, x19, lsl #3]
	cbz	x9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w19, [sp, #12]
	ldr	w0, [x23]
	add	x1, sp, #12
	mov	w2, #4
	bl	_write
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	mov	x1, x20
	mov	x2, x19
	bl	_err
	b	LBB0_2
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x19, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	xzr, [x9, x19, lsl #3]
	add	x19, x19, #1
	cmp	x19, w8, sxtw
	b.ge	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	x0, [x9, x19, lsl #3]
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_free_event_cmd_list
	ldr	x9, [x22]
	ldr	w8, [x21]
	b	LBB0_9
LBB0_12:
Lloh8:
	adrp	x19, _battery_watch_list@GOTPAGE
Lloh9:
	ldr	x19, [x19, _battery_watch_list@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_14
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x8, #8]
	bl	_free_event_cmd_list
	ldr	x0, [x19]
	ldr	x20, [x0]
	bl	_free
	str	x20, [x19]
	ldr	x8, [x20]
	str	x8, [x19]
	cbnz	x8, LBB0_13
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EVENT_MAX,4,2                  ; @EVENT_MAX
	.comm	_events,8,3                     ; @events
	.comm	_apmctl_fd,4,2                  ; @apmctl_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot disable event 0x%x"

	.comm	_battery_watch_list,8,3         ; @battery_watch_list
.subsections_via_symbols
