	.file	"extr_ptrace.c_ppc_set_hwdebug.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ppc_set_hwdebug, @function
ppc_set_hwdebug:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR [rsi], 1
	je	.L2
	mov	rax, QWORD PTR ENOTSUPP[rip]
	neg	rax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR 4[rsi]
	mov	eax, DWORD PTR PPC_BREAKPOINT_TRIGGER_RW[rip]
	test	edx, eax
	je	.L22
	not	eax
	test	eax, edx
	jne	.L22
	mov	eax, DWORD PTR PPC_BREAKPOINT_CONDITION_NONE[rip]
	cmp	DWORD PTR 12[rsi], eax
	jne	.L22
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR EIO[rip]
	mov	rbx, QWORD PTR 16[rsi]
	neg	rax
	cmp	rbx, QWORD PTR TASK_SIZE[rip]
	jnb	.L1
	mov	ebp, DWORD PTR HW_BRK_TYPE_TRANSLATE[rip]
	test	DWORD PTR PPC_BREAKPOINT_TRIGGER_READ[rip], edx
	je	.L7
	or	ebp, DWORD PTR HW_BRK_TYPE_READ[rip]
.L7:
	test	DWORD PTR PPC_BREAKPOINT_TRIGGER_WRITE[rip], edx
	je	.L8
	or	ebp, DWORD PTR HW_BRK_TYPE_WRITE[rip]
.L8:
	mov	eax, DWORD PTR PPC_BREAKPOINT_MODE_EXACT[rip]
	cmp	DWORD PTR 8[rsi], eax
	je	.L25
	mov	rax, QWORD PTR EINVAL[rip]
	neg	rax
.L1:
	add	rsp, 24
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore 3
	.cfi_restore 6
	mov	rax, QWORD PTR EINVAL[rip]
	neg	rax
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -24
	.cfi_offset 6, -16
	cmp	QWORD PTR [rdi], 0
	je	.L9
	mov	rax, QWORD PTR ENOSPC[rip]
	neg	rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	xor	eax, eax
	mov	QWORD PTR 8[rsp], rdi
	call	ppc_breakpoint_available@PLT
	mov	rdi, QWORD PTR 8[rsp]
	test	eax, eax
	je	.L26
	and	rbx, -8
	mov	DWORD PTR 12[rdi], ebp
	mov	eax, 1
	mov	QWORD PTR [rdi], rbx
	mov	DWORD PTR 8[rdi], 8
	jmp	.L1
.L26:
	mov	rax, QWORD PTR ENODEV[rip]
	neg	rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ppc_set_hwdebug, .-ppc_set_hwdebug
	.comm	ptrace_triggered,4,4
	.comm	TASK_SIZE,8,8
	.comm	PPC_BREAKPOINT_TRIGGER_WRITE,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_RW,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_READ,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_EXECUTE,4,4
	.comm	PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE,4,4
	.comm	PPC_BREAKPOINT_MODE_MASK,4,4
	.comm	PPC_BREAKPOINT_MODE_EXACT,4,4
	.comm	PPC_BREAKPOINT_CONDITION_NONE,4,4
	.comm	PPC_BREAKPOINT_CONDITION_MODE,4,4
	.comm	PPC_BREAKPOINT_CONDITION_BE_ALL,4,4
	.comm	HW_BRK_TYPE_WRITE,4,4
	.comm	HW_BRK_TYPE_TRANSLATE,4,4
	.comm	HW_BRK_TYPE_READ,4,4
	.comm	HW_BREAKPOINT_ALIGN,8,8
	.comm	ENOTSUPP,8,8
	.comm	ENOSPC,8,8
	.comm	ENODEV,8,8
	.comm	EIO,8,8
	.comm	EINVAL,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_ptrace.c_ppc_set_hwdebug.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ppc_set_hwdebug, %function
ppc_set_hwdebug:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r1]
	cmp	r4, #1
	beq	.L2
	ldr	r3, .L23
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r2, .L23+4
	ldr	r3, [r1, #4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L4
	bics	r2, r3, r2
	bne	.L4
	ldr	r2, .L23+8
	mov	r5, r0
	ldr	r2, [r2]
	ldr	r0, [r1, #12]
	cmp	r0, r2
	bne	.L4
	ldr	r2, .L23+12
	ldr	r6, [r1, #16]
	ldr	r2, [r2]
	cmp	r6, r2
	bcs	.L22
	ldr	r2, .L23+16
	ldr	r0, .L23+20
	ldr	r2, [r2]
	ldr	r7, [r0]
	tst	r3, r2
	ldrne	r2, .L23+24
	ldrne	r2, [r2]
	orrne	r7, r7, r2
	ldr	r2, .L23+28
	ldr	r2, [r2]
	tst	r3, r2
	ldrne	r3, .L23+32
	ldr	r2, [r1, #8]
	ldrne	r3, [r3]
	orrne	r7, r7, r3
	ldr	r3, .L23+36
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L23+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L4:
	ldr	r3, .L23+44
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	ldr	r3, .L23+48
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L9:
	bl	ppc_breakpoint_available
	cmp	r0, #0
	movne	r3, #8
	ldreq	r3, .L23+52
	bicne	r6, r6, #7
	ldreq	r4, [r3]
	stmibne	r5, {r3, r7}
	rsbeq	r4, r4, #0
	strne	r6, [r5]
	b	.L1
.L24:
	.align	2
.L23:
	.word	ENOTSUPP
	.word	PPC_BREAKPOINT_TRIGGER_RW
	.word	PPC_BREAKPOINT_CONDITION_NONE
	.word	TASK_SIZE
	.word	PPC_BREAKPOINT_TRIGGER_READ
	.word	HW_BRK_TYPE_TRANSLATE
	.word	HW_BRK_TYPE_READ
	.word	PPC_BREAKPOINT_TRIGGER_WRITE
	.word	HW_BRK_TYPE_WRITE
	.word	PPC_BREAKPOINT_MODE_EXACT
	.word	ENOSPC
	.word	EINVAL
	.word	EIO
	.word	ENODEV
	.size	ppc_set_hwdebug, .-ppc_set_hwdebug
	.comm	ptrace_triggered,4,4
	.comm	TASK_SIZE,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_WRITE,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_RW,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_READ,4,4
	.comm	PPC_BREAKPOINT_TRIGGER_EXECUTE,4,4
	.comm	PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE,4,4
	.comm	PPC_BREAKPOINT_MODE_MASK,4,4
	.comm	PPC_BREAKPOINT_MODE_EXACT,4,4
	.comm	PPC_BREAKPOINT_CONDITION_NONE,4,4
	.comm	PPC_BREAKPOINT_CONDITION_MODE,4,4
	.comm	PPC_BREAKPOINT_CONDITION_BE_ALL,4,4
	.comm	HW_BRK_TYPE_WRITE,4,4
	.comm	HW_BRK_TYPE_TRANSLATE,4,4
	.comm	HW_BRK_TYPE_READ,4,4
	.comm	HW_BREAKPOINT_ALIGN,4,4
	.comm	ENOTSUPP,4,4
	.comm	ENOSPC,4,4
	.comm	ENODEV,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
