	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_umad_get_ca_portguids          ## -- Begin function umad_get_ca_portguids
	.p2align	4, 0x90
_umad_get_ca_portguids:                 ## @umad_get_ca_portguids
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_TRACE
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_resolve_ca_name
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	leaq	-56(%rbp), %rsi
	movq	%rax, %rdi
	callq	_umad_get_ca
	testq	%rax, %rax
	js	LBB0_12
## %bb.2:
	xorl	%r13d, %r13d
	testq	%r15, %r15
	je	LBB0_11
## %bb.3:
	movl	-56(%rbp), %ecx
	cmpl	%r12d, %ecx
	jge	LBB0_13
## %bb.4:
	testl	%ecx, %ecx
	js	LBB0_11
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edi, %edi
	callq	_htobe64
	movl	-56(%rbp), %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	leaq	1(%rbx), %r13
	movl	%eax, (%r15,%rbx,4)
	movslq	%ecx, %rax
	cmpq	%rax, %rbx
	movq	%r13, %rbx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	leaq	-56(%rbp), %rdi
	callq	_release_ca
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_DEBUG
	jmp	LBB0_15
LBB0_12:
	movl	$-1, %r13d
	jmp	LBB0_15
LBB0_13:
	leaq	-56(%rbp), %rdi
	callq	_release_ca
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_14:
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$24, %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	"ca name %s max port guids %d"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%s: %d ports"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_umad_get_ca_portguids          ; -- Begin function umad_get_ca_portguids
	.p2align	2
_umad_get_ca_portguids:                 ; @umad_get_ca_portguids
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	mov	x0, x19
	mov	x1, #0
	bl	_resolve_ca_name
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x1, sp
	bl	_umad_get_ca
	tbnz	x0, #63, LBB0_11
; %bb.2:
	cbz	x20, LBB0_12
; %bb.3:
	ldr	w8, [sp]
	cmp	w8, w21
	b.ge	LBB0_14
; %bb.4:
	tbnz	w8, #31, LBB0_12
; %bb.5:
	mov	x22, #0
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #0
	bl	_htobe64
	ldr	w8, [sp]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x22, #1
	str	w0, [x20, x22, lsl #2]
	cmp	x22, w8, sxtw
	mov	x22, x21
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [sp, #8]
	ldr	x9, [x9, x22, lsl #3]
	cbz	x9, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x9]
	b	LBB0_7
LBB0_10:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	mov	w21, #-1
	b	LBB0_16
LBB0_12:
	mov	w21, #0
LBB0_13:
	mov	x0, sp
	bl	_release_ca
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_DEBUG
	b	LBB0_16
LBB0_14:
	mov	x0, sp
	bl	_release_ca
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ca name %s max port guids %d"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%s: %d ports"

.subsections_via_symbols
