	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_refresh_port
_srpt_refresh_port:                     ## @srpt_refresh_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_IB_PORT_DEVICE_MGMT_SUP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movq	$0, -80(%rbp)
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_ib_modify_port
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	callq	_ib_query_port
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	-44(%rbp), %eax
	movl	%eax, 68(%r13)
	movl	-48(%rbp), %eax
	movl	%eax, 64(%r13)
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	leaq	28(%r13), %r12
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_rdma_query_gid
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_6:
	movq	$0, -72(%rbp)
	movq	_IB_PORT_DEVICE_MGMT_SUP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	leaq	-80(%rbp), %rcx
	xorl	%edx, %edx
	callq	_ib_modify_port
	movl	%r15d, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r13, 56(%r13)
	movl	48(%r13), %edi
	movl	$4, %esi
	movq	%r12, %rdx
	callq	_srpt_format_guid
	movq	%r13, 40(%r13)
	movl	24(%r13), %r15d
	movl	32(%r13), %edi
	callq	_be64_to_cpu
	movl	%eax, %ebx
	movl	28(%r13), %edi
	callq	_be64_to_cpu
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %edi
	movl	$4, %esi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_snprintf
	cmpq	$0, 16(%r13)
	jne	LBB0_7
## %bb.4:
	leaq	-112(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_IB_MGMT_CLASS_DEVICE_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_IB_MGMT_BASE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movq	_IB_MGMT_METHOD_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-96(%rbp), %esi
	callq	_set_bit
	movq	_IB_MGMT_METHOD_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-96(%rbp), %esi
	callq	_set_bit
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_srpt_mad_send_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_srpt_mad_recv_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	pushq	$0
	pushq	%r13
	pushq	%rax
	callq	_ib_register_mad_agent
	addq	$32, %rsp
	movq	%rax, 16(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	16(%r13), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	$0, 16(%r13)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_PORT_DEVICE_MGMT_SUP,8,3    ## @IB_PORT_DEVICE_MGMT_SUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%016llx%016llx"

	.comm	_IB_MGMT_CLASS_DEVICE_MGMT,4,2  ## @IB_MGMT_CLASS_DEVICE_MGMT
	.comm	_IB_MGMT_BASE_VERSION,4,2       ## @IB_MGMT_BASE_VERSION
	.comm	_IB_MGMT_METHOD_GET,4,2         ## @IB_MGMT_METHOD_GET
	.comm	_IB_MGMT_METHOD_SET,4,2         ## @IB_MGMT_METHOD_SET
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
	.comm	_srpt_mad_send_handler,4,2      ## @srpt_mad_send_handler
	.comm	_srpt_mad_recv_handler,4,2      ## @srpt_mad_recv_handler
	.no_dead_strip	_srpt_refresh_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_refresh_port
_srpt_refresh_port:                     ; @srpt_refresh_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x22, _IB_PORT_DEVICE_MGMT_SUP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IB_PORT_DEVICE_MGMT_SUP@GOTPAGEOFF]
	ldr	x8, [x22]
	stp	xzr, x8, [sp, #16]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	add	x3, sp, #16
	mov	w2, #0
	bl	_ib_modify_port
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	add	x2, sp, #8
	bl	_ib_query_port
	mov	x20, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	d0, [sp, #8]
	str	d0, [x19, #64]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	add	x21, x19, #28
	mov	w2, #0
	mov	x3, x21
	bl	_rdma_query_gid
	mov	x20, x0
	cbz	w0, LBB0_5
LBB0_3:
	ldr	x8, [x22]
	stp	x8, xzr, [sp, #16]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	add	x3, sp, #16
	mov	w2, #0
	bl	_ib_modify_port
LBB0_4:
	mov	x0, x20
	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
	add	sp, sp, #128
	ret
LBB0_5:
	str	x19, [x19, #56]
	ldr	w0, [x19, #48]
	mov	w1, #4
	mov	x2, x21
	bl	_srpt_format_guid
	str	x19, [x19, #40]
	ldr	w20, [x19, #24]
	ldr	w0, [x19, #32]
	bl	_be64_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #28]
	bl	_be64_to_cpu
	mov	x4, x0
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #4
	mov	x3, x21
	bl	_snprintf
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
LBB0_6:
	mov	w20, #0
	b	LBB0_4
LBB0_7:
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh4:
	adrp	x8, _IB_MGMT_CLASS_DEVICE_MGMT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IB_MGMT_CLASS_DEVICE_MGMT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _IB_MGMT_BASE_VERSION@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IB_MGMT_BASE_VERSION@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #68]
Lloh10:
	adrp	x8, _IB_MGMT_METHOD_GET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_MGMT_METHOD_GET@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w1, [sp, #64]
	bl	_set_bit
Lloh13:
	adrp	x8, _IB_MGMT_METHOD_SET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IB_MGMT_METHOD_SET@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [sp, #64]
	bl	_set_bit
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh16:
	adrp	x8, _IB_QPT_GSI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IB_QPT_GSI@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _srpt_mad_send_handler@GOTPAGE
Lloh20:
	ldr	x8, [x8, _srpt_mad_send_handler@GOTPAGEOFF]
Lloh21:
	ldr	w5, [x8]
Lloh22:
	adrp	x8, _srpt_mad_recv_handler@GOTPAGE
Lloh23:
	ldr	x8, [x8, _srpt_mad_recv_handler@GOTPAGEOFF]
Lloh24:
	ldr	w6, [x8]
	str	wzr, [sp]
	add	x3, sp, #48
	mov	w4, #0
	mov	x7, x19
	bl	_ib_register_mad_agent
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.8:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x20, x0
	str	xzr, [x19, #16]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_PORT_DEVICE_MGMT_SUP,8,3    ; @IB_PORT_DEVICE_MGMT_SUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%016llx%016llx"

	.comm	_IB_MGMT_CLASS_DEVICE_MGMT,4,2  ; @IB_MGMT_CLASS_DEVICE_MGMT
	.comm	_IB_MGMT_BASE_VERSION,4,2       ; @IB_MGMT_BASE_VERSION
	.comm	_IB_MGMT_METHOD_GET,4,2         ; @IB_MGMT_METHOD_GET
	.comm	_IB_MGMT_METHOD_SET,4,2         ; @IB_MGMT_METHOD_SET
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
	.comm	_srpt_mad_send_handler,4,2      ; @srpt_mad_send_handler
	.comm	_srpt_mad_recv_handler,4,2      ; @srpt_mad_recv_handler
	.no_dead_strip	_srpt_refresh_port
.subsections_via_symbols
