#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*/ assert(int);
void example9() {
  char a[10];
  int n;
  assert(a[3] == 800);
  for (int i = 0; i < 10; i++) {
    a[i] = 7;
  }
  assert(a[0] == 7);
  assert(a[3] == 7);
  a[3] = (char)n;
  assert(a[3] == 800);
  assert(a[3] == 127);
  assert(a[3] == -128);
  assert(a[3] == -129);
}


x86 assembly (clang, -O0):
<example9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsbl -0x7(%rbp),%eax
cmp    $0x320,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1156 <example9+0x46>
movslq -0x14(%rbp),%rax
movb   $0x7,-0xa(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <example9+0x25>
movsbl -0xa(%rbp),%eax
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x7(%rbp),%eax
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%eax
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
cmp    $0x320,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x7(%rbp),%eax
cmp    $0x7f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x7(%rbp),%eax
cmp    $0xffffff80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x7(%rbp),%eax
cmp    $0xffffff7f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example9>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @example9() {
%1 = alloca [10 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 800
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
store i32 0, i32* %3
br label %10
10: ; preds = %17, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 %15
store i8 7, i8* %16
br label %17
17: ; preds = %13
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %10
20: ; preds = %10
%21 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 7
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 7
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load i32, i32* %2
%34 = trunc i32 %33 to i8
%35 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
store i8 %34, i8* %35
%36 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 800
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 127
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, -128
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
%54 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 3
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, -129
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
ret void
}

LLVM IR (-O2):
define void @example9() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 0)
%5 = tail call i32 @assert(i32 0)
%6 = tail call i32 @assert(i32 0)
%7 = tail call i32 @assert(i32 0)
ret void
}