	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads7846_remove
_ads7846_remove:                        ## @ads7846_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	%rdi, %r14
	callq	_spi_get_drvdata
	movq	%rax, %rbx
	movq	_ads784x_attr_group@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_sysfs_remove_group
	movq	%rbx, %rdi
	callq	_ads7846_disable
	movq	40(%rbx), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	movl	36(%rbx), %edi
	callq	_input_unregister_device
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ads784x_hwmon_unregister
	movl	32(%rbx), %edi
	callq	_regulator_put
	cmpl	$0, 28(%rbx)
	jne	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	callq	_gpio_free
LBB0_2:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	callq	*%rax
LBB0_4:
	movq	(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_kfree
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ads784x_attr_group,4,2         ## @ads784x_attr_group
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unregistered touchscreen\n"

	.no_dead_strip	_ads7846_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads7846_remove
_ads7846_remove:                        ; @ads7846_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
	mov	x19, x0
	bl	_spi_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x1, _ads784x_attr_group@GOTPAGE
Lloh1:
	ldr	x1, [x1, _ads784x_attr_group@GOTPAGEOFF]
	mov	x0, x19
	bl	_sysfs_remove_group
	mov	x0, x20
	bl	_ads7846_disable
	ldr	x8, [x20, #40]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
	ldr	w0, [x20, #36]
	bl	_input_unregister_device
	mov	x0, x19
	mov	x1, x20
	bl	_ads784x_hwmon_unregister
	ldr	w0, [x20, #32]
	bl	_regulator_put
	ldr	w8, [x20, #28]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
LBB0_2:
	ldr	w0, [x20, #8]
	blr	x8
LBB0_3:
	ldr	x0, [x20]
	bl	_kfree
	mov	x0, x20
	bl	_kfree
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x20, #24]
	bl	_gpio_free
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ads784x_attr_group,4,2         ; @ads784x_attr_group
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unregistered touchscreen\n"

	.no_dead_strip	_ads7846_remove
.subsections_via_symbols
