	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_stdout
_check_stdout:                          ## @check_stdout
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_stdout@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%r14d, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	movl	(%rbx), %edi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	movq	_EXIT_TROUBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	__
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %edi
	movl	%r14d, %esi
	movq	%rax, %rcx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,4,2                     ## @stdout
	.comm	_EXIT_TROUBLE,4,2               ## @EXIT_TROUBLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"write failed"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"standard output"

	.no_dead_strip	_check_stdout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_stdout
_check_stdout:                          ; @check_stdout
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _stdout@GOTPAGE
Lloh1:
	ldr	x19, [x19, _stdout@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_ferror
	cbz	x0, LBB0_2
; %bb.1:
	mov	w19, #0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w0, [x19]
	bl	_fclose
	cbz	x0, LBB0_5
; %bb.3:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	w19, [x8]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_4:
Lloh9:
	adrp	x8, _EXIT_TROUBLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXIT_TROUBLE@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	bl	__
	mov	x3, x0
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_error
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,4,2                     ; @stdout
	.comm	_EXIT_TROUBLE,4,2               ; @EXIT_TROUBLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"write failed"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"standard output"

	.no_dead_strip	_check_stdout
.subsections_via_symbols
