	.file	"82283.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"--Pattern is found at: %d\n"
	.text
	.globl	naive_search
	.type	naive_search, @function
naive_search:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L8:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L3
.L6:
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L9
	add	DWORD PTR -12[rbp], 1
.L3:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L6
	jmp	.L5
.L9:
	nop
.L5:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jne	.L7
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	add	DWORD PTR -16[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -4[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jle	.L8
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	naive_search, .-naive_search
	.section	.rodata
.LC1:
	.string	"String test: %s\n"
.LC2:
	.string	"Test1: search pattern %s\n"
.LC3:
	.string	"Test2: search pattern %s\n"
.LC4:
	.string	"Test3: search pattern %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 3616744823823941953
	movabs	rdx, 4774171031831135809
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 4702675284040959558
	mov	QWORD PTR -32[rbp], rax
	mov	WORD PTR -24[rbp], 66
	mov	DWORD PTR -54[rbp], 1094926913
	mov	WORD PTR -50[rbp], 66
	mov	DWORD PTR -62[rbp], 4605510
	mov	DWORD PTR -58[rbp], 4342083
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -54[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -54[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	naive_search
	lea	rax, -62[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -62[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	naive_search
	lea	rax, -58[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -58[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	naive_search
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"82283.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"--Pattern is found at: %d\012\000"
	.text
	.align	2
	.global	naive_search
	.syntax unified
	.arm
	.fpu softvfp
	.type	naive_search, %function
naive_search:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L8:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L3
.L6:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L9
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L3:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L6
	b	.L5
.L9:
	nop
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bne	.L7
	ldr	r1, [fp, #-20]
	ldr	r0, .L10
	bl	printf
.L7:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L8
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.size	naive_search, .-naive_search
	.section	.rodata
	.align	2
.LC3:
	.ascii	"String test: %s\012\000"
	.align	2
.LC4:
	.ascii	"Test1: search pattern %s\012\000"
	.align	2
.LC5:
	.ascii	"Test2: search pattern %s\012\000"
	.align	2
.LC6:
	.ascii	"Test3: search pattern %s\012\000"
	.align	2
.LC1:
	.ascii	"AABCAB12AFAABCABFFEGABCAB\000"
	.align	2
.LC2:
	.ascii	"ABCAB\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	sub	ip, fp, #36
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stmia	ip!, {r0, r1}
	strh	r2, [ip]	@ movhi
	ldr	r2, .L15+8
	sub	r3, fp, #44
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	ldr	r3, .L15+12
	str	r3, [fp, #-52]
	ldr	r3, .L15+16
	str	r3, [fp, #-48]
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L15+20
	bl	printf
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L15+24
	bl	printf
	sub	r2, fp, #44
	sub	r3, fp, #36
	mov	r1, r2
	mov	r0, r3
	bl	naive_search
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L15+28
	bl	printf
	sub	r2, fp, #52
	sub	r3, fp, #36
	mov	r1, r2
	mov	r0, r3
	bl	naive_search
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L15+32
	bl	printf
	sub	r2, fp, #48
	sub	r3, fp, #36
	mov	r1, r2
	mov	r0, r3
	bl	naive_search
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC1
	.word	.LC2
	.word	4605510
	.word	4342083
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
