	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxbf_tmfifo_console_output_one
_mlxbf_tmfifo_console_output_one:       ## @mlxbf_tmfifo_console_output_one
	.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	%rdx, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_virtqueue_get_vring
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	leaq	24(%r14), %r12
	movq	_MLXBF_TMFIFO_CON_TX_BUF_SIZE@GOTPCREL(%rip), %r13
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %esi
	movq	%r12, %rdi
	callq	_virtio64_to_cpu
	movl	%eax, %edi
	callq	_phys_to_virt
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %esi
	movq	%r12, %rdi
	callq	_virtio32_to_cpu
	movq	%rax, %r15
	movq	(%r14), %rdi
	movl	16(%r14), %esi
	movq	(%r13), %rdx
	callq	_CIRC_SPACE_TO_END
	movq	(%r14), %rdi
	addq	8(%r14), %rdi
	movq	%r15, %r13
	subq	%rax, %r13
	jbe	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	addq	%r12, %r15
	movq	8(%r14), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_memcpy
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcpy
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rax
	addq	%r15, %rax
	movq	_MLXBF_TMFIFO_CON_TX_BUF_SIZE@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, (%r14)
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	callq	_virtio16_to_cpu
	movq	_VRING_DESC_F_NEXT@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_virtio16_to_cpu
	movq	%rax, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	shlq	$4, %rbx
	addq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXBF_TMFIFO_CON_TX_BUF_SIZE,8,3 ## @MLXBF_TMFIFO_CON_TX_BUF_SIZE
	.comm	_VRING_DESC_F_NEXT,8,3          ## @VRING_DESC_F_NEXT
	.no_dead_strip	_mlxbf_tmfifo_console_output_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxbf_tmfifo_console_output_one
_mlxbf_tmfifo_console_output_one:       ; @mlxbf_tmfifo_console_output_one
	.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	x21, x2
	mov	x19, x0
	ldr	w0, [x1]
	bl	_virtqueue_get_vring
	cbz	x21, LBB0_7
; %bb.1:
	mov	x20, x0
	add	x22, x19, #24
Lloh0:
	adrp	x27, _MLXBF_TMFIFO_CON_TX_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MLXBF_TMFIFO_CON_TX_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _VRING_DESC_F_NEXT@GOTPAGE
Lloh3:
	ldr	x28, [x28, _VRING_DESC_F_NEXT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21, #12]
	mov	x0, x22
	bl	_virtio64_to_cpu
	bl	_phys_to_virt
	mov	x24, x0
	ldr	w1, [x21, #8]
	mov	x0, x22
	bl	_virtio32_to_cpu
	mov	x23, x0
	ldr	x0, [x19]
	ldr	w1, [x19, #16]
	ldr	x2, [x27]
	bl	_CIRC_SPACE_TO_END
	mov	x25, x0
	ldp	x9, x8, [x19]
	add	x0, x9, x8
	subs	x26, x23, x25
	b.ls	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x24
	mov	x2, x25
	bl	_memcpy
	add	x1, x24, x25
	ldr	x0, [x19, #8]
	mov	x2, x26
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x24
	mov	x2, x23
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_memcpy
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x9, [x27]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
	ldr	w1, [x21, #4]
	mov	x0, x22
	bl	_virtio16_to_cpu
	ldr	x8, [x28]
	tst	x8, x0
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x21]
	mov	x0, x22
	bl	_virtio16_to_cpu
	ldr	x8, [x20]
	add	x21, x8, x0, lsl #4
	cbnz	x8, LBB0_2
LBB0_7:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXBF_TMFIFO_CON_TX_BUF_SIZE,8,3 ; @MLXBF_TMFIFO_CON_TX_BUF_SIZE
	.comm	_VRING_DESC_F_NEXT,8,3          ; @VRING_DESC_F_NEXT
	.no_dead_strip	_mlxbf_tmfifo_console_output_one
.subsections_via_symbols
