	.file	"extr_osm_prtn.c_generate_pkey.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	generate_pkey, @function
generate_pkey:
.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
	mov	rbx, rdi
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	add	edi, 1
	mov	DWORD PTR global_pkey_counter[rip], edi
	call	cl_hton16@PLT
	mov	rdi, rbx
	mov	esi, eax
	mov	r12d, eax
	call	cl_qmap_get@PLT
	mov	rdi, rbx
	mov	rbp, rax
	call	cl_qmap_end@PLT
	cmp	rbp, rax
	je	.L1
.L2:
	mov	edi, DWORD PTR IB_DEFAULT_PARTIAL_PKEY[rip]
	call	cl_ntoh16@PLT
	mov	edi, DWORD PTR global_pkey_counter[rip]
	sub	eax, 1
	cmp	eax, edi
	jg	.L4
	xor	r12d, r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	generate_pkey, .-generate_pkey
	.comm	global_pkey_counter,4,4
	.comm	IB_DEFAULT_PARTIAL_PKEY,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_osm_prtn.c_generate_pkey.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	generate_pkey, %function
generate_pkey:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r8, .L7
	ldr	r7, .L7+4
	b	.L2
.L4:
	str	r0, [r7]
	bl	cl_hton16
	mov	r4, r0
	mov	r0, r6
	mov	r1, r4
	bl	cl_qmap_get
	mov	r5, r0
	mov	r0, r6
	bl	cl_qmap_end
	cmp	r5, r0
	beq	.L1
.L2:
	ldr	r0, [r8]
	bl	cl_ntoh16
	ldr	r2, [r7]
	sub	r3, r0, #1
	cmp	r3, r2
	add	r0, r2, #1
	bgt	.L4
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	IB_DEFAULT_PARTIAL_PKEY
	.word	global_pkey_counter
	.size	generate_pkey, .-generate_pkey
	.comm	global_pkey_counter,4,4
	.comm	IB_DEFAULT_PARTIAL_PKEY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
