	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gelic_card_init_chain
_gelic_card_init_chain:                 ## @gelic_card_init_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	%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	%ecx, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %edx
	shll	$5, %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_memset
	testl	%r12d, %r12d
	jle	LBB0_15
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	negl	%eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r13), %rbx
	movq	_GELIC_DESCR_DMA_NOT_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gelic_descr_set_status
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ctodev
	movq	_GELIC_DESCR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_dma_map_single
	movq	%rax, (%r13,%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%r13), %rax
	addq	$32, %rax
	movq	%rax, 16(%r13,%r15)
	leaq	(%r15,%r13), %rax
	addq	$-32, %rax
	movq	%rax, 24(%r13,%r15)
	addq	$32, %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%r14d, %eax
	incl	%eax
	movl	%r14d, %ecx
	incl	%ecx
	movl	%ecx, %r14d
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.10:
	movq	%r13, -16(%r13,%r15)
	leaq	(%r15,%r13), %rax
	addq	$-32, %rax
	movq	%rax, 24(%r13)
	movq	%r13, %rbx
	testl	%r12d, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_13
## %bb.11:
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	callq	_cpu_to_be32
	movq	%rax, 8(%rbx)
	addq	$32, %rbx
	decl	%r12d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_15:
	leaq	-32(%r13), %rax
	movq	%r13, -16(%r13)
	movq	%rax, 24(%r13)
	movq	%r13, %rbx
LBB0_13:
	movq	%r13, 8(%r14)
	movq	%r13, (%r14)
	movq	$0, -24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_3:
	cmpl	$1, %r14d
	jne	LBB0_4
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	(%r15,%r13), %rbx
	addq	$-32, %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	decl	%r14d
	addq	$-32, %rbx
	cmpl	$1, %r14d
	jle	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ctodev
	movq	(%rbx), %rsi
	movq	_GELIC_DESCR_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_single
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GELIC_DESCR_DMA_NOT_IN_USE,4,2 ## @GELIC_DESCR_DMA_NOT_IN_USE
	.comm	_GELIC_DESCR_SIZE,4,2           ## @GELIC_DESCR_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_gelic_card_init_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_init_chain
_gelic_card_init_chain:                 ; @gelic_card_init_chain
	.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	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	lsl	w2, w3, #5
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w27, #0
Lloh0:
	adrp	x28, _GELIC_DESCR_DMA_NOT_IN_USE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GELIC_DESCR_DMA_NOT_IN_USE@GOTPAGEOFF]
	mov	w24, #1
Lloh2:
	adrp	x25, _GELIC_DESCR_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GELIC_DESCR_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh5:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	mov	x8, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	ldr	w1, [x28]
	mov	x0, x8
	bl	_gelic_descr_set_status
	mov	x0, x20
	bl	_ctodev
	ldr	w2, [x25]
	ldr	w3, [x26]
	mov	x1, x23
	bl	_dma_map_single
	str	x0, [x23]
	cbz	x0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x23, #32
	sub	x9, x23, #32
	stp	x8, x9, [x23, #16]
	add	w27, w27, #1
	add	w24, w24, #1
	cmp	w27, w22
	b.ne	LBB0_2
; %bb.4:
	str	x19, [x23, #16]
	str	x23, [x19, #24]
	mov	x20, x19
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x20, x19
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x0, [x8]
	bl	_cpu_to_be32
	str	x0, [x20, #8]
	add	x20, x20, #32
	subs	w22, w22, #1
	b.ne	LBB0_6
	b	LBB0_8
LBB0_7:
	sub	x8, x19, #32
	stur	x19, [x19, #-16]
	str	x8, [x19, #24]
	mov	x20, x19
LBB0_8:
	mov	w0, #0
	stp	x19, x19, [x21]
	stur	xzr, [x20, #-24]
	b	LBB0_15
LBB0_9:
	cbz	w27, LBB0_14
; %bb.10:
	mov	x19, #-32
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	w24, w24, #1
	sub	x19, x19, #32
	cmp	w24, #1
	b.le	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, x19]
	cbz	x8, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_ctodev
	ldr	x1, [x23, x19]
	ldr	w2, [x25]
	ldr	w3, [x26]
	bl	_dma_unmap_single
	b	LBB0_11
LBB0_14:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GELIC_DESCR_DMA_NOT_IN_USE,4,2 ; @GELIC_DESCR_DMA_NOT_IN_USE
	.comm	_GELIC_DESCR_SIZE,4,2           ; @GELIC_DESCR_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_gelic_card_init_chain
.subsections_via_symbols
