	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_tx_resources
_ql_alloc_tx_resources:                 ## @ql_alloc_tx_resources
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	movl	16(%rsi), %esi
	movq	%rbx, %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_WQ_ADDR_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
LBB0_4:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	4(%rbx), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, %rcx
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_5
## %bb.3:
	movl	4(%r14), %edi
	movl	16(%rbx), %esi
	movq	8(%rbx), %rdx
	movl	(%rbx), %ecx
	callq	_pci_free_consistent
	movq	$0, 8(%rbx)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_WQ_ADDR_ALIGN,4,2              ## @WQ_ADDR_ALIGN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx_ring alloc failed.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ql_alloc_tx_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_alloc_tx_resources
_ql_alloc_tx_resources:                 ; @ql_alloc_tx_resources
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x1, #16]
	mov	x2, x20
	bl	_pci_alloc_consistent
	str	x0, [x20, #8]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _WQ_ADDR_ALIGN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WQ_ADDR_ALIGN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _ifup@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x20, #4]
	lsl	w0, w8, #2
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_3
LBB0_6:
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #16]
	ldr	x2, [x20, #8]
	ldr	w3, [x20]
	bl	_pci_free_consistent
	str	xzr, [x20, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WQ_ADDR_ALIGN,4,2              ; @WQ_ADDR_ALIGN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx_ring alloc failed.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ql_alloc_tx_resources
.subsections_via_symbols
