	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_bitmap_init               ## -- Begin function mlx4_bitmap_init
	.p2align	4, 0x90
_mlx4_bitmap_init:                      ## @mlx4_bitmap_init
	.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	%r8, %r12
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_roundup_pow_of_two
	cmpq	%rbx, %rax
	jne	LBB0_1
## %bb.3:
	subq	%r12, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r15)
	movq	%rbx, 8(%r15)
	movq	%r13, 48(%r15)
	movq	%r12, 40(%r15)
	subq	%r14, %rbx
	movq	%rbx, 24(%r15)
	movq	%rbx, 32(%r15)
	leaq	16(%r15), %rdi
	callq	_spin_lock_init
	movq	8(%r15), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_zalloc
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_bitmap_set
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_bitmap_init               ; -- Begin function mlx4_bitmap_init
	.p2align	2
_mlx4_bitmap_init:                      ; @mlx4_bitmap_init
	.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	x21, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	mov	x0, x1
	bl	_roundup_pow_of_two
	cmp	x0, x23
	b.ne	LBB0_3
; %bb.1:
	stp	xzr, xzr, [x20, #56]
	sub	x8, x23, x21
	sub	x9, x8, x19
	str	x8, [x20, #8]
	stp	x21, x22, [x20, #40]
	add	x0, x20, #16
	stp	x9, x9, [x20, #24]
	bl	_spin_lock_init
	ldr	x0, [x20, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bitmap_zalloc
	str	w0, [x20]
	cbz	w0, LBB0_4
; %bb.2:
	mov	w1, #0
	mov	x2, x19
	bl	_bitmap_set
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
