	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nat_RedirectPort               ## -- Begin function nat_RedirectPort
	.p2align	4, 0x90
_nat_RedirectPort:                      ## @nat_RedirectPort
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	movslq	4(%rbx), %rcx
	leal	3(%rcx), %eax
	cmpl	%eax, %edx
	je	LBB0_4
## %bb.3:
	leal	4(%rcx), %esi
	movl	$-1, %eax
	cmpl	%esi, %edx
	jne	LBB0_29
LBB0_4:
	movq	8(%rbx), %rax
	movq	(%rax,%rcx,8), %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	16(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_1:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_prompt_Printf
	movl	$1, %eax
	jmp	LBB0_29
LBB0_5:
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
LBB0_6:
	movb	(%rax), %r12b
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movq	8(%rax,%rcx,8), %rdi
	leaq	-112(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-96(%rbp), %rcx
	movq	%r15, %r8
	callq	_StrToAddrAndPort
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movl	16(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_12:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	movq	16(%rax,%rcx,8), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r15, %rcx
	callq	_StrToPortRange
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	16(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_11:
	xorl	%eax, %eax
	callq	_prompt_Printf
	movl	$-1, %eax
LBB0_29:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	4(%rbx), %rax
	leal	4(%rax), %ecx
	cmpl	%ecx, (%rbx)
	jne	LBB0_17
## %bb.15:
	movq	8(%rbx), %rcx
	movq	24(%rcx,%rax,8), %rdi
	leaq	-88(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%r15, %r8
	callq	_StrToAddrAndPort
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	movl	16(%rbx), %edi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_11
LBB0_17:
	movq	%r14, -88(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
LBB0_18:
	leaq	-72(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	callq	_lowhigh
	leaq	-48(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	callq	_lowhigh
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_lowhigh
	movq	-80(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	-96(%rbp), %rcx
	movq	-72(%rbp), %rdi
	subq	%rdi, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_19
## %bb.20:
	movq	-64(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.21:
	subq	-56(%rbp), %rcx
	cmpq	%rax, %rcx
	jne	LBB0_22
LBB0_23:
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movsbl	%r12b, %r14d
	jmp	LBB0_24
LBB0_28:                                ##   in Loop: Header=BB0_24 Depth=1
	movq	-48(%rbp), %rcx
	leaq	1(%rcx), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	cmpq	-80(%rbp), %rcx
	jge	LBB0_29
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	_la@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_htons
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi
	callq	_htons
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi
	callq	_htons
                                        ## kill: def $eax killed $eax def $rax
	movq	-112(%rbp), %rsi
	movq	-88(%rbp), %rcx
	movl	%r15d, %edi
	movl	%r12d, %edx
	movl	%r13d, %r8d
	movq	-104(%rbp), %r9                 ## 8-byte Reload
	pushq	%r14
	pushq	%rax
	callq	_LibAliasRedirectPort
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	-72(%rbp), %rdi
	incq	%rdi
	movq	%rdi, -72(%rbp)
	cmpq	$0, -64(%rbp)
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=1
	incq	-56(%rbp)
	jmp	LBB0_28
LBB0_19:
	movl	16(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_11
LBB0_25:
	movl	16(%rbx), %edi
	movq	-48(%rbp), %rdx
	leaq	L_.str.9(%rip), %rsi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_prompt_Printf
	movl	$1, %eax
	jmp	LBB0_29
LBB0_22:
	movl	16(%rbx), %edi
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Alias not enabled\n"

L_.str.1:                               ## @.str.1
	.asciz	"tcp"

	.comm	_IPPROTO_TCP,1,0                ## @IPPROTO_TCP
L_.str.2:                               ## @.str.2
	.asciz	"udp"

	.comm	_IPPROTO_UDP,1,0                ## @IPPROTO_UDP
L_.str.3:                               ## @.str.3
	.asciz	"port redirect: protocol must be tcp or udp\n"

L_.str.4:                               ## @.str.4
	.asciz	"nat port: error reading localaddr:port\n"

L_.str.5:                               ## @.str.5
	.asciz	"nat port: error reading alias port\n"

	.comm	_INADDR_ANY,8,3                 ## @INADDR_ANY
L_.str.6:                               ## @.str.6
	.asciz	"nat port: error reading remoteaddr:port\n"

L_.str.7:                               ## @.str.7
	.asciz	"nat port: local & alias port ranges are not equal\n"

L_.str.8:                               ## @.str.8
	.asciz	"nat port: local & remote port ranges are not equal\n"

	.comm	_la,4,2                         ## @la
L_.str.9:                               ## @.str.9
	.asciz	"nat port: %d: error %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nat_RedirectPort               ; -- Begin function nat_RedirectPort
	.p2align	2
_nat_RedirectPort:                      ; @nat_RedirectPort
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	ldp	w9, w8, [x19]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	w10, w8, #3
	add	w11, w8, #4
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_14
; %bb.2:
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x8, lsl #3]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.3:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_5:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	bl	_prompt_Printf
	mov	w0, #1
	b	LBB0_15
LBB0_7:
Lloh8:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
LBB0_9:
	ldrb	w22, [x8]
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19, #4]
	add	x8, x8, x9, lsl #3
	ldr	x0, [x8, #8]
	add	x1, sp, #72
	add	x2, sp, #56
	add	x3, sp, #64
	mov	x4, x21
	bl	_StrToAddrAndPort
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x19, #16]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19, #4]
	add	x8, x8, x9, lsl #3
	ldr	x0, [x8, #16]
	add	x1, sp, #40
	add	x2, sp, #48
	mov	x3, x21
	bl	_StrToPortRange
	cbz	w0, LBB0_16
; %bb.12:
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_13:
	bl	_prompt_Printf
LBB0_14:
	mov	w0, #-1
LBB0_15:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_16:
Lloh16:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh18:
	ldr	x20, [x8]
	ldp	w9, w8, [x19]
	add	w10, w8, #4
	cmp	w9, w10
	b.ne	LBB0_19
; %bb.17:
	ldr	x9, [x19, #8]
	add	w8, w8, #3
	ldr	x0, [x9, w8, sxtw #3]
	add	x1, sp, #32
	add	x2, sp, #16
	add	x3, sp, #24
	mov	x4, x21
	bl	_StrToAddrAndPort
	cbz	w0, LBB0_20
; %bb.18:
	ldr	w0, [x19, #16]
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_13
LBB0_19:
	stp	xzr, x20, [sp, #24]
	str	xzr, [sp, #16]
LBB0_20:
	add	x0, sp, #56
	add	x1, sp, #64
	bl	_lowhigh
	add	x0, sp, #40
	add	x1, sp, #48
	bl	_lowhigh
	add	x0, sp, #16
	add	x1, sp, #24
	bl	_lowhigh
	ldp	x9, x8, [sp, #40]
	sub	x9, x8, x9
	ldp	x8, x10, [sp, #56]
	sub	x10, x10, x8
	cmp	x9, x10
	b.ne	LBB0_28
; %bb.21:
	ldr	x10, [sp, #24]
	cbz	x10, LBB0_23
; %bb.22:
	ldr	x11, [sp, #16]
	sub	x10, x10, x11
	cmp	x10, x9
	b.ne	LBB0_29
LBB0_23:
Lloh21:
	adrp	x25, _la@GOTPAGE
Lloh22:
	ldr	x25, [x25, _la@GOTPAGEOFF]
	sxtb	w21, w22
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	mov	w0, #0
	ldr	x9, [sp, #40]
	add	x10, x9, #1
	str	x10, [sp, #40]
	ldr	x10, [sp, #48]
	cmp	x9, x10
	b.ge	LBB0_15
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x25]
	mov	x0, x8
	bl	_htons
	mov	x23, x0
	ldr	x0, [sp, #16]
	bl	_htons
	mov	x24, x0
	ldr	x0, [sp, #40]
	bl	_htons
	mov	x6, x0
	ldr	x1, [sp, #72]
	ldr	x3, [sp, #32]
	mov	x0, x22
	mov	x2, x23
	mov	x4, x24
	mov	x5, x20
	mov	x7, x21
	bl	_LibAliasRedirectPort
	cbz	x0, LBB0_30
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [sp, #56]
	add	x8, x8, #1
	str	x8, [sp, #56]
	ldr	x9, [sp, #24]
	cbz	x9, LBB0_24
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x9, [sp, #16]
	add	x9, x9, #1
	str	x9, [sp, #16]
	b	LBB0_24
LBB0_28:
	ldr	w0, [x19, #16]
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_13
LBB0_29:
	ldr	w0, [x19, #16]
Lloh25:
	adrp	x1, l_.str.8@PAGE
Lloh26:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_13
LBB0_30:
	ldr	w0, [x19, #16]
	ldr	x8, [sp, #40]
	stp	x8, xzr, [sp]
Lloh27:
	adrp	x1, l_.str.9@PAGE
Lloh28:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Alias not enabled\n"

l_.str.1:                               ; @.str.1
	.asciz	"tcp"

	.comm	_IPPROTO_TCP,1,0                ; @IPPROTO_TCP
l_.str.2:                               ; @.str.2
	.asciz	"udp"

	.comm	_IPPROTO_UDP,1,0                ; @IPPROTO_UDP
l_.str.3:                               ; @.str.3
	.asciz	"port redirect: protocol must be tcp or udp\n"

l_.str.4:                               ; @.str.4
	.asciz	"nat port: error reading localaddr:port\n"

l_.str.5:                               ; @.str.5
	.asciz	"nat port: error reading alias port\n"

	.comm	_INADDR_ANY,8,3                 ; @INADDR_ANY
l_.str.6:                               ; @.str.6
	.asciz	"nat port: error reading remoteaddr:port\n"

l_.str.7:                               ; @.str.7
	.asciz	"nat port: local & alias port ranges are not equal\n"

l_.str.8:                               ; @.str.8
	.asciz	"nat port: local & remote port ranges are not equal\n"

	.comm	_la,4,2                         ; @la
l_.str.9:                               ; @.str.9
	.asciz	"nat port: %d: error %d\n"

.subsections_via_symbols
