	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_add_typedef                ## -- Begin function ctf_add_typedef
	.p2align	4, 0x90
_ctf_add_typedef:                       ## @ctf_add_typedef
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	%rdi, -48(%rbp)
	movq	_CTF_ERR@GOTPCREL(%rip), %rbx
	cmpq	%rcx, (%rbx)
	jne	LBB0_1
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ctf_set_errno
	movq	%rax, %rbx
	jmp	LBB0_6
LBB0_1:
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %r15d
	leaq	-48(%rbp), %rdi
	movq	%rcx, %rsi
	callq	_ctf_lookup_by_id
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ctf_dtd_lookup
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	leaq	-56(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_ctf_add_generic
	movq	%rbx, %rcx
	movq	%rax, %rbx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_CTF_K_TYPEDEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_CTF_TYPE_INFO
	movq	-56(%rbp), %rcx
	movl	%eax, 8(%rcx)
	movq	%r14, (%rcx)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ctf_ref_inc
LBB0_6:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTF_ERR,8,3                    ## @CTF_ERR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CTF_K_TYPEDEF,4,2              ## @CTF_K_TYPEDEF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ctf_add_typedef                ; -- Begin function ctf_add_typedef
	.p2align	2
_ctf_add_typedef:                       ; @ctf_add_typedef
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	str	x0, [sp]
Lloh0:
	adrp	x23, _CTF_ERR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CTF_ERR@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x3
	b.ne	LBB0_2
LBB0_1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ctf_set_errno
	mov	x22, x0
	b	LBB0_6
LBB0_2:
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x0, sp
	mov	x1, x3
	bl	_ctf_lookup_by_id
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_ctf_dtd_lookup
	cbz	x0, LBB0_1
LBB0_4:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ctf_add_generic
	mov	x22, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _CTF_K_TYPEDEF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTF_K_TYPEDEF@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x21
	mov	w2, #0
	bl	_CTF_TYPE_INFO
	ldr	x8, [sp, #8]
	str	w0, [x8, #8]
	str	x20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ctf_ref_inc
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CTF_ERR,8,3                    ; @CTF_ERR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CTF_K_TYPEDEF,4,2              ; @CTF_K_TYPEDEF
.subsections_via_symbols
