#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 atoi(char *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void main(int argc, char *argv[]) {
  srand(time(NULL));
  int i, a, b;
  for (i = 1; i < (argc - 1); i += 2) {
    a = atoi(argv[i]);
    b = atoi(argv[i + 1]);
    printf("%d %d ", a, b);
    if (a < b) {
      puts("<--");
    } else {
      puts("-->");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1202 <main+0xb2>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe3f(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11e3 <main+0x93>
lea    0xe2e(%rip),%rdi
call   1030 <puts@plt>
jmp    11ef <main+0x9f>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
jmp    11f4 <main+0xa4>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    1176 <main+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%r14d
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
cmp    $0x3,%r14d
jl     11d8 <main+0x88>
add    $0xffffffff,%r14d
mov    $0x1,%ebp
lea    0xe86(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r12,%rbp,8),%rdi
call   1070 <atoi@plt>
mov    %eax,%r13d
mov    0x8(%r12,%rbp,8),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebx
lea    0xe51(%rip),%rdi
mov    %r13d,%esi
mov    %eax,%edx
call   1040 <printf@plt>
cmp    %ebx,%r13d
mov    %r15,%rdi
lea    0xe41(%rip),%rax
cmovl  %rax,%rdi
call   1030 <puts@plt>
add    $0x2,%rbp
cmp    %r14,%rbp
jb     1190 <main+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d \00"
@.str.1 = [4 x i8] c"<--\00"
@.str.2 = [4 x i8] c"-->\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = call i32 @time(i32* null)
%9 = call i32 @srand(i32 %8)
store i32 1, i32* %5
br label %10
10: ; preds = %40, %2
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = icmp slt i32 %11, %13
br i1 %14, label %15, label %43
15: ; preds = %10
%16 = load i8**, i8*** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @atoi(i8* %20)
store i32 %21, i32* %6
%22 = load i8**, i8*** %4
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %22, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
store i32 %28, i32* %7
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %30)
%32 = load i32, i32* %6
%33 = load i32, i32* %7
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %37
35: ; preds = %15
%36 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %39
37: ; preds = %15
%38 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %35
br label %40
40: ; preds = %39
%41 = load i32, i32* %5
%42 = add nsw i32 %41, 2
store i32 %42, i32* %5
br label %10
43: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d \00"
@.str.1 = [4 x i8] c"<--\00"
@.str.2 = [4 x i8] c"-->\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp sgt i32 %0, 2
br i1 %5, label %6, label %24
6: ; preds = %2
%7 = add nsw i32 %0, -1
%8 = zext i32 %7 to i64
br label %9
9: ; preds = %6, %9
%10 = phi i64 [ 1, %6 ], [ %22, %9 ]
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = add nuw nsw i64 %10, 1
%15 = getelementptr inbounds i8*, i8** %1, i64 %14
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %17)
%19 = icmp slt i32 %13, %17
%20 = select i1 %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%21 = tail call i32 @puts(i8* dereferenceable(1) %20)
%22 = add nuw nsw i64 %10, 2
%23 = icmp ult i64 %22, %8
br i1 %23, label %9, label %24
24: ; preds = %9, %2
ret void
}