	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_alloc_prefered_buf        ## -- Begin function mlx5_alloc_prefered_buf
	.p2align	4, 0x90
_mlx5_alloc_prefered_buf:               ## @mlx5_alloc_prefered_buf
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_MLX5_ALLOC_TYPE_HUGE@GOTPCREL(%rip), %r14
	movq	_MLX5_ALLOC_TYPE_ALL@GOTPCREL(%rip), %rdx
	cmpl	%r8d, (%r14)
	je	LBB0_3
## %bb.1:
	movq	_MLX5_ALLOC_TYPE_PREFER_HUGE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	movl	(%rdx), %eax
	cmpl	%ebx, %eax
	jne	LBB0_8
LBB0_3:
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_alloc_huge_buf
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movl	$-1, %eax
	cmpl	%ebx, (%r14)
	je	LBB0_5
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MLX5_DBG_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX5_ALLOC_TYPE_ALL@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_mlx5_dbg
	movl	(%r14), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
LBB0_8:
	movq	_MLX5_ALLOC_TYPE_CONTIG@GOTPCREL(%rip), %r14
	cmpl	%ebx, (%r14)
	je	LBB0_11
## %bb.9:
	movq	_MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_11
## %bb.10:
	cmpl	%ebx, %eax
	jne	LBB0_14
LBB0_11:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%ecx, %r13d
	movq	%r9, %r8
	callq	_mlx5_alloc_buf_contig
	testl	%eax, %eax
	je	LBB0_4
## %bb.12:
	movl	$-1, %eax
	cmpl	%ebx, (%r14)
	je	LBB0_5
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MLX5_DBG_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	xorl	%eax, %eax
	callq	_mlx5_dbg
	movl	%r13d, %ecx
LBB0_14:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ecx, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_alloc_buf                 ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ALLOC_TYPE_HUGE,4,2       ## @MLX5_ALLOC_TYPE_HUGE
	.comm	_MLX5_ALLOC_TYPE_PREFER_HUGE,4,2 ## @MLX5_ALLOC_TYPE_PREFER_HUGE
	.comm	_MLX5_ALLOC_TYPE_ALL,4,2        ## @MLX5_ALLOC_TYPE_ALL
	.comm	_stderr,4,2                     ## @stderr
	.comm	_MLX5_DBG_CONTIG,4,2            ## @MLX5_DBG_CONTIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Huge mode allocation failed, fallback to %s mode\n"

L_.str.1:                               ## @.str.1
	.asciz	"contig"

L_.str.2:                               ## @.str.2
	.asciz	"default"

	.comm	_MLX5_ALLOC_TYPE_CONTIG,4,2     ## @MLX5_ALLOC_TYPE_CONTIG
	.comm	_MLX5_ALLOC_TYPE_PREFER_CONTIG,4,2 ## @MLX5_ALLOC_TYPE_PREFER_CONTIG
L_.str.3:                               ## @.str.3
	.asciz	"Contig allocation failed, fallback to default mode\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_alloc_prefered_buf        ; -- Begin function mlx5_alloc_prefered_buf
	.p2align	2
_mlx5_alloc_prefered_buf:               ; @mlx5_alloc_prefered_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x23, x5
	mov	x22, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x24, x0
Lloh0:
	adrp	x26, _MLX5_ALLOC_TYPE_HUGE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MLX5_ALLOC_TYPE_HUGE@GOTPAGEOFF]
	ldr	w9, [x26]
Lloh2:
	adrp	x8, _MLX5_ALLOC_TYPE_PREFER_HUGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX5_ALLOC_TYPE_PREFER_HUGE@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x8]
Lloh5:
	adrp	x25, _MLX5_ALLOC_TYPE_ALL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MLX5_ALLOC_TYPE_ALL@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w9, w4
	ccmp	w10, w4, #4, ne
	ccmp	w8, w4, #4, ne
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_alloc_huge_buf
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w8, [x26]
	cmp	w8, w22
	b.eq	LBB0_7
; %bb.3:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _MLX5_DBG_CONTIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX5_DBG_CONTIG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w8, [x25]
Lloh13:
	adrp	x9, l_.str.1@PAGE
Lloh14:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh15:
	adrp	x10, l_.str.2@PAGE
Lloh16:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	bl	_mlx5_dbg
	ldr	w8, [x25]
LBB0_4:
Lloh19:
	adrp	x25, _MLX5_ALLOC_TYPE_CONTIG@GOTPAGE
Lloh20:
	ldr	x25, [x25, _MLX5_ALLOC_TYPE_CONTIG@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh21:
	adrp	x10, _MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	cmp	w9, w22
	ccmp	w10, w22, #4, ne
	ccmp	w8, w22, #4, ne
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	bl	_mlx5_alloc_buf_contig
	cbz	w0, LBB0_8
; %bb.6:
	ldr	w8, [x25]
	cmp	w8, w22
	b.ne	LBB0_9
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _MLX5_DBG_CONTIG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLX5_DBG_CONTIG@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_mlx5_dbg
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_mlx5_alloc_buf
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ALLOC_TYPE_HUGE,4,2       ; @MLX5_ALLOC_TYPE_HUGE
	.comm	_MLX5_ALLOC_TYPE_PREFER_HUGE,4,2 ; @MLX5_ALLOC_TYPE_PREFER_HUGE
	.comm	_MLX5_ALLOC_TYPE_ALL,4,2        ; @MLX5_ALLOC_TYPE_ALL
	.comm	_stderr,4,2                     ; @stderr
	.comm	_MLX5_DBG_CONTIG,4,2            ; @MLX5_DBG_CONTIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Huge mode allocation failed, fallback to %s mode\n"

l_.str.1:                               ; @.str.1
	.asciz	"contig"

l_.str.2:                               ; @.str.2
	.asciz	"default"

	.comm	_MLX5_ALLOC_TYPE_CONTIG,4,2     ; @MLX5_ALLOC_TYPE_CONTIG
	.comm	_MLX5_ALLOC_TYPE_PREFER_CONTIG,4,2 ; @MLX5_ALLOC_TYPE_PREFER_CONTIG
l_.str.3:                               ; @.str.3
	.asciz	"Contig allocation failed, fallback to default mode\n"

.subsections_via_symbols
