	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_small_buffers
_ql_alloc_small_buffers:                ## @ql_alloc_small_buffers
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_QL_ADDR_ELE_PER_BUFQ_ENTRY@GOTPCREL(%rip), %r15
	movq	_NUM_SBUFQ_ENTRIES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	imull	(%r15), %esi
	movq	_QL_SMALL_BUFFER_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movq	%rdi, %r13
	movl	%esi, (%rdi)
	movl	56(%rdi), %edi
	leaq	40(%r13), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 48(%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	40(%r13), %edi
	callq	_LS_64BITS
	movq	%rax, 16(%r13)
	movl	40(%r13), %edi
	callq	_MS_64BITS
	movq	%rax, %rdi
	movq	%rax, 24(%r13)
	movl	(%rbx), %eax
	imull	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	movq	32(%r13), %rbx
	addq	$8, %rbx
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%r14), %r12d
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
	movq	_QL_SMALL_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%r12d, %rdi
	imulq	%rax, %rdi
	addq	16(%r13), %rdi
	callq	_cpu_to_le32
	movq	%rax, -8(%rbx)
	movq	_NUM_SBUFQ_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rcx
	imull	(%r15), %eax
	cmpl	%eax, %r14d
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r13), %rdi
	addq	$16, %rbx
	incl	%r14d
	jmp	LBB0_4
LBB0_6:
	movq	$0, 8(%r13)
	movq	_QL_ALLOC_SMALL_BUF_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r13
	movq	%r13, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movl	44(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QL_ADDR_ELE_PER_BUFQ_ENTRY,4,2 ## @QL_ADDR_ELE_PER_BUFQ_ENTRY
	.comm	_NUM_SBUFQ_ENTRIES,4,2          ## @NUM_SBUFQ_ENTRIES
	.comm	_QL_SMALL_BUFFER_SIZE,4,2       ## @QL_SMALL_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get small buffer memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QL_ALLOC_SMALL_BUF_DONE,4,2    ## @QL_ALLOC_SMALL_BUF_DONE
	.no_dead_strip	_ql_alloc_small_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_alloc_small_buffers
_ql_alloc_small_buffers:                ; @ql_alloc_small_buffers
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _QL_ADDR_ELE_PER_BUFQ_ENTRY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _QL_ADDR_ELE_PER_BUFQ_ENTRY@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _NUM_SBUFQ_ENTRIES@GOTPAGE
Lloh3:
	ldr	x21, [x21, _NUM_SBUFQ_ENTRIES@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh4:
	adrp	x22, _QL_SMALL_BUFFER_SIZE@GOTPAGE
Lloh5:
	ldr	x22, [x22, _QL_SMALL_BUFFER_SIZE@GOTPAGEOFF]
	mul	w8, w9, w8
	ldr	w9, [x22]
	mul	w1, w8, w9
	str	w1, [x0]
	ldr	w0, [x0, #56]
	add	x2, x19, #40
	bl	_pci_alloc_consistent
	str	x0, [x19, #48]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w0, [x19, #40]
	bl	_LS_64BITS
	str	x0, [x19, #16]
	ldr	w0, [x19, #40]
	bl	_MS_64BITS
	str	x0, [x19, #24]
	ldr	w8, [x20]
	ldr	w9, [x21]
	mul	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x8, [x19, #32]
	add	x23, x8, #8
	mov	w24, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w25, w24, #1
	bl	_cpu_to_le32
	str	x0, [x23]
	ldr	x8, [x19, #16]
	ldrsw	x9, [x22]
	sxtw	x10, w25
	madd	x0, x9, x10, x8
	bl	_cpu_to_le32
	stur	x0, [x23, #-8]
	ldr	w8, [x20]
	ldr	w9, [x21]
	mul	w8, w9, w8
	cmp	w24, w8
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #24]
	add	x23, x23, #16
	add	w24, w24, #1
	b	LBB0_3
LBB0_5:
	str	xzr, [x19, #8]
Lloh6:
	adrp	x8, _QL_ALLOC_SMALL_BUF_DONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QL_ALLOC_SMALL_BUF_DONE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_set_bit
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #44]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_QL_ADDR_ELE_PER_BUFQ_ENTRY,4,2 ; @QL_ADDR_ELE_PER_BUFQ_ENTRY
	.comm	_NUM_SBUFQ_ENTRIES,4,2          ; @NUM_SBUFQ_ENTRIES
	.comm	_QL_SMALL_BUFFER_SIZE,4,2       ; @QL_SMALL_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get small buffer memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QL_ALLOC_SMALL_BUF_DONE,4,2    ; @QL_ALLOC_SMALL_BUF_DONE
	.no_dead_strip	_ql_alloc_small_buffers
.subsections_via_symbols
