	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_add_function               ## -- Begin function ctf_add_function
	.p2align	4, 0x90
_ctf_add_function:                      ## @ctf_add_function
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	%rcx, %r15
	movq	%rdx, %r12
	movl	(%rdx), %eax
	movq	_CTF_FUNC_VARARG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	notl	%edx
	testl	%edx, %eax
	jne	LBB0_4
## %bb.2:
	movl	%esi, %ebx
	movl	4(%r12), %r13d
	testq	%r15, %r15
	jne	LBB0_6
## %bb.3:
	testl	%r13d, %r13d
	je	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ctf_set_errno                  ## TAILCALL
LBB0_6:
	andl	%eax, %ecx
	cmpl	$1, %ecx
	sbbl	$-1, %r13d
	movq	_CTF_MAX_VLEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jle	LBB0_8
## %bb.7:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_8:
	movq	%r14, -48(%rbp)
	movq	8(%r12), %rsi
	leaq	-48(%rbp), %rdi
	callq	_ctf_lookup_by_id
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	_ctf_dtd_lookup
	testq	%rax, %rax
	je	LBB0_10
LBB0_12:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	cmpl	$0, 4(%r12)
	jle	LBB0_17
## %bb.13:
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %rbx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r13
	movslq	4(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, -48(%rbp)
	movq	(%r15,%r13,8), %rsi
	movq	%rbx, %rdi
	callq	_ctf_lookup_by_id
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r15,%r13,8), %rsi
	movq	%r14, %rdi
	callq	_ctf_dtd_lookup
	testq	%rax, %rax
	jne	LBB0_16
LBB0_10:
	movq	_ECTF_BADID@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_17:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.21:
	leal	(,%r13,8), %edi
	callq	_ctf_alloc
	testq	%rax, %rax
	jne	LBB0_19
## %bb.22:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ctf_set_errno
	jmp	LBB0_29
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %rcx
	movq	%r14, %rdi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ctf_add_generic
	movq	_CTF_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.20:
	shll	$3, %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%rcx, %rbx
	callq	_ctf_free
	movq	(%rbx), %rax
	jmp	LBB0_29
LBB0_23:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_CTF_K_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_CTF_TYPE_INFO
	movq	-72(%rbp), %rcx
	movl	%eax, 16(%rcx)
	movq	8(%r12), %rsi
	movq	%rsi, 8(%rcx)
	movq	%r14, %rdi
	callq	_ctf_ref_inc
	movl	4(%r12), %edx
	testl	%edx, %edx
	jle	LBB0_26
## %bb.24:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_ctf_ref_inc
	incq	%rbx
	movslq	4(%r12), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_25
LBB0_26:
	shll	$3, %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_memmove
	movq	_CTF_FUNC_VARARG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_28
## %bb.27:
	movslq	%r13d, %rax
	movq	$0, -8(%rbx,%rax,8)
LBB0_28:
	movq	-72(%rbp), %rax
	movq	%rbx, (%rax)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
LBB0_29:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTF_FUNC_VARARG,4,2            ## @CTF_FUNC_VARARG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CTF_MAX_VLEN,4,2               ## @CTF_MAX_VLEN
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_ECTF_BADID,4,2                 ## @ECTF_BADID
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CTF_ERR,8,3                    ## @CTF_ERR
	.comm	_CTF_K_FUNCTION,4,2             ## @CTF_K_FUNCTION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_add_function               ; -- Begin function ctf_add_function
	.p2align	2
_ctf_add_function:                      ; @ctf_add_function
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	cbz	x2, LBB0_4
; %bb.1:
	mov	x19, x2
	ldr	w8, [x2]
Lloh0:
	adrp	x27, _CTF_FUNC_VARARG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CTF_FUNC_VARARG@GOTPAGEOFF]
	ldr	w9, [x27]
	bics	wzr, w8, w9
	b.ne	LBB0_4
; %bb.2:
	mov	x21, x3
	mov	x23, x1
	ldr	w10, [x19, #4]
	cbnz	x3, LBB0_6
; %bb.3:
	cbz	w10, LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ctf_set_errno
LBB0_6:
	tst	w9, w8
	cinc	w22, w10, ne
Lloh4:
	adrp	x8, _CTF_MAX_VLEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CTF_MAX_VLEN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_8
; %bb.7:
Lloh7:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_5
LBB0_8:
	str	x20, [sp]
	ldr	x1, [x19, #8]
	mov	x0, sp
	bl	_ctf_lookup_by_id
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_ctf_dtd_lookup
	cbz	x0, LBB0_15
LBB0_10:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.11:
	mov	x24, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19, #4]
	cmp	x24, x8
	b.ge	LBB0_16
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	str	x20, [sp]
	ldr	x1, [x21, x24, lsl #3]
	mov	x0, sp
	bl	_ctf_lookup_by_id
	cbnz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x1, [x21, x24, lsl #3]
	mov	x0, x20
	bl	_ctf_dtd_lookup
	cbnz	x0, LBB0_12
LBB0_15:
Lloh9:
	adrp	x8, _ECTF_BADID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ECTF_BADID@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
	lsl	w26, w22, #3
	cbz	w22, LBB0_20
; %bb.17:
	mov	x0, x26
	bl	_ctf_alloc
	mov	x24, x0
	cbnz	x0, LBB0_21
; %bb.18:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ctf_set_errno
	mov	x25, x0
	b	LBB0_29
LBB0_20:
	mov	x24, #0
LBB0_21:
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x23
	mov	x2, #0
	bl	_ctf_add_generic
Lloh13:
	adrp	x28, _CTF_ERR@GOTPAGE
Lloh14:
	ldr	x28, [x28, _CTF_ERR@GOTPAGEOFF]
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x24
	mov	x1, x26
	bl	_ctf_free
	ldr	x25, [x28]
	b	LBB0_29
LBB0_23:
	mov	x25, x0
Lloh15:
	adrp	x8, _CTF_K_FUNCTION@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CTF_K_FUNCTION@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x23
	mov	x2, x22
	bl	_CTF_TYPE_INFO
	ldr	x8, [sp, #8]
	str	w0, [x8, #16]
	ldr	x1, [x19, #8]
	str	x1, [x8, #8]
	mov	x0, x20
	bl	_ctf_ref_inc
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.24:
	mov	x23, #0
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x21, x23, lsl #3]
	mov	x0, x20
	bl	_ctf_ref_inc
	add	x23, x23, #1
	ldrsw	x8, [x19, #4]
	cmp	x23, x8
	b.lt	LBB0_25
LBB0_26:
	lsl	w2, w8, #3
	mov	x0, x24
	mov	x1, x21
	bl	_memmove
	ldr	w8, [x19]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.27:
	sub	w8, w22, #1
	str	xzr, [x24, w8, sxtw #3]
LBB0_28:
	ldr	x8, [sp, #8]
	str	x24, [x8]
LBB0_29:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CTF_FUNC_VARARG,4,2            ; @CTF_FUNC_VARARG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CTF_MAX_VLEN,4,2               ; @CTF_MAX_VLEN
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_ECTF_BADID,4,2                 ; @ECTF_BADID
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CTF_ERR,8,3                    ; @CTF_ERR
	.comm	_CTF_K_FUNCTION,4,2             ; @CTF_K_FUNCTION
.subsections_via_symbols
