	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_bitmap_alloc_range    ## -- Begin function hns_roce_bitmap_alloc_range
	.p2align	4, 0x90
_hns_roce_bitmap_alloc_range:           ## @hns_roce_bitmap_alloc_range
	.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	%rcx, %r14
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	%esi, %eax
	xorl	$1, %eax
	movl	%edx, %ecx
	xorl	$1, %ecx
	xorl	%edi, %edi
	orl	%eax, %ecx
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_roce_bitmap_alloc          ## TAILCALL
LBB0_1:
	leaq	28(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	32(%r15), %edi
	movq	(%r15), %rsi
	movq	8(%r15), %rdx
	decl	%r13d
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	callq	_bitmap_find_next_zero_area
	movq	%rax, (%r14)
	movq	(%r15), %rsi
	cmpq	%rsi, %rax
	jae	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	jmp	LBB0_4
LBB0_3:
	movl	16(%r15), %eax
	addl	%esi, %eax
	addl	20(%r15), %eax
	andl	24(%r15), %eax
	movl	%eax, 16(%r15)
	movl	32(%r15), %edi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	callq	_bitmap_find_next_zero_area
	movq	%rax, %rdi
	movq	%rax, (%r14)
	movq	(%r15), %rsi
LBB0_4:
	movl	$-1, %r13d
	cmpq	%rsi, %rdi
	jae	LBB0_11
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_8
## %bb.6:
	movl	%r12d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rbx, %rdi
	movl	32(%r15), %esi
	callq	_set_bit
	incq	%rbx
	movq	(%r14), %rdi
	cmpq	%rbx, %r13
	jne	LBB0_7
LBB0_8:
	cmpq	8(%r15), %rdi
	jne	LBB0_10
## %bb.9:
	movslq	%r12d, %rax
	addq	%rax, %rdi
	xorl	%eax, %eax
	cmpq	(%r15), %rdi
	cmovbq	%rdi, %rax
	movq	%rax, 8(%r15)
	movq	(%r14), %rdi
LBB0_10:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movslq	16(%r15), %rax
	orq	%rdi, %rax
	movq	%rax, (%r14)
	xorl	%r13d, %r13d
LBB0_11:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_bitmap_alloc_range    ; -- Begin function hns_roce_bitmap_alloc_range
	.p2align	2
_hns_roce_bitmap_alloc_range:           ; @hns_roce_bitmap_alloc_range
	.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	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	cmp	w1, #1
	ccmp	w2, #1, #0, eq
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	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
	b	_hns_roce_bitmap_alloc
LBB0_2:
	add	x20, x21, #28
	mov	x0, x20
	bl	_spin_lock
	ldr	w0, [x21, #32]
	sub	w23, w23, #1
	ldp	x1, x2, [x21]
	mov	x3, x22
	mov	x4, x23
	bl	_bitmap_find_next_zero_area
	str	x0, [x19]
	ldr	x1, [x21]
	cmp	x0, x1
	b.lo	LBB0_4
; %bb.3:
	ldp	w8, w9, [x21, #16]
	ldr	w10, [x21, #24]
	add	w8, w8, w1
	add	w8, w8, w9
	and	w8, w8, w10
	str	w8, [x21, #16]
	ldr	w0, [x21, #32]
	mov	x2, #0
	mov	x3, x22
	mov	x4, x23
	bl	_bitmap_find_next_zero_area
	str	x0, [x19]
	ldr	x1, [x21]
LBB0_4:
	cmp	x0, x1
	b.hs	LBB0_11
; %bb.5:
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x23, #0
	mov	w24, w22
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x0, x23
	ldr	w1, [x21, #32]
	bl	_set_bit
	add	x23, x23, #1
	ldr	x0, [x19]
	cmp	x24, x23
	b.ne	LBB0_7
LBB0_8:
	ldr	x8, [x21, #8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	add	x8, x0, w22, sxtw
	ldr	x9, [x21]
	cmp	x8, x9
	csel	x8, x8, xzr, lo
	str	x8, [x21, #8]
	ldr	x0, [x19]
LBB0_10:
	mov	w22, #0
	ldrsw	x8, [x21, #16]
	orr	x8, x0, x8
	str	x8, [x19]
	b	LBB0_12
LBB0_11:
	mov	w22, #-1
LBB0_12:
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x22
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
