	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_ib_query_device          ## -- Begin function usnic_ib_query_device
	.p2align	4, 0x90
_usnic_ib_query_device:                 ## @usnic_ib_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	%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
	movq	%rdx, %rbx
	movq	%rsi, %r15
	callq	_to_usdev
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	callq	_usnic_dbg
	cmpq	$0, 8(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	32(%r12), %rdi
	movq	(%rdi), %rax
	leaq	-56(%rbp), %rsi
	callq	*(%rax)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$168, %edx
	callq	_memset
	movq	24(%r12), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	callq	_usnic_mac_ip_to_gid
	leaq	160(%r15), %rdi
	leaq	-64(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	-56(%rbp), %rdi
	leaq	156(%r15), %rsi
	callq	_usnic_ib_fw_string_to_u64
	movq	_USNIC_UIOM_MAX_MR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 152(%r15)
	movq	_USNIC_UIOM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 148(%r15)
	movq	_PCI_VENDOR_ID_CISCO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 144(%r15)
	movq	_PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 140(%r15)
	movq	16(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, 136(%r15)
	movq	(%r12), %rax
	movq	_USNIC_VNIC_RES_TYPE_WQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_USNIC_VNIC_RES_TYPE_RQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_max
	movl	%eax, %r13d
	movq	%r12, %r14
	addq	$12, %r14
	movq	%r14, %rdi
	callq	_kref_read
	imull	%r13d, %eax
	movl	%eax, (%r15)
	movq	_IB_DEVICE_PORT_ACTIVE_EVENT@GOTPCREL(%rip), %rax
	movq	_IB_DEVICE_SYS_IMAGE_GUID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IB_DEVICE_BLOCK_MULTICAST_LOOPBACK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%r15)
	movq	(%r12), %rax
	movq	_USNIC_VNIC_RES_TYPE_CQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r12d
	movq	%r14, %rdi
	callq	_kref_read
	imull	%r12d, %eax
	movl	%eax, 8(%r15)
	movq	_USNIC_UIOM_MAX_PD_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 132(%r15)
	movq	_USNIC_UIOM_MAX_MR_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 112(%r15)
	movq	_IB_ATOMIC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%r15)
	movl	%eax, 108(%r15)
	movups	%xmm0, 80(%r15)
	movups	%xmm0, 64(%r15)
	movups	%xmm0, 48(%r15)
	movups	%xmm0, 32(%r15)
	movups	%xmm0, 16(%r15)
	movq	$0, 96(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USNIC_UIOM_MAX_MR_SIZE,4,2     ## @USNIC_UIOM_MAX_MR_SIZE
	.comm	_USNIC_UIOM_PAGE_SIZE,4,2       ## @USNIC_UIOM_PAGE_SIZE
	.comm	_PCI_VENDOR_ID_CISCO,4,2        ## @PCI_VENDOR_ID_CISCO
	.comm	_PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC,4,2 ## @PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC
	.comm	_USNIC_VNIC_RES_TYPE_WQ,8,3     ## @USNIC_VNIC_RES_TYPE_WQ
	.comm	_USNIC_VNIC_RES_TYPE_RQ,8,3     ## @USNIC_VNIC_RES_TYPE_RQ
	.comm	_IB_DEVICE_PORT_ACTIVE_EVENT,4,2 ## @IB_DEVICE_PORT_ACTIVE_EVENT
	.comm	_IB_DEVICE_SYS_IMAGE_GUID,4,2   ## @IB_DEVICE_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_BLOCK_MULTICAST_LOOPBACK,4,2 ## @IB_DEVICE_BLOCK_MULTICAST_LOOPBACK
	.comm	_USNIC_VNIC_RES_TYPE_CQ,8,3     ## @USNIC_VNIC_RES_TYPE_CQ
	.comm	_USNIC_UIOM_MAX_PD_CNT,4,2      ## @USNIC_UIOM_MAX_PD_CNT
	.comm	_USNIC_UIOM_MAX_MR_CNT,4,2      ## @USNIC_UIOM_MAX_MR_CNT
	.comm	_IB_ATOMIC_NONE,4,2             ## @IB_ATOMIC_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_ib_query_device          ; -- Begin function usnic_ib_query_device
	.p2align	2
_usnic_ib_query_device:                 ; @usnic_ib_query_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x19, x1
	bl	_to_usdev
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_usnic_dbg
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x0, [x21, #32]
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	x1, sp
	blr	x8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #168
	bl	_memset
	ldr	x8, [x21, #24]
	ldp	w1, w0, [x8]
	bl	_usnic_mac_ip_to_gid
	add	x0, x19, #160
	add	x1, sp, #8
	mov	w2, #4
	bl	_memcpy
	ldr	x0, [sp]
	add	x1, x19, #156
	bl	_usnic_ib_fw_string_to_u64
Lloh5:
	adrp	x8, _USNIC_UIOM_MAX_MR_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USNIC_UIOM_MAX_MR_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _USNIC_UIOM_PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USNIC_UIOM_PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #148]
Lloh11:
	adrp	x8, _PCI_VENDOR_ID_CISCO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_VENDOR_ID_CISCO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #140]
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	str	w8, [x19, #136]
	ldr	x8, [x21]
Lloh17:
	adrp	x9, _USNIC_VNIC_RES_TYPE_WQ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _USNIC_VNIC_RES_TYPE_WQ@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
Lloh20:
	adrp	x9, _USNIC_VNIC_RES_TYPE_RQ@GOTPAGE
Lloh21:
	ldr	x9, [x9, _USNIC_VNIC_RES_TYPE_RQ@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	bl	_max
	mov	x22, x0
	add	x23, x21, #12
	mov	x0, x23
	bl	_kref_read
	mul	w8, w0, w22
	str	w8, [x19]
Lloh23:
	adrp	x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _IB_DEVICE_SYS_IMAGE_GUID@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IB_DEVICE_SYS_IMAGE_GUID@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _IB_DEVICE_BLOCK_MULTICAST_LOOPBACK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _IB_DEVICE_BLOCK_MULTICAST_LOOPBACK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #4]
	ldr	x8, [x21]
Lloh32:
	adrp	x9, _USNIC_VNIC_RES_TYPE_CQ@GOTPAGE
Lloh33:
	ldr	x9, [x9, _USNIC_VNIC_RES_TYPE_CQ@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	ldr	w21, [x8, x9, lsl #2]
	mov	x0, x23
	bl	_kref_read
	mul	w8, w0, w21
	str	w8, [x19, #8]
Lloh35:
	adrp	x8, _USNIC_UIOM_MAX_PD_CNT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _USNIC_UIOM_MAX_PD_CNT@GOTPAGEOFF]
Lloh37:
	adrp	x9, _USNIC_UIOM_MAX_MR_CNT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _USNIC_UIOM_MAX_MR_CNT@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #128]
	stp	xzr, xzr, [x19, #112]
Lloh41:
	adrp	x8, _IB_ATOMIC_NONE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IB_ATOMIC_NONE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	stp	w8, w8, [x19, #104]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #16]
	stp	q0, q0, [x19, #48]
	str	q0, [x19, #80]
	str	xzr, [x19, #96]
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USNIC_UIOM_MAX_MR_SIZE,4,2     ; @USNIC_UIOM_MAX_MR_SIZE
	.comm	_USNIC_UIOM_PAGE_SIZE,4,2       ; @USNIC_UIOM_PAGE_SIZE
	.comm	_PCI_VENDOR_ID_CISCO,4,2        ; @PCI_VENDOR_ID_CISCO
	.comm	_PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC,4,2 ; @PCI_DEVICE_ID_CISCO_VIC_USPACE_NIC
	.comm	_USNIC_VNIC_RES_TYPE_WQ,8,3     ; @USNIC_VNIC_RES_TYPE_WQ
	.comm	_USNIC_VNIC_RES_TYPE_RQ,8,3     ; @USNIC_VNIC_RES_TYPE_RQ
	.comm	_IB_DEVICE_PORT_ACTIVE_EVENT,4,2 ; @IB_DEVICE_PORT_ACTIVE_EVENT
	.comm	_IB_DEVICE_SYS_IMAGE_GUID,4,2   ; @IB_DEVICE_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_BLOCK_MULTICAST_LOOPBACK,4,2 ; @IB_DEVICE_BLOCK_MULTICAST_LOOPBACK
	.comm	_USNIC_VNIC_RES_TYPE_CQ,8,3     ; @USNIC_VNIC_RES_TYPE_CQ
	.comm	_USNIC_UIOM_MAX_PD_CNT,4,2      ; @USNIC_UIOM_MAX_PD_CNT
	.comm	_USNIC_UIOM_MAX_MR_CNT,4,2      ; @USNIC_UIOM_MAX_MR_CNT
	.comm	_IB_ATOMIC_NONE,4,2             ; @IB_ATOMIC_NONE
.subsections_via_symbols
