	.file	"extr_ptrace-utrace.c_ptrace_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ptrace_attach
	.type	ptrace_attach, @function
ptrace_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	audit_ptrace@PLT
	mov	r13d, DWORD PTR EPERM[rip]
	mov	edi, DWORD PTR [r12]
	and	edi, DWORD PTR PF_KTHREAD[rip]
	neg	r13d
	call	unlikely@PLT
	test	rax, rax
	je	.L14
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	esi, DWORD PTR current[rip]
	mov	rdi, r12
	call	same_thread_group@PLT
	test	rax, rax
	jne	.L1
	lea	rbp, 8[r12]
	mov	r13d, DWORD PTR ERESTARTNOINTR[rip]
	mov	rdi, rbp
	call	mutex_lock_interruptible@PLT
	neg	r13d
	test	rax, rax
	jne	.L1
	mov	rdi, r12
	call	task_lock@PLT
	mov	esi, DWORD PTR PTRACE_MODE_ATTACH[rip]
	mov	rdi, r12
	call	__ptrace_may_access@PLT
	mov	rdi, r12
	mov	r13d, eax
	call	task_unlock@PLT
	test	r13d, r13d
	jne	.L4
	xor	esi, esi
	mov	rdi, r12
	call	ptrace_attach_task@PLT
	mov	edi, eax
	mov	ebx, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L15
	mov	r13d, ebx
.L4:
.L2:
	endbr64
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	lea	rdi, tasklist_lock[rip]
	call	write_lock_irq@PLT
	mov	edi, DWORD PTR 4[r12]
	mov	ebx, DWORD PTR EPERM[rip]
	call	unlikely@PLT
	test	rax, rax
	je	.L5
	neg	ebx
	mov	r13d, ebx
.L6:
	lea	rdi, tasklist_lock[rip]
	call	write_unlock_irq@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 12[r12]
	call	BUG_ON@PLT
	mov	eax, DWORD PTR PT_UTRACED[rip]
	mov	edi, DWORD PTR CAP_SYS_PTRACE[rip]
	mov	DWORD PTR 12[r12], eax
	call	capable@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR PT_PTRACE_CAP[rip]
	or	DWORD PTR 12[r12], eax
.L7:
	mov	esi, DWORD PTR current[rip]
	mov	rdi, r12
	call	__ptrace_link@PLT
	mov	esi, DWORD PTR SEND_SIG_FORCED[rip]
	mov	edi, DWORD PTR SIGSTOP[rip]
	mov	rdx, r12
	call	send_sig_info@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	ptrace_attach, .-ptrace_attach
	.comm	tasklist_lock,4,4
	.comm	current,4,4
	.comm	SIGSTOP,4,4
	.comm	SEND_SIG_FORCED,4,4
	.comm	PT_UTRACED,4,4
	.comm	PT_PTRACE_CAP,4,4
	.comm	PTRACE_MODE_ATTACH,4,4
	.comm	PF_KTHREAD,4,4
	.comm	ERESTARTNOINTR,4,4
	.comm	EPERM,4,4
	.comm	CAP_SYS_PTRACE,4,4
	.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_ptrace-utrace.c_ptrace_attach.c"
	.text
	.align	2
	.global	ptrace_attach
	.syntax unified
	.arm
	.fpu softvfp
	.type	ptrace_attach, %function
ptrace_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	audit_ptrace
	ldr	r3, .L15
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r6, .L15+4
	and	r0, r0, r3
	ldr	r4, [r6]
	bl	unlikely
	cmp	r0, #0
	rsb	r4, r4, #0
	beq	.L13
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r7, .L15+8
	mov	r0, r5
	ldr	r1, [r7]
	bl	same_thread_group
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L15+12
	add	r8, r5, #8
	mov	r0, r8
	ldr	r4, [r3]
	bl	mutex_lock_interruptible
	cmp	r0, #0
	rsbne	r4, r4, #0
	bne	.L1
	mov	r0, r5
	bl	task_lock
	ldr	r3, .L15+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	__ptrace_may_access
	mov	r4, r0
	mov	r0, r5
	bl	task_unlock
	cmp	r4, #0
	bne	.L4
	mov	r1, r4
	mov	r0, r5
	bl	ptrace_attach_task
	mov	r4, r0
	bl	unlikely
	cmp	r0, #0
	beq	.L14
.L4:
.L2:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r0, .L15+20
	bl	write_lock_irq
	ldr	r0, [r5, #4]
	ldr	r6, [r6]
	bl	unlikely
	subs	r4, r0, #0
	rsbne	r4, r6, #0
	bne	.L6
	ldr	r0, [r5, #12]
	bl	BUG_ON
	ldr	r3, .L15+24
	ldr	r2, .L15+28
	ldr	r3, [r3]
	ldr	r0, [r2]
	str	r3, [r5, #12]
	bl	capable
	cmp	r0, #0
	ldrne	r2, .L15+32
	ldrne	r3, [r5, #12]
	ldrne	r2, [r2]
	ldr	r1, [r7]
	orrne	r3, r3, r2
	strne	r3, [r5, #12]
	mov	r0, r5
	bl	__ptrace_link
	ldr	r1, .L15+36
	ldr	r3, .L15+40
	mov	r2, r5
	ldr	r1, [r1]
	ldr	r0, [r3]
	bl	send_sig_info
.L6:
	ldr	r0, .L15+20
	bl	write_unlock_irq
	b	.L4
.L16:
	.align	2
.L15:
	.word	PF_KTHREAD
	.word	EPERM
	.word	current
	.word	ERESTARTNOINTR
	.word	PTRACE_MODE_ATTACH
	.word	tasklist_lock
	.word	PT_UTRACED
	.word	CAP_SYS_PTRACE
	.word	PT_PTRACE_CAP
	.word	SEND_SIG_FORCED
	.word	SIGSTOP
	.size	ptrace_attach, .-ptrace_attach
	.comm	tasklist_lock,4,4
	.comm	current,4,4
	.comm	SIGSTOP,4,4
	.comm	SEND_SIG_FORCED,4,4
	.comm	PT_UTRACED,4,4
	.comm	PT_PTRACE_CAP,4,4
	.comm	PTRACE_MODE_ATTACH,4,4
	.comm	PF_KTHREAD,4,4
	.comm	ERESTARTNOINTR,4,4
	.comm	EPERM,4,4
	.comm	CAP_SYS_PTRACE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
