	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_close_log              ## -- Begin function pmcstat_close_log
	.p2align	4, 0x90
_pmcstat_close_log:                     ## @pmcstat_close_log
	.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
	movq	%rdi, %rbx
	cmpl	$-1, (%rdi)
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_pmc_close_logfile
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_3:
	movq	_FLAG_HAS_PIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_4
## %bb.5:
	movq	_PMCSTAT_FINISHED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_PMCSTAT_EXITING@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: logging failed"

	.comm	_FLAG_HAS_PIPE,4,2              ## @FLAG_HAS_PIPE
	.comm	_PMCSTAT_EXITING,4,2            ## @PMCSTAT_EXITING
	.comm	_PMCSTAT_FINISHED,4,2           ## @PMCSTAT_FINISHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_close_log              ; -- Begin function pmcstat_close_log
	.p2align	2
_pmcstat_close_log:                     ; @pmcstat_close_log
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_3
; %bb.1:
	bl	_pmc_close_logfile
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_3:
	ldr	w8, [x19, #4]
Lloh5:
	adrp	x9, _FLAG_HAS_PIPE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FLAG_HAS_PIPE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _PMCSTAT_EXITING@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PMCSTAT_EXITING@GOTPAGEOFF]
Lloh10:
	adrp	x11, _PMCSTAT_FINISHED@GOTPAGE
Lloh11:
	ldr	x11, [x11, _PMCSTAT_FINISHED@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: logging failed"

	.comm	_FLAG_HAS_PIPE,4,2              ; @FLAG_HAS_PIPE
	.comm	_PMCSTAT_EXITING,4,2            ; @PMCSTAT_EXITING
	.comm	_PMCSTAT_FINISHED,4,2           ; @PMCSTAT_FINISHED
.subsections_via_symbols
