	.file	"extr_libprocstat.c_procstat_getkstack_sysctl.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"sysctl: kern.proc.kstack: %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"sysctl: kern.proc.kstack unavailable (options DDB or options STACK required in kernel)"
	.section	.rodata.str1.1
.LC2:
	.string	"malloc(%zu)"
.LC3:
	.string	"sysctl: kern.proc.pid: %d"
	.text
	.p2align 4
	.type	procstat_getkstack_sysctl, @function
procstat_getkstack_sysctl:
.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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	rbp, 16[rsp]
	mov	DWORD PTR 28[rsp], edi
	lea	r14, 8[rsp]
	mov	eax, DWORD PTR CTL_KERN[rip]
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], 0
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR KERN_PROC[rip]
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR KERN_PROC_KSTACK[rip]
	mov	DWORD PTR 24[rsp], eax
	call	nitems@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	xor	edx, edx
	mov	esi, eax
	mov	rcx, r14
	mov	rdi, rbp
	call	sysctl@PLT
	test	eax, eax
	js	.L16
.L2:
	mov	r15, QWORD PTR 8[rsp]
	mov	rdi, r15
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L17
	mov	rdi, rbp
	call	nitems@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rcx, r14
	mov	esi, eax
	mov	rdx, r12
	mov	rdi, rbp
	call	sysctl@PLT
	cmp	eax, -1
	je	.L18
	mov	rax, QWORD PTR 8[rsp]
	shr	rax, 2
	mov	DWORD PTR [rbx], eax
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L16:
	.cfi_restore_state
	mov	rdx, QWORD PTR errno[rip]
	cmp	rdx, QWORD PTR ESRCH[rip]
	je	.L3
	cmp	rdx, QWORD PTR EPERM[rip]
	je	.L3
	cmp	rdx, QWORD PTR ENOENT[rip]
	jne	.L20
	cmp	eax, -1
	jne	.L2
.L8:
	lea	rdi, .LC1[rip]
	xor	r12d, r12d
	call	warnx@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	eax, -1
	jne	.L2
	cmp	rdx, QWORD PTR ENOENT[rip]
	je	.L8
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rsi, r13
	lea	rdi, .LC3[rip]
	call	warn@PLT
	mov	rdi, r12
	xor	r12d, r12d
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rsi, r13
	lea	rdi, .LC0[rip]
	xor	r12d, r12d
	call	warn@PLT
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
.L17:
	mov	rsi, r15
	lea	rdi, .LC2[rip]
	call	warn@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	procstat_getkstack_sysctl, .-procstat_getkstack_sysctl
	.comm	errno,8,8
	.comm	KERN_PROC_KSTACK,4,4
	.comm	KERN_PROC,4,4
	.comm	ESRCH,8,8
	.comm	EPERM,8,8
	.comm	ENOENT,8,8
	.comm	CTL_KERN,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_libprocstat.c_procstat_getkstack_sysctl.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"sysctl: kern.proc.kstack: %d\000"
	.align	2
.LC1:
	.ascii	"sysctl: kern.proc.kstack unavailable (options DDB o"
	.ascii	"r options STACK required in kernel)\000"
	.align	2
.LC2:
	.ascii	"malloc(%zu)\000"
	.align	2
.LC3:
	.ascii	"sysctl: kern.proc.pid: %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	procstat_getkstack_sysctl, %function
procstat_getkstack_sysctl:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	mov	r4, #0
	ldr	r0, .L21
	ldr	r2, .L21+4
	ldr	r3, .L21+8
	sub	sp, sp, #36
	ldr	ip, [r0]
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r6, r1
	ldr	r1, .L21+12
	str	r5, [sp, #24]
	add	r0, sp, #12
	ldr	r1, [r1]
	str	r1, [sp, #28]
	mov	r1,#0
	str	ip, [sp, #12]
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	str	r4, [sp, #8]
	bl	nitems
	add	r3, sp, #8
	mov	r1, r0
	mov	r2, r4
	str	r4, [sp, #4]
	str	r4, [sp]
	add	r0, sp, #12
	bl	sysctl
	subs	r3, r0, #0
	blt	.L16
.L2:
	ldr	r7, [sp, #8]
	mov	r0, r7
	bl	malloc
	subs	r4, r0, #0
	beq	.L17
	add	r0, sp, #12
	bl	nitems
	mov	r7, #0
	mov	r1, r0
	mov	r2, r4
	add	r3, sp, #8
	add	r0, sp, #12
	str	r7, [sp, #4]
	str	r7, [sp]
	bl	sysctl
	cmn	r0, #1
	beq	.L18
	ldr	r3, [sp, #8]
	lsr	r3, r3, #2
	str	r3, [r6]
.L1:
	ldr	r3, .L21+12
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r4
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L16:
	ldr	r2, .L21+16
	ldr	r1, .L21+20
	ldr	r2, [r2]
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L3
	ldr	r1, .L21+24
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L3
	ldr	r1, .L21+28
	ldr	r1, [r1]
	cmp	r2, r1
	bne	.L20
	cmn	r3, #1
	bne	.L2
.L8:
	ldr	r0, .L21+32
	bl	warnx
	mov	r4, #0
	b	.L1
.L3:
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L21+28
	ldr	r3, [r3]
	cmp	r2, r3
	movne	r4, #0
	bne	.L1
	b	.L8
.L18:
	mov	r1, r5
	ldr	r0, .L21+36
	bl	warn
	mov	r0, r4
	bl	free
	mov	r4, r7
	b	.L1
.L20:
	mov	r1, r5
	ldr	r0, .L21+40
	bl	warn
	b	.L1
.L19:
	bl	__stack_chk_fail
.L17:
	mov	r1, r7
	ldr	r0, .L21+44
	bl	warn
	b	.L1
.L22:
	.align	2
.L21:
	.word	CTL_KERN
	.word	KERN_PROC
	.word	KERN_PROC_KSTACK
	.word	.LC4
	.word	errno
	.word	ESRCH
	.word	EPERM
	.word	ENOENT
	.word	.LC1
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.size	procstat_getkstack_sysctl, .-procstat_getkstack_sysctl
	.comm	errno,4,4
	.comm	KERN_PROC_KSTACK,4,4
	.comm	KERN_PROC,4,4
	.comm	ESRCH,4,4
	.comm	EPERM,4,4
	.comm	ENOENT,4,4
	.comm	CTL_KERN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
