	.file	"extr_f_mass_storage.c_received_cbw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"invalid CBW: len %u sig 0x%x\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"non-meaningful CBW: lun = %u, flags = 0x%x, cmdlen %u\n"
	.text
	.p2align 4
	.type	received_cbw, @function
received_cbw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR [rsi]
	cmp	QWORD PTR 8[r12], 0
	je	.L2
.L17:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	r13, 4[rdi]
	mov	r14, QWORD PTR 8[rdi]
	mov	rbp, rdi
	mov	rbx, QWORD PTR 16[r12]
	mov	edi, DWORD PTR IGNORE_BULK_OUT[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L17
	mov	r15, QWORD PTR [rbx]
	mov	rax, QWORD PTR US_BULK_CB_WRAP_LEN[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L5
	mov	edi, DWORD PTR US_BULK_CB_SIGN[rip]
	call	cpu_to_le32@PLT
	cmp	rax, r15
	je	.L6
	mov	r15, QWORD PTR [rbx]
.L5:
	mov	rdi, r15
	call	le32_to_cpu@PLT
	mov	rdx, QWORD PTR [r12]
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	mov	rcx, rax
	xor	eax, eax
	call	DBG@PLT
	mov	rdi, rbp
	call	wedge_bulk_in_endpoint@PLT
	mov	edi, DWORD PTR IGNORE_BULK_OUT[rip]
	mov	rsi, r13
	call	set_bit@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR 40[r14]
	mov	r12, QWORD PTR 8[rbx]
	call	ARRAY_SIZE@PLT
	mov	ecx, DWORD PTR 16[rbx]
	cmp	r12, rax
	jge	.L19
	mov	r12d, DWORD PTR US_BULK_FLAG_IN[rip]
	mov	r8, QWORD PTR 24[rbx]
	not	r12d
	and	r12d, ecx
	jne	.L8
	test	r8, r8
	jle	.L8
	cmp	QWORD PTR MAX_COMMAND_SIZE[rip], r8
	jl	.L8
	mov	esi, DWORD PTR 44[rbx]
	mov	edi, DWORD PTR 52[r14]
	mov	QWORD PTR [r14], r8
	mov	rdx, r8
	call	memcpy@PLT
	mov	eax, DWORD PTR 16[rbx]
	test	DWORD PTR US_BULK_FLAG_IN[rip], eax
	mov	eax, DWORD PTR DATA_DIR_TO_HOST[rip]
	cmove	eax, DWORD PTR DATA_DIR_FROM_HOST[rip]
	mov	rdi, QWORD PTR 32[rbx]
	mov	DWORD PTR 48[r14], eax
	call	le32_to_cpu@PLT
	mov	QWORD PTR 8[r14], rax
	test	rax, rax
	jne	.L13
	mov	eax, DWORD PTR DATA_DIR_NONE[rip]
	mov	DWORD PTR 48[r14], eax
.L13:
	mov	rbp, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 40[r14]
	mov	QWORD PTR 16[r14], rbp
	call	ARRAY_SIZE@PLT
	mov	r8, rax
	xor	eax, eax
	cmp	rbp, r8
	jge	.L14
	mov	rdx, QWORD PTR 16[r14]
	mov	rax, QWORD PTR 40[r14]
	mov	rax, QWORD PTR [rax+rdx*8]
.L14:
	mov	QWORD PTR 32[r14], rax
	mov	eax, DWORD PTR 40[rbx]
	mov	DWORD PTR 24[r14], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r8, QWORD PTR 24[rbx]
.L8:
	mov	rdx, QWORD PTR 8[rbx]
	xor	eax, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	DBG@PLT
	cmp	QWORD PTR 56[r14], 0
	je	.L17
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rbp
	call	fsg_set_halt@PLT
	mov	rdi, rbp
	call	halt_bulk_in_endpoint@PLT
	jmp	.L17
	.cfi_endproc
.LFE0:
	.size	received_cbw, .-received_cbw
	.comm	US_BULK_FLAG_IN,4,4
	.comm	US_BULK_CB_WRAP_LEN,8,8
	.comm	US_BULK_CB_SIGN,4,4
	.comm	MAX_COMMAND_SIZE,8,8
	.comm	IGNORE_BULK_OUT,4,4
	.comm	EINVAL,4,4
	.comm	DATA_DIR_TO_HOST,4,4
	.comm	DATA_DIR_NONE,4,4
	.comm	DATA_DIR_FROM_HOST,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_f_mass_storage.c_received_cbw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid CBW: len %u sig 0x%x\012\000"
	.align	2
.LC1:
	.ascii	"non-meaningful CBW: lun = %u, flags = 0x%x, cmdlen "
	.ascii	"%u\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	received_cbw, %function
received_cbw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, [r1]
	sub	sp, sp, #12
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L2
.L20:
	ldr	r3, .L23
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r4, r0
	ldr	r6, .L23+4
	add	r7, r0, #4
	mov	r1, r7
	ldr	r0, [r6]
	ldr	r8, [r5, #8]
	ldr	r9, [r4, #8]
	bl	test_bit
	cmp	r0, #0
	bne	.L20
	ldr	r3, .L23+8
	ldr	fp, [r5]
	ldr	r3, [r3]
	ldr	r10, [r8]
	cmp	fp, r3
	bne	.L5
	ldr	r3, .L23+12
	ldr	r0, [r3]
	bl	cpu_to_le32
	cmp	r0, r10
	beq	.L6
	ldr	fp, [r5]
	ldr	r10, [r8]
.L5:
	mov	r0, r10
	bl	le32_to_cpu
	mov	r2, fp
	mov	r3, r0
	ldr	r1, .L23+16
	mov	r0, r4
	bl	DBG
	mov	r0, r4
	bl	wedge_bulk_in_endpoint
	mov	r1, r7
	ldr	r0, [r6]
	bl	set_bit
	b	.L20
.L6:
	ldr	r0, [r9, #20]
	ldr	r5, [r8, #4]
	bl	ARRAY_SIZE
	cmp	r5, r0
	bge	.L22
	ldr	r6, .L23+20
	ldr	r3, [r8, #8]
	ldr	r5, [r6]
	ldr	r1, [r8, #12]
	bics	r5, r3, r5
	bne	.L8
	cmp	r1, #0
	ble	.L8
	ldr	r2, .L23+24
	ldr	r2, [r2]
	cmp	r2, r1
	blt	.L8
	mov	r2, r1
	str	r1, [r9]
	ldr	r0, [r9, #28]
	ldr	r1, [r8, #24]
	bl	memcpy
	ldr	r2, [r8, #8]
	ldr	r3, [r6]
	ldr	r0, [r8, #16]
	tst	r2, r3
	ldrne	r3, .L23+28
	ldreq	r3, .L23+32
	ldr	r3, [r3]
	str	r3, [r9, #24]
	bl	le32_to_cpu
	cmp	r0, #0
	ldreq	r3, .L23+36
	ldr	r4, [r8, #4]
	ldreq	r3, [r3]
	str	r0, [r9, #4]
	streq	r3, [r9, #24]
	ldr	r0, [r9, #20]
	str	r4, [r9, #8]
	bl	ARRAY_SIZE
	cmp	r4, r0
	movge	r2, #0
	ldrlt	r2, [r9, #8]
	ldrlt	r3, [r9, #20]
	ldrlt	r2, [r3, r2, lsl #2]
	ldr	r3, [r8, #20]
	str	r2, [r9, #16]
	str	r3, [r9, #12]
	b	.L1
.L22:
	ldr	r3, [r8, #8]
	ldr	r1, [r8, #12]
.L8:
	ldr	r2, [r8, #4]
	mov	r0, r4
	str	r1, [sp]
	ldr	r1, .L23+40
	bl	DBG
	ldr	r3, [r9, #32]
	cmp	r3, #0
	beq	.L20
	mov	r0, r4
	ldr	r1, [r4]
	bl	fsg_set_halt
	mov	r0, r4
	bl	halt_bulk_in_endpoint
	b	.L20
.L24:
	.align	2
.L23:
	.word	EINVAL
	.word	IGNORE_BULK_OUT
	.word	US_BULK_CB_WRAP_LEN
	.word	US_BULK_CB_SIGN
	.word	.LC0
	.word	US_BULK_FLAG_IN
	.word	MAX_COMMAND_SIZE
	.word	DATA_DIR_TO_HOST
	.word	DATA_DIR_FROM_HOST
	.word	DATA_DIR_NONE
	.word	.LC1
	.size	received_cbw, .-received_cbw
	.comm	US_BULK_FLAG_IN,4,4
	.comm	US_BULK_CB_WRAP_LEN,4,4
	.comm	US_BULK_CB_SIGN,4,4
	.comm	MAX_COMMAND_SIZE,4,4
	.comm	IGNORE_BULK_OUT,4,4
	.comm	EINVAL,4,4
	.comm	DATA_DIR_TO_HOST,4,4
	.comm	DATA_DIR_NONE,4,4
	.comm	DATA_DIR_FROM_HOST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
