	.file	"extr_lh7a40x_udc.c_lh7a40x_handle_get_status.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"GET_STATUS: USB_RECIP_INTERFACE\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"GET_STATUS: USB_RECIP_DEVICE\n"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"GET_STATUS: USB_RECIP_ENDPOINT (%d), ctrl->wLength = %d\n"
	.align 8
.LC3:
	.string	"GET_STATUS, ep: %d (%x), val = %d\n"
	.section	.rodata.str1.1
.LC4:
	.string	"Unknown REQ TYPE: %d\n"
	.text
	.p2align 4
	.type	lh7a40x_handle_get_status, @function
lh7a40x_handle_get_status:
.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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR [rsi]
	and	esi, DWORD PTR USB_RECIP_MASK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR USB_RECIP_INTERFACE[rip], esi
	mov	r13, QWORD PTR [rdi]
	mov	DWORD PTR 4[rsp], 0
	je	.L30
	cmp	DWORD PTR USB_RECIP_DEVICE[rip], esi
	je	.L31
	cmp	DWORD PTR USB_RECIP_ENDPOINT[rip], esi
	je	.L32
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	DEBUG_SETUP@PLT
.L28:
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L33
	add	rsp, 24
	.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
.L32:
	.cfi_restore_state
	mov	r12d, DWORD PTR USB_DIR_IN[rip]
	mov	edx, DWORD PTR 8[rbx]
	xor	eax, eax
	mov	rbp, rdi
	lea	rdi, .LC2[rip]
	not	r12d
	and	r12d, DWORD PTR 4[rbx]
	mov	esi, r12d
	call	DEBUG_SETUP@PLT
	cmp	DWORD PTR 8[rbx], 2
	jg	.L28
	cmp	r12d, 3
	jg	.L28
	mov	rdx, QWORD PTR 0[rbp]
	movsx	rax, r12d
	lea	rbp, [rdx+rax*8]
	mov	rdi, rbp
	call	ep_is_in@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR 4[rbx]
	test	DWORD PTR USB_DIR_IN[rip], eax
	setne	al
	movzx	eax, al
	cmp	r8d, eax
	je	.L9
	mov	rdi, rbp
	call	ep_index@PLT
	test	rax, rax
	jne	.L28
.L9:
	mov	rdi, rbp
	call	ep_index@PLT
	mov	rdi, rax
	call	usb_set_index@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 130
	je	.L10
	jg	.L11
	cmp	eax, 128
	je	.L12
	cmp	eax, 129
	jne	.L14
	mov	edi, DWORD PTR 4[rbp]
	call	usb_read@PLT
	mov	edx, DWORD PTR EP0_SEND_STALL[rip]
.L27:
	and	eax, edx
	cmp	eax, edx
	sete	al
	movzx	eax, al
	mov	DWORD PTR 4[rsp], eax
.L14:
	xor	edi, edi
	call	usb_set_index@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR 4[rsp]
	mov	esi, r12d
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	DEBUG_SETUP@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC0[rip]
	call	DEBUG_SETUP@PLT
.L3:
	mov	esi, DWORD PTR USB_EP0_CSR[rip]
	mov	edi, DWORD PTR EP0_CLR_OUT[rip]
	call	usb_set@PLT
	lea	rsi, 4[rsp]
	mov	edx, 4
	mov	rdi, r13
	call	lh7a40x_fifo_write@PLT
	mov	esi, DWORD PTR USB_EP0_CSR[rip]
	mov	edi, DWORD PTR EP0_IN_PKT_RDY[rip]
	or	edi, DWORD PTR EP0_DATA_END[rip]
	call	usb_set@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DEBUG_SETUP@PLT
	or	DWORD PTR 4[rsp], 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	eax, 131
	jne	.L14
.L12:
	mov	edi, DWORD PTR 4[rbp]
	call	usb_read@PLT
	mov	edx, DWORD PTR USB_IN_CSR1_SEND_STALL[rip]
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR 4[rbp]
	call	usb_read@PLT
	mov	edx, DWORD PTR USB_OUT_CSR1_SEND_STALL[rip]
	jmp	.L27
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lh7a40x_handle_get_status, .-lh7a40x_handle_get_status
	.comm	USB_RECIP_MASK,4,4
	.comm	USB_RECIP_INTERFACE,4,4
	.comm	USB_RECIP_ENDPOINT,4,4
	.comm	USB_RECIP_DEVICE,4,4
	.comm	USB_OUT_CSR1_SEND_STALL,4,4
	.comm	USB_IN_CSR1_SEND_STALL,4,4
	.comm	USB_EP0_CSR,4,4
	.comm	USB_DIR_IN,4,4
	.comm	EP0_SEND_STALL,4,4
	.comm	EP0_IN_PKT_RDY,4,4
	.comm	EP0_DATA_END,4,4
	.comm	EP0_CLR_OUT,4,4
	.comm	EOPNOTSUPP,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_lh7a40x_udc.c_lh7a40x_handle_get_status.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GET_STATUS: USB_RECIP_INTERFACE\012\000"
	.align	2
.LC1:
	.ascii	"GET_STATUS: USB_RECIP_DEVICE\012\000"
	.align	2
.LC2:
	.ascii	"GET_STATUS: USB_RECIP_ENDPOINT (%d), ctrl->wLength "
	.ascii	"= %d\012\000"
	.align	2
.LC3:
	.ascii	"GET_STATUS, ep: %d (%x), val = %d\012\000"
	.align	2
.LC4:
	.ascii	"Unknown REQ TYPE: %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lh7a40x_handle_get_status, %function
lh7a40x_handle_get_status:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	mov	r5, r0
	mov	r2, #0
	ldr	r1, .L26
	ldr	r0, .L26+4
	ldr	r3, [r4]
	ldr	r1, [r1]
	ldr	r0, [r0]
	and	r1, r1, r3
	ldr	r3, .L26+8
	sub	sp, sp, #12
	cmp	r0, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	ldr	r7, [r5]
	str	r2, [sp]
	beq	.L22
	ldr	r3, .L26+12
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L23
	ldr	r3, .L26+16
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L24
	ldr	r0, .L26+20
	bl	DEBUG_SETUP
.L20:
	ldr	r3, .L26+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L26+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L24:
	ldr	r8, .L26+28
	ldr	r6, [r4, #4]
	ldr	r1, [r8]
	ldr	r2, [r4, #8]
	bic	r6, r6, r1
	mov	r1, r6
	ldr	r0, .L26+32
	bl	DEBUG_SETUP
	ldr	r3, [r4, #8]
	cmp	r6, #3
	cmple	r3, #2
	bgt	.L20
	ldr	r9, [r5]
	add	r5, r9, r6, lsl #3
	mov	r0, r5
	bl	ep_is_in
	ldr	r3, [r8]
	ldr	r2, [r4, #4]
	tst	r2, r3
	movne	r3, #1
	moveq	r3, #0
	cmp	r0, r3
	beq	.L8
	mov	r0, r5
	bl	ep_index
	cmp	r0, #0
	bne	.L20
.L8:
	mov	r0, r5
	bl	ep_index
	bl	usb_set_index
	ldr	r3, [r9, r6, lsl #3]
	sub	r3, r3, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L9
.L11:
	.word	.L10
	.word	.L13
	.word	.L12
	.word	.L10
.L22:
	ldr	r0, .L26+36
	bl	DEBUG_SETUP
.L3:
	ldr	r3, .L26+40
	ldr	r4, .L26+44
	ldr	r0, [r3]
	ldr	r1, [r4]
	bl	usb_set
	mov	r2, #4
	mov	r1, sp
	mov	r0, r7
	bl	lh7a40x_fifo_write
	ldr	r2, .L26+48
	ldr	r3, .L26+52
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r1, [r4]
	orr	r0, r0, r3
	bl	usb_set
	mov	r0, #0
	b	.L1
.L23:
	ldr	r0, .L26+56
	bl	DEBUG_SETUP
	ldr	r3, [sp]
	orr	r3, r3, #1
	str	r3, [sp]
	b	.L3
.L10:
	ldr	r0, [r5, #4]
	bl	usb_read
	ldr	r3, .L26+60
.L19:
	ldr	r3, [r3]
	bics	r3, r3, r0
	moveq	r3, #1
	movne	r3, #0
	str	r3, [sp]
.L9:
	mov	r0, #0
	bl	usb_set_index
	mov	r1, r6
	ldr	r2, [r4, #4]
	ldr	r3, [sp]
	ldr	r0, .L26+64
	bl	DEBUG_SETUP
	b	.L3
.L12:
	ldr	r0, [r5, #4]
	bl	usb_read
	ldr	r3, .L26+68
	b	.L19
.L13:
	ldr	r0, [r5, #4]
	bl	usb_read
	ldr	r3, .L26+72
	b	.L19
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	USB_RECIP_MASK
	.word	USB_RECIP_INTERFACE
	.word	.LC5
	.word	USB_RECIP_DEVICE
	.word	USB_RECIP_ENDPOINT
	.word	.LC4
	.word	EOPNOTSUPP
	.word	USB_DIR_IN
	.word	.LC2
	.word	.LC0
	.word	EP0_CLR_OUT
	.word	USB_EP0_CSR
	.word	EP0_IN_PKT_RDY
	.word	EP0_DATA_END
	.word	.LC1
	.word	USB_IN_CSR1_SEND_STALL
	.word	.LC3
	.word	USB_OUT_CSR1_SEND_STALL
	.word	EP0_SEND_STALL
	.size	lh7a40x_handle_get_status, .-lh7a40x_handle_get_status
	.comm	USB_RECIP_MASK,4,4
	.comm	USB_RECIP_INTERFACE,4,4
	.comm	USB_RECIP_ENDPOINT,4,4
	.comm	USB_RECIP_DEVICE,4,4
	.comm	USB_OUT_CSR1_SEND_STALL,4,4
	.comm	USB_IN_CSR1_SEND_STALL,4,4
	.comm	USB_EP0_CSR,4,4
	.comm	USB_DIR_IN,4,4
	.comm	EP0_SEND_STALL,4,4
	.comm	EP0_IN_PKT_RDY,4,4
	.comm	EP0_DATA_END,4,4
	.comm	EP0_CLR_OUT,4,4
	.comm	EOPNOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
