#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 *);
void main() {
  int num1, num2, err = 0;
  printf("Ingresa dos numeros separados por un espacio para imprimir un "
         "intervalo en numeros impares\n");
  scanf("%d %d", &num1, &num2);
  if (num1 > num2) {
    printf("Los datos no son validos, el segundo numero tiene que ser mayor\n");
    err = 1;
  }
  if (!err) {
    num1 = (num1 % 2 == 0) ? num1 + 1 : num1;
    do {
      printf("%d\n", num1);
      num1 = num1 + 2;
    } while (num1 < num2);
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1172 <main+0x52>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    11d5 <main+0xb5>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    119e <main+0x7e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a4 <main+0x84>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     11aa <main+0x8a>
jmp    11d5 <main+0xb5>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    0xc(%rsp),%eax
jle    116f <main+0x3f>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
jmp    11ab <main+0x7b>
mov    %eax,%esi
not    %esi
and    $0x1,%esi
add    %eax,%esi
mov    %esi,0x8(%rsp)
lea    0xe83(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
add    $0x2,%esi
mov    %esi,0x8(%rsp)
cmp    0xc(%rsp),%esi
jl     1190 <main+0x60>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [92 x i8] c"Ingresa dos numeros separados por un espacio para imprimir un intervalo en numeros impares\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [65 x i8] c"Los datos no son validos, el segundo numero tiene que ser mayor\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %35, label %14
14: ; preds = %11
%15 = load i32, i32* %1
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
br label %23
21: ; preds = %14
%22 = load i32, i32* %1
br label %23
23: ; preds = %21, %18
%24 = phi i32 [ %20, %18 ], [ %22, %21 ]
store i32 %24, i32* %1
br label %25
25: ; preds = %30, %23
%26 = load i32, i32* %1
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %1
%29 = add nsw i32 %28, 2
store i32 %29, i32* %1
br label %30
30: ; preds = %25
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = icmp slt i32 %31, %32
br i1 %33, label %25, label %34
34: ; preds = %30
br label %35
35: ; preds = %34, %11
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@str = [91 x i8] c"Ingresa dos numeros separados por un espacio para imprimir un intervalo en numeros impares\00"
@str.4 = [64 x i8] c"Los datos no son validos, el segundo numero tiene que ser mayor\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.4, i64 0, i64 0))
br label %23
12: ; preds = %0
%13 = and i32 %7, 1
%14 = xor i32 %13, 1
%15 = add nsw i32 %14, %7
store i32 %15, i32* %1
br label %16
16: ; preds = %16, %12
%17 = phi i32 [ %20, %16 ], [ %15, %12 ]
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 2
store i32 %20, i32* %1
%21 = load i32, i32* %2
%22 = icmp slt i32 %20, %21
br i1 %22, label %16, label %23
23: ; preds = %16, %10
ret void
}