	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_f01_suspend
_rmi_f01_suspend:                       ## @rmi_f01_suspend
	.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
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movl	4(%rax), %eax
	movq	_RMI_F01_CTRL0_NOSLEEP_BIT@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movl	(%r13), %ecx
	movq	_RMI_F01_CTRL0_SLEEP_MODE_MASK@GOTPCREL(%rip), %r12
	orl	(%r12), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 4(%rbx)
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_device_may_wakeup
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_RMI_SLEEP_MODE_SENSOR_SLEEP@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_RMI_SLEEP_MODE_RESERVED1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	4(%rbx), %edx
	orl	(%rax), %edx
	movl	%edx, 4(%rbx)
	movq	8(%r14), %rdi
	movl	4(%r14), %esi
	callq	_rmi_write
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_err
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.6:
	movl	4(%rbx), %eax
	orl	(%r13), %eax
	jmp	LBB0_7
LBB0_5:
	movl	4(%rbx), %eax
LBB0_7:
	movl	(%r12), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_RMI_SLEEP_MODE_NORMAL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%rbx)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RMI_F01_CTRL0_NOSLEEP_BIT,4,2  ## @RMI_F01_CTRL0_NOSLEEP_BIT
	.comm	_RMI_F01_CTRL0_SLEEP_MODE_MASK,4,2 ## @RMI_F01_CTRL0_SLEEP_MODE_MASK
	.comm	_RMI_SLEEP_MODE_RESERVED1,4,2   ## @RMI_SLEEP_MODE_RESERVED1
	.comm	_RMI_SLEEP_MODE_SENSOR_SLEEP,4,2 ## @RMI_SLEEP_MODE_SENSOR_SLEEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write sleep mode: %d.\n"

	.comm	_RMI_SLEEP_MODE_NORMAL,4,2      ## @RMI_SLEEP_MODE_NORMAL
	.no_dead_strip	_rmi_f01_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_f01_suspend
_rmi_f01_suspend:                       ; @rmi_f01_suspend
	.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	x20, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x23, _RMI_F01_CTRL0_NOSLEEP_BIT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RMI_F01_CTRL0_NOSLEEP_BIT@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w9, w9, w8
	str	w9, [x0]
	ldr	w9, [x23]
Lloh2:
	adrp	x22, _RMI_F01_CTRL0_SLEEP_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RMI_F01_CTRL0_SLEEP_MODE_MASK@GOTPAGEOFF]
	ldr	w10, [x22]
	orr	w9, w9, w10
	bic	w8, w8, w9
	str	w8, [x0, #4]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_device_may_wakeup
Lloh4:
	adrp	x8, _RMI_SLEEP_MODE_SENSOR_SLEEP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RMI_SLEEP_MODE_SENSOR_SLEEP@GOTPAGEOFF]
Lloh6:
	adrp	x9, _RMI_SLEEP_MODE_RESERVED1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RMI_SLEEP_MODE_RESERVED1@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w2, w9, w8
	str	w2, [x19, #4]
	ldr	x0, [x20, #8]
	ldr	w1, [x20, #4]
	bl	_rmi_write
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.1:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x23]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19, #4]
LBB0_4:
	ldr	w9, [x22]
	bic	w8, w8, w9
Lloh10:
	adrp	x9, _RMI_SLEEP_MODE_NORMAL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RMI_SLEEP_MODE_NORMAL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_RMI_F01_CTRL0_NOSLEEP_BIT,4,2  ; @RMI_F01_CTRL0_NOSLEEP_BIT
	.comm	_RMI_F01_CTRL0_SLEEP_MODE_MASK,4,2 ; @RMI_F01_CTRL0_SLEEP_MODE_MASK
	.comm	_RMI_SLEEP_MODE_RESERVED1,4,2   ; @RMI_SLEEP_MODE_RESERVED1
	.comm	_RMI_SLEEP_MODE_SENSOR_SLEEP,4,2 ; @RMI_SLEEP_MODE_SENSOR_SLEEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write sleep mode: %d.\n"

	.comm	_RMI_SLEEP_MODE_NORMAL,4,2      ; @RMI_SLEEP_MODE_NORMAL
	.no_dead_strip	_rmi_f01_suspend
.subsections_via_symbols
