	.file	"extr_mps_user.c_mps_user_btdh.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Target ID is out of range for Bus/Target to DevHandle mapping."
	.text
	.p2align 4
	.type	mps_user_btdh, @function
mps_user_btdh:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ecx, DWORD PTR [rsi]
	mov	rbx, rsi
	mov	rax, QWORD PTR FALSE[rip]
	movsx	rdx, DWORD PTR 4[rsi]
	mov	r8d, DWORD PTR 8[rsi]
	cmp	ecx, 65535
	jne	.L2
	cmp	edx, 65535
	jne	.L2
	mov	rsi, rax
	cmp	r8d, 65535
	je	.L3
	or	rsi, QWORD PTR TRUE[rip]
.L3:
	test	rsi, rsi
	je	.L28
.L4:
	test	rax, rax
	je	.L6
	test	ecx, ecx
	jne	.L28
	cmp	DWORD PTR [rdi], edx
	jl	.L30
	mov	rax, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [rax+rdx*4]
	test	eax, eax
	je	.L1
	mov	DWORD PTR 8[rbx], eax
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	r8d, 65535
	sete	r9b
	cmp	ecx, 65535
	setne	sil
	test	r9b, sil
	je	.L10
	cmp	edx, 65535
	je	.L10
	mov	r9, QWORD PTR TRUE[rip]
	or	rax, r9
	mov	rsi, rax
	mov	rax, r9
	test	rsi, rsi
	jne	.L4
.L28:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	esi, r8d
	call	mps_mapping_get_tid_from_handle@PLT
	mov	DWORD PTR [rbx], 0
	mov	DWORD PTR 4[rbx], eax
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rsi, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L30:
	mov	esi, DWORD PTR MPS_FAULT[rip]
	lea	rdx, .LC0[rip]
	call	mps_dprint@PLT
	jmp	.L28
	.cfi_endproc
.LFE0:
	.size	mps_user_btdh, .-mps_user_btdh
	.comm	TRUE,8,8
	.comm	MPS_FAULT,4,4
	.comm	FALSE,8,8
	.comm	EINVAL,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_mps_user.c_mps_user_btdh.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Target ID is out of range for Bus/Target to DevHand"
	.ascii	"le mapping.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mps_user_btdh, %function
mps_user_btdh:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L18
	push	{r4, r5, r6, lr}
	ldm	r1, {ip, lr}
	cmp	ip, r3
	cmpeq	lr, r3
	ldr	r2, .L18+4
	mov	r4, r1
	ldr	r5, [r2]
	ldr	r1, [r1, #8]
	bne	.L2
	cmp	r1, r3
	beq	.L10
	ldr	r3, .L18+8
	ldr	r3, [r3]
	orr	r3, r5, r3
	cmp	r3, #0
	bne	.L4
.L15:
	ldr	r3, .L18+12
	ldr	r5, [r3]
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	sub	r2, r1, r3
	clz	r2, r2
	cmp	ip, r3
	lsr	r2, r2, #5
	moveq	r2, #0
	cmp	lr, r3
	moveq	r3, #0
	andne	r3, r2, #1
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L18+8
	ldr	r2, [r3]
	orr	r3, r5, r2
	mov	r5, r2
.L3:
	cmp	r3, #0
	beq	.L15
.L4:
	cmp	r5, #0
	beq	.L6
	cmp	ip, #0
	bne	.L15
	ldr	r3, [r0]
	cmp	r3, lr
	blt	.L17
	ldr	r3, [r0, #4]
	ldr	r5, [r3, lr, lsl #2]
	cmp	r5, #0
	strne	r5, [r4, #8]
	movne	r5, ip
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L10:
	mov	r3, r5
	b	.L3
.L6:
	bl	mps_mapping_get_tid_from_handle
	str	r5, [r4]
	str	r0, [r4, #4]
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L17:
	ldr	r3, .L18+16
	ldr	r2, .L18+20
	ldr	r1, [r3]
	bl	mps_dprint
	b	.L15
.L19:
	.align	2
.L18:
	.word	65535
	.word	FALSE
	.word	TRUE
	.word	EINVAL
	.word	MPS_FAULT
	.word	.LC0
	.size	mps_user_btdh, .-mps_user_btdh
	.comm	TRUE,4,4
	.comm	MPS_FAULT,4,4
	.comm	FALSE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
