	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_large_buffers
_ql_alloc_large_buffers:                ## @ql_alloc_large_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_8
## %bb.1:
	movq	%rdi, %r13
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %esi
	movl	8(%r13), %edi
	callq	_netdev_alloc_skb
	xorl	%edi, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %r15
	leaq	(%r15,%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, (%r15,%r14)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 24(%r15,%r14)
	movq	_QL_HEADER_SPACE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_skb_reserve
	movl	4(%r13), %edx
	movl	12(%r13), %edi
	movl	(%rbx), %esi
	subl	(%r12), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %ebx
	movq	%r13, %r12
	movl	12(%r13), %edi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_mapaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_dma_unmap_addr_set
	movq	_maplen@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	_QL_HEADER_SPACE@GOTPCREL(%rip), %rax
	subl	(%rax), %edx
	movq	%r13, %rdi
	callq	_dma_unmap_len_set
	movl	%ebx, %edi
	callq	_LS_64BITS
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15,%r14)
	movl	%ebx, %edi
	callq	_MS_64BITS
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r15,%r14)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	incq	%r15
	movslq	(%r12), %rax
	addq	$32, %r14
	cmpq	%rax, %r15
	movq	%r12, %r13
	movq	%r15, %r12
	jl	LBB0_2
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	movl	4(%r13), %edx
	movl	8(%r13), %edi
	addl	%edx, %edx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_4
LBB0_6:
	movl	8(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb_irq
	movq	%r12, %r13
LBB0_4:
	movq	%r13, %rdi
	callq	_ql_free_large_buffers
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"large buff alloc failed for %d bytes at index %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QL_HEADER_SPACE,4,2            ## @QL_HEADER_SPACE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
L_.str.1:                               ## @.str.1
	.asciz	"PCI mapping failed with error: %d\n"

	.comm	_mapaddr,4,2                    ## @mapaddr
	.comm	_maplen,4,2                     ## @maplen
	.no_dead_strip	_ql_alloc_large_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_large_buffers
_ql_alloc_large_buffers:                ; @ql_alloc_large_buffers
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x24, #0
	mov	x23, #0
Lloh0:
	adrp	x25, _QL_HEADER_SPACE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _QL_HEADER_SPACE@GOTPAGEOFF]
Lloh2:
	adrp	x26, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh4:
	adrp	x27, _mapaddr@GOTPAGE
Lloh5:
	ldr	x27, [x27, _mapaddr@GOTPAGEOFF]
Lloh6:
	adrp	x28, _maplen@GOTPAGE
Lloh7:
	ldr	x28, [x28, _maplen@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x19, #4]
	bl	_netdev_alloc_skb
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #16]
	add	x20, x8, x24
	mov	x0, x20
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	w23, [x20]
	str	x21, [x20, #24]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_skb_reserve
	ldr	w0, [x19, #12]
	ldr	w1, [x21]
	ldr	w8, [x19, #4]
	ldr	w9, [x25]
	sub	w2, w8, w9
	ldr	w3, [x26]
	bl	_pci_map_single
	mov	x22, x0
	ldr	w0, [x19, #12]
	mov	x1, x22
	bl	_pci_dma_mapping_error
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	mov	x2, x22
	bl	_dma_unmap_addr_set
	ldr	w1, [x28]
	ldr	w8, [x19, #4]
	ldr	w9, [x25]
	sub	w2, w8, w9
	mov	x0, x20
	bl	_dma_unmap_len_set
	mov	x0, x22
	bl	_LS_64BITS
	bl	_cpu_to_le32
	str	x0, [x20, #16]
	mov	x0, x22
	bl	_MS_64BITS
	bl	_cpu_to_le32
	str	x0, [x20, #8]
	add	x23, x23, #1
	ldrsw	x8, [x19]
	add	x24, x24, #32
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	ldp	w8, w0, [x19, #4]
	lsl	w2, w8, #1
	str	x23, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_8
LBB0_7:
	mov	x2, x0
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	mov	x0, x21
	bl	_dev_kfree_skb_irq
LBB0_8:
	mov	x0, x19
	bl	_ql_free_large_buffers
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"large buff alloc failed for %d bytes at index %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QL_HEADER_SPACE,4,2            ; @QL_HEADER_SPACE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
l_.str.1:                               ; @.str.1
	.asciz	"PCI mapping failed with error: %d\n"

	.comm	_mapaddr,4,2                    ; @mapaddr
	.comm	_maplen,4,2                     ; @maplen
	.no_dead_strip	_ql_alloc_large_buffers
.subsections_via_symbols
