	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_alloc_db_from_pgdir
_mlx5_alloc_db_from_pgdir:              ## @mlx5_alloc_db_from_pgdir
	.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
	movq	%rdi, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_cache_line_size
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movl	16(%r12), %edi
	movl	%eax, %esi
	callq	_find_first_bit
	cmpl	%ebx, %eax
	jge	LBB0_1
## %bb.2:
	movl	%eax, %r13d
	movl	16(%r12), %esi
	movl	%eax, %edi
	callq	___clear_bit
	movq	%r12, 24(%r15)
	movl	%r13d, (%r15)
	xorl	%eax, %eax
	callq	_cache_line_size
	imull	%r13d, %eax
	movq	8(%r12), %rcx
	cltq
	movq	%rax, %rdx
	andq	$-8, %rdx
	leaq	(%rcx,%rdx), %rsi
	movq	%rsi, 8(%r15)
	addq	(%r12), %rax
	movq	%rax, 16(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	jmp	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx5_alloc_db_from_pgdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_alloc_db_from_pgdir
_mlx5_alloc_db_from_pgdir:              ; @mlx5_alloc_db_from_pgdir
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_cache_line_size
	ldr	w8, [x20, #16]
	sdiv	w22, w21, w0
	mov	x0, x8
	mov	x1, x22
	bl	_find_first_bit
	cmp	w0, w22
	b.ge	LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w1, [x20, #16]
	bl	___clear_bit
	str	x20, [x19, #24]
	str	w21, [x19]
	bl	_cache_line_size
	mov	x8, x0
	mov	w0, #0
	mul	w8, w8, w21
	sxtw	x8, w8
	ldp	x10, x9, [x20]
	and	x11, x8, #0xfffffffffffffff8
	add	x9, x9, x11
	add	x8, x10, x8
	stp	x9, x8, [x19, #8]
	stp	xzr, xzr, [x9]
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx5_alloc_db_from_pgdir
.subsections_via_symbols
