	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_tx
_submit_tx:                             ## @submit_tx
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	24(%rsi), %r13
	movq	%rsi, %rdi
	callq	_ahg_mode
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r15), %rbx
	andq	(%r15), %rbx
	movq	(%r13), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le64
	movq	48(%r15), %rcx
	leaq	(,%rbx,8), %r12
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, (%rcx)
	movq	(%r13), %rax
	movl	4(%rax), %esi
	movq	%r15, %rdi
	callq	_add_gen
	movl	%eax, %edi
	callq	_cpu_to_le64
	movq	48(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, 8(%rcx)
	movq	(%r13), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	addq	48(%r15), %r12
	movq	%r15, %rdi
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_trace_hfi1_sdma_descriptor
	movq	(%r15), %rbx
	movq	8(%r15), %rax
	incq	%rbx
	movq	%rbx, (%r15)
	andq	%rax, %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ecx
	cmpl	$2, %ecx
	jl	LBB0_6
## %bb.1:
	movq	_SDMA_AHG_APPLY_UPDATE1@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %ecx
	sarl	%ecx
	xorl	%edx, %edx
	cmpl	(%rax), %esi
	cmovgl	%ecx, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	$1, %r14d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_add_gen
	movl	%eax, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %edi
	callq	_cpu_to_le64
	movq	48(%r15), %rcx
	leaq	(,%rbx,8), %r8
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, 8(%rcx)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13,%r14,8), %rax
	movl	(%rax), %esi
	addq	48(%r15), %r8
	movq	%r15, %rdi
	movl	%r12d, %edx
	movq	%rbx, %rcx
	callq	_trace_hfi1_sdma_descriptor
	movq	(%r15), %rbx
	movq	8(%r15), %rax
	incq	%rbx
	movq	%rbx, (%r15)
	andq	%rax, %rbx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	incq	%r14
	cmpl	%ecx, %r14d
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r14,8), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le64
	movq	48(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, (%rcx)
	movq	(%r13,%r14,8), %rax
	movl	4(%rax), %r12d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_6:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, 8(%rsi)
	movq	16(%r15), %rdx
	movq	32(%r15), %r8
	leaq	1(%rdx), %rdi
	movq	%rdi, 16(%r15)
	andq	%rdx, %rax
	movq	%rsi, (%r8,%rax,8)
	subl	%ecx, 24(%r15)
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ## @SDMA_AHG_APPLY_UPDATE1
	.no_dead_strip	_submit_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_tx
_submit_tx:                             ; @submit_tx
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x1, #24]
	mov	x0, x1
	bl	_ahg_mode
	mov	x22, x0
	ldp	x8, x9, [x19]
	and	x21, x9, x8
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_cpu_to_le64
	ldr	x8, [x19, #48]
	lsl	x24, x21, #3
	ldr	x8, [x8, x24]
	str	x0, [x8]
	ldr	x8, [x23]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_add_gen
	bl	_cpu_to_le64
	ldr	x8, [x19, #48]
	ldr	x8, [x8, x24]
	str	x0, [x8, #8]
	ldr	x8, [x23]
	ldp	w1, w2, [x8]
	ldr	x8, [x19, #48]
	add	x4, x8, x24
	mov	x0, x19
	mov	x3, x21
	bl	_trace_hfi1_sdma_descriptor
	ldp	x9, x8, [x19]
	add	x9, x9, #1
	str	x9, [x19]
	and	x21, x8, x9
	ldr	w9, [x20]
	cmp	w9, #2
	b.lt	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w9, w22, #1
	cmp	w22, w8
	csel	w25, w9, wzr, gt
	mov	w24, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_add_gen
	mov	x22, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_cpu_to_le64
	ldr	x8, [x19, #48]
	lsl	x9, x21, #3
	ldr	x8, [x8, x9]
	str	x0, [x8, #8]
	ldr	x8, [x23, x24, lsl #3]
	ldr	w1, [x8]
	ldr	x8, [x19, #48]
	add	x4, x8, x9
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	bl	_trace_hfi1_sdma_descriptor
	ldp	x9, x8, [x19]
	add	x9, x9, #1
	str	x9, [x19]
	and	x21, x8, x9
	ldr	w9, [x20]
	add	x24, x24, #1
	cmp	w24, w9
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x22, x24, #3
	ldr	x8, [x23, x22]
	ldr	w0, [x8]
	bl	_cpu_to_le64
	ldr	x8, [x19, #48]
	ldr	x8, [x8, x21, lsl #3]
	str	x0, [x8]
	ldr	x8, [x23, x22]
	ldr	w22, [x8, #4]
	cbz	w25, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w25, w25, #1
	b	LBB0_3
LBB0_6:
	str	x21, [x20, #8]
	ldr	x10, [x19, #32]
	ldr	x11, [x19, #16]
	add	x12, x11, #1
	str	x12, [x19, #16]
	and	x8, x8, x11
	str	x20, [x10, x8, lsl #3]
	ldr	w8, [x19, #24]
	sub	w8, w8, w9
	str	w8, [x19, #24]
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ; @SDMA_AHG_APPLY_UPDATE1
	.no_dead_strip	_submit_tx
.subsections_via_symbols
