	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_buf_direct_alloc
_mlx4_buf_direct_alloc:                 ## @mlx4_buf_direct_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rdx)
	movl	%esi, %edi
	callq	_get_order
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	movl	%eax, 16(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	-28(%rbp), %edx
	movl	%edx, 12(%rbx)
	movl	8(%rbx), %ecx
	movl	$-1, %esi
	shll	%cl, %esi
	notl	%esi
	xorl	%eax, %eax
	testl	%esi, %edx
	je	LBB0_6
## %bb.3:
	movl	4(%rbx), %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ecx
	movl	$-1, %edi
	shll	%cl, %edi
	addl	%esi, %esi
	notl	%edi
	testl	%edi, %edx
	jne	LBB0_4
## %bb.5:
	movl	%ecx, 8(%rbx)
	movl	%esi, 4(%rbx)
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx4_buf_direct_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_buf_direct_alloc
_mlx4_buf_direct_alloc:                 ; @mlx4_buf_direct_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	movi.2s	v0, #1
	str	d0, [x2]
	mov	x0, x1
	bl	_get_order
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w8, w8, w0
	str	w8, [x19, #8]
	ldr	x8, [x21]
	ldr	x0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x1, x20
	bl	_dma_alloc_coherent
	str	w0, [x19, #16]
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	str	w8, [x19, #12]
	ldr	w9, [x19, #8]
	mov	w10, #-1
	lsl	w11, w10, w9
	bics	wzr, w8, w11
	b.eq	LBB0_6
; %bb.2:
	ldr	w11, [x19, #4]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w9, #1
	lsl	w11, w11, #1
	lsl	w12, w10, w9
	bics	wzr, w8, w12
	b.ne	LBB0_3
; %bb.4:
	mov	w0, #0
	stp	w11, w9, [x19, #4]
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx4_buf_direct_alloc
.subsections_via_symbols
