	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gve_tx_alloc_ring
_gve_tx_alloc_ring:                     ## @gve_tx_alloc_ring
	.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	%rdi, %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r15
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r12
	imulq	$56, %r12, %r13
	leaq	(%r15,%r13), %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movslq	(%rax), %r14
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movl	%r12d, (%r15,%r13)
	leal	-1(%r14), %eax
	movl	%eax, 4(%r15,%r13)
	shlq	$2, %r14
	movl	%r14d, %edi
	callq	_vzalloc
	movq	%rax, 8(%r15,%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	(%r15,%r13), %rbx
	addq	$24, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 16(%r15,%r13)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_gve_assign_tx_qpl
	leaq	(%r15,%r13), %rbx
	addq	$32, %rbx
	movl	%eax, 32(%r15,%r13)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_gve_tx_fifo_init
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	leaq	(%r15,%r13), %rbx
	addq	$16, %rbx
	movq	(%rbx), %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_dma_free_coherent
	movq	$0, (%rbx)
LBB0_8:
	leaq	(%r15,%r13), %rbx
	addq	$8, %rbx
	movq	(%rbx), %rdi
	callq	_vfree
	movq	$0, (%rbx)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r13), %rdx
	addq	$48, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_dma_alloc_coherent
	movq	%rax, 40(%r15,%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r9
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %r8d
	callq	_netif_dbg
	movl	4(%rbx), %edi
	movl	%r14d, %esi
	callq	_netdev_get_tx_queue
	movl	%eax, 36(%r15,%r13)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gve_tx_add_to_block
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_gve_tx_fifo_release
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx[%d]->bus=%lx\n"

	.no_dead_strip	_gve_tx_alloc_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gve_tx_alloc_ring
_gve_tx_alloc_ring:                     ; @gve_tx_alloc_ring
	.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, x1
	mov	x19, x0
	mov	w8, #56
	ldp	x22, x26, [x0, #8]
	smaddl	x21, w1, w8, x26
	ldrsw	x23, [x0]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	sub	w8, w23, #1
	stp	w20, w8, [x21]
	lsl	x23, x23, #2
	mov	x0, x23
	bl	_vzalloc
	str	x0, [x21, #8]!
	cbz	x0, LBB0_5
; %bb.1:
	sxtw	x27, w20
	mov	w8, #56
	madd	x28, x27, x8, x26
	add	x24, x28, #24
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_dma_alloc_coherent
	str	x0, [x28, #16]!
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_gve_assign_tx_qpl
	mov	w8, #56
	madd	x25, x27, x8, x26
	str	w0, [x25, #32]!
	mov	x0, x19
	mov	x1, x25
	bl	_gve_tx_fifo_init
	cbz	x0, LBB0_7
LBB0_3:
	ldr	x2, [x28]
	ldr	x3, [x24]
	mov	x0, x22
	mov	x1, x23
	bl	_dma_free_coherent
	str	xzr, [x28]
LBB0_4:
	ldr	x0, [x21]
	bl	_vfree
	str	xzr, [x21]
LBB0_5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	w8, #56
	madd	x8, x27, x8, x26
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x2, x8, #48
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x22
	mov	w1, #1
	bl	_dma_alloc_coherent
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x0, [x8, #40]
	cbz	x0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _drv@GOTPAGE
Lloh10:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	ldr	x5, [x24]
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_netif_dbg
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_netdev_get_tx_queue
	mov	w8, #56
	madd	x8, x27, x8, x26
	str	w0, [x8, #36]
	mov	x0, x19
	mov	x1, x20
	bl	_gve_tx_add_to_block
	mov	w0, #0
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	mov	x1, x25
	bl	_gve_tx_fifo_release
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx[%d]->bus=%lx\n"

	.no_dead_strip	_gve_tx_alloc_ring
.subsections_via_symbols
