	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxbf_tmfifo_get_next_desc
_mlxbf_tmfifo_get_next_desc:            ## @mlxbf_tmfifo_get_next_desc
	.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	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_virtqueue_get_vring
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movq	(%rax), %r12
	movl	(%rbx), %r15d
	movq	16(%r14), %rax
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_virtio16_to_cpu
	cmpl	%eax, %r15d
	jne	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
	jmp	LBB0_4
LBB0_2:
	movl	(%rbx), %eax
	xorl	%edx, %edx
	divl	(%r14)
                                        ## kill: def $edx killed $edx def $rdx
	xorl	%r15d, %r15d
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax,%rdx,4), %esi
	movq	%r12, %rdi
	callq	_virtio16_to_cpu
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	(%r14), %eax
	setae	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	incl	(%rbx)
	movl	%r12d, %r15d
	shlq	$2, %r15
	addq	8(%r14), %r15
LBB0_4:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mlxbf_tmfifo_get_next_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxbf_tmfifo_get_next_desc
_mlxbf_tmfifo_get_next_desc:            ; @mlxbf_tmfifo_get_next_desc
	.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	x19, x0
	ldr	x0, [x0, #8]
	bl	_virtqueue_get_vring
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x21, [x8]
	ldr	w22, [x19]
	ldr	x8, [x0, #16]
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_virtio16_to_cpu
	cmp	w22, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	ldr	w9, [x20]
	udiv	w10, w8, w9
	msub	w8, w10, w9, w8
	ldr	x9, [x20, #16]
	ldr	x9, [x9]
	ldr	w1, [x9, w8, uxtw #2]
	mov	x0, x21
	bl	_virtio16_to_cpu
	mov	x21, x0
	ldr	w8, [x20]
	cmp	w0, w8
	cset	w0, hs
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
	mov	x0, #0
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x8, [x20, #8]
	add	x0, x8, w21, uxtw #2
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mlxbf_tmfifo_get_next_desc
.subsections_via_symbols
