	.file	"extr_ib_cm.c_cm_add_one.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.text
	.p2align 4
	.type	cm_add_one, @function
cm_add_one:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR IB_CM_CLASS_VERSION[rip]
	mov	DWORD PTR 20[rsp], 0
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR IB_MGMT_CLASS_CM[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	rax, QWORD PTR IB_PORT_CM_SUP[rip]
	mov	QWORD PTR 40[rsp], rax
	mov	eax, DWORD PTR [rdi]
	lea	eax, [rax+rax*2]
	lea	edi, 48[0+rax*8]
	call	kzalloc@PLT
	test	rax, rax
	je	.L1
	mov	QWORD PTR 40[rax], r12
	mov	r13, rax
	mov	eax, DWORD PTR 12[r12]
	xor	esi, esi
	mov	QWORD PTR 24[r13], 0
	xor	edi, edi
	mov	ebx, DWORD PTR 4[r12]
	mov	DWORD PTR 32[r13], eax
	call	MKDEV@PLT
	xor	ecx, ecx
	lea	rsi, 8[r12]
	mov	r9d, ebx
	lea	rdi, cm_class[rip]
	mov	edx, eax
	lea	r8, .LC0[rip]
	call	device_create@PLT
	mov	DWORD PTR 0[r13], eax
	mov	edi, eax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L33
	mov	esi, DWORD PTR 20[rsp]
	mov	edi, DWORD PTR IB_MGMT_METHOD_SEND[rip]
	call	set_bit@PLT
	mov	edx, DWORD PTR [r12]
	test	edx, edx
	jle	.L4
	mov	DWORD PTR 12[rsp], 0
	xor	ebx, ebx
	mov	r14d, 1
	lea	r15, 20[rsp]
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, r14d
	mov	rdi, r12
	call	rdma_cap_ib_cm@PLT
	test	eax, eax
	je	.L5
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 24
	call	kzalloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L7
	mov	rax, QWORD PTR 8[r13]
	lea	rdi, 12[rbp]
	mov	QWORD PTR [rax+rbx*8], rbp
	mov	QWORD PTR 16[rbp], r13
	mov	DWORD PTR 0[rbp], r14d
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 8[rbp]
	call	INIT_LIST_HEAD@PLT
	mov	rdi, rbp
	call	cm_create_port_fs@PLT
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR cm_recv_handler[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	xor	r8d, r8d
	mov	rdi, r12
	push	0
	.cfi_def_cfa_offset 144
	mov	r9d, DWORD PTR cm_send_handler[rip]
	mov	rcx, r15
	mov	esi, r14d
	push	rbp
	.cfi_def_cfa_offset 152
	mov	edx, DWORD PTR IB_QPT_GSI[rip]
	push	rax
	.cfi_def_cfa_offset 160
	call	ib_register_mad_agent@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 4[rbp], eax
	mov	edi, eax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L9
	xor	edx, edx
	lea	rcx, 32[rsp]
	mov	esi, r14d
	mov	rdi, r12
	call	ib_modify_port@PLT
	test	eax, eax
	jne	.L35
	add	DWORD PTR 12[rsp], 1
.L5:
	add	rbx, 1
	lea	r14d, 1[rbx]
	cmp	DWORD PTR [r12], r14d
	jge	.L11
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	je	.L4
	mov	rdx, r13
	mov	rdi, r12
	lea	rsi, cm_client[rip]
	xor	ebp, ebp
	call	ib_set_client_data@PLT
	mov	rsi, rbp
	lea	rdi, cm[rip]
	call	write_lock_irqsave@PLT
	lea	rdi, 16[r13]
	lea	rsi, cm[rip+4]
	call	list_add_tail@PLT
	mov	rsi, rbp
	lea	rdi, cm[rip]
	call	write_unlock_irqrestore@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edi, DWORD PTR 4[rbp]
	call	ib_unregister_mad_agent@PLT
.L9:
	mov	rdi, rbp
	call	cm_remove_port_fs@PLT
.L7:
	mov	rax, QWORD PTR IB_PORT_CM_SUP[rip]
	mov	ebp, ebx
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 32[rsp], rax
	test	ebx, ebx
	je	.L4
	movsx	rbx, ebx
	lea	r15, 32[rsp]
	lea	rbx, -8[0+rbx*8]
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, ebp
	mov	rdi, r12
	call	rdma_cap_ib_cm@PLT
	test	eax, eax
	je	.L14
	mov	rax, QWORD PTR 8[r13]
	mov	rcx, r15
	xor	edx, edx
	mov	rdi, r12
	mov	r14, QWORD PTR [rax+rbx]
	mov	esi, DWORD PTR [r14]
	call	ib_modify_port@PLT
	mov	edi, DWORD PTR 4[r14]
	call	ib_unregister_mad_agent@PLT
	mov	rdi, r14
	call	cm_remove_port_fs@PLT
.L14:
	sub	rbx, 8
	sub	ebp, 1
	jne	.L15
.L4:
	mov	edi, DWORD PTR 0[r13]
	call	device_unregister@PLT
.L33:
	mov	rdi, r13
	call	kfree@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L36
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cm_add_one, .-cm_add_one
	.comm	cm_send_handler,4,4
	.comm	cm_recv_handler,4,4
	.comm	cm_client,4,4
	.comm	cm_class,4,4
	.comm	cm,8,8
	.comm	IB_QPT_GSI,4,4
	.comm	IB_PORT_CM_SUP,8,8
	.comm	IB_MGMT_METHOD_SEND,4,4
	.comm	IB_MGMT_CLASS_CM,4,4
	.comm	IB_CM_CLASS_VERSION,4,4
	.comm	GFP_KERNEL,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_ib_cm.c_cm_add_one.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cm_add_one, %function
cm_add_one:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	ldr	r3, .L43
	ldr	r1, .L43+4
	ldr	r3, [r3]
	sub	sp, sp, #52
	mov	r6, r0
	ldr	r0, [r0]
	ldr	r1, [r1]
	str	r1, [sp, #44]
	mov	r1,#0
	ldr	r2, .L43+8
	str	r3, [sp, #36]
	ldr	r3, .L43+12
	ldr	r9, .L43+16
	add	r0, r0, r0, lsl #2
	ldr	r2, [r2]
	ldr	r3, [r3]
	lsl	r0, r0, #2
	ldr	r1, [r9]
	add	r0, r0, #24
	str	r2, [sp, #40]
	str	r3, [sp, #28]
	str	r4, [sp, #32]
	str	r4, [sp, #24]
	bl	kzalloc
	subs	r7, r0, #0
	beq	.L1
	ldr	r3, [r6, #12]
	mov	r1, r4
	str	r3, [r7, #16]
	mov	r0, r4
	str	r6, [r7, #20]
	str	r4, [r7, #12]
	bl	MKDEV
	ldr	ip, [r6, #4]
	ldr	r1, .L43+20
	mov	r2, r0
	stm	sp, {r1, ip}
	mov	r3, r4
	add	r1, r6, #8
	ldr	r0, .L43+24
	bl	device_create
	str	r0, [r7]
	bl	IS_ERR
	subs	r8, r0, #0
	bne	.L39
	ldr	r3, .L43+28
	ldr	r1, [sp, #32]
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L4
	mov	r4, #1
	ldr	fp, .L43+32
	ldr	r10, .L43+36
.L11:
	mov	r1, r4
	mov	r0, r6
	bl	rdma_cap_ib_cm
	cmp	r0, #0
	beq	.L5
	mov	r0, #20
	ldr	r1, [r9]
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L7
	mov	r0, r5
	ldr	r3, [r7, #4]
	add	r3, r3, r4, lsl #2
	str	r5, [r3, #-4]
	str	r7, [r5, #16]
	str	r4, [r0], #12
	bl	INIT_LIST_HEAD
	add	r0, r5, #8
	bl	INIT_LIST_HEAD
	mov	r0, r5
	bl	cm_create_port_fs
	cmp	r0, #0
	bne	.L7
	ldr	r2, [fp]
	ldr	r3, [r10]
	str	r2, [sp, #8]
	ldr	r2, .L43+40
	str	r0, [sp, #16]
	str	r0, [sp]
	str	r3, [sp, #4]
	str	r5, [sp, #12]
	ldr	r2, [r2]
	mov	r1, r4
	add	r3, sp, #32
	mov	r0, r6
	bl	ib_register_mad_agent
	str	r0, [r5, #4]
	bl	IS_ERR
	subs	r2, r0, #0
	bne	.L9
	mov	r1, r4
	mov	r0, r6
	add	r3, sp, #24
	bl	ib_modify_port
	cmp	r0, #0
	bne	.L41
	add	r8, r8, #1
.L5:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bge	.L11
	cmp	r8, #0
	beq	.L4
	mov	r4, #0
	mov	r2, r7
	mov	r0, r6
	ldr	r1, .L43+44
	bl	ib_set_client_data
	mov	r1, r4
	ldr	r0, .L43+48
	bl	write_lock_irqsave
	ldr	r1, .L43+52
	add	r0, r7, #8
	bl	list_add_tail
	mov	r1, r4
	ldr	r0, .L43+48
	bl	write_unlock_irqrestore
	b	.L1
.L41:
	ldr	r0, [r5, #4]
	bl	ib_unregister_mad_agent
.L9:
	mov	r0, r5
	bl	cm_remove_port_fs
.L7:
	mov	r3, #0
	ldr	r2, .L43+12
	subs	r4, r4, #1
	ldr	r2, [r2]
	str	r3, [sp, #28]
	str	r2, [sp, #24]
	beq	.L4
.L15:
	mov	r1, r4
	mov	r0, r6
	bl	rdma_cap_ib_cm
	cmp	r0, #0
	beq	.L14
	ldr	r2, [r7, #4]
	add	r3, sp, #24
	add	r2, r2, r4, lsl #2
	ldr	r5, [r2, #-4]
	mov	r0, r6
	mov	r2, #0
	ldr	r1, [r5]
	bl	ib_modify_port
	ldr	r0, [r5, #4]
	bl	ib_unregister_mad_agent
	mov	r0, r5
	bl	cm_remove_port_fs
.L14:
	subs	r4, r4, #1
	bne	.L15
.L4:
	ldr	r0, [r7]
	bl	device_unregister
.L39:
	mov	r0, r7
	bl	kfree
.L1:
	ldr	r3, .L43+4
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	IB_CM_CLASS_VERSION
	.word	.LC1
	.word	IB_MGMT_CLASS_CM
	.word	IB_PORT_CM_SUP
	.word	GFP_KERNEL
	.word	.LC0
	.word	cm_class
	.word	IB_MGMT_METHOD_SEND
	.word	cm_recv_handler
	.word	cm_send_handler
	.word	IB_QPT_GSI
	.word	cm_client
	.word	cm
	.word	cm+4
	.size	cm_add_one, .-cm_add_one
	.comm	cm_send_handler,4,4
	.comm	cm_recv_handler,4,4
	.comm	cm_client,4,4
	.comm	cm_class,4,4
	.comm	cm,8,4
	.comm	IB_QPT_GSI,4,4
	.comm	IB_PORT_CM_SUP,4,4
	.comm	IB_MGMT_METHOD_SEND,4,4
	.comm	IB_MGMT_CLASS_CM,4,4
	.comm	IB_CM_CLASS_VERSION,4,4
	.comm	GFP_KERNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
