	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_discard                    ## -- Begin function ctf_discard
	.p2align	4, 0x90
_ctf_discard:                           ## @ctf_discard
	.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	%rdi, %r14
	movl	(%rdi), %eax
	movq	_LCTF_RDWR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.1:
	movq	_LCTF_DIRTY@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_8
## %bb.2:
	leaq	24(%r14), %rdi
	callq	_ctf_list_prev
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rbx
	testq	%r15, %r15
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ctf_list_prev
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_CTF_TYPE_TO_INDEX
	cmpq	8(%r14), %rax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ctf_dtd_delete
	jmp	LBB0_6
LBB0_9:
	movq	_ECTF_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ctf_set_errno                  ## TAILCALL
LBB0_7:
	movq	8(%r14), %rax
	incq	%rax
	movq	%rax, 16(%r14)
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LCTF_RDWR,4,2                  ## @LCTF_RDWR
	.comm	_ECTF_RDONLY,4,2                ## @ECTF_RDONLY
	.comm	_LCTF_DIRTY,4,2                 ## @LCTF_DIRTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_discard                    ; -- Begin function ctf_discard
	.p2align	2
_ctf_discard:                           ; @ctf_discard
	.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	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _LCTF_RDWR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LCTF_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
Lloh3:
	adrp	x22, _LCTF_DIRTY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LCTF_DIRTY@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.2:
	add	x0, x19, #24
	bl	_ctf_list_prev
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, x21
	cbz	x21, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_ctf_list_prev
	mov	x21, x0
	ldr	w0, [x20]
	bl	_CTF_TYPE_TO_INDEX
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.le	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ctf_dtd_delete
	b	LBB0_4
LBB0_7:
Lloh5:
	adrp	x8, _ECTF_RDONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ECTF_RDONLY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_ctf_set_errno
LBB0_8:
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #16]
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_9:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LCTF_RDWR,4,2                  ; @LCTF_RDWR
	.comm	_ECTF_RDONLY,4,2                ; @ECTF_RDONLY
	.comm	_LCTF_DIRTY,4,2                 ; @LCTF_DIRTY
.subsections_via_symbols
