	.file	"extr_cptpf_main.c_cpt_sriov_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"SRIOV capability is not found in PCIe config space\n"
	.align 8
.LC1:
	.string	"SRIOV enable failed, num VF is %d\n"
	.align 8
.LC2:
	.string	"SRIOV enabled, number of VF available %d\n"
	.text
	.p2align 4
	.type	cpt_sriov_init, @function
cpt_sriov_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR PCI_EXT_CAP_ID_SRIOV[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdi, rbp
	call	pci_find_ext_capability@PLT
	test	eax, eax
	je	.L12
	mov	DWORD PTR [rbx], r12d
	cdqe
	add	rax, QWORD PTR PCI_SRIOV_TOTAL_VF[rip]
	mov	rdi, rbp
	lea	rdx, 4[rsp]
	mov	rsi, rax
	call	pci_read_config_word@PLT
	mov	r12d, DWORD PTR 4[rsp]
	cmp	DWORD PTR [rbx], r12d
	jle	.L4
	mov	DWORD PTR [rbx], r12d
.L4:
	test	r12d, r12d
	jne	.L13
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	pci_enable_sriov@PLT
	mov	edx, DWORD PTR [rbx]
	mov	r12d, eax
	test	eax, eax
	jne	.L15
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	dev_info@PLT
	mov	eax, DWORD PTR CPT_FLAG_SRIOV_ENABLED[rip]
	or	DWORD PTR 4[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_err@PLT
	mov	DWORD PTR [rbx], 0
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cpt_sriov_init, .-cpt_sriov_init
	.comm	PCI_SRIOV_TOTAL_VF,8,8
	.comm	PCI_EXT_CAP_ID_SRIOV,4,4
	.comm	ENODEV,4,4
	.comm	CPT_FLAG_SRIOV_ENABLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cptpf_main.c_cpt_sriov_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SRIOV capability is not found in PCIe config space\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"SRIOV enable failed, num VF is %d\012\000"
	.align	2
.LC2:
	.ascii	"SRIOV enabled, number of VF available %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cpt_sriov_init, %function
cpt_sriov_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r2, .L16
	ldr	r6, [r0, #8]
	ldr	r3, .L16+4
	sub	sp, sp, #8
	mov	r4, r0
	mov	r5, r1
	mov	r0, r6
	ldr	r1, [r2]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	pci_find_ext_capability
	cmp	r0, #0
	beq	.L12
	ldr	r3, .L16+8
	str	r5, [r4]
	ldr	r1, [r3]
	mov	r2, sp
	add	r1, r0, r1
	mov	r0, r6
	bl	pci_read_config_word
	ldr	r5, [sp]
	ldr	r3, [r4]
	cmp	r3, r5
	strgt	r5, [r4]
	cmp	r5, #0
	bne	.L13
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r6
	ldr	r1, [r4]
	bl	pci_enable_sriov
	subs	r5, r0, #0
	ldr	r2, [r4]
	mov	r0, r6
	bne	.L15
	ldr	r1, .L16+12
	bl	dev_info
	ldr	r2, .L16+16
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4, #4]
	b	.L1
.L12:
	mov	r0, r6
	ldr	r1, .L16+20
	bl	dev_err
	ldr	r3, .L16+24
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L1
.L15:
	ldr	r1, .L16+28
	bl	dev_err
	mov	r3, #0
	str	r3, [r4]
	b	.L1
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	PCI_EXT_CAP_ID_SRIOV
	.word	.LC3
	.word	PCI_SRIOV_TOTAL_VF
	.word	.LC2
	.word	CPT_FLAG_SRIOV_ENABLED
	.word	.LC0
	.word	ENODEV
	.word	.LC1
	.size	cpt_sriov_init, .-cpt_sriov_init
	.comm	PCI_SRIOV_TOTAL_VF,4,4
	.comm	PCI_EXT_CAP_ID_SRIOV,4,4
	.comm	ENODEV,4,4
	.comm	CPT_FLAG_SRIOV_ENABLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
