	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_enable_irq                 ## -- Begin function rmi_enable_irq
	.p2align	4, 0x90
_rmi_enable_irq:                        ## @rmi_enable_irq
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_rmi_get_platform_data
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movl	(%r15), %r12d
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%r13)
	jne	LBB0_7
## %bb.1:
	movl	%r12d, %edi
	callq	_enable_irq
	movl	$1, (%r13)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_device_may_wakeup
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	%r12d, %edi
	callq	_disable_irq_wake
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_5:
	movl	(%r15), %edi
	callq	_irq_get_trigger_type
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_rmi_process_interrupt_requests
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to disable irq for wake: %d\n"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_enable_irq                 ; -- Begin function rmi_enable_irq
	.p2align	2
_rmi_enable_irq:                        ; @rmi_enable_irq
	.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	x23, x1
	mov	x19, x0
	bl	_rmi_get_platform_data
	mov	x21, x0
	mov	x0, x19
	bl	_dev_get_drvdata
	mov	x24, x0
	ldr	w22, [x21]
	add	x20, x0, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x24]
	cbnz	w8, LBB0_7
; %bb.1:
	mov	x0, x22
	bl	_enable_irq
	mov	w8, #1
	str	w8, [x24]
	cbz	w23, LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_device_may_wakeup
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_disable_irq_wake
	cbz	w0, LBB0_5
; %bb.4:
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_5:
	ldr	w0, [x21]
	bl	_irq_get_trigger_type
Lloh2:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_rmi_process_interrupt_requests
LBB0_7:
	mov	x0, x20
	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
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to disable irq for wake: %d\n"

	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
.subsections_via_symbols
