	.file	"extr_fhci-hcd.c_fhci_usb_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fhci_usb_init, @function
fhci_usb_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbp, QWORD PTR 8[rdi]
	mov	edx, DWORD PTR FHCI_PRAM_SIZE[rip]
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 8[rax]
	call	memset_io@PLT
	mov	eax, DWORD PTR FHCI_PORT_DISABLED[rip]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	mov	DWORD PTR 32[rbp], eax
	mov	eax, DWORD PTR FRAME_TIME_USAGE[rip]
	mov	DWORD PTR 28[rbp], eax
	mov	eax, DWORD PTR SW_FIX_TIME_BETWEEN_TRANSACTION[rip]
	mov	DWORD PTR 24[rbp], eax
	call	kzalloc@PLT
	mov	QWORD PTR 16[rbp], rax
	test	rax, rax
	je	.L8
	mov	rdi, rax
	call	INIT_LIST_HEAD@PLT
	mov	rax, QWORD PTR [rbx]
	xor	esi, esi
	lea	rdi, 4[rax]
	call	out_be16@PLT
	mov	rdi, QWORD PTR [rbx]
	xor	esi, esi
	call	out_be32@PLT
	mov	eax, DWORD PTR USB_E_TXB_MASK[rip]
	or	eax, DWORD PTR USB_E_TXE1_MASK[rip]
	or	eax, DWORD PTR USB_E_IDLE_MASK[rip]
	or	eax, DWORD PTR USB_E_RESET_MASK[rip]
	or	eax, DWORD PTR USB_E_SFT_MASK[rip]
	or	eax, DWORD PTR USB_E_MSF_MASK[rip]
	mov	DWORD PTR 0[rbp], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR USB_MODE_HOST[rip]
	or	esi, DWORD PTR USB_MODE_EN[rip]
	mov	rdi, QWORD PTR [rax]
	add	rdi, 8
	call	out_8@PLT
	mov	rax, QWORD PTR 8[rbp]
	xor	esi, esi
	mov	rdi, QWORD PTR [rax]
	add	rdi, 4
	call	out_be16@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, 65535
	mov	rdi, QWORD PTR [rax]
	call	out_be16@PLT
	mov	edx, DWORD PTR DEFAULT_RING_LEN[rip]
	mov	esi, DWORD PTR DEFAULT_DATA_MEM[rip]
	mov	rdi, rbp
	call	endpoint_zero_init@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	jne	.L9
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, rbp
	call	fhci_usb_free@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbp
	call	fhci_usb_free@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	fhci_usb_init, .-fhci_usb_init
	.comm	USB_MODE_HOST,4,4
	.comm	USB_MODE_EN,4,4
	.comm	USB_E_TXE1_MASK,4,4
	.comm	USB_E_TXB_MASK,4,4
	.comm	USB_E_SFT_MASK,4,4
	.comm	USB_E_RESET_MASK,4,4
	.comm	USB_E_MSF_MASK,4,4
	.comm	USB_E_IDLE_MASK,4,4
	.comm	SW_FIX_TIME_BETWEEN_TRANSACTION,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FRAME_TIME_USAGE,4,4
	.comm	FHCI_PRAM_SIZE,4,4
	.comm	FHCI_PORT_DISABLED,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DEFAULT_RING_LEN,4,4
	.comm	DEFAULT_DATA_MEM,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_fhci-hcd.c_fhci_usb_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fhci_usb_init, %function
fhci_usb_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r4, [r0, #4]
	ldr	r2, .L10
	ldr	r3, [r4, #4]
	mov	r1, #0
	ldr	r2, [r2]
	mov	r5, r0
	ldr	r0, [r3, #4]
	bl	memset_io
	ldr	r1, .L10+4
	ldr	r2, .L10+8
	ldr	r3, .L10+12
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L10+16
	str	r0, [r4, #20]
	str	r1, [r4, #16]
	mov	r0, #4
	ldr	r1, [r3]
	str	r2, [r4, #12]
	bl	kzalloc
	subs	r3, r0, #0
	str	r0, [r4, #8]
	beq	.L9
	bl	INIT_LIST_HEAD
	ldr	r0, [r5]
	mov	r1, #0
	add	r0, r0, #4
	bl	out_be16
	mov	r1, #0
	ldr	r0, [r5]
	bl	out_be32
	ldr	r2, .L10+20
	ldr	r3, .L10+24
	ldr	r1, .L10+28
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, .L10+32
	ldr	r0, [r1]
	ldr	r1, .L10+36
	ldr	r2, [r2]
	orr	r3, r3, ip
	orr	r3, r3, r0
	ldr	r0, [r1]
	orr	r3, r3, r2
	ldr	ip, .L10+40
	orr	r3, r3, r0
	ldr	r1, .L10+44
	ldr	r0, [r4, #4]
	ldr	r2, .L10+48
	ldr	ip, [ip]
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r0]
	orr	r3, r3, ip
	orr	r1, r1, r2
	str	r3, [r4]
	add	r0, r0, #8
	bl	out_8
	ldr	r3, [r4, #4]
	mov	r1, #0
	ldr	r0, [r3]
	add	r0, r0, #4
	bl	out_be16
	ldr	r3, [r4, #4]
	ldr	r1, .L10+52
	ldr	r0, [r3]
	bl	out_be16
	ldr	r3, .L10+56
	ldr	r2, .L10+60
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	endpoint_zero_init
	cmp	r0, #0
	popeq	{r4, r5, r6, pc}
	mov	r0, r4
	bl	fhci_usb_free
	ldr	r3, .L10+64
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L9:
	mov	r0, r4
	bl	fhci_usb_free
	ldr	r3, .L10+68
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	FHCI_PRAM_SIZE
	.word	FHCI_PORT_DISABLED
	.word	FRAME_TIME_USAGE
	.word	SW_FIX_TIME_BETWEEN_TRANSACTION
	.word	GFP_KERNEL
	.word	USB_E_TXE1_MASK
	.word	USB_E_TXB_MASK
	.word	USB_E_IDLE_MASK
	.word	USB_E_RESET_MASK
	.word	USB_E_SFT_MASK
	.word	USB_E_MSF_MASK
	.word	USB_MODE_HOST
	.word	USB_MODE_EN
	.word	65535
	.word	DEFAULT_DATA_MEM
	.word	DEFAULT_RING_LEN
	.word	EINVAL
	.word	ENOMEM
	.size	fhci_usb_init, .-fhci_usb_init
	.comm	USB_MODE_HOST,4,4
	.comm	USB_MODE_EN,4,4
	.comm	USB_E_TXE1_MASK,4,4
	.comm	USB_E_TXB_MASK,4,4
	.comm	USB_E_SFT_MASK,4,4
	.comm	USB_E_RESET_MASK,4,4
	.comm	USB_E_MSF_MASK,4,4
	.comm	USB_E_IDLE_MASK,4,4
	.comm	SW_FIX_TIME_BETWEEN_TRANSACTION,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FRAME_TIME_USAGE,4,4
	.comm	FHCI_PRAM_SIZE,4,4
	.comm	FHCI_PORT_DISABLED,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DEFAULT_RING_LEN,4,4
	.comm	DEFAULT_DATA_MEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
