	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_query_device            ## -- Begin function pvrdma_query_device
	.p2align	4, 0x90
_pvrdma_query_device:                   ## @pvrdma_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	callq	_to_vdev
	cmpq	$0, 8(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %r14
	movq	(%rax), %rax
	movl	100(%rax), %ecx
	movl	%ecx, 120(%r15)
	movups	84(%rax), %xmm0
	movups	%xmm0, 104(%r15)
	movq	8(%r14), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 100(%r15)
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movdqu	68(%rax), %xmm0
	movdqu	%xmm0, 84(%r15)
	movd	%xmm0, %esi
	movd	%xmm0, 80(%r15)
	movl	64(%rax), %edx
	movq	%r14, %rdi
	callq	_PVRDMA_GET_CAP
	movq	%rax, 72(%r15)
	movq	(%r14), %rax
	movl	60(%rax), %ecx
	movl	%ecx, 68(%r15)
	movups	44(%rax), %xmm0
	movups	%xmm0, 52(%r15)
	movups	28(%rax), %xmm0
	movups	%xmm0, 36(%r15)
	movq	_PVRDMA_ATOMIC_OP_COMP_SWAP@GOTPCREL(%rip), %rcx
	movq	_PVRDMA_ATOMIC_OP_FETCH_ADD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	andl	4(%rax), %edx
	jne	LBB0_4
## %bb.5:
	movq	_IB_ATOMIC_NONE@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_IB_ATOMIC_HCA@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r15)
	movl	%ecx, 32(%r15)
	movl	24(%rax), %ecx
	movl	%ecx, 24(%r15)
	movl	20(%rax), %ecx
	movl	%ecx, 20(%r15)
	movl	16(%rax), %ecx
	movl	%ecx, 16(%r15)
	movl	8(%rax), %ecx
	movq	_PVRDMA_BMME_FLAG_LOCAL_INV@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.7:
	movq	_PVRDMA_BMME_FLAG_REMOTE_INV@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.8:
	movq	_PVRDMA_BMME_FLAG_FAST_REG_WR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.9:
	movq	_IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r15)
	movq	_PVRDMA_MAX_FAST_REG_PAGES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	12(%rax), %edx
	movq	%r14, %rdi
	callq	_PVRDMA_GET_CAP
	movq	%rax, 8(%r15)
LBB0_10:
	movq	_IB_DEVICE_PORT_ACTIVE_EVENT@GOTPCREL(%rip), %rax
	movq	_IB_DEVICE_RC_RNR_NAK_GEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PVRDMA_ATOMIC_OP_COMP_SWAP,4,2 ## @PVRDMA_ATOMIC_OP_COMP_SWAP
	.comm	_PVRDMA_ATOMIC_OP_FETCH_ADD,4,2 ## @PVRDMA_ATOMIC_OP_FETCH_ADD
	.comm	_IB_ATOMIC_HCA,4,2              ## @IB_ATOMIC_HCA
	.comm	_IB_ATOMIC_NONE,4,2             ## @IB_ATOMIC_NONE
	.comm	_PVRDMA_BMME_FLAG_LOCAL_INV,4,2 ## @PVRDMA_BMME_FLAG_LOCAL_INV
	.comm	_PVRDMA_BMME_FLAG_REMOTE_INV,4,2 ## @PVRDMA_BMME_FLAG_REMOTE_INV
	.comm	_PVRDMA_BMME_FLAG_FAST_REG_WR,4,2 ## @PVRDMA_BMME_FLAG_FAST_REG_WR
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ## @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_PVRDMA_MAX_FAST_REG_PAGES,4,2  ## @PVRDMA_MAX_FAST_REG_PAGES
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_query_device            ; -- Begin function pvrdma_query_device
	.p2align	2
_pvrdma_query_device:                   ; @pvrdma_query_device
	.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	x21, x2
	mov	x19, x1
	bl	_to_vdev
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	mov	x20, x0
	ldp	x8, x9, [x0]
	ldr	w10, [x8, #100]
	str	w10, [x19, #120]
	ldur	q0, [x8, #84]
	stur	q0, [x19, #104]
	ldr	w9, [x9]
	str	w9, [x19, #100]
	ldr	w9, [x8]
	str	w9, [x19]
	ldur	q0, [x8, #68]
	stur	q0, [x19, #84]
	str	s0, [x19, #80]
	fmov	w1, s0
	ldr	w2, [x8, #64]
	bl	_PVRDMA_GET_CAP
	str	x0, [x19, #72]
	ldr	x8, [x20]
	ldr	w9, [x8, #60]
	str	w9, [x19, #68]
	ldur	q0, [x8, #44]
	stur	q0, [x19, #52]
	ldur	q0, [x8, #28]
	stur	q0, [x19, #36]
Lloh3:
	adrp	x9, _PVRDMA_ATOMIC_OP_COMP_SWAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PVRDMA_ATOMIC_OP_COMP_SWAP@GOTPAGEOFF]
	ldr	w10, [x8, #4]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x11, _PVRDMA_ATOMIC_OP_FETCH_ADD@GOTPAGE
Lloh7:
	ldr	x11, [x11, _PVRDMA_ATOMIC_OP_FETCH_ADD@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w9, w11, w9
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	w9, w10
	csel	x9, x12, x11, eq
	ldr	w9, [x9]
	str	w9, [x19, #32]
	ldr	w10, [x8, #24]
	stp	w10, w9, [x19, #24]
	ldr	d0, [x8, #16]
	str	d0, [x19, #16]
	ldr	w9, [x8, #8]
Lloh13:
	adrp	x10, _PVRDMA_BMME_FLAG_LOCAL_INV@GOTPAGE
Lloh14:
	ldr	x10, [x10, _PVRDMA_BMME_FLAG_LOCAL_INV@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.5:
Lloh16:
	adrp	x10, _PVRDMA_BMME_FLAG_REMOTE_INV@GOTPAGE
Lloh17:
	ldr	x10, [x10, _PVRDMA_BMME_FLAG_REMOTE_INV@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.6:
Lloh19:
	adrp	x10, _PVRDMA_BMME_FLAG_FAST_REG_WR@GOTPAGE
Lloh20:
	ldr	x10, [x10, _PVRDMA_BMME_FLAG_FAST_REG_WR@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.7:
Lloh22:
	adrp	x9, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IB_DEVICE_MEM_MGT_EXTENSIONS@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	ldr	w10, [x19]
	orr	w9, w10, w9
	str	w9, [x19]
Lloh25:
	adrp	x9, _PVRDMA_MAX_FAST_REG_PAGES@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PVRDMA_MAX_FAST_REG_PAGES@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x9]
	ldr	w2, [x8, #12]
	mov	x0, x20
	bl	_PVRDMA_GET_CAP
	str	x0, [x19, #8]
LBB0_8:
	mov	w0, #0
Lloh28:
	adrp	x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IB_DEVICE_PORT_ACTIVE_EVENT@GOTPAGEOFF]
Lloh30:
	adrp	x9, _IB_DEVICE_RC_RNR_NAK_GEN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IB_DEVICE_RC_RNR_NAK_GEN@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PVRDMA_ATOMIC_OP_COMP_SWAP,4,2 ; @PVRDMA_ATOMIC_OP_COMP_SWAP
	.comm	_PVRDMA_ATOMIC_OP_FETCH_ADD,4,2 ; @PVRDMA_ATOMIC_OP_FETCH_ADD
	.comm	_IB_ATOMIC_HCA,4,2              ; @IB_ATOMIC_HCA
	.comm	_IB_ATOMIC_NONE,4,2             ; @IB_ATOMIC_NONE
	.comm	_PVRDMA_BMME_FLAG_LOCAL_INV,4,2 ; @PVRDMA_BMME_FLAG_LOCAL_INV
	.comm	_PVRDMA_BMME_FLAG_REMOTE_INV,4,2 ; @PVRDMA_BMME_FLAG_REMOTE_INV
	.comm	_PVRDMA_BMME_FLAG_FAST_REG_WR,4,2 ; @PVRDMA_BMME_FLAG_FAST_REG_WR
	.comm	_IB_DEVICE_MEM_MGT_EXTENSIONS,4,2 ; @IB_DEVICE_MEM_MGT_EXTENSIONS
	.comm	_PVRDMA_MAX_FAST_REG_PAGES,4,2  ; @PVRDMA_MAX_FAST_REG_PAGES
	.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
.subsections_via_symbols
