	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nf_nat_proto_unique_tuple      ## -- Begin function nf_nat_proto_unique_tuple
	.p2align	4, 0x90
_nf_nat_proto_unique_tuple:             ## @nf_nat_proto_unique_tuple
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_IP_NAT_MANIP_SRC@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	%edx, (%rax)
	setne	%r12b
	shlq	$3, %r12
	movq	_IP_NAT_RANGE_PROTO_SPECIFIED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_1
## %bb.5:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edi
	callq	_ntohs
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	callq	_ntohs
	movl	%eax, %r12d
	subl	%r13d, %r12d
	incl	%r12d
LBB0_6:
	movq	_IP_NAT_RANGE_PROTO_RANDOM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	movl	4(%r15), %edi
	movl	12(%r15), %esi
	xorl	%eax, %eax
	movq	_IP_NAT_MANIP_SRC@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	sete	%al
	movl	(%r15,%rax,8), %edx
	callq	_secure_ipv4_port_ephemeral
	movl	%eax, %ebx
	testl	%r12d, %r12d
	jne	LBB0_10
	jmp	LBB0_15
LBB0_1:
	movq	_IP_NAT_MANIP_DST@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%r14d, (%rcx)
	je	LBB0_16
## %bb.2:
	movl	(%r15,%r12), %edi
	callq	_ntohs
	cmpl	$1023, %eax                     ## imm = 0x3FF
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	ja	LBB0_3
## %bb.4:
	movl	(%r15,%r12), %edi
	callq	_ntohs
	cmpl	$512, %eax                      ## imm = 0x200
	movl	$511, %eax                      ## imm = 0x1FF
	movl	$424, %r12d                     ## imm = 0x1A8
	cmovbl	%eax, %r12d
	movl	$1, %eax
	movl	$600, %r13d                     ## imm = 0x258
	cmovbl	%eax, %r13d
	jmp	LBB0_6
LBB0_8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	testl	%r12d, %r12d
	je	LBB0_15
LBB0_10:
	movl	%r12d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $edx killed $edx def $rdx
	leal	(%rdx,%r13), %edi
	callq	_htons
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%r15,%rcx)
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_nf_nat_used_tuple
	testq	%rax, %rax
	je	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	%ebx
	decl	%r14d
	jne	LBB0_11
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_12:
	movq	_IP_NAT_RANGE_PROTO_RANDOM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	testl	%ecx, (%rdx)
	jne	LBB0_16
## %bb.13:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx)
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$1024, %r13d                    ## imm = 0x400
	movl	$64512, %r12d                   ## imm = 0xFC00
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_IP_NAT_MANIP_SRC,4,2           ## @IP_NAT_MANIP_SRC
	.comm	_IP_NAT_RANGE_PROTO_SPECIFIED,4,2 ## @IP_NAT_RANGE_PROTO_SPECIFIED
	.comm	_IP_NAT_MANIP_DST,4,2           ## @IP_NAT_MANIP_DST
	.comm	_IP_NAT_RANGE_PROTO_RANDOM,4,2  ## @IP_NAT_RANGE_PROTO_RANDOM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nf_nat_proto_unique_tuple      ; -- Begin function nf_nat_proto_unique_tuple
	.p2align	2
_nf_nat_proto_unique_tuple:             ; @nf_nat_proto_unique_tuple
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x20, x3
	mov	x24, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x26, _IP_NAT_MANIP_SRC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _IP_NAT_MANIP_SRC@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w9, w2
	cset	w9, ne
	lsl	x25, x9, #3
Lloh2:
	adrp	x9, _IP_NAT_RANGE_PROTO_SPECIFIED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IP_NAT_RANGE_PROTO_SPECIFIED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w0, [x21, #8]
	bl	_ntohs
	mov	x23, x0
	ldr	w0, [x21, #4]
	bl	_ntohs
	sub	w8, w0, w23
	add	w27, w8, #1
LBB0_2:
	ldr	w8, [x21]
Lloh5:
	adrp	x28, _IP_NAT_RANGE_PROTO_RANDOM@GOTPAGE
Lloh6:
	ldr	x28, [x28, _IP_NAT_RANGE_PROTO_RANDOM@GOTPAGEOFF]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
	ldr	w0, [x22, #4]
	ldr	w1, [x22, #12]
	ldr	w8, [x26]
	cmp	w8, w24
	cset	w8, eq
	lsl	x8, x8, #3
	ldr	w2, [x22, x8]
	bl	_secure_ipv4_port_ephemeral
	mov	x24, x0
	cbnz	w27, LBB0_8
	b	LBB0_11
LBB0_4:
Lloh7:
	adrp	x8, _IP_NAT_MANIP_DST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IP_NAT_MANIP_DST@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w24
	b.eq	LBB0_11
; %bb.5:
	ldr	w0, [x22, x25]
	bl	_ntohs
	cmp	w0, #1023
	b.hi	LBB0_15
; %bb.6:
	ldr	w0, [x22, x25]
	bl	_ntohs
	mov	w8, #424
	mov	w9, #511
	cmp	w0, #512
	csel	w27, w9, w8, lo
	mov	w8, #600
	csinc	w23, w8, wzr, hs
	b	LBB0_2
LBB0_7:
	ldr	w24, [x19]
	cbz	w27, LBB0_11
LBB0_8:
	mov	x26, x27
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	udiv	w8, w24, w27
	msub	w8, w8, w27, w24
	add	w0, w8, w23
	bl	_htons
	str	w0, [x22, x25]
	mov	x0, x22
	mov	x1, x20
	bl	_nf_nat_used_tuple
	cbz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w24, w24, #1
	subs	w26, w26, #1
	b.ne	LBB0_9
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w8, [x21]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.14:
	mov	w0, #1
	b	LBB0_12
LBB0_15:
	mov	w23, #1024
	mov	w27, #64512
	b	LBB0_2
LBB0_16:
	str	w24, [x19]
	mov	w0, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IP_NAT_MANIP_SRC,4,2           ; @IP_NAT_MANIP_SRC
	.comm	_IP_NAT_RANGE_PROTO_SPECIFIED,4,2 ; @IP_NAT_RANGE_PROTO_SPECIFIED
	.comm	_IP_NAT_MANIP_DST,4,2           ; @IP_NAT_MANIP_DST
	.comm	_IP_NAT_RANGE_PROTO_RANDOM,4,2  ; @IP_NAT_RANGE_PROTO_RANDOM
.subsections_via_symbols
