	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_query_port              ## -- Begin function pvrdma_query_port
	.p2align	4, 0x90
_pvrdma_query_port:                     ## @pvrdma_query_port
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r12d
	callq	_to_vdev
	movq	%rax, %r15
	leaq	-48(%rbp), %r13
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_PVRDMA_CMD_QUERY_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	%r12d, -48(%rbp)
	movq	_PVRDMA_CMD_QUERY_PORT_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-128(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_pvrdma_cmd_post
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-56(%rbp), %edi
	callq	_pvrdma_port_state_to_ib
	movl	%eax, 88(%rbx)
	movl	-60(%rbp), %edi
	callq	_pvrdma_mtu_to_ib
	movq	%rax, 80(%rbx)
	movl	-64(%rbp), %edi
	callq	_pvrdma_mtu_to_ib
	movq	%rax, 72(%rbx)
	movl	-68(%rbp), %eax
	movl	%eax, 64(%rbx)
	movl	-72(%rbp), %edi
	callq	_pvrdma_port_cap_flags_to_ib
	movq	_IB_PORT_CM_SUP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 60(%rbx)
	movl	$1, (%rbx)
	movl	-76(%rbp), %eax
	movl	%eax, 56(%rbx)
	movl	-80(%rbp), %eax
	movl	%eax, 52(%rbx)
	movl	-84(%rbp), %eax
	movl	%eax, 48(%rbx)
	movups	-100(%rbp), %xmm0
	movups	%xmm0, 32(%rbx)
	movups	-116(%rbp), %xmm0
	movups	%xmm0, 16(%rbx)
	movl	-120(%rbp), %edi
	callq	_pvrdma_port_width_to_ib
	movl	%eax, 12(%rbx)
	movl	-124(%rbp), %edi
	callq	_pvrdma_port_speed_to_ib
	movl	%eax, 8(%rbx)
	movl	-128(%rbp), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	movl	%r12d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVRDMA_CMD_QUERY_PORT,4,2      ## @PVRDMA_CMD_QUERY_PORT
	.comm	_PVRDMA_CMD_QUERY_PORT_RESP,4,2 ## @PVRDMA_CMD_QUERY_PORT_RESP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not query port, error: %d\n"

	.comm	_IB_PORT_CM_SUP,4,2             ## @IB_PORT_CM_SUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_query_port              ; -- Begin function pvrdma_query_port
	.p2align	2
_pvrdma_query_port:                     ; @pvrdma_query_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x2
	mov	x21, x1
	bl	_to_vdev
	mov	x20, x0
	sub	x0, x29, #40
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _PVRDMA_CMD_QUERY_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVRDMA_CMD_QUERY_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w21, w8, [x29, #-40]
Lloh3:
	adrp	x8, _PVRDMA_CMD_QUERY_PORT_RESP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PVRDMA_CMD_QUERY_PORT_RESP@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	sub	x1, x29, #40
	add	x2, sp, #8
	mov	x0, x20
	bl	_pvrdma_cmd_post
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [sp, #80]
	bl	_pvrdma_port_state_to_ib
	str	w0, [x19, #88]
	ldr	w0, [sp, #76]
	bl	_pvrdma_mtu_to_ib
	str	x0, [x19, #80]
	ldr	w0, [sp, #72]
	bl	_pvrdma_mtu_to_ib
	str	x0, [x19, #72]
	ldp	w0, w8, [sp, #64]
	str	w8, [x19, #64]
	bl	_pvrdma_port_cap_flags_to_ib
Lloh6:
	adrp	x8, _IB_PORT_CM_SUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_PORT_CM_SUP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w8, w0
	mov	w9, #1
	str	w9, [x19]
	ldr	w9, [sp, #60]
	stp	w9, w8, [x19, #56]
	ldur	d0, [sp, #52]
	str	d0, [x19, #48]
	ldur	q0, [sp, #36]
	ldur	q1, [sp, #20]
	stp	q1, q0, [x19, #16]
	ldr	w0, [sp, #16]
	bl	_pvrdma_port_width_to_ib
	str	w0, [x19, #12]
	ldr	w0, [sp, #12]
	bl	_pvrdma_port_speed_to_ib
	mov	w21, #0
	ldr	w8, [sp, #8]
	stp	w8, w0, [x19, #4]
	b	LBB0_3
LBB0_2:
	mov	x21, x0
	ldr	x0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_warn
LBB0_3:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PVRDMA_CMD_QUERY_PORT,4,2      ; @PVRDMA_CMD_QUERY_PORT
	.comm	_PVRDMA_CMD_QUERY_PORT_RESP,4,2 ; @PVRDMA_CMD_QUERY_PORT_RESP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not query port, error: %d\n"

	.comm	_IB_PORT_CM_SUP,4,2             ; @IB_PORT_CM_SUP
.subsections_via_symbols
