	.file	"extr_ntstat.c_nstat_control_handle_add_all.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nstat_control_handle_add_all, @function
nstat_control_handle_add_all:
.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
	mov	edi, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mbuf_len@PLT
	mov	r13, QWORD PTR EINVAL[rip]
	cmp	eax, 11
	ja	.L14
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	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	edi, ebp
	call	mbuf_data@PLT
	mov	edi, DWORD PTR 8[rax]
	cmp	edi, DWORD PTR NSTAT_PROVIDER_LAST[rip]
	mov	rbp, rax
	jg	.L12
	call	nstat_find_provider_by_id@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L12
	cmp	QWORD PTR [rax], 0
	mov	r13, QWORD PTR ENOTSUP[rip]
	je	.L1
	cmp	QWORD PTR nstat_privcheck[rip], 0
	je	.L10
	mov	r13d, DWORD PTR PRIV_NET_PRIVILEGED_NETWORK_STATISTICS[rip]
	xor	eax, eax
	call	kauth_cred_get@PLT
	xor	edx, edx
	mov	esi, r13d
	mov	edi, eax
	call	priv_check_cred@PLT
	mov	r13, rax
	test	rax, rax
	jne	.L1
.L10:
	mov	rdi, r12
	call	lck_mtx_lock@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR NSTAT_FILTER_SUPPRESS_SRC_ADDED[rip], eax
	je	.L9
	mov	eax, DWORD PTR NSTAT_FLAG_SUPPORTS_UPDATES[rip]
	or	DWORD PTR 4[r12], eax
.L9:
	mov	rdi, r12
	call	lck_mtx_unlock@PLT
	mov	rsi, rbp
	mov	rdi, r12
	call	[QWORD PTR [rbx]]
	mov	r13, rax
	test	rax, rax
	jne	.L1
	mov	edi, DWORD PTR 4[rbp]
	xor	edx, edx
	mov	rsi, r12
	call	nstat_enqueue_success@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r13, QWORD PTR ENOENT[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	rax, r13
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nstat_control_handle_add_all, .-nstat_control_handle_add_all
	.comm	nstat_privcheck,8,8
	.comm	PRIV_NET_PRIVILEGED_NETWORK_STATISTICS,4,4
	.comm	NSTAT_PROVIDER_LAST,4,4
	.comm	NSTAT_FLAG_SUPPORTS_UPDATES,4,4
	.comm	NSTAT_FILTER_SUPPRESS_SRC_ADDED,4,4
	.comm	ENOTSUP,8,8
	.comm	ENOENT,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_ntstat.c_nstat_control_handle_add_all.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nstat_control_handle_add_all, %function
nstat_control_handle_add_all:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r0, r1
	mov	r4, r1
	bl	mbuf_len
	cmp	r0, #11
	bhi	.L2
	ldr	r3, .L15
	ldr	r4, [r3]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r4
	bl	mbuf_data
	ldr	r3, .L15+4
	mov	r5, r0
	ldr	r3, [r3]
	ldr	r0, [r0, #8]
	cmp	r0, r3
	bgt	.L12
	bl	nstat_find_provider_by_id
	subs	r7, r0, #0
	beq	.L12
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L14
	ldr	r3, .L15+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	bl	kauth_cred_get
	ldr	r3, .L15+12
	mov	r2, #0
	ldr	r1, [r3]
	bl	priv_check_cred
	subs	r4, r0, #0
	bne	.L1
.L10:
	mov	r0, r6
	bl	lck_mtx_lock
	ldr	r3, .L15+16
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L9
	ldr	r2, .L15+20
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6, #4]
.L9:
	mov	r0, r6
	bl	lck_mtx_unlock
	mov	r1, r5
	mov	r0, r6
	ldr	r3, [r7]
	blx	r3
	subs	r4, r0, #0
	bne	.L1
	mov	r1, r6
	mov	r2, r4
	ldr	r0, [r5, #4]
	bl	nstat_enqueue_success
	b	.L1
.L12:
	ldr	r3, .L15+24
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, .L15+28
	ldr	r4, [r3]
	b	.L1
.L16:
	.align	2
.L15:
	.word	EINVAL
	.word	NSTAT_PROVIDER_LAST
	.word	nstat_privcheck
	.word	PRIV_NET_PRIVILEGED_NETWORK_STATISTICS
	.word	NSTAT_FILTER_SUPPRESS_SRC_ADDED
	.word	NSTAT_FLAG_SUPPORTS_UPDATES
	.word	ENOENT
	.word	ENOTSUP
	.size	nstat_control_handle_add_all, .-nstat_control_handle_add_all
	.comm	nstat_privcheck,4,4
	.comm	PRIV_NET_PRIVILEGED_NETWORK_STATISTICS,4,4
	.comm	NSTAT_PROVIDER_LAST,4,4
	.comm	NSTAT_FLAG_SUPPORTS_UPDATES,4,4
	.comm	NSTAT_FILTER_SUPPRESS_SRC_ADDED,4,4
	.comm	ENOTSUP,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
