	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_query_device
_hns_roce_query_device:                 ## @hns_roce_query_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	callq	_to_hr_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$112, %edx
	callq	_memset
	movl	64(%r14), %eax
	movl	%eax, 108(%rbx)
	movl	80(%r14), %edi
	callq	_cpu_to_be64
	movl	%eax, 104(%rbx)
	movq	$-1, 96(%rbx)
	movl	60(%r14), %eax
	movl	%eax, 88(%rbx)
	movl	76(%r14), %eax
	movl	%eax, 84(%rbx)
	movsd	68(%r14), %xmm0                 ## xmm0 = mem[0],zero
	movsd	52(%r14), %xmm1                 ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, 68(%rbx)
	movq	_IB_DEVICE_PORT_ACTIVE_EVENT@GOTPCREL(%rip), %rcx
	movq	_IB_DEVICE_RC_RNR_NAK_GEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movl	$1, 4(%rbx)
	movups	36(%r14), %xmm0
	movups	%xmm0, 52(%rbx)
	movups	20(%r14), %xmm0
	movups	%xmm0, 36(%rbx)
	movl	(%r14), %ecx
	movq	_HNS_ROCE_CAP_FLAG_ATOMIC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_IB_ATOMIC_NONE@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_1:
	movq	_IB_ATOMIC_HCA@GOTPCREL(%rip), %rdx
LBB0_3:
	movl	(%rdx), %edx
	movl	%edx, 32(%rbx)
	movl	$1, 8(%rbx)
	movl	16(%r14), %edx
	movl	%edx, 28(%rbx)
	movq	_HNS_ROCE_CAP_FLAG_SRQ@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_5
## %bb.4:
	movl	12(%r14), %edx
	movl	%edx, 24(%rbx)
	movl	8(%r14), %edx
	movl	%edx, 20(%rbx)
	movl	4(%r14), %edx
	movl	%edx, 16(%rbx)
LBB0_5:
	movq	_HNS_ROCE_CAP_FLAG_FRMR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	_HNS_ROCE_FRMR_MAX_PA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_DEVICE_PORT_ACTIVE_EVENT,4,2 ## @IB_DEVICE_PORT_ACTIVE_EVENT
	.comm	_IB_DEVICE_RC_RNR_NAK_GEN,4,2   ## @IB_DEVICE_RC_RNR_NAK_GEN
	.comm	_HNS_ROCE_CAP_FLAG_ATOMIC,4,2   ## @HNS_ROCE_CAP_FLAG_ATOMIC
	.comm	_IB_ATOMIC_HCA,4,2              ## @IB_ATOMIC_HCA
	.comm	_IB_ATOMIC_NONE,4,2             ## @IB_ATOMIC_NONE
	.comm	_HNS_ROCE_CAP_FLAG_SRQ,4,2      ## @HNS_ROCE_CAP_FLAG_SRQ
	.comm	_HNS_ROCE_CAP_FLAG_FRMR,4,2     ## @HNS_ROCE_CAP_FLAG_FRMR
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ## @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_HNS_ROCE_FRMR_MAX_PA,4,2       ## @HNS_ROCE_FRMR_MAX_PA
	.no_dead_strip	_hns_roce_query_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_query_device
_hns_roce_query_device:                 ; @hns_roce_query_device
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_to_hr_dev
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #112
	bl	_memset
	ldr	w8, [x20, #64]
	str	w8, [x19, #108]
	ldr	w0, [x20, #80]
	bl	_cpu_to_be64
	str	w0, [x19, #104]
	mov	x8, #-1
	str	x8, [x19, #96]
	ldr	w8, [x20, #60]
	ldr	w9, [x20, #76]
	stp	w9, w8, [x19, #84]
	ldur	d0, [x20, #68]
	ldur	d1, [x20, #52]
	mov.d	v1[1], v0[0]
	stur	q1, [x19, #68]
Lloh0:
	adrp	x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IB_DEVICE_RC_RNR_NAK_GEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_DEVICE_RC_RNR_NAK_GEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldur	q0, [x20, #36]
	stur	q0, [x19, #52]
	ldur	q0, [x20, #20]
	stur	q0, [x19, #36]
Lloh6:
	adrp	x10, _HNS_ROCE_CAP_FLAG_ATOMIC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HNS_ROCE_CAP_FLAG_ATOMIC@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _IB_ATOMIC_HCA@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IB_ATOMIC_HCA@GOTPAGEOFF]
Lloh11:
	adrp	x12, _IB_ATOMIC_NONE@GOTPAGE
Lloh12:
	ldr	x12, [x12, _IB_ATOMIC_NONE@GOTPAGEOFF]
	tst	w10, w9
	csel	x10, x12, x11, eq
	ldr	w10, [x10]
	movi.2s	v0, #1
	stur	d0, [x19, #4]
	ldr	w11, [x20, #16]
	stp	w11, w10, [x19, #28]
Lloh13:
	adrp	x10, _HNS_ROCE_CAP_FLAG_SRQ@GOTPAGE
Lloh14:
	ldr	x10, [x10, _HNS_ROCE_CAP_FLAG_SRQ@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w10, [x20, #12]
	str	w10, [x19, #24]
	ldur	d0, [x20, #4]
	str	d0, [x19, #16]
LBB0_2:
Lloh16:
	adrp	x10, _HNS_ROCE_CAP_FLAG_FRMR@GOTPAGE
Lloh17:
	ldr	x10, [x10, _HNS_ROCE_CAP_FLAG_FRMR@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
Lloh19:
	adrp	x9, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh22:
	adrp	x8, _HNS_ROCE_FRMR_MAX_PA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HNS_ROCE_FRMR_MAX_PA@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_DEVICE_PORT_ACTIVE_EVENT,4,2 ; @IB_DEVICE_PORT_ACTIVE_EVENT
	.comm	_IB_DEVICE_RC_RNR_NAK_GEN,4,2   ; @IB_DEVICE_RC_RNR_NAK_GEN
	.comm	_HNS_ROCE_CAP_FLAG_ATOMIC,4,2   ; @HNS_ROCE_CAP_FLAG_ATOMIC
	.comm	_IB_ATOMIC_HCA,4,2              ; @IB_ATOMIC_HCA
	.comm	_IB_ATOMIC_NONE,4,2             ; @IB_ATOMIC_NONE
	.comm	_HNS_ROCE_CAP_FLAG_SRQ,4,2      ; @HNS_ROCE_CAP_FLAG_SRQ
	.comm	_HNS_ROCE_CAP_FLAG_FRMR,4,2     ; @HNS_ROCE_CAP_FLAG_FRMR
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ; @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_HNS_ROCE_FRMR_MAX_PA,4,2       ; @HNS_ROCE_FRMR_MAX_PA
	.no_dead_strip	_hns_roce_query_device
.subsections_via_symbols
