	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_buddy_init
_hns_roce_buddy_init:                   ## @hns_roce_buddy_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	%rdi, %r14
	movl	%esi, (%rdi)
	addq	$24, %rdi
	callq	_spin_lock_init
	movl	(%r14), %edi
	incl	%edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r14)
	movl	(%r14), %edi
	incl	%edi
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 16(%r14)
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	js	LBB0_13
## %bb.3:
	movq	$-1, %rbx
	xorl	%r13d, %r13d
	movq	___GFP_NOWARN@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%r14), %rcx
	incq	%rbx
	decl	%r13d
	cmpq	%rcx, %rbx
	jge	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addl	%r13d, %ecx
	movl	$1, %edi
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %edi
	callq	_BITS_TO_LONGS
	movl	%eax, %r12d
	movl	(%r15), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	8(%r14), %rdi
	movl	%eax, 4(%rdi,%rbx,4)
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_array_size
	movl	%eax, %edi
	callq	_vzalloc
	movq	8(%r14), %rdi
	movl	%eax, 4(%rdi,%rbx,4)
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	cmpl	$0, (%r14)
	js	LBB0_11
## %bb.7:
	movl	(%rdi), %edi
	callq	_kvfree
	cmpl	$0, (%r14)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	4(%rax,%rbx,4), %edi
	incq	%rbx
	callq	_kvfree
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	8(%r14), %rdi
LBB0_11:
	callq	_kfree
	movq	16(%r14), %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_13:
	movslq	%ecx, %rax
	movl	(%rdi,%rax,4), %esi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_set_bit
	movq	16(%r14), %rax
	movslq	(%r14), %rcx
	movl	$1, (%rax,%rcx,4)
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hns_roce_buddy_init
.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_init
_hns_roce_buddy_init:                   ; @hns_roce_buddy_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	str	w1, [x0], #24
	bl	_spin_lock_init
	ldr	w8, [x19]
	add	w0, w8, #1
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	ldr	w8, [x19]
	add	w0, w8, #1
	ldr	w2, [x21]
	mov	w1, #4
	bl	_kcalloc
	mov	x8, x0
	str	x0, [x19, #16]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_12
; %bb.1:
	cbz	x8, LBB0_12
; %bb.2:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_13
; %bb.3:
	mov	w22, #0
	mov	x23, #0
	mov	w24, #1
Lloh2:
	adrp	x25, ___GFP_NOWARN@GOTPAGE
Lloh3:
	ldr	x25, [x25, ___GFP_NOWARN@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x23, #1
	ldrsw	x8, [x19]
	sub	w22, w22, #1
	cmp	x23, x8
	mov	x23, x9
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w8, w22
	lsl	w0, w24, w8
	bl	_BITS_TO_LONGS
	mov	x20, x0
	ldr	w8, [x21]
	ldr	w9, [x25]
	orr	w2, w9, w8
	mov	w1, #8
	bl	_kcalloc
	mov	x8, x0
	ldr	x0, [x19, #8]
	str	w8, [x0, x23, lsl #2]
	cbnz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	w1, #8
	bl	_array_size
	bl	_vzalloc
	mov	x8, x0
	ldr	x0, [x19, #8]
	str	w8, [x0, x23, lsl #2]
	cbnz	w8, LBB0_4
; %bb.7:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_12
; %bb.8:
	ldr	w0, [x0]
	bl	_kvfree
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x8, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x20, x8, #1
	ldr	x9, [x19, #8]
	add	x8, x9, x8, lsl #2
	ldr	w0, [x8, #4]
	bl	_kvfree
	ldrsw	x9, [x19]
	mov	x8, x20
	cmp	x20, x9
	b.lt	LBB0_10
LBB0_11:
	ldr	x0, [x19, #8]
LBB0_12:
	bl	_kfree
	ldr	x0, [x19, #16]
	bl	_kfree
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_13:
	ldr	w1, [x0, w8, sxtw #2]
	mov	w0, #0
	bl	_set_bit
	mov	w0, #0
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19]
	mov	w10, #1
	str	w10, [x8, x9, lsl #2]
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hns_roce_buddy_init
.subsections_via_symbols
