	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	$0, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_make_file
	movq	_s1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_write_file
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_read_environment
	xorl	%r14d, %r14d
	cmpl	$3, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_warnx
	movl	$1, %r14d
LBB0_2:
	movq	_s2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_write_file
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_read_environment
	cmpl	$1, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_warnx
	incl	%r14d
LBB0_4:
	movq	%r15, %rdi
	callq	_unlink
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_read_environment
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_warnx
	incl	%r14d
LBB0_6:
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	testq	%rdi, %rdi
	je	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdi,%rsi,8)
	leaq	1(%rsi), %rsi
	jne	LBB0_7
## %bb.8:
	cmpl	$4, %esi
	je	LBB0_11
## %bb.9:
	decq	%rsi
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_warnx
	incl	%r14d
	movq	-48(%rbp), %rdi
LBB0_11:
	callq	_free_environment
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r14d, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_s1,4,2                         ## @s1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test 1: variable count %d != 3"

	.comm	_s2,4,2                         ## @s2
L_.str.1:                               ## @.str.1
	.asciz	"test 2: variable count %d != 1"

L_.str.2:                               ## @.str.2
	.asciz	"test 3: variable count %d != 0"

L_.str.3:                               ## @.str.3
	.asciz	"total variable count %d != 3"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	sub	sp, sp, #16
	mov	x21, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	stur	xzr, [x29, #-48]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_make_file
Lloh8:
	adrp	x8, _s1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _s1@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_write_file
	sub	x1, x29, #48
	mov	x0, x20
	bl	_read_environment
	cmp	w0, #3
	b.ne	LBB0_2
; %bb.1:
	mov	w19, #0
	b	LBB0_3
LBB0_2:
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	mov	w19, #1
LBB0_3:
Lloh13:
	adrp	x8, _s2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _s2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_write_file
	sub	x1, x29, #48
	mov	x0, x20
	bl	_read_environment
	cmp	w0, #1
	b.eq	LBB0_5
; %bb.4:
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	add	w19, w19, #1
LBB0_5:
	mov	x0, x20
	bl	_unlink
	sub	x1, x29, #48
	mov	x0, x20
	bl	_read_environment
	cbz	w0, LBB0_7
; %bb.6:
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	add	w19, w19, #1
LBB0_7:
	ldur	x0, [x29, #-48]
	cbz	x0, LBB0_12
; %bb.8:
	mov	x8, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x0, x8, lsl #3]
	add	x8, x8, #1
	cbnz	x9, LBB0_9
; %bb.10:
	cmp	w8, #4
	b.eq	LBB0_14
; %bb.11:
	sub	x1, x8, #1
	b	LBB0_13
LBB0_12:
	mov	w1, #0
LBB0_13:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_warnx
	add	w19, w19, #1
	ldur	x0, [x29, #-48]
LBB0_14:
	bl	_free_environment
	mov	sp, x21
	ldur	x8, [x29, #-40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	sub	sp, x29, #32
	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
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_s1,4,2                         ; @s1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test 1: variable count %d != 3"

	.comm	_s2,4,2                         ; @s2
l_.str.1:                               ; @.str.1
	.asciz	"test 2: variable count %d != 1"

l_.str.2:                               ; @.str.2
	.asciz	"test 3: variable count %d != 0"

l_.str.3:                               ; @.str.3
	.asciz	"total variable count %d != 3"

.subsections_via_symbols
