	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function id_map_alloc
_id_map_alloc:                          ## @id_map_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_mdev
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r12
	movq	%r13, 40(%rax)
	movl	%ebx, (%rax)
	movq	$0, 32(%rax)
	movq	%r14, %rdi
	callq	_to_mdev
	movq	%rax, 24(%r12)
	leaq	16(%r12), %rdi
	movq	_id_map_ent_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	leaq	8(%r15), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_to_mdev
	movq	%rax, %rdi
	callq	_spin_lock
	movl	_id_map_alloc.next_id(%rip), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	leaq	-44(%rbp), %rcx
	callq	_idr_get_new_above
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	-44(%rbp), %rax
	leal	1(%rax), %ecx
	movq	_MAX_ID_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%ecx, _id_map_alloc.next_id(%rip)
	movq	%rax, 8(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_sl_id_map_add
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_idr_pre_get
	testq	%rax, %rax
	jne	LBB0_2
LBB0_6:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_kfree
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_mlx4_ib_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_mlx4_ib_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_lock
	movq	%r12, %rdi
	addq	$4, %rdi
	movq	%r15, %rsi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_9:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_id_map_alloc.next_id,4,2 ## @id_map_alloc.next_id
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't allocate id cache entry - out of memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_id_map_ent_timeout,4,2         ## @id_map_ent_timeout
	.comm	_MAX_ID_MASK,4,2                ## @MAX_ID_MASK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"No more space in the idr (err:0x%x)\n"

	.no_dead_strip	_id_map_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function id_map_alloc
_id_map_alloc:                          ; @id_map_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	bl	_to_mdev
	mov	x21, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #48
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	str	w23, [x0]
	stp	xzr, x22, [x0, #32]
	mov	x0, x19
	bl	_to_mdev
	str	x0, [x20, #24]
	add	x0, x20, #16
Lloh2:
	adrp	x8, _id_map_ent_timeout@GOTPAGE
Lloh3:
	ldr	x8, [x8, _id_map_ent_timeout@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x22, x21, #8
	adrp	x25, _id_map_alloc.next_id@PAGE
Lloh5:
	adrp	x26, _MAX_ID_MASK@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MAX_ID_MASK@GOTPAGEOFF]
Lloh7:
	adrp	x27, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x27, [x27, _EAGAIN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_to_mdev
	bl	_spin_lock
	ldr	w2, [x25, _id_map_alloc.next_id@PAGEOFF]
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x20
	bl	_idr_get_new_above
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrsw	x8, [sp, #12]
	add	w9, w8, #1
	ldr	w10, [x26]
	and	w9, w9, w10
	str	w9, [x25, _id_map_alloc.next_id@PAGEOFF]
	str	x8, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_sl_id_map_add
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_spin_unlock
	ldr	w8, [x27]
	cmn	w23, w8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24]
	mov	x0, x22
	bl	_idr_pre_get
	cbnz	x0, LBB0_2
LBB0_6:
	cbz	w23, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_kfree
	str	x23, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_ib_warn
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_ib_warn
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_9:
	mov	x0, x21
	bl	_spin_lock
	add	x0, x20, #4
	add	x1, x21, #4
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_id_map_alloc.next_id,4,2 ; @id_map_alloc.next_id
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't allocate id cache entry - out of memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_id_map_ent_timeout,4,2         ; @id_map_ent_timeout
	.comm	_MAX_ID_MASK,4,2                ; @MAX_ID_MASK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"No more space in the idr (err:0x%x)\n"

	.no_dead_strip	_id_map_alloc
.subsections_via_symbols
