xunge/DecIR huggingface dataset:
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strlen(char *);
int main(void) {
  char *s = "Campos verdes";
  char *p;
  p = malloc(strlen(s) + 1);
  p = s;
  char *s_duplicado;
  s_duplicado = duplica_string(s);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <duplica_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe6b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <duplica_string@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %2
store i8* %9, i8** %3
%10 = load i8*, i8** %2
%11 = call i8* @duplica_string(i8* %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ masm_assert(int /*<<< orphan*/, char *);
void *masm_malloc(int size) {
  void *p;
  p = malloc(size);
  masm_assert(p != NULL, "virtual memory exhausted\n");
  return p;
}


x86 assembly (clang, -O0):
<masm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeb5(%rip),%rsi
call   1030 <masm_assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<masm_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
lea    0xec7(%rip),%rsi
call   1030 <masm_assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"virtual memory exhausted\0A\00"
define i8* @masm_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @masm_assert(i32 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [26 x i8] c"virtual memory exhausted\0A\00"
define noalias i8* @masm_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @masm_assert(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
void decode_address(char *buf, unsigned long address) {}


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

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

LLVM IR (-O0):
define void @decode_address(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @decode_address(i8* nocapture %0, i64 %1) {
ret void
}
void delay(int time) {
  int i, j, k;
  for (k = 0; k < time; k++) {
    for (i = 0; i < 10; i++) {
      for (j = 0; j < 10000; j++) {
      }
    }
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1178 <delay+0x78>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1165 <delay+0x65>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    1152 <delay+0x52>
jmp    1144 <delay+0x44>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1132 <delay+0x32>
jmp    1157 <delay+0x57>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1121 <delay+0x21>
jmp    116a <delay+0x6a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <delay+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %5
br label %6
6: ; preds = %27, %1
%7 = load i32, i32* %5
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %30
10: ; preds = %6
store i32 0, i32* %3
br label %11
11: ; preds = %23, %10
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %26
14: ; preds = %11
store i32 0, i32* %4
br label %15
15: ; preds = %19, %14
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 10000
br i1 %17, label %18, label %22
18: ; preds = %15
br label %19
19: ; preds = %18
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %15
22: ; preds = %15
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %11
26: ; preds = %11
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %6
30: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
void v3s_(vec) short vec[3];
{
  float v[3];
  v[0] = vec[0];
  v[1] = vec[1];
  v[2] = vec[2];
  vcall(v, 3);
}


x86 assembly (clang, -O0):
<v3s_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl 0x4(%rax),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x14(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <vcall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3s_>:
sub    $0x18,%rsp
movswl (%rdi),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%rsp)
movswl 0x2(%rdi),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x10(%rsp)
movswl 0x4(%rdi),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x14(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <vcall@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @v3s_(i16* %0) {
%2 = alloca i16*
%3 = alloca [3 x float]
store i16* %0, i16** %2
%4 = load i16*, i16** %2
%5 = getelementptr inbounds i16, i16* %4, i64 0
%6 = load i16, i16* %5
%7 = sitofp i16 %6 to float
%8 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load i16*, i16** %2
%10 = getelementptr inbounds i16, i16* %9, i64 1
%11 = load i16, i16* %10
%12 = sitofp i16 %11 to float
%13 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = load i16*, i16** %2
%15 = getelementptr inbounds i16, i16* %14, i64 2
%16 = load i16, i16* %15
%17 = sitofp i16 %16 to float
%18 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 2
store float %17, float* %18
%19 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%20 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %19, i32 3)
ret void
}

LLVM IR (-O2):
define void @v3s_(i16* nocapture %0) {
%2 = alloca [3 x float]
%3 = bitcast [3 x float]* %2 to i8*
%4 = load i16, i16* %0
%5 = sitofp i16 %4 to float
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds i16, i16* %0, i64 1
%8 = load i16, i16* %7
%9 = sitofp i16 %8 to float
%10 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = getelementptr inbounds i16, i16* %0, i64 2
%12 = load i16, i16* %11
%13 = sitofp i16 %12 to float
%14 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
store float %13, float* %14
%15 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %6, i32 3)
ret void
}
void debug(char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug(i8* nocapture %0, ...) {
ret void
}
void mdp4_dtv_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe) {}


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

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

LLVM IR (-O0):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dtv_pipe_queue(i32 %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca i32
%4 = alloca %struct.mdp4_overlay_pipe*
store i32 %0, i32* %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_dtv_pipe_queue(i32 %0, %struct.mdp4_overlay_pipe* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fsync(int);
void flush(int fd) { fsync(fd); }


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fsync@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
jmp    1030 <fsync@plt>

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

LLVM IR (-O2):
define void @flush(i32 %0) {
%2 = tail call i32 @fsync(i32 %0)
ret void
}
void test_builtin_creall(_Complex long double ld) {
  if (__builtin_creall(ld) != __builtin_creall(ld))
    link_failure_builtin_creall();
}


x86 assembly (clang, -O0):
<test_builtin_creall>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
fucomip %st(0),%st
jnp    112e <test_builtin_creall+0x1e>
jmp    1127 <test_builtin_creall+0x17>
mov    $0x0,%al
call   1030 <link_failure_builtin_creall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_creall>:
fldt   0x8(%rsp)
fucomip %st(0),%st
jp     1119 <test_builtin_creall+0x9>
ret
xor    %eax,%eax
jmp    1030 <link_failure_builtin_creall@plt>

LLVM IR (-O0):
define void @test_builtin_creall({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%9 = load x86_fp80, x86_fp80* %8
%10 = fcmp une x86_fp80 %3, %7
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 (...) @link_failure_builtin_creall()
br label %13
13: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_creall({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp uno x86_fp80 %3, 0xK00000000000000000000
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_creall()
br label %7
7: ; preds = %5, %1
ret void
}
int prefix_forwarding_enabled() { return 0; }


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

x86 assembly (clang, -O2):
<prefix_forwarding_enabled>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @prefix_forwarding_enabled() {
ret i32 0
}

LLVM IR (-O2):
define i32 @prefix_forwarding_enabled() {
ret i32 0
}
void outb(unsigned char value, unsigned short port) {
  asm volatile("out"
               "b"
               " %"
               "b"
               "0,%"
               "w"
               "1"
               :
               : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
float floorf(float d) {
  int i = (int)d;
  return ((float)i);
}


x86 assembly (clang, -O0):
<floorf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf>:
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @floorf(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @floorf(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
ret float %3
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
void test_vorr_s16x8(int16_t *__restrict__ dest, int16_t *a, int16_t *b) {
  int i;
  for (i = 0; i < 8; i++) {
    dest[i] = a[i] | b[i];
  }
}


x86 assembly (clang, -O0):
<test_vorr_s16x8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    1150 <test_vorr_s16x8+0x50>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_vorr_s16x8+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorr_s16x8>:
movups (%rsi),%xmm0
movups (%rdx),%xmm1
orps   %xmm0,%xmm1
movups %xmm1,(%rdi)
movups 0x10(%rsi),%xmm0
movups 0x10(%rdx),%xmm1
orps   %xmm0,%xmm1
movups %xmm1,0x10(%rdi)
ret

LLVM IR (-O0):
define void @test_vorr_s16x8(i32* noalias %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
store i32 0, i32* %7
br label %8
8: ; preds = %27, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 8
br i1 %10, label %11, label %30
11: ; preds = %8
%12 = load i32*, i32** %5
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32*, i32** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = or i32 %16, %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
br label %27
27: ; preds = %11
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %8
30: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @test_vorr_s16x8(i32* noalias nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2) {
%4 = bitcast i32* %1 to <4 x i32>*
%5 = load <4 x i32>, <4 x i32>* %4
%6 = bitcast i32* %2 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = or <4 x i32> %7, %5
%9 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %1, i64 4
%11 = getelementptr inbounds i32, i32* %2, i64 4
%12 = getelementptr inbounds i32, i32* %0, i64 4
%13 = bitcast i32* %10 to <4 x i32>*
%14 = load <4 x i32>, <4 x i32>* %13
%15 = bitcast i32* %11 to <4 x i32>*
%16 = load <4 x i32>, <4 x i32>* %15
%17 = or <4 x i32> %16, %14
%18 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %17, <4 x i32>* %18
ret void
}
int func1() {
  static int a = 1;
  return a++;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0b(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
ret

LLVM IR (-O0):
@func1.a = internal global i32 1
define i32 @func1() {
%1 = load i32, i32* @func1.a
%2 = add nsw i32 %1, 1
store i32 %2, i32* @func1.a
ret i32 %1
}

LLVM IR (-O2):
@func1.a = internal unnamed_addr global i32 1
define i32 @func1() {
%1 = load i32, i32* @func1.a
%2 = add nsw i32 %1, 1
store i32 %2, i32* @func1.a
ret i32 %1
}
int myctoi(array) const char *array;
{
  int val = 0;
  (void)sscanf(array, "%d", &val);
  return val;
}


x86 assembly (clang, -O0):
<myctoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myctoi>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @myctoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @myctoi(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int sm_notify_offline(void *data, int len) {
  printf("%s offline\n", (char *)data);
  return 0;
}


x86 assembly (clang, -O0):
<sm_notify_offline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sm_notify_offline>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s offline\0A\00"
define i32 @sm_notify_offline(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 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s offline\0A\00"
define i32 @sm_notify_offline(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("***Running normal sum***\n");
  long int n = 12345678900;
  long int sum = 0;
  long int i;
  for (i = 0; i < n; i++) {
    sum += 1;
  }
  printf("Total sum = %ld\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x2dfdc1c34,%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1176 <main+0x66>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    114b <main+0x3b>
mov    -0x18(%rbp),%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
movabs $0x2dfdc1c34,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"***Running normal sum***\0A\00"
@.str.1 = [17 x i8] c"Total sum = %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i64 12345678900, i64* %2
store i64 0, i64* %3
store i64 0, i64* %4
br label %6
6: ; preds = %13, %0
%7 = load i64, i64* %4
%8 = load i64, i64* %2
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i64, i64* %3
%12 = add nsw i64 %11, 1
store i64 %12, i64* %3
br label %13
13: ; preds = %10
%14 = load i64, i64* %4
%15 = add nsw i64 %14, 1
store i64 %15, i64* %4
br label %6
16: ; preds = %6
%17 = load i64, i64* %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %17)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"Total sum = %ld\0A\00"
@str = [25 x i8] c"***Running normal sum***\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 12345678900)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __clean_env(int);
void __clean_env_destructor(void) {
  __clean_env(true);
  return;
}


x86 assembly (clang, -O0):
<__clean_env_destructor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <__clean_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clean_env_destructor>:
mov    $0x1,%edi
jmp    1030 <__clean_env@plt>

LLVM IR (-O0):
define void @__clean_env_destructor() {
%1 = call i32 @__clean_env(i32 1)
ret void
}

LLVM IR (-O2):
define void @__clean_env_destructor() {
%1 = tail call i32 @__clean_env(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tower_of_hanoi(int, char, char, char);
int main() {
  tower_of_hanoi(3, 'A', 'B', 'C');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1030 <tower_of_hanoi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x41,%esi
mov    $0x42,%edx
mov    $0x43,%ecx
call   1030 <tower_of_hanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @tower_of_hanoi(i32 3, i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @tower_of_hanoi(i32 3, i8 signext 65, i8 signext 66, i8 signext 67)
ret i32 0
}
int test_imm_5Duint32_reg(unsigned int val) {
  return ((val) & (0x5D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Duint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x5d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Duint32_reg>:
test   $0x5d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Duint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 93
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_5Duint32_reg(i32 %0) {
%2 = and i32 %0, 93
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void test_vmvn_u32x2(uint32_t *__restrict__ dest, uint32_t *a) {
  int i;
  for (i = 0; i < 2; i++) {
    dest[i] = ~a[i];
  }
}


x86 assembly (clang, -O0):
<test_vmvn_u32x2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1144 <test_vmvn_u32x2+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vmvn_u32x2+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vmvn_u32x2>:
mov    (%rsi),%eax
not    %eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
not    %eax
mov    %eax,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vmvn_u32x2(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = xor i32 %3, -1
store i32 %4, i32* %0
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = xor i32 %6, -1
%8 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %7, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int pthread_yield(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<pthread_yield>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_yield>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_yield() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_yield() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
/* Variables and functions */
scalar_t__ disassemblyOne(unsigned short);
void disassemble(unsigned short begin, unsigned short end) {
  int i;
  for (i = begin; i <= end;)
    i += disassemblyOne((unsigned short)i);
}


x86 assembly (clang, -O0):
<disassemble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jg     1159 <disassemble+0x49>
mov    -0x8(%rbp),%eax
movzwl %ax,%edi
call   1030 <disassemblyOne@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
jmp    112d <disassemble+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disassemble>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
cmp    %bx,%di
ja     1130 <disassemble+0x20>
movzwl %di,%ebp
nopl   (%rax)
movzwl %bp,%edi
call   1030 <disassemblyOne@plt>
add    %ebp,%eax
mov    %eax,%ebp
cmp    %ebx,%eax
jle    1120 <disassemble+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @disassemble(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
store i32 %7, i32* %5
br label %8
8: ; preds = %13, %2
%9 = load i32, i32* %5
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = icmp sle i32 %9, %11
br i1 %12, label %13, label %21
13: ; preds = %8
%14 = load i32, i32* %5
%15 = trunc i32 %14 to i16
%16 = call i64 @disassemblyOne(i16 zeroext %15)
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = add nsw i64 %18, %16
%20 = trunc i64 %19 to i32
store i32 %20, i32* %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @disassemble(i16 zeroext %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = icmp ugt i16 %0, %1
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = zext i16 %0 to i32
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ %12, %7 ], [ %6, %5 ]
%9 = trunc i32 %8 to i16
%10 = tail call i64 @disassemblyOne(i16 zeroext %9)
%11 = trunc i64 %10 to i32
%12 = add i32 %8, %11
%13 = icmp sgt i32 %12, %3
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
void foo606() {}


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

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

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

LLVM IR (-O2):
define void @foo606() {
ret void
}
__attribute__((const)) int av_isgraph(int c) { return c > 32 && c < 127; }


x86 assembly (clang, -O0):
<av_isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <av_isgraph+0x20>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @av_isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @av_isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
void _Locksyslock(void) {}


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

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

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

LLVM IR (-O2):
define void @_Locksyslock() {
ret void
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ assert_string(char *, char *, char *);
int /*<<< orphan*/ inet_ntop(int /*<<< orphan*/, int /*<<< orphan*/ *, char *,
                             int);
void assert_ip(char *expected, struct sockaddr_storage *reality, char *msg) {
  char dst[255];
  inet_ntop(AF_INET, &((struct sockaddr_in *)reality)->sin_addr, &dst[0], 255);
  assert_string(expected, dst, msg);
}


x86 assembly (clang, -O0):
<assert_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
lea    -0x120(%rbp),%rdx
mov    $0xff,%ecx
call   1030 <inet_ntop@plt>
mov    -0x8(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <assert_string@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_ip>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%r15
mov    %r15,%rdx
mov    $0xff,%ecx
call   1030 <inet_ntop@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <assert_string@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
define void @assert_ip(i8* %0, %struct.sockaddr_storage* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.sockaddr_storage*
%6 = alloca i8*
%7 = alloca [255 x i8]
store i8* %0, i8** %4
store %struct.sockaddr_storage* %1, %struct.sockaddr_storage** %5
store i8* %2, i8** %6
%8 = load i32, i32* @AF_INET
%9 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %5
%10 = bitcast %struct.sockaddr_storage* %9 to %struct.sockaddr_in*
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%13 = call i32 @inet_ntop(i32 %8, i32* %11, i8* %12, i32 255)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%16 = load i8*, i8** %6
%17 = call i32 @assert_string(i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
@AF_INET = global i32 0
define void @assert_ip(i8* %0, %struct.sockaddr_storage* %1, i8* %2) {
%4 = alloca [255 x i8]
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* @AF_INET
%7 = getelementptr %struct.sockaddr_storage, %struct.sockaddr_storage* %1, i64 0, i32 0
%8 = call i32 @inet_ntop(i32 %6, i32* %7, i8* %5, i32 255)
%9 = call i32 @assert_string(i8* %0, i8* %5, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_python_doc_string() {
  test_parser_verify_parse(
      test_parser_sourcefile("python", "  '''\n  doc comment\n  '''"), "python",
      "", "'''\ndoc comment\n'''", 0);
}


x86 assembly (clang, -O0):
<test_python_doc_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xeed(%rip),%rdx
lea    0xed3(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_python_doc_string>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xef6(%rip),%rdx
lea    0xedc(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"python\00"
@.str.1 = [26 x i8] c" '''\0A doc comment\0A '''\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [20 x i8] c"'''\0Adoc comment\0A'''\00"
define void @test_python_doc_string() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"python\00"
@.str.1 = [26 x i8] c" '''\0A doc comment\0A '''\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [20 x i8] c"'''\0Adoc comment\0A'''\00"
define void @test_python_doc_string() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_read;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, void *, size_t);
ssize_t gotcha_read(int fd, void *buf, size_t count) {
  return syscall(SYS_read, fd, buf, count);
}


x86 assembly (clang, -O0):
<gotcha_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotcha_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_read = global i32 0
define i32 @gotcha_read(i32 %0, i8* %1, i64 %2) {
%4 = load i32, i32* @SYS_read
%5 = tail call i32 @syscall(i32 %4, i32 %0, i8* %1, i64 %2)
ret i32 %5
}
void clock_init_uart_legacy(void) {
  (*((volatile unsigned long *)((0x01c20000 + 0x06C))) |=
   (unsigned long)(1 << ((16) + 1 - 1)));
  (*((volatile unsigned long *)((0x01c20000 + 0x2D8))) |=
   (unsigned long)(1 << ((16) + 1 - 1)));
}


x86 assembly (clang, -O0):
<clock_init_uart_legacy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c2006c,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    $0x1c2006c,%eax
mov    %rcx,(%rax)
mov    $0x1c202d8,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    $0x1c202d8,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_init_uart_legacy>:
orq    $0x10000,0x1c2006c
orq    $0x10000,0x1c202d8
ret

LLVM IR (-O0):
define void @clock_init_uart_legacy() {
%1 = load volatile i64, i64* inttoptr (i64 29491308 to i64*)
%2 = or i64 %1, 65536
store volatile i64 %2, i64* inttoptr (i64 29491308 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 29491928 to i64*)
%4 = or i64 %3, 65536
store volatile i64 %4, i64* inttoptr (i64 29491928 to i64*)
ret void
}

LLVM IR (-O2):
define void @clock_init_uart_legacy() {
%1 = load volatile i64, i64* inttoptr (i64 29491308 to i64*)
%2 = or i64 %1, 65536
store volatile i64 %2, i64* inttoptr (i64 29491308 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 29491928 to i64*)
%4 = or i64 %3, 65536
store volatile i64 %4, i64* inttoptr (i64 29491928 to i64*)
ret void
}
void foo_2_2_1_2_1_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_2_1_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CBitDly();
int /*<<< orphan*/ I2CSCLHigh();
int /*<<< orphan*/ SDA_Down();
int /*<<< orphan*/ SDA_Up();
void I2CSendStop(void) {
  SDA_Down();
  I2CBitDly();
  I2CSCLHigh();
  I2CBitDly();
  SDA_Up();
  I2CBitDly();
}


x86 assembly (clang, -O0):
<I2CSendStop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <SDA_Down@plt>
mov    $0x0,%al
call   1030 <I2CBitDly@plt>
mov    $0x0,%al
call   1040 <I2CSCLHigh@plt>
mov    $0x0,%al
call   1030 <I2CBitDly@plt>
mov    $0x0,%al
call   1050 <SDA_Up@plt>
mov    $0x0,%al
call   1030 <I2CBitDly@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSendStop>:
push   %rax
xor    %eax,%eax
call   1060 <SDA_Down@plt>
xor    %eax,%eax
call   1030 <I2CBitDly@plt>
xor    %eax,%eax
call   1040 <I2CSCLHigh@plt>
xor    %eax,%eax
call   1030 <I2CBitDly@plt>
xor    %eax,%eax
call   1050 <SDA_Up@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <I2CBitDly@plt>

LLVM IR (-O0):
define void @I2CSendStop() {
%1 = call i32 (...) @SDA_Down()
%2 = call i32 (...) @I2CBitDly()
%3 = call i32 (...) @I2CSCLHigh()
%4 = call i32 (...) @I2CBitDly()
%5 = call i32 (...) @SDA_Up()
%6 = call i32 (...) @I2CBitDly()
ret void
}

LLVM IR (-O2):
define void @I2CSendStop() {
%1 = tail call i32 (...) @SDA_Down()
%2 = tail call i32 (...) @I2CBitDly()
%3 = tail call i32 (...) @I2CSCLHigh()
%4 = tail call i32 (...) @I2CBitDly()
%5 = tail call i32 (...) @SDA_Up()
%6 = tail call i32 (...) @I2CBitDly()
ret void
}
int main() {
  int a = 10;
  int b = 0;
  do {
    a = 1;
  } while ((b = 40));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x28,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %5, %0
store i32 1, i32* %2
br label %5
5: ; preds = %4
store i32 40, i32* %3
br i1 true, label %4, label %6
6: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void Mali_InitPerfCountersFn(int core, int cnt_num, int cnt_id) {}


x86 assembly (clang, -O0):
<Mali_InitPerfCountersFn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Mali_InitPerfCountersFn(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @Mali_InitPerfCountersFn(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
bool nrf51_errata_17(void) { return false; }


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

x86 assembly (clang, -O2):
<nrf51_errata_17>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @nrf51_errata_17() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf51_errata_17() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int comp_keys(const void *k1, const void *k2) {
  return (uint64_t)k1 == (uint64_t)k2;
}


x86 assembly (clang, -O0):
<comp_keys>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_keys>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @comp_keys(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = icmp eq i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @comp_keys(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
_Bool eraseEeprom() { return 0; }


x86 assembly (clang, -O0):
<eraseEeprom>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eraseEeprom>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i1 @eraseEeprom() {
ret i1 false
}

LLVM IR (-O2):
define zeroext i1 @eraseEeprom() {
ret i1 false
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getdelim(char **, size_t *, char, int /*<<< orphan*/ *);
ssize_t getline(char **s, size_t *n, FILE *f) {
  return getdelim(s, n, '\n', f);
}


x86 assembly (clang, -O0):
<getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0xa,%edx
call   1030 <getdelim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <getdelim@plt>

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

LLVM IR (-O2):
define i32 @getline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ pthread_t;
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, char const *, unsigned int, unsigned int,
                          unsigned int);
scalar_t__ pthread_self();
void printids(const char *s) {
  pid_t pid;
  pthread_t tid;
  pid = getpid();
  tid = pthread_self();
  printf("%s pid %u tid %u (0x%x) \n", s, (unsigned int)pid, (unsigned int)tid,
         (unsigned int)tid);
}


x86 assembly (clang, -O0):
<printids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %eax,%r8d
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printids>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeb1(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"%s pid %u tid %u (0x%x) \0A\00"
define void @printids(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = call i64 (...) @getpid()
store i64 %5, i64* %3
%6 = call i64 (...) @pthread_self()
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = trunc i64 %8 to i32
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i32
%12 = load i64, i64* %4
%13 = trunc i64 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %9, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s pid %u tid %u (0x%x) \0A\00"
define void @printids(i8* %0) {
%2 = tail call i64 (...) @getpid()
%3 = tail call i64 (...) @pthread_self()
%4 = trunc i64 %2 to i32
%5 = trunc i64 %3 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i32 %5, i32 %5)
ret void
}