	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpsw_update_channels_res
_cpsw_update_channels_res:              ## @cpsw_update_channels_res
	.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
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	testl	%edx, %edx
	sete	%cl
	setne	%al
	jne	LBB0_2
## %bb.1:
	movq	_cpsw_tx_handler@GOTPCREL(%rip), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
LBB0_2:
	movb	%cl, %r13b
	movq	16(%r12,%rax,8), %r14
	movl	(%r12,%r13,4), %edi
	shlq	$2, %r13
	cmpl	%esi, %edi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jge	LBB0_7
## %bb.3:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rcx, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$7, %esi
	subl	%edi, %esi
	testl	%r15d, %r15d
	cmovnel	%edi, %esi
	movl	8(%r12), %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	callq	_cpdma_chan_create
	movslq	(%r12,%r13), %rcx
	movl	%eax, (%r14,%rcx,4)
	movl	(%rbx), %edi
	movl	(%r12,%r13), %esi
	callq	_netdev_get_tx_queue
	movq	$0, (%rax)
	movslq	(%r12,%r13), %rax
	movl	(%r14,%rax,4), %edi
	callq	_IS_ERR
	movslq	(%r12,%r13), %rcx
	movl	(%r14,%rcx,4), %edi
	testq	%rax, %rax
	jne	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%edi, %edi
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_cpsw_info
	movl	(%r12,%r13), %edi
	incl	%edi
	movl	%edi, (%r12,%r13)
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	%esi, %edi
	jl	LBB0_4
LBB0_7:
	xorl	%eax, %eax
	cmpl	%esi, %edi
	jle	LBB0_14
## %bb.8:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %r15
	cmoveq	%rcx, %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rdi), %ecx
	movl	%ecx, (%r12,%r13)
	movslq	%edi, %rax
	movl	-4(%r14,%rax,4), %edi
	callq	_cpdma_chan_destroy
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12,%r13), %ecx
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %r8
	callq	_cpsw_info
	movl	(%r12,%r13), %edi
	cmpl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	jg	LBB0_9
## %bb.11:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"created new %d %s channel\n"

L_.str.1:                               ## @.str.1
	.asciz	"rx"

L_.str.2:                               ## @.str.2
	.asciz	"tx"

L_.str.3:                               ## @.str.3
	.asciz	"destroyed %d %s channel\n"

	.no_dead_strip	_cpsw_update_channels_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpsw_update_channels_res
_cpsw_update_channels_res:              ; @cpsw_update_channels_res
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x25, [x0, #8]
	cmp	w2, #0
	cset	w8, eq
	mov	w9, #24
	mov	w10, #16
	csel	x9, x10, x9, eq
Lloh0:
	adrp	x10, _cpsw_tx_handler@GOTPAGE
Lloh1:
	ldr	x10, [x10, _cpsw_tx_handler@GOTPAGEOFF]
	csel	x22, x10, x3, eq
	lsl	x26, x8, #2
	ldr	x27, [x25, x9]
	ldr	w8, [x25, x26]
	cmp	w8, w1
	b.ge	LBB0_5
; %bb.1:
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh4:
	adrp	x10, l_.str.2@PAGE
Lloh5:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x23, x10, x9, eq
	mov	w28, #7
Lloh6:
	adrp	x24, l_.str@PAGE
Lloh7:
	add	x24, x24, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w28, w8
	cmp	w21, #0
	csel	w1, w9, w8, eq
	ldr	w0, [x25, #8]
	mov	x2, x22
	mov	x3, x21
	bl	_cpdma_chan_create
	ldrsw	x8, [x25, x26]
	str	w0, [x27, x8, lsl #2]
	ldr	w0, [x20]
	ldr	w1, [x25, x26]
	bl	_netdev_get_tx_queue
	str	xzr, [x0]
	ldrsw	x8, [x25, x26]
	ldr	w0, [x27, x8, lsl #2]
	bl	_IS_ERR
	mov	x8, x0
	ldrsw	x3, [x25, x26]
	ldr	w0, [x27, x3, lsl #2]
	cbnz	x8, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	w0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh8:
	adrp	x8, _ifup@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x24
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	x4, x23
	bl	_cpsw_info
	ldr	w8, [x25, x26]
	add	w8, w8, #1
	str	w8, [x25, x26]
	cmp	w8, w19
	b.lt	LBB0_2
LBB0_5:
	cmp	w8, w19
	b.le	LBB0_9
; %bb.6:
Lloh11:
	adrp	x9, l_.str.1@PAGE
Lloh12:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh13:
	adrp	x10, l_.str.2@PAGE
Lloh14:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x21, x10, x9, eq
Lloh15:
	adrp	x23, _ifup@GOTPAGE
Lloh16:
	ldr	x23, [x23, _ifup@GOTPAGEOFF]
Lloh17:
	adrp	x22, l_.str.3@PAGE
Lloh18:
	add	x22, x22, l_.str.3@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x8, w8
	sub	x8, x8, #1
	str	w8, [x25, x26]
	ldr	w0, [x27, x8, lsl #2]
	bl	_cpdma_chan_destroy
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x23]
	ldr	w3, [x25, x26]
	mov	x0, x20
	mov	x2, x22
	mov	x4, x21
	bl	_cpsw_info
	ldr	w8, [x25, x26]
	cmp	w8, w19
	b.gt	LBB0_7
LBB0_9:
	mov	w0, #0
	b	LBB0_12
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_11:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"created new %d %s channel\n"

l_.str.1:                               ; @.str.1
	.asciz	"rx"

l_.str.2:                               ; @.str.2
	.asciz	"tx"

l_.str.3:                               ; @.str.3
	.asciz	"destroyed %d %s channel\n"

	.no_dead_strip	_cpsw_update_channels_res
.subsections_via_symbols
