	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxbf_tmfifo_virtio_find_vqs
_mlxbf_tmfifo_virtio_find_vqs:          ## @mlxbf_tmfifo_virtio_find_vqs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_mlxbf_vdev_to_tmfifo
	movq	%rax, %r14
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%r12d, %eax
	jae	LBB0_1
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$16, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13,%r12,8)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	movl	-4(%r14,%r15), %esi
	movl	(%r14,%r15), %edi
	callq	_vring_size
	movl	-8(%r14,%r15), %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	movl	(%r14,%r15), %esi
	movl	-8(%r14,%r15), %r10d
	movl	-4(%r14,%r15), %edx
	movq	_mlxbf_tmfifo_virtio_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	(%r13,%r12,8)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	pushq	(%rax,%r12,8)
	pushq	%rbx
	pushq	%r10
	callq	_vring_new_virtqueue
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%r15), %rcx
	addq	$-16, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx,%r12,8)
	movq	%rax, -16(%r14,%r15)
	movq	%rcx, (%rax)
	incq	%r12
	addq	$24, %r15
	cmpq	%r12, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_3
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_4:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_mlxbf_tmfifo_virtio_del_vqs
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mlxbf_tmfifo_virtio_notify,4,2 ## @mlxbf_tmfifo_virtio_notify
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vring_new_virtqueue failed\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxbf_tmfifo_virtio_find_vqs
_mlxbf_tmfifo_virtio_find_vqs:          ; @mlxbf_tmfifo_virtio_find_vqs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x25, x1
	mov	x19, x0
	bl	_mlxbf_vdev_to_tmfifo
	mov	x23, x0
	ldr	x0, [x0]
	bl	_ARRAY_SIZE
	cmp	w0, w25
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_2:
	cbz	w25, LBB0_7
; %bb.3:
	mov	x26, #0
	mov	x24, #0
	mov	w8, #24
	umull	x27, w25, w8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, x24, lsl #3]
	cbz	x8, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [x23]
	add	x28, x25, x26
	ldp	w1, w0, [x28, #12]
	bl	_vring_size
	mov	x2, x0
	ldr	w0, [x28, #8]
	mov	w1, #0
	bl	_memset
	ldp	w2, w1, [x28, #12]
	ldr	w6, [x28, #8]
Lloh3:
	adrp	x8, _mlxbf_tmfifo_virtio_notify@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mlxbf_tmfifo_virtio_notify@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
	lsl	x8, x24, #3
	ldr	x9, [x21, x8]
	ldr	x8, [x20, x8]
	stp	x9, x8, [sp]
	mov	x0, x24
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	bl	_vring_new_virtqueue
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x0, [x22, x24, lsl #3]
	str	x0, [x25, x26]
	str	x28, [x0]
	add	x24, x24, #1
	add	x26, x26, #24
	cmp	x27, x26
	b.ne	LBB0_4
LBB0_7:
	mov	w20, #0
	b	LBB0_11
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_mlxbf_tmfifo_virtio_del_vqs
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mlxbf_tmfifo_virtio_notify,4,2 ; @mlxbf_tmfifo_virtio_notify
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vring_new_virtqueue failed\n"

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