#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 *, int *);
int main(int argc, const char *argv[]) {
  int inicio, fim, n, m, i;
  printf("Escreva o primeiro numero:  ");
  scanf("%d", &n);
  printf("Escreva o segundo numero:   ");
  scanf("%d", &m);
  if (n <= m) {
    inicio = n;
    fim = m;
  } else {
    fim = n;
    inicio = m;
  }
  for (i = inicio + 1; i < fim; i++) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     118f <main+0x6f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    119b <main+0x7b>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11cf <main+0xaf>
mov    -0x24(%rbp),%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a4 <main+0x84>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ebp
cmp    %ebp,%eax
mov    %eax,%ebx
cmovg  %ebp,%ebx
cmovg  %eax,%ebp
add    $0x1,%ebx
cmp    %ebp,%ebx
jge    11a3 <main+0x83>
lea    0xeb8(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Escreva o primeiro numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"Escreva o segundo numero: \00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = load i32, i32* %8
store i32 %19, i32* %6
%20 = load i32, i32* %9
store i32 %20, i32* %7
br label %24
21: ; preds = %2
%22 = load i32, i32* %8
store i32 %22, i32* %7
%23 = load i32, i32* %9
store i32 %23, i32* %6
br label %24
24: ; preds = %21, %18
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %10
br label %27
27: ; preds = %34, %24
%28 = load i32, i32* %10
%29 = load i32, i32* %7
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %37
31: ; preds = %27
%32 = load i32, i32* %10
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31
%35 = load i32, i32* %10
%36 = add nsw i32 %35, 1
store i32 %36, i32* %10
br label %27
37: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Escreva o primeiro numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"Escreva o segundo numero: \00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp sgt i32 %11, %12
%14 = select i1 %13, i32 %12, i32 %11
%15 = select i1 %13, i32 %11, i32 %12
%16 = add nsw i32 %14, 1
%17 = icmp slt i32 %16, %15
br i1 %17, label %18, label %23
18: ; preds = %2, %18
%19 = phi i32 [ %21, %18 ], [ %16, %2 ]
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = add i32 %19, 1
%22 = icmp eq i32 %21, %15
br i1 %22, label %23, label %18
23: ; preds = %18, %2
ret i32 0
}