	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bind_resv_port                 ## -- Begin function bind_resv_port
	.p2align	4, 0x90
_bind_resv_port:                        ## @bind_resv_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, %rbx
	movl	%edi, %r15d
	leaq	-64(%rbp), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_3
## %bb.2:
	callq	_htons
	movq	%rax, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movl	%r15d, %edi
	movl	$16, %edx
	callq	_bind
	jmp	LBB0_9
LBB0_3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_IPPORT_RESERVED@GOTPCREL(%rip), %r13
	movslq	(%r13), %rbx
	movq	%rbx, %r14
	decq	%r14
	leaq	-64(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_htons
	movq	%rax, -64(%rbp)
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_bind
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	decq	%r14
	decl	%ebx
	cmpl	%ebx, %edx
	jl	LBB0_4
	jmp	LBB0_9
LBB0_6:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_IPPORT_RESERVED,4,2            ## @IPPORT_RESERVED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bind_resv_port                 ; -- Begin function bind_resv_port
	.p2align	2
_bind_resv_port:                        ; @bind_resv_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	x20, x1
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x0, [x20]
	cmp	x0, #1
	b.lt	LBB0_3
; %bb.2:
	bl	_htons
	str	x0, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	b	LBB0_9
LBB0_3:
Lloh3:
	adrp	x22, _IPPORT_RESERVED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _IPPORT_RESERVED@GOTPAGEOFF]
	ldrsw	x23, [x22]
	sub	x21, x23, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_htons
	str	x0, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #16
	bl	_bind
	tbz	w0, #31, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	cmp	w8, #0
	cinc	w8, w8, lt
	sub	x21, x21, #1
	sub	w23, w23, #1
	cmp	w23, w8, asr #1
	b.gt	LBB0_4
	b	LBB0_9
LBB0_6:
	cbz	x20, LBB0_9
; %bb.7:
	cbnz	w0, LBB0_9
; %bb.8:
	str	x21, [x20]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_IPPORT_RESERVED,4,2            ; @IPPORT_RESERVED
.subsections_via_symbols
