	.file	"extr_u132-hcd.c_u132_roothub_descriptor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	u132_roothub_descriptor, @function
u132_roothub_descriptor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR roothub[rip+4]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdx, rsp
	mov	DWORD PTR [rsp], -1
	mov	DWORD PTR 4[rsp], -1
	call	u132_read_pcimem@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR [rsp]
	mov	eax, DWORD PTR USB_DT_HUB[rip]
	mov	QWORD PTR 32[rbx], 0
	mov	ecx, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR HUB_CHAR_COMMON_LPSM[rip]
	mov	DWORD PTR 40[rbx], eax
	mov	eax, DWORD PTR RH_A_POTPGT[rip]
	mov	DWORD PTR 4[rbx], ecx
	and	eax, edx
	sar	eax, 24
	test	ecx, ecx
	mov	DWORD PTR [rbx], eax
	lea	eax, 7[rcx]
	cmovns	eax, ecx
	or	edi, DWORD PTR HUB_CHAR_COMMON_OCPM[rip]
	sar	eax, 3
	lea	eax, 9[rax+rax]
	mov	DWORD PTR 8[rbx], eax
	test	DWORD PTR RH_A_NPS[rip], edx
	je	.L3
	or	edi, DWORD PTR HUB_CHAR_NO_LPSM[rip]
.L3:
	test	DWORD PTR RH_A_PSM[rip], edx
	je	.L4
	or	edi, DWORD PTR HUB_CHAR_INDV_PORT_LPSM[rip]
.L4:
	test	DWORD PTR RH_A_NOCP[rip], edx
	je	.L5
	or	edi, DWORD PTR HUB_CHAR_NO_OCPM[rip]
.L6:
	call	cpu_to_le16@PLT
	mov	esi, DWORD PTR roothub[rip]
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	mov	DWORD PTR 24[rbx], eax
	call	u132_read_pcimem@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, QWORD PTR 16[rbx]
	mov	edx, 8
	mov	esi, 255
	call	memset@PLT
	mov	rdx, QWORD PTR 16[rbx]
	mov	eax, DWORD PTR 4[rsp]
	and	eax, DWORD PTR RH_B_DR[rip]
	mov	DWORD PTR [rdx], eax
	cmp	DWORD PTR 0[rbp], 7
	jle	.L7
	mov	eax, DWORD PTR 4[rsp]
	and	eax, DWORD PTR RH_B_DR[rip]
	mov	DWORD PTR 8[rdx], 255
	sar	eax, 8
	mov	DWORD PTR 4[rdx], eax
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	test	DWORD PTR RH_A_OCPM[rip], edx
	je	.L6
	or	edi, DWORD PTR HUB_CHAR_INDV_PORT_OCPM[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	DWORD PTR 4[rdx], 255
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	u132_roothub_descriptor, .-u132_roothub_descriptor
	.comm	roothub,8,8
	.comm	USB_DT_HUB,4,4
	.comm	RH_B_DR,4,4
	.comm	RH_A_PSM,4,4
	.comm	RH_A_POTPGT,4,4
	.comm	RH_A_OCPM,4,4
	.comm	RH_A_NPS,4,4
	.comm	RH_A_NOCP,4,4
	.comm	HUB_CHAR_NO_OCPM,4,4
	.comm	HUB_CHAR_NO_LPSM,4,4
	.comm	HUB_CHAR_INDV_PORT_OCPM,4,4
	.comm	HUB_CHAR_INDV_PORT_LPSM,4,4
	.comm	HUB_CHAR_COMMON_OCPM,4,4
	.comm	HUB_CHAR_COMMON_LPSM,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_u132-hcd.c_u132_roothub_descriptor.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	u132_roothub_descriptor, %function
u132_roothub_descriptor:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mvn	r3, #0
	push	{r4, r5, r6, lr}
	ldr	r6, .L22
	sub	sp, sp, #16
	ldr	ip, .L22+4
	mov	r4, r1
	add	r2, sp, #4
	ldr	r1, [r6, #4]
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	mov	r5, r0
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	bl	u132_read_pcimem
	cmp	r0, #0
	bne	.L1
	ldr	ip, [r5]
	ldr	r1, .L22+8
	cmp	ip, #0
	add	r3, ip, #7
	movge	r3, ip
	ldr	lr, [r1]
	asr	r3, r3, #3
	ldr	r1, [sp, #4]
	str	r0, [r4, #20]
	ldr	r0, .L22+12
	lsl	r3, r3, #1
	add	r3, r3, #9
	tst	r1, lr
	str	ip, [r4, #4]
	ldr	ip, [r0]
	ldr	r0, .L22+16
	str	r3, [r4, #8]
	ldrne	r3, .L22+20
	ldr	r0, [r0]
	ldrne	r3, [r3]
	orr	r0, ip, r0
	orrne	r0, r0, r3
	ldr	r3, .L22+24
	ldr	r2, .L22+28
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r1, r3
	ldrne	r3, .L22+32
	ldr	lr, .L22+36
	ldrne	r3, [r3]
	ldr	lr, [lr]
	orrne	r0, r0, r3
	ldr	r3, .L22+40
	and	r2, r2, r1
	ldr	r3, [r3]
	asr	r2, r2, #24
	tst	r1, r3
	str	r2, [r4]
	str	lr, [r4, #24]
	bne	.L20
	ldr	r3, .L22+44
	ldr	r3, [r3]
	tst	r1, r3
	ldrne	r3, .L22+48
	ldrne	r3, [r3]
	orrne	r0, r0, r3
.L6:
	bl	cpu_to_le16
	ldr	r1, [r6]
	str	r0, [r4, #16]
	add	r2, sp, #8
	mov	r0, r5
	bl	u132_read_pcimem
	cmp	r0, #0
	bne	.L1
	mov	r3, #255
	ldr	r2, [r4, #12]
	ldr	ip, .L22+52
	strb	r3, [r2]
	strb	r3, [r2, #1]
	strb	r3, [r2, #2]
	strb	r3, [r2, #3]
	ldr	lr, [ip]
	ldr	r2, [sp, #8]
	ldr	r1, [r4, #12]
	and	r2, r2, lr
	str	r2, [r1]
	ldr	r2, [r5]
	cmp	r2, #7
	ldrgt	ip, [ip]
	ldrgt	r2, [sp, #8]
	strgt	r3, [r1, #8]
	andgt	r3, r2, ip
	asrgt	r3, r3, #8
	str	r3, [r1, #4]
.L1:
	ldr	r3, .L22+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L20:
	ldr	r3, .L22+56
	ldr	r3, [r3]
	orr	r0, r0, r3
	b	.L6
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	roothub
	.word	.LC0
	.word	RH_A_NPS
	.word	HUB_CHAR_COMMON_LPSM
	.word	HUB_CHAR_COMMON_OCPM
	.word	HUB_CHAR_NO_LPSM
	.word	RH_A_PSM
	.word	RH_A_POTPGT
	.word	HUB_CHAR_INDV_PORT_LPSM
	.word	USB_DT_HUB
	.word	RH_A_NOCP
	.word	RH_A_OCPM
	.word	HUB_CHAR_INDV_PORT_OCPM
	.word	RH_B_DR
	.word	HUB_CHAR_NO_OCPM
	.size	u132_roothub_descriptor, .-u132_roothub_descriptor
	.comm	roothub,8,4
	.comm	USB_DT_HUB,4,4
	.comm	RH_B_DR,4,4
	.comm	RH_A_PSM,4,4
	.comm	RH_A_POTPGT,4,4
	.comm	RH_A_OCPM,4,4
	.comm	RH_A_NPS,4,4
	.comm	RH_A_NOCP,4,4
	.comm	HUB_CHAR_NO_OCPM,4,4
	.comm	HUB_CHAR_NO_LPSM,4,4
	.comm	HUB_CHAR_INDV_PORT_OCPM,4,4
	.comm	HUB_CHAR_INDV_PORT_LPSM,4,4
	.comm	HUB_CHAR_COMMON_OCPM,4,4
	.comm	HUB_CHAR_COMMON_LPSM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
