	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EXI_Detach                     ## -- Begin function EXI_Detach
	.p2align	4, 0x90
_EXI_Detach:                            ## @EXI_Detach
	.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, %r15
	movq	_eximap@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	callq	__CPU_ISR_Disable
	movq	%r15, %rdx
	shlq	$4, %rdx
	movl	(%rbx,%rdx), %eax
	movq	_EXI_FLAG_ATTACH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$1, %r14d
	testl	%eax, %ecx
	je	LBB0_5
## %bb.1:
	movq	_EXI_FLAG_LOCKED@GOTPCREL(%rip), %rsi
	testl	%eax, (%rsi)
	je	LBB0_4
## %bb.2:
	movq	8(%rbx,%rdx), %rsi
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_3
LBB0_4:
	addq	%rdx, %rbx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	_IRQ_EXI0_EXI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IRQMASK
	movq	%rax, %rbx
	movq	_IRQ_EXI0_TC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IRQMASK
	orq	%rax, %rbx
	movq	_IRQ_EXI0_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IRQMASK
	orq	%rax, %rbx
	leal	(%r15,%r15,2), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shrq	%cl, %rbx
	movq	%rbx, %rdi
	callq	___MaskIrq
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	callq	__CPU_ISR_Restore
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eximap,8,3                     ## @eximap
	.comm	_EXI_FLAG_ATTACH,4,2            ## @EXI_FLAG_ATTACH
	.comm	_EXI_FLAG_LOCKED,4,2            ## @EXI_FLAG_LOCKED
	.comm	_EXI_DEVICE_0,8,3               ## @EXI_DEVICE_0
	.comm	_IRQ_EXI0_EXI,4,2               ## @IRQ_EXI0_EXI
	.comm	_IRQ_EXI0_TC,4,2                ## @IRQ_EXI0_TC
	.comm	_IRQ_EXI0_EXT,4,2               ## @IRQ_EXI0_EXT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EXI_Detach                     ; -- Begin function EXI_Detach
	.p2align	2
_EXI_Detach:                            ; @EXI_Detach
	.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
Lloh0:
	adrp	x8, _eximap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eximap@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	bl	__CPU_ISR_Disable
	add	x8, x20, x19, lsl #4
	ldr	w9, [x8]
Lloh3:
	adrp	x10, _EXI_FLAG_ATTACH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _EXI_FLAG_ATTACH@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x11, _EXI_FLAG_LOCKED@GOTPAGE
Lloh7:
	ldr	x11, [x11, _EXI_FLAG_LOCKED@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_3
; %bb.2:
	add	x11, x20, x19, lsl #4
	ldr	x11, [x11, #8]
Lloh9:
	adrp	x12, _EXI_DEVICE_0@GOTPAGE
Lloh10:
	ldr	x12, [x12, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_5
LBB0_3:
	bic	w9, w9, w10
	str	w9, [x8]
Lloh12:
	adrp	x8, _IRQ_EXI0_EXI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_EXI0_EXI@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_IRQMASK
	mov	x20, x0
Lloh15:
	adrp	x8, _IRQ_EXI0_TC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_EXI0_TC@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_IRQMASK
	orr	x20, x0, x20
Lloh18:
	adrp	x8, _IRQ_EXI0_EXT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQ_EXI0_EXT@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_IRQMASK
	orr	x8, x20, x0
	add	x9, x19, x19, lsl #1
	lsr	x0, x8, x9
	bl	___MaskIrq
LBB0_4:
	mov	w19, #1
	b	LBB0_6
LBB0_5:
	mov	x19, #0
LBB0_6:
	bl	__CPU_ISR_Restore
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_eximap,8,3                     ; @eximap
	.comm	_EXI_FLAG_ATTACH,4,2            ; @EXI_FLAG_ATTACH
	.comm	_EXI_FLAG_LOCKED,4,2            ; @EXI_FLAG_LOCKED
	.comm	_EXI_DEVICE_0,8,3               ; @EXI_DEVICE_0
	.comm	_IRQ_EXI0_EXI,4,2               ; @IRQ_EXI0_EXI
	.comm	_IRQ_EXI0_TC,4,2                ; @IRQ_EXI0_TC
	.comm	_IRQ_EXI0_EXT,4,2               ; @IRQ_EXI0_EXT
.subsections_via_symbols
