	.file	"13421.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"compare after overflow is TRUE"
	.align 8
.LC1:
	.string	"compare after overflow is FALSE"
	.text
	.globl	compareOvf
	.type	compareOvf, @function
compareOvf:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, eax
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 4194303
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L4
.L2:
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L4:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	compareOvf, .-compareOvf
	.section	.rodata
	.align 8
.LC2:
	.string	"divide after overflow = %d (0x%x)\n"
	.text
	.globl	divideOvf
	.type	divideOvf, @function
divideOvf:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, eax
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, -2147483648
	cdq
	idiv	DWORD PTR -8[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	divideOvf, .-divideOvf
	.section	.rodata
	.align 8
.LC3:
	.string	"divide negative value by power-of-2 = %d (0x%x)\n"
	.text
	.globl	divideNeg
	.type	divideNeg, @function
divideNeg:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, eax
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 262143[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 18
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	divideNeg, .-divideNeg
	.section	.rodata
	.align 8
.LC4:
	.string	"subtract after overflow = %d (0x%x)\n"
	.text
	.globl	subtractOvf
	.type	subtractOvf, @function
subtractOvf:
.LFB3:
	.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, eax
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, -2147483648
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	subtractOvf, .-subtractOvf
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	DWORD PTR -4[rbp], 2097152
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	compareOvf
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 2[rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, edx
	mov	edi, eax
	call	divideOvf
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 2[rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, edx
	mov	edi, eax
	call	divideNeg
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 2[rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, edx
	mov	edi, eax
	call	subtractOvf
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"13421.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"compare after overflow is TRUE\000"
	.align	2
.LC1:
	.ascii	"compare after overflow is FALSE\000"
	.text
	.align	2
	.global	compareOvf
	.syntax unified
	.arm
	.fpu softvfp
	.type	compareOvf, %function
compareOvf:
	@ 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	r3, [fp, #-16]
	mul	r2, r3, r3
	ldr	r3, [fp, #-20]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #4194304
	bge	.L2
	ldr	r0, .L5
	bl	puts
	b	.L4
.L2:
	ldr	r0, .L5+4
	bl	puts
.L4:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.size	compareOvf, .-compareOvf
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC2:
	.ascii	"divide after overflow = %d (0x%x)\012\000"
	.text
	.align	2
	.global	divideOvf
	.syntax unified
	.arm
	.fpu softvfp
	.type	divideOvf, %function
divideOvf:
	@ 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	r3, [fp, #-16]
	mul	r2, r3, r3
	ldr	r3, [fp, #-20]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	mov	r0, #-2147483648
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.size	divideOvf, .-divideOvf
	.section	.rodata
	.align	2
.LC3:
	.ascii	"divide negative value by power-of-2 = %d (0x%x)\012"
	.ascii	"\000"
	.text
	.align	2
	.global	divideNeg
	.syntax unified
	.arm
	.fpu softvfp
	.type	divideNeg, %function
divideNeg:
	@ 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	r3, [fp, #-16]
	mul	r2, r3, r3
	ldr	r3, [fp, #-20]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	sub	r2, r3, #-67108863
	sub	r2, r2, #66846720
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #18
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L11
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC3
	.size	divideNeg, .-divideNeg
	.section	.rodata
	.align	2
.LC4:
	.ascii	"subtract after overflow = %d (0x%x)\012\000"
	.text
	.align	2
	.global	subtractOvf
	.syntax unified
	.arm
	.fpu softvfp
	.type	subtractOvf, %function
subtractOvf:
	@ 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	r3, [fp, #-16]
	mul	r2, r3, r3
	ldr	r3, [fp, #-20]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #-2147483648
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L14
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.size	subtractOvf, .-subtractOvf
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #2097152
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	compareOvf
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	divideOvf
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	divideNeg
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	subtractOvf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
