	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resolve_sm_portid              ## -- Begin function resolve_sm_portid
	.p2align	4, 0x90
_resolve_sm_portid:                     ## @resolve_sm_portid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	leaq	-24(%rbp), %rdx
	callq	_umad_get_port
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	-20(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	-24(%rbp), %eax
	movl	%eax, (%rbx)
	leaq	-24(%rbp), %rdi
	callq	_umad_release_port
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %r14d
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resolve_sm_portid              ; -- Begin function resolve_sm_portid
	.p2align	2
_resolve_sm_portid:                     ; @resolve_sm_portid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	cbz	x2, LBB0_3
; %bb.1:
	mov	x19, x2
	add	x2, sp, #8
	bl	_umad_get_port
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	d0, [sp, #8]
	str	d0, [x19]
	add	x0, sp, #8
	bl	_umad_release_port
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
