	.file	"extr_pci_xhci.c_pci_xhci_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pci_xhci_read, @function
pci_xhci_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	edi, edi
	test	ecx, ecx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, QWORD PTR [rdx]
	sete	dil
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	lea	r14, 24[r13]
	mov	ebp, r9d
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	assert@PLT
	mov	rdi, r14
	call	pthread_mutex_lock@PLT
	cmp	QWORD PTR XHCI_CAPLEN[rip], r12
	jg	.L13
	cmp	QWORD PTR 0[r13], r12
	jg	.L14
	cmp	QWORD PTR 8[r13], r12
	jg	.L15
	mov	rax, QWORD PTR 16[r13]
	cmp	rax, r12
	jg	.L16
	add	rax, 127
	cmp	rax, r12
	jl	.L7
	mov	rdi, r13
	mov	rsi, r12
	call	pci_xhci_xecp_read@PLT
	mov	rdi, r14
	mov	ebx, eax
	call	pthread_mutex_unlock@PLT
	cmp	ebp, 1
	jne	.L17
.L8:
	movzx	ebx, bl
	movsx	rax, ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, r13
	call	pci_xhci_hostop_read@PLT
	mov	ebx, eax
.L3:
	mov	rdi, r14
	call	pthread_mutex_unlock@PLT
	cmp	ebp, 1
	je	.L8
.L17:
	movzx	eax, bx
	cmp	ebp, 2
	cmove	ebx, eax
	movsx	rax, ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, r13
	call	pci_xhci_hostcap_read@PLT
	mov	ebx, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r12
	xor	ebx, ebx
	call	WPRINTF@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, r12
	mov	rdi, r13
	call	pci_xhci_dbregs_read@PLT
	mov	ebx, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rsi, r12
	mov	rdi, r13
	call	pci_xhci_rtsregs_read@PLT
	mov	ebx, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pci_xhci_read, .-pci_xhci_read
	.comm	XHCI_CAPLEN,8,8
	.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_pci_xhci.c_pci_xhci_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_xhci_read, %function
pci_xhci_read:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	clz	r0, r3
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, [r2]
	lsr	r0, r0, #5
	add	r6, r7, #12
	ldr	r4, [sp, #24]
	ldr	r5, [sp, #28]
	bl	assert
	mov	r0, r6
	bl	pthread_mutex_lock
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, r4
	bgt	.L13
	ldr	r3, [r7]
	cmp	r3, r4
	bgt	.L14
	ldr	r3, [r7, #4]
	cmp	r3, r4
	bgt	.L15
	ldr	r3, [r7, #8]
	cmp	r3, r4
	bgt	.L16
	add	r3, r3, #127
	cmp	r3, r4
	blt	.L7
	mov	r1, r4
	mov	r0, r7
	bl	pci_xhci_xecp_read
	mov	r4, r0
	b	.L3
.L14:
	mov	r1, r4
	mov	r0, r7
	bl	pci_xhci_hostop_read
	mov	r4, r0
.L3:
	mov	r0, r6
	bl	pthread_mutex_unlock
	cmp	r5, #1
	andeq	r4, r4, #255
	beq	.L1
	cmp	r5, #2
	lsleq	r4, r4, #16
	lsreq	r4, r4, #16
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r1, r4
	mov	r0, r7
	bl	pci_xhci_hostcap_read
	mov	r4, r0
	b	.L3
.L7:
	mov	r0, r4
	bl	WPRINTF
	mov	r4, #0
	b	.L3
.L15:
	mov	r1, r4
	mov	r0, r7
	bl	pci_xhci_dbregs_read
	mov	r4, r0
	b	.L3
.L16:
	mov	r1, r4
	mov	r0, r7
	bl	pci_xhci_rtsregs_read
	mov	r4, r0
	b	.L3
.L18:
	.align	2
.L17:
	.word	XHCI_CAPLEN
	.size	pci_xhci_read, .-pci_xhci_read
	.comm	XHCI_CAPLEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
