#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 */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert_or_panic(int);
void c_array(uint8_t x[10]) {
  assert_or_panic(x[0] == '1');
  assert_or_panic(x[1] == '2');
  assert_or_panic(x[2] == '3');
  assert_or_panic(x[3] == '4');
  assert_or_panic(x[4] == '5');
  assert_or_panic(x[5] == '6');
  assert_or_panic(x[6] == '7');
  assert_or_panic(x[7] == '8');
  assert_or_panic(x[8] == '9');
  assert_or_panic(x[9] == '0');
}


x86 assembly (clang, -O0):
<c_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x32,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x33,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x34,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x35,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0x36,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x37,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x7(%rax),%eax
cmp    $0x38,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x8(%rax),%eax
cmp    $0x39,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
mov    -0x8(%rbp),%rax
movsbl 0x9(%rax),%eax
cmp    $0x30,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_array>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmpb   $0x31,(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x32,0x1(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x33,0x2(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x34,0x3(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x35,0x4(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x36,0x5(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x37,0x6(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x38,0x7(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x39,0x8(%rbx)
sete   %dil
call   1030 <assert_or_panic@plt>
xor    %edi,%edi
cmpb   $0x30,0x9(%rbx)
sete   %dil
pop    %rbx
jmp    1030 <assert_or_panic@plt>

LLVM IR (-O0):
define void @c_array(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 49
%8 = zext i1 %7 to i32
%9 = call i32 @assert_or_panic(i32 %8)
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 50
%15 = zext i1 %14 to i32
%16 = call i32 @assert_or_panic(i32 %15)
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 51
%22 = zext i1 %21 to i32
%23 = call i32 @assert_or_panic(i32 %22)
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 3
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 52
%29 = zext i1 %28 to i32
%30 = call i32 @assert_or_panic(i32 %29)
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i64 4
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 53
%36 = zext i1 %35 to i32
%37 = call i32 @assert_or_panic(i32 %36)
%38 = load i8*, i8** %2
%39 = getelementptr inbounds i8, i8* %38, i64 5
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 54
%43 = zext i1 %42 to i32
%44 = call i32 @assert_or_panic(i32 %43)
%45 = load i8*, i8** %2
%46 = getelementptr inbounds i8, i8* %45, i64 6
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 55
%50 = zext i1 %49 to i32
%51 = call i32 @assert_or_panic(i32 %50)
%52 = load i8*, i8** %2
%53 = getelementptr inbounds i8, i8* %52, i64 7
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 56
%57 = zext i1 %56 to i32
%58 = call i32 @assert_or_panic(i32 %57)
%59 = load i8*, i8** %2
%60 = getelementptr inbounds i8, i8* %59, i64 8
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 57
%64 = zext i1 %63 to i32
%65 = call i32 @assert_or_panic(i32 %64)
%66 = load i8*, i8** %2
%67 = getelementptr inbounds i8, i8* %66, i64 9
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 48
%71 = zext i1 %70 to i32
%72 = call i32 @assert_or_panic(i32 %71)
ret void
}

LLVM IR (-O2):
define void @c_array(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 49
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert_or_panic(i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 50
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert_or_panic(i32 %9)
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 51
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert_or_panic(i32 %14)
%16 = getelementptr inbounds i8, i8* %0, i64 3
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 52
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert_or_panic(i32 %19)
%21 = getelementptr inbounds i8, i8* %0, i64 4
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 53
%24 = zext i1 %23 to i32
%25 = tail call i32 @assert_or_panic(i32 %24)
%26 = getelementptr inbounds i8, i8* %0, i64 5
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 54
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert_or_panic(i32 %29)
%31 = getelementptr inbounds i8, i8* %0, i64 6
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 55
%34 = zext i1 %33 to i32
%35 = tail call i32 @assert_or_panic(i32 %34)
%36 = getelementptr inbounds i8, i8* %0, i64 7
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 56
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert_or_panic(i32 %39)
%41 = getelementptr inbounds i8, i8* %0, i64 8
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 57
%44 = zext i1 %43 to i32
%45 = tail call i32 @assert_or_panic(i32 %44)
%46 = getelementptr inbounds i8, i8* %0, i64 9
%47 = load i8, i8* %46
%48 = icmp eq i8 %47, 48
%49 = zext i1 %48 to i32
%50 = tail call i32 @assert_or_panic(i32 %49)
ret void
}