	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atpic_handle_intr              ## -- Begin function atpic_handle_intr
	.p2align	4, 0x90
_atpic_handle_intr:                     ## @atpic_handle_intr
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_NUM_ISA_IRQS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	seta	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_atintrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %r15
	andq	$-9, %rbx
	cmpq	$7, %rbx
	jne	LBB0_4
## %bb.1:
	cmpq	$0, 8(%rax,%rcx)
	jne	LBB0_4
## %bb.2:
	movq	(%r15), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_spinlock_enter
	movq	_OCW3_SEL@GOTPCREL(%rip), %rax
	movq	_OCW3_RR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%rax), %esi
	movq	_OCW3_RIS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%ebx, %edi
	callq	_outb
	movl	%ebx, %edi
	callq	_inb
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	_OCW3_SEL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%ebx, %edi
	callq	_outb
	xorl	%eax, %eax
	callq	_spinlock_exit
	movl	$7, %edi
	callq	_IRQ_MASK
	testl	%r12d, %eax
	je	LBB0_3
LBB0_4:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intr_execute_handlers          ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_ISA_IRQS,8,3               ## @NUM_ISA_IRQS
	.comm	_atintrs,8,3                    ## @atintrs
	.comm	_OCW3_SEL,4,2                   ## @OCW3_SEL
	.comm	_OCW3_RR,4,2                    ## @OCW3_RR
	.comm	_OCW3_RIS,4,2                   ## @OCW3_RIS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atpic_handle_intr              ; -- Begin function atpic_handle_intr
	.p2align	2
_atpic_handle_intr:                     ; @atpic_handle_intr
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _NUM_ISA_IRQS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_ISA_IRQS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	cset	w0, hi
	mov	x1, x21
	bl	_KASSERT
Lloh3:
	adrp	x8, _atintrs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _atintrs@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x20, x8, x21, lsl #4
	and	x8, x21, #0xfffffffffffffff7
	cmp	x8, #7
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x20]
	ldr	w21, [x8]
	bl	_spinlock_enter
Lloh6:
	adrp	x23, _OCW3_SEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _OCW3_SEL@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh8:
	adrp	x24, _OCW3_RR@GOTPAGE
Lloh9:
	ldr	x24, [x24, _OCW3_RR@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _OCW3_RIS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _OCW3_RIS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_outb
	mov	x0, x21
	bl	_inb
	mov	x22, x0
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_outb
	bl	_spinlock_exit
	mov	w0, #7
	bl	_IRQ_MASK
	tst	w0, w22
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	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	_intr_execute_handlers
LBB0_4:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_ISA_IRQS,8,3               ; @NUM_ISA_IRQS
	.comm	_atintrs,8,3                    ; @atintrs
	.comm	_OCW3_SEL,4,2                   ; @OCW3_SEL
	.comm	_OCW3_RR,4,2                    ; @OCW3_RR
	.comm	_OCW3_RIS,4,2                   ; @OCW3_RIS
.subsections_via_symbols
