	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxbf_tmfifo_alloc_vrings
_mlxbf_tmfifo_alloc_vrings:             ## @mlxbf_tmfifo_alloc_vrings
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rsi), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	$32, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r15
	movq	%r14, (%r15,%rbx)
	movq	_MLXBF_TMFIFO_VRING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -12(%r15,%rbx)
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, -16(%r15,%rbx)
	movl	%r13d, -32(%r15,%rbx)
	movl	4(%r12), %eax
	movl	%eax, -8(%r15,%rbx)
	callq	_vring_size
	movl	(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %esi
	leaq	-44(%rbp), %rdx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, -24(%r15,%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%r15,%rbx)
	incq	%r13
	movq	8(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %rbx
	cmpq	%rax, %r13
	jl	LBB0_2
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxbf_tmfifo_free_vrings
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXBF_TMFIFO_VRING_SIZE,4,2    ## @MLXBF_TMFIFO_VRING_SIZE
	.comm	_SMP_CACHE_BYTES,4,2            ## @SMP_CACHE_BYTES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_alloc_coherent failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxbf_tmfifo_alloc_vrings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxbf_tmfifo_alloc_vrings
_mlxbf_tmfifo_alloc_vrings:             ; @mlxbf_tmfifo_alloc_vrings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x1, #8]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
	mov	x22, #0
Lloh0:
	adrp	x23, _MLXBF_TMFIFO_VRING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MLXBF_TMFIFO_VRING_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _SMP_CACHE_BYTES@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SMP_CACHE_BYTES@GOTPAGEOFF]
Lloh4:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x26, x8, x21
	str	x20, [x26, #32]
	ldr	w0, [x23]
	str	w0, [x26, #20]
	ldr	w1, [x24]
	str	w1, [x26, #16]
	str	w22, [x26]
	ldr	w8, [x19, #4]
	str	w8, [x26, #24]
	bl	_vring_size
	mov	x1, x0
	ldr	w0, [x19]
	ldr	w3, [x25]
	add	x2, sp, #12
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x26, #8]
	ldr	w8, [sp, #12]
	str	w8, [x26, #4]
	add	x22, x22, #1
	ldr	x0, [x19, #8]
	bl	_ARRAY_SIZE
	add	x21, x21, #40
	cmp	x22, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxbf_tmfifo_free_vrings
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXBF_TMFIFO_VRING_SIZE,4,2    ; @MLXBF_TMFIFO_VRING_SIZE
	.comm	_SMP_CACHE_BYTES,4,2            ; @SMP_CACHE_BYTES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_alloc_coherent failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxbf_tmfifo_alloc_vrings
.subsections_via_symbols
