	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_check_qp_attr
_hns_roce_check_qp_attr:                ## @hns_roce_check_qp_attr
	.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, %rbx
	movl	(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_hr_qp
	movq	_IB_QP_PORT@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_11
## %bb.1:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	cmpq	8(%r14), %rdx
	jle	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_11:
	movq	_IB_QP_PKEY_INDEX@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_12
## %bb.8:
	movl	(%rax), %edx
	jmp	LBB0_9
LBB0_6:
	movq	_IB_QP_PKEY_INDEX@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_12
## %bb.7:
	decq	%rdx
LBB0_9:
	movq	8(%r15), %rcx
	movq	16(%r14), %rsi
	movslq	%edx, %rdx
	cmpq	(%rsi,%rdx,8), %rcx
	jge	LBB0_10
LBB0_12:
	movq	_IB_QP_MAX_QP_RD_ATOMIC@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_15
## %bb.13:
	movq	16(%r15), %rdx
	cmpq	24(%r14), %rdx
	jle	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_15:
	movq	_IB_QP_MAX_DEST_RD_ATOMIC@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_18
## %bb.16:
	movq	24(%r15), %rdx
	cmpq	32(%r14), %rdx
	jle	LBB0_18
## %bb.17:
	leaq	L_.str.3(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	jmp	LBB0_5
LBB0_18:
	movq	_IB_QP_PATH_MTU@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_19
## %bb.21:
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_check_mtu_validate             ## TAILCALL
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rcx, %rdx
LBB0_5:
	callq	_ibdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QP_PORT,4,2                 ## @IB_QP_PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attr port_num invalid.attr->port_num=%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_QP_PKEY_INDEX,4,2           ## @IB_QP_PKEY_INDEX
L_.str.1:                               ## @.str.1
	.asciz	"attr pkey_index invalid.attr->pkey_index=%d\n"

	.comm	_IB_QP_MAX_QP_RD_ATOMIC,4,2     ## @IB_QP_MAX_QP_RD_ATOMIC
L_.str.2:                               ## @.str.2
	.asciz	"attr max_rd_atomic invalid.attr->max_rd_atomic=%d\n"

	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ## @IB_QP_MAX_DEST_RD_ATOMIC
L_.str.3:                               ## @.str.3
	.asciz	"attr max_dest_rd_atomic invalid.attr->max_dest_rd_atomic=%d\n"

	.comm	_IB_QP_PATH_MTU,4,2             ## @IB_QP_PATH_MTU
	.no_dead_strip	_hns_roce_check_qp_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_check_qp_attr
_hns_roce_check_qp_attr:                ; @hns_roce_check_qp_attr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0]
	bl	_to_hr_dev
	mov	x19, x0
	mov	x0, x22
	bl	_to_hr_qp
	mov	x1, x0
Lloh0:
	adrp	x8, _IB_QP_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QP_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.1:
	ldr	x2, [x21]
	cbz	x2, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x2, x8
	b.le	LBB0_6
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_18
LBB0_4:
Lloh5:
	adrp	x8, _IB_QP_PKEY_INDEX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_QP_PKEY_INDEX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.5:
	ldr	w8, [x1]
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _IB_QP_PKEY_INDEX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_QP_PKEY_INDEX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.7:
	sub	x8, x2, #1
LBB0_8:
	ldr	x2, [x21, #8]
	ldr	x9, [x19, #16]
	sbfiz	x8, x8, #3, #32
	ldr	x8, [x9, x8]
	cmp	x2, x8
	b.ge	LBB0_17
LBB0_9:
Lloh11:
	adrp	x8, _IB_QP_MAX_QP_RD_ATOMIC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_QP_MAX_QP_RD_ATOMIC@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.10:
	ldr	x2, [x21, #16]
	ldr	x8, [x19, #24]
	cmp	x2, x8
	b.le	LBB0_12
; %bb.11:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_12:
Lloh16:
	adrp	x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IB_QP_MAX_DEST_RD_ATOMIC@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_15
; %bb.13:
	ldr	x2, [x21, #24]
	ldr	x8, [x19, #32]
	cmp	x2, x8
	b.le	LBB0_15
; %bb.14:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_15:
Lloh21:
	adrp	x8, _IB_QP_PATH_MTU@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IB_QP_PATH_MTU@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_20
; %bb.16:
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_check_mtu_validate
LBB0_17:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_ibdev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	w0, #0
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QP_PORT,4,2                 ; @IB_QP_PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attr port_num invalid.attr->port_num=%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_QP_PKEY_INDEX,4,2           ; @IB_QP_PKEY_INDEX
l_.str.1:                               ; @.str.1
	.asciz	"attr pkey_index invalid.attr->pkey_index=%d\n"

	.comm	_IB_QP_MAX_QP_RD_ATOMIC,4,2     ; @IB_QP_MAX_QP_RD_ATOMIC
l_.str.2:                               ; @.str.2
	.asciz	"attr max_rd_atomic invalid.attr->max_rd_atomic=%d\n"

	.comm	_IB_QP_MAX_DEST_RD_ATOMIC,4,2   ; @IB_QP_MAX_DEST_RD_ATOMIC
l_.str.3:                               ; @.str.3
	.asciz	"attr max_dest_rd_atomic invalid.attr->max_dest_rd_atomic=%d\n"

	.comm	_IB_QP_PATH_MTU,4,2             ; @IB_QP_PATH_MTU
	.no_dead_strip	_hns_roce_check_qp_attr
.subsections_via_symbols
