	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_query_device            ## -- Begin function ocrdma_query_device
	.p2align	4, 0x90
_ocrdma_query_device:                   ## @ocrdma_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_get_ocrdma_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$184, %edx
	callq	_memset
	leaq	180(%rbx), %r15
	movq	56(%r14), %r12
	movl	$8, %edi
	movl	$4, %esi
	callq	_min
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	leaq	176(%rbx), %rsi
	movq	%r14, %rdi
	callq	_ocrdma_get_guid
	movq	$-1, (%rbx)
	movl	$268431360, 8(%rbx)             ## imm = 0xFFFF000
	movq	64(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 172(%rbx)
	movl	(%rax), %eax
	movl	%eax, 168(%rbx)
	movq	$0, 160(%rbx)
	movq	24(%r14), %rax
	movq	%rax, 152(%rbx)
	movq	%rax, 144(%rbx)
	movl	48(%r14), %eax
	movl	%eax, 136(%rbx)
	movq	_IB_DEVICE_CURR_QP_STATE_MOD@GOTPCREL(%rip), %rax
	movq	_IB_DEVICE_RC_RNR_NAK_GEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IB_DEVICE_SHUTDOWN_PORT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IB_DEVICE_SYS_IMAGE_GUID@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IB_DEVICE_LOCAL_DMA_LKEY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 12(%rbx)
	movl	(%r14), %edi
	movl	4(%r14), %esi
	callq	_min
	movq	%rax, 128(%rbx)
	movq	$0, 120(%rbx)
	movl	44(%r14), %eax
	movl	%eax, 112(%rbx)
	movl	40(%r14), %eax
	movl	%eax, 108(%rbx)
	movl	36(%r14), %eax
	movl	%eax, 104(%rbx)
	movq	$0, 96(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 88(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	movq	$0, 80(%rbx)
	movl	8(%r14), %edi
	movl	12(%r14), %esi
	callq	_min
	movq	%rax, 56(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	24(%r14), %rax
	decq	%rax
	movq	%rax, 48(%rbx)
	movl	4(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 44(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movl	$1, 24(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_DEVICE_CURR_QP_STATE_MOD,4,2 ## @IB_DEVICE_CURR_QP_STATE_MOD
	.comm	_IB_DEVICE_RC_RNR_NAK_GEN,4,2   ## @IB_DEVICE_RC_RNR_NAK_GEN
	.comm	_IB_DEVICE_SHUTDOWN_PORT,4,2    ## @IB_DEVICE_SHUTDOWN_PORT
	.comm	_IB_DEVICE_SYS_IMAGE_GUID,4,2   ## @IB_DEVICE_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ## @IB_DEVICE_LOCAL_DMA_LKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_query_device            ; -- Begin function ocrdma_query_device
	.p2align	2
_ocrdma_query_device:                   ; @ocrdma_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	x19, x1
	bl	_get_ocrdma_dev
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #184
	bl	_memset
	add	x21, x19, #180
	ldr	x22, [x20, #56]
	mov	w0, #8
	mov	w1, #4
	bl	_min
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_memcpy
	add	x1, x19, #176
	mov	x0, x20
	bl	_ocrdma_get_guid
	mov	x8, #-1
	str	x8, [x19]
	mov	w8, #268431360
	str	w8, [x19, #8]
	ldr	x8, [x20, #64]
	ldr	d0, [x8]
	str	d0, [x19, #168]
	ldr	x8, [x20, #24]
	stp	x8, x8, [x19, #144]
	ldr	w8, [x20, #48]
	str	w8, [x19, #136]
Lloh0:
	adrp	x8, _IB_DEVICE_CURR_QP_STATE_MOD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_DEVICE_CURR_QP_STATE_MOD@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
Lloh6:
	adrp	x9, _IB_DEVICE_SHUTDOWN_PORT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_DEVICE_SHUTDOWN_PORT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _IB_DEVICE_SYS_IMAGE_GUID@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IB_DEVICE_SYS_IMAGE_GUID@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGEOFF]
	str	xzr, [x19, #160]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #12]
	ldp	w0, w1, [x20]
	bl	_min
	stp	xzr, x0, [x19, #120]
	ldr	w8, [x20, #44]
	str	w8, [x19, #112]
	ldur	d0, [x20, #36]
	str	d0, [x19, #104]
	str	xzr, [x19, #96]
	ldr	w8, [x20, #32]
	str	w8, [x19, #88]
	stp	xzr, xzr, [x19, #72]
	str	xzr, [x19, #64]
	ldp	w0, w1, [x20, #8]
	bl	_min
	ldr	x8, [x20, #24]
	sub	x8, x8, #1
	stp	x8, x0, [x19, #48]
	ldur	d0, [x20, #4]
	rev64.2s	v0, v0
	str	d0, [x19, #16]
	ldr	d0, [x20, #16]
	str	d0, [x19, #40]
	str	xzr, [x19, #32]
	mov	w8, #1
	str	w8, [x19, #24]
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_DEVICE_CURR_QP_STATE_MOD,4,2 ; @IB_DEVICE_CURR_QP_STATE_MOD
	.comm	_IB_DEVICE_RC_RNR_NAK_GEN,4,2   ; @IB_DEVICE_RC_RNR_NAK_GEN
	.comm	_IB_DEVICE_SHUTDOWN_PORT,4,2    ; @IB_DEVICE_SHUTDOWN_PORT
	.comm	_IB_DEVICE_SYS_IMAGE_GUID,4,2   ; @IB_DEVICE_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ; @IB_DEVICE_LOCAL_DMA_LKEY
.subsections_via_symbols
