#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
long LONG_MAX;
long LONG_MIN;
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
long strtol(char *, char **, int);
int main(int argc, char *argv[]) {
  long int Number = 0;
  switch (argc) {
  case 1: {
    fprintf(stderr, "No argumnets\n");
    exit(EXIT_FAILURE);
    break;
  }
  case 2: {
    char *endptr = NULL;
    Number = strtol(argv[1], &endptr, 10);
    if (argv[1] + strlen(argv[1]) != endptr) {
      fprintf(stderr, "Uncorrect input data (found symbols).\n");
      exit(EXIT_FAILURE);
    }
    if (errno == 34 && (Number == LONG_MAX || Number == LONG_MIN)) {
      fprintf(stderr, "Too long for me.\n");
      exit(EXIT_FAILURE);
    }
    if (Number < 1) {
      fprintf(stderr, "Uncorrect interval (only from 1).\n");
      exit(EXIT_FAILURE);
    }
    break;
  }
  default: {
    fprintf(stderr, "Many arguments for me.\n");
    exit(EXIT_FAILURE);
  }
  }
  long int Counter = 0;
  for (Counter = 1; Counter <= Number; Counter++) {
    printf("%ld \n", Counter);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x1,%eax
je     1193 <main+0x43>
jmp    1182 <main+0x32>
mov    -0x2c(%rbp),%eax
sub    $0x2,%eax
je     11b6 <main+0x66>
jmp    12b8 <main+0x168>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
lea    0xe5d(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
cmp    -0x20(%rbp),%rax
je     122a <main+0xda>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
lea    0xdf7(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    0x2d97(%rip),%rax
cmpl   $0x22,(%rax)
jne    1285 <main+0x135>
mov    -0x18(%rbp),%rax
mov    0x2d8b(%rip),%rcx
cmp    (%rcx),%rax
je     1262 <main+0x112>
mov    -0x18(%rbp),%rax
mov    0x2d8f(%rip),%rcx
cmp    (%rcx),%rax
jne    1285 <main+0x135>
mov    0x2d6f(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d42(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
cmpq   $0x1,-0x18(%rbp)
jge    12b3 <main+0x163>
mov    0x2d41(%rip),%rax
mov    (%rax),%edi
lea    0xda7(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
jmp    12db <main+0x18b>
mov    0x2d19(%rip),%rax
mov    (%rax),%edi
lea    0xda2(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
movq   $0x0,-0x28(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     131a <main+0x1ca>
mov    -0x28(%rbp),%rsi
lea    0xd7e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    12eb <main+0x19b>
mov    0x2c97(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
cmp    $0x2,%edi
je     117c <main+0x2c>
mov    0x2e73(%rip),%rax
cmp    $0x1,%edi
jne    11f5 <main+0xa5>
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
jmp    126b <main+0x11b>
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%r14
mov    0x8(%rbx),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
cmp    0x8(%rsp),%rax
jne    1200 <main+0xb0>
mov    0x2e0b(%rip),%rax
cmpl   $0x22,(%rax)
jne    11de <main+0x8e>
mov    0x2e07(%rip),%rax
cmp    (%rax),%r14
je     125b <main+0x10b>
mov    0x2e0f(%rip),%rax
cmp    (%rax),%r14
je     125b <main+0x10b>
test   %r14,%r14
jg     1212 <main+0xc2>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
lea    0xe54(%rip),%rsi
jmp    126b <main+0x11b>
mov    (%rax),%edi
lea    0xe6c(%rip),%rsi
jmp    126b <main+0x11b>
mov    0x2dd1(%rip),%rax
mov    (%rax),%edi
lea    0xdfe(%rip),%rsi
jmp    126b <main+0x11b>
neg    %r14
mov    $0x1,%ebx
lea    0xe61(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    (%r14,%rbx,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x1,%rax
jne    1230 <main+0xe0>
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"No argumnets\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [39 x i8] c"Uncorrect input data (found symbols).\0A\00"
@errno = global i32 0
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.2 = [18 x i8] c"Too long for me.\0A\00"
@.str.3 = [35 x i8] c"Uncorrect interval (only from 1).\0A\00"
@.str.4 = [24 x i8] c"Many arguments for me.\0A\00"
@.str.5 = [6 x i8] c"%ld \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
%9 = load i32, i32* %4
switch i32 %9, label %61 [
i32 1, label %10
i32 2, label %15
]
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
store i8* null, i8** %7
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i64 @strtol(i8* %18, i8** %7, i32 10)
store i64 %19, i64* %6
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @strlen(i8* %25)
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %22, i64 %27
%29 = load i8*, i8** %7
%30 = icmp ne i8* %28, %29
br i1 %30, label %31, label %36
31: ; preds = %15
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%34 = load i32, i32* @EXIT_FAILURE
%35 = call i32 @exit(i32 %34)
unreachable
36: ; preds = %15
%37 = load i32, i32* @errno
%38 = icmp eq i32 %37, 34
br i1 %38, label %39, label %52
39: ; preds = %36
%40 = load i64, i64* %6
%41 = load i64, i64* @LONG_MAX
%42 = icmp eq i64 %40, %41
br i1 %42, label %47, label %43
43: ; preds = %39
%44 = load i64, i64* %6
%45 = load i64, i64* @LONG_MIN
%46 = icmp eq i64 %44, %45
br i1 %46, label %47, label %52
47: ; preds = %43, %39
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%50 = load i32, i32* @EXIT_FAILURE
%51 = call i32 @exit(i32 %50)
unreachable
52: ; preds = %43, %36
%53 = load i64, i64* %6
%54 = icmp slt i64 %53, 1
br i1 %54, label %55, label %60
55: ; preds = %52
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%58 = load i32, i32* @EXIT_FAILURE
%59 = call i32 @exit(i32 %58)
unreachable
60: ; preds = %52
br label %66
61: ; preds = %2
%62 = load i32, i32* @stderr
%63 = call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%64 = load i32, i32* @EXIT_FAILURE
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %60
store i64 0, i64* %8
store i64 1, i64* %8
br label %67
67: ; preds = %74, %66
%68 = load i64, i64* %8
%69 = load i64, i64* %6
%70 = icmp sle i64 %68, %69
br i1 %70, label %71, label %77
71: ; preds = %67
%72 = load i64, i64* %8
%73 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 %72)
br label %74
74: ; preds = %71
%75 = load i64, i64* %8
%76 = add nsw i64 %75, 1
store i64 %76, i64* %8
br label %67
77: ; preds = %67
%78 = load i32, i32* @EXIT_SUCCESS
%79 = call i32 @exit(i32 %78)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"No argumnets\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [39 x i8] c"Uncorrect input data (found symbols).\0A\00"
@errno = global i32 0
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.2 = [18 x i8] c"Too long for me.\0A\00"
@.str.3 = [35 x i8] c"Uncorrect interval (only from 1).\0A\00"
@.str.4 = [24 x i8] c"Many arguments for me.\0A\00"
@.str.5 = [6 x i8] c"%ld \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
switch i32 %0, label %47 [
i32 1, label %4
i32 2, label %9
]
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @strtol(i8* %12, i8** %3, i32 10)
%14 = load i8*, i8** %11
%15 = tail call i32 @strlen(i8* %14)
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8*, i8** %3
%19 = icmp eq i8* %17, %18
br i1 %19, label %25, label %20
20: ; preds = %9
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* @EXIT_FAILURE
%24 = tail call i32 @exit(i32 %23)
unreachable
25: ; preds = %9
%26 = load i32, i32* @errno
%27 = icmp eq i32 %26, 34
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load i64, i64* @LONG_MAX
%30 = icmp eq i64 %13, %29
%31 = load i64, i64* @LONG_MIN
%32 = icmp eq i64 %13, %31
%33 = select i1 %30, i1 true, i1 %32
br i1 %33, label %34, label %39
34: ; preds = %28
%35 = load i32, i32* @stderr
%36 = tail call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%37 = load i32, i32* @EXIT_FAILURE
%38 = tail call i32 @exit(i32 %37)
unreachable
39: ; preds = %28, %25
%40 = icmp slt i64 %13, 1
br i1 %40, label %41, label %46
41: ; preds = %39
%42 = load i32, i32* @stderr
%43 = tail call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%44 = load i32, i32* @EXIT_FAILURE
%45 = tail call i32 @exit(i32 %44)
unreachable
46: ; preds = %39
br label %52
47: ; preds = %2
%48 = load i32, i32* @stderr
%49 = tail call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%50 = load i32, i32* @EXIT_FAILURE
%51 = tail call i32 @exit(i32 %50)
unreachable
52: ; preds = %46, %52
%53 = phi i64 [ 1, %46 ], [ %55, %52 ]
%54 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 %53)
%55 = add nuw i64 %53, 1
%56 = icmp eq i64 %53, %13
br i1 %56, label %57, label %52
57: ; preds = %52
%58 = load i32, i32* @EXIT_SUCCESS
%59 = tail call i32 @exit(i32 %58)
unreachable
}