	.file	"extr_pch_udc.c_pch_udc_ep_enable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pch_udc_ep_enable, @function
pch_udc_ep_enable:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	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	esi, DWORD PTR [rdx]
	call	pch_udc_ep_set_trfr_type@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR UDC_EPIN_BUFF_SIZE[rip]
	mov	rdi, rbx
	test	edx, edx
	cmove	esi, DWORD PTR UDC_EPOUT_BUFF_SIZE[rip]
	call	pch_udc_ep_set_bufsz@PLT
	mov	rdi, r12
	call	usb_endpoint_maxp@PLT
	mov	rdi, rbx
	mov	esi, eax
	call	pch_udc_ep_set_maxpkt@PLT
	mov	rdi, rbx
	call	pch_udc_ep_set_nak@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbx
	call	pch_udc_ep_fifo_flush@PLT
	mov	ebp, DWORD PTR 0[r13]
	mov	esi, DWORD PTR 4[r13]
	mov	rdi, r12
	mov	ecx, DWORD PTR UDC_CSR_NE_CFG_SHIFT[rip]
	mov	eax, DWORD PTR 8[r13]
	sal	ebp, cl
	mov	ecx, DWORD PTR UDC_CSR_NE_INTF_SHIFT[rip]
	sal	esi, cl
	mov	ecx, DWORD PTR UDC_CSR_NE_ALT_SHIFT[rip]
	or	ebp, esi
	mov	esi, DWORD PTR 4[rbx]
	sal	eax, cl
	mov	ecx, DWORD PTR UDC_CSR_NE_NUM_SHIFT[rip]
	or	ebp, eax
	sal	esi, cl
	mov	ecx, DWORD PTR UDC_CSR_NE_DIR_SHIFT[rip]
	or	ebp, esi
	mov	esi, DWORD PTR [rbx]
	sal	esi, cl
	mov	ecx, DWORD PTR UDC_CSR_NE_TYPE_SHIFT[rip]
	or	ebp, esi
	mov	esi, DWORD PTR [r12]
	and	esi, DWORD PTR USB_ENDPOINT_XFERTYPE_MASK[rip]
	sal	esi, cl
	or	ebp, esi
	call	usb_endpoint_maxp@PLT
	mov	ecx, DWORD PTR UDC_CSR_NE_MAX_PKT_SHIFT[rip]
	mov	edi, DWORD PTR 4[rbx]
	sal	eax, cl
	or	ebp, eax
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L4
	call	UDC_EPIN_IDX@PLT
.L6:
	mov	edi, DWORD PTR 8[rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, ebp
	mov	edx, 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
	jmp	pch_udc_write_csr@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	call	UDC_EPOUT_IDX@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	pch_udc_ep_enable, .-pch_udc_ep_enable
	.comm	USB_ENDPOINT_XFERTYPE_MASK,4,4
	.comm	UDC_EPOUT_BUFF_SIZE,4,4
	.comm	UDC_EPIN_BUFF_SIZE,4,4
	.comm	UDC_CSR_NE_TYPE_SHIFT,4,4
	.comm	UDC_CSR_NE_NUM_SHIFT,4,4
	.comm	UDC_CSR_NE_MAX_PKT_SHIFT,4,4
	.comm	UDC_CSR_NE_INTF_SHIFT,4,4
	.comm	UDC_CSR_NE_DIR_SHIFT,4,4
	.comm	UDC_CSR_NE_CFG_SHIFT,4,4
	.comm	UDC_CSR_NE_ALT_SHIFT,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_pch_udc.c_pch_udc_ep_enable.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pch_udc_ep_enable, %function
pch_udc_ep_enable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r7, r1
	ldr	r1, [r2]
	mov	r6, r2
	bl	pch_udc_ep_set_trfr_type
	ldr	r2, [r5]
	mov	r0, r5
	cmp	r2, #0
	ldrne	r3, .L8
	ldreq	r3, .L8+4
	ldr	r1, [r3]
	bl	pch_udc_ep_set_bufsz
	mov	r0, r6
	bl	usb_endpoint_maxp
	mov	r1, r0
	mov	r0, r5
	bl	pch_udc_ep_set_maxpkt
	mov	r0, r5
	bl	pch_udc_ep_set_nak
	ldr	r1, [r5]
	mov	r0, r5
	bl	pch_udc_ep_fifo_flush
	ldr	r2, .L8+8
	ldr	r4, [r7, #4]
	ldr	r1, [r2]
	ldr	r3, .L8+12
	lsl	r4, r4, r1
	ldr	r3, [r3]
	ldr	r1, [r7]
	ldr	r2, .L8+16
	ldr	r0, [r7, #8]
	ldr	r2, [r2]
	orr	r4, r4, r1, lsl r3
	ldr	r3, .L8+20
	orr	r4, r4, r0, lsl r2
	ldr	r3, [r3]
	ldr	r0, [r5, #4]
	ldr	r1, .L8+24
	orr	r4, r4, r0, lsl r3
	ldr	r1, [r1]
	ldr	r0, [r5]
	ldr	r2, .L8+28
	ldr	r3, .L8+32
	ldr	r2, [r2]
	orr	r4, r4, r0, lsl r1
	ldr	r1, [r6]
	ldr	r3, [r3]
	and	r1, r1, r2
	mov	r0, r6
	orr	r4, r4, r1, lsl r3
	bl	usb_endpoint_maxp
	ldr	r2, .L8+36
	ldr	r3, [r5]
	ldr	r1, [r2]
	cmp	r3, #0
	orr	r4, r4, r0, lsl r1
	ldr	r6, [r5, #8]
	ldr	r0, [r5, #4]
	beq	.L4
	bl	UDC_EPIN_IDX
.L6:
	mov	r2, r0
	mov	r1, r4
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	pch_udc_write_csr
.L4:
	bl	UDC_EPOUT_IDX
	b	.L6
.L9:
	.align	2
.L8:
	.word	UDC_EPIN_BUFF_SIZE
	.word	UDC_EPOUT_BUFF_SIZE
	.word	UDC_CSR_NE_INTF_SHIFT
	.word	UDC_CSR_NE_CFG_SHIFT
	.word	UDC_CSR_NE_ALT_SHIFT
	.word	UDC_CSR_NE_NUM_SHIFT
	.word	UDC_CSR_NE_DIR_SHIFT
	.word	USB_ENDPOINT_XFERTYPE_MASK
	.word	UDC_CSR_NE_TYPE_SHIFT
	.word	UDC_CSR_NE_MAX_PKT_SHIFT
	.size	pch_udc_ep_enable, .-pch_udc_ep_enable
	.comm	USB_ENDPOINT_XFERTYPE_MASK,4,4
	.comm	UDC_EPOUT_BUFF_SIZE,4,4
	.comm	UDC_EPIN_BUFF_SIZE,4,4
	.comm	UDC_CSR_NE_TYPE_SHIFT,4,4
	.comm	UDC_CSR_NE_NUM_SHIFT,4,4
	.comm	UDC_CSR_NE_MAX_PKT_SHIFT,4,4
	.comm	UDC_CSR_NE_INTF_SHIFT,4,4
	.comm	UDC_CSR_NE_DIR_SHIFT,4,4
	.comm	UDC_CSR_NE_CFG_SHIFT,4,4
	.comm	UDC_CSR_NE_ALT_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
