	.file	"787402.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	""
.LC1:
	.string	"Invalid UTF-8: %s\n"
.LC2:
	.string	"w(0x%05x): %d %lc\n"
.LC3:
	.string	"w(0x%02x): %d%c\t"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	mov	edi, 6
	call	setlocale@PLT
	test	rax, rax
	jne	.L2
	mov	eax, 1
	jmp	.L3
.L2:
	cmp	DWORD PTR -68[rbp], 1
	jle	.L4
	jmp	.L5
.L10:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L6
.L9:
	mov	QWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdi, rax
	lea	rdx, -32[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	lea	rax, -64[rbp]
	mov	rcx, rdx
	mov	rdx, rdi
	mov	rdi, rax
	call	mbrtowc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], -1
	je	.L7
	cmp	QWORD PTR -40[rbp], -2
	jne	.L8
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L8:
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	mov	eax, 0
	call	wcwidth@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	ecx, DWORD PTR -64[rbp]
	mov	eax, DWORD PTR -64[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	add	QWORD PTR -48[rbp], rax
.L6:
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L9
.L5:
	add	QWORD PTR -80[rbp], 8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L10
	mov	eax, 0
	jmp	.L3
.L4:
	mov	DWORD PTR -60[rbp], 0
	jmp	.L11
.L15:
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -56[rbp], eax
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2
	test	eax, eax
	je	.L12
	mov	ebx, 33
	jmp	.L13
.L12:
	mov	ebx, 32
.L13:
	mov	eax, DWORD PTR -56[rbp]
	mov	edi, eax
	mov	eax, 0
	call	wcwidth@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, ebx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -60[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	cmp	eax, 3
	jne	.L14
	mov	edi, 10
	call	putchar@PLT
.L14:
	add	DWORD PTR -60[rbp], 1
.L11:
	cmp	DWORD PTR -60[rbp], 127
	jle	.L15
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
.L3:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"787402.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Invalid UTF-8: %s\012\000"
	.align	2
.LC2:
	.ascii	"w(0x%05x): %d %lc\012\000"
	.align	2
.LC3:
	.ascii	"w(0x%02x): %d%c\011\000"
	.align	2
.LC4:
	.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	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L17+4
	mov	r0, #6
	bl	setlocale
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	ble	.L4
	b	.L5
.L10:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3]
	str	r3, [fp, #-44]
	b	.L6
.L9:
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-44]
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #24
	sub	r0, fp, #48
	ldr	r1, [fp, #-44]
	bl	mbrtowc
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	beq	.L7
	ldr	r3, [fp, #-32]
	cmn	r3, #2
	bne	.L8
.L7:
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	ldr	r1, .L17+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L3
.L8:
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	wcwidth
	str	r0, [fp, #-28]
	ldr	r1, [fp, #-48]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-28]
	ldr	r0, .L17+16
	bl	printf
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-44]
.L6:
	ldr	r3, [fp, #-44]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L9
.L5:
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	mov	r3, #0
	b	.L3
.L4:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L11
.L15:
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-36]
	bl	wcwidth
	mov	r4, r0
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L12
	mov	r3, #33
	b	.L13
.L12:
	mov	r3, #32
.L13:
	mov	r2, r4
	ldr	r1, [fp, #-40]
	ldr	r0, .L17+20
	bl	printf
	ldr	r3, [fp, #-40]
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	cmp	r3, #3
	bne	.L14
	mov	r0, #10
	bl	putchar
.L14:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L11:
	ldr	r3, [fp, #-40]
	cmp	r3, #127
	ble	.L15
	mov	r0, #10
	bl	putchar
	mov	r3, #0
.L3:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC4
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
