	.file	"518471.c"
	.intel_syntax noprefix
	.text
	.globl	str_pos
	.type	str_pos, @function
str_pos:
.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	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	WORD PTR -10[rbp], 0
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	mov	eax, -1
	jmp	.L3
.L11:
	mov	WORD PTR -12[rbp], 1
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	and	eax, 224
	cmp	eax, 192
	jne	.L5
	mov	WORD PTR -12[rbp], 2
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	and	eax, 240
	cmp	eax, 224
	jne	.L7
	mov	WORD PTR -12[rbp], 3
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	and	eax, 248
	cmp	eax, 240
	jne	.L6
	mov	WORD PTR -12[rbp], 4
.L6:
	movsx	rax, WORD PTR -12[rbp]
	add	QWORD PTR -24[rbp], rax
	cmp	WORD PTR -12[rbp], 4
	jne	.L8
	mov	edx, 2
	jmp	.L9
.L8:
	mov	edx, 1
.L9:
	movzx	eax, WORD PTR -10[rbp]
	add	eax, edx
	mov	WORD PTR -10[rbp], ax
.L4:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L10
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jb	.L11
.L10:
	movzx	eax, WORD PTR -10[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	str_pos, .-str_pos
	.local	s1
	.comm	s1,8,8
	.local	s2
	.comm	s2,8,8
	.section	.rodata
.LC0:
	.string	"simple test"
.LC1:
	.string	"\303\241\303\244\303\266\303\237\342\202\254\360\220\215\210"
.LC2:
	.string	"test"
.LC3:
	.string	"%d\n"
.LC4:
	.string	"\303\241"
.LC5:
	.string	"\303\237\342\202\254"
.LC6:
	.string	"\342\202\254"
.LC7:
	.string	"\360\220\215\210"
	.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
	lea	rax, .LC0[rip]
	mov	QWORD PTR s1[rip], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR s2[rip], rax
	mov	rax, QWORD PTR s1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR s2[rip]
	mov	rax, QWORD PTR s1[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR s2[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR s2[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR s2[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR s2[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR s2[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	str_pos
	cwde
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.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	"518471.c"
	.text
	.align	2
	.global	str_pos
	.syntax unified
	.arm
	.fpu softvfp
	.type	str_pos, %function
str_pos:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strstr
	str	r0, [fp, #-8]
	mov	r3, #0
	strh	r3, [fp, #-10]	@ movhi
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L3
.L11:
	mov	r3, #1
	strh	r3, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #224
	cmp	r3, #192
	bne	.L5
	mov	r3, #2
	strh	r3, [fp, #-12]	@ movhi
	b	.L6
.L5:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #240
	cmp	r3, #224
	bne	.L7
	mov	r3, #3
	strh	r3, [fp, #-12]	@ movhi
	b	.L6
.L7:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #248
	cmp	r3, #240
	bne	.L6
	mov	r3, #4
	strh	r3, [fp, #-12]	@ movhi
.L6:
	ldrsh	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldrsh	r3, [fp, #-12]
	cmp	r3, #4
	bne	.L8
	mov	r2, #2
	b	.L9
.L8:
	mov	r2, #1
.L9:
	ldrh	r3, [fp, #-10]
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-10]	@ movhi
.L4:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L11
.L10:
	ldrsh	r3, [fp, #-10]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	str_pos, .-str_pos
	.local	s1
	.comm	s1,4,4
	.local	s2
	.comm	s2,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"simple test\000"
	.align	2
.LC1:
	.ascii	"\303\241\303\244\303\266\303\237\342\202\254\360\220"
	.ascii	"\215\210\000"
	.align	2
.LC2:
	.ascii	"test\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.ascii	"\303\241\000"
	.align	2
.LC5:
	.ascii	"\303\237\342\202\254\000"
	.align	2
.LC6:
	.ascii	"\342\202\254\000"
	.align	2
.LC7:
	.ascii	"\360\220\215\210\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L14
	ldr	r2, .L14+4
	str	r2, [r3]
	ldr	r3, .L14+8
	ldr	r2, .L14+12
	str	r2, [r3]
	ldr	r3, .L14
	ldr	r3, [r3]
	ldr	r1, .L14+16
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14
	ldr	r3, [r3]
	ldr	r2, .L14+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r1, .L14+16
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r1, .L14+24
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r1, .L14+28
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r1, .L14+32
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r1, .L14+36
	mov	r0, r3
	bl	str_pos
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	s1
	.word	.LC0
	.word	s2
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
