	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_make_progress
_sdma_make_progress:                    ## @sdma_make_progress
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	callq	_sdma_gethead
	movl	%eax, %r15d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_get_txhead
	movq	%rax, %r13
	movl	4(%r12), %ebx
	andl	(%r12), %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%rax, %rcx
	callq	_trace_hfi1_sdma_progress
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	xorl	%r13d, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_trace_hfi1_sdma_progress
	incl	%r14d
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r15d, %ebx
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r12), %ebx
	movl	4(%r12), %eax
	incl	%ebx
	movl	%ebx, (%r12)
	andl	%eax, %ebx
	testq	%r13, %r13
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	%ebx, (%r13)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	24(%r12), %rcx
	movl	20(%r12), %edx
	leal	1(%rdx), %esi
	movl	%esi, 20(%r12)
	andl	%edx, %eax
	cltq
	movq	$0, (%rcx,%rax,8)
	movq	_SDMA_TXREQ_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_complete_tx
	movq	%r12, %rdi
	callq	_get_txhead
	movq	%rax, %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, 8(%r12)
	sete	%al
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orb	%al, %cl
	testb	$1, %cl
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%r12), %edi
	callq	_READ_ONCE
	andl	4(%r12), %eax
	cmpl	%r15d, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_HEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_read_sde_csr
	movq	%rax, %r15
	movb	$1, %al
	jmp	LBB0_1
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%r12)
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.13:
	movq	%r12, %rdi
	callq	_sdma_descq_freecnt
	movq	%r12, %rdi
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdma_desc_avail                ## TAILCALL
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_TXREQ_S_OK,4,2            ## @SDMA_TXREQ_S_OK
	.comm	_HEAD,4,2                       ## @HEAD
	.no_dead_strip	_sdma_make_progress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_make_progress
_sdma_make_progress:                    ; @sdma_make_progress
	.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
	bl	_sdma_gethead
	mov	x21, x0
	mov	x0, x19
	bl	_get_txhead
	mov	x22, x0
	ldp	w8, w9, [x19]
	and	w23, w9, w8
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_trace_hfi1_sdma_progress
	cmp	w23, w21
	b.ne	LBB0_7
; %bb.1:
	mov	w24, #0
LBB0_2:
	ldr	w8, [x19, #8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.3:
	ldr	w0, [x19, #16]
	bl	_READ_ONCE
	ldr	w8, [x19, #4]
	and	w8, w8, w0
	cmp	w8, w21
	b.eq	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _HEAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_SD
	mov	x1, x0
	mov	x0, x19
	bl	_read_sde_csr
	mov	x21, x0
	mov	x0, x19
	bl	_get_txhead
	mov	x22, x0
	ldp	w8, w9, [x19]
	and	w23, w9, w8
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_trace_hfi1_sdma_progress
	cmp	w23, w21
	b.ne	LBB0_13
LBB0_5:
	str	w20, [x19, #12]
	cbz	w24, LBB0_12
; %bb.6:
	mov	x0, x19
	bl	_sdma_descq_freecnt
	mov	x1, x0
	mov	x0, x19
	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
	b	_sdma_desc_avail
LBB0_7:
	mov	w24, #0
Lloh3:
	adrp	x25, _SDMA_TXREQ_S_OK@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SDMA_TXREQ_S_OK@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_trace_hfi1_sdma_progress
	add	w24, w24, #1
	cmp	w23, w21
	b.eq	LBB0_2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w8, [x19]
	add	w9, w9, #1
	str	w9, [x19]
	and	w23, w8, w9
	cbz	x22, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x22]
	cmp	w9, w23
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x19, #24]
	ldr	w10, [x19, #20]
	add	w11, w10, #1
	str	w11, [x19, #20]
	and	w8, w10, w8
	str	xzr, [x9, w8, sxtw #3]
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	_complete_tx
	mov	x0, x19
	bl	_get_txhead
	mov	x22, x0
	b	LBB0_8
LBB0_12:
	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
LBB0_13:
Lloh5:
	adrp	x25, _SDMA_TXREQ_S_OK@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SDMA_TXREQ_S_OK@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x22
	bl	_trace_hfi1_sdma_progress
	add	w24, w24, #1
	cmp	w23, w21
	b.eq	LBB0_5
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	w9, w8, [x19]
	add	w9, w9, #1
	str	w9, [x19]
	and	w23, w8, w9
	cbz	x22, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [x22]
	cmp	w9, w23
	b.ne	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x9, [x19, #24]
	ldr	w10, [x19, #20]
	add	w11, w10, #1
	str	w11, [x19, #20]
	and	w8, w10, w8
	str	xzr, [x9, w8, sxtw #3]
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	_complete_tx
	mov	x0, x19
	bl	_get_txhead
	mov	x22, x0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_TXREQ_S_OK,4,2            ; @SDMA_TXREQ_S_OK
	.comm	_HEAD,4,2                       ; @HEAD
	.no_dead_strip	_sdma_make_progress
.subsections_via_symbols
