	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_disable_irq                ## -- Begin function rmi_disable_irq
	.p2align	4, 0x90
_rmi_disable_irq:                       ## @rmi_disable_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, %r13d
	movq	%rdi, %r15
	callq	_rmi_get_platform_data
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	$0, -48(%rbp)
	movl	(%r14), %r12d
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%rbx)
	je	LBB0_10
## %bb.1:
	movl	$0, (%rbx)
	movl	%r12d, %edi
	callq	_disable_irq
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.2:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_device_may_wakeup
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	%r12d, %edi
	callq	_enable_irq_wake
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_5:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_kfifo_is_empty
	testl	%eax, %eax
	je	LBB0_6
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-48(%rbp), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_kfifo_is_empty
	testl	%eax, %eax
	jne	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_kfifo_get
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %edi
	callq	_kfree
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable irq for wake: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rmi_disable_irq                ; -- Begin function rmi_disable_irq
	.p2align	2
_rmi_disable_irq:                       ; @rmi_disable_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_rmi_get_platform_data
	mov	x19, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x21, x0
	str	xzr, [sp, #8]
	ldr	w22, [x19]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	cbz	w8, LBB0_9
; %bb.1:
	str	wzr, [x21]
	mov	x0, x22
	bl	_disable_irq
	cbz	w23, LBB0_5
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_device_may_wakeup
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_enable_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, x20
	bl	_dev_warn
LBB0_5:
	add	x20, x21, #8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_kfifo_is_empty
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	bl	_kfifo_get
	cbz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #8]
	bl	_kfree
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable irq for wake: %d\n"

.subsections_via_symbols
