	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nes_process_aeq
_nes_process_aeq:                       ## @nes_process_aeq
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rsi), %r15
	movq	8(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %rbx
	movq	(%rbx,%r15,8), %rax
	movq	_NES_AEQE_MISC_IDX@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_le32_to_cpu
	movq	_NES_AEQE_VALID@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_7
## %bb.1:
	leaq	(%rbx,%r15,8), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NES_DBG_AEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shrq	$16, %r13
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_nes_debug
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	incq	%r15
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	movl	$0, %edx
	cmovaeq	%rdx, %r15
	movq	$0, (%rax,%rcx,8)
	movq	_NES_AEQ_ALLOC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_nes_write32
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	leaq	(%rax,%r15,8), %rbx
	movq	(%rax,%r15,8), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_le32_to_cpu
	movq	_NES_AEQE_VALID@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_le32_to_cpu
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	_NES_AEQE_COMP_QP_CQ_ID_IDX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_le32_to_cpu
	movq	_NES_AEQE_CQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_NES_AEQE_QP@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	testq	%r13, %rcx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_NES_FIRST_QPN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_nes_process_iwarp_aeqe
	jmp	LBB0_6
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_AEQE_MISC_IDX,8,3          ## @NES_AEQE_MISC_IDX
	.comm	_NES_AEQE_VALID,8,3             ## @NES_AEQE_VALID
	.comm	_NES_AEQE_COMP_QP_CQ_ID_IDX,8,3 ## @NES_AEQE_COMP_QP_CQ_ID_IDX
	.comm	_NES_AEQE_QP,8,3                ## @NES_AEQE_QP
	.comm	_NES_AEQE_CQ,8,3                ## @NES_AEQE_CQ
	.comm	_NES_FIRST_QPN,8,3              ## @NES_FIRST_QPN
	.comm	_NES_DBG_AEQ,4,2                ## @NES_DBG_AEQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Processing CQP related AE, misc = 0x%04X\n"

	.comm	_NES_AEQ_ALLOC,8,3              ## @NES_AEQ_ALLOC
	.no_dead_strip	_nes_process_aeq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nes_process_aeq
_nes_process_aeq:                       ; @nes_process_aeq
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	ldp	x24, x25, [x1]
	ldr	x8, [x1, #16]
	add	x21, x8, x24, lsl #3
	ldr	x8, [x21]
Lloh0:
	adrp	x26, _NES_AEQE_MISC_IDX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NES_AEQE_MISC_IDX@GOTPAGEOFF]
	ldr	x9, [x26]
	ldr	x0, [x8, x9, lsl #3]
	bl	_le32_to_cpu
Lloh2:
	adrp	x8, _NES_AEQE_VALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NES_AEQE_VALID@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_7
; %bb.1:
Lloh5:
	adrp	x22, _NES_AEQE_QP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _NES_AEQE_QP@GOTPAGEOFF]
Lloh7:
	adrp	x28, _NES_AEQE_CQ@GOTPAGE
Lloh8:
	ldr	x28, [x28, _NES_AEQE_CQ@GOTPAGEOFF]
Lloh9:
	adrp	x27, _NES_AEQ_ALLOC@GOTPAGE
Lloh10:
	ldr	x27, [x27, _NES_AEQ_ALLOC@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x8, _NES_DBG_AEQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NES_DBG_AEQ@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	lsr	x2, x23, #16
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_nes_debug
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x26]
	str	xzr, [x8, x9, lsl #3]
	add	x8, x24, #1
	cmp	x8, x25
	csinc	x24, xzr, x24, hs
	ldr	x8, [x20]
	ldr	x9, [x27]
	add	x0, x9, x8
	mov	w1, #65536
	bl	_nes_write32
	ldr	x8, [x19, #16]
	add	x21, x8, x24, lsl #3
	ldr	x8, [x21]
	ldr	x9, [x26]
	ldr	x0, [x8, x9, lsl #3]
	bl	_le32_to_cpu
Lloh16:
	adrp	x8, _NES_AEQE_VALID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NES_AEQE_VALID@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x26]
	ldr	x0, [x8, x9, lsl #3]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	x8, [x21]
Lloh19:
	adrp	x9, _NES_AEQE_COMP_QP_CQ_ID_IDX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NES_AEQE_COMP_QP_CQ_ID_IDX@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	bl	_le32_to_cpu
	ldr	x8, [x22]
	ldr	x9, [x28]
	orr	x8, x9, x8
	tst	x8, x23
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh22:
	adrp	x8, _NES_FIRST_QPN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _NES_FIRST_QPN@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lo	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_nes_process_iwarp_aeqe
	b	LBB0_3
LBB0_7:
	str	x24, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_AEQE_MISC_IDX,8,3          ; @NES_AEQE_MISC_IDX
	.comm	_NES_AEQE_VALID,8,3             ; @NES_AEQE_VALID
	.comm	_NES_AEQE_COMP_QP_CQ_ID_IDX,8,3 ; @NES_AEQE_COMP_QP_CQ_ID_IDX
	.comm	_NES_AEQE_QP,8,3                ; @NES_AEQE_QP
	.comm	_NES_AEQE_CQ,8,3                ; @NES_AEQE_CQ
	.comm	_NES_FIRST_QPN,8,3              ; @NES_FIRST_QPN
	.comm	_NES_DBG_AEQ,4,2                ; @NES_DBG_AEQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Processing CQP related AE, misc = 0x%04X\n"

	.comm	_NES_AEQ_ALLOC,8,3              ; @NES_AEQ_ALLOC
	.no_dead_strip	_nes_process_aeq
.subsections_via_symbols
