#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *, ...);
int main() {
  int i = 0, track = 0;
  char ch[(10)][(4)][20];
  printf("Enter the Details in format: \n"
         "<Vehicle Type> <staring mnth> <ending mnth> <price>\n"
         "Press 0 to quit \n");
  scanf("%s", ch[(i)][(0)]);
  while (ch[i][0][0] != '0' && i < 10) {
    scanf("%s %s %s", ch[(i)][(1)], ch[(i)][(2)], ch[(i)][(3)]);
    i++;
    scanf("%s", ch[(i)][(0)]);
  }
  printf("This Are The Data Entered: \n"
         "Vehicle-Type \t\t Month of Service \tPrice \n");
  for (track = 0; track < i; track++)
    printf("%s \t\t\t %s/%s \t\t\t %s \n", ch[(track)][(0)], ch[(track)][(1)],
           ch[(track)][(2)], ch[(track)][(3)]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
imul   $0x50,%rax,%rax
add    %rax,%rsi
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rcx
lea    -0x330(%rbp),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x331(%rbp)
je     11a1 <main+0x81>
cmpl   $0xa,-0x8(%rbp)
setl   %al
mov    %al,-0x331(%rbp)
mov    -0x331(%rbp),%al
test   $0x1,%al
jne    11b4 <main+0x94>
jmp    1232 <main+0x112>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
imul   $0x50,%rax,%rax
add    %rax,%rsi
add    $0x14,%rsi
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rdx
imul   $0x50,%rax,%rax
add    %rax,%rdx
add    $0x28,%rdx
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rcx
imul   $0x50,%rax,%rax
add    %rax,%rcx
add    $0x3c,%rcx
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
imul   $0x50,%rax,%rax
add    %rax,%rsi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    116e <main+0x4e>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12c3 <main+0x1a3>
movslq -0xc(%rbp),%rax
lea    -0x330(%rbp),%rsi
imul   $0x50,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
lea    -0x330(%rbp),%rdx
imul   $0x50,%rax,%rax
add    %rax,%rdx
add    $0x14,%rdx
movslq -0xc(%rbp),%rax
lea    -0x330(%rbp),%rcx
imul   $0x50,%rax,%rax
add    %rax,%rcx
add    $0x28,%rcx
movslq -0xc(%rbp),%rax
lea    -0x330(%rbp),%r8
imul   $0x50,%rax,%rax
add    %rax,%r8
add    $0x3c,%r8
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1247 <main+0x127>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x328,%rsp
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb2(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x30,(%rsp)
jne    1178 <main+0x48>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
jmp    1203 <main+0xd3>
lea    0x50(%rsp),%rbx
lea    0xe7c(%rip),%r15
lea    0xe7b(%rip),%r12
xor    %ebp,%ebp
nopl   (%rax)
lea    -0x3c(%rbx),%rsi
lea    -0x28(%rbx),%rdx
lea    -0x14(%rbx),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1(%rbp),%r13
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x30,(%rbx)
je     11c9 <main+0x99>
add    $0x50,%rbx
cmp    $0x9,%rbp
mov    %r13,%rbp
jb     1190 <main+0x60>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2d(%rip),%rbx
nopl   0x0(%rax)
lea    0x14(%r14),%rdx
lea    0x28(%r14),%rcx
lea    0x3c(%r14),%r8
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x50,%r14
add    $0xffffffffffffffff,%r13
jne    11e0 <main+0xb0>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [100 x i8] c"Enter the Details in format: \0A<Vehicle Type> <staring mnth> <ending mnth> <price>\0APress 0 to quit \0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%s %s %s\00"
@.str.3 = [70 x i8] c"This Are The Data Entered: \0AVehicle-Type \09\09 Month of Service \09Price \0A\00"
@.str.4 = [22 x i8] c"%s \09\09\09 %s/%s \09\09\09 %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x [4 x [20 x i8]]]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %7
%9 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %8, i64 0, i64 0
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%11 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %26, %0
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %14
%16 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %15, i64 0, i64 0
%17 = getelementptr inbounds [20 x i8], [20 x i8]* %16, i64 0, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 48
br i1 %20, label %21, label %24
21: ; preds = %12
%22 = load i32, i32* %2
%23 = icmp slt i32 %22, 10
br label %24
24: ; preds = %21, %12
%25 = phi i1 [ false, %12 ], [ %23, %21 ]
br i1 %25, label %26, label %51
26: ; preds = %24
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %28
%30 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %29, i64 0, i64 1
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %30, i64 0, i64 0
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %33
%35 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %34, i64 0, i64 2
%36 = getelementptr inbounds [20 x i8], [20 x i8]* %35, i64 0, i64 0
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %38
%40 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %39, i64 0, i64 3
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %40, i64 0, i64 0
%42 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %31, i8* %36, i8* %41)
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
%45 = load i32, i32* %2
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %46
%48 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %47, i64 0, i64 0
%49 = getelementptr inbounds [20 x i8], [20 x i8]* %48, i64 0, i64 0
%50 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %49)
br label %12
51: ; preds = %24
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %53
53: ; preds = %79, %51
%54 = load i32, i32* %3
%55 = load i32, i32* %2
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %82
57: ; preds = %53
%58 = load i32, i32* %3
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %59
%61 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %60, i64 0, i64 0
%62 = getelementptr inbounds [20 x i8], [20 x i8]* %61, i64 0, i64 0
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %64
%66 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %65, i64 0, i64 1
%67 = getelementptr inbounds [20 x i8], [20 x i8]* %66, i64 0, i64 0
%68 = load i32, i32* %3
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %69
%71 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %70, i64 0, i64 2
%72 = getelementptr inbounds [20 x i8], [20 x i8]* %71, i64 0, i64 0
%73 = load i32, i32* %3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %4, i64 0, i64 %74
%76 = getelementptr inbounds [4 x [20 x i8]], [4 x [20 x i8]]* %75, i64 0, i64 3
%77 = getelementptr inbounds [20 x i8], [20 x i8]* %76, i64 0, i64 0
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %62, i8* %67, i8* %72, i8* %77)
br label %79
79: ; preds = %57
%80 = load i32, i32* %3
%81 = add nsw i32 %80, 1
store i32 %81, i32* %3
br label %53
82: ; preds = %53
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"%s %s %s\00"
@.str.4 = [22 x i8] c"%s \09\09\09 %s/%s \09\09\09 %s \0A\00"
@str = [99 x i8] c"Enter the Details in format: \0A<Vehicle Type> <staring mnth> <ending mnth> <price>\0APress 0 to quit \00"
@str.5 = [69 x i8] c"This Are The Data Entered: \0AVehicle-Type \09\09 Month of Service \09Price \00"
define i32 @main() {
%1 = alloca [10 x [4 x [20 x i8]]]
%2 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 0, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 48
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.5, i64 0, i64 0))
br label %34
9: ; preds = %0, %9
%10 = phi i64 [ %15, %9 ], [ 0, %0 ]
%11 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %10, i64 1, i64 0
%12 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %10, i64 2, i64 0
%13 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %10, i64 3, i64 0
%14 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
%15 = add nuw nsw i64 %10, 1
%16 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %15, i64 0, i64 0
%17 = call i32 (i8*, i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i8, i8* %16
%19 = icmp ne i8 %18, 48
%20 = icmp ult i64 %10, 9
%21 = select i1 %19, i1 %20, i1 false
br i1 %21, label %9, label %22
22: ; preds = %9
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.5, i64 0, i64 0))
%24 = and i64 %15, 4294967295
br label %25
25: ; preds = %22, %25
%26 = phi i64 [ 0, %22 ], [ %32, %25 ]
%27 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %26, i64 0, i64 0
%28 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %26, i64 1, i64 0
%29 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %26, i64 2, i64 0
%30 = getelementptr inbounds [10 x [4 x [20 x i8]]], [10 x [4 x [20 x i8]]]* %1, i64 0, i64 %26, i64 3, i64 0
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %27, i8* %28, i8* %29, i8* %30)
%32 = add nuw nsw i64 %26, 1
%33 = icmp eq i64 %32, %24
br i1 %33, label %34, label %25
34: ; preds = %25, %7
ret i32 0
}