	.file	"103264846.c"
	.intel_syntax noprefix
	.text
	.globl	mbsnrtowcs
	.type	mbsnrtowcs, @function
mbsnrtowcs:
.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, 1136
	mov	QWORD PTR -1096[rbp], rdi
	mov	QWORD PTR -1104[rbp], rsi
	mov	QWORD PTR -1112[rbp], rdx
	mov	QWORD PTR -1120[rbp], rcx
	mov	QWORD PTR -1128[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1072[rbp], 0
	mov	rax, QWORD PTR -1104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -1080[rbp], rax
	cmp	QWORD PTR -1096[rbp], 0
	jne	.L2
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1056[rbp], rax
	mov	QWORD PTR -1120[rbp], 256
	jmp	.L4
.L2:
	mov	rax, QWORD PTR -1096[rbp]
	mov	QWORD PTR -1056[rbp], rax
	jmp	.L4
.L9:
	mov	rax, QWORD PTR -1064[rbp]
	cmp	rax, QWORD PTR -1120[rbp]
	jb	.L5
	mov	rax, QWORD PTR -1120[rbp]
	mov	QWORD PTR -1064[rbp], rax
.L5:
	mov	rax, QWORD PTR -1064[rbp]
	sub	QWORD PTR -1112[rbp], rax
	mov	rcx, QWORD PTR -1128[rbp]
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rsi, -1080[rbp]
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	mbsrtowcs@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR -1048[rbp]
	mov	QWORD PTR -1072[rbp], rax
	mov	QWORD PTR -1120[rbp], 0
	jmp	.L7
.L6:
	lea	rax, -1040[rbp]
	cmp	QWORD PTR -1056[rbp], rax
	je	.L8
	mov	rax, QWORD PTR -1048[rbp]
	sal	rax, 2
	add	QWORD PTR -1056[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	sub	QWORD PTR -1120[rbp], rax
.L8:
	mov	rax, QWORD PTR -1048[rbp]
	add	QWORD PTR -1072[rbp], rax
.L4:
	mov	rax, QWORD PTR -1080[rbp]
	test	rax, rax
	je	.L7
	cmp	QWORD PTR -1120[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -1112[rbp]
	shr	rax, 2
	mov	QWORD PTR -1064[rbp], rax
	mov	rax, QWORD PTR -1064[rbp]
	cmp	rax, QWORD PTR -1120[rbp]
	jnb	.L9
	cmp	QWORD PTR -1064[rbp], 32
	ja	.L9
.L7:
	mov	rax, QWORD PTR -1080[rbp]
	test	rax, rax
	je	.L10
	jmp	.L11
.L15:
	mov	rsi, QWORD PTR -1080[rbp]
	mov	rcx, QWORD PTR -1128[rbp]
	mov	rdx, QWORD PTR -1112[rbp]
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	mbrtowc@PLT
	mov	QWORD PTR -1048[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, 2
	cmp	rax, 2
	ja	.L12
	cmp	QWORD PTR -1048[rbp], -1
	jne	.L13
	mov	rax, QWORD PTR -1048[rbp]
	mov	QWORD PTR -1072[rbp], rax
	jmp	.L10
.L13:
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L14
	mov	QWORD PTR -1080[rbp], 0
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -1128[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L10
.L12:
	mov	rdx, QWORD PTR -1080[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	mov	QWORD PTR -1080[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	sub	QWORD PTR -1112[rbp], rax
	add	QWORD PTR -1056[rbp], 4
	sub	QWORD PTR -1120[rbp], 1
	add	QWORD PTR -1072[rbp], 1
.L11:
	cmp	QWORD PTR -1120[rbp], 0
	je	.L10
	cmp	QWORD PTR -1112[rbp], 0
	jne	.L15
.L10:
	cmp	QWORD PTR -1096[rbp], 0
	je	.L16
	mov	rdx, QWORD PTR -1080[rbp]
	mov	rax, QWORD PTR -1104[rbp]
	mov	QWORD PTR [rax], rdx
.L16:
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mbsnrtowcs, .-mbsnrtowcs
	.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	"103264846.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mbsnrtowcs
	.syntax unified
	.arm
	.fpu softvfp
	.type	mbsnrtowcs, %function
mbsnrtowcs:
	@ args = 4, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	str	r2, [fp, #-1064]
	str	r3, [fp, #-1068]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-1072]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1048]
	ldr	r3, [fp, #-1060]
	ldr	r3, [r3]
	str	r3, [fp, #-1052]
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	bne	.L2
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1040]
	mov	r3, #256
	str	r3, [fp, #-1068]
	b	.L4
.L2:
	ldr	r3, [fp, #-1056]
	str	r3, [fp, #-1040]
	b	.L4
.L9:
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1068]
	cmp	r2, r3
	bcc	.L5
	ldr	r3, [fp, #-1068]
	str	r3, [fp, #-1044]
.L5:
	ldr	r2, [fp, #-1064]
	ldr	r3, [fp, #-1044]
	sub	r3, r2, r3
	str	r3, [fp, #-1064]
	sub	r1, fp, #1040
	sub	r1, r1, #4
	sub	r1, r1, #8
	ldr	r3, [fp, #-1072]
	ldr	r2, [fp, #-1044]
	ldr	r0, [fp, #-1040]
	bl	mbsrtowcs
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmn	r3, #1
	bne	.L6
	ldr	r3, [fp, #-1036]
	str	r3, [fp, #-1048]
	mov	r3, #0
	str	r3, [fp, #-1068]
	b	.L7
.L6:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1040]
	cmp	r2, r3
	beq	.L8
	ldr	r3, [fp, #-1036]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	str	r3, [fp, #-1040]
	ldr	r2, [fp, #-1068]
	ldr	r3, [fp, #-1036]
	sub	r3, r2, r3
	str	r3, [fp, #-1068]
.L8:
	ldr	r2, [fp, #-1048]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	str	r3, [fp, #-1048]
.L4:
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-1064]
	lsr	r3, r3, #2
	str	r3, [fp, #-1044]
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1068]
	cmp	r2, r3
	bcs	.L9
	ldr	r3, [fp, #-1044]
	cmp	r3, #32
	bhi	.L9
.L7:
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L10
	b	.L11
.L15:
	ldr	r1, [fp, #-1052]
	ldr	r3, [fp, #-1072]
	ldr	r2, [fp, #-1064]
	ldr	r0, [fp, #-1040]
	bl	mbrtowc
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	add	r3, r3, #2
	cmp	r3, #2
	bhi	.L12
	ldr	r3, [fp, #-1036]
	cmn	r3, #1
	bne	.L13
	ldr	r3, [fp, #-1036]
	str	r3, [fp, #-1048]
	b	.L10
.L13:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L14
	mov	r3, #0
	str	r3, [fp, #-1052]
	b	.L10
.L14:
	ldr	r3, [fp, #-1072]
	mov	r2, #0
	str	r2, [r3]
	b	.L10
.L12:
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	str	r3, [fp, #-1052]
	ldr	r2, [fp, #-1064]
	ldr	r3, [fp, #-1036]
	sub	r3, r2, r3
	str	r3, [fp, #-1064]
	ldr	r3, [fp, #-1040]
	add	r3, r3, #4
	str	r3, [fp, #-1040]
	ldr	r3, [fp, #-1068]
	sub	r3, r3, #1
	str	r3, [fp, #-1068]
	ldr	r3, [fp, #-1048]
	add	r3, r3, #1
	str	r3, [fp, #-1048]
.L11:
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bne	.L15
.L10:
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	beq	.L16
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1060]
	str	r2, [r3]
.L16:
	ldr	r3, [fp, #-1048]
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC0
	.size	mbsnrtowcs, .-mbsnrtowcs
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
