	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unsetenv                       ## -- Begin function unsetenv
	.p2align	4, 0x90
_unsetenv:                              ## @unsetenv
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	callq	___strleneq
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	___merge_environ
	movl	$-1, %r12d
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.4:
	movq	_envVars@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	___build_env
	cmpl	$-1, %eax
	je	LBB0_13
LBB0_6:
	movq	_envVarsTotal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movl	%eax, -44(%rbp)
	movq	_envActive@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	___findenv
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	leaq	-44(%rbp), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	decl	%edi
	movl	%edi, -44(%rbp)
	decl	%ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	___findenv
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movslq	-44(%rbp), %rcx
	shlq	$4, %rcx
	movl	$0, (%rax,%rcx)
	movslq	-44(%rbp), %rdi
	movq	%rdi, %rcx
	shlq	$4, %rcx
	cmpq	$0, 8(%rax,%rcx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	___remove_putenv
	movl	-44(%rbp), %edi
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r12d, %r12d
	movq	_envActive@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_13
## %bb.12:
	movl	%ebx, %edi
	callq	___rebuild_environ
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_envVars,8,3                    ## @envVars
	.comm	_envVarsTotal,4,2               ## @envVarsTotal
	.comm	_envActive,4,2                  ## @envActive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unsetenv                       ; -- Begin function unsetenv
	.p2align	2
_unsetenv:                              ; @unsetenv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	bl	___strleneq
	cbz	x0, LBB0_10
; %bb.2:
	mov	x20, x0
	bl	___merge_environ
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.3:
Lloh0:
	adrp	x22, _envVars@GOTPAGE
Lloh1:
	ldr	x22, [x22, _envVars@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_5
; %bb.4:
	bl	___build_env
	cmn	w0, #1
	b.eq	LBB0_14
LBB0_5:
Lloh2:
	adrp	x8, _envVarsTotal@GOTPAGE
Lloh3:
	ldr	x8, [x8, _envVarsTotal@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	sub	w8, w8, #1
	str	w8, [sp, #12]
Lloh5:
	adrp	x23, _envActive@GOTPAGE
Lloh6:
	ldr	x23, [x23, _envActive@GOTPAGEOFF]
	ldr	w21, [x23]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	sub	w8, w0, #1
	str	w8, [sp, #12]
	sub	w21, w21, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	___findenv
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	ldrsw	x9, [sp, #12]
	lsl	x9, x9, #4
	str	wzr, [x8, x9]
	ldrsw	x0, [sp, #12]
	add	x8, x8, x0, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	___remove_putenv
	ldr	w0, [sp, #12]
	b	LBB0_6
LBB0_10:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _errno@GOTPAGE
Lloh11:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_14
LBB0_11:
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x21
	bl	___rebuild_environ
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_envVars,8,3                    ; @envVars
	.comm	_envVarsTotal,4,2               ; @envVarsTotal
	.comm	_envActive,4,2                  ; @envActive
.subsections_via_symbols
