	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_BUFSIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcpy
	movl	(%r15), %edx
	movl	$3, %edi
	movq	%r14, %rsi
	callq	_read
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_3:
	movl	(%r15), %edx
	movl	$4, %edi
	movq	%r14, %rsi
	callq	_read
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_6:
	movl	(%r15), %edx
	movl	$5, %edi
	movq	%r14, %rsi
	callq	_write
	testq	%rax, %rax
	jg	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_8:
	movl	(%r15), %edx
	movl	$6, %edi
	movq	%r14, %rsi
	callq	_write
	testq	%rax, %rax
	jg	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_10:
	movq	_stdout@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_fflush
	movl	(%rbx), %edi
	callq	_fileno
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_12:
	leaq	-48(%rbp), %rsi
	movl	$7, %edi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	movq	%r14, %rdi
	callq	_strlen
	movl	$7, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_write
	testq	%rax, %rax
	jg	LBB0_16
## %bb.15:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_16:
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.8(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%r12d, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.comm	_BUFSIZE,4,2                    ## @BUFSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test..."

	.comm	_errno,8,3                      ## @errno
	.comm	_EBADF,8,3                      ## @EBADF
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s: filedesc 3 is not closed\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.2:                               ## @.str.2
	.asciz	"%s: filedesc 4 is not closed\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: could not write to filedesc 5\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s: could not write to filedesc 6\n"

	.comm	_stdout,4,2                     ## @stdout
L_.str.5:                               ## @.str.5
	.asciz	"%s: could not fstat stdout\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s: could not fstat filedesc 7\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: could not write to filedesc 7\n"

L_.str.8:                               ## @.str.8
	.asciz	"%s: stat results differ\n"

.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x23, _BUFSIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _BUFSIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcpy
	ldr	w2, [x23]
	mov	w0, #3
	mov	x1, x19
	bl	_read
Lloh12:
	adrp	x22, _stderr@GOTPAGE
Lloh13:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
Lloh14:
	adrp	x21, _EXIT_FAILURE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _EXIT_FAILURE@GOTPAGEOFF]
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _EBADF@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EBADF@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
LBB0_2:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_3:
	ldr	w2, [x23]
	mov	w0, #4
	mov	x1, x19
	bl	_read
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _EBADF@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EBADF@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
LBB0_5:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_6:
	ldr	w2, [x23]
	mov	w0, #5
	mov	x1, x19
	bl	_write
	cmp	x0, #0
	b.gt	LBB0_8
; %bb.7:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_8:
	ldr	w2, [x23]
	mov	w0, #6
	mov	x1, x19
	bl	_write
	cmp	x0, #0
	b.gt	LBB0_10
; %bb.9:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_10:
Lloh36:
	adrp	x23, _stdout@GOTPAGE
Lloh37:
	ldr	x23, [x23, _stdout@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_fflush
	ldr	w0, [x23]
	bl	_fileno
	sub	x1, x29, #64
	bl	_fstat
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_12:
	sub	x1, x29, #72
	mov	w0, #7
	bl	_fstat
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w20, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
LBB0_14:
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	w0, #7
	mov	x1, x19
	bl	_write
	cmp	x0, #0
	b.gt	LBB0_16
; %bb.15:
	ldr	w19, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh42:
	adrp	x1, l_.str.7@PAGE
Lloh43:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	w20, [x21]
LBB0_16:
	sub	x0, x29, #64
	sub	x1, x29, #72
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w19, [x22]
	bl	_getprogname
	mov	x2, x0
Lloh44:
	adrp	x1, l_.str.8@PAGE
Lloh45:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	w20, [x21]
LBB0_18:
	ldur	x8, [x29, #-56]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x20
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.comm	_BUFSIZE,4,2                    ; @BUFSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test..."

	.comm	_errno,8,3                      ; @errno
	.comm	_EBADF,8,3                      ; @EBADF
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s: filedesc 3 is not closed\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.2:                               ; @.str.2
	.asciz	"%s: filedesc 4 is not closed\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: could not write to filedesc 5\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s: could not write to filedesc 6\n"

	.comm	_stdout,4,2                     ; @stdout
l_.str.5:                               ; @.str.5
	.asciz	"%s: could not fstat stdout\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s: could not fstat filedesc 7\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: could not write to filedesc 7\n"

l_.str.8:                               ; @.str.8
	.asciz	"%s: stat results differ\n"

.subsections_via_symbols
