	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvt_query_port
_rvt_query_port:                        ## @rvt_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_ib_to_rvt
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_ibport_num_to_idx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r12
	movl	20(%r12), %eax
	movl	%eax, 40(%rbx)
	movl	16(%r12), %eax
	movl	%eax, 36(%rbx)
	movl	12(%r12), %eax
	movl	%eax, 32(%rbx)
	movl	$-2147483648, (%rbx)            ## imm = 0x80000000
	movq	%r15, %rdi
	callq	_rvt_get_npkeys
	movl	%eax, 28(%rbx)
	movl	8(%r12), %eax
	movl	%eax, 24(%rbx)
	movl	4(%r12), %eax
	movl	%eax, 20(%rbx)
	movl	(%r12), %eax
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	(%r15), %rax
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rvt_query_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvt_query_port
_rvt_query_port:                        ; @rvt_query_port
	.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, x2
	mov	x20, x1
	mov	x22, x0
	bl	_ib_to_rvt
	mov	x21, x0
	mov	x0, x22
	mov	x1, x20
	bl	_ibport_num_to_idx
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	ldr	x22, [x8, w0, uxtw #3]
	ldr	w8, [x22, #20]
	str	w8, [x19, #40]
	ldur	d0, [x22, #12]
	str	d0, [x19, #32]
	mov	w8, #-2147483648
	str	w8, [x19]
	mov	x0, x21
	bl	_rvt_get_npkeys
	ldr	w8, [x22, #8]
	stp	w8, w0, [x19, #24]
	ldr	d0, [x22]
	str	d0, [x19, #16]
	str	xzr, [x19, #8]
	ldr	x3, [x21]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	br	x3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rvt_query_port
.subsections_via_symbols
