#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ FLine(int /*<<< orphan*/ *);
int /*<<< orphan*/ FLineSpace(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int);
int /*<<< orphan*/ printf(char *, int, int);
int strtoi(int /*<<< orphan*/);
int main(void) {
  FILE *fl = fopen("milk2.in", "r");
  FILE *fout = fopen("milk2.out", "w");
  int lines = strtoi(FLine(fl));
  int low = strtoi(FLineSpace(fl));
  int high = strtoi(FLine(fl));
  int next = high;
  int maxLongest = 0;
  int maxNone = 0;
  int i;
  for (i = 0; i < lines - 1; i++) {
    next = strtoi(FLineSpace(fl));
    if (next <= high) {
      high = strtoi(FLine(fl));
    } else {
      if ((high - low) > maxLongest) {
        maxLongest = (high - low);
      }
      if ((next - high) > maxNone) {
        maxNone = (next - high);
      }
      low = next;
      high = strtoi(FLine(fl));
    }
  }
  if ((high - low) > maxLongest) {
    maxLongest = (high - low);
  }
  if ((next - high) > maxNone) {
    maxNone = (next - high);
  }
  printf("%d, %d\n", maxLongest, maxNone);
  fprintf(fout, "%d %d\n", maxLongest, maxNone);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe7e(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1080 <FLineSpace@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1295 <main+0x135>
mov    -0x10(%rbp),%rdi
call   1080 <FLineSpace@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1239 <main+0xd9>
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1282 <main+0x122>
mov    -0x24(%rbp),%eax
sub    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jle    1251 <main+0xf1>
mov    -0x24(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
sub    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jle    1269 <main+0x109>
mov    -0x28(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x24(%rbp)
jmp    1287 <main+0x127>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f1 <main+0x91>
mov    -0x24(%rbp),%eax
sub    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jle    12ad <main+0x14d>
mov    -0x24(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
sub    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jle    12c5 <main+0x165>
mov    -0x28(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xd45(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xd37(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xe8b(%rip),%rdi
lea    0xe8d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%r12
lea    0xe80(%rip),%rdi
lea    0xe83(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,0x10(%rsp)
mov    %r12,%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,%ebp
mov    %r12,%rdi
call   1080 <FLineSpace@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,0xc(%rsp)
mov    %r12,%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,%ebx
xor    %r14d,%r14d
cmp    $0x2,%ebp
jl     1235 <main+0xd5>
add    $0xffffffff,%ebp
xor    %r15d,%r15d
xor    %r14d,%r14d
jmp    1206 <main+0xa6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,%ebx
add    $0xffffffff,%ebp
je     123b <main+0xdb>
mov    %r12,%rdi
call   1080 <FLineSpace@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,%r13d
sub    %ebx,%eax
jle    11f0 <main+0x90>
sub    0xc(%rsp),%ebx
cmp    %r14d,%ebx
cmovg  %ebx,%r14d
cmp    %r15d,%eax
cmovg  %eax,%r15d
mov    %r13d,0xc(%rsp)
jmp    11f0 <main+0x90>
mov    %ebx,%r13d
xor    %r15d,%r15d
sub    %ebx,%r13d
sub    0xc(%rsp),%ebx
cmp    %r14d,%ebx
cmovle %r14d,%ebx
cmp    %r15d,%r13d
cmovle %r15d,%r13d
lea    0xdc0(%rip),%rdi
mov    %ebx,%esi
mov    %r13d,%edx
call   1030 <printf@plt>
lea    0xdb7(%rip),%rsi
mov    0x10(%rsp),%rdi
mov    %ebx,%edx
mov    %r13d,%ecx
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"milk2.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"milk2.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"%d, %d\0A\00"
@.str.5 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %2
%12 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %12, i32** %3
%13 = load i32*, i32** %2
%14 = call i32 @FLine(i32* %13)
%15 = call i32 @strtoi(i32 %14)
store i32 %15, i32* %4
%16 = load i32*, i32** %2
%17 = call i32 @FLineSpace(i32* %16)
%18 = call i32 @strtoi(i32 %17)
store i32 %18, i32* %5
%19 = load i32*, i32** %2
%20 = call i32 @FLine(i32* %19)
%21 = call i32 @strtoi(i32 %20)
store i32 %21, i32* %6
%22 = load i32, i32* %6
store i32 %22, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
br label %23
23: ; preds = %65, %0
%24 = load i32, i32* %10
%25 = load i32, i32* %4
%26 = sub nsw i32 %25, 1
%27 = icmp slt i32 %24, %26
br i1 %27, label %28, label %68
28: ; preds = %23
%29 = load i32*, i32** %2
%30 = call i32 @FLineSpace(i32* %29)
%31 = call i32 @strtoi(i32 %30)
store i32 %31, i32* %7
%32 = load i32, i32* %7
%33 = load i32, i32* %6
%34 = icmp sle i32 %32, %33
br i1 %34, label %35, label %39
35: ; preds = %28
%36 = load i32*, i32** %2
%37 = call i32 @FLine(i32* %36)
%38 = call i32 @strtoi(i32 %37)
store i32 %38, i32* %6
br label %64
39: ; preds = %28
%40 = load i32, i32* %6
%41 = load i32, i32* %5
%42 = sub nsw i32 %40, %41
%43 = load i32, i32* %8
%44 = icmp sgt i32 %42, %43
br i1 %44, label %45, label %49
45: ; preds = %39
%46 = load i32, i32* %6
%47 = load i32, i32* %5
%48 = sub nsw i32 %46, %47
store i32 %48, i32* %8
br label %49
49: ; preds = %45, %39
%50 = load i32, i32* %7
%51 = load i32, i32* %6
%52 = sub nsw i32 %50, %51
%53 = load i32, i32* %9
%54 = icmp sgt i32 %52, %53
br i1 %54, label %55, label %59
55: ; preds = %49
%56 = load i32, i32* %7
%57 = load i32, i32* %6
%58 = sub nsw i32 %56, %57
store i32 %58, i32* %9
br label %59
59: ; preds = %55, %49
%60 = load i32, i32* %7
store i32 %60, i32* %5
%61 = load i32*, i32** %2
%62 = call i32 @FLine(i32* %61)
%63 = call i32 @strtoi(i32 %62)
store i32 %63, i32* %6
br label %64
64: ; preds = %59, %35
br label %65
65: ; preds = %64
%66 = load i32, i32* %10
%67 = add nsw i32 %66, 1
store i32 %67, i32* %10
br label %23
68: ; preds = %23
%69 = load i32, i32* %6
%70 = load i32, i32* %5
%71 = sub nsw i32 %69, %70
%72 = load i32, i32* %8
%73 = icmp sgt i32 %71, %72
br i1 %73, label %74, label %78
74: ; preds = %68
%75 = load i32, i32* %6
%76 = load i32, i32* %5
%77 = sub nsw i32 %75, %76
store i32 %77, i32* %8
br label %78
78: ; preds = %74, %68
%79 = load i32, i32* %7
%80 = load i32, i32* %6
%81 = sub nsw i32 %79, %80
%82 = load i32, i32* %9
%83 = icmp sgt i32 %81, %82
br i1 %83, label %84, label %88
84: ; preds = %78
%85 = load i32, i32* %7
%86 = load i32, i32* %6
%87 = sub nsw i32 %85, %86
store i32 %87, i32* %9
br label %88
88: ; preds = %84, %78
%89 = load i32, i32* %8
%90 = load i32, i32* %9
%91 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %89, i32 %90)
%92 = load i32*, i32** %3
%93 = load i32, i32* %8
%94 = load i32, i32* %9
%95 = call i32 @fprintf(i32* %92, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %93, i32 %94)
%96 = load i32, i32* %1
ret i32 %96
}

LLVM IR (-O2):
@.str = [9 x i8] c"milk2.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"milk2.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"%d, %d\0A\00"
@.str.5 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @FLine(i32* %1)
%4 = tail call i32 @strtoi(i32 %3)
%5 = tail call i32 @FLineSpace(i32* %1)
%6 = tail call i32 @strtoi(i32 %5)
%7 = tail call i32 @FLine(i32* %1)
%8 = tail call i32 @strtoi(i32 %7)
%9 = add i32 %4, -1
%10 = icmp sgt i32 %4, 1
br i1 %10, label %11, label %35
11: ; preds = %0, %27
%12 = phi i32 [ %33, %27 ], [ 0, %0 ]
%13 = phi i32 [ %30, %27 ], [ 0, %0 ]
%14 = phi i32 [ %29, %27 ], [ 0, %0 ]
%15 = phi i32 [ %32, %27 ], [ %8, %0 ]
%16 = phi i32 [ %28, %27 ], [ %6, %0 ]
%17 = tail call i32 @FLineSpace(i32* %1)
%18 = tail call i32 @strtoi(i32 %17)
%19 = icmp sgt i32 %18, %15
br i1 %19, label %20, label %27
20: ; preds = %11
%21 = sub nsw i32 %15, %16
%22 = icmp sgt i32 %21, %14
%23 = select i1 %22, i32 %21, i32 %14
%24 = sub nsw i32 %18, %15
%25 = icmp sgt i32 %24, %13
%26 = select i1 %25, i32 %24, i32 %13
br label %27
27: ; preds = %11, %20
%28 = phi i32 [ %18, %20 ], [ %16, %11 ]
%29 = phi i32 [ %23, %20 ], [ %14, %11 ]
%30 = phi i32 [ %26, %20 ], [ %13, %11 ]
%31 = tail call i32 @FLine(i32* %1)
%32 = tail call i32 @strtoi(i32 %31)
%33 = add nuw nsw i32 %12, 1
%34 = icmp eq i32 %33, %9
br i1 %34, label %35, label %11
35: ; preds = %27, %0
%36 = phi i32 [ %6, %0 ], [ %28, %27 ]
%37 = phi i32 [ %8, %0 ], [ %32, %27 ]
%38 = phi i32 [ %8, %0 ], [ %18, %27 ]
%39 = phi i32 [ 0, %0 ], [ %29, %27 ]
%40 = phi i32 [ 0, %0 ], [ %30, %27 ]
%41 = sub nsw i32 %37, %36
%42 = icmp sgt i32 %41, %39
%43 = select i1 %42, i32 %41, i32 %39
%44 = sub nsw i32 %38, %37
%45 = icmp sgt i32 %44, %40
%46 = select i1 %45, i32 %44, i32 %40
%47 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %43, i32 %46)
%48 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %43, i32 %46)
ret i32 0
}