	.file	"extr_gdm_usb.c_init_usb.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	init_usb, @function
init_usb:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	add	rdi, 100
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	lea	r13, 88[rbp]
	lea	r12, 56[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR PM_NORMAL[rip]
	mov	DWORD PTR -100[rdi], 1
	mov	QWORD PTR -60[rdi], 0
	mov	QWORD PTR -68[rdi], 0
	mov	DWORD PTR -76[rdi], eax
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 96[rbp]
	call	INIT_LIST_HEAD@PLT
	mov	rdi, r13
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 76[rbp]
	call	INIT_LIST_HEAD@PLT
	mov	rdi, r12
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 72[rbp]
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 92[rbp]
	call	spin_lock_init@PLT
	lea	rdi, 68[rbp]
	call	spin_lock_init@PLT
	lea	rdi, 64[rbp]
	call	spin_lock_init@PLT
	lea	rdi, 60[rbp]
	call	spin_lock_init@PLT
	mov	edx, DWORD PTR MAX_NUM_SDU_BUF[rip]
	mov	QWORD PTR 80[rbp], 0
	mov	QWORD PTR 48[rbp], 0
	mov	QWORD PTR 16[rbp], 0
	test	edx, edx
	jle	.L2
	xor	ebx, ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rsi, r13
	add	ebx, 1
	call	list_add@PLT
	add	QWORD PTR 80[rbp], 1
	cmp	DWORD PTR MAX_NUM_SDU_BUF[rip], ebx
	jle	.L2
.L5:
	xor	eax, eax
	call	alloc_tx_sdu_struct@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L3
.L13:
.L4:
	endbr64
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	rdi, rbp
	call	release_usb@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	neg	r12d
	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
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR MAX_RX_SUBMIT_COUNT[rip]
	test	eax, eax
	jle	.L6
	xor	ebx, ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rsi, r12
	add	ebx, 1
	call	list_add@PLT
	mov	eax, DWORD PTR MAX_RX_SUBMIT_COUNT[rip]
	add	QWORD PTR 48[rbp], 1
	add	eax, eax
	cmp	eax, ebx
	jle	.L6
.L8:
	xor	eax, eax
	call	alloc_rx_struct@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L7
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR do_tx[rip]
	lea	rdi, 8[rbp]
	xor	r12d, r12d
	call	INIT_DELAYED_WORK@PLT
	mov	esi, DWORD PTR do_rx[rip]
	lea	rdi, 4[rbp]
	call	INIT_DELAYED_WORK@PLT
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	init_usb, .-init_usb
	.comm	do_tx,4,4
	.comm	do_rx,4,4
	.comm	PM_NORMAL,4,4
	.comm	MAX_RX_SUBMIT_COUNT,4,4
	.comm	MAX_NUM_SDU_BUF,4,4
	.comm	ENOMEM,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_gdm_usb.c_init_usb.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_usb, %function
init_usb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r2, #1
	mov	r5, #0
	mov	r4, r0
	ldr	r3, .L15
	str	r2, [r0]
	ldr	r3, [r3]
	str	r5, [r0, #24]
	str	r3, [r0, #16]
	str	r5, [r0, #20]
	add	r0, r0, #72
	bl	INIT_LIST_HEAD
	add	r7, r4, #60
	add	r0, r4, #68
	bl	INIT_LIST_HEAD
	mov	r0, r7
	bl	INIT_LIST_HEAD
	add	r6, r4, #32
	add	r0, r4, #52
	bl	INIT_LIST_HEAD
	mov	r0, r6
	bl	INIT_LIST_HEAD
	add	r0, r4, #48
	bl	INIT_LIST_HEAD
	add	r0, r4, #64
	bl	spin_lock_init
	add	r0, r4, #44
	bl	spin_lock_init
	ldr	r8, .L15+4
	add	r0, r4, #40
	bl	spin_lock_init
	add	r0, r4, #36
	bl	spin_lock_init
	ldr	r3, [r8]
	str	r5, [r4, #56]
	cmp	r3, r5
	str	r5, [r4, #28]
	str	r5, [r4, #12]
	bgt	.L5
	b	.L2
.L3:
	mov	r1, r7
	bl	list_add
	ldr	r3, [r4, #56]
	ldr	r2, [r8]
	add	r3, r3, #1
	cmp	r2, r5
	str	r3, [r4, #56]
	ble	.L2
.L5:
	bl	alloc_tx_sdu_struct
	cmp	r0, #0
	add	r5, r5, #1
	bne	.L3
.L13:
.L4:
	ldr	r3, .L15+8
	mov	r0, r4
	ldr	r5, [r3]
	bl	release_usb
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r7, .L15+12
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L6
	mov	r5, #0
	b	.L8
.L7:
	mov	r1, r6
	bl	list_add
	ldr	r3, [r4, #28]
	ldr	r2, [r7]
	add	r3, r3, #1
	cmp	r5, r2, lsl #1
	str	r3, [r4, #28]
	bge	.L6
.L8:
	bl	alloc_rx_struct
	cmp	r0, #0
	add	r5, r5, #1
	bne	.L7
	b	.L13
.L6:
	mov	r5, #0
	ldr	r3, .L15+16
	add	r0, r4, #8
	ldr	r1, [r3]
	bl	INIT_DELAYED_WORK
	ldr	r3, .L15+20
	add	r0, r4, #4
	ldr	r1, [r3]
	bl	INIT_DELAYED_WORK
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	PM_NORMAL
	.word	MAX_NUM_SDU_BUF
	.word	ENOMEM
	.word	MAX_RX_SUBMIT_COUNT
	.word	do_tx
	.word	do_rx
	.size	init_usb, .-init_usb
	.comm	do_tx,4,4
	.comm	do_rx,4,4
	.comm	PM_NORMAL,4,4
	.comm	MAX_RX_SUBMIT_COUNT,4,4
	.comm	MAX_NUM_SDU_BUF,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
