	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tosa_bat_remove
_tosa_bat_remove:                       ## @tosa_bat_remove
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_TOSA_GPIO_JACKET_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_to_irq
	movq	_tosa_bat_jacket@GOTPCREL(%rip), %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	_TOSA_GPIO_BAT1_CRG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_to_irq
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	_TOSA_GPIO_BAT0_CRG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gpio_to_irq
	movq	_tosa_bat_main@GOTPCREL(%rip), %rbx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movq	_tosa_bat_bu@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_power_supply_unregister
	movl	(%r14), %edi
	callq	_power_supply_unregister
	movl	(%rbx), %edi
	callq	_power_supply_unregister
	movq	_bat_work@GOTPCREL(%rip), %rdi
	callq	_cancel_work_sync
	movq	_tosa_bat_gpios@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_gpio_free_array
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TOSA_GPIO_JACKET_DETECT,4,2    ## @TOSA_GPIO_JACKET_DETECT
	.comm	_tosa_bat_jacket,4,2            ## @tosa_bat_jacket
	.comm	_TOSA_GPIO_BAT1_CRG,4,2         ## @TOSA_GPIO_BAT1_CRG
	.comm	_TOSA_GPIO_BAT0_CRG,4,2         ## @TOSA_GPIO_BAT0_CRG
	.comm	_tosa_bat_main,4,2              ## @tosa_bat_main
	.comm	_tosa_bat_bu,4,2                ## @tosa_bat_bu
	.comm	_bat_work,4,2                   ## @bat_work
	.comm	_tosa_bat_gpios,4,2             ## @tosa_bat_gpios
	.no_dead_strip	_tosa_bat_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tosa_bat_remove
_tosa_bat_remove:                       ; @tosa_bat_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _TOSA_GPIO_JACKET_DETECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TOSA_GPIO_JACKET_DETECT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gpio_to_irq
Lloh3:
	adrp	x19, _tosa_bat_jacket@GOTPAGE
Lloh4:
	ldr	x19, [x19, _tosa_bat_jacket@GOTPAGEOFF]
	mov	x1, x19
	bl	_free_irq
Lloh5:
	adrp	x8, _TOSA_GPIO_BAT1_CRG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TOSA_GPIO_BAT1_CRG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_gpio_to_irq
	mov	x1, x19
	bl	_free_irq
Lloh8:
	adrp	x8, _TOSA_GPIO_BAT0_CRG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TOSA_GPIO_BAT0_CRG@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_gpio_to_irq
Lloh11:
	adrp	x20, _tosa_bat_main@GOTPAGE
Lloh12:
	ldr	x20, [x20, _tosa_bat_main@GOTPAGEOFF]
	mov	x1, x20
	bl	_free_irq
Lloh13:
	adrp	x8, _tosa_bat_bu@GOTPAGE
Lloh14:
	ldr	x8, [x8, _tosa_bat_bu@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_power_supply_unregister
	ldr	w0, [x19]
	bl	_power_supply_unregister
	ldr	w0, [x20]
	bl	_power_supply_unregister
Lloh16:
	adrp	x0, _bat_work@GOTPAGE
Lloh17:
	ldr	x0, [x0, _bat_work@GOTPAGEOFF]
	bl	_cancel_work_sync
Lloh18:
	adrp	x8, _tosa_bat_gpios@GOTPAGE
Lloh19:
	ldr	x8, [x8, _tosa_bat_gpios@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x19
	bl	_gpio_free_array
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TOSA_GPIO_JACKET_DETECT,4,2    ; @TOSA_GPIO_JACKET_DETECT
	.comm	_tosa_bat_jacket,4,2            ; @tosa_bat_jacket
	.comm	_TOSA_GPIO_BAT1_CRG,4,2         ; @TOSA_GPIO_BAT1_CRG
	.comm	_TOSA_GPIO_BAT0_CRG,4,2         ; @TOSA_GPIO_BAT0_CRG
	.comm	_tosa_bat_main,4,2              ; @tosa_bat_main
	.comm	_tosa_bat_bu,4,2                ; @tosa_bat_bu
	.comm	_bat_work,4,2                   ; @bat_work
	.comm	_tosa_bat_gpios,4,2             ; @tosa_bat_gpios
	.no_dead_strip	_tosa_bat_remove
.subsections_via_symbols
