	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gelic_card_reset_chain
_gelic_card_reset_chain:                ## @gelic_card_reset_chain
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdx, %rax
	cmpq	%rdx, 16(%rdx)
	je	LBB0_3
## %bb.1:
	movq	_GELIC_DESCR_DMA_CARDOWNED@GOTPCREL(%rip), %r12
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_gelic_descr_set_status
	movq	16(%rbx), %rax
	movl	8(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, (%rbx)
	leaq	24(%rbx), %rax
	cmpq	%r15, 40(%rbx)
	movq	%rax, %rbx
	jne	LBB0_2
LBB0_3:
	movq	%r15, 8(%r14)
	leaq	-24(%rax), %rcx
	movq	%rcx, (%r14)
	movq	$0, -24(%rax)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GELIC_DESCR_DMA_CARDOWNED,4,2  ## @GELIC_DESCR_DMA_CARDOWNED
	.no_dead_strip	_gelic_card_reset_chain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gelic_card_reset_chain
_gelic_card_reset_chain:                ; @gelic_card_reset_chain
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	ldr	x9, [x2, #16]
	mov	x8, x2
	cmp	x9, x2
	b.eq	LBB0_3
; %bb.1:
Lloh0:
	adrp	x22, _GELIC_DESCR_DMA_CARDOWNED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GELIC_DESCR_DMA_CARDOWNED@GOTPAGEOFF]
	mov	x21, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x21
	bl	_gelic_descr_set_status
	ldr	x8, [x21, #16]
	ldr	w0, [x8, #8]
	bl	_cpu_to_be32
	str	x0, [x21]
	add	x8, x21, #24
	ldr	x9, [x21, #40]
	mov	x21, x8
	cmp	x9, x20
	b.ne	LBB0_2
LBB0_3:
	str	xzr, [x8, #-24]!
	stp	x8, x20, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GELIC_DESCR_DMA_CARDOWNED,4,2  ; @GELIC_DESCR_DMA_CARDOWNED
	.no_dead_strip	_gelic_card_reset_chain
.subsections_via_symbols
