	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmvnic_complete_tx
_ibmvnic_complete_tx:                   ## @ibmvnic_complete_tx
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	24(%rdi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	4(%rsi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pending_scrq
	testq	%rax, %rax
	je	LBB0_29
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ibmvnic_next_scrq
	movq	%rax, %rbx
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_25:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%r15
	movslq	(%rbx), %rax
	cmpq	%rax, %r15
	jge	LBB0_26
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
	movq	24(%rbx), %rax
	movq	(%rax,%r15,8), %rdx
	testq	%rdx, %rdx
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rbx), %rax
	movl	(%rax,%r15,4), %edi
	callq	_be32_to_cpu
	movq	_IBMVNIC_TSO_POOL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	movl	%ecx, %esi
	andl	%eax, %esi
	setne	%dl
	notl	%ecx
	cmpl	$1, %esi
	movl	$0, %r14d
	sbbl	%r14d, %r14d
	orl	%ecx, %r14d
	andl	%eax, %r14d
	movq	8(%r12,%rdx,8), %rdi
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	shlq	$5, %r13
	movq	24(%rdi,%r13), %r12
	movslq	%r14d, %rbx
	movq	_IBMVNIC_MAX_FRAGS_PER_CRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rcx
	shlq	$5, %rcx
	movq	24(%r12,%rcx), %rcx
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	xorl	%edx, %edx
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=2
	testb	$1, %al
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=2
	cmpq	$0, (%rcx,%rdx,8)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	$0, (%rcx,%rdx,8)
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=2
	shlq	$5, %rbx
	cmpq	$0, 16(%r12,%rbx)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	8(%r12,%rbx), %rdi
	callq	_dev_kfree_skb_any
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	$0, 8(%r12,%rbx)
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	(%rdi,%r13), %rcx
	movq	8(%rdi,%r13), %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addl	(%r12,%rbx), %esi
	movl	%r14d, (%rcx,%rax,4)
	incq	%rax
	movslq	16(%rdi,%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=2
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rdi,%r13), %rax
	addq	$8, %rax
	movq	%rdx, (%rax)
	jmp	LBB0_25
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	%eax, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=3
	addq	$2, %rdx
	cmpq	%rdx, %rsi
	je	LBB0_16
LBB0_11:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	$0, (%rcx,%rdx,8)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=3
	movq	$0, (%rcx,%rdx,8)
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=3
	cmpq	$0, 8(%rcx,%rdx,8)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=3
	movq	$0, 8(%rcx,%rdx,8)
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, 8(%rbx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_atomic_sub_return
	movl	(%r12), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	cmpl	%edx, %eax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jg	LBB0_1
## %bb.27:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r12), %edi
	movl	(%r14), %esi
	callq	___netif_subqueue_stopped
	testq	%rax, %rax
	je	LBB0_1
## %bb.28:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r12), %edi
	movl	(%r14), %esi
	callq	_netif_wake_subqueue
	movl	4(%r12), %edi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_dbg
	jmp	LBB0_1
LBB0_29:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_enable_scrq_irq
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pending_scrq
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_disable_scrq_irq
	jmp	LBB0_1
LBB0_31:
	xorl	%eax, %eax
	addq	$72, %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	"tx error %x\n"

	.comm	_IBMVNIC_TSO_POOL_MASK,4,2      ## @IBMVNIC_TSO_POOL_MASK
	.comm	_IBMVNIC_MAX_FRAGS_PER_CRQ,4,2  ## @IBMVNIC_MAX_FRAGS_PER_CRQ
L_.str.1:                               ## @.str.1
	.asciz	"Started queue %d\n"

	.no_dead_strip	_ibmvnic_complete_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmvnic_complete_tx
_ibmvnic_complete_tx:                   ; @ibmvnic_complete_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x8, [x0, #24]
	stp	x1, x8, [sp, #16]               ; 16-byte Folded Spill
	add	x8, x1, #4
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;       Child Loop BB0_34 Depth 3
	mov	x0, x21
	mov	x1, x19
	bl	_pending_scrq
	cbz	x0, LBB0_40
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w28, [x19]
	mov	x0, x21
	mov	x1, x19
	bl	_ibmvnic_next_scrq
	mov	x25, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_36
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x24, #0
	mov	w26, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x24, x24, #1
	ldrsw	x8, [x25]
	cmp	x24, x8
	b.ge	LBB0_37
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;       Child Loop BB0_34 Depth 3
	ldr	x8, [x25, #24]
	ldr	x2, [x8, x24, lsl #3]
	cbnz	x2, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x25, #16]
	ldr	w0, [x8, x24, lsl #2]
	bl	_be32_to_cpu
Lloh2:
	adrp	x8, _IBMVNIC_TSO_POOL_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IBMVNIC_TSO_POOL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w9, #-1
	csinv	w8, w9, w8, eq
	mov	w9, #16
	mov	w10, #8
	csel	x9, x10, x9, eq
	ldr	x27, [x21, x9]
	and	w22, w0, w8
	add	x8, x27, x28, lsl #5
	ldr	x19, [x8, #24]
	sxtw	x23, w22
Lloh5:
	adrp	x8, _IBMVNIC_MAX_FRAGS_PER_CRQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IBMVNIC_MAX_FRAGS_PER_CRQ@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x9, x19, x23, lsl #5
	ldr	x9, [x9, #24]
	cmp	w8, #8
	b.hs	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x10, #0
	b	LBB0_32
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	and	x10, x8, #0xfffffff8
	add	x11, x9, #32
	mov	x12, x10
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=3
	add	x11, x11, #64
	subs	x12, x12, #8
	b.eq	LBB0_28
LBB0_12:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldur	q0, [x11, #-32]
	cmtst.2d	v0, v0, v0
	xtn.2s	v0, v0
	fmov	w13, s0
	tbz	w13, #0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	stur	xzr, [x11, #-32]
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=3
	mov.s	w13, v0[1]
	tbz	w13, #0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=3
	stur	xzr, [x11, #-24]
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=3
	ldur	q0, [x11, #-16]
	cmtst.2d	v0, v0, v0
	xtn.2s	v0, v0
	fmov	w13, s0
	tbz	w13, #0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=3
	stur	xzr, [x11, #-16]
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=3
	mov.s	w13, v0[1]
	tbz	w13, #0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=3
	stur	xzr, [x11, #-8]
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=3
	ldr	q0, [x11]
	cmtst.2d	v0, v0, v0
	xtn.2s	v0, v0
	fmov	w13, s0
	tbz	w13, #0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=3
	str	xzr, [x11]
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=3
	mov.s	w13, v0[1]
	tbz	w13, #0, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=3
	str	xzr, [x11, #8]
LBB0_24:                                ;   in Loop: Header=BB0_12 Depth=3
	ldr	q0, [x11, #16]
	cmtst.2d	v0, v0, v0
	xtn.2s	v0, v0
	fmov	w13, s0
	tbz	w13, #0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_12 Depth=3
	str	xzr, [x11, #16]
LBB0_26:                                ;   in Loop: Header=BB0_12 Depth=3
	mov.s	w13, v0[1]
	tbz	w13, #0, LBB0_11
; %bb.27:                               ;   in Loop: Header=BB0_12 Depth=3
	str	xzr, [x11, #24]
	b	LBB0_11
LBB0_28:                                ;   in Loop: Header=BB0_6 Depth=2
	cmp	x10, x8
	b.ne	LBB0_32
LBB0_29:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x20, x19, x23, lsl #5
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [x20, #8]
	bl	_dev_kfree_skb_any
	str	xzr, [x20, #8]
LBB0_31:                                ;   in Loop: Header=BB0_6 Depth=2
	lsl	x8, x23, #5
	ldr	w8, [x19, x8]
	add	x9, x27, x28, lsl #5
	ldp	x10, x11, [x9]
	str	w22, [x10, x11, lsl #2]
	add	w26, w26, w8
	add	x8, x11, #1
	ldrsw	x10, [x9, #16]
	udiv	x11, x8, x10
	msub	x8, x11, x10, x8
	str	x8, [x9, #8]
	b	LBB0_5
LBB0_32:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
	b	LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_34 Depth=3
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_29
LBB0_34:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x10, [x9]
	cbz	x10, LBB0_33
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=3
	str	xzr, [x9]
	b	LBB0_33
LBB0_36:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w26, #0
LBB0_37:                                ;   in Loop: Header=BB0_1 Depth=1
	str	xzr, [x25, #8]
	mov	x0, x26
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_atomic_sub_return
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w0, w8, asr #1
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	b.gt	LBB0_1
; %bb.38:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x21, #4]
	ldr	w1, [x19]
	bl	___netif_subqueue_stopped
	cbz	x0, LBB0_1
; %bb.39:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x21, #4]
	ldr	w1, [x19]
	bl	_netif_wake_subqueue
	ldr	w0, [x21, #4]
	ldr	w2, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_dbg
	b	LBB0_1
LBB0_40:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_enable_scrq_irq
	mov	x0, x21
	mov	x1, x19
	bl	_pending_scrq
	cbz	x0, LBB0_42
; %bb.41:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_disable_scrq_irq
	b	LBB0_1
LBB0_42:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx error %x\n"

	.comm	_IBMVNIC_TSO_POOL_MASK,4,2      ; @IBMVNIC_TSO_POOL_MASK
	.comm	_IBMVNIC_MAX_FRAGS_PER_CRQ,4,2  ; @IBMVNIC_MAX_FRAGS_PER_CRQ
l_.str.1:                               ; @.str.1
	.asciz	"Started queue %d\n"

	.no_dead_strip	_ibmvnic_complete_tx
.subsections_via_symbols
