	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx8654_close
_sx8654_close:                          ## @sx8654_close
	.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
	callq	_input_get_drvdata
	movq	%rax, %rbx
	movq	16(%rax), %r14
	movl	4(%r14), %edi
	callq	_disable_irq
	movq	(%rbx), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_del_timer_sync
	movq	(%rbx), %rax
LBB0_2:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	_I2C_REG_TOUCH0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RATE_MANUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing command CMD_MANUAL failed"

	.comm	_I2C_REG_TOUCH0,4,2             ## @I2C_REG_TOUCH0
	.comm	_RATE_MANUAL,4,2                ## @RATE_MANUAL
L_.str.1:                               ## @.str.1
	.asciz	"writing to I2C_REG_TOUCH0 failed"

	.no_dead_strip	_sx8654_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx8654_close
_sx8654_close:                          ; @sx8654_close
	.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
	bl	_input_get_drvdata
	mov	x20, x0
	ldr	x19, [x0, #16]
	ldr	w0, [x19, #4]
	bl	_disable_irq
	ldr	x8, [x20]
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_2
; %bb.1:
	add	x0, x20, #8
	bl	_del_timer_sync
	ldr	x8, [x20]
LBB0_2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_write_byte
	cbz	w0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _I2C_REG_TOUCH0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_REG_TOUCH0@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _RATE_MANUAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RATE_MANUAL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	cbz	w0, LBB0_7
; %bb.5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing command CMD_MANUAL failed"

	.comm	_I2C_REG_TOUCH0,4,2             ; @I2C_REG_TOUCH0
	.comm	_RATE_MANUAL,4,2                ; @RATE_MANUAL
l_.str.1:                               ; @.str.1
	.asciz	"writing to I2C_REG_TOUCH0 failed"

	.no_dead_strip	_sx8654_close
.subsections_via_symbols
