	.file	"extr_ctf_create.c_ctf_add_function.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ctf_add_function
	.type	ctf_add_function, @function
ctf_add_function:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 12[rsp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	je	.L2
	mov	eax, DWORD PTR [rdx]
	mov	rbx, rdx
	mov	edx, DWORD PTR CTF_FUNC_VARARG[rip]
	mov	r12, rcx
	mov	ecx, edx
	not	ecx
	test	ecx, eax
	jne	.L2
	mov	r14d, DWORD PTR 4[rbx]
	test	r12, r12
	jne	.L3
	test	r14d, r14d
	jne	.L2
.L3:
	and	eax, edx
	cmp	eax, 1
	sbb	r14d, -1
	cmp	DWORD PTR CTF_MAX_VLEN[rip], r14d
	jl	.L40
	lea	r13, 48[rsp]
	mov	rsi, QWORD PTR 8[rbx]
	mov	QWORD PTR 48[rsp], rbp
	mov	rdi, r13
	call	ctf_lookup_by_id@PLT
	test	rax, rax
	je	.L7
.L10:
	mov	eax, DWORD PTR 4[rbx]
	xor	r15d, r15d
	test	eax, eax
	jg	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	add	r15, 1
	cmp	DWORD PTR 4[rbx], r15d
	jle	.L9
.L8:
	mov	rsi, QWORD PTR [r12+r15*8]
	mov	rdi, r13
	mov	QWORD PTR 48[rsp], rbp
	call	ctf_lookup_by_id@PLT
	test	rax, rax
	jne	.L11
	mov	rsi, QWORD PTR [r12+r15*8]
	mov	rdi, rbp
	call	ctf_dtd_lookup@PLT
	test	rax, rax
	jne	.L11
.L38:
	mov	esi, DWORD PTR ECTF_BADID[rip]
	mov	rdi, rbp
	call	ctf_set_errno@PLT
	mov	r13, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR EINVAL[rip]
	mov	rdi, rbp
	call	ctf_set_errno@PLT
	mov	r13, rax
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L41
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	test	r14d, r14d
	jne	.L42
	mov	QWORD PTR 16[rsp], 0
.L12:
	mov	esi, DWORD PTR 12[rsp]
	xor	edx, edx
	lea	rcx, 40[rsp]
	mov	rdi, rbp
	call	ctf_add_generic@PLT
	cmp	QWORD PTR CTF_ERR[rip], rax
	mov	r13, rax
	je	.L43
	mov	rcx, QWORD PTR 40[rsp]
	mov	esi, DWORD PTR 12[rsp]
	mov	edx, r14d
	mov	edi, DWORD PTR CTF_K_FUNCTION[rip]
	mov	QWORD PTR 24[rsp], rcx
	call	CTF_TYPE_INFO@PLT
	mov	rcx, QWORD PTR 24[rsp]
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, rbp
	mov	DWORD PTR 16[rcx], eax
	mov	rax, QWORD PTR 40[rsp]
	mov	QWORD PTR 8[rax], rsi
	call	ctf_ref_inc@PLT
	mov	edx, DWORD PTR 4[rbx]
	test	edx, edx
	jle	.L14
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, QWORD PTR [r12+r15*8]
	mov	rdi, rbp
	add	r15, 1
	call	ctf_ref_inc@PLT
	mov	edx, DWORD PTR 4[rbx]
	cmp	edx, r15d
	jg	.L15
.L14:
	mov	r15, QWORD PTR 16[rsp]
	sal	edx, 3
	mov	rdi, r12
	mov	rsi, r15
	call	bcopy@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR CTF_FUNC_VARARG[rip], eax
	je	.L16
	movsx	r14, r14d
	mov	QWORD PTR -8[r15+r14*8], 0
.L16:
	mov	rax, QWORD PTR 40[rsp]
	mov	rcx, QWORD PTR 16[rsp]
	mov	QWORD PTR [rax], rcx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	mov	esi, DWORD PTR EOVERFLOW[rip]
	mov	rdi, rbp
	call	ctf_set_errno@PLT
	mov	r13, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L42:
	lea	edi, 0[0+r14*8]
	call	ctf_alloc@PLT
	mov	QWORD PTR 16[rsp], rax
	test	rax, rax
	jne	.L12
	mov	esi, DWORD PTR EAGAIN[rip]
	mov	rdi, rbp
	call	ctf_set_errno@PLT
	mov	r13, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, rbp
	call	ctf_dtd_lookup@PLT
	test	rax, rax
	jne	.L10
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rdi, QWORD PTR 16[rsp]
	lea	esi, 0[0+r14*8]
	call	ctf_free@PLT
	mov	r13, QWORD PTR CTF_ERR[rip]
	jmp	.L1
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ctf_add_function, .-ctf_add_function
	.comm	EOVERFLOW,4,4
	.comm	EINVAL,4,4
	.comm	ECTF_BADID,4,4
	.comm	EAGAIN,4,4
	.comm	CTF_MAX_VLEN,4,4
	.comm	CTF_K_FUNCTION,4,4
	.comm	CTF_FUNC_VARARG,4,4
	.comm	CTF_ERR,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ctf_create.c_ctf_add_function.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ctf_add_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctf_add_function, %function
ctf_add_function:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r3
	sub	sp, sp, #28
	ldr	r3, .L38
	str	r1, [sp]
	subs	r4, r2, #0
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	beq	.L2
	ldr	fp, .L38+4
	ldr	r2, [r4]
	ldr	r3, [fp]
	bics	r6, r2, r3
	bne	.L2
	ldr	r10, [r4, #4]
	subs	r1, r10, #0
	movne	r1, #1
	cmp	r7, #0
	movne	r1, #0
	cmp	r1, #0
	bne	.L2
	tst	r2, r3
	ldr	r3, .L38+8
	addne	r10, r10, #1
	ldr	r3, [r3]
	cmp	r3, r10
	blt	.L34
	ldr	r1, [r4, #8]
	add	r0, sp, #16
	str	r5, [sp, #16]
	bl	ctf_lookup_by_id
	cmp	r0, #0
	beq	.L7
.L10:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	movgt	r9, #0
	subgt	r8, r7, #4
	bgt	.L12
	b	.L9
.L11:
	ldr	r2, [r4, #4]
	add	r9, r9, #1
	cmp	r2, r9
	ble	.L9
.L12:
	ldr	r1, [r8, #4]!
	add	r0, sp, #16
	str	r5, [sp, #16]
	bl	ctf_lookup_by_id
	cmp	r0, #0
	bne	.L11
	mov	r0, r5
	ldr	r1, [r8]
	bl	ctf_dtd_lookup
	cmp	r0, #0
	bne	.L11
.L32:
	ldr	r3, .L38+12
	mov	r0, r5
	ldr	r1, [r3]
	bl	ctf_set_errno
	mov	r8, r0
	b	.L1
.L2:
	ldr	r3, .L38+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	ctf_set_errno
	mov	r8, r0
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r8
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	cmp	r10, #0
	bne	.L36
	str	r10, [sp, #4]
.L13:
	mov	r2, #0
	add	r3, sp, #12
	mov	r0, r5
	ldr	r1, [sp]
	bl	ctf_add_generic
	ldr	r3, .L38+20
	mov	r8, r0
	ldr	r2, [r3]
	cmp	r2, r0
	beq	.L37
	ldr	r3, .L38+24
	mov	r2, r10
	ldr	r1, [sp]
	ldr	r0, [r3]
	ldr	r9, [sp, #12]
	bl	CTF_TYPE_INFO
	ldr	r1, [r4, #8]
	ldr	r3, [sp, #12]
	str	r0, [r9, #8]
	mov	r0, r5
	str	r1, [r3, #4]
	bl	ctf_ref_inc
	ldr	r2, [r4, #4]
	cmp	r2, #0
	ble	.L15
	sub	r9, r7, #4
.L16:
	mov	r0, r5
	ldr	r1, [r9, #4]!
	bl	ctf_ref_inc
	ldr	r2, [r4, #4]
	add	r6, r6, #1
	cmp	r2, r6
	bgt	.L16
.L15:
	ldr	r5, [sp, #4]
	lsl	r2, r2, #2
	mov	r0, r7
	mov	r1, r5
	bl	bcopy
	ldr	r3, [fp]
	ldr	r2, [r4]
	tst	r2, r3
	movne	r3, #0
	subne	r10, r10, #-1073741823
	strne	r3, [r5, r10, lsl #2]
	ldr	r2, [sp, #4]
	ldr	r3, [sp, #12]
	str	r2, [r3]
	b	.L1
.L34:
	ldr	r3, .L38+28
	ldr	r1, [r3]
	bl	ctf_set_errno
	mov	r8, r0
	b	.L1
.L36:
	lsl	r0, r10, #2
	bl	ctf_alloc
	subs	r3, r0, #0
	str	r3, [sp, #4]
	bne	.L13
	ldr	r3, .L38+32
	mov	r0, r5
	ldr	r1, [r3]
	bl	ctf_set_errno
	mov	r8, r0
	b	.L1
.L7:
	mov	r0, r5
	ldr	r1, [r4, #8]
	bl	ctf_dtd_lookup
	cmp	r0, #0
	bne	.L10
	b	.L32
.L37:
	ldr	r0, [sp, #4]
	lsl	r1, r10, #2
	bl	ctf_free
	ldr	r3, .L38+20
	ldr	r8, [r3]
	b	.L1
.L35:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	CTF_FUNC_VARARG
	.word	CTF_MAX_VLEN
	.word	ECTF_BADID
	.word	EINVAL
	.word	CTF_ERR
	.word	CTF_K_FUNCTION
	.word	EOVERFLOW
	.word	EAGAIN
	.size	ctf_add_function, .-ctf_add_function
	.comm	EOVERFLOW,4,4
	.comm	EINVAL,4,4
	.comm	ECTF_BADID,4,4
	.comm	EAGAIN,4,4
	.comm	CTF_MAX_VLEN,4,4
	.comm	CTF_K_FUNCTION,4,4
	.comm	CTF_FUNC_VARARG,4,4
	.comm	CTF_ERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
