	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdclose                        ## -- Begin function fdclose
	.p2align	4, 0x90
_fdclose:                               ## @fdclose
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	$-1, (%rbx)
LBB0_2:
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_FLOCKFILE_CANCELSAFE
	movq	8(%r15), %rax
	movq	___sclose@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.7:
	movl	16(%r15), %eax
	movq	_EOF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.12:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:
	movl	%eax, (%rbx)
LBB0_14:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_cleanfile
	movl	%eax, %r14d
	jmp	LBB0_15
LBB0_3:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_16
LBB0_5:
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_EBADF@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_11:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_cleanfile
	movl	%ebx, (%r12)
LBB0_15:
	xorl	%eax, %eax
	callq	_FUNLOCKFILE_CANCELSAFE
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_errno,4,2                      ## @errno
	.comm	_EOF,4,2                        ## @EOF
	.comm	___sclose,8,3                   ## @__sclose
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdclose                        ; -- Begin function fdclose
	.p2align	2
_fdclose:                               ; @fdclose
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	w8, #-1
	str	w8, [x21]
LBB0_2:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_FLOCKFILE_CANCELSAFE
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, ___sclose@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___sclose@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x22, _errno@GOTPAGE
Lloh4:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [x19, #16]
Lloh5:
	adrp	x9, _EOF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EOF@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x9]
	tbnz	w8, #31, LBB0_11
; %bb.5:
	cbz	w20, LBB0_13
; %bb.6:
	cbz	x21, LBB0_8
; %bb.7:
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	bl	_cleanfile
	mov	x20, x0
	b	LBB0_14
LBB0_9:
Lloh8:
	adrp	x8, _EBADF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _errno@GOTPAGE
Lloh12:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
Lloh14:
	adrp	x8, _EOF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_10:
Lloh17:
	adrp	x8, _EOF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
Lloh20:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh22:
	adrp	x8, _EBADF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x22]
LBB0_13:
	ldr	w21, [x22]
	mov	x0, x19
	mov	w1, #1
	bl	_cleanfile
	str	w21, [x22]
LBB0_14:
	bl	_FUNLOCKFILE_CANCELSAFE
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
	.comm	_EOF,4,2                        ; @EOF
	.comm	___sclose,8,3                   ; @__sclose
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
