	.file	"extr_oce_if.c_oce_register_rdma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	oce_register_rdma
	.type	oce_register_rdma, @function
oce_register_rdma:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 96
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L19
	mov	rbp, rsi
	test	rsi, rsi
	je	.L19
	mov	rax, QWORD PTR OCE_RDMA_INFO_SIZE[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L24
.L5:
	mov	eax, DWORD PTR ENXIO[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 88[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L25
	add	rsp, 96
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	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
.L24:
	.cfi_restore_state
	mov	rax, QWORD PTR OCE_RDMA_IF_SIZE[rip]
	cmp	QWORD PTR [rsi], rax
	jne	.L5
	mov	eax, DWORD PTR oce_rdma_close[rip]
	mov	QWORD PTR oce_rdma_if[rip], rsi
	mov	r12, rsp
	mov	rbx, QWORD PTR softc_head[rip]
	mov	DWORD PTR 20[rdi], eax
	mov	eax, DWORD PTR oce_mbox_post[rip]
	mov	DWORD PTR 16[rdi], eax
	mov	eax, DWORD PTR mbx_common_req_hdr_init[rip]
	mov	DWORD PTR 12[rdi], eax
	mov	eax, DWORD PTR oce_get_mac_addr[rip]
	mov	DWORD PTR 8[rdi], eax
	mov	rax, rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	cmp	QWORD PTR 8[rax], 0
	jne	.L26
.L8:
	test	rbx, rbx
	jne	.L17
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edx, 80
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	eax, DWORD PTR 24[rbx]
	mov	DWORD PTR [rsp], 4096
	mov	QWORD PTR 64[rsp], rbx
	mov	DWORD PTR 72[rsp], eax
	mov	eax, DWORD PTR 48[rbx]
	mov	DWORD PTR 60[rsp], eax
	mov	eax, DWORD PTR 44[rbx]
	mov	DWORD PTR 56[rsp], eax
	mov	eax, DWORD PTR 40[rbx]
	mov	DWORD PTR 52[rsp], eax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR OCE_FLAGS_USING_MSIX[rip], eax
	je	.L9
	mov	rax, QWORD PTR OCE_INTERRUPT_MODE_MSIX[rip]
	mov	rdx, QWORD PTR OCE_INTERRUPT_MODE_INTX[rip]
	mov	QWORD PTR 8[rsp], rax
.L10:
	mov	ecx, DWORD PTR OCE_GEN2_FAMILY[rip]
	mov	DWORD PTR 48[rsp], ecx
	cmp	rdx, rax
	je	.L12
	mov	edx, DWORD PTR 4[rbx]
	mov	eax, DWORD PTR 8[rbx]
	add	eax, edx
	mov	DWORD PTR 36[rsp], edx
	mov	DWORD PTR 32[rsp], eax
	test	eax, eax
	jle	.L12
	mov	rsi, QWORD PTR 32[rbx]
	mov	rcx, QWORD PTR 40[rsp]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	DWORD PTR [rcx+rax*4], edx
	add	rax, 1
	cmp	DWORD PTR 32[rsp], eax
	jg	.L16
.L12:
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 28[rsp]
	mov	edx, 6
	call	memcpy@PLT
	mov	edi, DWORD PTR 24[rbx]
	call	pci_get_vendor@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	DWORD PTR 24[rsp], eax
	call	pci_get_device@PLT
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR 12[rbx]
	test	DWORD PTR OCE_RDMA_FLAG_SUPPORTED[rip], eax
	je	.L15
	mov	eax, DWORD PTR OCE_RDMA_INFO_RDMA_SUPPORTED[rip]
	or	DWORD PTR 16[rsp], eax
.L15:
	mov	rdi, r12
	call	[QWORD PTR 8[rbp]]
	mov	rbx, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR oce_rdma_if[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR OCE_INTERRUPT_MODE_INTX[rip]
	test	DWORD PTR OCE_FLAGS_USING_MSI[rip], eax
	je	.L11
	mov	rax, QWORD PTR OCE_INTERRUPT_MODE_MSI[rip]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	eax, DWORD PTR OCE_GEN2_FAMILY[rip]
	mov	QWORD PTR 8[rsp], rdx
	mov	DWORD PTR 48[rsp], eax
	jmp	.L12
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	oce_register_rdma, .-oce_register_rdma
	.comm	softc_head,8,8
	.comm	oce_rdma_if,8,8
	.comm	oce_rdma_close,4,4
	.comm	oce_mbox_post,4,4
	.comm	oce_get_mac_addr,4,4
	.comm	mbx_common_req_hdr_init,4,4
	.comm	OCE_RDMA_INFO_SIZE,8,8
	.comm	OCE_RDMA_INFO_RDMA_SUPPORTED,4,4
	.comm	OCE_RDMA_IF_SIZE,8,8
	.comm	OCE_RDMA_FLAG_SUPPORTED,4,4
	.comm	OCE_INTERRUPT_MODE_MSIX,8,8
	.comm	OCE_INTERRUPT_MODE_MSI,8,8
	.comm	OCE_INTERRUPT_MODE_INTX,8,8
	.comm	OCE_GEN2_FAMILY,4,4
	.comm	OCE_FLAGS_USING_MSIX,4,4
	.comm	OCE_FLAGS_USING_MSI,4,4
	.comm	ENXIO,4,4
	.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_oce_if.c_oce_register_rdma.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	oce_register_rdma
	.syntax unified
	.arm
	.fpu softvfp
	.type	oce_register_rdma, %function
oce_register_rdma:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	cmpne	r0, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L27
	sub	sp, sp, #68
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	beq	.L23
	ldr	r2, .L27+4
	mov	fp, r1
	ldr	r2, [r2]
	ldr	r1, [r0]
	cmp	r1, r2
	beq	.L24
.L4:
	ldr	r3, .L27+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	ldr	r2, .L27+12
	ldr	r1, [fp]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L4
	ldr	lr, .L27+16
	ldr	ip, .L27+20
	ldr	r1, .L27+24
	ldr	r2, .L27+28
	ldr	r4, [lr]
	ldr	r5, .L27+32
	ldr	lr, [ip]
	ldr	ip, [r1]
	ldr	r1, [r2]
	ldr	r2, .L27+36
	stmib	r0, {r1, ip, lr}
	str	r4, [r0, #16]
	mov	r1, fp
	ldr	r4, [r2]
	ldr	r8, .L27+40
	ldr	r7, .L27+44
	ldr	r6, .L27+48
	ldr	r10, .L27+52
	ldr	r9, .L27+56
	str	fp, [r5]
	b	.L7
.L16:
	ldr	r2, [r1, #4]
	cmp	r2, #0
	bne	.L26
.L7:
	cmp	r4, #0
	bne	.L16
	mov	r0, r4
	b	.L1
.L23:
	ldr	r3, .L27+60
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L26:
	mov	r2, #60
	mov	r1, #0
	mov	r0, sp
	bl	memset
	mov	r0, #4096
	ldr	r2, [r4]
	ldr	r1, [r4, #20]
	ldr	ip, [r7]
	str	r0, [sp]
	tst	r2, ip
	ldr	r0, [r4, #36]
	ldr	ip, [r4, #40]
	str	r1, [sp, #56]
	ldr	r1, [r4, #32]
	str	r4, [sp, #52]
	str	r1, [sp, #40]
	str	ip, [sp, #48]
	ldr	r1, [r8]
	str	r0, [sp, #44]
	beq	.L8
	ldr	r2, [r9]
	str	r2, [sp, #4]
.L9:
	ldr	r0, [r6]
	cmp	r2, r1
	str	r0, [sp, #36]
	beq	.L11
	ldr	ip, [r4, #4]
	ldr	r2, [r4, #8]
	str	ip, [sp, #28]
	add	ip, ip, r2
	cmp	ip, #0
	str	ip, [sp, #24]
	ble	.L11
	ldr	lr, [r4, #28]
	sub	r2, lr, #4
	add	ip, r2, ip, lsl #2
	rsb	lr, lr, #4
.L15:
	add	r1, lr, r2
	ldr	r0, [r2, #4]!
	cmp	r2, ip
	str	r0, [r1]
	bne	.L15
.L11:
	ldr	r1, [r4, #24]
	mov	r2, #6
	mov	r0, #0
	bl	memcpy
	ldr	r0, [r4, #20]
	bl	pci_get_vendor
	mov	r2, r0
	ldr	r0, [r4, #20]
	str	r2, [sp, #16]
	bl	pci_get_device
	ldr	r2, .L27+64
	ldr	r1, [r4, #12]
	ldr	r2, [r2]
	str	r0, [sp, #12]
	tst	r1, r2
	beq	.L14
	ldr	r1, .L27+68
	ldr	r2, [sp, #8]
	ldr	r1, [r1]
	orr	r2, r2, r1
	str	r2, [sp, #8]
.L14:
	mov	r0, sp
	ldr	r2, [fp, #4]
	blx	r2
	ldr	r4, [r4, #16]
	ldr	r1, [r5]
	b	.L7
.L8:
	ldr	r0, [r10]
	tst	r2, r0
	ldrne	r3, .L27+72
	ldrne	r2, [r3]
	strne	r2, [sp, #4]
	bne	.L9
.L10:
	ldr	r2, [r6]
	str	r1, [sp, #4]
	str	r2, [sp, #36]
	b	.L11
.L25:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	OCE_RDMA_INFO_SIZE
	.word	ENXIO
	.word	OCE_RDMA_IF_SIZE
	.word	oce_rdma_close
	.word	oce_mbox_post
	.word	mbx_common_req_hdr_init
	.word	oce_get_mac_addr
	.word	oce_rdma_if
	.word	softc_head
	.word	OCE_INTERRUPT_MODE_INTX
	.word	OCE_FLAGS_USING_MSIX
	.word	OCE_GEN2_FAMILY
	.word	OCE_FLAGS_USING_MSI
	.word	OCE_INTERRUPT_MODE_MSIX
	.word	EINVAL
	.word	OCE_RDMA_FLAG_SUPPORTED
	.word	OCE_RDMA_INFO_RDMA_SUPPORTED
	.word	OCE_INTERRUPT_MODE_MSI
	.size	oce_register_rdma, .-oce_register_rdma
	.comm	softc_head,4,4
	.comm	oce_rdma_if,4,4
	.comm	oce_rdma_close,4,4
	.comm	oce_mbox_post,4,4
	.comm	oce_get_mac_addr,4,4
	.comm	mbx_common_req_hdr_init,4,4
	.comm	OCE_RDMA_INFO_SIZE,4,4
	.comm	OCE_RDMA_INFO_RDMA_SUPPORTED,4,4
	.comm	OCE_RDMA_IF_SIZE,4,4
	.comm	OCE_RDMA_FLAG_SUPPORTED,4,4
	.comm	OCE_INTERRUPT_MODE_MSIX,4,4
	.comm	OCE_INTERRUPT_MODE_MSI,4,4
	.comm	OCE_INTERRUPT_MODE_INTX,4,4
	.comm	OCE_GEN2_FAMILY,4,4
	.comm	OCE_FLAGS_USING_MSIX,4,4
	.comm	OCE_FLAGS_USING_MSI,4,4
	.comm	ENXIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
