	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_bitmap_init           ## -- Begin function hns_roce_bitmap_init
	.p2align	4, 0x90
_hns_roce_bitmap_init:                  ## @hns_roce_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, %r15
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_roundup_pow_of_two
	cmpq	%rbx, %rax
	jne	LBB0_1
## %bb.3:
	subq	%r15, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r13)
	movq	%rbx, 8(%r13)
	movq	%r12, 32(%r13)
	movq	%r15, 24(%r13)
	leaq	16(%r13), %rdi
	callq	_spin_lock_init
	movq	8(%r13), %rdi
	callq	_BITS_TO_LONGS
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movl	%eax, (%r13)
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	xorl	%r15d, %r15d
	testq	%r14, %r14
	jle	LBB0_8
## %bb.5:
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_set_bit
	cmpq	$1, %r14
	je	LBB0_8
## %bb.6:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_set_bit
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_7
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %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	_hns_roce_bitmap_init           ; -- Begin function hns_roce_bitmap_init
	.p2align	2
_hns_roce_bitmap_init:                  ; @hns_roce_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_7
; %bb.1:
	sub	x8, x23, x21
	stp	xzr, xzr, [x20, #40]
	str	x8, [x20, #8]
	add	x0, x20, #16
	stp	x21, x22, [x20, #24]
	bl	_spin_lock_init
	ldr	x0, [x20, #8]
	bl	_BITS_TO_LONGS
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	str	w0, [x20]
	cbz	w0, LBB0_8
; %bb.2:
	cmp	x19, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x1, x0
	mov	x0, #0
	bl	_set_bit
	cmp	x19, #1
	b.eq	LBB0_6
; %bb.4:
	mov	w21, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x21
	bl	_set_bit
	add	x21, x21, #1
	cmp	x19, x21
	b.ne	LBB0_5
LBB0_6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
