	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v2_create_eq
_hns_roce_v2_create_eq:                 ## @hns_roce_v2_create_eq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	callq	_hns_roce_alloc_cmd_mailbox
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	cmpl	$0, 4(%rbx)
	je	LBB0_2
## %bb.6:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_roce_mhop_alloc_eq
	testl	%eax, %eax
	jne	LBB0_3
## %bb.7:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_2:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	addl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	movl	$1, %esi
	movl	%r13d, %ecx
	shll	%cl, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %rdx
	callq	_dma_alloc_coherent
	movq	(%r15), %rdi
	movl	%eax, 4(%rdi)
	testl	%eax, %eax
	je	LBB0_5
LBB0_8:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_roce_config_eqc
	movl	(%r14), %esi
	movl	8(%r15), %ecx
	movq	_HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	%r12d, %r9d
	callq	_hns_roce_cmd_mbox
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_dev_err
	cmpl	$0, 4(%rbx)
	je	LBB0_10
## %bb.16:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_roce_mhop_free_eq
	jmp	LBB0_12
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_15:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hns_roce_free_cmd_mailbox
	jmp	LBB0_13
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_10:
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_free_coherent
	movq	(%r15), %rdi
LBB0_11:
	callq	_kfree
LBB0_12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hns_roce_free_cmd_mailbox
	movl	%r12d, %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HNS_ROCE_CMD_TIMEOUT_MSECS,4,2 ## @HNS_ROCE_CMD_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[mailbox cmd] create eqc failed.\n"

	.no_dead_strip	_hns_roce_v2_create_eq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v2_create_eq
_hns_roce_v2_create_eq:                 ; @hns_roce_v2_create_eq
	.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	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	bl	_hns_roce_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_2:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_mhop_alloc_eq
	cbnz	w0, LBB0_10
; %bb.4:
	mov	w24, #0
	b	LBB0_7
LBB0_5:
	ldr	w24, [x19]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
Lloh3:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x21]
	cbz	x0, LBB0_10
; %bb.6:
	mov	x2, x0
	add	w8, w26, w24
	mov	w9, #1
	lsl	w24, w9, w8
	ldr	w3, [x25]
	mov	x0, x22
	mov	x1, x24
	bl	_dma_alloc_coherent
	mov	x8, x0
	ldr	x0, [x21]
	str	w8, [x0, #4]
	cbz	w8, LBB0_11
LBB0_7:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_config_eqc
	ldr	w1, [x20]
	ldr	w3, [x21, #8]
Lloh5:
	adrp	x8, _HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPAGEOFF]
Lloh7:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w4, #0
	mov	x5, x23
	bl	_hns_roce_cmd_mbox
	mov	x23, x0
	cbz	w0, LBB0_14
; %bb.8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_12
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_mhop_free_eq
	b	LBB0_14
LBB0_10:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_11:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_13
LBB0_12:
	ldr	x8, [x21]
	ldp	w3, w2, [x8]
	mov	x0, x22
	mov	x1, x24
	bl	_dma_free_coherent
	ldr	x0, [x21]
LBB0_13:
	bl	_kfree
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_hns_roce_free_cmd_mailbox
	mov	x0, x23
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HNS_ROCE_CMD_TIMEOUT_MSECS,4,2 ; @HNS_ROCE_CMD_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[mailbox cmd] create eqc failed.\n"

	.no_dead_strip	_hns_roce_v2_create_eq
.subsections_via_symbols
