	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmveth_replenish_buffer_pool
_ibmveth_replenish_buffer_pool:         ## @ibmveth_replenish_buffer_pool
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %r15
	leaq	24(%rsi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_atomic_read
	subq	%rax, %r15
	xorl	%eax, %eax
	callq	_mb
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	jle	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rdi
	movl	8(%rbx), %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movl	12(%rbx), %r12d
	leal	1(%r12), %eax
	cmpq	%rax, (%rbx)
	movl	$0, %ecx
	cmovlel	%ecx, %eax
	movl	%eax, 12(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %r15d
	xorl	%edi, %edi
	movq	_IBM_VETH_INVALID_MAP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	sete	%dil
	callq	_BUG_ON
	movq	40(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%r15,8)
	setne	%dil
	callq	_BUG_ON
	movq	8(%r14), %rdi
	movq	(%r13), %rsi
	movl	8(%rbx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %rbx
	movq	8(%r14), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IBM_VETH_INVALID_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rcx
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rcx,%r12,4)
	movq	32(%rdx), %rax
	movq	%rbx, (%rax,%r15,8)
	movq	40(%rdx), %rax
	movq	%r13, (%rax,%r15,8)
	movl	8(%rdx), %edi
	movq	%r13, %r12
	movq	_IBMVETH_BUF_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	orl	%edi, %r15d
	movq	_rx_flush@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r14), %rax
	movq	_IBMVETH_BUFF_OH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	callq	_min
	movq	(%r12), %rdi
	movl	%eax, %esi
	callq	_ibmveth_flush_buffer
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r14), %rax
	movl	4(%rax), %edi
	movl	%r15d, %esi
	callq	_h_add_logical_lan_buffer
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, %r13
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rax
	incl	16(%r14)
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, -72(%rbp)                 ## 8-byte Folded Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_3
## %bb.9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_1:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_10:
	movq	%rbx, %rsi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movl	%r15d, (%rax,%r12,4)
	movq	40(%rbx), %rax
	movq	$0, (%rax,%r15,8)
	movl	12(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	(%rbx), %eax
LBB0_12:
	decl	%eax
	movl	%eax, 12(%rbx)
	movq	%r14, %r15
	movq	8(%r14), %rdi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	8(%r15), %rdi
	movq	32(%rbx), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rsi
	movl	8(%rbx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_single
LBB0_14:
	movq	%r13, %rdi
	callq	_dev_kfree_skb_any
	jmp	LBB0_15
LBB0_17:
	movq	24(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_dbg
	addq	$32, %r14
	movq	%r14, %r15
LBB0_15:
	incl	(%r15)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:
	xorl	%eax, %eax
	callq	_mb
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atomic_add                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"replenish: unable to allocate skb\n"

	.comm	_IBM_VETH_INVALID_MAP,4,2       ## @IBM_VETH_INVALID_MAP
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_IBMVETH_BUF_VALID,4,2          ## @IBMVETH_BUF_VALID
	.comm	_rx_flush,8,3                   ## @rx_flush
	.comm	_IBMVETH_BUFF_OH,8,3            ## @IBMVETH_BUFF_OH
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.no_dead_strip	_ibmveth_replenish_buffer_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmveth_replenish_buffer_pool
_ibmveth_replenish_buffer_pool:         ; @ibmveth_replenish_buffer_pool
	.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	x22, x1
	mov	x20, x0
	mov	x23, x1
	ldr	x19, [x23], #24
	mov	x0, x23
	bl	_atomic_read
	sub	x19, x19, x0
	bl	_mb
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	cmp	x19, #1
	b.lt	LBB0_9
; %bb.1:
	str	x23, [sp]                       ; 8-byte Folded Spill
	mov	x21, #0
Lloh0:
	adrp	x25, _IBM_VETH_INVALID_MAP@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IBM_VETH_INVALID_MAP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #24]
	ldr	w1, [x22, #8]
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	w19, [x22, #12]
	add	w8, w19, #1
	ldr	x9, [x22]
	cmp	x9, x8
	csinc	w8, wzr, w19, le
	str	w8, [x22, #12]
	ldr	x8, [x22, #16]
	ldr	w26, [x8, x19, lsl #2]
	ldr	w8, [x25]
	cmp	w26, w8
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x22, #40]
	ldr	x8, [x8, w26, uxtw #3]
	cmp	x8, #0
	cset	w0, ne
	bl	_BUG_ON
	ldr	x0, [x20, #8]
	ldr	x1, [x23]
	ldr	w2, [x22, #8]
Lloh2:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x24, x0
	ldr	x0, [x20, #8]
	mov	x1, x24
	bl	_dma_mapping_error
	cbnz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x25
	ldr	w8, [x25]
	ldr	x9, [x22, #16]
	str	w8, [x9, x19, lsl #2]
	ldr	x8, [x22, #32]
	lsl	x9, x26, #3
	str	x24, [x8, x9]
	ldr	x8, [x22, #40]
	str	x23, [x8, x9]
Lloh5:
	adrp	x8, _IBMVETH_BUF_VALID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBMVETH_BUF_VALID@GOTPAGEOFF]
Lloh7:
	ldr	w28, [x8]
	ldr	w25, [x22, #8]
Lloh8:
	adrp	x8, _rx_flush@GOTPAGE
Lloh9:
	ldr	x8, [x8, _rx_flush@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _IBMVETH_BUFF_OH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IBMVETH_BUFF_OH@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x25
	bl	_min
	mov	x1, x0
	ldr	x0, [x23]
	bl	_ibmveth_flush_buffer
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	orr	w1, w25, w28
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	bl	_h_add_logical_lan_buffer
Lloh14:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x27
	add	x21, x21, #1
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x8, x21
	b.ne	LBB0_2
; %bb.8:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_17
LBB0_9:
	mov	x21, #0
	b	LBB0_18
LBB0_10:
	ldr	x8, [x22, #16]
	str	w26, [x8, x19, lsl #2]
	ldr	x8, [x22, #40]
	str	xzr, [x8, x26, lsl #3]
	ldr	w8, [x22, #12]
	cbnz	w8, LBB0_12
; %bb.11:
	ldr	w8, [x22]
LBB0_12:
	sub	w8, w8, #1
	str	w8, [x22, #12]
	ldr	x0, [x20, #8]
	mov	x1, x24
	bl	_dma_mapping_error
	cbnz	x0, LBB0_14
; %bb.13:
	ldr	x0, [x20, #8]
	ldr	x8, [x22, #32]
	ldr	x1, [x8, x26, lsl #3]
	ldr	w2, [x22, #8]
Lloh17:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	bl	_dma_unmap_single
LBB0_14:
	mov	x0, x23
	bl	_dev_kfree_skb_any
	b	LBB0_16
LBB0_15:
	ldr	x0, [x20, #24]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_dbg
	add	x20, x20, #32
LBB0_16:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_17:
	ldr	x23, [sp]                       ; 8-byte Folded Reload
LBB0_18:
	bl	_mb
	mov	x0, x21
	mov	x1, x23
	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
	b	_atomic_add
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"replenish: unable to allocate skb\n"

	.comm	_IBM_VETH_INVALID_MAP,4,2       ; @IBM_VETH_INVALID_MAP
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_IBMVETH_BUF_VALID,4,2          ; @IBMVETH_BUF_VALID
	.comm	_rx_flush,8,3                   ; @rx_flush
	.comm	_IBMVETH_BUFF_OH,8,3            ; @IBMVETH_BUFF_OH
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.no_dead_strip	_ibmveth_replenish_buffer_pool
.subsections_via_symbols
