	.file	"extr_config.c_ocxl_config_check_afu_index.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"AFU descriptor template version %d.%d\n"
	.align 8
.LC1:
	.string	"Unknown AFU template version %#x\n"
	.align 8
.LC2:
	.string	"Unexpected template length %#x in AFU information, expected %#x for version %#x\n"
	.text
	.p2align 4
	.globl	ocxl_config_check_afu_index
	.type	ocxl_config_check_afu_index, @function
ocxl_config_check_afu_index:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rsi, QWORD PTR OCXL_DVSEC_AFU_INFO_AFU_IDX[rip]
	add	rsi, QWORD PTR [r12]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	pci_write_config_byte@PLT
	mov	rsi, r12
	mov	rcx, rsp
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	call	read_template_version@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR [rsp]
	mov	r12d, edx
	or	r12d, DWORD PTR 4[rsp]
	je	.L1
	movzx	ecx, dl
	lea	rsi, .LC0[rip]
	sar	edx, 8
	mov	rdi, rbp
	call	dev_dbg@PLT
	mov	r8d, DWORD PTR [rsp]
	cmp	r8d, 256
	je	.L3
	cmp	r8d, 257
	je	.L4
	cmp	r8d, 5
	je	.L3
	mov	edx, r8d
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_warn@PLT
	mov	r12d, 1
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	ecx, DWORD PTR OCXL_TEMPL_LEN_1_1[rip]
.L6:
	mov	edx, DWORD PTR 4[rsp]
	mov	r12d, 1
	cmp	edx, ecx
	je	.L1
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_warn@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	ecx, DWORD PTR OCXL_TEMPL_LEN_1_0[rip]
	jmp	.L6
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ocxl_config_check_afu_index, .-ocxl_config_check_afu_index
	.comm	OCXL_TEMPL_LEN_1_1,4,4
	.comm	OCXL_TEMPL_LEN_1_0,4,4
	.comm	OCXL_DVSEC_AFU_INFO_AFU_IDX,8,8
	.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_config.c_ocxl_config_check_afu_index.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"AFU descriptor template version %d.%d\012\000"
	.align	2
.LC1:
	.ascii	"Unknown AFU template version %#x\012\000"
	.align	2
.LC2:
	.ascii	"Unexpected template length %#x in AFU information, "
	.ascii	"expected %#x for version %#x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ocxl_config_check_afu_index
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocxl_config_check_afu_index, %function
ocxl_config_check_afu_index:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r1
	mov	r5, r0
	ldr	r3, .L18
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	ip, .L18+4
	sub	sp, sp, #28
	add	r1, r1, r3
	ldr	ip, [ip]
	str	ip, [sp, #20]
	mov	ip,#0
	bl	pci_write_config_byte
	mov	r1, r4
	mov	r0, r5
	add	r3, sp, #12
	add	r2, sp, #16
	bl	read_template_version
	cmp	r0, #0
	bne	.L1
	ldr	r2, [sp, #12]
	ldr	r0, [sp, #16]
	orrs	r0, r2, r0
	beq	.L1
	ldr	r1, .L18+8
	and	r3, r2, #255
	mov	r0, r5
	asr	r2, r2, #8
	bl	dev_dbg
	ldr	r1, [sp, #12]
	cmp	r1, #256
	beq	.L3
	ldr	r3, .L18+12
	cmp	r1, r3
	beq	.L4
	cmp	r1, #5
	beq	.L3
	mov	r2, r1
	mov	r0, r5
	ldr	r1, .L18+16
	bl	dev_warn
	mov	r0, #1
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, pc}
.L4:
	ldr	r3, .L18+20
	ldr	r3, [r3]
.L6:
	ldr	r2, [sp, #16]
	cmp	r2, r3
	moveq	r0, #1
	beq	.L1
	str	r1, [sp]
	mov	r0, r5
	ldr	r1, .L18+24
	bl	dev_warn
	mov	r0, #1
	b	.L1
.L3:
	ldr	r3, .L18+28
	ldr	r3, [r3]
	b	.L6
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	OCXL_DVSEC_AFU_INFO_AFU_IDX
	.word	.LC3
	.word	.LC0
	.word	257
	.word	.LC1
	.word	OCXL_TEMPL_LEN_1_1
	.word	.LC2
	.word	OCXL_TEMPL_LEN_1_0
	.size	ocxl_config_check_afu_index, .-ocxl_config_check_afu_index
	.comm	OCXL_TEMPL_LEN_1_1,4,4
	.comm	OCXL_TEMPL_LEN_1_0,4,4
	.comm	OCXL_DVSEC_AFU_INFO_AFU_IDX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
