	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_alloc_vport
_hclge_alloc_vport:                     ## @hclge_alloc_vport
	.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	%rdi, %r13
	movq	32(%rdi), %rdi
	movl	(%r13), %r15d
	movl	4(%r13), %r12d
	leal	(%r12,%r15), %ecx
	leal	(%r12,%r15), %r14d
	incl	%r14d
	movl	8(%r13), %eax
	cmpl	%ecx, %eax
	jle	LBB0_1
## %bb.2:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cltd
	idivl	%r14d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %esi
	movl	$40, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, 24(%r13)
	movl	%r14d, 12(%r13)
	movq	_CONFIG_PCI_IOV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	4(%r13), %eax
	movl	%eax, 16(%r13)
LBB0_7:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_12
## %bb.8:
	addl	%r15d, %r12d
	incl	%r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, 32(%rbx)
	movl	%r14d, (%rbx)
	movq	_HCLGE_MAC_DEFAULT_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_HNAE3_PORT_BASE_VLAN_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movl	$1, 16(%rbx)
	leaq	12(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	8(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	4(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	testl	%r14d, %r14d
	movl	$0, %esi
	cmovel	-48(%rbp), %esi                 ## 4-byte Folded Reload
	addl	-52(%rbp), %esi                 ## 4-byte Folded Reload
	movq	%rbx, %rdi
	callq	_hclge_vport_setup
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	$40, %rbx
	incl	%r14d
	cmpl	%r14d, %r12d
	jne	LBB0_9
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tqps(%d) is less than vports(%d)"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CONFIG_PCI_IOV,4,2             ## @CONFIG_PCI_IOV
	.comm	_HCLGE_MAC_DEFAULT_FRAME,4,2    ## @HCLGE_MAC_DEFAULT_FRAME
	.comm	_HNAE3_PORT_BASE_VLAN_DISABLE,4,2 ## @HNAE3_PORT_BASE_VLAN_DISABLE
L_.str.1:                               ## @.str.1
	.asciz	"vport setup failed for vport %d, %d\n"

	.no_dead_strip	_hclge_alloc_vport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_alloc_vport
_hclge_alloc_vport:                     ; @hclge_alloc_vport
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x25, [x0, #32]
	ldp	w19, w26, [x0]
	ldr	w23, [x0, #8]
	add	w22, w26, w19
	cmp	w23, w22
	add	w24, w22, #1
	b.le	LBB0_9
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x25
	mov	x1, x24
	mov	w2, #40
	bl	_devm_kcalloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x21, x0
	str	x0, [x20, #24]
	str	w24, [x20, #12]
Lloh3:
	adrp	x8, _CONFIG_PCI_IOV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONFIG_PCI_IOV@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x20, #4]
	str	w8, [x20, #16]
LBB0_4:
	tbnz	w22, #31, LBB0_8
; %bb.5:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	mov	w22, #0
	sdiv	w25, w23, w24
	msub	w24, w25, w24, w23
	add	w8, w19, w26
	add	w26, w8, #1
Lloh6:
	adrp	x27, _HCLGE_MAC_DEFAULT_FRAME@GOTPAGE
Lloh7:
	ldr	x27, [x27, _HCLGE_MAC_DEFAULT_FRAME@GOTPAGEOFF]
Lloh8:
	adrp	x28, _HNAE3_PORT_BASE_VLAN_DISABLE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _HNAE3_PORT_BASE_VLAN_DISABLE@GOTPAGEOFF]
	mov	w19, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	x20, [x21, #32]
	str	w22, [x21]
	ldr	w8, [x27]
	str	w8, [x21, #24]
	ldr	w8, [x28]
	stp	w19, w8, [x21, #16]
	add	x0, x21, #12
	bl	_INIT_LIST_HEAD
	add	x0, x21, #8
	bl	_INIT_LIST_HEAD
	add	x0, x21, #4
	bl	_INIT_LIST_HEAD
	cmp	w22, #0
	csel	w8, w24, wzr, eq
	add	w1, w25, w8
	mov	x0, x21
	bl	_hclge_vport_setup
	cbnz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #40
	add	w22, w22, #1
	cmp	w26, w22
	b.ne	LBB0_6
LBB0_8:
	mov	w23, #0
	b	LBB0_12
LBB0_9:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x2, x23
	mov	x3, x24
	bl	_dev_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_12:
	mov	x0, x23
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	x23, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x2, x22
	mov	x3, x23
	bl	_dev_err
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tqps(%d) is less than vports(%d)"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CONFIG_PCI_IOV,4,2             ; @CONFIG_PCI_IOV
	.comm	_HCLGE_MAC_DEFAULT_FRAME,4,2    ; @HCLGE_MAC_DEFAULT_FRAME
	.comm	_HNAE3_PORT_BASE_VLAN_DISABLE,4,2 ; @HNAE3_PORT_BASE_VLAN_DISABLE
l_.str.1:                               ; @.str.1
	.asciz	"vport setup failed for vport %d, %d\n"

	.no_dead_strip	_hclge_alloc_vport
.subsections_via_symbols
