	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_maybe_flush_or_die             ## -- Begin function maybe_flush_or_die
	.p2align	4, 0x90
_maybe_flush_or_die:                    ## @maybe_flush_or_die
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_1
LBB0_10:
	movq	%rbx, %rdi
	callq	_fflush
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_check_pipe
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_die_errno                      ## TAILCALL
LBB0_1:
	movl	_maybe_flush_or_die.skip_stdout_flush(%rip), %ecx
	testl	%ecx, %ecx
	js	LBB0_2
## %bb.4:
	testl	%ecx, %ecx
	jne	LBB0_5
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %rdi
	callq	_atoi
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, _maybe_flush_or_die.skip_stdout_flush(%rip)
	testl	%ecx, %ecx
	je	LBB0_10
LBB0_5:
	movq	%rbx, %rdi
	callq	_ferror
	testl	%eax, %eax
	jne	LBB0_10
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_fileno
	leaq	-24(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_7
LBB0_9:
	movl	$0, _maybe_flush_or_die.skip_stdout_flush(%rip)
	jmp	LBB0_10
LBB0_7:
	movl	-24(%rbp), %edi
	callq	_S_ISREG
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$1, _maybe_flush_or_die.skip_stdout_flush(%rip)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @maybe_flush_or_die.skip_stdout_flush
_maybe_flush_or_die.skip_stdout_flush:
	.long	4294967295                      ## 0xffffffff

	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GIT_FLUSH"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"write failure on '%s'"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_maybe_flush_or_die             ; -- Begin function maybe_flush_or_die
	.p2align	2
_maybe_flush_or_die:                    ; @maybe_flush_or_die
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _stdout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_3
LBB0_1:
	mov	x0, x20
	bl	_fflush
	cbz	x0, LBB0_8
; %bb.2:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_check_pipe
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	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
	add	sp, sp, #64
	b	_die_errno
LBB0_3:
	adrp	x21, _maybe_flush_or_die.skip_stdout_flush@PAGE
	ldr	w8, [x21, _maybe_flush_or_die.skip_stdout_flush@PAGEOFF]
	tbnz	w8, #31, LBB0_5
; %bb.4:
	cbnz	w8, LBB0_7
	b	LBB0_1
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_9
; %bb.6:
	bl	_atoi
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x21, _maybe_flush_or_die.skip_stdout_flush@PAGEOFF]
	cbz	w8, LBB0_1
LBB0_7:
	mov	x0, x20
	bl	_ferror
	cbnz	w0, LBB0_1
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x20
	bl	_fileno
	add	x1, sp, #8
	bl	_fstat
	cbz	x0, LBB0_11
LBB0_10:
	str	wzr, [x21, _maybe_flush_or_die.skip_stdout_flush@PAGEOFF]
	b	LBB0_1
LBB0_11:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	x0, LBB0_10
; %bb.12:
	mov	w8, #1
	str	w8, [x21, _maybe_flush_or_die.skip_stdout_flush@PAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @maybe_flush_or_die.skip_stdout_flush
_maybe_flush_or_die.skip_stdout_flush:
	.long	4294967295                      ; 0xffffffff

	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GIT_FLUSH"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"write failure on '%s'"

.subsections_via_symbols
