	.file	"387358.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Select an option from the following ghats:\n1)Ghat1\n2)Ghat2\n3)Ghat3\n4)Ghat4"
.LC1:
	.string	"%d"
	.align 8
.LC2:
	.string	"Seat available in Ghat%d is:\t %d\n"
.LC3:
	.string	"\nEnter seats wanted:\t "
.LC4:
	.string	"Seat alloted"
.LC5:
	.string	"Remaining seats:\t%d\n"
.LC6:
	.string	"Alloted!"
	.align 8
.LC7:
	.string	"No remaining seats avialble in Ghat%d!\nRemaining seats: %d"
.LC8:
	.string	"Choose from another ghats."
.LC9:
	.string	"Ghat%d has seats: %d\n"
	.align 8
.LC10:
	.string	"Enter Ghat number from above option with appropriate seats:\t"
	.align 8
.LC11:
	.string	"Enter seats required in the selected ghat: "
.LC12:
	.string	"Seat Alloted!"
	.align 8
.LC13:
	.string	"Remaining seats available in Ghat%d: %d\n"
.LC14:
	.string	"Enter valid command."
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 10
	mov	DWORD PTR -28[rbp], 40
	mov	DWORD PTR -24[rbp], 20
	mov	DWORD PTR -20[rbp], 30
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L9:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -44[rbp]
	cmp	edx, eax
	jle	.L3
	mov	eax, DWORD PTR -44[rbp]
	test	eax, eax
	js	.L3
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	esi, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -40[rbp]
	lea	ecx, -1[rdx]
	sub	eax, esi
	mov	edx, eax
	movsx	rax, ecx
	mov	DWORD PTR -32[rbp+rax*4], edx
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, 1
	jne	.L4
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	cmp	eax, 1
	jne	.L4
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	edx, DWORD PTR -40[rbp]
	lea	ecx, -1[rdx]
	lea	edx, -1[rax]
	movsx	rax, ecx
	mov	DWORD PTR -32[rbp+rax*4], edx
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -44[rbp]
	cmp	edx, eax
	jge	.L5
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	cmp	eax, 1
	jle	.L7
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	edx, DWORD PTR -36[rbp]
	lea	ecx, 1[rdx]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	add	DWORD PTR -36[rbp], 1
.L6:
	cmp	DWORD PTR -36[rbp], 3
	jle	.L8
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	mov	esi, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -40[rbp]
	lea	ecx, -1[rdx]
	sub	eax, esi
	mov	edx, eax
	movsx	rax, ecx
	mov	DWORD PTR -32[rbp+rax*4], edx
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -32[rbp+rax*4]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L5:
	lea	rdi, .LC14[rip]
	call	puts@PLT
.L2:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	test	eax, eax
	jg	.L9
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"387358.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Select an option from the following ghats:\0121)Gha"
	.ascii	"t1\0122)Ghat2\0123)Ghat3\0124)Ghat4\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Seat available in Ghat%d is:\011 %d\012\000"
	.align	2
.LC4:
	.ascii	"\012Enter seats wanted:\011 \000"
	.align	2
.LC5:
	.ascii	"Seat alloted\000"
	.align	2
.LC6:
	.ascii	"Remaining seats:\011%d\012\000"
	.align	2
.LC7:
	.ascii	"Alloted!\000"
	.align	2
.LC8:
	.ascii	"No remaining seats avialble in Ghat%d!\012Remaining"
	.ascii	" seats: %d\000"
	.align	2
.LC9:
	.ascii	"Choose from another ghats.\000"
	.align	2
.LC10:
	.ascii	"Ghat%d has seats: %d\012\000"
	.align	2
.LC11:
	.ascii	"Enter Ghat number from above option with appropriat"
	.ascii	"e seats:\011\000"
	.align	2
.LC12:
	.ascii	"Enter seats required in the selected ghat: \000"
	.align	2
.LC13:
	.ascii	"Seat Alloted!\000"
	.align	2
.LC14:
	.ascii	"Remaining seats available in Ghat%d: %d\012\000"
	.align	2
.LC15:
	.ascii	"Enter valid command.\000"
	.align	2
.LC0:
	.word	10
	.word	40
	.word	20
	.word	30
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, .L12+8
	bl	puts
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	ldr	r1, [fp, #-32]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r2, r3
	ldr	r0, .L12+16
	bl	printf
	b	.L2
.L9:
	ldr	r0, .L12+20
	bl	puts
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L3
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	blt	.L3
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-20]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	sub	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-20]
	ldr	r0, .L12+24
	bl	puts
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, r3
	ldr	r0, .L12+28
	bl	printf
	b	.L2
.L3:
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L4
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmp	r3, #1
	bne	.L4
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-20]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	sub	r2, r2, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-20]
	ldr	r0, .L12+32
	bl	puts
	ldr	r1, [fp, #-32]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r2, r3
	ldr	r0, .L12+36
	bl	printf
	b	.L2
.L4:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L5
	ldr	r0, .L12+40
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L6
.L8:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmp	r3, #1
	ble	.L7
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r2, r3
	ldr	r0, .L12+44
	bl	printf
.L7:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L6:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L8
	ldr	r0, .L12+48
	bl	puts
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	ldr	r0, .L12+52
	bl	puts
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L12+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-20]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	sub	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-20]
	ldr	r0, .L12+56
	bl	puts
	ldr	r1, [fp, #-32]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r2, r3
	ldr	r0, .L12+60
	bl	printf
	b	.L2
.L5:
	ldr	r0, .L12+64
	bl	puts
.L2:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bgt	.L9
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC16
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
