	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_env_init                       ## -- Begin function env_init
	.p2align	4, 0x90
_env_init:                              ## @env_init
	.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
	subq	$328, %rsp                      ## imm = 0x148
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_environ@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	addq	$8, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdi
	addq	$8, %rbx
	testq	%rdi, %rdi
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$61, %esi
	callq	_strchr
	movq	%rax, -312(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$0, (%rax)
	movq	-8(%rbx), %rdi
	movq	-312(%rbp), %r14
	leaq	1(%r14), %rsi
	callq	_env_define
	movq	$0, 8(%rax)
	movb	$61, (%r14)
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_env_find
	testq	%rax, %rax
	je	LBB0_20
## %bb.6:
	movq	%rax, %r15
	movq	(%rax), %rdi
	cmpb	$58, (%rdi)
	je	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movl	$5, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_20
## %bb.8:
	movq	(%r15), %rdi
LBB0_9:
	movl	$58, %esi
	callq	_strchr
	movq	%rax, %r14
	leaq	-304(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_gethostname
	movb	$0, -48(%rbp)
	movq	%rbx, %rdi
	movl	$46, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_18
## %bb.10:
	leaq	-344(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	_AI_CANONNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -328(%rbp)
	leaq	-304(%rbp), %rdi
	leaq	-320(%rbp), %rcx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	jne	LBB0_18
## %bb.11:
	movq	-320(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.14:
	movq	%rdi, %rax
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax)
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_17
LBB0_12:
	xorl	%edi, %edi
	jmp	LBB0_17
LBB0_16:
	movq	(%rdi), %rsi
	leaq	-304(%rbp), %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_strlcpy
	movq	-320(%rbp), %rdi
LBB0_17:
	callq	_freeaddrinfo
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	leaq	-312(%rbp), %rdi
	leaq	-304(%rbp), %rdx
	movq	%r14, %rcx
	callq	_asprintf
	cmpl	$-1, %eax
	je	LBB0_20
## %bb.19:
	movq	(%r15), %rdi
	callq	_free
	movq	-312(%rbp), %rax
	movq	%rax, (%r15)
LBB0_20:
	leaq	L_.str.3(%rip), %rdi
	callq	_env_find
	testq	%rax, %rax
	jne	LBB0_23
## %bb.21:
	leaq	L_.str.4(%rip), %rdi
	callq	_env_find
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	(%rax), %rsi
	leaq	L_.str.3(%rip), %rbx
	movq	%rbx, %rdi
	callq	_env_define
	movq	%rbx, %rdi
	callq	_env_unexport
LBB0_23:
	leaq	L_.str(%rip), %rdi
	callq	_env_export
	leaq	L_.str.5(%rip), %rdi
	callq	_env_export
	leaq	L_.str.6(%rip), %rdi
	callq	_env_export
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	addq	$328, %rsp                      ## imm = 0x148
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_environ,8,3                    ## @environ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DISPLAY"

L_.str.1:                               ## @.str.1
	.asciz	"unix:"

	.comm	_AI_CANONNAME,4,2               ## @AI_CANONNAME
L_.str.2:                               ## @.str.2
	.asciz	"%s%s"

L_.str.3:                               ## @.str.3
	.asciz	"USER"

L_.str.4:                               ## @.str.4
	.asciz	"LOGNAME"

L_.str.5:                               ## @.str.5
	.asciz	"PRINTER"

L_.str.6:                               ## @.str.6
	.asciz	"XAUTHORITY"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_env_init                       ; -- Begin function env_init
	.p2align	2
_env_init:                              ; @env_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _environ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _environ@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x0, [x8]
	cbz	x0, LBB0_5
; %bb.1:
	add	x19, x8, #8
	mov	w20, #61
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19], #8
	cbz	x0, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w1, #61
	bl	_strchr
	str	x0, [sp, #40]
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	strb	wzr, [x0]
	ldur	x0, [x19, #-8]
	ldr	x21, [sp, #40]
	add	x1, x21, #1
	bl	_env_define
	str	xzr, [x0, #8]
	strb	w20, [x21]
	b	LBB0_2
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_env_find
	cbz	x0, LBB0_19
; %bb.6:
	mov	x19, x0
	ldr	x0, [x0]
	ldrb	w8, [x0]
	cmp	w8, #58
	b.eq	LBB0_9
; %bb.7:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #5
	bl	_strncmp
	cbnz	x0, LBB0_19
; %bb.8:
	ldr	x0, [x19]
LBB0_9:
	mov	w1, #58
	bl	_strchr
	mov	x20, x0
	add	x0, sp, #55
	mov	w1, #256
	bl	_gethostname
	strb	wzr, [sp, #311]
	add	x0, sp, #55
	mov	w1, #46
	bl	_strchr
	cbnz	x0, LBB0_17
; %bb.10:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #24
	bl	_memset
Lloh10:
	adrp	x8, _AI_CANONNAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AI_CANONNAME@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	add	x0, sp, #55
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x1, #0
	bl	_getaddrinfo
	cbnz	w0, LBB0_17
; %bb.11:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_16
; %bb.12:
	mov	x8, x0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	cbnz	x9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_13
	b	LBB0_16
LBB0_15:
	ldr	x1, [x0]
	add	x0, sp, #55
	mov	w2, #256
	bl	_strlcpy
	ldr	x0, [sp, #8]
LBB0_16:
	bl	_freeaddrinfo
LBB0_17:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #40
	add	x2, sp, #55
	mov	x3, x20
	bl	_asprintf
	cmn	w0, #1
	b.eq	LBB0_19
; %bb.18:
	ldr	x0, [x19]
	bl	_free
	ldr	x8, [sp, #40]
	str	x8, [x19]
LBB0_19:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_env_find
	cbnz	x0, LBB0_22
; %bb.20:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_env_find
	cbz	x0, LBB0_22
; %bb.21:
	ldr	x1, [x0]
Lloh19:
	adrp	x19, l_.str.3@PAGE
Lloh20:
	add	x19, x19, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_env_define
	mov	x0, x19
	bl	_env_unexport
LBB0_22:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_env_export
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_env_export
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_env_export
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_environ,8,3                    ; @environ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DISPLAY"

l_.str.1:                               ; @.str.1
	.asciz	"unix:"

	.comm	_AI_CANONNAME,4,2               ; @AI_CANONNAME
l_.str.2:                               ; @.str.2
	.asciz	"%s%s"

l_.str.3:                               ; @.str.3
	.asciz	"USER"

l_.str.4:                               ; @.str.4
	.asciz	"LOGNAME"

l_.str.5:                               ; @.str.5
	.asciz	"PRINTER"

l_.str.6:                               ; @.str.6
	.asciz	"XAUTHORITY"

.subsections_via_symbols
