	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_sbs_add
_acpi_sbs_add:                          ## @acpi_sbs_add
	.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	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	movl	8(%r14), %edi
	callq	_acpi_driver_data
	movl	%eax, 8(%r12)
	movq	%r14, 16(%r12)
	movq	%r14, %rdi
	callq	_acpi_device_name
	movq	_ACPI_SBS_DEVICE_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_acpi_device_class
	movq	_ACPI_SBS_CLASS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_strcpy
	movq	%r12, (%r14)
	movq	%r12, %rdi
	callq	_acpi_charger_add
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:
	movq	%r12, %rdi
	callq	_acpi_manager_get_info
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_acpi_battery_add
LBB0_10:
	movl	8(%r12), %edi
	movq	_acpi_sbs_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_acpi_smbus_register_callback
	testl	%r15d, %r15d
	jne	LBB0_13
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	testl	%r15d, %r15d
	je	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_acpi_sbs_remove
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, (%r12)
	movq	_MAX_SBS_BAT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %ecx
	btl	%ebx, %ecx
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_acpi_battery_add
	movl	(%r13), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ACPI_SBS_DEVICE_NAME,4,2       ## @ACPI_SBS_DEVICE_NAME
	.comm	_ACPI_SBS_CLASS,4,2             ## @ACPI_SBS_CLASS
	.comm	_MAX_SBS_BAT,4,2                ## @MAX_SBS_BAT
	.comm	_acpi_sbs_callback,4,2          ## @acpi_sbs_callback
	.no_dead_strip	_acpi_sbs_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_sbs_add
_acpi_sbs_add:                          ; @acpi_sbs_add
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	add	x0, x0, #24
	bl	_mutex_init
	ldr	w0, [x19, #8]
	bl	_acpi_driver_data
	str	w0, [x20, #8]
	str	x19, [x20, #16]
	mov	x0, x19
	bl	_acpi_device_name
Lloh3:
	adrp	x8, _ACPI_SBS_DEVICE_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_SBS_DEVICE_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_strcpy
	mov	x0, x19
	bl	_acpi_device_class
Lloh6:
	adrp	x8, _ACPI_SBS_CLASS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_SBS_CLASS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_strcpy
	str	x20, [x19]
	mov	x0, x20
	bl	_acpi_charger_add
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_acpi_manager_get_info
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x20
	mov	w1, #0
	bl	_acpi_battery_add
LBB0_4:
	ldr	w0, [x20, #8]
Lloh9:
	adrp	x8, _acpi_sbs_callback@GOTPAGE
Lloh10:
	ldr	x8, [x8, _acpi_sbs_callback@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_acpi_smbus_register_callback
	cbnz	w21, LBB0_6
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	cbz	w21, LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_acpi_sbs_remove
LBB0_7:
	mov	x0, x21
	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_8:
	mov	w8, #1
	str	w8, [x20]
Lloh15:
	adrp	x23, _MAX_SBS_BAT@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MAX_SBS_BAT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.9:
	mov	w22, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20, #4]
	lsr	w9, w9, w22
	tbz	w9, #0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_acpi_battery_add
	ldr	w8, [x23]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ACPI_SBS_DEVICE_NAME,4,2       ; @ACPI_SBS_DEVICE_NAME
	.comm	_ACPI_SBS_CLASS,4,2             ; @ACPI_SBS_CLASS
	.comm	_MAX_SBS_BAT,4,2                ; @MAX_SBS_BAT
	.comm	_acpi_sbs_callback,4,2          ; @acpi_sbs_callback
	.no_dead_strip	_acpi_sbs_add
.subsections_via_symbols
