	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resolve_ca_port
_resolve_ca_port:                       ## @resolve_ca_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_umad_get_ca
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	cmpl	$2, -56(%rbp)
	jne	LBB0_4
## %bb.3:
	movl	$0, (%r14)
LBB0_30:
	movl	$1, %r15d
	jmp	LBB0_31
LBB0_1:
	movl	$-1, %r15d
	jmp	LBB0_32
LBB0_4:
	movl	(%r14), %eax
	movl	-52(%rbp), %ecx
	movl	$-1, %r15d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.22:
	cmpl	%ecx, %eax
	jg	LBB0_31
## %bb.23:
	movq	-48(%rbp), %rcx
	movq	(%rcx,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_31
## %bb.24:
	movl	8(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	-48(%rbp), %rax
	movslq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	8(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_31
LBB0_26:
	movq	-48(%rbp), %rax
	movslq	(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	$1, %r15d
	cmpl	$4, (%rax)
	je	LBB0_31
## %bb.27:
	xorl	%r15d, %r15d
	cmpl	$3, 4(%rax)
	sete	%r15b
	negl	%r15d
	jmp	LBB0_31
LBB0_5:
	testl	%ecx, %ecx
	js	LBB0_31
## %bb.6:
	xorl	%ebx, %ebx
	leaq	L_.str.3(%rip), %r12
	leaq	L_.str.1(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rax
	testl	%r15d, %r15d
	js	LBB0_11
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$4, (%rax)
	je	LBB0_29
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	1(%rbx), %rcx
	movslq	-52(%rbp), %rax
	cmpq	%rax, %rbx
	movq	%rcx, %rbx
	jge	LBB0_15
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_DEBUG
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%rax), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rax
	movl	8(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_14
	jmp	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$5, 4(%rax)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, (%r14)
	movl	%ebx, %r15d
	jmp	LBB0_13
LBB0_15:
	cmpl	$-1, %r15d
	je	LBB0_16
LBB0_21:
	sarl	$31, %r15d
LBB0_31:
	leaq	-56(%rbp), %rdi
	callq	_release_ca
LBB0_32:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	movl	%ebx, (%r14)
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	callq	_DEBUG
	jmp	LBB0_30
LBB0_16:
	movl	$-1, %r15d
	testl	%eax, %eax
	js	LBB0_31
## %bb.17:
	xorl	%ebx, %ebx
	leaq	L_.str.3(%rip), %r12
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	1(%rbx), %rax
	movslq	-52(%rbp), %rcx
	cmpq	%rcx, %rbx
	movq	%rax, %rbx
	jge	LBB0_31
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_DEBUG
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$3, 4(%rax)
	je	LBB0_28
## %bb.20:
	movl	%ebx, (%r14)
	movl	%ebx, %r15d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"checking ca '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"InfiniBand"

L_.str.2:                               ## @.str.2
	.asciz	"IB"

L_.str.3:                               ## @.str.3
	.asciz	"checking port %d"

L_.str.4:                               ## @.str.4
	.asciz	"found active port %d"

	.no_dead_strip	_resolve_ca_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resolve_ca_port
_resolve_ca_port:                       ; @resolve_ca_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	mov	x1, sp
	mov	x0, x20
	bl	_umad_get_ca
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	w8, [sp]
	cmp	w8, #2
	b.ne	LBB0_5
; %bb.2:
	str	wzr, [x19]
LBB0_3:
	mov	w21, #1
	b	LBB0_32
LBB0_4:
	mov	w21, #-1
	b	LBB0_33
LBB0_5:
	ldr	w8, [x19]
	ldr	w9, [sp, #4]
	cmp	w8, #0
	b.le	LBB0_12
; %bb.6:
	cmp	w8, w9
	b.gt	LBB0_31
; %bb.7:
	ldr	x9, [sp, #8]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_31
; %bb.8:
	ldr	w0, [x8, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [sp, #8]
	ldrsw	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8, #8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_31
LBB0_10:
	ldr	x8, [sp, #8]
	ldrsw	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [x8]
	cmp	w9, #4
	b.eq	LBB0_3
; %bb.11:
	ldr	w8, [x8, #4]
	cmp	w8, #3
	csetm	w21, eq
	b	LBB0_32
LBB0_12:
	tbnz	w9, #31, LBB0_31
; %bb.13:
	mov	x21, #0
	mov	w20, #-1
Lloh6:
	adrp	x22, l_.str.3@PAGE
Lloh7:
	add	x22, x22, l_.str.3@PAGEOFF
Lloh8:
	adrp	x23, l_.str.1@PAGE
Lloh9:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh10:
	adrp	x24, l_.str.2@PAGE
Lloh11:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [sp, #8]
	ldr	x8, [x8, x21, lsl #3]
	tbnz	w20, #31, LBB0_20
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x8]
	cmp	w8, #4
	b.eq	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x9, x21, #1
	ldrsw	x8, [sp, #4]
	cmp	x21, x8
	mov	x21, x9
	b.ge	LBB0_22
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_DEBUG
	ldr	x8, [sp, #8]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x8, #8]
	mov	x1, x23
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [sp, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w0, [x8, #8]
	mov	x1, x24
	bl	_strcmp
	cbnz	x0, LBB0_16
	b	LBB0_14
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w9, [x8, #4]
	cmp	w9, #5
	b.ne	LBB0_15
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=1
	str	w21, [x19]
	mov	x20, x21
	b	LBB0_15
LBB0_22:
	cmn	w20, #1
	b.eq	LBB0_25
LBB0_23:
	asr	w21, w20, #31
	b	LBB0_32
LBB0_24:
	str	w21, [x19]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_DEBUG
	b	LBB0_3
LBB0_25:
	tbnz	w8, #31, LBB0_31
; %bb.26:
	mov	x20, #0
Lloh14:
	adrp	x22, l_.str.3@PAGE
Lloh15:
	add	x22, x22, l_.str.3@PAGEOFF
	mov	w21, #-1
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	add	x8, x20, #1
	ldrsw	x9, [sp, #4]
	cmp	x20, x9
	mov	x20, x8
	b.ge	LBB0_32
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_DEBUG
	ldr	x8, [sp, #8]
	ldr	x8, [x8, x20, lsl #3]
	cbz	x8, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x8, #4]
	cmp	w8, #3
	b.eq	LBB0_27
; %bb.30:
	str	w20, [x19]
	b	LBB0_23
LBB0_31:
	mov	w21, #-1
LBB0_32:
	mov	x0, sp
	bl	_release_ca
LBB0_33:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"checking ca '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"InfiniBand"

l_.str.2:                               ; @.str.2
	.asciz	"IB"

l_.str.3:                               ; @.str.3
	.asciz	"checking port %d"

l_.str.4:                               ; @.str.4
	.asciz	"found active port %d"

	.no_dead_strip	_resolve_ca_port
.subsections_via_symbols
