	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cma_use_port
_cma_use_port:                          ## @cma_use_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	%rsi, %rdi
	callq	_cma_src_addr
	movl	%eax, %edi
	callq	_cma_port
	movl	%eax, %edi
	callq	_ntohs
	movl	%eax, %ebx
	movq	_IPPORT_RESERVED@GOTPCREL(%rip), %rax
	cmpw	(%rax), %bx
	jae	LBB0_3
## %bb.1:
	movq	_curthread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PRIV_NETINET_BINDANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_priv_check
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movl	4(%r15), %edi
	movzwl	%bx, %r12d
	movl	%r14d, %esi
	movl	%r12d, %edx
	callq	_cma_ps_find
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %rbx
	movl	(%r15), %edx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_cma_check_port
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_cma_bind_port
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cma_alloc_port                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPORT_RESERVED,2,1            ## @IPPORT_RESERVED
	.comm	_curthread,4,2                  ## @curthread
	.comm	_PRIV_NETINET_BINDANY,4,2       ## @PRIV_NETINET_BINDANY
	.comm	_EACCES,4,2                     ## @EACCES
	.no_dead_strip	_cma_use_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cma_use_port
_cma_use_port:                          ; @cma_use_port
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_cma_src_addr
	bl	_cma_port
	bl	_ntohs
	mov	x21, x0
Lloh0:
	adrp	x8, _IPPORT_RESERVED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPPORT_RESERVED@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w0, w8
	b.hs	LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _curthread@GOTPAGE
Lloh3:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _PRIV_NETINET_BINDANY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PRIV_NETINET_BINDANY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_priv_check
	cbz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _EACCES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19, #4]
	mov	x1, x20
	mov	x2, x21
	bl	_cma_ps_find
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	ldr	w2, [x19]
	mov	x1, x19
	bl	_cma_check_port
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x19
	bl	_cma_bind_port
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_cma_alloc_port
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPORT_RESERVED,2,1            ; @IPPORT_RESERVED
	.comm	_curthread,4,2                  ; @curthread
	.comm	_PRIV_NETINET_BINDANY,4,2       ; @PRIV_NETINET_BINDANY
	.comm	_EACCES,4,2                     ; @EACCES
	.no_dead_strip	_cma_use_port
.subsections_via_symbols
