	.file	"extr_airo.c_proc_stats_rid_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Potentially disasterous buffer overflow averted!"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s: %u\n"
.LC2:
	.string	"Got a short rid"
	.text
	.p2align 4
	.type	proc_stats_rid_open, @function
proc_stats_rid_open:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	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, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	PDE@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 16
	mov	r14, QWORD PTR 40[rsp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 16[rsp], rax
	call	kzalloc@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	je	.L23
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4096
	mov	r13, rax
	call	kmalloc@PLT
	mov	QWORD PTR 8[r13], rax
	test	rax, rax
	je	.L25
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, r12d
	lea	rsi, 32[rsp]
	mov	ecx, 1
	call	readStatsRid@PLT
	mov	edi, DWORD PTR 32[rsp]
	call	le16_to_cpu@PLT
	mov	rdx, QWORD PTR statsLabels[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	rdi, QWORD PTR [rdx]
	cmp	rdi, -1
	je	.L13
	test	eax, eax
	jle	.L14
	sub	eax, 1
	xor	ebx, ebx
	xor	r15d, r15d
	shr	eax, 2
	mov	QWORD PTR 8[rsp], rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	cmp	r15, QWORD PTR 8[rsp]
	je	.L11
	mov	r15, rax
.L9:
	mov	r12d, r15d
	lea	rbp, 0[0+r15*8]
	test	rdi, rdi
	je	.L7
	call	strlen@PLT
	add	eax, ebx
	cmp	eax, 4080
	jg	.L26
	mov	edi, DWORD PTR [r14+r15*4]
	call	le32_to_cpu@PLT
	movsx	rsi, ebx
	mov	ecx, eax
	mov	rax, QWORD PTR statsLabels[rip]
	mov	rdx, QWORD PTR [rax+rbp]
	mov	rax, QWORD PTR 8[r13]
	lea	rdi, [rax+rsi*4]
	lea	rsi, .LC1[rip]
	call	sprintf@PLT
	mov	rdx, QWORD PTR statsLabels[rip]
	add	ebx, eax
.L7:
	mov	rdi, QWORD PTR 8[rdx+rbp]
	lea	rax, 1[r15]
	lea	r12d, 0[0+rax*4]
	cmp	rdi, -1
	jne	.L27
.L5:
	cmp	DWORD PTR 28[rsp], r12d
	jle	.L11
.L10:
	mov	DWORD PTR 0[r13], ebx
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 56[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L28
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L25:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	call	kfree@PLT
.L23:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
.L14:
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 16[rsp]
	lea	rsi, .LC2[rip]
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	airo_print_warn@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rax, QWORD PTR 16[rsp]
	lea	rsi, .LC0[rip]
	sal	r12d, 2
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	airo_print_warn@PLT
	jmp	.L5
.L13:
	xor	r12d, r12d
	xor	ebx, ebx
	jmp	.L5
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	proc_stats_rid_open, .-proc_stats_rid_open
	.comm	statsLabels,8,8
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_airo.c_proc_stats_rid_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Potentially disasterous buffer overflow averted!\000"
	.align	2
.LC1:
	.ascii	"%s: %u\012\000"
	.align	2
.LC2:
	.ascii	"Got a short rid\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	proc_stats_rid_open, %function
proc_stats_rid_open:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L30
	sub	sp, sp, #36
	mov	r4, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	PDE
	ldr	r3, [r0]
	ldr	r6, .L30+4
	ldr	r3, [r3]
	mov	r0, #8
	str	r3, [sp, #8]
	ldr	r3, [sp, #24]
	ldr	r1, [r6]
	str	r3, [sp, #4]
	bl	kzalloc
	cmp	r0, #0
	str	r0, [r4]
	beq	.L24
	mov	r7, r0
	ldr	r1, [r6]
	mov	r0, #4096
	bl	kmalloc
	cmp	r0, #0
	str	r0, [r7, #4]
	beq	.L26
	mov	r3, #1
	mov	r2, r5
	add	r1, sp, #20
	ldr	r0, [sp, #8]
	bl	readStatsRid
	ldr	r0, [sp, #20]
	bl	le16_to_cpu
	ldr	r9, .L30+8
	str	r0, [sp, #12]
	ldr	r3, [r9]
	ldr	r10, [r3]
	cmn	r10, #1
	beq	.L13
	cmp	r0, #0
	mov	r5, #0
	ble	.L11
	sub	r8, r0, #1
	lsr	r8, r8, #2
	mov	r4, r5
	ldr	fp, .L30+12
	add	r8, r8, #1
	b	.L9
.L28:
	cmp	r4, r8
	beq	.L11
.L9:
	cmp	r10, #0
	beq	.L7
	mov	r0, r10
	bl	strlen
	add	r0, r0, r5
	cmp	r0, #4080
	bgt	.L27
	ldr	r3, [sp, #4]
	ldr	r6, [r7, #4]
	ldr	r0, [r3, r4, lsl #2]
	bl	le32_to_cpu
	add	r6, r6, r5, lsl #2
	mov	r3, r0
	mov	r2, r10
	mov	r1, fp
	mov	r0, r6
	bl	sprintf
	add	r5, r5, r0
.L7:
	ldr	r3, [r9]
	add	r4, r4, #1
	ldr	r10, [r3, r4, lsl #2]
	lsl	r3, r4, #2
	cmn	r10, #1
	bne	.L28
.L5:
	ldr	r2, [sp, #12]
	cmp	r2, r3
	ble	.L11
.L10:
	mov	r0, #0
	str	r5, [r7]
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r0, [r4]
	bl	kfree
.L24:
	ldr	r3, .L30+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L11:
	ldr	r3, [sp, #8]
	ldr	r1, .L30+20
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	airo_print_warn
	b	.L10
.L27:
	ldr	r3, [sp, #8]
	ldr	r1, .L30+24
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	airo_print_warn
	lsl	r3, r4, #2
	b	.L5
.L13:
	mov	r3, #0
	mov	r5, r3
	b	.L5
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC3
	.word	GFP_KERNEL
	.word	statsLabels
	.word	.LC1
	.word	ENOMEM
	.word	.LC2
	.word	.LC0
	.size	proc_stats_rid_open, .-proc_stats_rid_open
	.comm	statsLabels,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
