	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function allocate_uars
_allocate_uars:                         ## @allocate_uars
	.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	%rsi, %r15
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	8(%r15), %rsi
	addq	%r13, %rsi
	callq	_mlx5_cmd_alloc_uar
	testl	%eax, %eax
	jne	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_mlx5_ib_dbg
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_9:
	xorl	%r12d, %r12d
	cmpl	4(%r15), %eax
	jge	LBB0_12
## %bb.10:
	movq	8(%r15), %rcx
	cltq
	movq	_MLX5_IB_INVALID_UAR_INDEX@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%esi, (%rcx,%rax,4)
	incq	%rax
	movslq	4(%r15), %rsi
	cmpq	%rsi, %rax
	jl	LBB0_11
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %r12d
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.4:
	decq	%rbx
	leaq	L_.str.1(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	-1(%rbx), %rax
	incq	%rbx
	cmpq	$1, %rbx
	movq	%rax, %rbx
	jle	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_mlx5_cmd_free_uar
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_mlx5_ib_warn
	jmp	LBB0_7
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocated uar %d\n"

	.comm	_MLX5_IB_INVALID_UAR_INDEX,4,2  ## @MLX5_IB_INVALID_UAR_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"failed to free uar %d\n"

	.no_dead_strip	_allocate_uars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function allocate_uars
_allocate_uars:                         ; @allocate_uars
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	ldr	w9, [x1]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x24, #0
	mov	x21, #-1
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #8]
	add	x1, x8, x24
	bl	_mlx5_cmd_alloc_uar
	cbnz	w0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x24]
	mov	x0, x20
	mov	x1, x23
	bl	_mlx5_ib_dbg
	ldrsw	x9, [x19]
	add	x8, x21, #2
	add	x21, x21, #1
	add	x24, x24, #4
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.4:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w9, w8
	b.ge	LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
	sxtw	x9, w9
Lloh2:
	adrp	x10, _MLX5_IB_INVALID_UAR_INDEX@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MLX5_IB_INVALID_UAR_INDEX@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	str	w11, [x8, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x11, [x19, #4]
	cmp	x9, x11
	b.lt	LBB0_7
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x22, x0
	cmn	w21, #1
	b.eq	LBB0_9
; %bb.11:
Lloh4:
	adrp	x23, l_.str.1@PAGE
Lloh5:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x8, x21, #1
	sub	x21, x21, #1
	cmp	x8, #1
	b.le	LBB0_9
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21, lsl #2]
	bl	_mlx5_cmd_free_uar
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_mlx5_ib_warn
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocated uar %d\n"

	.comm	_MLX5_IB_INVALID_UAR_INDEX,4,2  ; @MLX5_IB_INVALID_UAR_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"failed to free uar %d\n"

	.no_dead_strip	_allocate_uars
.subsections_via_symbols
