	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mc13783_pwrbutton_remove
_mc13783_pwrbutton_remove:              ## @mc13783_pwrbutton_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_platform_get_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_get_platdata
	movq	%rax, %r14
	movl	4(%r15), %edi
	callq	_mc13xxx_lock
	movq	_MC13783_BUTTON_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.1:
	movl	4(%r15), %edi
	movq	_MC13783_IRQ_ONOFD3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_mc13xxx_irq_free
	movl	(%rbx), %eax
LBB0_2:
	testl	%eax, 4(%r14)
	je	LBB0_4
## %bb.3:
	movl	4(%r15), %edi
	movq	_MC13783_IRQ_ONOFD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_mc13xxx_irq_free
	movl	(%rbx), %eax
LBB0_4:
	testl	%eax, 8(%r14)
	je	LBB0_6
## %bb.5:
	movl	4(%r15), %edi
	movq	_MC13783_IRQ_ONOFD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_mc13xxx_irq_free
LBB0_6:
	movl	4(%r15), %edi
	callq	_mc13xxx_unlock
	movl	(%r15), %edi
	callq	_input_unregister_device
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC13783_BUTTON_ENABLE,4,2      ## @MC13783_BUTTON_ENABLE
	.comm	_MC13783_IRQ_ONOFD3,4,2         ## @MC13783_IRQ_ONOFD3
	.comm	_MC13783_IRQ_ONOFD2,4,2         ## @MC13783_IRQ_ONOFD2
	.comm	_MC13783_IRQ_ONOFD1,4,2         ## @MC13783_IRQ_ONOFD1
	.no_dead_strip	_mc13783_pwrbutton_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mc13783_pwrbutton_remove
_mc13783_pwrbutton_remove:              ; @mc13783_pwrbutton_remove
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	mov	x0, x20
	bl	_dev_get_platdata
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_mc13xxx_lock
	ldr	w9, [x20]
Lloh0:
	adrp	x21, _MC13783_BUTTON_ENABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MC13783_BUTTON_ENABLE@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x8, _MC13783_IRQ_ONOFD3@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MC13783_IRQ_ONOFD3@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_mc13xxx_irq_free
	ldr	w8, [x21]
LBB0_2:
	ldr	w9, [x20, #4]
	tst	w8, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x8, _MC13783_IRQ_ONOFD2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MC13783_IRQ_ONOFD2@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_mc13xxx_irq_free
	ldr	w8, [x21]
LBB0_4:
	ldr	w9, [x20, #8]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x8, _MC13783_IRQ_ONOFD1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MC13783_IRQ_ONOFD1@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_mc13xxx_irq_free
LBB0_6:
	ldr	w0, [x19, #4]
	bl	_mc13xxx_unlock
	ldr	w0, [x19]
	bl	_input_unregister_device
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MC13783_BUTTON_ENABLE,4,2      ; @MC13783_BUTTON_ENABLE
	.comm	_MC13783_IRQ_ONOFD3,4,2         ; @MC13783_IRQ_ONOFD3
	.comm	_MC13783_IRQ_ONOFD2,4,2         ; @MC13783_IRQ_ONOFD2
	.comm	_MC13783_IRQ_ONOFD1,4,2         ; @MC13783_IRQ_ONOFD1
	.no_dead_strip	_mc13783_pwrbutton_remove
.subsections_via_symbols
