#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 a, b, i;
  printf("Podaj liczbe a: ");
  scanf("%d", &a);
  do {
    printf("Podaj liczbe b(b>a): ");
    scanf("%d", &b);
  } while (a >= b);
  for (i = 1; a < b; i++) {
    a = a + i;
    printf("%d ", a);
  }
}


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    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114d <main+0x2d>
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b2 <main+0x92>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117e <main+0x5e>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%r14
mov    %rsp,%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0xec6(%rip),%r15
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%esi
cmp    0x4(%rsp),%esi
jge    1160 <main+0x40>
mov    $0x1,%ebp
lea    0xea0(%rip),%rbx
nopw   0x0(%rax,%rax,1)
add    %ebp,%esi
mov    %esi,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
mov    (%rsp),%esi
cmp    0x4(%rsp),%esi
jl     1190 <main+0x70>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Podaj liczbe a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Podaj liczbe b(b>a): \00"
@.str.3 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %7
7: ; preds = %10, %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sge i32 %11, %12
br i1 %13, label %7, label %14
14: ; preds = %10
store i32 1, i32* %4
br label %15
15: ; preds = %25, %14
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i32, i32* %2
%21 = load i32, i32* %4
%22 = add nsw i32 %20, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %19
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %15
28: ; preds = %15
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str = [17 x i8] c"Podaj liczbe a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"Podaj liczbe b(b>a): \00"
@.str.3 = [4 x i8] c"%d \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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
br label %7
7: ; preds = %7, %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %7
13: ; preds = %7, %13
%14 = phi i32 [ %19, %13 ], [ %10, %7 ]
%15 = phi i32 [ %18, %13 ], [ 1, %7 ]
%16 = add nsw i32 %14, %15
store i32 %16, i32* %1
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = add nuw nsw i32 %15, 1
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = icmp slt i32 %19, %20
br i1 %21, label %13, label %22
22: ; preds = %13
ret i32 0
}