	.file	"122015004.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"bg"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -21[rbp], 0
	mov	DWORD PTR -13[rbp], 0
	mov	BYTE PTR -9[rbp], 0
	lea	rax, -21[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -21[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	check_ucn
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	check_ucn
	.type	check_ucn, @function
check_ucn:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	is_string_equals
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	check_bg_ucn
	jmp	.L6
.L5:
	mov	eax, 0
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	check_ucn, .-check_ucn
	.globl	check_bg_ucn
	.type	check_bg_ucn, @function
check_bg_ucn:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -88[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], 10
	je	.L8
	mov	eax, 0
	jmp	.L21
.L8:
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, -48[rax]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 5
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -52[rbp], eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, -48[rax]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -48[rbp], 2
	mov	DWORD PTR -44[rbp], 4
	mov	DWORD PTR -40[rbp], 8
	mov	DWORD PTR -36[rbp], 5
	mov	DWORD PTR -32[rbp], 10
	mov	DWORD PTR -28[rbp], 9
	mov	DWORD PTR -24[rbp], 7
	mov	DWORD PTR -20[rbp], 3
	mov	DWORD PTR -16[rbp], 6
	cmp	DWORD PTR -68[rbp], 20
	jle	.L10
	cmp	DWORD PTR -68[rbp], 32
	jg	.L10
	sub	DWORD PTR -68[rbp], 20
	jmp	.L11
.L10:
	cmp	DWORD PTR -68[rbp], 40
	jle	.L11
	cmp	DWORD PTR -68[rbp], 52
	jg	.L11
	sub	DWORD PTR -68[rbp], 40
.L11:
	cmp	DWORD PTR -68[rbp], 0
	jle	.L12
	cmp	DWORD PTR -68[rbp], 12
	jle	.L13
.L12:
	mov	eax, 0
	jmp	.L21
.L13:
	cmp	DWORD PTR -52[rbp], 0
	jle	.L14
	cmp	DWORD PTR -52[rbp], 31
	jle	.L15
.L14:
	mov	eax, 0
	jmp	.L21
.L15:
	mov	DWORD PTR -64[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, -48[rax]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	imul	eax, edx
	add	DWORD PTR -64[rbp], eax
	add	DWORD PTR -60[rbp], 1
.L16:
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cmp	DWORD PTR -60[rbp], eax
	jl	.L17
	mov	ecx, DWORD PTR -64[rbp]
	movsx	rax, ecx
	imul	rax, rax, 780903145
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	cmp	edx, 10
	je	.L18
	mov	ecx, DWORD PTR -64[rbp]
	movsx	rax, ecx
	imul	rax, rax, 780903145
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	jmp	.L19
.L18:
	mov	edx, 0
.L19:
	mov	DWORD PTR -64[rbp], edx
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 9
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	cmp	DWORD PTR -64[rbp], eax
	je	.L20
	mov	eax, 0
	jmp	.L21
.L20:
	mov	eax, 1
.L21:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	check_bg_ucn, .-check_bg_ucn
	.globl	is_string_equals
	.type	is_string_equals, @function
is_string_equals:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L24
.L28:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L25
	mov	eax, 0
	jmp	.L26
.L25:
	add	DWORD PTR -4[rbp], 1
.L24:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L27
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L28
.L27:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L29
	mov	eax, 0
	jmp	.L26
.L29:
	mov	eax, 1
.L26:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	is_string_equals, .-is_string_equals
	.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	"122015004.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"bg\000"
	.align	2
.LC3:
	.ascii	"%d\012\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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #20
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	strb	r2, [r3, #8]
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L4+4
	bl	__isoc99_scanf
	sub	r3, fp, #24
	ldr	r1, .L4+8
	mov	r0, r3
	bl	check_ucn
	str	r0, [fp, #-28]
	ldr	r1, [fp, #-28]
	ldr	r0, .L4+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	check_ucn
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_ucn, %function
check_ucn:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, .L9
	ldr	r0, [fp, #-12]
	bl	is_string_equals
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r0, [fp, #-8]
	bl	check_bg_ucn
	mov	r3, r0
	b	.L8
.L7:
	mov	r3, #0
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.size	check_ucn, .-check_ucn
	.section	.rodata
	.align	2
.LC0:
	.word	2
	.word	4
	.word	8
	.word	5
	.word	10
	.word	9
	.word	7
	.word	3
	.word	6
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check_bg_ucn
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_bg_ucn, %function
check_bg_ucn:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-72]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #10
	beq	.L12
	mov	r3, #0
	b	.L25
.L12:
	ldr	r3, [fp, #-72]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #48
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, #5
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-72]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #48
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r3, .L27+4
	sub	ip, fp, #44
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, [fp, #-64]
	cmp	r3, #20
	ble	.L14
	ldr	r3, [fp, #-64]
	cmp	r3, #32
	bgt	.L14
	ldr	r3, [fp, #-64]
	sub	r3, r3, #20
	str	r3, [fp, #-64]
	b	.L15
.L14:
	ldr	r3, [fp, #-64]
	cmp	r3, #40
	ble	.L15
	ldr	r3, [fp, #-64]
	cmp	r3, #52
	bgt	.L15
	ldr	r3, [fp, #-64]
	sub	r3, r3, #40
	str	r3, [fp, #-64]
.L15:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	ble	.L16
	ldr	r3, [fp, #-64]
	cmp	r3, #12
	ble	.L17
.L16:
	mov	r3, #0
	b	.L25
.L17:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	ble	.L18
	ldr	r3, [fp, #-48]
	cmp	r3, #31
	ble	.L19
.L18:
	mov	r3, #0
	b	.L25
.L19:
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L20
.L21:
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #48
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-40]
	mul	r3, r2, r3
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L20:
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L21
	ldr	r1, [fp, #-60]
	ldr	r3, .L27+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #10
	beq	.L22
	ldr	r1, [fp, #-60]
	ldr	r3, .L27+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	b	.L23
.L22:
	mov	r2, #0
.L23:
	str	r2, [fp, #-60]
	ldr	r3, [fp, #-72]
	add	r3, r3, #9
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	beq	.L24
	mov	r3, #0
	b	.L25
.L24:
	mov	r3, #1
.L25:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC5
	.word	.LC0
	.word	780903145
	.size	check_bg_ucn, .-check_bg_ucn
	.align	2
	.global	is_string_equals
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_string_equals, %function
is_string_equals:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L30
.L34:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L31
	mov	r3, #0
	b	.L32
.L31:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L30:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L33
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L34
.L33:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L35
	mov	r3, #0
	b	.L32
.L35:
	mov	r3, #1
.L32:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_string_equals, .-is_string_equals
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
