	.file	"extr_ib_user_mad.c_queue_packet.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	queue_packet, @function
queue_packet:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mutex_lock@PLT
	cmp	QWORD PTR IB_UMAD_MAX_AGENTS[rip], 0
	mov	QWORD PTR 8[rbp], 0
	jle	.L2
	xor	esi, esi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, 1[rax]
	cmp	rsi, QWORD PTR IB_UMAD_MAX_AGENTS[rip]
	mov	QWORD PTR 8[rbp], rsi
	jge	.L2
.L5:
	mov	rdi, r12
	call	__get_agent@PLT
	cmp	rbx, rax
	jne	.L3
	lea	rsi, 8[r12]
	mov	rdi, rbp
	xor	r13d, r13d
	call	list_add_tail@PLT
	lea	rdi, 4[r12]
	call	wake_up_interruptible@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r13d, 1
.L4:
	mov	rdi, r12
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	queue_packet, .-queue_packet
	.comm	IB_UMAD_MAX_AGENTS,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_ib_user_mad.c_queue_packet.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	queue_packet, %function
queue_packet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r4, r2
	mov	r5, r0
	bl	mutex_lock
	mov	r1, #0
	ldr	r7, .L9
	str	r1, [r4, #4]
	ldr	r3, [r7]
	cmp	r3, r1
	bgt	.L5
	b	.L2
.L3:
	ldr	r1, [r4, #4]
	ldr	r3, [r7]
	add	r1, r1, #1
	cmp	r1, r3
	str	r1, [r4, #4]
	bge	.L2
.L5:
	mov	r0, r5
	bl	__get_agent
	cmp	r6, r0
	bne	.L3
	mov	r0, r4
	add	r1, r5, #8
	bl	list_add_tail
	add	r0, r5, #4
	bl	wake_up_interruptible
	mov	r4, #0
	b	.L4
.L2:
	mov	r4, #1
.L4:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	IB_UMAD_MAX_AGENTS
	.size	queue_packet, .-queue_packet
	.comm	IB_UMAD_MAX_AGENTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
