	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mingw_putenv                   ## -- Begin function mingw_putenv
	.p2align	4, 0x90
_mingw_putenv:                          ## @mingw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	cmpb	$0, (%rdi)
	je	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %r15d
	incl	%r15d
	movl	%r15d, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_die
LBB0_4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_xutftowcs
	movq	%r14, %rdi
	movl	$61, %esi
	callq	_wcschr
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	$0, (%rax)
	addq	$4, %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
LBB0_7:
	callq	_SetEnvironmentVariableW
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_free
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %edi
	callq	_err_win_to_posix
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	sbbl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory, (tried to allocate %u wchar_t's)"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mingw_putenv                   ; -- Begin function mingw_putenv
	.p2align	2
_mingw_putenv:                          ; @mingw_putenv
	.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
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_9
; %bb.2:
	mov	x0, x20
	bl	_strlen
	mov	w21, #1
	bfi	w21, w0, #1, #31
	mov	x0, x21
	mov	w1, #4
	bl	_calloc
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_die
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_xutftowcs
	mov	x0, x19
	mov	w1, #61
	bl	_wcschr
	mov	x1, x0
	cbz	x0, LBB0_6
; %bb.5:
	str	wzr, [x1], #4
LBB0_6:
	mov	x0, x19
	bl	_SetEnvironmentVariableW
	mov	x20, x0
	mov	x0, x19
	bl	_free
	cbnz	x20, LBB0_8
; %bb.7:
	bl	_GetLastError
	bl	_err_win_to_posix
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
LBB0_8:
	cmp	x20, #0
	csetm	w0, eq
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory, (tried to allocate %u wchar_t's)"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
