	.file	"186084.c"
	.intel_syntax noprefix
	.text
	.globl	kadane
	.type	kadane, @function
kadane:
.LFB0:
	.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	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -44[rbp], ecx
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], -2147483648
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], -1
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	add	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L3
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L4
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
.L4:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L5
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	je	.L6
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	DWORD PTR -8[rbp], 1
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L9
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
.L9:
	add	DWORD PTR -8[rbp], 1
.L8:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L10
	mov	eax, DWORD PTR -12[rbp]
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	kadane, .-kadane
	.section	.rodata
.LC0:
	.string	"(Top, Left) (%d, %d)\n"
.LC1:
	.string	"(Bottom, Right) (%d, %d)\n"
.LC2:
	.string	"Max sum is: %d\n"
	.text
	.globl	findMaxSum
	.type	findMaxSum, @function
findMaxSum:
.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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -68[rbp], -2147483648
	mov	DWORD PTR -48[rbp], 0
	jmp	.L12
.L18:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -44[rbp], eax
	jmp	.L13
.L17:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	ecx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	lea	edx, [rcx+rax]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	DWORD PTR -32[rbp+rax*4], edx
	add	DWORD PTR -40[rbp], 1
.L14:
	cmp	DWORD PTR -40[rbp], 3
	jle	.L15
	lea	rdx, -72[rbp]
	lea	rsi, -76[rbp]
	lea	rax, -32[rbp]
	mov	ecx, 4
	mov	rdi, rax
	call	kadane
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jle	.L16
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -52[rbp], eax
.L16:
	add	DWORD PTR -44[rbp], 1
.L13:
	cmp	DWORD PTR -44[rbp], 4
	jle	.L17
	add	DWORD PTR -48[rbp], 1
.L12:
	cmp	DWORD PTR -48[rbp], 4
	jle	.L18
	mov	edx, DWORD PTR -64[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -60[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	findMaxSum, .-findMaxSum
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -96[rbp], 1
	mov	DWORD PTR -92[rbp], 2
	mov	DWORD PTR -88[rbp], -1
	mov	DWORD PTR -84[rbp], -4
	mov	DWORD PTR -80[rbp], -20
	mov	DWORD PTR -76[rbp], -8
	mov	DWORD PTR -72[rbp], -3
	mov	DWORD PTR -68[rbp], 4
	mov	DWORD PTR -64[rbp], 2
	mov	DWORD PTR -60[rbp], 1
	mov	DWORD PTR -56[rbp], 3
	mov	DWORD PTR -52[rbp], 8
	mov	DWORD PTR -48[rbp], 10
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 3
	mov	DWORD PTR -36[rbp], -4
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], 1
	mov	DWORD PTR -24[rbp], 7
	mov	DWORD PTR -20[rbp], -6
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	findMaxSum
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"186084.c"
	.text
	.align	2
	.global	kadane
	.syntax unified
	.arm
	.fpu softvfp
	.type	kadane, %function
kadane:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #-2147483648
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	mvn	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L3
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L4
.L3:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L4
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
.L4:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L5
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L6
	ldr	r3, [fp, #-16]
	b	.L7
.L6:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L8
.L10:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L9
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
.L9:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L8:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L10
	ldr	r3, [fp, #-16]
.L7:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	kadane, .-kadane
	.section	.rodata
	.align	2
.LC1:
	.ascii	"(Top, Left) (%d, %d)\012\000"
	.align	2
.LC2:
	.ascii	"(Bottom, Right) (%d, %d)\012\000"
	.align	2
.LC3:
	.ascii	"Max sum is: %d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	findMaxSum
	.syntax unified
	.arm
	.fpu softvfp
	.type	findMaxSum, %function
findMaxSum:
	@ 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, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #-2147483648
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L12
.L18:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-36]
	b	.L13
.L17:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L14
.L15:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-20]
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-72]
	add	r3, r3, r2
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	add	r2, r1, r3
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-20]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L14:
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	ble	.L15
	sub	r2, fp, #64
	sub	r1, fp, #68
	sub	r0, fp, #24
	mov	r3, #4
	bl	kadane
	str	r0, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	ble	.L16
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-68]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-44]
.L16:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L13:
	ldr	r3, [fp, #-36]
	cmp	r3, #4
	ble	.L17
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L12:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ble	.L18
	ldr	r2, [fp, #-56]
	ldr	r1, [fp, #-48]
	ldr	r0, .L20+4
	bl	printf
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-44]
	ldr	r0, .L20+8
	bl	printf
	ldr	r1, [fp, #-60]
	ldr	r0, .L20+12
	bl	printf
	nop
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	findMaxSum, .-findMaxSum
	.section	.rodata
	.align	2
.LC0:
	.word	1
	.word	2
	.word	-1
	.word	-4
	.word	-20
	.word	-8
	.word	-3
	.word	4
	.word	2
	.word	1
	.word	3
	.word	8
	.word	10
	.word	1
	.word	3
	.word	-4
	.word	-1
	.word	1
	.word	7
	.word	-6
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L25+4
	sub	r3, fp, #88
	mov	r1, r2
	mov	r2, #80
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #88
	mov	r0, r3
	bl	findMaxSum
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC5
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
