#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*/ blas(char);
int /*<<< orphan*/ blau(unsigned char);
void tst(void) {
  unsigned i;
  for (i = 0; i < 129; i++)
    blas((signed char)i);
  for (i = 0; i < 128; i++)
    blas((signed char)i);
  for (i = 0; i < 127; i++)
    blas((signed char)i);
  for (i = 0; i < 256; i++)
    blau((unsigned char)i);
  for (i = 0; i < 257; i++)
    blau((unsigned char)i);
}


x86 assembly (clang, -O0):
<tst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x81,-0x4(%rbp)
jae    1155 <tst+0x35>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1040 <blas@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <tst+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jae    1182 <tst+0x62>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1040 <blas@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115c <tst+0x3c>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7f,-0x4(%rbp)
jae    11ac <tst+0x8c>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1040 <blas@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1189 <tst+0x69>
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jae    11d9 <tst+0xb9>
mov    -0x4(%rbp),%eax
movzbl %al,%edi
call   1030 <blau@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11b3 <tst+0x93>
movl   $0x0,-0x4(%rbp)
cmpl   $0x101,-0x4(%rbp)
jae    1206 <tst+0xe6>
mov    -0x4(%rbp),%eax
movzbl %al,%edi
call   1030 <blau@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11e0 <tst+0xc0>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %bl,%edi
call   1040 <blas@plt>
add    $0x1,%ebx
cmp    $0x81,%ebx
jne    1130 <tst+0x10>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %bl,%edi
call   1040 <blas@plt>
add    $0x1,%ebx
cmp    $0x80,%ebx
jne    1150 <tst+0x30>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %bl,%edi
call   1040 <blas@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1170 <tst+0x50>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %bl,%edi
call   1030 <blau@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1190 <tst+0x70>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %bl,%edi
call   1030 <blau@plt>
add    $0x1,%ebx
cmp    $0x101,%ebx
jne    11b0 <tst+0x90>
pop    %rbx
ret

LLVM IR (-O0):
define void @tst() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp ult i32 %3, 129
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = trunc i32 %6 to i8
%8 = call i32 @blas(i8 signext %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
store i32 0, i32* %1
br label %13
13: ; preds = %20, %12
%14 = load i32, i32* %1
%15 = icmp ult i32 %14, 128
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32, i32* %1
%18 = trunc i32 %17 to i8
%19 = call i32 @blas(i8 signext %18)
br label %20
20: ; preds = %16
%21 = load i32, i32* %1
%22 = add i32 %21, 1
store i32 %22, i32* %1
br label %13
23: ; preds = %13
store i32 0, i32* %1
br label %24
24: ; preds = %31, %23
%25 = load i32, i32* %1
%26 = icmp ult i32 %25, 127
br i1 %26, label %27, label %34
27: ; preds = %24
%28 = load i32, i32* %1
%29 = trunc i32 %28 to i8
%30 = call i32 @blas(i8 signext %29)
br label %31
31: ; preds = %27
%32 = load i32, i32* %1
%33 = add i32 %32, 1
store i32 %33, i32* %1
br label %24
34: ; preds = %24
store i32 0, i32* %1
br label %35
35: ; preds = %42, %34
%36 = load i32, i32* %1
%37 = icmp ult i32 %36, 256
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = load i32, i32* %1
%40 = trunc i32 %39 to i8
%41 = call i32 @blau(i8 zeroext %40)
br label %42
42: ; preds = %38
%43 = load i32, i32* %1
%44 = add i32 %43, 1
store i32 %44, i32* %1
br label %35
45: ; preds = %35
store i32 0, i32* %1
br label %46
46: ; preds = %53, %45
%47 = load i32, i32* %1
%48 = icmp ult i32 %47, 257
br i1 %48, label %49, label %56
49: ; preds = %46
%50 = load i32, i32* %1
%51 = trunc i32 %50 to i8
%52 = call i32 @blau(i8 zeroext %51)
br label %53
53: ; preds = %49
%54 = load i32, i32* %1
%55 = add i32 %54, 1
store i32 %55, i32* %1
br label %46
56: ; preds = %46
ret void
}

LLVM IR (-O2):
define void @tst() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @blas(i8 signext %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 129
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ 0, %1 ]
%9 = trunc i32 %8 to i8
%10 = tail call i32 @blas(i8 signext %9)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 128
br i1 %12, label %13, label %7
13: ; preds = %7, %13
%14 = phi i32 [ %17, %13 ], [ 0, %7 ]
%15 = trunc i32 %14 to i8
%16 = tail call i32 @blas(i8 signext %15)
%17 = add nuw nsw i32 %14, 1
%18 = icmp eq i32 %17, 127
br i1 %18, label %19, label %13
19: ; preds = %13, %19
%20 = phi i32 [ %23, %19 ], [ 0, %13 ]
%21 = trunc i32 %20 to i8
%22 = tail call i32 @blau(i8 zeroext %21)
%23 = add nuw nsw i32 %20, 1
%24 = icmp eq i32 %23, 256
br i1 %24, label %25, label %19
25: ; preds = %19, %25
%26 = phi i32 [ %29, %25 ], [ 0, %19 ]
%27 = trunc i32 %26 to i8
%28 = tail call i32 @blau(i8 zeroext %27)
%29 = add nuw nsw i32 %26, 1
%30 = icmp eq i32 %29, 257
br i1 %30, label %31, label %25
31: ; preds = %25
ret void
}