	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pclose_check                   ## -- Begin function pclose_check
	.p2align	4, 0x90
_pclose_check:                          ## @pclose_check
	.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
	callq	_pclose
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$-1, %ebx
	jne	LBB0_3
## %bb.2:
	movq	_ERRCODE_SYSTEM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	callq	__
	movslq	%eax, %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_log_error
	jmp	LBB0_4
LBB0_3:
	movl	%ebx, %edi
	callq	_wait_result_to_str
	movq	%rax, %r14
	movq	_ERRCODE_SYSTEM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_log_error
	movq	%r14, %rdi
	callq	_pfree
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERRCODE_SYSTEM_ERROR,4,2       ## @ERRCODE_SYSTEM_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pclose failed: %m"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pclose_check                   ; -- Begin function pclose_check
	.p2align	2
_pclose_check:                          ; @pclose_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_pclose
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.1:
	cmn	w19, #1
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _ERRCODE_SYSTEM_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERRCODE_SYSTEM_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_errcode
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	x0, x20
	bl	_log_error
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_wait_result_to_str
	mov	x20, x0
Lloh5:
	adrp	x8, _ERRCODE_SYSTEM_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERRCODE_SYSTEM_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_errcode
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_log_error
	mov	x0, x20
	bl	_pfree
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ERRCODE_SYSTEM_ERROR,4,2       ; @ERRCODE_SYSTEM_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pclose failed: %m"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

.subsections_via_symbols
