#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 *);
int main() {
  int a, b;
  printf("Podaj dwie liczby ");
  scanf("%d %d", &a, &b);
  if (a > b) {
    printf("Pierwsza liczba musi być mniejsza od drugiej.\n");
  }
  for (a = a - 1; a < b; a++) {
    printf("%d\n", a + 1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    116b <main+0x4b>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a2 <main+0x82>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1174 <main+0x54>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
jle    1179 <main+0x49>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%ecx
lea    -0x1(%rax),%esi
mov    %esi,0x8(%rsp)
cmp    %ecx,%eax
jg     11ae <main+0x7e>
lea    0xe8e(%rip),%rbx
nopl   0x0(%rax,%rax,1)
add    $0x1,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
add    $0x1,%esi
mov    %esi,0x8(%rsp)
cmp    0xc(%rsp),%esi
jl     1190 <main+0x60>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Podaj dwie liczby \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [48 x i8] c"Pierwsza liczba musi by\C4\87 mniejsza od drugiej.\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 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* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %22, %11
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %25
18: ; preds = %14
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %14
25: ; preds = %14
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [19 x i8] c"Podaj dwie liczby \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.3 = [4 x i8] c"%d\0A\00"
@str = [47 x i8] c"Pierwsza liczba musi by\C4\87 mniejsza od drugiej.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 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 = 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 %14
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%12 = load i32, i32* %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %10, %0
%15 = phi i32 [ %13, %10 ], [ %8, %0 ]
%16 = phi i32 [ %12, %10 ], [ %7, %0 ]
%17 = add nsw i32 %16, -1
store i32 %17, i32* %1
%18 = icmp sgt i32 %16, %15
br i1 %18, label %27, label %19
19: ; preds = %14, %19
%20 = phi i32 [ %24, %19 ], [ %17, %14 ]
%21 = add nsw i32 %20, 1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
%25 = load i32, i32* %2
%26 = icmp slt i32 %24, %25
br i1 %26, label %19, label %27
27: ; preds = %19, %14
ret i32 0
}