	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_buddy_free
_hns_roce_buddy_free:                   ## @hns_roce_buddy_free
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	%r12d, %ecx
	shrq	%cl, %r15
	callq	_spin_lock
	movq	%r15, %rbx
	xorq	$1, %rbx
	movq	16(%r14), %rax
	movslq	%r12d, %r12
	movl	(%rax,%r12,4), %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%r12,4), %esi
	movq	%rbx, %rdi
	callq	_clear_bit
	movq	8(%r14), %rax
	decl	(%rax,%r12,4)
	shrq	%r15
	movq	%r15, %rbx
	xorq	$1, %rbx
	movq	16(%r14), %rax
	movl	4(%rax,%r12,4), %esi
	incq	%r12
	jmp	LBB0_2
LBB0_3:
	movq	16(%r14), %rax
	movl	(%rax,%r12,4), %esi
	movq	%r15, %rdi
	callq	_set_bit
	movq	8(%r14), %rax
	incl	(%rax,%r12,4)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hns_roce_buddy_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_buddy_free
_hns_roce_buddy_free:                   ; @hns_roce_buddy_free
	.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	x22, x2
	mov	x19, x0
	lsr	x20, x1, x22
	bl	_spin_lock
	eor	x21, x20, #0x1
	ldr	x8, [x19, #16]
	mov	x9, x22
	sxtw	x23, w9
	ldr	w1, [x8, w22, sxtw #2]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #16]
	lsl	x22, x23, #2
	ldr	w1, [x8, x22]
	mov	x0, x21
	bl	_clear_bit
	ldp	x8, x9, [x19, #8]
	ldr	w10, [x8, x22]
	sub	w10, w10, #1
	str	w10, [x8, x22]
	lsr	x20, x20, #1
	add	x23, x23, #1
	eor	x21, x20, #0x1
	add	x8, x9, x22
	ldr	w1, [x8, #4]
	b	LBB0_1
LBB0_3:
	ldr	x8, [x19, #16]
	lsl	x21, x23, #2
	ldr	w1, [x8, x21]
	mov	x0, x20
	bl	_set_bit
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x21]
	add	w9, w9, #1
	str	w9, [x8, x21]
	mov	x0, 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	_spin_unlock
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hns_roce_buddy_free
.subsections_via_symbols
