	.file	"231394612.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Bye."
	.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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 3557690222406364262
	movabs	rdx, 127961641398832
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	DWORD PTR -80[rbp], 0
	movabs	rax, 3701805410482220134
	movabs	rdx, 127961641398577
	mov	QWORD PTR -76[rbp], rax
	mov	QWORD PTR -68[rbp], rdx
	mov	DWORD PTR -60[rbp], 0
	movabs	rax, 3773863004520148070
	movabs	rdx, 127961641399348
	mov	QWORD PTR -56[rbp], rax
	mov	QWORD PTR -48[rbp], rdx
	mov	DWORD PTR -40[rbp], 0
	movabs	rax, 3845920598558076006
	movabs	rdx, 127961641400625
	mov	QWORD PTR -36[rbp], rax
	mov	QWORD PTR -28[rbp], rdx
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -112[rbp], 102
	mov	DWORD PTR -108[rbp], 311
	mov	DWORD PTR -104[rbp], 444
	mov	DWORD PTR -100[rbp], 519
	call	main_menu
	mov	BYTE PTR -113[rbp], al
	jmp	.L2
.L3:
	movsx	eax, BYTE PTR -113[rbp]
	sub	eax, 97
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	movsx	eax, BYTE PTR -113[rbp]
	sub	eax, 97
	lea	rsi, -96[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	sal	rax, 2
	add	rax, rsi
	mov	esi, edx
	mov	rdi, rax
	call	process_flight
	call	main_menu
	mov	BYTE PTR -113[rbp], al
.L2:
	cmp	BYTE PTR -113[rbp], 113
	jne	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.string	"-----------------------------------------------"
	.align 8
.LC2:
	.string	"To choose a function, enter its letter label:"
.LC3:
	.string	"a) Show number of empty seats"
.LC4:
	.string	"b) Show list of empty seats"
	.align 8
.LC5:
	.string	"c) Show alphabetical list of empty seats"
	.align 8
.LC6:
	.string	"d) Assign a customer to a seat assignment"
.LC7:
	.string	"e) Delete a seat assignment"
.LC8:
	.string	"f) Quit"
.LC9:
	.string	"Enter a, b, c, d, e or f:"
.LC10:
	.string	"abcdef"
	.text
	.globl	show_menu
	.type	show_menu, @function
show_menu:
.LFB7:
	.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
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	call	eat_line
	jmp	.L7
.L8:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	call	eat_line
.L7:
	movsx	eax, BYTE PTR -1[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	call	strchr@PLT
	test	rax, rax
	je	.L8
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	show_menu, .-show_menu
	.globl	eat_line
	.type	eat_line, @function
eat_line:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	jmp	.L11
.L12:
	nop
.L11:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L12
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	eat_line, .-eat_line
	.globl	get_empty_seat_number
	.type	get_empty_seat_number, @function
get_empty_seat_number:
.LFB9:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L16:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L15
	add	DWORD PTR -8[rbp], 1
.L15:
	add	DWORD PTR -4[rbp], 1
.L14:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L16
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_empty_seat_number, .-get_empty_seat_number
	.globl	init_seats
	.type	init_seats, @function
init_seats:
.LFB10:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	DWORD PTR 4[rax], 0
	add	DWORD PTR -4[rbp], 1
.L19:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L20
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	init_seats, .-init_seats
	.section	.rodata
.LC11:
	.string	"%d "
	.text
	.globl	show_empty_seats
	.type	show_empty_seats, @function
show_empty_seats:
.LFB11:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L22
.L24:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	add	DWORD PTR -4[rbp], 1
.L22:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L24
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	show_empty_seats, .-show_empty_seats
	.section	.rodata
.LC12:
	.string	"Enter custom name:"
.LC13:
	.string	"%s %s"
.LC14:
	.string	"Seat %d assigned to %s %s\n"
.LC15:
	.string	"Sorry, seats are full."
	.text
	.globl	assign_customer_to_seat_and_save
	.type	assign_customer_to_seat_and_save, @function
assign_customer_to_seat_and_save:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rax, -64[rbp]
	lea	rdx, 20[rax]
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	eat_line
	mov	DWORD PTR -68[rbp], 0
	jmp	.L26
.L29:
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L27
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rax], rcx
	mov	QWORD PTR 16[rax], rbx
	mov	rcx, QWORD PTR -48[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rcx
	mov	QWORD PTR 32[rax], rbx
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	DWORD PTR 4[rax], 1
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, -64[rbp]
	lea	rcx, 20[rdx]
	lea	rdx, -64[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 48
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L30
.L27:
	add	DWORD PTR -68[rbp], 1
.L26:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L29
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, 0
.L30:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	assign_customer_to_seat_and_save, .-assign_customer_to_seat_and_save
	.section	.rodata
.LC16:
	.string	"Seat %d, Customer: %s %s\n"
	.text
	.globl	show_seats
	.type	show_seats, @function
show_seats:
.LFB13:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L33
.L35:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	jne	.L34
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	lea	rcx, 28[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	rax, rsi
	add	rax, rax
	add	rax, rsi
	sal	rax, 4
	mov	rsi, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rsi
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L34:
	add	DWORD PTR -4[rbp], 1
.L33:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L35
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	show_seats, .-show_seats
	.section	.rodata
	.align 8
.LC17:
	.string	"Which seat do you want to delete assignment"
.LC18:
	.string	"%d"
.LC19:
	.string	"Seat %d now is empty.\n"
.LC20:
	.string	"Invalid seat id: %d"
	.text
	.globl	delete_seat_assignment
	.type	delete_seat_assignment, @function
delete_seat_assignment:
.LFB14:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	eat_line
	mov	eax, DWORD PTR -12[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L37
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	DWORD PTR 4[rax], 0
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 48
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L39
.L37:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L39:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	delete_seat_assignment, .-delete_seat_assignment
	.section	.rodata
.LC21:
	.string	"r+b"
.LC22:
	.string	"Cannot open file %s\n"
.LC23:
	.string	"Init flight"
	.align 8
.LC24:
	.string	"%d empty seats left for flight %d.\n"
.LC25:
	.string	"Empty seats for flight %d: \n"
.LC26:
	.string	"Seats for flight %d: \n"
	.align 8
.LC27:
	.string	"Assign customer to seat for flight %d: \n"
	.align 8
.LC28:
	.string	"Delete a seat for flight %d: \n"
	.text
	.globl	process_flight
	.type	process_flight, @function
process_flight:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 624
	mov	QWORD PTR -616[rbp], rdi
	mov	DWORD PTR -620[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -616[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -600[rbp], rax
	cmp	QWORD PTR -600[rbp], 0
	jne	.L42
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -616[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L42:
	mov	rdx, QWORD PTR -600[rbp]
	lea	rax, -592[rbp]
	mov	rcx, rdx
	mov	edx, 12
	mov	esi, 48
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L44
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	init_seats
	lea	rdi, .LC23[rip]
	call	puts@PLT
	jmp	.L44
.L52:
	movsx	eax, BYTE PTR -601[rbp]
	sub	eax, 97
	cmp	eax, 4
	ja	.L54
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L47[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L47[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L47:
	.long	.L51-.L47
	.long	.L50-.L47
	.long	.L49-.L47
	.long	.L48-.L47
	.long	.L46-.L47
	.text
.L51:
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	get_empty_seat_number
	mov	ecx, eax
	mov	eax, DWORD PTR -620[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L44
.L50:
	mov	eax, DWORD PTR -620[rbp]
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	show_empty_seats
	jmp	.L44
.L49:
	mov	eax, DWORD PTR -620[rbp]
	mov	esi, eax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	show_seats
	jmp	.L44
.L48:
	mov	eax, DWORD PTR -620[rbp]
	mov	esi, eax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -600[rbp]
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	assign_customer_to_seat_and_save
	jmp	.L44
.L46:
	mov	eax, DWORD PTR -620[rbp]
	mov	esi, eax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -600[rbp]
	lea	rax, -592[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	delete_seat_assignment
.L54:
	nop
.L44:
	call	show_menu
	mov	BYTE PTR -601[rbp], al
	cmp	BYTE PTR -601[rbp], 102
	jne	.L52
	mov	rax, QWORD PTR -600[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	process_flight, .-process_flight
	.section	.rodata
	.align 8
.LC29:
	.string	"Which flight would you like to travel?"
	.align 8
.LC30:
	.string	"a) Flight 102               b) Flight 311"
	.align 8
.LC31:
	.string	"c) Flight 444               d) Flight 518"
.LC32:
	.string	"q) quit"
.LC33:
	.string	"Enter a, b, c, d or q:"
.LC34:
	.string	"abcdq"
	.text
	.globl	main_menu
	.type	main_menu, @function
main_menu:
.LFB16:
	.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
	lea	rdi, .LC29[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	call	eat_line
	jmp	.L56
.L57:
	lea	rdi, .LC33[rip]
	call	puts@PLT
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	call	eat_line
.L56:
	movsx	eax, BYTE PTR -1[rbp]
	mov	esi, eax
	lea	rdi, .LC34[rip]
	call	strchr@PLT
	test	rax, rax
	je	.L57
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main_menu, .-main_menu
	.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	"231394612.c"
	.text
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Bye.\000"
	.align	2
.LC0:
	.ascii	"flight_102.dat\000"
	.space	5
	.ascii	"flight_311.dat\000"
	.space	5
	.ascii	"flight_444.dat\000"
	.space	5
	.ascii	"flight_519.dat\000"
	.space	5
	.align	2
.LC1:
	.word	102
	.word	311
	.word	444
	.word	519
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L6+4
	sub	r3, fp, #88
	mov	r1, r2
	mov	r2, #80
	mov	r0, r3
	bl	memcpy
	ldr	r3, .L6+8
	sub	ip, fp, #104
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	bl	main_menu
	mov	r3, r0
	strb	r3, [fp, #-105]
	b	.L2
.L3:
	ldrb	r3, [fp, #-105]	@ zero_extendqisi2
	sub	r2, r3, #97
	sub	r1, fp, #88
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r2, r1, r3
	ldrb	r3, [fp, #-105]	@ zero_extendqisi2
	sub	r3, r3, #97
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-100]
	mov	r1, r3
	mov	r0, r2
	bl	process_flight
	bl	main_menu
	mov	r3, r0
	strb	r3, [fp, #-105]
.L2:
	ldrb	r3, [fp, #-105]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L3
	ldr	r0, .L6+12
	bl	puts
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"-----------------------------------------------\000"
	.align	2
.LC5:
	.ascii	"To choose a function, enter its letter label:\000"
	.align	2
.LC6:
	.ascii	"a) Show number of empty seats\000"
	.align	2
.LC7:
	.ascii	"b) Show list of empty seats\000"
	.align	2
.LC8:
	.ascii	"c) Show alphabetical list of empty seats\000"
	.align	2
.LC9:
	.ascii	"d) Assign a customer to a seat assignment\000"
	.align	2
.LC10:
	.ascii	"e) Delete a seat assignment\000"
	.align	2
.LC11:
	.ascii	"f) Quit\000"
	.align	2
.LC12:
	.ascii	"Enter a, b, c, d, e or f:\000"
	.align	2
.LC13:
	.ascii	"abcdef\000"
	.text
	.align	2
	.global	show_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_menu, %function
show_menu:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L12
	bl	puts
	ldr	r0, .L12+4
	bl	puts
	ldr	r0, .L12+8
	bl	puts
	ldr	r0, .L12+12
	bl	puts
	ldr	r0, .L12+16
	bl	puts
	ldr	r0, .L12+20
	bl	puts
	ldr	r0, .L12+24
	bl	puts
	ldr	r0, .L12+28
	bl	puts
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	bl	eat_line
	b	.L9
.L10:
	ldr	r0, .L12+32
	bl	puts
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	bl	eat_line
.L9:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L12+36
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	show_menu, .-show_menu
	.align	2
	.global	eat_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	eat_line, %function
eat_line:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	b	.L15
.L16:
	nop
.L15:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L16
	nop
	nop
	pop	{fp, pc}
	.size	eat_line, .-eat_line
	.align	2
	.global	get_empty_seat_number
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_empty_seat_number, %function
get_empty_seat_number:
	@ 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, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L20:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L20
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_empty_seat_number, .-get_empty_seat_number
	.align	2
	.global	init_seats
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_seats, %function
init_seats:
	@ 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	.L23
.L24:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L24
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	init_seats, .-init_seats
	.section	.rodata
	.align	2
.LC14:
	.ascii	"%d \000"
	.text
	.align	2
	.global	show_empty_seats
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_empty_seats, %function
show_empty_seats:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L26
.L28:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L27
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29
	bl	printf
.L27:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L28
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC14
	.size	show_empty_seats, .-show_empty_seats
	.section	.rodata
	.align	2
.LC15:
	.ascii	"Enter custom name:\000"
	.align	2
.LC16:
	.ascii	"%s %s\000"
	.align	2
.LC17:
	.ascii	"Seat %d assigned to %s %s\012\000"
	.align	2
.LC18:
	.ascii	"Sorry, seats are full.\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	assign_customer_to_seat_and_save
	.syntax unified
	.arm
	.fpu softvfp
	.type	assign_customer_to_seat_and_save, %function
assign_customer_to_seat_and_save:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	str	r2, [fp, #-64]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L38+4
	bl	puts
	sub	r3, fp, #48
	add	r2, r3, #20
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L38+8
	bl	__isoc99_scanf
	bl	eat_line
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L32
.L35:
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L33
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	add	ip, r3, #8
	sub	lr, fp, #48
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldr	r1, [r3]
	sub	r3, fp, #48
	add	r3, r3, #20
	sub	r2, fp, #48
	ldr	r0, .L38+12
	bl	printf
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	fseek
	ldr	r2, [fp, #-52]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r0, r3, r2
	ldr	r3, [fp, #-64]
	mov	r2, #1
	mov	r1, #48
	bl	fwrite
	mov	r3, #1
	b	.L36
.L33:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L32:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	blt	.L35
	ldr	r0, .L38+16
	bl	puts
	mov	r3, #0
.L36:
	ldr	r2, .L38
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC19
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	assign_customer_to_seat_and_save, .-assign_customer_to_seat_and_save
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Seat %d, Customer: %s %s\012\000"
	.text
	.align	2
	.global	show_seats
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_seats, %function
show_seats:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L41
.L43:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r3, [r3, #4]
	cmp	r3, #1
	bne	.L42
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r1, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	add	r0, r3, #8
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	add	r3, r3, #28
	mov	r2, r0
	ldr	r0, .L44
	bl	printf
.L42:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L41:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L43
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC20
	.size	show_seats, .-show_seats
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Which seat do you want to delete assignment\000"
	.align	2
.LC22:
	.ascii	"%d\000"
	.align	2
.LC23:
	.ascii	"Seat %d now is empty.\012\000"
	.align	2
.LC24:
	.ascii	"Invalid seat id: %d\000"
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	delete_seat_assignment
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_seat_assignment, %function
delete_seat_assignment:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L51
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L51+4
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L51+8
	bl	__isoc99_scanf
	bl	eat_line
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L47
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L51+12
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r0, r3, r2
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #48
	bl	fwrite
	mov	r3, #1
	b	.L49
.L47:
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L51+16
	bl	printf
	mov	r3, #0
.L49:
	ldr	r2, .L51
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC25
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	delete_seat_assignment, .-delete_seat_assignment
	.section	.rodata
	.align	2
.LC26:
	.ascii	"r+b\000"
	.align	2
.LC27:
	.ascii	"Cannot open file %s\012\000"
	.align	2
.LC28:
	.ascii	"Init flight\000"
	.align	2
.LC29:
	.ascii	"%d empty seats left for flight %d.\012\000"
	.align	2
.LC30:
	.ascii	"Empty seats for flight %d: \012\000"
	.align	2
.LC31:
	.ascii	"Seats for flight %d: \012\000"
	.align	2
.LC32:
	.ascii	"Assign customer to seat for flight %d: \012\000"
	.align	2
.LC33:
	.ascii	"Delete a seat for flight %d: \012\000"
	.align	2
.LC34:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	process_flight
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_flight, %function
process_flight:
	@ args = 0, pretend = 0, frame = 600
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #600
	str	r0, [fp, #-600]
	str	r1, [fp, #-604]
	ldr	r3, .L67
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L67+4
	ldr	r0, [fp, #-600]
	bl	fopen
	str	r0, [fp, #-588]
	ldr	r3, [fp, #-588]
	cmp	r3, #0
	bne	.L54
	ldr	r3, .L67+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-600]
	ldr	r1, .L67+12
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L54:
	sub	r0, fp, #584
	ldr	r3, [fp, #-588]
	mov	r2, #12
	mov	r1, #48
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L56
	sub	r3, fp, #584
	mov	r1, #12
	mov	r0, r3
	bl	init_seats
	ldr	r0, .L67+16
	bl	puts
	b	.L56
.L64:
	ldrb	r3, [fp, #-589]	@ zero_extendqisi2
	sub	r3, r3, #97
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L66
.L59:
	.word	.L63
	.word	.L62
	.word	.L61
	.word	.L60
	.word	.L58
.L63:
	sub	r3, fp, #584
	mov	r1, #12
	mov	r0, r3
	bl	get_empty_seat_number
	mov	r3, r0
	ldr	r2, [fp, #-604]
	mov	r1, r3
	ldr	r0, .L67+20
	bl	printf
	b	.L56
.L62:
	ldr	r1, [fp, #-604]
	ldr	r0, .L67+24
	bl	printf
	sub	r3, fp, #584
	mov	r1, #12
	mov	r0, r3
	bl	show_empty_seats
	b	.L56
.L61:
	ldr	r1, [fp, #-604]
	ldr	r0, .L67+28
	bl	printf
	sub	r3, fp, #584
	mov	r1, #12
	mov	r0, r3
	bl	show_seats
	b	.L56
.L60:
	ldr	r1, [fp, #-604]
	ldr	r0, .L67+32
	bl	printf
	sub	r3, fp, #584
	ldr	r2, [fp, #-588]
	mov	r1, #12
	mov	r0, r3
	bl	assign_customer_to_seat_and_save
	b	.L56
.L58:
	ldr	r1, [fp, #-604]
	ldr	r0, .L67+36
	bl	printf
	sub	r3, fp, #584
	ldr	r2, [fp, #-588]
	mov	r1, #12
	mov	r0, r3
	bl	delete_seat_assignment
.L66:
	nop
.L56:
	bl	show_menu
	mov	r3, r0
	strb	r3, [fp, #-589]
	ldrb	r3, [fp, #-589]	@ zero_extendqisi2
	cmp	r3, #102
	bne	.L64
	ldr	r0, [fp, #-588]
	bl	fclose
	nop
	ldr	r3, .L67
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L65
	bl	__stack_chk_fail
.L65:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	.LC34
	.word	.LC26
	.word	stderr
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.size	process_flight, .-process_flight
	.section	.rodata
	.align	2
.LC35:
	.ascii	"Which flight would you like to travel?\000"
	.align	2
.LC36:
	.ascii	"a) Flight 102               b) Flight 311\000"
	.align	2
.LC37:
	.ascii	"c) Flight 444               d) Flight 518\000"
	.align	2
.LC38:
	.ascii	"q) quit\000"
	.align	2
.LC39:
	.ascii	"Enter a, b, c, d or q:\000"
	.align	2
.LC40:
	.ascii	"abcdq\000"
	.text
	.align	2
	.global	main_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	main_menu, %function
main_menu:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L73
	bl	puts
	ldr	r0, .L73+4
	bl	puts
	ldr	r0, .L73+8
	bl	puts
	ldr	r0, .L73+12
	bl	puts
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	bl	eat_line
	b	.L70
.L71:
	ldr	r0, .L73+16
	bl	puts
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	bl	eat_line
.L70:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L73+20
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L71
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.size	main_menu, .-main_menu
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
