#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 */
char bitNot(char);
void AU_Neg(char *Ra) {
  int i = 8 - 1;
  for (; i >= 0; i--) {
    *(Ra + i) = bitNot(*(Ra + i));
  }
}


x86 assembly (clang, -O0):
<AU_Neg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1159 <AU_Neg+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <bitNot@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <AU_Neg+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AU_Neg>:
push   %rbx
mov    %rdi,%rbx
movsbl 0x7(%rdi),%edi
call   1030 <bitNot@plt>
mov    %al,0x7(%rbx)
movsbl 0x6(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x6(%rbx)
movsbl 0x5(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x5(%rbx)
movsbl 0x4(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x4(%rbx)
movsbl 0x3(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x3(%rbx)
movsbl 0x2(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x2(%rbx)
movsbl 0x1(%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,0x1(%rbx)
movsbl (%rbx),%edi
call   1030 <bitNot@plt>
mov    %al,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @AU_Neg(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 7, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = call signext i8 @bitNot(i8 signext %12)
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 %13, i8* %17
br label %18
18: ; preds = %7
%19 = load i32, i32* %3
%20 = add nsw i32 %19, -1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @AU_Neg(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = tail call signext i8 @bitNot(i8 signext %3)
store i8 %4, i8* %2
%5 = getelementptr inbounds i8, i8* %0, i64 6
%6 = load i8, i8* %5
%7 = tail call signext i8 @bitNot(i8 signext %6)
store i8 %7, i8* %5
%8 = getelementptr inbounds i8, i8* %0, i64 5
%9 = load i8, i8* %8
%10 = tail call signext i8 @bitNot(i8 signext %9)
store i8 %10, i8* %8
%11 = getelementptr inbounds i8, i8* %0, i64 4
%12 = load i8, i8* %11
%13 = tail call signext i8 @bitNot(i8 signext %12)
store i8 %13, i8* %11
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = tail call signext i8 @bitNot(i8 signext %15)
store i8 %16, i8* %14
%17 = getelementptr inbounds i8, i8* %0, i64 2
%18 = load i8, i8* %17
%19 = tail call signext i8 @bitNot(i8 signext %18)
store i8 %19, i8* %17
%20 = getelementptr inbounds i8, i8* %0, i64 1
%21 = load i8, i8* %20
%22 = tail call signext i8 @bitNot(i8 signext %21)
store i8 %22, i8* %20
%23 = load i8, i8* %0
%24 = tail call signext i8 @bitNot(i8 signext %23)
store i8 %24, i8* %0
ret void
}