#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 abs(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int num[1], numero[1], cont;
  int i;
  printf("insira um numero: ");
  scanf("%d", &num[0]);
  printf("insira outro numero: ");
  scanf("%d", &num[1]);
  cont = abs(num[1] - num[0]) + 1;
  if (num[0] > num[1]) {
    numero[0] = num[0];
    numero[1] = num[1];
  } else {
    numero[0] = num[1];
    numero[1] = num[0];
  }
  for (i = 0; i < cont; i++) {
    printf("%d\n", (numero[0]--));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x14(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x14(%rbp),%rsi
add    $0x4,%rsi
lea    0xe92(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%edi
sub    -0x14(%rbp),%edi
call   1030 <abs@plt>
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11b4 <main+0x84>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0x90>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11fa <main+0xca>
mov    -0x18(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c7 <main+0x97>
xor    %eax,%eax
add    $0x20,%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    0xed6(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x10(%rsp),%esi
mov    %esi,%ecx
sub    %eax,%ecx
cmovl  %eax,%esi
mov    %ecx,%ebp
neg    %ebp
cmovs  %ecx,%ebp
add    $0x1,%ebp
lea    0xea7(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x1(%rsi),%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%esi
add    $0xffffffff,%ebp
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"insira um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"insira outro 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 [1 x i32]
%7 = alloca [1 x i32]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%14 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 1
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%16 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 1
%17 = load i32, i32* %16
%18 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%19 = load i32, i32* %18
%20 = sub nsw i32 %17, %19
%21 = call i32 @abs(i32 %20)
%22 = add nsw i32 %21, 1
store i32 %22, i32* %8
%23 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%24 = load i32, i32* %23
%25 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 1
%26 = load i32, i32* %25
%27 = icmp sgt i32 %24, %26
br i1 %27, label %28, label %35
28: ; preds = %2
%29 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%30 = load i32, i32* %29
%31 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 %30, i32* %31
%32 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 1
%33 = load i32, i32* %32
%34 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 1
store i32 %33, i32* %34
br label %42
35: ; preds = %2
%36 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 1
%37 = load i32, i32* %36
%38 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 %37, i32* %38
%39 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%40 = load i32, i32* %39
%41 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 1
store i32 %40, i32* %41
br label %42
42: ; preds = %35, %28
store i32 0, i32* %9
br label %43
43: ; preds = %52, %42
%44 = load i32, i32* %9
%45 = load i32, i32* %8
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %55
47: ; preds = %43
%48 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%49 = load i32, i32* %48
%50 = add nsw i32 %49, -1
store i32 %50, i32* %48
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %49)
br label %52
52: ; preds = %47
%53 = load i32, i32* %9
%54 = add nsw i32 %53, 1
store i32 %54, i32* %9
br label %43
55: ; preds = %43
ret i32 0
}

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