	.file	"extr_ip6_mroute.c_add_m6if.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"register_mif"
.LC1:
	.string	"mif #%d, phyint %s"
	.text
	.p2align 4
	.type	add_m6if, @function
add_m6if:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	MIF6_LOCK@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR MAXMIFS[rip]
	jge	.L18
	lea	rbx, [rax+rax*2]
	sal	rbx, 4
	add	rbx, QWORD PTR mif6table[rip]
	cmp	QWORD PTR 40[rbx], 0
	jne	.L19
	mov	rdi, QWORD PTR 8[rbp]
	test	rdi, rdi
	je	.L5
	cmp	rdi, QWORD PTR V_if_index[rip]
	jle	.L6
.L5:
	xor	eax, eax
	call	MIF6_UNLOCK@PLT
	mov	r12d, DWORD PTR ENXIO[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	xor	eax, eax
	call	MIF6_UNLOCK@PLT
	mov	r12d, DWORD PTR EADDRINUSE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	xor	eax, eax
	call	MIF6_UNLOCK@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	call	ifnet_byindex@PLT
	mov	r13, rax
	mov	eax, DWORD PTR 16[rbp]
	test	DWORD PTR MIFF_REGISTER[rip], eax
	je	.L7
	cmp	QWORD PTR reg_mif_num[rip], -1
	je	.L20
	mov	r13, QWORD PTR multicast_register_if6[rip]
	mov	rdx, QWORD PTR 0[rbp]
.L9:
	cmp	QWORD PTR nummifs[rip], rdx
	mov	DWORD PTR [rbx], eax
	mov	QWORD PTR 40[rbx], r13
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 16[rbx], 0
	mov	QWORD PTR 8[rbx], 0
	jg	.L12
	add	rdx, 1
	mov	QWORD PTR nummifs[rip], rdx
.L12:
	xor	eax, eax
	xor	r12d, r12d
	call	MIF6_UNLOCK@PLT
	mov	rdi, r13
	call	if_name@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR DEBUG_ANY[rip]
	lea	rsi, .LC1[rip]
	mov	ecx, eax
	call	MRT6_DLOG@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR IFF_MULTICAST[rip], eax
	je	.L21
	mov	esi, 1
	mov	rdi, r13
	call	if_allmulti@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L22
	mov	eax, DWORD PTR 16[rbp]
	mov	rdx, QWORD PTR 0[rbp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	xor	eax, eax
	call	MIF6_UNLOCK@PLT
	mov	r12d, DWORD PTR EOPNOTSUPP[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR IFT_OTHER[rip]
	call	if_alloc@PLT
	xor	edx, edx
	lea	rsi, .LC0[rip]
	mov	r13, rax
	mov	rdi, rax
	call	if_initname@PLT
	mov	eax, DWORD PTR IFF_LOOPBACK[rip]
	or	DWORD PTR 0[r13], eax
	mov	rdi, r13
	call	if_attach@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR multicast_register_if6[rip], r13
	mov	QWORD PTR 8[rbp], rax
	mov	eax, DWORD PTR 16[rbp]
	mov	QWORD PTR reg_mif_num[rip], rdx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	xor	eax, eax
	call	MIF6_UNLOCK@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	add_m6if, .-add_m6if
	.comm	reg_mif_num,8,8
	.comm	nummifs,8,8
	.comm	multicast_register_if6,8,8
	.comm	mif6table,8,8
	.comm	V_if_index,8,8
	.comm	MIFF_REGISTER,4,4
	.comm	MAXMIFS,8,8
	.comm	IFT_OTHER,4,4
	.comm	IFF_MULTICAST,4,4
	.comm	IFF_LOOPBACK,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	EADDRINUSE,4,4
	.comm	DEBUG_ANY,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_ip6_mroute.c_add_m6if.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"register_mif\000"
	.align	2
.LC1:
	.ascii	"mif #%d, phyint %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_m6if, %function
add_m6if:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	bl	MIF6_LOCK
	ldr	r2, .L23
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	bge	.L18
	ldr	r2, .L23+4
	add	r3, r3, r3, lsl #1
	ldr	r7, [r2]
	lsl	r8, r3, #3
	add	r4, r7, r3, lsl #3
	ldr	r6, [r4, #20]
	cmp	r6, #0
	bne	.L19
	ldr	r0, [r5, #4]
	cmp	r0, #0
	beq	.L5
	ldr	r3, .L23+8
	ldr	r3, [r3]
	cmp	r0, r3
	ble	.L6
.L5:
	bl	MIF6_UNLOCK
	ldr	r3, .L23+12
	ldr	r6, [r3]
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	bl	MIF6_UNLOCK
	ldr	r3, .L23+16
	ldr	r6, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	bl	MIF6_UNLOCK
	ldr	r3, .L23+20
	ldr	r6, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	bl	ifnet_byindex
	ldr	r3, .L23+24
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	mov	r9, r0
	tst	r2, r3
	beq	.L7
	ldr	r10, .L23+28
	ldr	r3, [r10]
	cmn	r3, #1
	beq	.L20
	ldr	r3, .L23+32
	ldr	r1, [r5]
	ldr	r9, [r3]
.L9:
	mov	r3, #0
	ldr	r0, .L23+36
	str	r2, [r7, r8]
	ldr	r2, [r0]
	str	r9, [r4, #20]
	cmp	r2, r1
	addle	r1, r1, #1
	str	r3, [r4, #16]
	str	r3, [r4, #12]
	str	r3, [r4, #8]
	str	r3, [r4, #4]
	strle	r1, [r0]
	bl	MIF6_UNLOCK
	ldr	r3, .L23+40
	mov	r0, r9
	ldr	r4, [r3]
	ldr	r5, [r5]
	bl	if_name
	mov	r6, #0
	mov	r3, r0
	mov	r2, r5
	mov	r0, r4
	ldr	r1, .L23+44
	bl	MRT6_DLOG
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	ldr	r3, .L23+48
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L21
	mov	r1, #1
	bl	if_allmulti
	subs	r6, r0, #0
	bne	.L22
	ldr	r2, [r5, #8]
	ldr	r1, [r5]
	b	.L9
.L21:
	bl	MIF6_UNLOCK
	ldr	r3, .L23+52
	ldr	r6, [r3]
	b	.L1
.L20:
	ldr	r3, .L23+56
	ldr	r0, [r3]
	bl	if_alloc
	mov	r9, r0
	ldr	r1, .L23+60
	mov	r2, r6
	bl	if_initname
	ldr	r2, .L23+64
	ldr	r3, [r9]
	ldr	r2, [r2]
	mov	r0, r9
	orr	r3, r3, r2
	str	r3, [r9]
	bl	if_attach
	ldr	r2, .L23+32
	ldr	r1, [r5]
	ldr	r3, [r9, #4]
	str	r9, [r2]
	str	r3, [r5, #4]
	ldr	r2, [r5, #8]
	str	r1, [r10]
	b	.L9
.L22:
	bl	MIF6_UNLOCK
	b	.L1
.L24:
	.align	2
.L23:
	.word	MAXMIFS
	.word	mif6table
	.word	V_if_index
	.word	ENXIO
	.word	EADDRINUSE
	.word	EINVAL
	.word	MIFF_REGISTER
	.word	reg_mif_num
	.word	multicast_register_if6
	.word	nummifs
	.word	DEBUG_ANY
	.word	.LC1
	.word	IFF_MULTICAST
	.word	EOPNOTSUPP
	.word	IFT_OTHER
	.word	.LC0
	.word	IFF_LOOPBACK
	.size	add_m6if, .-add_m6if
	.comm	reg_mif_num,4,4
	.comm	nummifs,4,4
	.comm	multicast_register_if6,4,4
	.comm	mif6table,4,4
	.comm	V_if_index,4,4
	.comm	MIFF_REGISTER,4,4
	.comm	MAXMIFS,4,4
	.comm	IFT_OTHER,4,4
	.comm	IFF_MULTICAST,4,4
	.comm	IFF_LOOPBACK,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.comm	EADDRINUSE,4,4
	.comm	DEBUG_ANY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
