	.file	"extr_mbfilter.c_mbfl_strpos.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mbfl_strpos
	.type	mbfl_strpos, @function
mbfl_strpos:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 2152
	.cfi_def_cfa_offset 2208
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 2136[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L49
	cmp	QWORD PTR [rdi], 0
	mov	rbp, rdi
	je	.L49
	mov	r12, rsi
	test	rsi, rsi
	je	.L49
	cmp	QWORD PTR [rsi], 0
	je	.L49
	mov	r13, QWORD PTR mbfl_encoding_utf8[rip]
	test	r13, r13
	je	.L49
	mov	rbx, rdx
	mov	rdx, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR mbfl_no_encoding_utf8[rip]
	lea	r14, 16[rsp]
	cmp	QWORD PTR [rdx], rax
	jne	.L82
.L3:
	mov	rdx, QWORD PTR 16[r12]
	lea	r15, 48[rsp]
	cmp	QWORD PTR [rdx], rax
	jne	.L83
.L5:
	movsx	rdx, DWORD PTR 8[r12]
	mov	r10, -8
	test	edx, edx
	jle	.L7
	movsx	rdi, DWORD PTR 8[rbp]
	mov	r10, -1
	cmp	edx, edi
	jg	.L7
	mov	r9, QWORD PTR 0[rbp]
	mov	r8, QWORD PTR [r12]
	test	ecx, ecx
	jne	.L8
	lea	rsi, 1[rdx]
	lea	rax, 80[rsp]
	lea	rcx, 2128[rsp]
	.p2align 4,,10
	.p2align 3
.L9:
	mov	QWORD PTR [rax], rsi
	add	rax, 8
	cmp	rax, rcx
	jne	.L9
	lea	r10, [r8+rdx]
	mov	rax, r8
	lea	r11, -1[r10]
	cmp	rdx, 1
	je	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movzx	ecx, BYTE PTR [rax]
	mov	rsi, r10
	sub	rsi, rax
	add	rax, 1
	mov	QWORD PTR 80[rsp+rcx*8], rsi
	cmp	r11, rax
	jne	.L13
.L14:
	movsx	rsi, edi
	lea	rcx, -1[rbx]
	mov	rax, r9
	add	rsi, r9
	test	rbx, rbx
	je	.L12
	cmp	rsi, r9
	ja	.L16
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L17:
	cmp	rsi, rax
	jbe	.L58
.L16:
	movzx	edi, BYTE PTR [rax]
	sub	rcx, 1
	movzx	edi, BYTE PTR 0[r13+rdi]
	add	rax, rdi
	cmp	rcx, -1
	jne	.L17
.L12:
	add	rax, rdx
	mov	r10, -1
	cmp	rsi, rax
	jb	.L7
.L24:
	cmp	rax, rsi
	ja	.L80
	mov	r11, rax
	lea	rdi, [r8+rdx]
	mov	rcx, rax
	sub	r11, rdx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L19:
	sub	rdi, 1
	sub	rcx, 1
	movzx	r10d, BYTE PTR [rcx]
	cmp	BYTE PTR [rdi], r10b
	jne	.L84
.L23:
	cmp	rcx, r11
	jne	.L19
	xor	r10d, r10d
	cmp	r11, r9
	ja	.L22
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L85:
	add	r10, 1
.L21:
	cmp	r11, r9
	je	.L7
.L22:
	movzx	eax, BYTE PTR -1[r11]
	sub	r11, 1
	test	al, al
	jns	.L85
	and	eax, -64
	cmp	al, -128
	setne	al
	movzx	eax, al
	add	r10, rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L82:
	mov	rdi, r14
	mov	DWORD PTR 8[rsp], ecx
	call	mbfl_string_init@PLT
	mov	rdi, rbp
	lea	rdx, mbfl_encoding_utf8[rip]
	mov	rsi, r14
	call	mbfl_convert_encoding@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	rbp, rax
	mov	rax, QWORD PTR mbfl_no_encoding_utf8[rip]
	test	rbp, rbp
	jne	.L3
.L44:
	mov	r10, -4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L83:
	mov	rdi, r15
	mov	DWORD PTR 8[rsp], ecx
	call	mbfl_string_init@PLT
	mov	rdi, r12
	lea	rdx, mbfl_encoding_utf8[rip]
	mov	rsi, r15
	call	mbfl_convert_encoding@PLT
	mov	ecx, DWORD PTR 8[rsp]
	test	rax, rax
	mov	r12, rax
	jne	.L5
	cmp	rbp, r14
	jne	.L44
	mov	r10, -4
.L43:
	mov	rdi, r14
	mov	QWORD PTR 8[rsp], r10
	call	mbfl_string_clear@PLT
	mov	r10, QWORD PTR 8[rsp]
	jmp	.L42
.L58:
	mov	r10, -16
.L7:
	cmp	rbp, r14
	je	.L43
.L42:
	cmp	r12, r15
	je	.L86
.L1:
	mov	rax, QWORD PTR 2136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L87
	add	rsp, 2152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r10
	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
.L49:
	.cfi_restore_state
	mov	r10, -8
	jmp	.L1
.L8:
	lea	rax, 80[rsp]
	lea	rcx, 2128[rsp]
	.p2align 4,,10
	.p2align 3
.L26:
	mov	QWORD PTR [rax], rdx
	add	rax, 8
	cmp	rcx, rax
	jne	.L26
	mov	rax, rdx
	sub	rax, 1
	je	.L30
	.p2align 4,,10
	.p2align 3
.L27:
	movzx	ecx, BYTE PTR [r8+rax]
	mov	QWORD PTR 80[rsp+rcx*8], rax
	sub	rax, 1
	jne	.L27
.L30:
	add	rdi, r9
	lea	rcx, -1[rbx]
	mov	rax, r9
	test	rbx, rbx
	je	.L29
	cmp	rdi, r9
	ja	.L32
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L33:
	cmp	rdi, rax
	jbe	.L58
.L32:
	movzx	esi, BYTE PTR [rax]
	sub	rcx, 1
	movzx	esi, BYTE PTR 0[r13+rsi]
	add	rax, rsi
	cmp	rcx, -1
	jne	.L33
.L29:
	lea	rcx, [rax+rdx]
	mov	r10, -1
	cmp	rdi, rcx
	jb	.L7
	mov	r11, rdx
	lea	r10, [r8+rdx]
	sub	rdi, rdx
	neg	r11
.L41:
	cmp	rdi, rax
	jb	.L80
	mov	rcx, r8
	mov	rdx, rdi
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L89:
	add	rcx, 1
	add	rdx, 1
	cmp	r10, rcx
	je	.L88
.L40:
	movzx	esi, BYTE PTR [rdx]
	cmp	BYTE PTR [rcx], sil
	je	.L89
	sub	rdx, QWORD PTR 80[rsp+rsi*8]
	lea	rsi, -1[rdi]
	cmp	rdi, rdx
	mov	rdi, rdx
	cmovbe	rdi, rsi
	jmp	.L41
.L86:
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], r10
	call	mbfl_string_clear@PLT
	mov	r10, QWORD PTR 8[rsp]
	jmp	.L1
.L88:
	add	rdx, r11
	xor	r10d, r10d
	cmp	rdx, r9
	ja	.L37
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L90:
	add	r10, 1
.L36:
	cmp	rdx, r9
	je	.L7
.L37:
	movzx	eax, BYTE PTR -1[rdx]
	sub	rdx, 1
	test	al, al
	jns	.L90
	and	eax, -64
	cmp	al, -128
	setne	al
	movzx	eax, al
	add	r10, rax
	jmp	.L36
.L84:
	add	rcx, QWORD PTR 80[rsp+r10*8]
	lea	r10, 1[rax]
	cmp	rax, rcx
	mov	rax, rcx
	cmovnb	rax, r10
	jmp	.L24
.L80:
	mov	r10, -1
	jmp	.L7
.L87:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mbfl_strpos, .-mbfl_strpos
	.comm	mbfl_no_encoding_utf8,8,8
	.comm	mbfl_encoding_utf8,8,8
	.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_mbfilter.c_mbfl_strpos.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mbfl_strpos
	.syntax unified
	.arm
	.fpu softvfp
	.type	mbfl_strpos, %function
mbfl_strpos:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r3
	sub	sp, sp, #1056
	ldr	r3, .L94
	sub	sp, sp, #12
	subs	r5, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #1060]
	mov	r3,#0
	beq	.L51
	ldr	r3, [r5]
	mov	r6, r1
	cmp	r1, #0
	cmpne	r3, #0
	beq	.L51
	ldr	r3, [r1]
	cmp	r3, #0
	beq	.L51
	mov	r4, r2
	ldr	r2, .L94+4
	ldr	r7, [r2]
	cmp	r7, #0
	beq	.L51
	ldr	fp, .L94+8
	ldr	r1, [r5, #8]
	ldr	r3, [fp]
	ldr	r1, [r1]
	add	r8, sp, #24
	cmp	r1, r3
	addeq	r9, sp, #12
	bne	.L86
.L3:
	ldr	r2, [r6, #8]
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L87
.L5:
	ldr	ip, [r6, #4]
	cmp	ip, #0
	mvnle	r4, #7
	ble	.L7
	ldr	r1, [r5, #4]
	cmp	ip, r1
	bgt	.L53
	ldr	r3, [r6]
	cmp	r10, #0
	ldr	lr, [r5]
	str	r3, [sp, #4]
	bne	.L8
	add	r0, ip, #1
	add	r3, sp, #32
	add	r2, sp, #1056
.L9:
	str	r0, [r3, #4]!
	cmp	r3, r2
	bne	.L9
	cmp	ip, #1
	beq	.L14
	ldr	r3, [sp, #4]
	add	r10, r3, ip
	sub	fp, r10, #2
	sub	r3, r3, #1
.L13:
	ldrb	r2, [r3, #1]!	@ zero_extendqisi2
	add	r0, sp, #1056
	add	r0, r0, #8
	add	r2, r0, r2, lsl #2
	cmp	fp, r3
	sub	r0, r10, r3
	str	r0, [r2, #-1028]
	bne	.L13
.L14:
	cmp	r4, #0
	moveq	r3, lr
	add	r1, lr, r1
	sub	r4, r4, #1
	beq	.L12
	cmp	r1, lr
	bls	.L60
	mov	r3, lr
	b	.L16
.L17:
	cmp	r1, r3
	bls	.L60
.L16:
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r4, r4, #1
	ldrb	r2, [r7, r2]	@ zero_extendqisi2
	cmn	r4, #1
	add	r3, r3, r2
	bne	.L17
.L12:
	add	r3, r3, ip
	cmp	r1, r3
	bcc	.L53
.L24:
	cmp	r3, r1
	bhi	.L53
	ldr	r0, [sp, #4]
	mov	r2, r3
	add	r7, r0, ip
	sub	r0, r3, ip
	b	.L23
.L19:
	ldrb	r4, [r2, #-1]!	@ zero_extendqisi2
	ldrb	r10, [r7, #-1]!	@ zero_extendqisi2
	cmp	r10, r4
	bne	.L88
.L23:
	cmp	r2, r0
	bne	.L19
	cmp	r0, lr
	mov	r4, #0
	bhi	.L22
	b	.L7
.L83:
	add	r4, r4, #1
.L21:
	cmp	r0, lr
	beq	.L7
.L22:
	ldrb	r3, [r0, #-1]!	@ zero_extendqisi2
	tst	r3, #128
	beq	.L83
	and	r3, r3, #192
	cmp	r3, #128
	bne	.L83
	b	.L21
.L86:
	sub	r9, r8, #12
	mov	r0, r9
	bl	mbfl_string_init
	mov	r0, r5
	mov	r1, r9
	ldr	r2, .L94+4
	bl	mbfl_convert_encoding
	subs	r5, r0, #0
	ldrne	r3, [fp]
	bne	.L3
.L46:
	mvn	r4, #3
	b	.L1
.L87:
	mov	r0, r8
	bl	mbfl_string_init
	mov	r0, r6
	mov	r1, r8
	ldr	r2, .L94+4
	bl	mbfl_convert_encoding
	subs	r6, r0, #0
	bne	.L5
	cmp	r5, r9
	bne	.L46
	mvn	r4, #3
.L45:
	mov	r0, r9
	bl	mbfl_string_clear
	b	.L44
.L8:
	add	r3, sp, #32
	add	r2, sp, #1056
.L26:
	str	ip, [r3, #4]!
	cmp	r2, r3
	bne	.L26
	subs	r3, ip, #1
	ldrne	r2, [sp, #4]
	addne	r0, r2, ip
	beq	.L31
.L30:
	ldrb	r2, [r0, #-1]!	@ zero_extendqisi2
	add	r10, sp, #1056
	add	r10, r10, #8
	add	r2, r10, r2, lsl #2
	str	r3, [r2, #-1028]
	subs	r3, r3, #1
	bne	.L30
.L31:
	cmp	r4, #0
	moveq	r3, lr
	add	r1, lr, r1
	sub	r4, r4, #1
	beq	.L29
	cmp	r1, lr
	bls	.L60
	mov	r3, lr
	b	.L33
.L34:
	cmp	r1, r3
	bls	.L60
.L33:
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r4, r4, #1
	ldrb	r2, [r7, r2]	@ zero_extendqisi2
	cmn	r4, #1
	add	r3, r3, r2
	bne	.L34
.L29:
	add	r2, r3, ip
	cmp	r1, r2
	bcs	.L89
.L53:
	mvn	r4, #0
.L7:
	cmp	r5, r9
	beq	.L45
.L44:
	cmp	r6, r8
	beq	.L90
.L1:
	ldr	r3, .L94
	ldr	r2, [r3]
	ldr	r3, [sp, #1060]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L91
	mov	r0, r4
	add	sp, sp, #1056
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L51:
	mvn	r4, #7
	b	.L1
.L60:
	mvn	r4, #15
	b	.L7
.L90:
	mov	r0, r6
	bl	mbfl_string_clear
	b	.L1
.L89:
	ldr	r2, [sp, #4]
	sub	r0, r1, ip
	add	r7, r2, ip
	rsb	fp, ip, #0
.L42:
	cmp	r0, r3
	bcc	.L53
	mov	r2, r0
	ldr	r1, [sp, #4]
	b	.L41
.L93:
	cmp	r7, r1
	beq	.L92
.L41:
	mov	r4, r2
	ldrb	r10, [r1], #1	@ zero_extendqisi2
	ldrb	ip, [r2], #1	@ zero_extendqisi2
	cmp	r10, ip
	beq	.L93
	add	r2, sp, #1056
	add	r2, r2, #8
	add	ip, r2, ip, lsl #2
	ldr	r2, [ip, #-1028]
	sub	r4, r4, r2
	cmp	r0, r4
	movhi	r0, r4
	subls	r0, r0, #1
	b	.L42
.L92:
	add	r2, r2, fp
	cmp	r2, lr
	mov	r4, #0
	bhi	.L38
	b	.L7
.L84:
	add	r4, r4, #1
.L37:
	cmp	r2, lr
	beq	.L7
.L38:
	ldrb	r3, [r2, #-1]!	@ zero_extendqisi2
	tst	r3, #128
	beq	.L84
	and	r3, r3, #192
	cmp	r3, #128
	bne	.L84
	b	.L37
.L88:
	add	r0, sp, #1056
	add	r0, r0, #8
	add	r4, r0, r4, lsl #2
	ldr	r0, [r4, #-1028]
	add	r2, r2, r0
	cmp	r3, r2
	movcc	r3, r2
	addcs	r3, r3, #1
	b	.L24
.L91:
	bl	__stack_chk_fail
.L95:
	.align	2
.L94:
	.word	.LC0
	.word	mbfl_encoding_utf8
	.word	mbfl_no_encoding_utf8
	.size	mbfl_strpos, .-mbfl_strpos
	.comm	mbfl_no_encoding_utf8,4,4
	.comm	mbfl_encoding_utf8,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
