	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_tx_flow
_setup_tx_flow:                         ## @setup_tx_flow
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	callq	_dpaa2_eth_tc_count
	testl	%eax, %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	leaq	-80(%rbp), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movq	_DPNI_QUEUE_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r15), %r9d
	xorl	%esi, %esi
	movl	%r14d, %r8d
	leaq	-48(%rbp), %rax
	pushq	%rax
	pushq	%r13
	callq	_dpni_get_queue
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax
	movq	24(%r15), %rcx
	movl	%eax, (%rcx,%r14,4)
	incq	%r14
	movq	%r12, %rdi
	callq	_dpaa2_eth_tc_count
	cltq
	cmpq	%rax, %r14
	jl	LBB0_3
## %bb.6:
	movl	-44(%rbp), %eax
	jmp	LBB0_7
LBB0_1:
                                        ## implicit-def: $eax
LBB0_7:
	movl	%eax, 20(%r15)
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movq	_DPNI_QUEUE_TX_CONFIRM@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	(%r15), %r9d
	leaq	-80(%rbp), %r14
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	leaq	-48(%rbp), %rax
	pushq	%rax
	pushq	%r14
	callq	_dpni_get_queue
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	movl	-48(%rbp), %eax
	movl	%eax, 16(%r15)
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_DPNI_DEST_DPCON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	$0, -72(%rbp)
	movq	%r15, -80(%rbp)
	movl	(%r12), %edx
	movl	4(%r12), %edi
	movl	(%r13), %ecx
	movl	(%r15), %r9d
	movq	_DPNI_QUEUE_OPT_USER_CTX@GOTPCREL(%rip), %r8
	movq	_DPNI_QUEUE_OPT_DEST@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	orl	(%r8), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	pushq	%r14
	pushq	%rax
	callq	_dpni_set_queue
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
LBB0_11:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:
	callq	_dev_err
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPNI_QUEUE_TX,4,2              ## @DPNI_QUEUE_TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpni_get_queue(TX) failed\n"

	.comm	_DPNI_QUEUE_TX_CONFIRM,4,2      ## @DPNI_QUEUE_TX_CONFIRM
L_.str.1:                               ## @.str.1
	.asciz	"dpni_get_queue(TX_CONF) failed\n"

	.comm	_DPNI_DEST_DPCON,4,2            ## @DPNI_DEST_DPCON
	.comm	_DPNI_QUEUE_OPT_USER_CTX,4,2    ## @DPNI_QUEUE_OPT_USER_CTX
	.comm	_DPNI_QUEUE_OPT_DEST,4,2        ## @DPNI_QUEUE_OPT_DEST
L_.str.2:                               ## @.str.2
	.asciz	"dpni_set_queue(TX_CONF) failed\n"

	.no_dead_strip	_setup_tx_flow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_tx_flow
_setup_tx_flow:                         ; @setup_tx_flow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	bl	_dpaa2_eth_tc_count
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
Lloh0:
	adrp	x25, _DPNI_QUEUE_TX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DPNI_QUEUE_TX@GOTPAGEOFF]
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w0, [x21]
	ldr	w3, [x25]
	ldr	w5, [x20]
	add	x6, sp, #8
	mov	x7, sp
	mov	w1, #0
	mov	x4, x23
	bl	_dpni_get_queue
	cbnz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp]
	ldr	x9, [x20, #24]
	str	w8, [x9, x23, lsl #2]
	add	x23, x23, #1
	mov	x0, x21
	bl	_dpaa2_eth_tc_count
	cmp	x23, w0, sxtw
	b.lt	LBB0_2
; %bb.4:
	ldr	w8, [sp, #4]
	b	LBB0_6
LBB0_5:
                                        ; implicit-def: $w8
LBB0_6:
	str	w8, [x20, #20]
	ldp	w2, w0, [x21]
Lloh4:
	adrp	x22, _DPNI_QUEUE_TX_CONFIRM@GOTPAGE
Lloh5:
	ldr	x22, [x22, _DPNI_QUEUE_TX_CONFIRM@GOTPAGEOFF]
	ldr	w3, [x22]
	ldr	w5, [x20]
	add	x6, sp, #8
	mov	x7, sp
	mov	w1, #0
	mov	w4, #0
	bl	_dpni_get_queue
	cbz	w0, LBB0_9
; %bb.7:
	mov	x24, x0
Lloh6:
	adrp	x22, l_.str.1@PAGE
Lloh7:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_8:
	mov	x24, x0
	b	LBB0_11
LBB0_9:
	ldr	w8, [sp]
	str	w8, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _DPNI_DEST_DPCON@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DPNI_DEST_DPCON@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
	stp	x20, xzr, [sp, #8]
	ldp	w2, w0, [x21]
	ldr	w3, [x22]
Lloh11:
	adrp	x8, _DPNI_QUEUE_OPT_USER_CTX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DPNI_QUEUE_OPT_USER_CTX@GOTPAGEOFF]
	ldr	w5, [x20]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _DPNI_QUEUE_OPT_DEST@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DPNI_QUEUE_OPT_DEST@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w6, w9, w8
	add	x7, sp, #8
	mov	w1, #0
	mov	w4, #0
	bl	_dpni_set_queue
	mov	x24, x0
	cbz	w0, LBB0_12
; %bb.10:
Lloh17:
	adrp	x22, l_.str.2@PAGE
Lloh18:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	bl	_dev_err
LBB0_12:
	mov	x0, x24
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DPNI_QUEUE_TX,4,2              ; @DPNI_QUEUE_TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpni_get_queue(TX) failed\n"

	.comm	_DPNI_QUEUE_TX_CONFIRM,4,2      ; @DPNI_QUEUE_TX_CONFIRM
l_.str.1:                               ; @.str.1
	.asciz	"dpni_get_queue(TX_CONF) failed\n"

	.comm	_DPNI_DEST_DPCON,4,2            ; @DPNI_DEST_DPCON
	.comm	_DPNI_QUEUE_OPT_USER_CTX,4,2    ; @DPNI_QUEUE_OPT_USER_CTX
	.comm	_DPNI_QUEUE_OPT_DEST,4,2        ; @DPNI_QUEUE_OPT_DEST
l_.str.2:                               ; @.str.2
	.asciz	"dpni_set_queue(TX_CONF) failed\n"

	.no_dead_strip	_setup_tx_flow
.subsections_via_symbols
