	.file	"extr_ntb_hw_idt.c_idt_ntb_peer_mw_set_trans.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	idt_ntb_peer_mw_set_trans, @function
idt_ntb_peer_mw_set_trans:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movsx	rbp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	to_ndev_ntb@PLT
	test	ebx, ebx
	js	.L6
	mov	r12, rax
	cmp	DWORD PTR [rax], ebx
	jle	.L6
	test	ebp, ebp
	js	.L6
	cmp	DWORD PTR 4[rax], ebp
	jg	.L17
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L17:
	.cfi_restore_state
	mov	rax, QWORD PTR 24[rax]
	lea	rdx, 0[rbp+rbp*4]
	movsx	rdi, r13d
	lea	rbp, [rax+rdx*8]
	mov	esi, DWORD PTR 36[rbp]
	call	IS_ALIGNED@PLT
	test	eax, eax
	je	.L6
	mov	esi, DWORD PTR 32[rbp]
	mov	rdi, r14
	call	IS_ALIGNED@PLT
	test	eax, eax
	je	.L6
	cmp	QWORD PTR 0[rbp], r14
	jl	.L6
	mov	r8d, r13d
	mov	ecx, 32
	mov	rax, QWORD PTR IDT_MW_DIR[rip]
	movsx	rdx, ebx
	sar	r8d, cl
	cmp	QWORD PTR 8[rbp], rax
	je	.L18
	mov	QWORD PTR 8[rsp], rdx
	mov	edi, DWORD PTR LUTOFFSET_INDEX[rip]
	xor	esi, esi
	xor	ebx, ebx
	mov	rdx, QWORD PTR 24[rbp]
	mov	DWORD PTR [rsp], r8d
	call	SET_FIELD@PLT
	mov	rdx, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR LUTOFFSET_BAR[rip]
	xor	esi, esi
	mov	r14d, eax
	lea	rbp, 8[r12]
	call	SET_FIELD@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR LUTUDATA_PART[rip]
	xor	esi, esi
	or	r14d, eax
	mov	rax, QWORD PTR 16[r12]
	mov	rdx, QWORD PTR [rax+rdx*8]
	call	SET_FIELD@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	or	eax, DWORD PTR IDT_LUTUDATA_VALID[rip]
	mov	r15d, eax
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR IDT_NT_LUTOFFSET[rip]
	mov	edx, r14d
	mov	rdi, r12
	call	idt_nt_write@PLT
	mov	esi, DWORD PTR IDT_NT_LUTLDATA[rip]
	mov	edx, r13d
	mov	rdi, r12
	xor	r13d, r13d
	call	idt_nt_write@PLT
	mov	r8d, DWORD PTR [rsp]
	mov	esi, DWORD PTR IDT_NT_LUTMDATA[rip]
	mov	rdi, r12
	mov	edx, r8d
	call	idt_nt_write@PLT
	mov	esi, DWORD PTR IDT_NT_LUTUDATA[rip]
	mov	edx, r15d
	mov	rdi, r12
	call	idt_nt_write@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rbx, QWORD PTR 16[rbp]
	mov	rdi, r12
	mov	DWORD PTR 8[rsp], r8d
	mov	QWORD PTR [rsp], rdx
	sal	rbx, 4
	add	rbx, QWORD PTR ntdata_tbl[rip]
	mov	esi, DWORD PTR 12[rbx]
	call	idt_nt_read@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	edi, DWORD PTR BARSETUP_TPART[rip]
	mov	esi, eax
	mov	rax, QWORD PTR 16[r12]
	mov	rdx, QWORD PTR [rax+rdx*8]
	call	SET_FIELD@PLT
	mov	esi, DWORD PTR 12[rbx]
	mov	rdi, r12
	mov	edx, eax
	mov	DWORD PTR [rsp], eax
	call	idt_nt_write@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edx, r13d
	mov	rdi, r12
	xor	r13d, r13d
	call	idt_nt_write@PLT
	mov	r8d, DWORD PTR 8[rsp]
	mov	esi, DWORD PTR 4[rbx]
	mov	rdi, r12
	mov	edx, r8d
	call	idt_nt_write@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	edi, DWORD PTR [r15]
	call	pci_bus_address@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r12
	add	r14d, eax
	mov	edx, r14d
	call	idt_nt_write@PLT
	mov	r9d, DWORD PTR [rsp]
	mov	edi, DWORD PTR BARSETUP_TYPE[rip]
	mov	edx, 64
	mov	esi, r9d
	call	IS_FLD_SET@PLT
	test	rax, rax
	je	.L1
	mov	edx, r14d
	mov	ecx, 32
	mov	esi, DWORD PTR 16[rbx]
	mov	rdi, r12
	sar	edx, cl
	call	idt_nt_write@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	idt_ntb_peer_mw_set_trans, .-idt_ntb_peer_mw_set_trans
	.comm	ntdata_tbl,8,8
	.comm	LUTUDATA_PART,4,4
	.comm	LUTOFFSET_INDEX,4,4
	.comm	LUTOFFSET_BAR,4,4
	.comm	IDT_NT_LUTUDATA,4,4
	.comm	IDT_NT_LUTOFFSET,4,4
	.comm	IDT_NT_LUTMDATA,4,4
	.comm	IDT_NT_LUTLDATA,4,4
	.comm	IDT_MW_DIR,8,8
	.comm	IDT_LUTUDATA_VALID,4,4
	.comm	EINVAL,4,4
	.comm	BARSETUP_TYPE,4,4
	.comm	BARSETUP_TPART,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_ntb_hw_idt.c_idt_ntb_peer_mw_set_trans.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	idt_ntb_peer_mw_set_trans, %function
idt_ntb_peer_mw_set_trans:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	sub	sp, sp, #12
	mov	r8, r2
	mov	r6, r3
	mov	r7, r0
	bl	to_ndev_ntb
	cmp	r4, #0
	blt	.L6
	ldr	r3, [r0]
	mov	r5, r0
	cmp	r3, r4
	ble	.L6
	cmp	r8, #0
	blt	.L6
	ldr	r3, [r0, #4]
	cmp	r3, r8
	bgt	.L17
.L6:
	ldr	r3, .L19
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldr	r9, [r0, #16]
	add	r2, r8, r8, lsl #1
	add	r8, r9, r2, lsl #3
	mov	r0, r6
	ldr	r1, [r8, #20]
	lsl	r10, r2, #3
	bl	IS_ALIGNED
	cmp	r0, #0
	beq	.L6
	ldr	r1, [r8, #16]
	ldr	r0, [sp, #48]
	bl	IS_ALIGNED
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r9, r10]
	ldr	r2, [sp, #48]
	cmp	r3, r2
	blt	.L6
	mov	r9, #32
	ldr	r3, .L19+4
	ldr	r2, [r8, #4]
	ldr	r3, [r3]
	asr	r10, r6, r9
	cmp	r2, r3
	beq	.L18
	ldr	r3, .L19+8
	ldr	r2, [r8, #12]
	mov	r1, #0
	ldr	r0, [r3]
	bl	SET_FIELD
	ldr	r3, .L19+12
	mov	r7, r0
	ldr	r2, [r8, #8]
	mov	r1, #0
	ldr	r0, [r3]
	bl	SET_FIELD
	ldr	r1, .L19+16
	mov	r3, r0
	ldr	r0, [r1]
	mov	r1, #0
	ldr	r2, [r5, #12]
	mov	r9, r1
	ldr	r2, [r2, r4, lsl #2]
	orr	r4, r7, r3
	bl	SET_FIELD
	mov	r7, r0
	ldr	r3, .L19+20
	add	r8, r5, #8
	ldr	r3, [r3]
	mov	r1, r9
	mov	r0, r8
	orr	r7, r7, r3
	bl	spin_lock_irqsave
	ldr	r3, .L19+24
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r5
	bl	idt_nt_write
	ldr	r3, .L19+28
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r5
	bl	idt_nt_write
	ldr	r3, .L19+32
	mov	r2, r10
	ldr	r1, [r3]
	mov	r0, r5
	bl	idt_nt_write
	ldr	r3, .L19+36
	mov	r2, r7
	ldr	r1, [r3]
	mov	r0, r5
	bl	idt_nt_write
	mov	r1, r9
	mov	r0, r8
	bl	spin_unlock_irqrestore
	mov	r0, r9
	b	.L1
.L18:
	ldr	r2, .L19+40
	ldr	r3, [r8, #8]
	ldr	r2, [r2]
	mov	r0, r5
	add	fp, r2, r3, lsl #4
	ldr	r1, [fp, #12]
	str	r3, [sp, #4]
	str	r2, [sp]
	bl	idt_nt_read
	ldr	ip, .L19+44
	ldr	r2, [r5, #12]
	mov	r1, r0
	ldr	r2, [r2, r4, lsl #2]
	ldr	r0, [ip]
	bl	SET_FIELD
	ldr	r1, [fp, #12]
	mov	r2, r0
	mov	r4, r0
	mov	r0, r5
	bl	idt_nt_write
	mov	r2, r6
	ldr	r1, [fp, #8]
	mov	r0, r5
	bl	idt_nt_write
	mov	r2, r10
	ldr	r1, [fp, #4]
	mov	r0, r5
	bl	idt_nt_write
	ldr	r1, [r8, #8]
	ldr	r0, [r7]
	bl	pci_bus_address
	ldr	r3, [sp, #48]
	add	r6, r0, r3
	ldm	sp, {r2, r3}
	mov	r0, r5
	ldr	r1, [r2, r3, lsl #4]
	mov	r2, r6
	bl	idt_nt_write
	ldr	r3, .L19+48
	mov	r1, r4
	mov	r2, #64
	ldr	r0, [r3]
	bl	IS_FLD_SET
	cmp	r0, #0
	beq	.L1
	mov	r0, r5
	ldr	r1, [fp, #16]
	asr	r2, r6, r9
	bl	idt_nt_write
	mov	r0, #0
	b	.L1
.L20:
	.align	2
.L19:
	.word	EINVAL
	.word	IDT_MW_DIR
	.word	LUTOFFSET_INDEX
	.word	LUTOFFSET_BAR
	.word	LUTUDATA_PART
	.word	IDT_LUTUDATA_VALID
	.word	IDT_NT_LUTOFFSET
	.word	IDT_NT_LUTLDATA
	.word	IDT_NT_LUTMDATA
	.word	IDT_NT_LUTUDATA
	.word	ntdata_tbl
	.word	BARSETUP_TPART
	.word	BARSETUP_TYPE
	.size	idt_ntb_peer_mw_set_trans, .-idt_ntb_peer_mw_set_trans
	.comm	ntdata_tbl,4,4
	.comm	LUTUDATA_PART,4,4
	.comm	LUTOFFSET_INDEX,4,4
	.comm	LUTOFFSET_BAR,4,4
	.comm	IDT_NT_LUTUDATA,4,4
	.comm	IDT_NT_LUTOFFSET,4,4
	.comm	IDT_NT_LUTMDATA,4,4
	.comm	IDT_NT_LUTLDATA,4,4
	.comm	IDT_MW_DIR,4,4
	.comm	IDT_LUTUDATA_VALID,4,4
	.comm	EINVAL,4,4
	.comm	BARSETUP_TYPE,4,4
	.comm	BARSETUP_TPART,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
