	.file	"extr_Server.c_SiWriteHubs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	SiWriteHubs
	.type	SiWriteHubs, @function
SiWriteHubs:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L1
	test	rsi, rsi
	je	.L1
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r15, QWORD PTR [rsi]
	mov	edi, DWORD PTR [r15]
	call	LockList@PLT
	mov	edi, DWORD PTR [r15]
	call	ToArray@PLT
	mov	edi, DWORD PTR [r15]
	mov	rbp, rax
	call	LIST_NUM@PLT
	mov	r12, rax
	test	rax, rax
	je	.L3
	mov	r13, rbp
	lea	r14, 0[rbp+rax*8]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 0[r13]
	add	r13, 8
	mov	edi, DWORD PTR 8[rax]
	call	AddRef@PLT
	cmp	r14, r13
	jne	.L4
	mov	edi, DWORD PTR [r15]
	xor	r13d, r13d
	movabs	r15, -1229782938247303441
	call	UnlockList@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	r13, 1
	cmp	r12, r13
	je	.L8
.L7:
	mov	r14, QWORD PTR 0[rbp+r13*8]
	mov	edi, DWORD PTR [r14]
	call	Lock@PLT
	mov	esi, DWORD PTR 4[r14]
	mov	rdi, rbx
	call	CfgCreateFolder@PLT
	mov	rsi, r14
	mov	rdi, rax
	call	SiWriteHubCfg@PLT
	mov	edi, DWORD PTR [r14]
	call	Unlock@PLT
	mov	rdi, r14
	call	ReleaseHub@PLT
	mov	rax, r13
	movabs	rdx, 1229782938247303441
	movabs	rcx, 614891469123651720
	imul	rax, r15
	add	rax, rdx
	ror	rax
	cmp	rax, rcx
	ja	.L6
	xor	eax, eax
	add	r13, 1
	call	YieldCpu@PLT
	cmp	r12, r13
	jne	.L7
.L8:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	Free@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	mov	edi, DWORD PTR [r15]
	call	UnlockList@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	SiWriteHubs, .-SiWriteHubs
	.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_Server.c_SiWriteHubs.c"
	.text
	.align	2
	.global	SiWriteHubs
	.syntax unified
	.arm
	.fpu softvfp
	.type	SiWriteHubs, %function
SiWriteHubs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	cmpne	r0, #0
	bxeq	lr
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r10, [r1]
	mov	r5, r0
	ldr	r0, [r10]
	bl	LockList
	ldr	r0, [r10]
	bl	ToArray
	mov	r9, r0
	ldr	r0, [r10]
	bl	LIST_NUM
	subs	r6, r0, #0
	beq	.L3
	sub	r4, r9, #4
	mov	r7, r4
	add	r8, r9, r6, lsl #2
	sub	r8, r8, #4
.L4:
	ldr	r3, [r7, #4]!
	ldr	r0, [r3, #8]
	bl	AddRef
	cmp	r7, r8
	bne	.L4
	ldr	r0, [r10]
	bl	UnlockList
	mov	r10, #0
	ldr	r8, .L16
	ldr	r7, .L16+4
	b	.L7
.L6:
	cmp	r6, r10
	beq	.L8
.L7:
	ldr	fp, [r4, #4]!
	ldr	r0, [fp]
	bl	Lock
	ldr	r1, [fp, #4]
	mov	r0, r5
	bl	CfgCreateFolder
	mov	r1, fp
	bl	SiWriteHubCfg
	ldr	r0, [fp]
	bl	Unlock
	mov	r0, fp
	bl	ReleaseHub
	add	r3, r10, r10, lsl #4
	add	r3, r3, r3, lsl #8
	add	r3, r3, r3, lsl #16
	sub	r3, r8, r3
	cmp	r7, r3, ror #1
	add	r10, r10, #1
	bcc	.L6
	bl	YieldCpu
	cmp	r6, r10
	bne	.L7
.L8:
	mov	r0, r9
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	Free
.L3:
	ldr	r0, [r10]
	bl	UnlockList
	b	.L8
.L17:
	.align	2
.L16:
	.word	286331153
	.word	143165576
	.size	SiWriteHubs, .-SiWriteHubs
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
