	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_receive_interrupt       ## -- Begin function handle_receive_interrupt
	.p2align	4, 0x90
_handle_receive_interrupt:              ## @handle_receive_interrupt
	.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
	subq	$56, %rsp
	.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
	movq	48(%rdi), %r12
	movq	_RCV_PKT_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	24(%rdi), %eax
	movq	_HFI1_CTRL_CTXT@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpl	(%rcx), %eax
	setne	%r15b
	leaq	-88(%rbp), %rsi
	callq	_init_packet
	movl	28(%rbx), %edi
	movq	_DMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_HFI1_CAP_KGET_MASK
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	movq	%rbx, %rdi
	callq	_get_rcvhdrtail
	movq	%rax, %rcx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	cmpq	%rax, -88(%rbp)
	je	LBB0_2
## %bb.5:
	movb	%r15b, -56(%rbp)                ## 1-byte Spill
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_smp_rmb
	movl	24(%rbx), %eax
	movq	_HFI1_CTRL_CTXT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.6:
	movl	-72(%rbp), %edi
	callq	_rhf_rcv_seq
	xorl	%r15d, %r15d
	cmpq	(%rbx), %rax
	setne	%r15b
	jmp	LBB0_7
LBB0_1:
	movl	-72(%rbp), %edi
	callq	_rhf_rcv_seq
	cmpq	(%rbx), %rax
	jne	LBB0_2
## %bb.3:
	movb	%r15b, -56(%rbp)                ## 1-byte Spill
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
LBB0_7:
	leaq	-88(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_prescan_rxq
	movq	_RCV_PKT_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_33
## %bb.8:
	movb	-56(%rbp), %al                  ## 1-byte Reload
	movb	%al, %r13b
	leaq	8(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%r14d, %edi
	leaq	-88(%rbp), %rsi
	callq	_process_rcv_update
	xorl	%r13d, %r13d
	movq	_RCV_PKT_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_33
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_DROP_PACKET_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_xchg
	movq	_DROP_PACKET_ON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%al
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	$0, (%r12)
	movq	-88(%rbp), %rax
	addq	-80(%rbp), %rax
	movq	%rax, -88(%rbp)
	shlq	$2, %rax
	addq	40(%rbx), %rax
	movslq	8(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	movq	%rdi, -64(%rbp)
	callq	_rhf_to_cpu
	movl	%eax, -72(%rbp)
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	movq	_HLS_UP_ARMED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	leaq	-88(%rbp), %r15
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_set_armed_to_active
	testq	%rax, %rax
	jne	LBB0_34
LBB0_18:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_process_rcv_packet
	jmp	LBB0_19
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	leaq	-88(%rbp), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_skip_rcv_packet
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, %r14d
	xorl	%r15d, %r15d
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	28(%rbx), %edi
	movq	_DMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_HFI1_CAP_KGET_MASK
	testl	%eax, %eax
	je	LBB0_21
## %bb.25:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -88(%rbp)
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_RCV_PKT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_27:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	24(%rbx), %eax
	movq	_HFI1_CTRL_CTXT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-72(%rbp), %edi
	callq	_rhf_rcv_seq
	movq	(%rbx), %rdx
	leaq	1(%rdx), %rcx
	cmpq	$13, %rdx
	movl	$1, %edx
	cmovgeq	%rdx, %rcx
	movq	%rcx, (%rbx)
	testl	%r14d, %r14d
	je	LBB0_29
LBB0_30:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%r13d, %r13d
	je	LBB0_32
LBB0_31:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dd_dev_info
	movl	24(%rbx), %esi
	movq	%r12, %rdi
	callq	_set_dma_rtail
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-72(%rbp), %edi
	callq	_rhf_rcv_seq
	movq	(%rbx), %rcx
	leaq	1(%rcx), %rdx
	cmpq	$13, %rcx
	movl	$1, %ecx
	cmovgeq	%rcx, %rdx
	movq	%rdx, (%rbx)
	cmpq	%rdx, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_RCV_PKT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_23:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%r13d, %r13d
	je	LBB0_32
## %bb.24:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dd_dev_info
	movl	24(%rbx), %esi
	movq	%r12, %rdi
	callq	_set_nodma_rtail
	jmp	LBB0_32
LBB0_29:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rcx, %rax
	movl	$1, %eax
	cmovnel	%eax, %r15d
	testl	%r13d, %r13d
	jne	LBB0_31
	jmp	LBB0_32
LBB0_2:
	movq	_RCV_PKT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_34
LBB0_33:
	leaq	-88(%rbp), %rdi
	callq	_process_rcv_qp_work
	movq	-88(%rbp), %rax
	movq	%rax, 16(%rbx)
LBB0_34:
	leaq	-88(%rbp), %rdi
	callq	_finish_packet
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCV_PKT_OK,4,2                 ## @RCV_PKT_OK
	.comm	_HFI1_CTRL_CTXT,4,2             ## @HFI1_CTRL_CTXT
	.comm	_DMA_RTAIL,4,2                  ## @DMA_RTAIL
	.comm	_RCV_PKT_DONE,4,2               ## @RCV_PKT_DONE
	.comm	_DROP_PACKET_OFF,4,2            ## @DROP_PACKET_OFF
	.comm	_DROP_PACKET_ON,8,3             ## @DROP_PACKET_ON
	.comm	_HLS_UP_ARMED,8,3               ## @HLS_UP_ARMED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Switching to NO_DMA_RTAIL\n"

L_.str.1:                               ## @.str.1
	.asciz	"Switching to DMA_RTAIL\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_receive_interrupt       ; -- Begin function handle_receive_interrupt
	.p2align	2
_handle_receive_interrupt:              ; @handle_receive_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	mov	x20, x0
	ldr	x22, [x0, #48]
Lloh0:
	adrp	x27, _RCV_PKT_OK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _RCV_PKT_OK@GOTPAGEOFF]
	ldr	w19, [x27]
	ldr	w8, [x0, #24]
Lloh2:
	adrp	x9, _HFI1_CTRL_CTXT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HFI1_CTRL_CTXT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w26, ne
	add	x1, sp, #16
	bl	_init_packet
	ldr	w0, [x20, #28]
Lloh5:
	adrp	x25, _DMA_RTAIL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DMA_RTAIL@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_HFI1_CAP_KGET_MASK
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_get_rcvhdrtail
	ldr	x8, [sp, #16]
	cmp	x8, x0
	b.eq	LBB0_6
; %bb.2:
	mov	x23, x0
	bl	_smp_rmb
	ldr	w8, [x20, #24]
Lloh7:
	adrp	x9, _HFI1_CTRL_CTXT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HFI1_CTRL_CTXT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.3:
	ldr	w0, [sp, #32]
	bl	_rhf_rcv_seq
	ldr	x8, [x20]
	cmp	x0, x8
	cset	w21, ne
	b	LBB0_8
LBB0_4:
	ldr	w0, [sp, #32]
	bl	_rhf_rcv_seq
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w21, #0
	mov	x23, #0
	b	LBB0_8
LBB0_6:
Lloh10:
	adrp	x8, _RCV_PKT_DONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RCV_PKT_DONE@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
	b	LBB0_29
LBB0_7:
	mov	w21, #0
LBB0_8:
	add	x1, sp, #16
	mov	x0, x20
	bl	_prescan_rxq
	ldr	w8, [x27]
	cmp	w19, w8
	b.ne	LBB0_28
; %bb.9:
	add	x24, x22, #8
Lloh13:
	adrp	x28, _RCV_PKT_DONE@GOTPAGE
Lloh14:
	ldr	x28, [x28, _RCV_PKT_DONE@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x1, sp, #16
	mov	x0, x19
	bl	_process_rcv_update
	mov	w26, #0
	ldr	w8, [x27]
	cmp	w19, w8
	b.ne	LBB0_28
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
Lloh15:
	adrp	x8, _DROP_PACKET_OFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DROP_PACKET_OFF@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_atomic_xchg
Lloh18:
	adrp	x8, _DROP_PACKET_ON@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DROP_PACKET_ON@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	str	xzr, [x22]
	ldp	x9, x8, [sp, #16]
	add	x8, x9, x8
	ldr	x9, [x20, #40]
	add	x9, x9, x8, lsl #2
	ldrsw	x10, [x20, #8]
	add	x0, x9, x10, lsl #2
	str	x8, [sp, #16]
	str	x0, [sp, #40]
	bl	_rhf_to_cpu
	str	w0, [sp, #32]
	b	LBB0_21
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w21, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _HLS_UP_ARMED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HLS_UP_ARMED@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x1, sp, #16
	mov	x0, x20
	mov	x2, x22
	bl	_set_armed_to_active
	cbnz	x0, LBB0_29
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x0, sp, #16
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_process_rcv_packet
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x0, sp, #16
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_skip_rcv_packet
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x19, x0
	mov	w21, #0
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x20, #28]
	ldr	w1, [x25]
	bl	_HFI1_CAP_KGET_MASK
	cbz	w0, LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #16]
	ldr	w9, [x28]
	cmp	x8, x23
	csel	w19, w9, w19, eq
	ldr	w8, [x20, #24]
Lloh24:
	adrp	x9, _HFI1_CTRL_CTXT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _HFI1_CTRL_CTXT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #32]
	bl	_rhf_rcv_seq
	ldr	x8, [x20]
	cmp	x8, #12
	mov	w9, #1
	csinc	x8, x9, x8, gt
	str	x8, [x20]
	cmp	x0, x8
	csinc	w8, w21, wzr, eq
	cmp	w19, #0
	csel	w21, w21, w8, ne
LBB0_24:                                ;   in Loop: Header=BB0_11 Depth=1
	cbz	w26, LBB0_10
; %bb.25:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dd_dev_info
	ldr	w1, [x20, #24]
	mov	x0, x22
	bl	_set_dma_rtail
	b	LBB0_10
LBB0_26:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #32]
	bl	_rhf_rcv_seq
	ldr	x8, [x20]
	cmp	x8, #12
	mov	w9, #1
	csinc	x8, x9, x8, gt
	str	x8, [x20]
	ldr	w9, [x28]
	cmp	x0, x8
	csel	w19, w19, w9, eq
	cbz	w26, LBB0_10
; %bb.27:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dd_dev_info
	ldr	w1, [x20, #24]
	mov	x0, x22
	bl	_set_nodma_rtail
	b	LBB0_10
LBB0_28:
	add	x0, sp, #16
	bl	_process_rcv_qp_work
	ldr	x8, [sp, #16]
	str	x8, [x20, #16]
LBB0_29:
	add	x0, sp, #16
	bl	_finish_packet
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_RCV_PKT_OK,4,2                 ; @RCV_PKT_OK
	.comm	_HFI1_CTRL_CTXT,4,2             ; @HFI1_CTRL_CTXT
	.comm	_DMA_RTAIL,4,2                  ; @DMA_RTAIL
	.comm	_RCV_PKT_DONE,4,2               ; @RCV_PKT_DONE
	.comm	_DROP_PACKET_OFF,4,2            ; @DROP_PACKET_OFF
	.comm	_DROP_PACKET_ON,8,3             ; @DROP_PACKET_ON
	.comm	_HLS_UP_ARMED,8,3               ; @HLS_UP_ARMED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Switching to NO_DMA_RTAIL\n"

l_.str.1:                               ; @.str.1
	.asciz	"Switching to DMA_RTAIL\n"

.subsections_via_symbols
