	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_closefile                      ## -- Begin function closefile
	.p2align	4, 0x90
_closefile:                             ## @closefile
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_stdin@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_8
## %bb.2:
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_9
## %bb.3:
	movq	%rsi, %rdi
	callq	_file_is_tmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	_compress_program@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_pclose
	testq	%rax, %rax
	js	LBB0_6
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fflush                         ## TAILCALL
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fclose                         ## TAILCALL
LBB0_6:
	movl	$2, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_err                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin,8,3                      ## @stdin
	.comm	_stdout,8,3                     ## @stdout
	.comm	_compress_program,8,3           ## @compress_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_closefile                      ; -- Begin function closefile
	.p2align	2
_closefile:                             ; @closefile
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _stdin@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _stdout@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x19
	b.eq	LBB0_7
; %bb.3:
	mov	x0, x1
	bl	_file_is_tmp
	cbz	x0, LBB0_8
; %bb.4:
Lloh6:
	adrp	x8, _compress_program@GOTPAGE
Lloh7:
	ldr	x8, [x8, _compress_program@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_pclose
	tbnz	x0, #63, LBB0_9
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fflush
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_fclose
LBB0_9:
	mov	w0, #2
	mov	x1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin,8,3                      ; @stdin
	.comm	_stdout,8,3                     ; @stdout
	.comm	_compress_program,8,3           ; @compress_program
.subsections_via_symbols
