	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_setup_tc
_hns3_setup_tc:                         ## @hns3_setup_tc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	24(%rsi), %r14
	movq	8(%rsi), %rbx
	movq	16(%rsi), %rax
	movq	_TC_MQPRIO_HW_OFFLOAD_TCS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	(%rsi), %rcx
	movq	_TC_MQPRIO_MODE_CHANNEL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
LBB0_2:
	orq	%rbx, %rax
	jne	LBB0_8
LBB0_3:
	movq	_HNAE3_MAX_TC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jg	LBB0_4
## %bb.5:
	testq	%r15, %r15
	je	LBB0_4
## %bb.6:
	movq	%r15, %rdi
	callq	_hns3_get_handle
	movq	%rax, %r12
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	%rbx, %r8
	callq	_netif_dbg
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_8:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TC_MQPRIO_HW_OFFLOAD_TCS,8,3   ## @TC_MQPRIO_HW_OFFLOAD_TCS
	.comm	_TC_MQPRIO_MODE_CHANNEL,8,3     ## @TC_MQPRIO_MODE_CHANNEL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_HNAE3_MAX_TC,8,3               ## @HNAE3_MAX_TC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setup tc: num_tc=%u\n"

	.no_dead_strip	_hns3_setup_tc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_setup_tc
_hns3_setup_tc:                         ; @hns3_setup_tc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldp	x8, x19, [x1, #16]
	ldr	x20, [x1, #8]
Lloh0:
	adrp	x9, _TC_MQPRIO_HW_OFFLOAD_TCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TC_MQPRIO_HW_OFFLOAD_TCS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x1]
Lloh3:
	adrp	x10, _TC_MQPRIO_MODE_CHANNEL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TC_MQPRIO_MODE_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_3
LBB0_2:
	orr	x8, x8, x20
	cbnz	x8, LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _HNAE3_MAX_TC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNAE3_MAX_TC@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x20, x8
	b.gt	LBB0_9
; %bb.4:
	cbz	x21, LBB0_9
; %bb.5:
	mov	x0, x21
	bl	_hns3_get_handle
	mov	x22, x0
Lloh9:
	adrp	x8, _drv@GOTPAGE
Lloh10:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	mov	x2, x21
	mov	x4, x20
	bl	_netif_dbg
	ldr	x8, [x22]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x3, [x8]
	cbz	x3, LBB0_8
; %bb.7:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x3
LBB0_8:
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TC_MQPRIO_HW_OFFLOAD_TCS,8,3   ; @TC_MQPRIO_HW_OFFLOAD_TCS
	.comm	_TC_MQPRIO_MODE_CHANNEL,8,3     ; @TC_MQPRIO_MODE_CHANNEL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_HNAE3_MAX_TC,8,3               ; @HNAE3_MAX_TC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setup tc: num_tc=%u\n"

	.no_dead_strip	_hns3_setup_tc
.subsections_via_symbols
