	.file	"extr_ctlstat.c_getstats.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"CTL_GET_*_STATS ioctl returned error"
	.align 8
.LC1:
	.string	"CTL_GET_*_STATS ioctl returned CTL_SS_ERROR"
	.align 8
.LC2:
	.string	"CTL_GET_*_STATS returned NEED_MORE_SPACE again"
	.align 8
.LC3:
	.string	"CTL_GET_*_STATS ioctl returned unknown status %d"
	.text
	.p2align 4
	.type	getstats, @function
getstats:
.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
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR [rsp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rsi]
	test	eax, eax
	jne	.L2
	mov	eax, DWORD PTR CTL_STAT_NUM_ITEMS[rip]
	mov	DWORD PTR [rsi], eax
.L2:
	cmp	QWORD PTR [rbx], 0
	mov	DWORD PTR 12[rsp], 0
	lea	r15, 16[rsp]
	je	.L12
.L3:
	xor	esi, esi
	mov	edx, 40
	mov	rdi, r15
	call	memset@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR [rbx]
	xor	esi, esi
	lea	edx, [rax+rax*4]
	sal	edx, 3
	mov	DWORD PTR 16[rsp], edx
	call	memset@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdx, r15
	mov	edi, r13d
	mov	esi, DWORD PTR CTL_GET_PORT_STATS[rip]
	mov	QWORD PTR 48[rsp], rax
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR CTLSTAT_FLAG_PORTS[rip], eax
	cmove	esi, DWORD PTR CTL_GET_LUN_STATS[rip]
	call	ioctl@PLT
	cmp	eax, -1
	je	.L23
.L6:
	mov	edx, DWORD PTR 20[rsp]
	cmp	edx, 129
	je	.L7
	cmp	edx, 130
	je	.L8
	cmp	edx, 128
	je	.L9
	lea	rsi, .LC3[rip]
	mov	edi, 1
	xor	eax, eax
	call	errx@PLT
.L9:
	movabs	rcx, -3689348814741910323
	movsx	rdx, DWORD PTR 28[rsp]
	mov	rax, rdx
	mul	rcx
	mov	rax, QWORD PTR 36[rsp]
	mov	rcx, QWORD PTR [rsp]
	shr	rdx, 5
	mov	DWORD PTR [r14], edx
	mov	QWORD PTR [rcx], rax
	mov	eax, DWORD PTR 32[rsp]
	test	DWORD PTR CTL_STATS_FLAG_TIME_VALID[rip], eax
	je	.L13
	mov	eax, DWORD PTR [r12]
	or	eax, DWORD PTR CTLSTAT_FLAG_TIME_VALID[rip]
.L14:
	mov	DWORD PTR [r12], eax
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR CTLSTAT_FLAG_TIME_VALID[rip]
	not	eax
	and	eax, DWORD PTR [r12]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	DWORD PTR 12[rsp], 1
	jle	.L11
	lea	rsi, .LC2[rip]
	mov	edi, 1
	xor	eax, eax
	call	errx@PLT
.L11:
	mov	eax, DWORD PTR 24[rsp]
	mov	rdi, QWORD PTR [rbx]
	lea	edx, [rax+rax*4]
	test	edx, edx
	lea	eax, 3[rdx]
	cmovns	eax, edx
	sar	eax, 2
	mov	DWORD PTR 0[rbp], eax
	call	free@PLT
	add	DWORD PTR 12[rsp], 1
	mov	QWORD PTR [rbx], 0
.L12:
	mov	eax, DWORD PTR 0[rbp]
	lea	edi, [rax+rax*4]
	sal	edi, 3
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L6
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	getstats, .-getstats
	.comm	CTL_STAT_NUM_ITEMS,4,4
	.comm	CTL_STATS_FLAG_TIME_VALID,4,4
	.comm	CTL_GET_PORT_STATS,4,4
	.comm	CTL_GET_LUN_STATS,4,4
	.comm	CTLSTAT_FLAG_TIME_VALID,4,4
	.comm	CTLSTAT_FLAG_PORTS,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_ctlstat.c_getstats.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"CTL_GET_*_STATS ioctl returned error\000"
	.align	2
.LC1:
	.ascii	"CTL_GET_*_STATS ioctl returned CTL_SS_ERROR\000"
	.align	2
.LC2:
	.ascii	"CTL_GET_*_STATS returned NEED_MORE_SPACE again\000"
	.align	2
.LC3:
	.ascii	"CTL_GET_*_STATS ioctl returned unknown status %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getstats, %function
getstats:
	@ args = 8, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	sub	sp, sp, #52
	ldr	r3, .L27
	str	r2, [sp]
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	ldr	ip, [r1]
	mov	r7, r0
	cmp	ip, #0
	ldreq	r3, .L27+4
	ldr	r0, [r4]
	ldreq	r3, [r3]
	mov	r5, r1
	moveq	ip, r3
	streq	r3, [r1]
	cmp	r0, #0
	ldr	r9, [sp, #88]
	ldr	r6, [sp, #92]
	beq	.L23
	mov	r3, #0
	ldr	r10, .L27+8
	str	r3, [sp, #4]
	add	r8, sp, #16
	add	fp, sp, #12
.L3:
	mov	r1, #0
	lsl	r2, ip, #5
	str	r1, [sp, #16]
	str	r2, [sp, #12]
	str	r1, [r8, #4]
	str	r1, [r8, #8]
	str	r1, [r8, #12]
	str	r1, [r8, #16]
	str	r1, [r8, #20]
	bl	memset
	ldr	r0, [r6]
	ldr	r1, [r10]
	ldr	r2, [r4]
	tst	r0, r1
	str	r2, [sp, #40]
	ldrne	r2, .L27+12
	ldreq	r2, .L27+16
	mov	r0, r7
	ldr	r1, [r2]
	mov	r2, fp
	bl	ioctl
	cmn	r0, #1
	beq	.L24
.L6:
	ldr	r2, [sp, #16]
	cmp	r2, #129
	beq	.L7
	cmp	r2, #130
	beq	.L8
	cmp	r2, #128
	beq	.L9
	mov	r0, #1
	ldr	r1, .L27+20
	bl	errx
.L9:
	ldr	r3, [sp, #24]
	ldr	r1, [sp]
	ldr	r2, .L27+24
	lsr	r3, r3, #5
	str	r3, [r1]
	ldr	r1, [r2]
	ldr	r2, [sp, #36]
	ldr	r3, [sp, #32]
	str	r2, [r9, #4]
	ldr	r2, .L27+28
	str	r3, [r9]
	ldr	r0, [sp, #28]
	ldr	r3, [r6]
	ldr	r2, [r2]
	tst	r0, r1
	orrne	r3, r3, r2
	biceq	r3, r3, r2
	str	r3, [r6]
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, #0
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r3, [sp, #4]
	cmp	r3, #1
	bgt	.L26
.L11:
	ldr	r2, [sp, #20]
	ldr	r3, [sp, #4]
	add	r2, r2, r2, lsl #2
	add	r1, r2, #3
	cmp	r2, #0
	movlt	r2, r1
	asr	r2, r2, #2
	add	r3, r3, #1
	ldr	r0, [r4]
	str	r2, [r5]
	str	r3, [sp, #4]
	bl	free
	ldr	ip, [r5]
.L12:
	lsl	r0, ip, #5
	bl	malloc
	ldr	ip, [r5]
	str	r0, [r4]
	b	.L3
.L8:
	ldr	r1, .L27+32
	mov	r0, #1
	bl	err
	b	.L9
.L24:
	ldr	r1, .L27+36
	mov	r0, #1
	bl	err
	b	.L6
.L26:
	ldr	r1, .L27+40
	mov	r0, #1
	bl	errx
	b	.L11
.L23:
	ldr	r10, .L27+8
	str	r0, [sp, #4]
	add	r8, sp, #16
	add	fp, sp, #12
	b	.L12
.L25:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC4
	.word	CTL_STAT_NUM_ITEMS
	.word	CTLSTAT_FLAG_PORTS
	.word	CTL_GET_PORT_STATS
	.word	CTL_GET_LUN_STATS
	.word	.LC3
	.word	CTL_STATS_FLAG_TIME_VALID
	.word	CTLSTAT_FLAG_TIME_VALID
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.size	getstats, .-getstats
	.comm	CTL_STAT_NUM_ITEMS,4,4
	.comm	CTL_STATS_FLAG_TIME_VALID,4,4
	.comm	CTL_GET_PORT_STATS,4,4
	.comm	CTL_GET_LUN_STATS,4,4
	.comm	CTLSTAT_FLAG_TIME_VALID,4,4
	.comm	CTLSTAT_FLAG_PORTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
