#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*/ ClWait(int);
int /*<<< orphan*/ Cl_signal(int, int, int, int, int, int, int, int, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  char a[20];
  int x = 0;
  int tmr = 500;
  int tmrdiv = 0;
  int numElem = 400;
  int sig1type = 0;
  int sig1min = 0;
  int sig1max = 4000;
  int sig2type = 0;
  int sig2min = 0;
  int sig2max = 4000;
  int i;
  printf("Change tab continous press Ctrl-C to exit\n");
  while (1) {
    for (i = 0; i < 5000; i += 10) {
      Cl_signal(tmr, tmrdiv, numElem, sig1type, sig1min, i, sig2type, sig2min,
                5000 - i);
      ClWait(100);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x1f4,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x190,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0xfa0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0xfa0,-0x48(%rbp)
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x1388,-0x4c(%rbp)
jge    11f3 <main+0xc3>
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x4c(%rbp),%r9d
mov    -0x40(%rbp),%r11d
mov    -0x44(%rbp),%r10d
mov    $0x1388,%eax
sub    -0x4c(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <Cl_signal@plt>
mov    $0x64,%edi
call   1050 <ClWait@plt>
mov    -0x4c(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4c(%rbp)
jmp    1198 <main+0x68>
jmp    1191 <main+0x61>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    $0xfffffff6,%ebx
mov    $0x1388,%r14d
nopl   0x0(%rax,%rax,1)
add    $0xa,%ebx
sub    $0x8,%rsp
mov    $0x1f4,%edi
xor    %esi,%esi
mov    $0x190,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebx,%r9d
push   %r14
push   $0x0
push   $0x0
call   1040 <Cl_signal@plt>
add    $0x20,%rsp
mov    $0x64,%edi
call   1050 <ClWait@plt>
add    $0xfffffff6,%r14d
cmp    $0x137e,%ebx
jb     1150 <main+0x20>
jmp    1140 <main+0x10>

LLVM IR (-O0):
@.str = [43 x i8] c"Change tab continous press Ctrl-C to exit\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 500, i32* %4
store i32 0, i32* %5
store i32 400, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 4000, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 4000, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %0, %35
store i32 0, i32* %13
br label %16
16: ; preds = %32, %15
%17 = load i32, i32* %13
%18 = icmp slt i32 %17, 5000
br i1 %18, label %19, label %35
19: ; preds = %16
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = load i32, i32* %13
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = load i32, i32* %13
%29 = sub nsw i32 5000, %28
%30 = call i32 @Cl_signal(i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %29)
%31 = call i32 @ClWait(i32 100)
br label %32
32: ; preds = %19
%33 = load i32, i32* %13
%34 = add nsw i32 %33, 10
store i32 %34, i32* %13
br label %16
35: ; preds = %16
br label %15
}

LLVM IR (-O2):
@str = [42 x i8] c"Change tab continous press Ctrl-C to exit\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %3, %0
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %8, %3 ]
%5 = sub nuw nsw i32 5000, %4
%6 = tail call i32 @Cl_signal(i32 500, i32 0, i32 400, i32 0, i32 0, i32 %4, i32 0, i32 0, i32 %5)
%7 = tail call i32 @ClWait(i32 100)
%8 = add nuw nsw i32 %4, 10
%9 = icmp ult i32 %4, 4990
br i1 %9, label %3, label %2
}