	.file	"922481.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter total weight of knapsack"
.LC1:
	.string	"%d"
.LC2:
	.string	"Enter no. of items"
.LC3:
	.string	"Enter their profits"
.LC4:
	.string	"Enter their weights"
.LC5:
	.string	"%d  "
.LC6:
	.string	"Maximum profit is %d\n"
.LC7:
	.string	"Item no. %d = %d kg\n"
	.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
	sub	rsp, 1792
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -1616[rbp]
	mov	eax, 0
	mov	ecx, 200
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -1776[rbp], 0
	mov	QWORD PTR -1768[rbp], 0
	mov	QWORD PTR -1760[rbp], 0
	mov	QWORD PTR -1752[rbp], 0
	mov	QWORD PTR -1744[rbp], 0
	mov	QWORD PTR -1736[rbp], 0
	mov	QWORD PTR -1728[rbp], 0
	mov	QWORD PTR -1720[rbp], 0
	mov	QWORD PTR -1712[rbp], 0
	mov	QWORD PTR -1704[rbp], 0
	mov	QWORD PTR -1696[rbp], 0
	mov	QWORD PTR -1688[rbp], 0
	mov	QWORD PTR -1680[rbp], 0
	mov	QWORD PTR -1672[rbp], 0
	mov	QWORD PTR -1664[rbp], 0
	mov	QWORD PTR -1656[rbp], 0
	mov	QWORD PTR -1648[rbp], 0
	mov	QWORD PTR -1640[rbp], 0
	mov	QWORD PTR -1632[rbp], 0
	mov	QWORD PTR -1624[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -1788[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rax, -1792[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -1784[rbp], 1
	jmp	.L2
.L3:
	lea	rdx, -1776[rbp]
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -1784[rbp], 1
.L2:
	mov	eax, DWORD PTR -1792[rbp]
	cmp	DWORD PTR -1784[rbp], eax
	jle	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -1784[rbp], 1
	jmp	.L4
.L5:
	lea	rdx, -1696[rbp]
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -1784[rbp], 1
.L4:
	mov	eax, DWORD PTR -1792[rbp]
	cmp	DWORD PTR -1784[rbp], eax
	jle	.L5
	mov	DWORD PTR -1784[rbp], 1
	jmp	.L6
.L11:
	mov	DWORD PTR -1780[rbp], 1
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	mov	eax, DWORD PTR -1696[rbp+rax*4]
	cmp	DWORD PTR -1780[rbp], eax
	jge	.L8
	mov	eax, DWORD PTR -1784[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rcx, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	edx, DWORD PTR -1616[rbp+rax*4]
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -1784[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	mov	DWORD PTR -1616[rbp+rax*4], edx
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	mov	ecx, DWORD PTR -1776[rbp+rax*4]
	mov	eax, DWORD PTR -1784[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	mov	esi, DWORD PTR -1696[rbp+rax*4]
	mov	eax, DWORD PTR -1780[rbp]
	sub	eax, esi
	movsx	rsi, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	mov	eax, DWORD PTR -1616[rbp+rax*4]
	lea	edx, [rcx+rax]
	mov	eax, DWORD PTR -1784[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rsi, eax
	movsx	rcx, ecx
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	mov	eax, DWORD PTR -1616[rbp+rax*4]
	mov	esi, edx
	mov	edi, eax
	call	max
	mov	edx, eax
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -1784[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	mov	DWORD PTR -1616[rbp+rax*4], edx
.L9:
	add	DWORD PTR -1780[rbp], 1
.L7:
	mov	eax, DWORD PTR -1788[rbp]
	cmp	DWORD PTR -1780[rbp], eax
	jle	.L10
	add	DWORD PTR -1784[rbp], 1
.L6:
	mov	eax, DWORD PTR -1792[rbp]
	cmp	DWORD PTR -1784[rbp], eax
	jle	.L11
	mov	DWORD PTR -1784[rbp], 0
	jmp	.L12
.L15:
	mov	DWORD PTR -1780[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -1784[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR -1616[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -1780[rbp], 1
.L13:
	mov	eax, DWORD PTR -1788[rbp]
	cmp	DWORD PTR -1780[rbp], eax
	jle	.L14
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -1784[rbp], 1
.L12:
	mov	eax, DWORD PTR -1792[rbp]
	cmp	DWORD PTR -1784[rbp], eax
	jle	.L15
	mov	eax, DWORD PTR -1792[rbp]
	mov	edx, DWORD PTR -1788[rbp]
	movsx	rcx, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR -1616[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1792[rbp]
	mov	DWORD PTR -1784[rbp], eax
	mov	eax, DWORD PTR -1788[rbp]
	mov	DWORD PTR -1780[rbp], eax
	jmp	.L16
.L18:
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -1784[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	ecx, DWORD PTR -1616[rbp+rax*4]
	mov	eax, DWORD PTR -1784[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -1780[rbp]
	movsx	rsi, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	mov	eax, DWORD PTR -1616[rbp+rax*4]
	cmp	ecx, eax
	je	.L17
	mov	edx, DWORD PTR -1788[rbp]
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	mov	ecx, DWORD PTR -1696[rbp+rax*4]
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -1788[rbp], eax
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	mov	edx, DWORD PTR -1696[rbp+rax*4]
	mov	eax, DWORD PTR -1784[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	sub	DWORD PTR -1784[rbp], 1
.L16:
	cmp	DWORD PTR -1784[rbp], 0
	jg	.L18
	mov	eax, DWORD PTR -1788[rbp]
	test	eax, eax
	jg	.L18
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	max
	.type	max, @function
max:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L22
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L23
.L22:
	mov	eax, DWORD PTR -8[rbp]
.L23:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.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	"922481.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter total weight of knapsack\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Enter no. of items\000"
	.align	2
.LC3:
	.ascii	"Enter their profits\000"
	.align	2
.LC4:
	.ascii	"Enter their weights\000"
	.align	2
.LC5:
	.ascii	"%d  \000"
	.align	2
.LC6:
	.ascii	"Maximum profit is %d\012\000"
	.align	2
.LC7:
	.ascii	"Item no. %d = %d kg\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1784
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1776
	sub	sp, sp, #8
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1600
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1600
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1760
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #80
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1680
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #80
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, .L21+4
	bl	puts
	sub	r3, fp, #1776
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r0, .L21+12
	bl	puts
	sub	r3, fp, #1776
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r0, .L21+16
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-1776]
	b	.L2
.L3:
	sub	r3, fp, #1760
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1776]
	lsl	r2, r2, #2
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-1776]
	add	r3, r3, #1
	str	r3, [fp, #-1776]
.L2:
	ldr	r3, [fp, #-1784]
	ldr	r2, [fp, #-1776]
	cmp	r2, r3
	ble	.L3
	ldr	r0, .L21+20
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-1776]
	b	.L4
.L5:
	sub	r3, fp, #1680
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1776]
	lsl	r2, r2, #2
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L21+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-1776]
	add	r3, r3, #1
	str	r3, [fp, #-1776]
.L4:
	ldr	r3, [fp, #-1784]
	ldr	r2, [fp, #-1776]
	cmp	r2, r3
	ble	.L5
	mov	r3, #1
	str	r3, [fp, #-1776]
	b	.L6
.L11:
	mov	r3, #1
	str	r3, [fp, #-1772]
	b	.L7
.L10:
	ldr	r3, [fp, #-1776]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1684]
	ldr	r2, [fp, #-1772]
	cmp	r2, r3
	bge	.L8
	ldr	r3, [fp, #-1776]
	sub	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-1604]
	ldr	r2, [fp, #-1776]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1604]
	b	.L9
.L8:
	ldr	r3, [fp, #-1776]
	sub	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	ip, [r3, #-1604]
	ldr	r3, [fp, #-1776]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-1764]
	ldr	r3, [fp, #-1776]
	sub	r2, r3, #1
	ldr	r3, [fp, #-1776]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-1684]
	ldr	r0, [fp, #-1772]
	sub	r0, r0, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r0
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1604]
	add	r3, r1, r3
	mov	r1, r3
	mov	r0, ip
	bl	max
	mov	r1, r0
	ldr	r2, [fp, #-1776]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1604]
.L9:
	ldr	r3, [fp, #-1772]
	add	r3, r3, #1
	str	r3, [fp, #-1772]
.L7:
	ldr	r3, [fp, #-1780]
	ldr	r2, [fp, #-1772]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-1776]
	add	r3, r3, #1
	str	r3, [fp, #-1776]
.L6:
	ldr	r3, [fp, #-1784]
	ldr	r2, [fp, #-1776]
	cmp	r2, r3
	ble	.L11
	mov	r3, #0
	str	r3, [fp, #-1776]
	b	.L12
.L15:
	mov	r3, #0
	str	r3, [fp, #-1772]
	b	.L13
.L14:
	ldr	r2, [fp, #-1776]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1604]
	mov	r1, r3
	ldr	r0, .L21+24
	bl	printf
	ldr	r3, [fp, #-1772]
	add	r3, r3, #1
	str	r3, [fp, #-1772]
.L13:
	ldr	r3, [fp, #-1780]
	ldr	r2, [fp, #-1772]
	cmp	r2, r3
	ble	.L14
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-1776]
	add	r3, r3, #1
	str	r3, [fp, #-1776]
.L12:
	ldr	r3, [fp, #-1784]
	ldr	r2, [fp, #-1776]
	cmp	r2, r3
	ble	.L15
	ldr	r2, [fp, #-1784]
	ldr	r1, [fp, #-1780]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1604]
	mov	r1, r3
	ldr	r0, .L21+28
	bl	printf
	ldr	r3, [fp, #-1784]
	str	r3, [fp, #-1776]
	ldr	r3, [fp, #-1780]
	str	r3, [fp, #-1772]
	b	.L16
.L18:
	ldr	r2, [fp, #-1776]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-1604]
	ldr	r3, [fp, #-1776]
	sub	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1772]
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1604]
	cmp	r1, r3
	beq	.L17
	ldr	r2, [fp, #-1780]
	ldr	r3, [fp, #-1776]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-1684]
	sub	r3, r2, r3
	str	r3, [fp, #-1780]
	ldr	r3, [fp, #-1776]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1684]
	mov	r2, r3
	ldr	r1, [fp, #-1776]
	ldr	r0, .L21+32
	bl	printf
.L17:
	ldr	r3, [fp, #-1776]
	sub	r3, r3, #1
	str	r3, [fp, #-1776]
.L16:
	ldr	r3, [fp, #-1776]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, [fp, #-1780]
	cmp	r3, #0
	bgt	.L18
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L24
	ldr	r3, [fp, #-8]
	b	.L25
.L24:
	ldr	r3, [fp, #-12]
.L25:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
