	.file	"extr_pmcstudy.c_process_header.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"s/"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Check -- invalid header no s/ in %s\n"
	.text
	.p2align 4
	.type	process_header, @function
process_header:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edx, 2
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	lea	rsi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	mov	rdi, rbp
	call	strncmp@PLT
	test	rax, rax
	jne	.L11
	mov	rax, QWORD PTR cnts[rip]
	movsx	rdi, ebx
	lea	rbx, 2[rbp]
	xor	esi, esi
	mov	edx, 10
	lea	r12, [rax+rdi*8]
	mov	rdi, rbx
	call	strtol@PLT
	mov	rdi, rbp
	mov	DWORD PTR 4[r12], eax
	call	strlen@PLT
	cmp	eax, 2
	jle	.L1
	sub	eax, 3
	mov	rdx, rbx
	lea	rbp, 3[rbp+rax]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdx, rbx
	cmp	rbx, rbp
	je	.L1
.L6:
	cmp	BYTE PTR [rdx], 47
	lea	rbx, 1[rdx]
	jne	.L4
	mov	rdi, rbx
	call	strlen@PLT
	mov	ecx, DWORD PTR MAX_NLEN[rip]
	mov	edi, DWORD PTR [r12]
	mov	rsi, rbx
	lea	edx, -1[rcx]
	cmp	edx, eax
	jle	.L5
	call	strcpy@PLT
	mov	rdx, rbx
	cmp	rbx, rbp
	jne	.L6
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	call	strncpy@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	lea	rdi, .LC1[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	printf@PLT
	.cfi_endproc
.LFE0:
	.size	process_header, .-process_header
	.comm	cnts,8,8
	.comm	MAX_NLEN,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_pmcstudy.c_process_header.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Check -- invalid header no s/ in %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_header, %function
process_header:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldrb	r3, [r1]	@ zero_extendqisi2
	mov	r6, r1
	cmp	r3, #115
	beq	.L14
.L10:
	mov	r1, r6
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, .L15
	b	printf
.L14:
	ldrb	r1, [r1, #1]	@ zero_extendqisi2
	subs	r1, r1, #47
	bne	.L10
	mov	r7, r0
	ldr	r3, .L15+4
	add	r4, r6, #2
	ldr	r3, [r3]
	mov	r2, #10
	mov	r0, r4
	add	r7, r3, r7, lsl #3
	bl	strtol
	mov	r3, r0
	mov	r0, r6
	str	r3, [r7, #4]
	bl	strlen
	cmp	r0, #2
	pople	{r4, r5, r6, r7, r8, pc}
	ldr	r8, .L15+8
	add	r6, r6, r0
	b	.L8
.L6:
	cmp	r4, r6
	popeq	{r4, r5, r6, r7, r8, pc}
.L8:
	ldrb	r3, [r4], #1	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L6
	mov	r0, r4
	bl	strlen
	ldr	r2, [r8]
	ldr	r3, [r7]
	sub	r2, r2, #1
	cmp	r2, r0
	mov	r1, r4
	mov	r0, r3
	ble	.L7
	bl	strcpy
	cmp	r4, r6
	bne	.L8
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	bl	strncpy
	cmp	r4, r6
	bne	.L8
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	cnts
	.word	MAX_NLEN
	.size	process_header, .-process_header
	.comm	cnts,4,4
	.comm	MAX_NLEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
