	.file	"extr_udc-xilinx.c___xudc_ep_enable.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"only one control endpoint\n"
.LC1:
	.string	"bogus maxpacket %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Enable Endpoint %d max pkt is %d\n"
	.text
	.p2align 4
	.type	__xudc_ep_enable, @function
__xudc_ep_enable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	edx, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR [rsi]
	mov	rbp, QWORD PTR 64[rdi]
	mov	QWORD PTR 56[rdi], rsi
	test	DWORD PTR USB_DIR_IN[rip], eax
	mov	r12d, DWORD PTR 4[rsi]
	mov	QWORD PTR 48[rdi], rsi
	setne	dl
	and	eax, 15
	and	r12d, DWORD PTR USB_ENDPOINT_XFERTYPE_MASK[rip]
	mov	DWORD PTR [rdi], edx
	mov	DWORD PTR 4[rdi], eax
	mov	edi, DWORD PTR 8[rsi]
	call	le16_to_cpu@PLT
	mov	DWORD PTR 40[rbx], eax
	cmp	r12d, 130
	je	.L2
	mov	r13d, eax
	jg	.L3
	cmp	r12d, 128
	je	.L4
	cmp	r12d, 129
	jne	.L6
	mov	DWORD PTR 8[rbx], 0
	cmp	eax, 64
	jg	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	movsx	rdx, DWORD PTR 4[rbx]
	mov	rsi, rbp
	mov	rdi, rbx
	mov	rax, QWORD PTR rambase[rip]
	mov	QWORD PTR 12[rbx], 0
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	QWORD PTR 32[rbx], 0
	mov	DWORD PTR 20[rbx], eax
	call	xudc_epconfig@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR 24[rbp]
	mov	ecx, r13d
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	rdi, QWORD PTR 24[rbx]
	add	rdi, QWORD PTR 8[rbp]
	call	[QWORD PTR 0[rbp]]
	or	eax, DWORD PTR XUSB_EP_CFG_VALID_MASK[rip]
	mov	rsi, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, eax
	call	[QWORD PTR 16[rbp]]
	mov	ecx, DWORD PTR 4[rbx]
	test	ecx, ecx
	je	.L12
	sal	DWORD PTR 20[rbx], 2
.L12:
	mov	rdi, QWORD PTR XUSB_IER_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbp]
	call	[QWORD PTR 0[rbp]]
	mov	ecx, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR XUSB_STATUS_INTR_BUFF_COMP_SHIFT_MASK[rip]
	mov	rdi, QWORD PTR 8[rbp]
	mov	rsi, QWORD PTR XUSB_IER_OFFSET[rip]
	sal	edx, cl
	or	edx, eax
	call	[QWORD PTR 16[rbp]]
	mov	eax, DWORD PTR 4[rbx]
	test	eax, eax
	je	.L1
	mov	edx, DWORD PTR [rbx]
	test	edx, edx
	jne	.L13
	mov	r12d, 1
	mov	ecx, eax
	mov	rdi, QWORD PTR 8[rbp]
	mov	rsi, QWORD PTR XUSB_BUFFREADY_OFFSET[rip]
	mov	edx, r12d
	sal	edx, cl
	call	[QWORD PTR 16[rbp]]
	mov	ecx, DWORD PTR XUSB_STATUS_EP_BUFF2_SHIFT[rip]
	mov	edx, r12d
	add	ecx, DWORD PTR 4[rbx]
	mov	DWORD PTR 12[rbx], 1
	mov	rdi, QWORD PTR 8[rbp]
	sal	edx, cl
	mov	rsi, QWORD PTR XUSB_BUFFREADY_OFFSET[rip]
	call	[QWORD PTR 16[rbp]]
	mov	DWORD PTR 16[rbx], 1
	xor	eax, eax
.L1:
	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
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	r12d, 131
	jne	.L6
	mov	DWORD PTR 8[rbx], 0
	mov	edi, eax
	call	is_power_of_2@PLT
	test	eax, eax
	je	.L10
	lea	eax, -8[r13]
	cmp	eax, 504
	jbe	.L6
.L10:
	mov	edi, DWORD PTR 24[rbp]
	mov	edx, r13d
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	eax, 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
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L4:
	.cfi_restore_state
	mov	DWORD PTR 8[rbx], 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 24[rbp]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR 8[rbx], 0
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	__xudc_ep_enable, .-__xudc_ep_enable
	.comm	rambase,8,8
	.comm	XUSB_STATUS_INTR_BUFF_COMP_SHIFT_MASK,4,4
	.comm	XUSB_STATUS_EP_BUFF2_SHIFT,4,4
	.comm	XUSB_IER_OFFSET,8,8
	.comm	XUSB_EP_CFG_VALID_MASK,4,4
	.comm	XUSB_BUFFREADY_OFFSET,8,8
	.comm	USB_ENDPOINT_XFERTYPE_MASK,4,4
	.comm	USB_DIR_IN,4,4
	.comm	EINVAL,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_udc-xilinx.c___xudc_ep_enable.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"only one control endpoint\012\000"
	.align	2
.LC1:
	.ascii	"bogus maxpacket %d\012\000"
	.align	2
.LC2:
	.ascii	"Enable Endpoint %d max pkt is %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__xudc_ep_enable, %function
__xudc_ep_enable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L25
	ldr	r3, [r1]
	ldr	r2, [r2]
	push	{r4, r5, r6, r7, r8, lr}
	tst	r3, r2
	mov	r4, r0
	movne	r0, #1
	moveq	r0, #0
	ldr	r2, .L25+4
	ldr	r6, [r1, #4]
	ldr	r2, [r2]
	and	r3, r3, #15
	stm	r4, {r0, r3}
	str	r1, [r4, #40]
	ldr	r0, [r1, #8]
	str	r1, [r4, #36]
	and	r6, r6, r2
	ldr	r5, [r4, #44]
	bl	le16_to_cpu
	sub	r1, r6, #128
	mov	r7, r0
	str	r0, [r4, #32]
	cmp	r1, #3
	ldrls	pc, [pc, r1, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L7:
	mov	r3, #1
	str	r3, [r4, #8]
.L2:
	mov	r3, #0
	ldr	r2, .L25+8
	ldr	r1, [r4, #4]
	ldr	r2, [r2]
	str	r3, [r4, #12]
	str	r3, [r4, #16]
	ldr	r2, [r2, r1, lsl #2]
	mov	r0, r4
	mov	r1, r5
	str	r3, [r4, #28]
	str	r2, [r4, #20]
	bl	xudc_epconfig
	ldr	r1, .L25+12
	mov	r3, r7
	ldr	r2, [r4, #4]
	ldr	r0, [r5, #12]
	bl	dev_dbg
	ldr	r2, [r4, #24]
	ldr	r0, [r5, #4]
	ldr	r3, [r5]
	add	r0, r0, r2
	blx	r3
	ldr	r2, .L25+16
	ldr	r1, [r4, #24]
	ldr	r2, [r2]
	ldr	r3, [r5, #8]
	orr	r2, r0, r2
	ldr	r0, [r5, #4]
	blx	r3
	ldr	r3, [r4, #4]
	ldr	r6, .L25+20
	cmp	r3, #0
	ldrne	r3, [r4, #20]
	ldr	r2, [r6]
	ldr	r0, [r5, #4]
	lslne	r3, r3, #2
	strne	r3, [r4, #20]
	add	r0, r0, r2
	ldr	r3, [r5]
	blx	r3
	ldr	r2, .L25+24
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	ldr	r1, [r6]
	orr	r2, r0, r2, lsl r3
	ldmib	r5, {r0, r3}
	blx	r3
	ldr	r0, [r4, #4]
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r6, [r4]
	cmp	r6, #0
	bne	.L13
	mov	r7, #1
	ldr	r8, .L25+28
	lsl	r2, r7, r0
	ldr	r1, [r8]
	ldmib	r5, {r0, r3}
	blx	r3
	ldr	r3, .L25+32
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	ldr	r1, [r8]
	add	r2, r2, r3
	str	r7, [r4, #12]
	lsl	r2, r7, r2
	ldmib	r5, {r0, r3}
	blx	r3
	mov	r0, r6
	str	r7, [r4, #16]
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	mov	r3, #0
	str	r3, [r4, #8]
	bl	is_power_of_2
	cmp	r0, #0
	beq	.L10
	sub	r3, r7, #8
	cmp	r3, #504
	bls	.L2
.L10:
	mov	r2, r7
	ldr	r0, [r5, #12]
	ldr	r1, .L25+36
	bl	dev_dbg
	ldr	r3, .L25+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r3, #0
	cmp	r0, #64
	str	r3, [r4, #8]
	ble	.L2
	b	.L10
.L5:
	ldr	r0, [r5, #12]
	ldr	r1, .L25+44
	bl	dev_dbg
	mov	r2, #0
	ldr	r3, .L25+40
	str	r2, [r4, #8]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L26:
	.align	2
.L25:
	.word	USB_DIR_IN
	.word	USB_ENDPOINT_XFERTYPE_MASK
	.word	rambase
	.word	.LC2
	.word	XUSB_EP_CFG_VALID_MASK
	.word	XUSB_IER_OFFSET
	.word	XUSB_STATUS_INTR_BUFF_COMP_SHIFT_MASK
	.word	XUSB_BUFFREADY_OFFSET
	.word	XUSB_STATUS_EP_BUFF2_SHIFT
	.word	.LC1
	.word	EINVAL
	.word	.LC0
	.size	__xudc_ep_enable, .-__xudc_ep_enable
	.comm	rambase,4,4
	.comm	XUSB_STATUS_INTR_BUFF_COMP_SHIFT_MASK,4,4
	.comm	XUSB_STATUS_EP_BUFF2_SHIFT,4,4
	.comm	XUSB_IER_OFFSET,4,4
	.comm	XUSB_EP_CFG_VALID_MASK,4,4
	.comm	XUSB_BUFFREADY_OFFSET,4,4
	.comm	USB_ENDPOINT_XFERTYPE_MASK,4,4
	.comm	USB_DIR_IN,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
