#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, int, int);
int main() {
  int time = 0;
  int value = 55;
  for (int i = 0; i < 127; i++) {
    printf("%d Param ch=1 con=%d val=%d\n", ++time, i, value);
    value += 55;
    value %= 0x80;
    printf("%d Param ch=1 con=%d val=%d\n", ++time, i, value);
    value += 55;
    value %= 0x80;
    printf("%d Param ch=1 con=%d val=%d\n", ++time, i, 0);
    printf("%d Param ch=1 con=%d val=%d\n", ++time, i, value);
    value += 55;
    value %= 0x80;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x37,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x7f,-0x10(%rbp)
jge    11fc <main+0xec>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x37,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x37,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
mov    -0x10(%rbp),%edx
lea    0xe4b(%rip),%rdi
xor    %ecx,%ecx
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x37,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x37,%ebx
xor    %r14d,%r14d
mov    $0x4,%ebp
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
lea    -0x3(%rbp),%esi
mov    %r15,%rdi
mov    %r14d,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
lea    0x37(%rbx),%ecx
and    $0x7f,%ecx
lea    -0x2(%rbp),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <printf@plt>
lea    0x6e(%rbx),%r12d
and    $0x7f,%r12d
lea    -0x1(%rbp),%esi
mov    %r15,%rdi
mov    %r14d,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r12d,%ecx
call   1030 <printf@plt>
add    $0x25,%ebx
and    $0x7f,%ebx
add    $0x1,%r14d
add    $0x4,%ebp
cmp    $0x200,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"%d Param ch=1 con=%d val=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 55, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %40, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 127
br i1 %7, label %8, label %43
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 55
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = srem i32 %16, 128
store i32 %17, i32* %3
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = load i32, i32* %4
%21 = load i32, i32* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 55
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = srem i32 %25, 128
store i32 %26, i32* %3
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
%29 = load i32, i32* %4
%30 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %29, i32 0)
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
%33 = load i32, i32* %4
%34 = load i32, i32* %3
%35 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %32, i32 %33, i32 %34)
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 55
store i32 %37, i32* %3
%38 = load i32, i32* %3
%39 = srem i32 %38, 128
store i32 %39, i32* %3
br label %40
40: ; preds = %8
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %5
43: ; preds = %5
%44 = load i32, i32* %1
ret i32 %44
}

LLVM IR (-O2):
@.str = [29 x i8] c"%d Param ch=1 con=%d val=%d\0A\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %20, %2 ]
%4 = phi i32 [ 55, %0 ], [ %19, %2 ]
%5 = phi i32 [ 0, %0 ], [ %16, %2 ]
%6 = or i32 %5, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %3, i32 %4)
%8 = add nuw nsw i32 %4, 55
%9 = and i32 %8, 127
%10 = or i32 %5, 2
%11 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %3, i32 %9)
%12 = add nuw nsw i32 %4, 110
%13 = and i32 %12, 127
%14 = or i32 %5, 3
%15 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %3, i32 0)
%16 = add nuw nsw i32 %5, 4
%17 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %3, i32 %13)
%18 = add nuw nsw i32 %4, 37
%19 = and i32 %18, 127
%20 = add nuw nsw i32 %3, 1
%21 = icmp eq i32 %20, 127
br i1 %21, label %1, label %2
}