	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function config_red
_config_red:                            ## @config_red
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	64(%rdi), %rax
	movq	%rax, (%rdi)
	movl	72(%rdi), %eax
	movl	%eax, 8(%rdi)
	leaq	L_.str(%rip), %rdi
	callq	_ND
	movq	96(%r14), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_2
## %bb.1:
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_dn_cfg@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movl	$1, %edi
	callq	_SCALE
	imull	%ebx, %eax
	shll	$3, %eax
	cltd
	idivl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,2), %edi
	jmp	LBB0_3
LBB0_2:
	xorl	%edi, %edi
LBB0_3:
	movq	(%r14), %rsi
	callq	_div64
	movq	_dn_cfg@GOTPCREL(%rip), %r15
	movq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_div64
	testl	%eax, %eax
	movl	$1, %ecx
	cmovel	%ecx, %eax
	movl	%eax, 12(%r14)
	movl	$1, %edi
	callq	_SCALE
	movl	%eax, %r12d
	subl	(%r14), %r12d
	movl	12(%r14), %ebx
	cmpl	$2, %ebx
	jl	LBB0_7
## %bb.4:
	incl	%ebx
	movl	%r12d, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_SCALE_MUL
	decl	%ebx
	cmpl	$2, %ebx
	ja	LBB0_5
## %bb.6:
	movl	%eax, %r12d
LBB0_7:
	movl	%r12d, 16(%r14)
	movl	76(%r14), %edi
	callq	_SCALE
	movl	%eax, 20(%r14)
	movl	80(%r14), %edi
	callq	_SCALE
	movl	%eax, 24(%r14)
	movl	8(%r14), %ebx
	movl	80(%r14), %edi
	cmpl	76(%r14), %edi
	je	LBB0_9
## %bb.8:
	movl	%ebx, %edi
	callq	_SCALE
	movl	76(%r14), %edi
	movl	80(%r14), %ecx
	subl	%edi, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, 28(%r14)
	callq	_SCALE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SCALE_MUL
	movq	%rax, 88(%r14)
	movq	_DN_IS_GENTLE_RED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, 84(%r14)
	je	LBB0_11
## %bb.10:
	movl	$1, %edi
	callq	_SCALE
	subl	8(%r14), %eax
	cltd
	idivl	80(%r14)
	movl	%eax, 32(%r14)
	movl	$1, %edi
	callq	_SCALE
	movl	8(%r14), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %eax
	movl	%eax, 36(%r14)
LBB0_11:
	movq	40(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movq	_M_DUMMYNET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	$0, 40(%r14)
LBB0_13:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.14:
	movl	%edi, 48(%r14)
	shll	$2, %edi
	movq	_M_DUMMYNET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_24
## %bb.15:
	movl	$1, %edi
	callq	_SCALE
                                        ## kill: def $eax killed $eax def $rax
	subl	(%r14), %eax
	movq	40(%r14), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, 48(%r14)
	jl	LBB0_18
## %bb.16:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%r14), %esi
	movl	%eax, %edi
	callq	_SCALE_MUL
	movq	40(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	48(%r14), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_17
LBB0_18:
	movl	(%r15), %eax
	testl	%eax, %eax
	jg	LBB0_20
## %bb.19:
	movl	$512, (%r15)                    ## imm = 0x200
	movl	$512, %eax                      ## imm = 0x200
LBB0_20:
	movl	%eax, 52(%r14)
	movl	16(%r15), %eax
	testl	%eax, %eax
	jg	LBB0_22
## %bb.21:
	movl	$1500, 16(%r15)                 ## imm = 0x5DC
	movl	$1500, %eax                     ## imm = 0x5DC
LBB0_22:
	movl	%eax, 56(%r14)
	leaq	L_.str.3(%rip), %rdi
	callq	_ND
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_23:
	leaq	L_str.4(%rip), %rdi
	callq	_puts
	movq	_DN_IS_RED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rbx), %eax
	notl	%eax
	andl	%eax, 84(%r14)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_24:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_DN_IS_RED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rbx), %eax
	notl	%eax
	andl	%eax, 84(%r14)
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %eax
LBB0_26:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"called"

	.comm	_hz,4,2                         ## @hz
	.comm	_dn_cfg,24,3                    ## @dn_cfg
	.comm	_DN_IS_GENTLE_RED,4,2           ## @DN_IS_GENTLE_RED
	.comm	_M_DUMMYNET,4,2                 ## @M_DUMMYNET
	.comm	_DN_IS_RED,4,2                  ## @DN_IS_RED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.3:                               ## @.str.3
	.asciz	"exit"

L_str:                                  ## @str
	.asciz	"dummynet: sorry, cannot allocate red lookup table"

L_str.4:                                ## @str.4
	.asciz	"\ndummynet: net.inet.ip.dummynet.red_lookup_depthmust be > 0"

	.no_dead_strip	_config_red
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function config_red
_config_red:                            ; @config_red
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #64]
	str	x8, [x0]
	ldr	w8, [x0, #72]
	str	w8, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ND
	ldr	x8, [x19, #96]
	ldr	w20, [x8]
Lloh2:
	adrp	x21, _dn_cfg@GOTPAGE
Lloh3:
	ldr	x21, [x21, _dn_cfg@GOTPAGEOFF]
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _hz@GOTPAGE
Lloh5:
	ldr	x8, [x8, _hz@GOTPAGEOFF]
Lloh6:
	ldr	w22, [x8]
	ldr	w23, [x21]
	mov	w0, #1
	bl	_SCALE
	mul	w8, w22, w23
	mul	w8, w8, w0
	lsl	w8, w8, #3
	sdiv	w8, w8, w20
	add	w0, w8, w8, lsl #1
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldr	x1, [x19]
	bl	_div64
	ldr	x1, [x21, #8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_div64
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	str	w8, [x19, #12]
	mov	w0, #1
	bl	_SCALE
	ldr	w8, [x19]
	sub	w20, w0, w8
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.le	LBB0_7
; %bb.4:
	add	w22, w8, #1
	mov	x0, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x20
	bl	_SCALE_MUL
	sub	w22, w22, #1
	cmp	w22, #2
	b.hi	LBB0_5
; %bb.6:
	mov	x20, x0
LBB0_7:
	str	w20, [x19, #16]
	ldr	w0, [x19, #76]
	bl	_SCALE
	str	w0, [x19, #20]
	ldr	w0, [x19, #80]
	bl	_SCALE
	str	w0, [x19, #24]
	ldp	w8, w0, [x19, #76]
	ldr	w20, [x19, #8]
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_SCALE
	mov	x8, x0
	ldp	w0, w9, [x19, #76]
	sub	w9, w9, w0
	sdiv	w20, w8, w9
LBB0_9:
	str	w20, [x19, #28]
	bl	_SCALE
	mov	x1, x0
	mov	x0, x20
	bl	_SCALE_MUL
	str	x0, [x19, #88]
	ldr	w8, [x19, #84]
Lloh7:
	adrp	x20, _DN_IS_GENTLE_RED@GOTPAGE
Lloh8:
	ldr	x20, [x20, _DN_IS_GENTLE_RED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	w0, #1
	bl	_SCALE
	ldr	w8, [x19, #8]
	sub	w8, w0, w8
	ldr	w9, [x19, #80]
	sdiv	w8, w8, w9
	str	w8, [x19, #32]
	mov	w0, #1
	bl	_SCALE
	ldr	w8, [x19, #8]
	sub	w8, w0, w8, lsl #1
	str	w8, [x19, #36]
LBB0_11:
	ldr	x0, [x19, #40]
Lloh9:
	adrp	x22, _M_DUMMYNET@GOTPAGE
Lloh10:
	ldr	x22, [x22, _M_DUMMYNET@GOTPAGEOFF]
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w1, [x22]
	bl	_free
	str	xzr, [x19, #40]
LBB0_13:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_23
; %bb.14:
	str	w8, [x19, #48]
	lsl	w0, w8, #2
	ldr	w1, [x22]
Lloh11:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_malloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_24
; %bb.15:
	mov	w0, #1
	bl	_SCALE
	ldr	w8, [x19]
	sub	w0, w0, w8
	ldr	x8, [x19, #40]
	str	w0, [x8]
	ldr	w8, [x19, #48]
	cmp	w8, #1
	b.le	LBB0_18
; %bb.16:
	mov	w20, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #16]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_SCALE_MUL
	ldr	x8, [x19, #40]
	str	w0, [x8, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x19, #48]
	cmp	x20, x8
	b.lt	LBB0_17
LBB0_18:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ge	LBB0_20
; %bb.19:
	mov	w8, #512
	str	w8, [x21]
LBB0_20:
	str	w8, [x19, #52]
	ldr	w8, [x21, #16]
	cmp	w8, #0
	b.gt	LBB0_22
; %bb.21:
	mov	w8, #1500
	str	w8, [x21, #16]
LBB0_22:
	str	w8, [x19, #56]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ND
	mov	w0, #0
	b	LBB0_26
LBB0_23:
Lloh16:
	adrp	x0, l_str.4@PAGE
Lloh17:
	add	x0, x0, l_str.4@PAGEOFF
	bl	_puts
Lloh18:
	adrp	x8, _DN_IS_RED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DN_IS_RED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x19, #84]
	ldr	w10, [x20]
	orr	w8, w8, w10
	bic	w8, w9, w8
	str	w8, [x19, #84]
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:
Lloh23:
	adrp	x0, l_str@PAGE
Lloh24:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh25:
	adrp	x8, _DN_IS_RED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DN_IS_RED@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x19, #84]
	ldr	w10, [x20]
	orr	w8, w8, w10
	bic	w8, w9, w8
	str	w8, [x19, #84]
Lloh28:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_25:
	ldr	w0, [x8]
LBB0_26:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"called"

	.comm	_hz,4,2                         ; @hz
	.comm	_dn_cfg,24,3                    ; @dn_cfg
	.comm	_DN_IS_GENTLE_RED,4,2           ; @DN_IS_GENTLE_RED
	.comm	_M_DUMMYNET,4,2                 ; @M_DUMMYNET
	.comm	_DN_IS_RED,4,2                  ; @DN_IS_RED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.3:                               ; @.str.3
	.asciz	"exit"

l_str:                                  ; @str
	.asciz	"dummynet: sorry, cannot allocate red lookup table"

l_str.4:                                ; @str.4
	.asciz	"\ndummynet: net.inet.ip.dummynet.red_lookup_depthmust be > 0"

	.no_dead_strip	_config_red
.subsections_via_symbols
