	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_out_port                   ## -- Begin function get_out_port
	.p2align	4, 0x90
_get_out_port:                          ## @get_out_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_mirror_dlid@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rsi
	movq	_IB_SMP_DATA_SIZE@GOTPCREL(%rip), %r15
	cltd
	idivl	(%r15)
	movq	_buf@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	_IB_ATTR_LINEARFORWTBL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_srcport@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_smp_query_via
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_IBEXIT
LBB0_4:
	movl	(%rbx), %eax
	cltd
	idivl	(%r15)
	movslq	%edx, %rax
	shlq	$2, %rax
	addq	(%r14), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_mirror_dport@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mirror_dlid,4,2                ## @mirror_dlid
	.comm	_IB_SMP_DATA_SIZE,4,2           ## @IB_SMP_DATA_SIZE
	.comm	_buf,8,3                        ## @buf
	.comm	_IB_ATTR_LINEARFORWTBL,4,2      ## @IB_ATTR_LINEARFORWTBL
	.comm	_srcport,4,2                    ## @srcport
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"linear forwarding table get failed"

	.comm	_mirror_dport,4,2               ## @mirror_dport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_out_port                   ; -- Begin function get_out_port
	.p2align	2
_get_out_port:                          ; @get_out_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
Lloh0:
	adrp	x19, _mirror_dlid@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mirror_dlid@GOTPAGEOFF]
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x1, x0
Lloh2:
	adrp	x20, _IB_SMP_DATA_SIZE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _IB_SMP_DATA_SIZE@GOTPAGEOFF]
	ldr	w9, [x20]
	sdiv	w3, w8, w9
Lloh4:
	adrp	x21, _buf@GOTPAGE
Lloh5:
	ldr	x21, [x21, _buf@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh6:
	adrp	x8, _IB_ATTR_LINEARFORWTBL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_ATTR_LINEARFORWTBL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _srcport@GOTPAGE
Lloh10:
	ldr	x8, [x8, _srcport@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	w4, #0
	bl	_smp_query_via
	cbnz	w0, LBB0_3
; %bb.2:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IBEXIT
LBB0_3:
	ldr	w8, [x19]
	ldr	w9, [x20]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	ldr	x9, [x21]
	add	x8, x9, w8, sxtw #2
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _mirror_dport@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mirror_dport@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_mirror_dlid,4,2                ; @mirror_dlid
	.comm	_IB_SMP_DATA_SIZE,4,2           ; @IB_SMP_DATA_SIZE
	.comm	_buf,8,3                        ; @buf
	.comm	_IB_ATTR_LINEARFORWTBL,4,2      ; @IB_ATTR_LINEARFORWTBL
	.comm	_srcport,4,2                    ; @srcport
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"linear forwarding table get failed"

	.comm	_mirror_dport,4,2               ; @mirror_dport
.subsections_via_symbols
