	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset_pc_ext                   ## -- Begin function reset_pc_ext
	.p2align	4, 0x90
_reset_pc_ext:                          ## @reset_pc_ext
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movups	%xmm0, -88(%rbp)
	movq	$0, -56(%rbp)
	movl	(%rsi), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_DEBUG
	cmpl	$-1, %ebx
	je	LBB0_1
## %bb.2:
	movq	%r14, %rbx
	xorl	%r14d, %r14d
	cmpl	$1, %r12d
	sbbl	%r14d, %r14d
	orl	%r12d, %r14d
	movq	_IB_PERFORMANCE_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_IB_MAD_METHOD_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_IB_GSI_PORT_COUNTERS_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_IB_MAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_IB_PC_EXT_PORT_SELECT_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mad_set_field
	movq	_IB_PC_EXT_COUNTER_SELECT_F@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_mad_set_field
	movq	$0, -80(%rbp)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -96(%rbp)
	movq	_IB_PC_DATA_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_IB_PC_DATA_OFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	cmpl	$0, 4(%r13)
	jne	LBB0_4
## %bb.3:
	movl	$1, 4(%r13)
LBB0_4:
	cmpq	$0, 8(%r13)
	movq	%rbx, %rdi
	jne	LBB0_6
## %bb.5:
	movq	_IB_DEFAULT_QP1_QKEY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
LBB0_6:
	leaq	-96(%rbp), %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	%r15, %r8
	callq	_mad_rpc
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_IBWARN
	xorl	%eax, %eax
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lid %u port %d mask 0x%x"

L_.str.1:                               ## @.str.1
	.asciz	"only lid routed is supported"

	.comm	_IB_PERFORMANCE_CLASS,4,2       ## @IB_PERFORMANCE_CLASS
	.comm	_IB_MAD_METHOD_SET,4,2          ## @IB_MAD_METHOD_SET
	.comm	_IB_GSI_PORT_COUNTERS_EXT,4,2   ## @IB_GSI_PORT_COUNTERS_EXT
	.comm	_IB_MAD_SIZE,4,2                ## @IB_MAD_SIZE
	.comm	_IB_PC_EXT_PORT_SELECT_F,4,2    ## @IB_PC_EXT_PORT_SELECT_F
	.comm	_IB_PC_EXT_COUNTER_SELECT_F,4,2 ## @IB_PC_EXT_COUNTER_SELECT_F
	.comm	_IB_PC_DATA_SZ,4,2              ## @IB_PC_DATA_SZ
	.comm	_IB_PC_DATA_OFFS,4,2            ## @IB_PC_DATA_OFFS
	.comm	_IB_DEFAULT_QP1_QKEY,8,3        ## @IB_DEFAULT_QP1_QKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reset_pc_ext                   ; -- Begin function reset_pc_ext
	.p2align	2
_reset_pc_ext:                          ; @reset_pc_ext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x22, x4
	mov	x24, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	str	xzr, [sp, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #24]
	stur	q0, [sp, #8]
	ldr	w25, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	bl	_DEBUG
	cmn	w25, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	w24, #0
	csinv	w24, w24, wzr, ne
Lloh2:
	adrp	x8, _IB_PERFORMANCE_CLASS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IB_PERFORMANCE_CLASS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #36]
Lloh5:
	adrp	x8, _IB_MAD_METHOD_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_MAD_METHOD_SET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _IB_GSI_PORT_COUNTERS_EXT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IB_GSI_PORT_COUNTERS_EXT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w8, [sp, #32]
	str	w9, [sp, #24]
Lloh11:
	adrp	x8, _IB_MAD_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_MAD_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_memset
Lloh14:
	adrp	x8, _IB_PC_EXT_PORT_SELECT_F@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_PC_EXT_PORT_SELECT_F@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	x3, x23
	bl	_mad_set_field
Lloh17:
	adrp	x8, _IB_PC_EXT_COUNTER_SELECT_F@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IB_PC_EXT_COUNTER_SELECT_F@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	x3, x24
	bl	_mad_set_field
	str	xzr, [sp, #16]
Lloh20:
	adrp	x8, _IB_PC_DATA_SZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IB_PC_DATA_SZ@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh23:
	adrp	x8, _IB_PC_DATA_OFFS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IB_PC_DATA_OFFS@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	stp	w22, w8, [sp]
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
LBB0_3:
	mov	x1, sp
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	mov	x4, x20
	bl	_mad_rpc
	b	LBB0_5
LBB0_4:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IBWARN
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	mov	w8, #1
	str	w8, [x21, #4]
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_3
LBB0_7:
Lloh28:
	adrp	x8, _IB_DEFAULT_QP1_QKEY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IB_DEFAULT_QP1_QKEY@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	x8, [x21, #8]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lid %u port %d mask 0x%x"

l_.str.1:                               ; @.str.1
	.asciz	"only lid routed is supported"

	.comm	_IB_PERFORMANCE_CLASS,4,2       ; @IB_PERFORMANCE_CLASS
	.comm	_IB_MAD_METHOD_SET,4,2          ; @IB_MAD_METHOD_SET
	.comm	_IB_GSI_PORT_COUNTERS_EXT,4,2   ; @IB_GSI_PORT_COUNTERS_EXT
	.comm	_IB_MAD_SIZE,4,2                ; @IB_MAD_SIZE
	.comm	_IB_PC_EXT_PORT_SELECT_F,4,2    ; @IB_PC_EXT_PORT_SELECT_F
	.comm	_IB_PC_EXT_COUNTER_SELECT_F,4,2 ; @IB_PC_EXT_COUNTER_SELECT_F
	.comm	_IB_PC_DATA_SZ,4,2              ; @IB_PC_DATA_SZ
	.comm	_IB_PC_DATA_OFFS,4,2            ; @IB_PC_DATA_OFFS
	.comm	_IB_DEFAULT_QP1_QKEY,8,3        ; @IB_DEFAULT_QP1_QKEY
.subsections_via_symbols
