	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inetresport
_inetresport:                           ## @inetresport
	.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	%edi, %ebx
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -48(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r15d
	movl	$-1, %eax
	testl	%r15d, %r15d
	js	LBB0_9
## %bb.1:
	movq	_IPPORT_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %ebx
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	incl	%ecx
	cmpl	%ecx, %ebx
	jle	LBB0_7
## %bb.2:
	leaq	-56(%rbp), %r12
	movq	_errno@GOTPCREL(%rip), %r14
	movq	_EADDRINUSE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_htons
	movl	%eax, -56(%rbp)
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	$12, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_IPPORT_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%ebx
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	incl	%ecx
	cmpl	%ecx, %ebx
	jg	LBB0_3
LBB0_7:
	movl	%r15d, %edi
	callq	_close
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_8
LBB0_4:
	movl	%r15d, %eax
	jmp	LBB0_9
LBB0_10:
	movl	%r15d, %edi
	callq	_close
LBB0_8:
	movl	$-1, %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	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_IPPORT_RESERVED,4,2            ## @IPPORT_RESERVED
	.comm	_errno,8,3                      ## @errno
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.no_dead_strip	_inetresport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inetresport
_inetresport:                           ; @inetresport
	.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	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #4]
	mov	x1, x19
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x21, _IPPORT_RESERVED@GOTPAGE
Lloh7:
	ldr	x21, [x21, _IPPORT_RESERVED@GOTPAGEOFF]
	ldr	w8, [x21]
	sub	w20, w8, #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	add	w8, w8, #1
Lloh8:
	adrp	x22, _errno@GOTPAGE
Lloh9:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	cmp	w20, w8
	b.le	LBB0_6
; %bb.2:
Lloh10:
	adrp	x23, _EADDRINUSE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _EADDRINUSE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_htons
	str	w0, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #12
	bl	_bind
	tbz	x0, #63, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	sub	w20, w20, #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	add	w8, w8, #1
	cmp	w20, w8
	b.gt	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_close
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x22]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_close
LBB0_8:
	mov	w19, #-1
LBB0_9:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_IPPORT_RESERVED,4,2            ; @IPPORT_RESERVED
	.comm	_errno,8,3                      ; @errno
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.no_dead_strip	_inetresport
.subsections_via_symbols
