	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_putenv                         ## -- Begin function putenv
	.p2align	4, 0x90
_putenv:                                ## @putenv
	.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_3
## %bb.1:
	movq	%rdi, %r12
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rbx
	subq	%r12, %rbx
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	___merge_environ
	movl	$-1, %r14d
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.5:
	movq	_envVars@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	___build_env
	cmpl	$-1, %eax
	je	LBB0_14
LBB0_7:
	movq	_envVarsTotal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movl	%eax, -44(%rbp)
	movq	_envActive@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	___findenv
	movq	_envVars@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	(%rbx), %rax
	movslq	-44(%rbp), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	cmpl	$0, (%rax,%rcx,8)
	je	LBB0_10
## %bb.9:
	movq	%r12, 8(%rax,%rcx,8)
	movl	(%r13), %edi
	jmp	LBB0_13
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	decl	%r15d
	movl	$0, 16(%rax,%rcx,8)
LBB0_11:
	movq	_envVarsTotal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	xorl	%eax, %eax
	callq	___enlarge_env
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movq	(%rbx), %rax
	movslq	-44(%rbp), %rcx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	%r12, 8(%rax,%rcx)
	movq	(%rbx), %rax
	movl	$-1, 20(%rax,%rcx)
	movslq	-44(%rbp), %rcx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	$0, 32(%rax,%rcx)
	movq	(%rbx), %rax
	movl	$-1, 24(%rax,%rcx)
	movslq	-44(%rbp), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movl	$1, (%rax,%rcx,8)
	movslq	-44(%rbp), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movl	$1, 16(%rax,%rcx,8)
	incl	%r15d
	movl	%r15d, %edi
LBB0_13:
	callq	___rebuild_environ
	movl	%eax, %r14d
	jmp	LBB0_14
	.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	_putenv                         ; -- Begin function putenv
	.p2align	2
_putenv:                                ; @putenv
	.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_9
; %bb.1:
	mov	x19, x0
	mov	w1, #61
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.2:
	subs	x20, x0, x19
	b.eq	LBB0_9
; %bb.3:
	bl	___merge_environ
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
Lloh0:
	adrp	x21, _envVars@GOTPAGE
Lloh1:
	ldr	x21, [x21, _envVars@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_6
; %bb.5:
	bl	___build_env
	cmn	w0, #1
	b.eq	LBB0_10
LBB0_6:
Lloh2:
	adrp	x23, _envVarsTotal@GOTPAGE
Lloh3:
	ldr	x23, [x23, _envVarsTotal@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w8, w8, #1
	str	w8, [sp, #12]
Lloh4:
	adrp	x24, _envActive@GOTPAGE
Lloh5:
	ldr	x24, [x24, _envActive@GOTPAGEOFF]
	ldr	w22, [x24]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	___findenv
	cbz	x0, LBB0_12
; %bb.7:
	ldr	x8, [x21]
	ldrsw	x9, [sp, #12]
	mov	w10, #40
	mul	x10, x9, x10
	ldr	w10, [x8, x10]
	cbz	w10, LBB0_11
; %bb.8:
	mov	w10, #40
	madd	x8, x9, x10, x8
	str	x19, [x8, #8]
	ldr	w0, [x24]
	b	LBB0_14
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _errno@GOTPAGE
Lloh10:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	mov	w0, #-1
LBB0_10:
	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
LBB0_11:
	sub	w22, w22, #1
	mov	w10, #40
	madd	x8, x9, x10, x8
	str	wzr, [x8, #16]
LBB0_12:
	ldr	w8, [x23]
	str	w8, [sp, #12]
	bl	___enlarge_env
	mov	x8, x0
	mov	w0, #-1
	cbz	w8, LBB0_10
; %bb.13:
	ldr	x8, [x21]
	ldrsw	x9, [sp, #12]
	add	x9, x9, x9, lsl #2
	lsl	x9, x9, #3
	add	x8, x8, x9
	str	x19, [x8, #8]
	ldr	x8, [x21]
	add	x9, x8, x9
	str	w0, [x9, #20]
	ldrsw	x9, [sp, #12]
	add	x9, x9, x9, lsl #2
	lsl	x9, x9, #3
	add	x8, x8, x9
	str	xzr, [x8, #32]
	ldr	x8, [x21]
	add	x9, x8, x9
	str	w0, [x9, #24]
	ldrsw	x9, [sp, #12]
	mov	w10, #40
	mul	x9, x9, x10
	mov	w11, #1
	str	w11, [x8, x9]
	ldrsw	x9, [sp, #12]
	madd	x8, x9, x10, x8
	str	w11, [x8, #16]
	add	w0, w22, #1
LBB0_14:
	bl	___rebuild_environ
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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
