	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_shadow_space
_ql_alloc_shadow_space:                 ## @ql_alloc_shadow_space
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	(%r15), %edx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	16(%rbx), %edi
	movl	(%r15), %esi
	leaq	36(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	(%r15), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_6
LBB0_1:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	32(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	jmp	LBB0_2
LBB0_4:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	32(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	movl	16(%rbx), %edi
	movl	(%r15), %esi
	movq	8(%rbx), %rdx
	movl	(%rbx), %ecx
	callq	_pci_free_consistent
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocation of RX shadow space failed.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Allocation of TX shadow space failed.\n"

	.no_dead_strip	_ql_alloc_shadow_space
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_alloc_shadow_space
_ql_alloc_shadow_space:                 ; @ql_alloc_shadow_space
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x2, x19
	bl	_pci_alloc_consistent
	str	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w2, [x20]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	add	x2, x19, #36
	bl	_pci_alloc_consistent
	str	x0, [x19, #24]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w2, [x20]
	mov	w1, #0
	bl	_memset
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _ifup@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19, #32]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _ifup@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19, #32]
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	ldr	x2, [x19, #8]
	ldr	w3, [x19]
	bl	_pci_free_consistent
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocation of RX shadow space failed.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Allocation of TX shadow space failed.\n"

	.no_dead_strip	_ql_alloc_shadow_space
.subsections_via_symbols
