	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rresvport_af                   ## -- Begin function rresvport_af
	.p2align	4, 0x90
_rresvport_af:                          ## @rresvport_af
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%ebx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_1
## %bb.2:
	movl	%ebx, -40(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_socket
	movl	$-1, %r15d
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	%eax, %r12d
	movl	(%r14), %edi
	callq	_htons
	movq	%rax, -40(%rbp)
	movq	_IPPORT_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, (%r14)
	jge	LBB0_7
## %bb.4:
	leaq	-40(%rbp), %rsi
	movl	%r12d, %edi
	movl	$8, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_9
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EADDRINUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_7:
	movl	%ebx, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%r12d, %edi
	callq	_bindresvport_sa
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.8:
	movq	-40(%rbp), %rdi
	callq	_ntohs
	movl	%eax, (%r14)
LBB0_9:
	movl	%r12d, %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_EPFNOSUPPORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$-1, %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EPFNOSUPPORT,8,3               ## @EPFNOSUPPORT
	.comm	_errno,8,3                      ## @errno
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_IPPORT_RESERVED,4,2            ## @IPPORT_RESERVED
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rresvport_af                   ; -- Begin function rresvport_af
	.p2align	2
_rresvport_af:                          ; @rresvport_af
	.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, x1
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	and	w8, w21, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.1:
	str	w21, [sp, #8]
Lloh0:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	w0, [x20]
	bl	_htons
	str	x0, [sp, #8]
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _IPPORT_RESERVED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPPORT_RESERVED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.3:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_bind
	tbz	x0, #63, LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _EADDRINUSE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EADDRINUSE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_5:
	str	w21, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_bindresvport_sa
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.6:
	ldr	x0, [sp, #8]
	bl	_ntohs
	str	w0, [x20]
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _EPFNOSUPPORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPFNOSUPPORT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _errno@GOTPAGE
Lloh16:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh17:
	str	x8, [x9]
LBB0_8:
	mov	w19, #-1
LBB0_9:
	mov	x0, x19
	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
LBB0_10:
	mov	x0, x19
	bl	_close
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EPFNOSUPPORT,8,3               ; @EPFNOSUPPORT
	.comm	_errno,8,3                      ; @errno
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_IPPORT_RESERVED,4,2            ; @IPPORT_RESERVED
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
.subsections_via_symbols
