	.file	"extr_mptbase.c_mpt_register.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mpt_register
	.type	mpt_register, @function
mpt_register:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, DWORD PTR MPT_MAX_PROTOCOL_DRIVERS[rip]
	mov	eax, r8d
	mov	DWORD PTR last_drv_idx[rip], r8d
	sub	eax, 1
	je	.L5
	mov	r9d, esi
	mov	rsi, rdx
	mov	rdx, QWORD PTR MptCallbacks[rip]
	cdqe
	lea	rdx, [rdx+rax*8]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	sub	rax, 1
	sub	rdx, 8
	test	eax, eax
	je	.L8
.L4:
	cmp	QWORD PTR [rdx], 0
	lea	rcx, 0[0+rax*8]
	jne	.L3
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	QWORD PTR [rdx], rdi
	mov	rdx, QWORD PTR MptDriverClass[rip]
	mov	rdi, QWORD PTR MPT_MAX_CALLBACKNAME_LEN[rip]
	mov	DWORD PTR [rdx+rax*4], r9d
	mov	rdx, QWORD PTR MptEvHandlers[rip]
	mov	QWORD PTR [rdx+rcx], 0
	mov	rcx, QWORD PTR MptCallbacksName[rip]
	lea	rdx, 1[rdi]
	mov	DWORD PTR last_drv_idx[rip], eax
	mov	edi, DWORD PTR [rcx+rax*4]
	call	strlcpy@PLT
	mov	r8d, DWORD PTR last_drv_idx[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 8
	mov	eax, r8d
	ret
.L5:
	mov	r8d, 1
.L8:
	mov	eax, r8d
	ret
	.cfi_endproc
.LFE0:
	.size	mpt_register, .-mpt_register
	.comm	last_drv_idx,4,4
	.comm	MptEvHandlers,8,8
	.comm	MptDriverClass,8,8
	.comm	MptCallbacksName,8,8
	.comm	MptCallbacks,8,8
	.comm	MPT_MAX_PROTOCOL_DRIVERS,4,4
	.comm	MPT_MAX_CALLBACKNAME_LEN,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_mptbase.c_mpt_register.c"
	.text
	.align	2
	.global	mpt_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpt_register, %function
mpt_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, [r3]
	ldr	r7, .L9+4
	subs	r3, r6, #1
	str	r6, [r7]
	beq	.L5
	ldr	ip, .L9+8
	lsl	r5, r3, #2
	ldr	ip, [ip]
	add	ip, ip, r3, lsl #2
	b	.L4
.L3:
	subs	r3, r3, #1
	beq	.L1
	lsl	r5, r3, #2
.L4:
	ldr	lr, [ip]
	mov	r4, ip
	cmp	lr, #0
	sub	ip, ip, #4
	bne	.L3
	ldr	ip, .L9+12
	str	r0, [r4]
	ldr	r0, .L9+16
	ldr	r4, [ip]
	ldr	ip, [r0]
	str	r1, [r4, r5]
	ldr	r0, .L9+20
	ldr	r1, .L9+24
	str	lr, [ip, r5]
	ldr	r0, [r0]
	ldr	ip, [r1]
	str	r3, [r7]
	mov	r1, r2
	ldr	r0, [r0, r5]
	add	r2, ip, #1
	bl	strlcpy
	ldr	r6, [r7]
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r6, #1
	b	.L1
.L10:
	.align	2
.L9:
	.word	MPT_MAX_PROTOCOL_DRIVERS
	.word	last_drv_idx
	.word	MptCallbacks
	.word	MptDriverClass
	.word	MptEvHandlers
	.word	MptCallbacksName
	.word	MPT_MAX_CALLBACKNAME_LEN
	.size	mpt_register, .-mpt_register
	.comm	last_drv_idx,4,4
	.comm	MptEvHandlers,4,4
	.comm	MptDriverClass,4,4
	.comm	MptCallbacksName,4,4
	.comm	MptCallbacks,4,4
	.comm	MPT_MAX_PROTOCOL_DRIVERS,4,4
	.comm	MPT_MAX_CALLBACKNAME_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
