#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*/ dummy_function();
int /*<<< orphan*/ static_function();
int main(void) {
  int element = 10;
  while (element-- > 0) {
    static_function();
    dummy_function();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    115d <main+0x3d>
mov    $0x0,%al
call   1030 <static_function@plt>
mov    $0x0,%al
call   1040 <dummy_function@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
call   1030 <static_function@plt>
xor    %eax,%eax
call   1040 <dummy_function@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = call i32 (...) @static_function()
%9 = call i32 (...) @dummy_function()
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @static_function()
%2 = tail call i32 (...) @dummy_function()
%3 = tail call i32 (...) @static_function()
%4 = tail call i32 (...) @dummy_function()
%5 = tail call i32 (...) @static_function()
%6 = tail call i32 (...) @dummy_function()
%7 = tail call i32 (...) @static_function()
%8 = tail call i32 (...) @dummy_function()
%9 = tail call i32 (...) @static_function()
%10 = tail call i32 (...) @dummy_function()
%11 = tail call i32 (...) @static_function()
%12 = tail call i32 (...) @dummy_function()
%13 = tail call i32 (...) @static_function()
%14 = tail call i32 (...) @dummy_function()
%15 = tail call i32 (...) @static_function()
%16 = tail call i32 (...) @dummy_function()
%17 = tail call i32 (...) @static_function()
%18 = tail call i32 (...) @dummy_function()
%19 = tail call i32 (...) @static_function()
%20 = tail call i32 (...) @dummy_function()
ret i32 0
}