	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rereg_and_test_port
_rereg_and_test_port:                   ## @rereg_and_test_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	$296, %rsp                      ## imm = 0x128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%edi, %edi
	callq	_htonll
	movl	%eax, -320(%rbp)
	movl	$2242597, %edi                  ## imm = 0x223825
	callq	_htonll
	movl	%eax, -308(%rbp)
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, -328(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	movl	%r13d, -312(%rbp)               ## 4-byte Spill
	movl	%r12d, -316(%rbp)               ## 4-byte Spill
	movq	%r15, -336(%rbp)                ## 8-byte Spill
	movq	-328(%rbp), %r12                ## 8-byte Reload
	addq	$16, %r12
	xorl	%ebx, %ebx
	leaq	-304(%rbp), %r15
	leaq	-308(%rbp), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%r14, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoull
	movl	%eax, -308(%rbp)
	movl	%eax, %edi
	callq	_htonll
	movl	%eax, -308(%rbp)
	leaq	-320(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_memcpy
	movl	-308(%rbp), %eax
	movl	%eax, -16(%r12)
	movq	-8(%r12), %rdi
	movl	$8, %edx
	callq	_memcpy
	movq	$0, (%r12)
	incq	%rbx
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$24, %r12
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	%r14, %rdi
	callq	_fclose
	movl	-312(%rbp), %r12d               ## 4-byte Reload
	movl	%r12d, %edi
	movl	-316(%rbp), %r15d               ## 4-byte Reload
	movl	%r15d, %esi
	movq	-336(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdx
	movq	-328(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rcx
	movl	%ebx, %r8d
	callq	_rereg_send_all
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%ebx, %r8d
	callq	_rereg_recv_all
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%ebx, %r8d
	callq	_rereg_query_all
	movq	%r13, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_8
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_err
LBB0_8:
	movl	$-1, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$296, %rsp                      ## imm = 0x128
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot alloc mem for guid/trid list: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"cannot open %s: %s\n"

	.no_dead_strip	_rereg_and_test_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rereg_and_test_port
_rereg_and_test_port:                   ; @rereg_and_test_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #384
	.cfi_def_cfa_offset 384
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #304]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #320]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #336]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #352]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #368]            ; 16-byte Folded Spill
	add	x29, sp, #368
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	w0, #0
	bl	_htonll
	str	w0, [sp, #20]
	mov	w0, #14373
	movk	w0, #34, lsl #16
	bl	_htonll
	str	w0, [sp, #16]
Lloh3:
	adrp	x25, _MAX_CLIENTS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MAX_CLIENTS@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #24
	bl	_calloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.2:
	mov	x24, x0
	mov	x23, #0
	add	x26, x22, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #24
	mov	w1, #256
	mov	x2, x24
	bl	_fgets
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #24
	mov	x1, #0
	mov	w2, #0
	bl	_strtoull
	str	w0, [sp, #16]
	bl	_htonll
	str	w0, [sp, #16]
	add	x1, sp, #20
	mov	w2, #8
	bl	_memcpy
	add	x1, sp, #16
	mov	w2, #8
	bl	_memcpy
	ldr	w8, [sp, #16]
	stur	w8, [x26, #-8]
	ldr	x0, [x26]
	mov	w2, #8
	bl	_memcpy
	str	xzr, [x26, #8]
	add	x23, x23, #1
	ldrsw	x8, [x25]
	add	x26, x26, #24
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_5:
	mov	x0, x24
	bl	_fclose
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x23
	bl	_rereg_send_all
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x23
	bl	_rereg_recv_all
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x23
	bl	_rereg_query_all
	mov	x0, x22
	bl	_free
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
LBB0_8:
	bl	_err
	mov	w0, #-1
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #368]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #352]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #336]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #320]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #384
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot alloc mem for guid/trid list: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"cannot open %s: %s\n"

	.no_dead_strip	_rereg_and_test_port
.subsections_via_symbols
