xunge/DecIR huggingface dataset:
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *
createUnaryGeneralMathsExpression(struct memorycontainer *, int);
struct memorycontainer *
createSinHExpression(struct memorycontainer *expression) {
  return createUnaryGeneralMathsExpression(expression, 0x0007);
}


x86 assembly (clang, -O0):
<createSinHExpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
call   1030 <createUnaryGeneralMathsExpression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createSinHExpression>:
mov    $0x7,%esi
jmp    1030 <createUnaryGeneralMathsExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createSinHExpression(%struct.memorycontainer* %0) {
%2 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %2
%3 = load %struct.memorycontainer*, %struct.memorycontainer** %2
%4 = call %struct.memorycontainer* @createUnaryGeneralMathsExpression(%struct.memorycontainer* %3, i32 7)
ret %struct.memorycontainer* %4
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createSinHExpression(%struct.memorycontainer* %0) {
%2 = tail call %struct.memorycontainer* @createUnaryGeneralMathsExpression(%struct.memorycontainer* %0, i32 7)
ret %struct.memorycontainer* %2
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA_Ofilm(int, int);
void SetPanTiltMode_OFILM(unsigned char UcPnTmod_OFILM) {
  switch (UcPnTmod_OFILM) {
  case 0x00:
    RegWriteA_Ofilm(0x0109, 0x00);
    ;
    break;
  case 0x01:
    RegWriteA_Ofilm(0x0109, 0x01);
    ;
    break;
  }
}


x86 assembly (clang, -O0):
<SetPanTiltMode_OFILM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1143 <SetPanTiltMode_OFILM+0x33>
jmp    1132 <SetPanTiltMode_OFILM+0x22>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1154 <SetPanTiltMode_OFILM+0x44>
jmp    1163 <SetPanTiltMode_OFILM+0x53>
mov    $0x109,%edi
xor    %esi,%esi
call   1030 <RegWriteA_Ofilm@plt>
jmp    1163 <SetPanTiltMode_OFILM+0x53>
mov    $0x109,%edi
mov    $0x1,%esi
call   1030 <RegWriteA_Ofilm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetPanTiltMode_OFILM>:
test   %edi,%edi
je     1129 <SetPanTiltMode_OFILM+0x19>
cmp    $0x1,%dil
jne    1135 <SetPanTiltMode_OFILM+0x25>
mov    $0x1,%esi
mov    $0x109,%edi
jmp    1030 <RegWriteA_Ofilm@plt>
xor    %esi,%esi
mov    $0x109,%edi
jmp    1030 <RegWriteA_Ofilm@plt>
ret

LLVM IR (-O0):
define void @SetPanTiltMode_OFILM(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %7
]
5: ; preds = %1
%6 = call i32 @RegWriteA_Ofilm(i32 265, i32 0)
br label %9
7: ; preds = %1
%8 = call i32 @RegWriteA_Ofilm(i32 265, i32 1)
br label %9
9: ; preds = %1, %7, %5
ret void
}

LLVM IR (-O2):
define void @SetPanTiltMode_OFILM(i8 zeroext %0) {
switch i8 %0, label %6 [
i8 0, label %3
i8 1, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i32 [ 1, %2 ], [ 0, %1 ]
%5 = tail call i32 @RegWriteA_Ofilm(i32 265, i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void printNumberOfNotes(int value, int number) {
  if (number > 1)
    printf("%d $%d notes  ", number, value);
  else if (number == 1)
    printf("%d $%d note  ", number, value);
}


x86 assembly (clang, -O0):
<printNumberOfNotes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    113f <printNumberOfNotes+0x2f>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
jmp    1160 <printNumberOfNotes+0x50>
cmpl   $0x1,-0x8(%rbp)
jne    115b <printNumberOfNotes+0x4b>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1160 <printNumberOfNotes+0x50>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printNumberOfNotes>:
mov    %edi,%edx
cmp    $0x2,%esi
jl     1123 <printNumberOfNotes+0x13>
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
cmp    $0x1,%esi
jne    1139 <printNumberOfNotes+0x29>
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d $%d notes \00"
@.str.1 = [14 x i8] c"%d $%d note \00"
define void @printNumberOfNotes(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
br label %19
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16)
br label %18
18: ; preds = %14, %11
br label %19
19: ; preds = %18, %7
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d $%d notes \00"
@.str.1 = [14 x i8] c"%d $%d note \00"
define void @printNumberOfNotes(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
br label %10
6: ; preds = %2
%7 = icmp eq i32 %1, 1
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 %0)
br label %10
10: ; preds = %6, %8, %4
ret void
}
void uart_sendchar(const char c) {
  while ((*(volatile unsigned int *)((((0x10000000 + 0xA100000) + 0x0000) +
                                      0x14)) &
          0x20) == 0)
    ;
  *(volatile unsigned int *)((((0x10000000 + 0xA100000) + 0x0000) + 0x00)) = c;
}


x86 assembly (clang, -O0):
<uart_sendchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1a100014,%eax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
jne    1122 <uart_sendchar+0x22>
jmp    110a <uart_sendchar+0xa>
movsbl -0x1(%rbp),%ecx
mov    $0x1a100000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_sendchar>:
testl  $0x20,0x1a100014
je     1100 <uart_sendchar>
movsbl %dil,%eax
mov    %eax,0x1a100000
ret

LLVM IR (-O0):
define void @uart_sendchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i32, i32* inttoptr (i64 437256212 to i32*)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
store volatile i32 %10, i32* inttoptr (i64 437256192 to i32*)
ret void
}

LLVM IR (-O2):
define void @uart_sendchar(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i32, i32* inttoptr (i64 437256212 to i32*)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = sext i8 %0 to i32
store volatile i32 %7, i32* inttoptr (i64 437256192 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AddAlias(char const *, char const *);
void AliasCreate(const char *command, const char *alias) {
  AddAlias(command, alias);
}


x86 assembly (clang, -O0):
<AliasCreate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <AddAlias@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AliasCreate>:
jmp    1030 <AddAlias@plt>

LLVM IR (-O0):
define void @AliasCreate(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @AddAlias(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @AliasCreate(i8* %0, i8* %1) {
%3 = tail call i32 @AddAlias(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ increment_index();
void increment_name() { increment_index(); }


x86 assembly (clang, -O0):
<increment_name>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <increment_index@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment_name>:
xor    %eax,%eax
jmp    1030 <increment_index@plt>

LLVM IR (-O0):
define void @increment_name() {
%1 = call i32 (...) @increment_index()
ret void
}

LLVM IR (-O2):
define void @increment_name() {
%1 = tail call i32 (...) @increment_index()
ret void
}
void ff_hevc_put_hevc_uni_w_pel_pixels64_12_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_uni_w_pel_pixels64_12_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_uni_w_pel_pixels64_12_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_uni_w_pel_pixels64_12_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels64_12_sse4() {
ret void
}
int do_829() { return 829; }


x86 assembly (clang, -O0):
<do_829>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33d,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_829>:
mov    $0x33d,%eax
ret

LLVM IR (-O0):
define i32 @do_829() {
ret i32 829
}

LLVM IR (-O2):
define i32 @do_829() {
ret i32 829
}
void foo170(int p) {}


x86 assembly (clang, -O0):
<foo170>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo170>:
ret

LLVM IR (-O0):
define void @foo170(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo170(i32 %0) {
ret void
}
void turn_steps_off() {}


x86 assembly (clang, -O0):
<turn_steps_off>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_steps_off>:
ret

LLVM IR (-O0):
define void @turn_steps_off() {
ret void
}

LLVM IR (-O2):
define void @turn_steps_off() {
ret void
}
void f180(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  goto a;
a:
  0;
}


x86 assembly (clang, -O0):
<f180>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f180>:
ret

LLVM IR (-O0):
define void @f180() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
store i32 0, i32* %6
%12 = load i32, i32* %6
br label %13
13: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @f180() {
ret void
}
void f7(const int *x __attribute__((unused))) {}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
ret

LLVM IR (-O0):
define void @f7(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @f7(i32* nocapture %0) {
ret void
}
unsigned int slog(unsigned int block) {
  int i;
  for (i = 12; i <= 20; i++)
    if (block == (1 << i))
      return i;
  return 0;
}


x86 assembly (clang, -O0):
<slog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0xc,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jg     114d <slog+0x4d>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
cmp    %ecx,%eax
jne    113a <slog+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <slog+0x54>
jmp    113f <slog+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <slog+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slog>:
cmp    $0xffff,%edi
jle    112e <slog+0x2e>
cmp    $0x3ffff,%edi
jle    1151 <slog+0x51>
cmp    $0x40000,%edi
je     117d <slog+0x7d>
cmp    $0x80000,%edi
je     1183 <slog+0x83>
cmp    $0x100000,%edi
jne    1195 <slog+0x95>
mov    $0x14,%eax
ret
cmp    $0x3fff,%edi
jg     1167 <slog+0x67>
mov    $0xc,%eax
cmp    $0x1000,%edi
je     112d <slog+0x2d>
cmp    $0x2000,%edi
jne    1195 <slog+0x95>
mov    $0xd,%eax
ret
cmp    $0x10000,%edi
je     1189 <slog+0x89>
cmp    $0x20000,%edi
jne    1195 <slog+0x95>
mov    $0x11,%eax
ret
cmp    $0x4000,%edi
je     118f <slog+0x8f>
cmp    $0x8000,%edi
jne    1195 <slog+0x95>
mov    $0xf,%eax
ret
mov    $0x12,%eax
ret
mov    $0x13,%eax
ret
mov    $0x10,%eax
ret
mov    $0xe,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @slog(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 12, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 20
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %20
15: ; preds = %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
store i32 0, i32* %2
br label %20
20: ; preds = %19, %13
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @slog(i32 %0) {
switch i32 %0, label %2 [
i32 4096, label %11
i32 8192, label %3
i32 16384, label %4
i32 32768, label %5
i32 65536, label %6
i32 131072, label %7
i32 262144, label %8
i32 524288, label %9
i32 1048576, label %10
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %1, %10, %9, %8, %7, %6, %5, %4, %3, %2
%12 = phi i32 [ 12, %1 ], [ 0, %2 ], [ 13, %3 ], [ 14, %4 ], [ 15, %5 ], [ 16, %6 ], [ 17, %7 ], [ 18, %8 ], [ 19, %9 ], [ 20, %10 ]
ret i32 %12
}
void Noop() { __asm("nop"); }


x86 assembly (clang, -O0):
<Noop>:
push   %rbp
mov    %rsp,%rbp
nop
pop    %rbp
ret

x86 assembly (clang, -O2):
<Noop>:
nop
ret

LLVM IR (-O0):
define void @Noop() {
ret void
}

LLVM IR (-O2):
define void @Noop() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __require_allocated_array(char const *);
void perror(const char *s) { __require_allocated_array(s); }


x86 assembly (clang, -O0):
<perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__require_allocated_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perror>:
jmp    1030 <__require_allocated_array@plt>

LLVM IR (-O0):
define void @perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__require_allocated_array(i8* %3)
ret void
}

LLVM IR (-O2):
define void @perror(i8* %0) {
%2 = tail call i32 @__require_allocated_array(i8* %0)
ret void
}
unsigned pigpiod_if_version(void) { return 28; }


x86 assembly (clang, -O0):
<pigpiod_if_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pigpiod_if_version>:
mov    $0x1c,%eax
ret

LLVM IR (-O0):
define i32 @pigpiod_if_version() {
ret i32 28
}

LLVM IR (-O2):
define i32 @pigpiod_if_version() {
ret i32 28
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello World \n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World \0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int confirm_retry(void) {
  int x;
  printf("Again ... (0)NO (1)YES: ");
  scanf("%d", &x);
  return x;
}


x86 assembly (clang, -O0):
<confirm_retry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confirm_retry>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Again ... (0)NO (1)YES: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @confirm_retry() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [25 x i8] c"Again ... (0)NO (1)YES: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @confirm_retry() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
main() {
  int true = 1;
#pragma omp parallel if (1) if (true)
  { true = 1; }
  printf("error parallel 001 : can not compile this program.\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"error parallel 001 : can not compile this program.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [51 x i8] c"error parallel 001 : can not compile this program.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int yaffsfs_do_read(int, void *, unsigned int, int /*<<< orphan*/,
                    int /*<<< orphan*/);
int yaffs_read(int handle, void *buf, unsigned int nbyte) {
  return yaffsfs_do_read(handle, buf, nbyte, 0, 0);
}


x86 assembly (clang, -O0):
<yaffs_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <yaffsfs_do_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_read>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <yaffsfs_do_read@plt>

LLVM IR (-O0):
define i32 @yaffs_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @yaffsfs_do_read(i32 %7, i8* %8, i32 %9, i32 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yaffs_read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @yaffsfs_do_read(i32 %0, i8* %1, i32 %2, i32 0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRAC_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMRAC_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <U_WMRNOTIMPLEMENTED_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRAC_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMRAC_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRAC_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void RasterSubPanelDisable(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x38)))) &= ~(0x80000000u);
}


x86 assembly (clang, -O0):
<RasterSubPanelDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x38,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0x7fffffff,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterSubPanelDisable>:
add    $0x38,%edi
andl   $0x7fffffff,(%rdi)
ret

LLVM IR (-O0):
define void @RasterSubPanelDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 56
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 2147483647
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @RasterSubPanelDisable(i32 %0) {
%2 = add i32 %0, 56
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 2147483647
store volatile i32 %6, i32* %4
ret void
}
void foo_1_2_2_1_2_1_1_2_2() {}


x86 assembly (clang, -O0):
<foo_1_2_2_1_2_1_1_2_2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_1_2_2_1_2_1_1_2_2>:
ret

LLVM IR (-O0):
define void @foo_1_2_2_1_2_1_1_2_2() {
ret void
}

LLVM IR (-O2):
define void @foo_1_2_2_1_2_1_1_2_2() {
ret void
}
/* Variables and functions */
char a_lower(char);
int is_alpha(char c) {
  c = a_lower(c);
  return (c > 96 && c < 123) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <a_lower@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x60,%ecx
mov    %al,-0x2(%rbp)
jle    1149 <is_alpha+0x39>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
push   %rax
call   1030 <a_lower@plt>
add    $0x9f,%al
xor    %ecx,%ecx
cmp    $0x1a,%al
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @a_lower(i8 signext %3)
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sgt i32 %6, 96
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp slt i32 %10, 123
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_alpha(i8 signext %0) {
%2 = tail call signext i8 @a_lower(i8 signext %0)
%3 = add i8 %2, -97
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void terminate_interface() { endwin(); }


x86 assembly (clang, -O0):
<terminate_interface>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate_interface>:
xor    %eax,%eax
jmp    1030 <endwin@plt>

LLVM IR (-O0):
define void @terminate_interface() {
%1 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @terminate_interface() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dav1d_free_aligned(void *);
void dav1d_freep_aligned(void *ptr) {
  void **mem = (void **)ptr;
  if (*mem) {
    dav1d_free_aligned(*mem);
    *mem = NULL;
  }
}


x86 assembly (clang, -O0):
<dav1d_freep_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1149 <dav1d_freep_aligned+0x39>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <dav1d_free_aligned@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dav1d_freep_aligned>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <dav1d_freep_aligned+0x18>
call   1030 <dav1d_free_aligned@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @dav1d_freep_aligned(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = call i32 @dav1d_free_aligned(i8* %11)
%13 = load i8**, i8*** %3
store i8* null, i8** %13
br label %14
14: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @dav1d_freep_aligned(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @dav1d_free_aligned(i8* %3)
store i8* null, i8** %2
br label %7
7: ; preds = %5, %1
ret void
}
char *ws_parser_version() { return "2011-08-25 14:26:22"; }


x86 assembly (clang, -O0):
<ws_parser_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_parser_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"2011-08-25 14:26:22\00"
define i8* @ws_parser_version() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [20 x i8] c"2011-08-25 14:26:22\00"
define i8* @ws_parser_version() {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}
void XDisplayWidthMM() {}


x86 assembly (clang, -O0):
<XDisplayWidthMM>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XDisplayWidthMM>:
ret

LLVM IR (-O0):
define void @XDisplayWidthMM() {
ret void
}

LLVM IR (-O2):
define void @XDisplayWidthMM() {
ret void
}
/* Variables and functions */
void *memchr(const void *src, int c, size_t n) {
  const unsigned char *s = src;
  while (n--) {
    if (*s == (unsigned char)c) {
      return (void *)s;
    }
    s++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1163 <memchr+0x63>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1152 <memchr+0x52>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116b <memchr+0x6b>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1117 <memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     1122 <memchr+0x22>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %sil,(%rax)
je     1124 <memchr+0x24>
add    $0xffffffffffffffff,%rdx
add    $0x1,%rax
test   %rdx,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
br label %10
10: ; preds = %24, %3
%11 = load i64, i64* %7
%12 = add i64 %11, -1
store i64 %12, i64* %7
%13 = icmp ne i64 %11, 0
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i8*, i8** %8
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i32, i32* %6
%19 = trunc i32 %18 to i8
%20 = zext i8 %19 to i32
%21 = icmp eq i32 %17, %20
br i1 %21, label %22, label %24
22: ; preds = %14
%23 = load i8*, i8** %8
store i8* %23, i8** %4
br label %28
24: ; preds = %14
%25 = load i8*, i8** %8
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %8
br label %10
27: ; preds = %10
store i8* null, i8** %4
br label %28
28: ; preds = %27, %22
%29 = load i8*, i8** %4
ret i8* %29
}

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ %2, %5 ], [ %10, %13 ]
%9 = phi i8* [ %0, %5 ], [ %14, %13 ]
%10 = add i64 %8, -1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, %6
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = icmp eq i64 %10, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %13, %3
%17 = phi i8* [ null, %3 ], [ null, %13 ], [ %9, %7 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x22_setup() {
  char cmd[256];
  sprintf(cmd,
          "iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x22_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x22_setup>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x22_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x22_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
int av_clip_intp2_c(int a, int p) {
  if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
    return (a >> 31) ^ ((1 << p) - 1);
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_intp2_c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
mov    $0x2,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1157 <av_clip_intp2_c+0x57>
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    115d <av_clip_intp2_c+0x5d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_intp2_c>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
lea    (%rax,%rdi,1),%edx
shr    %cl,%edx
mov    %edi,%ecx
sar    $0x1f,%ecx
add    $0xffffffff,%eax
xor    %ecx,%eax
test   $0xfffffffe,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_clip_intp2_c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = shl i32 1, %7
%9 = add i32 %6, %8
%10 = load i32, i32* %5
%11 = shl i32 2, %10
%12 = sub nsw i32 %11, 1
%13 = xor i32 %12, -1
%14 = and i32 %9, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i32, i32* %4
%18 = ashr i32 %17, 31
%19 = load i32, i32* %5
%20 = shl i32 1, %19
%21 = sub nsw i32 %20, 1
%22 = xor i32 %18, %21
store i32 %22, i32* %3
br label %25
23: ; preds = %2
%24 = load i32, i32* %4
store i32 %24, i32* %3
br label %25
25: ; preds = %23, %16
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @av_clip_intp2_c(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = add i32 %3, %0
%5 = shl i32 -2, %1
%6 = and i32 %4, %5
%7 = icmp eq i32 %6, 0
%8 = ashr i32 %0, 31
%9 = add nsw i32 %3, -1
%10 = xor i32 %9, %8
%11 = select i1 %7, i32 %0, i32 %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ test_da();
int /*<<< orphan*/ test_fifo();
int /*<<< orphan*/ test_hash_bt();
int /*<<< orphan*/ test_lifo();
int /*<<< orphan*/ test_split();
int /*<<< orphan*/ test_string();
void tests_run() {
  test_da();
  test_string();
  test_hash_bt();
  test_fifo();
  test_lifo();
  test_split();
}


x86 assembly (clang, -O0):
<tests_run>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <test_da@plt>
mov    $0x0,%al
call   1040 <test_string@plt>
mov    $0x0,%al
call   1030 <test_hash_bt@plt>
mov    $0x0,%al
call   1080 <test_fifo@plt>
mov    $0x0,%al
call   1060 <test_lifo@plt>
mov    $0x0,%al
call   1050 <test_split@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tests_run>:
push   %rax
xor    %eax,%eax
call   1070 <test_da@plt>
xor    %eax,%eax
call   1040 <test_string@plt>
xor    %eax,%eax
call   1030 <test_hash_bt@plt>
xor    %eax,%eax
call   1080 <test_fifo@plt>
xor    %eax,%eax
call   1060 <test_lifo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_split@plt>

LLVM IR (-O0):
define void @tests_run() {
%1 = call i32 (...) @test_da()
%2 = call i32 (...) @test_string()
%3 = call i32 (...) @test_hash_bt()
%4 = call i32 (...) @test_fifo()
%5 = call i32 (...) @test_lifo()
%6 = call i32 (...) @test_split()
ret void
}

LLVM IR (-O2):
define void @tests_run() {
%1 = tail call i32 (...) @test_da()
%2 = tail call i32 (...) @test_string()
%3 = tail call i32 (...) @test_hash_bt()
%4 = tail call i32 (...) @test_fifo()
%5 = tail call i32 (...) @test_lifo()
%6 = tail call i32 (...) @test_split()
ret void
}
int is_even(int value) {
  if (value % 2 == 0)
    return !0;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_even>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <is_even+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <is_even+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_even>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_even(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_even(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
int emac2_ifoutmulticastpkts_set(unsigned int dev_id,
                                 union emac2_ifoutmulticastpkts_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac2_ifoutmulticastpkts_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<emac2_ifoutmulticastpkts_set>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
%union.emac2_ifoutmulticastpkts_u = type opaque
define i32 @emac2_ifoutmulticastpkts_set(i32 %0, %union.emac2_ifoutmulticastpkts_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_ifoutmulticastpkts_u*
store i32 %0, i32* %3
store %union.emac2_ifoutmulticastpkts_u* %1, %union.emac2_ifoutmulticastpkts_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_ifoutmulticastpkts_u = type opaque
define i32 @emac2_ifoutmulticastpkts_set(i32 %0, %union.emac2_ifoutmulticastpkts_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
scalar_t__ isdigit(char);
int isNumeric(char *num) {
  if (isdigit(*num)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     113e <isNumeric+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <isNumeric+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumeric>:
push   %rax
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isNumeric(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = call i64 @isdigit(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @isNumeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int shine_abs_and_sign(int *x) {
  if (*x > 0)
    return 0;
  *x *= -1;
  return 1;
}


x86 assembly (clang, -O0):
<shine_abs_and_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1121 <shine_abs_and_sign+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1131 <shine_abs_and_sign+0x31>
mov    -0x10(%rbp),%rax
imul   $0xffffffff,(%rax),%ecx
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shine_abs_and_sign>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   %ecx,%ecx
jle    1109 <shine_abs_and_sign+0x9>
ret
neg    %ecx
mov    %ecx,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @shine_abs_and_sign(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %12
8: ; preds = %1
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, -1
store i32 %11, i32* %9
store i32 1, i32* %2
br label %12
12: ; preds = %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @shine_abs_and_sign(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = sub nsw i32 0, %2
store i32 %5, i32* %0
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
void *calloc(long, long);
void *_xte_calloc(long in_number, long in_bytes, int in_zone,
                  char const *in_file, long in_line) {
  return calloc(in_number, in_bytes);
}


x86 assembly (clang, -O0):
<_xte_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xte_calloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @_xte_calloc(i64 %0, i64 %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = call i8* @calloc(i64 %11, i64 %12)
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @_xte_calloc(i64 %0, i64 %1, i32 %2, i8* nocapture readnone %3, i64 %4) {
%6 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %6
}
void rotr(int *a, int *b, int *c) {
  int helper;
  helper = *c;
  *c = *b;
  *b = *a;
  *a = helper;
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    (%rdx),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdx)
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @rotr(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = load i32, i32* %8
store i32 %9, i32* %7
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = load i32*, i32** %6
store i32 %11, i32* %12
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %5
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = load i32*, i32** %4
store i32 %16, i32* %17
ret void
}

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = load i32, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %0
store i32 %6, i32* %1
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sort(int);
int benchmark() {
  sort(20);
  return 0;
}


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <sort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
push   %rax
mov    $0x14,%edi
call   1030 <sort@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @benchmark() {
%1 = call i32 @sort(i32 20)
ret i32 0
}

LLVM IR (-O2):
define i32 @benchmark() {
%1 = tail call i32 @sort(i32 20)
ret i32 0
}
char _Locale_thousands_sep(struct _Locale_numeric *lnum
                           __attribute__((__unused__))) {
  return ',';
}


x86 assembly (clang, -O0):
<_Locale_thousands_sep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x2c,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Locale_thousands_sep>:
mov    $0x2c,%al
ret

LLVM IR (-O0):
%struct._Locale_numeric = type opaque
define signext i8 @_Locale_thousands_sep(%struct._Locale_numeric* %0) {
%2 = alloca %struct._Locale_numeric*
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %2
ret i8 44
}

LLVM IR (-O2):
%struct._Locale_numeric = type opaque
define signext i8 @_Locale_thousands_sep(%struct._Locale_numeric* nocapture readnone %0) {
ret i8 44
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
float addr(uint32_t *env) {
  float *context = (float *)*(float **)(env + 1);
  float a = (float)*(float *)(context);
  float b = (float)*(float *)(context + 1);
  return a + b;
}


x86 assembly (clang, -O0):
<addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr>:
mov    0x4(%rdi),%rax
movss  (%rax),%xmm0
addss  0x4(%rax),%xmm0
ret

LLVM IR (-O0):
define float @addr(i32* %0) {
%2 = alloca i32*
%3 = alloca float*
%4 = alloca float
%5 = alloca float
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = bitcast i32* %7 to float**
%9 = load float*, float** %8
store float* %9, float** %3
%10 = load float*, float** %3
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fadd float %15, %16
ret float %17
}

LLVM IR (-O2):
define float @addr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = bitcast i32* %2 to float**
%4 = load float*, float** %3
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %4, i64 1
%7 = load float, float* %6
%8 = fadd float %5, %7
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void header(void) {
  output("A1 .equ 7;");
  output("A2 .equ 8;");
  output("A3 .equ 9;");
  output("FSR .equ 4;");
  output("INDF .equ 0;");
  output("OSCCAL .equ 5;");
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <output@plt>
lea    0xee4(%rip),%rdi
call   1030 <output@plt>
lea    0xee3(%rip),%rdi
call   1030 <output@plt>
lea    0xee2(%rip),%rdi
call   1030 <output@plt>
lea    0xee2(%rip),%rdi
call   1030 <output@plt>
lea    0xee3(%rip),%rdi
call   1030 <output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <output@plt>
lea    0xee7(%rip),%rdi
call   1030 <output@plt>
lea    0xee6(%rip),%rdi
call   1030 <output@plt>
lea    0xee5(%rip),%rdi
call   1030 <output@plt>
lea    0xee5(%rip),%rdi
call   1030 <output@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <output@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"A1 .equ 7;\00"
@.str.1 = [11 x i8] c"A2 .equ 8;\00"
@.str.2 = [11 x i8] c"A3 .equ 9;\00"
@.str.3 = [12 x i8] c"FSR .equ 4;\00"
@.str.4 = [13 x i8] c"INDF .equ 0;\00"
@.str.5 = [15 x i8] c"OSCCAL .equ 5;\00"
define void @header() {
%1 = call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @output(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @output(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @output(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"A1 .equ 7;\00"
@.str.1 = [11 x i8] c"A2 .equ 8;\00"
@.str.2 = [11 x i8] c"A3 .equ 9;\00"
@.str.3 = [12 x i8] c"FSR .equ 4;\00"
@.str.4 = [13 x i8] c"INDF .equ 0;\00"
@.str.5 = [15 x i8] c"OSCCAL .equ 5;\00"
define void @header() {
%1 = tail call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @output(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @output(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @output(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @output(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}
void f(char *a) { __builtin_strcpy(a, ""); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strcpy(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @f(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
void XGrabButton() {}


x86 assembly (clang, -O0):
<XGrabButton>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XGrabButton>:
ret

LLVM IR (-O0):
define void @XGrabButton() {
ret void
}

LLVM IR (-O2):
define void @XGrabButton() {
ret void
}