	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_setup_irq_domain
_rmi_setup_irq_domain:                  ## @rmi_setup_irq_domain
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_hid_get_drvdata
	movq	%rax, %r15
	movl	(%r14), %edi
	movq	_rmi_irq_ops@GOTPCREL(%rip), %rdx
	movl	$1, %esi
	movq	%rax, %rcx
	callq	_irq_domain_create_linear
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_rmi_irq_teardown@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_devm_add_action_or_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	8(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_irq_create_mapping
	movq	%rax, (%r15)
	testq	%rax, %rax
	jg	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_hid_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	cmovnsl	%ecx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rmi_irq_ops,4,2                ## @rmi_irq_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_rmi_irq_teardown,4,2           ## @rmi_irq_teardown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't allocate an IRQ\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_rmi_setup_irq_domain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_setup_irq_domain
_rmi_setup_irq_domain:                  ; @rmi_setup_irq_domain
	.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	_hid_get_drvdata
	mov	x20, x0
	ldr	w0, [x19]
Lloh0:
	adrp	x2, _rmi_irq_ops@GOTPAGE
Lloh1:
	ldr	x2, [x2, _rmi_irq_ops@GOTPAGEOFF]
	mov	w1, #1
	mov	x3, x20
	bl	_irq_domain_create_linear
	str	w0, [x20, #8]
	cbz	w0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x1, _rmi_irq_teardown@GOTPAGE
Lloh3:
	ldr	x1, [x1, _rmi_irq_teardown@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x20
	bl	_devm_add_action_or_reset
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x20, #8]
	mov	w1, #0
	bl	_irq_create_mapping
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	cmp	x8, #0
	b.gt	LBB0_5
; %bb.3:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_hid_err
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _ENXIO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENXIO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csneg	w0, w8, w9, lt
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_rmi_irq_ops,4,2                ; @rmi_irq_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_rmi_irq_teardown,4,2           ; @rmi_irq_teardown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate an IRQ\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_rmi_setup_irq_domain
.subsections_via_symbols
