#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*/ Refresh();
int /*<<< orphan*/ Refresh2();
void loop() {
  for (int a = 0; a < 50; a++)
    Refresh();
  for (int a = 0; a < 80; a++)
    Refresh2();
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jge    114e <loop+0x2e>
mov    $0x0,%al
call   1040 <Refresh@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <loop+0xf>
movl   $0x0,-0x8(%rbp)
cmpl   $0x50,-0x8(%rbp)
jge    1174 <loop+0x54>
mov    $0x0,%al
call   1030 <Refresh2@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <loop+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
push   %rbx
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
xor    %eax,%eax
call   1040 <Refresh@plt>
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <Refresh2@plt>
add    $0xffffffff,%ebx
jne    1290 <loop+0x170>
pop    %rbx
ret

LLVM IR (-O0):
define void @loop() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 50
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 (...) @Refresh()
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
store i32 0, i32* %2
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 80
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = call i32 (...) @Refresh2()
br label %17
17: ; preds = %15
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %12
20: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @loop() {
%1 = tail call i32 (...) @Refresh()
%2 = tail call i32 (...) @Refresh()
%3 = tail call i32 (...) @Refresh()
%4 = tail call i32 (...) @Refresh()
%5 = tail call i32 (...) @Refresh()
%6 = tail call i32 (...) @Refresh()
%7 = tail call i32 (...) @Refresh()
%8 = tail call i32 (...) @Refresh()
%9 = tail call i32 (...) @Refresh()
%10 = tail call i32 (...) @Refresh()
%11 = tail call i32 (...) @Refresh()
%12 = tail call i32 (...) @Refresh()
%13 = tail call i32 (...) @Refresh()
%14 = tail call i32 (...) @Refresh()
%15 = tail call i32 (...) @Refresh()
%16 = tail call i32 (...) @Refresh()
%17 = tail call i32 (...) @Refresh()
%18 = tail call i32 (...) @Refresh()
%19 = tail call i32 (...) @Refresh()
%20 = tail call i32 (...) @Refresh()
%21 = tail call i32 (...) @Refresh()
%22 = tail call i32 (...) @Refresh()
%23 = tail call i32 (...) @Refresh()
%24 = tail call i32 (...) @Refresh()
%25 = tail call i32 (...) @Refresh()
%26 = tail call i32 (...) @Refresh()
%27 = tail call i32 (...) @Refresh()
%28 = tail call i32 (...) @Refresh()
%29 = tail call i32 (...) @Refresh()
%30 = tail call i32 (...) @Refresh()
%31 = tail call i32 (...) @Refresh()
%32 = tail call i32 (...) @Refresh()
%33 = tail call i32 (...) @Refresh()
%34 = tail call i32 (...) @Refresh()
%35 = tail call i32 (...) @Refresh()
%36 = tail call i32 (...) @Refresh()
%37 = tail call i32 (...) @Refresh()
%38 = tail call i32 (...) @Refresh()
%39 = tail call i32 (...) @Refresh()
%40 = tail call i32 (...) @Refresh()
%41 = tail call i32 (...) @Refresh()
%42 = tail call i32 (...) @Refresh()
%43 = tail call i32 (...) @Refresh()
%44 = tail call i32 (...) @Refresh()
%45 = tail call i32 (...) @Refresh()
%46 = tail call i32 (...) @Refresh()
%47 = tail call i32 (...) @Refresh()
%48 = tail call i32 (...) @Refresh()
%49 = tail call i32 (...) @Refresh()
%50 = tail call i32 (...) @Refresh()
br label %52
51: ; preds = %52
ret void
52: ; preds = %0, %52
%53 = phi i32 [ %55, %52 ], [ 0, %0 ]
%54 = tail call i32 (...) @Refresh2()
%55 = add nuw nsw i32 %53, 1
%56 = icmp eq i32 %55, 80
br i1 %56, label %51, label %52
}