	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rebuild_environ
___rebuild_environ:                     ## @__rebuild_environ
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_environSize@GOTPCREL(%rip), %r14
	cmpl	%edi, (%r14)
	jge	LBB0_4
## %bb.1:
	movq	_intEnviron@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	leal	(%rbx,%rbx), %esi
	incl	%esi
	movl	$8, %edx
	callq	_reallocarray
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leal	(%rbx,%rbx), %ecx
	movl	%ecx, (%r14)
	movq	%rax, (%r15)
LBB0_4:
	movq	_envActive@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_envVarsTotal@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	movl	$0, %edx
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.5:
	incq	%rcx
	xorl	%edx, %edx
	movq	_envVars@GOTPCREL(%rip), %r9
	movq	_intEnviron@GOTPCREL(%rip), %r8
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	decq	%rcx
	cmpq	$1, %rcx
	jbe	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rcx), %ebx
	movq	(%r9), %rdi
	shlq	$4, %rbx
	cmpq	$0, 8(%rdi,%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rdi,%rbx), %rdi
	movq	(%r8), %rbx
	movslq	%edx, %rsi
	incl	%edx
	movq	%rdi, (%rbx,%rsi,8)
	jmp	LBB0_8
LBB0_9:
	movq	_intEnviron@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movslq	%edx, %rdx
	movq	$0, (%rsi,%rdx,8)
	movq	(%rcx), %rcx
	movq	_environ@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	jmp	LBB0_10
LBB0_2:
	movl	$-1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_environSize,4,2                ## @environSize
	.comm	_intEnviron,8,3                 ## @intEnviron
	.comm	_envActive,4,2                  ## @envActive
	.comm	_envVarsTotal,4,2               ## @envVarsTotal
	.comm	_envVars,8,3                    ## @envVars
	.comm	_environ,8,3                    ## @environ
	.no_dead_strip	___rebuild_environ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rebuild_environ
___rebuild_environ:                     ; @__rebuild_environ
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _environSize@GOTPAGE
Lloh1:
	ldr	x21, [x21, _environSize@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x20, _intEnviron@GOTPAGE
Lloh3:
	ldr	x20, [x20, _intEnviron@GOTPAGEOFF]
	cmp	w8, w0
	b.ge	LBB0_3
; %bb.1:
	ldr	x0, [x20]
	mov	w1, #1
	bfi	w1, w19, #1, #31
	mov	w2, #8
	bl	_reallocarray
	cbz	x0, LBB0_10
; %bb.2:
	lsl	w8, w19, #1
	str	w8, [x21]
	str	x0, [x20]
LBB0_3:
Lloh4:
	adrp	x8, _envActive@GOTPAGE
Lloh5:
	ldr	x8, [x8, _envActive@GOTPAGEOFF]
Lloh6:
	str	w19, [x8]
Lloh7:
	adrp	x8, _envVarsTotal@GOTPAGE
Lloh8:
	ldr	x8, [x8, _envVarsTotal@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w8, #0
	add	x9, x9, #1
Lloh10:
	adrp	x10, _envVars@GOTPAGE
Lloh11:
	ldr	x10, [x10, _envVars@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	x9, x9, #1
	cmp	x9, #1
	b.ls	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w11, w9, #2
	ldr	x12, [x10]
	add	x13, x12, w11, uxtw #4
	ldr	x13, [x13, #8]
	cbz	x13, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsl	x11, x11, #4
	ldr	x11, [x12, x11]
	ldr	x12, [x20]
	str	x11, [x12, w8, sxtw #3]
	add	w8, w8, #1
	b	LBB0_5
LBB0_8:
	mov	w8, #0
LBB0_9:
	mov	w0, #0
	ldr	x9, [x20]
	str	xzr, [x9, w8, sxtw #3]
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _environ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _environ@GOTPAGEOFF]
Lloh14:
	str	x8, [x9]
	b	LBB0_11
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_environSize,4,2                ; @environSize
	.comm	_intEnviron,8,3                 ; @intEnviron
	.comm	_envActive,4,2                  ; @envActive
	.comm	_envVarsTotal,4,2               ; @envVarsTotal
	.comm	_envVars,8,3                    ; @envVars
	.comm	_environ,8,3                    ; @environ
	.no_dead_strip	___rebuild_environ
.subsections_via_symbols
