xunge/DecIR huggingface dataset:
void ff_hevc_put_hevc_uni_w_epel_hv48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv48_12_sse4() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
char *TimeToString(time_t time) {
  char *timebuf = (char *)malloc(sizeof(char) * 20);
  struct tm *newtime;
  time_t lt = time;
  newtime = localtime(&lt);
  strftime(timebuf, 20, "%Y/%m/%d", newtime);
  return timebuf;
}


x86 assembly (clang, -O0):
<TimeToString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x14,%esi
lea    0xe90(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimeToString>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xea9(%rip),%rdx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%Y/%m/%d\00"
define i8* @TimeToString(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.tm*
%5 = alloca i32
store i32 %0, i32* %2
%6 = call i64 @malloc(i32 20)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i32, i32* %2
store i32 %8, i32* %5
%9 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %9, %struct.tm** %4
%10 = load i8*, i8** %3
%11 = load %struct.tm*, %struct.tm** %4
%12 = call i32 @strftime(i8* %10, i32 20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%Y/%m/%d\00"
define i8* @TimeToString(i32 %0) {
%2 = alloca i32
%3 = tail call i64 @malloc(i32 20)
%4 = inttoptr i64 %3 to i8*
%5 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%6 = call %struct.tm* @localtime(i32* %2)
%7 = call i32 @strftime(i8* %4, i32 20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret i8* %4
}
/* Variables and functions */
int serverMain();
int trueMain(int argc, char *argv[]) { return serverMain(); }


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

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

LLVM IR (-O0):
define i32 @trueMain(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @serverMain()
ret i32 %5
}

LLVM IR (-O2):
define i32 @trueMain(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @serverMain()
ret i32 %3
}
/* Type definitions */
struct timeval {
  int tv_sec;
  unsigned int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned int GetTimer(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<GetTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTimer>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,(%rsp),%eax
add    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @GetTimer() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = add i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @GetTimer() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = add i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
scalar_t__ test1();
int main(void) {
  if (test1() < 0) {
    return EXIT_FAILURE;
  }
  printf("success\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
cmp    $0x0,%rax
jge    1151 <main+0x31>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <main+0x49>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
test   %rax,%rax
js     1142 <main+0x22>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e98(%rip),%rax
jmp    1149 <main+0x29>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [9 x i8] c"success\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test1()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %9
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
store i32 %8, i32* %1
br label %9
9: ; preds = %6, %4
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i64 (...) @test1()
%2 = icmp slt i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32* [ @EXIT_SUCCESS, %3 ], [ @EXIT_FAILURE, %0 ]
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int get_bit(int, int);
int set_bit_off(int, int);
int set_bit_on(int, int);
unsigned int flip_one_bit(int reg, int pos) {
  int mask, bit, output;
  bit = get_bit(reg, pos);
  if (bit == 0) {
    output = set_bit_on(reg, pos);
  } else {
    output = set_bit_off(reg, pos);
  }
  return output;
}


x86 assembly (clang, -O0):
<flip_one_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <get_bit@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1169 <flip_one_bit+0x39>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <set_bit_on@plt>
mov    %eax,-0x14(%rbp)
jmp    1177 <flip_one_bit+0x47>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <set_bit_off@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_one_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <get_bit@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
test   %eax,%eax
je     114f <flip_one_bit+0x1f>
pop    %rbx
pop    %rbp
jmp    1040 <set_bit_off@plt>
pop    %rbx
pop    %rbp
jmp    1030 <set_bit_on@plt>

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

LLVM IR (-O2):
define i32 @flip_one_bit(i32 %0, i32 %1) {
%3 = tail call i32 @get_bit(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @set_bit_on(i32 %0, i32 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @set_bit_off(i32 %0, i32 %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
struct statfs {
  int f_type;
};

/* Variables and functions */
scalar_t__ statfs(char *, struct statfs *);
int check_proc(void) {
  struct statfs mnt;
  if (statfs("/proc", &mnt) < 0)
    return 0;
  if (mnt.f_type != 0x9fa0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<check_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <statfs@plt>
cmp    $0x0,%rax
jge    113e <check_proc+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    115e <check_proc+0x4e>
cmpl   $0x9fa0,-0x8(%rbp)
je     1157 <check_proc+0x47>
movl   $0x0,-0x4(%rbp)
jmp    115e <check_proc+0x4e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_proc>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <statfs@plt>
test   %rax,%rax
setns  %al
cmpl   $0x9fa0,(%rsp)
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.statfs = type { i32 }
@.str = [6 x i8] c"/proc\00"
define i32 @check_proc() {
%1 = alloca i32
%2 = alloca %struct.statfs
%3 = call i64 @statfs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.statfs* %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 0, i32* %1
br label %12
6: ; preds = %0
%7 = getelementptr inbounds %struct.statfs, %struct.statfs* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 40864
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 0, i32* %1
br label %12
11: ; preds = %6
store i32 1, i32* %1
br label %12
12: ; preds = %11, %10, %5
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
@.str = [6 x i8] c"/proc\00"
define i32 @check_proc() {
%1 = alloca %struct.statfs
%2 = bitcast %struct.statfs* %1 to i8*
%3 = call i64 @statfs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.statfs* %1)
%4 = icmp sgt i64 %3, -1
%5 = getelementptr inbounds %struct.statfs, %struct.statfs* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 40864
%8 = select i1 %4, i1 %7, i1 false
%9 = zext i1 %8 to i32
ret i32 %9
}
void copia(void) {
  int i;
  extern char linea[], linea_max[];
  i = 0;
  do {
    linea_max[i] = linea[i];
    if (linea_max[i] == '\0')
      i = -1;
    i++;
  } while (i);
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    0x2eb4(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x4(%rbp),%rcx
mov    0x2ea6(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1146 <copia+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    110b <copia+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
xor    %edx,%edx
mov    0x2ee7(%rip),%rdi
mov    0x2ec8(%rip),%rcx
jmp    1126 <copia+0x26>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %esi,%edx
test   %esi,%esi
je     1140 <copia+0x40>
movslq %edx,%rsi
movzbl (%rdi,%rsi,1),%eax
mov    %al,(%rcx,%rsi,1)
mov    $0x0,%esi
test   %al,%al
je     1120 <copia+0x20>
add    $0x1,%edx
mov    %edx,%esi
jmp    1120 <copia+0x20>
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %20, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %8
store i8 %6, i8* %9
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 -1, i32* %1
br label %17
17: ; preds = %16, %2
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %20
20: ; preds = %17
%21 = load i32, i32* %1
%22 = icmp ne i32 %21, 0
br i1 %22, label %2, label %23
23: ; preds = %20
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %3
store i8 %5, i8* %6
%7 = icmp eq i8 %5, 0
%8 = add nsw i32 %2, 1
%9 = select i1 %7, i32 0, i32 %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %1
11: ; preds = %1
ret void
}
unsigned xrop3_175_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~T;
  stk1 = D | stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_175_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_175_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
shl    $0x8,%esi
or     %esi,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_175_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = xor i32 %22, -1
store i32 %23, i32* %9
%24 = load i32, i32* %5
%25 = load i32, i32* %9
%26 = or i32 %24, %25
store i32 %26, i32* %8
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = xor i32 %28, -1
%30 = and i32 %27, %29
%31 = load i32, i32* %5
%32 = load i32, i32* %6
%33 = and i32 %31, %32
%34 = or i32 %30, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @xrop3_175_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
void cfuzz() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_add_shortcut_folder_uri() {
ret void
}
/* Type definitions */
struct file_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ get_char(struct file_state *, char const *);
scalar_t__ hexdigitp(int /*<<< orphan*/);
char *next_char(struct file_state *, char const *, int);
const char *after_hexdigits(struct file_state *file, const char *ptr) {
  while (hexdigitp(get_char(file, ptr))) {
    ptr = next_char(file, ptr, 1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<after_hexdigits>:
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   1050 <get_char@plt>
mov    %eax,%edi
call   1040 <hexdigitp@plt>
cmp    $0x0,%rax
je     1179 <after_hexdigits+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <next_char@plt>
mov    %rax,-0x10(%rbp)
jmp    1140 <after_hexdigits+0x10>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<after_hexdigits>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
call   1050 <get_char@plt>
mov    %eax,%edi
call   1040 <hexdigitp@plt>
test   %rax,%rax
je     116c <after_hexdigits+0x3c>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <next_char@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
jmp    1140 <after_hexdigits+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.file_state = type { i32 }
define i8* @after_hexdigits(%struct.file_state* %0, i8* %1) {
%3 = alloca %struct.file_state*
%4 = alloca i8*
store %struct.file_state* %0, %struct.file_state** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %11, %2
%6 = load %struct.file_state*, %struct.file_state** %3
%7 = load i8*, i8** %4
%8 = call i32 @get_char(%struct.file_state* %6, i8* %7)
%9 = call i64 @hexdigitp(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = load %struct.file_state*, %struct.file_state** %3
%13 = load i8*, i8** %4
%14 = call i8* @next_char(%struct.file_state* %12, i8* %13, i32 1)
store i8* %14, i8** %4
br label %5
15: ; preds = %5
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
%struct.file_state = type { i32 }
define i8* @after_hexdigits(%struct.file_state* %0, i8* %1) {
%3 = tail call i32 @get_char(%struct.file_state* %0, i8* %1)
%4 = tail call i64 @hexdigitp(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %8, %6 ], [ %1, %2 ]
%8 = tail call i8* @next_char(%struct.file_state* %0, i8* %7, i32 1)
%9 = tail call i32 @get_char(%struct.file_state* %0, i8* %8)
%10 = tail call i64 @hexdigitp(i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = phi i8* [ %1, %2 ], [ %8, %6 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int _dbg_putchar(int x) {
  printf("%02x:", x);
  return x;
}


x86 assembly (clang, -O0):
<_dbg_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dbg_putchar>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%02x:\00"
define i32 @_dbg_putchar(i32 returned %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %0
}
const char *getbtn(int b, const char *p, int n) {
  while (n) {
    if (*p == b)
      return p;
    p++;
    n--;
  }
  return (char *)0;
}


x86 assembly (clang, -O0):
<getbtn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     114f <getbtn+0x4f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <getbtn+0x35>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <getbtn+0x57>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    110e <getbtn+0xe>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbtn>:
test   %edx,%edx
je     1120 <getbtn+0x20>
mov    %rsi,%rax
nopw   0x0(%rax,%rax,1)
movsbl (%rax),%ecx
cmp    %edi,%ecx
je     1122 <getbtn+0x22>
add    $0x1,%rax
add    $0xffffffff,%edx
jne    1110 <getbtn+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @getbtn(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %11
%6 = phi i32 [ %13, %11 ], [ %2, %3 ]
%7 = phi i8* [ %12, %11 ], [ %1, %3 ]
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, %0
br i1 %10, label %15, label %11
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = add nsw i32 %6, -1
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %11, %3
%16 = phi i8* [ null, %3 ], [ null, %11 ], [ %7, %5 ]
ret i8* %16
}
int ned_qst(st)
int *st;
{ return (ned_getint(st)); }


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

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

LLVM IR (-O0):
define i32 @ned_qst(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (i32*, ...) bitcast (i32 (...)* @ned_getint to i32 (i32*, ...)*)(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ned_qst(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @ned_getint to i32 (i32*, ...)*)(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_andnot_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_cmpgt_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i
_MM_MIN_EPI32(__m128i a, __m128i b) {
  __m128i cmp, resa, resb;
  cmp = _mm_cmpgt_epi32(b, a);
  resa = _mm_and_si128(cmp, a);
  resb = _mm_andnot_si128(cmp, b);
  return _mm_or_si128(resa, resb);
}


x86 assembly (clang, -O0):
<_MM_MIN_EPI32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_mm_cmpgt_epi32@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <_mm_and_si128@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <_mm_andnot_si128@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <_mm_or_si128@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_MIN_EPI32>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %esi,%edi
mov    %ebp,%esi
call   1030 <_mm_cmpgt_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    %ebp,%esi
call   1060 <_mm_and_si128@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14d,%esi
call   1050 <_mm_andnot_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <_mm_or_si128@plt>

LLVM IR (-O0):
define i32 @_MM_MIN_EPI32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = call i32 @_mm_cmpgt_epi32(i32 %8, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = call i32 @_mm_and_si128(i32 %11, i32 %12)
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @_mm_andnot_si128(i32 %14, i32 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @_mm_or_si128(i32 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @_MM_MIN_EPI32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpgt_epi32(i32 %1, i32 %0)
%4 = tail call i32 @_mm_and_si128(i32 %3, i32 %0)
%5 = tail call i32 @_mm_andnot_si128(i32 %3, i32 %1)
%6 = tail call i32 @_mm_or_si128(i32 %4, i32 %5)
ret i32 %6
}
long extract_bat(unsigned long insn, int dialect __attribute__((unused)),
                 int *invalid) {
  if (((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
    *invalid = 1;
  return 0;
}


x86 assembly (clang, -O0):
<extract_bat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x15,%rax
and    $0x1f,%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
and    $0x1f,%rcx
cmp    %rcx,%rax
je     113a <extract_bat+0x3a>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_bat>:
mov    %edi,%eax
shr    $0x10,%eax
shr    $0x15,%edi
xor    %eax,%edi
test   $0x1f,%dil
je     1116 <extract_bat+0x16>
movl   $0x1,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @extract_bat(i64 %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i64, i64* %4
%8 = lshr i64 %7, 21
%9 = and i64 %8, 31
%10 = load i64, i64* %4
%11 = lshr i64 %10, 16
%12 = and i64 %11, 31
%13 = icmp ne i64 %9, %12
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32*, i32** %6
store i32 1, i32* %15
br label %16
16: ; preds = %14, %3
ret i64 0
}

LLVM IR (-O2):
define i64 @extract_bat(i64 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = lshr i64 %0, 21
%5 = lshr i64 %0, 16
%6 = xor i64 %4, %5
%7 = and i64 %6, 31
%8 = icmp eq i64 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %3
store i32 1, i32* %2
br label %10
10: ; preds = %9, %3
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ strcasestr2(char const *, char const *);
int custom_stristr(const void *a, const void *b) {
  return !strcasestr2((const char *)a, (const char *)b);
}


x86 assembly (clang, -O0):
<custom_stristr>:
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 <strcasestr2@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<custom_stristr>:
push   %rax
call   1030 <strcasestr2@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @custom_stristr(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 @strcasestr2(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @custom_stristr(i8* %0, i8* %1) {
%3 = tail call i32 @strcasestr2(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
double min(double a, double b) {
  if (a > b)
    return b;
  return a;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <min+0x2d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <min+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void clr3(int *x) { memset(x, 0, 3); }


x86 assembly (clang, -O0):
<clr3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr3>:
xor    %esi,%esi
mov    $0x3,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @clr3(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i32 0, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void talk(void) { say("It's an apple tree.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"It's an apple tree.\00"
define void @talk() {
%1 = call i32 @say(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"It's an apple tree.\00"
define void @talk() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
void fun(int np, int *p) {
  np = 2;
  *p = 2;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
movl   $0x2,(%rsi)
ret

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

LLVM IR (-O2):
define void @fun(i32 %0, i32* nocapture writeonly %1) {
store i32 2, i32* %1
ret void
}
unsigned short __atomic_fetch_xor_2(volatile void *atom, unsigned short value,
                                    int memorder) {
  unsigned short xchg;
  unsigned short cmp;
  __atomic_load((unsigned short *)atom, (unsigned short *)&cmp, 0);
  do {
    xchg = ((cmp ^ value));
  } while (
      !__atomic_compare_exchange((unsigned short *)atom, &cmp, &xchg, 1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_fetch_xor_2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
movzwl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%ax
mov    -0x12(%rbp),%dx
lock cmpxchg %dx,(%rcx)
mov    %ax,%cx
sete   %al
mov    %al,-0x19(%rbp)
mov    %cx,-0x18(%rbp)
test   $0x1,%al
jne    1159 <__atomic_fetch_xor_2+0x59>
mov    -0x18(%rbp),%ax
mov    %ax,-0x14(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111d <__atomic_fetch_xor_2+0x1d>
movzwl -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_fetch_xor_2>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
mov    %ecx,%edx
xor    %esi,%edx
lock cmpxchg %dx,(%rdi)
jne    1110 <__atomic_fetch_xor_2+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @__atomic_fetch_xor_2(i8* %0, i16 zeroext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i16*
%12 = load atomic i16, i16* %11 monotonic
store i16 %12, i16* %8
br label %13
13: ; preds = %29, %3
%14 = load i16, i16* %8
%15 = zext i16 %14 to i32
%16 = load i16, i16* %5
%17 = zext i16 %16 to i32
%18 = xor i32 %15, %17
%19 = trunc i32 %18 to i16
store i16 %19, i16* %7
br label %20
20: ; preds = %13
%21 = load i8*, i8** %4
%22 = bitcast i8* %21 to i16*
%23 = load i16, i16* %8
%24 = load i16, i16* %7
%25 = cmpxchg weak i16* %22, i16 %23, i16 %24 seq_cst seq_cst
%26 = extractvalue { i16, i1 } %25, 0
%27 = extractvalue { i16, i1 } %25, 1
br i1 %27, label %29, label %28
28: ; preds = %20
store i16 %26, i16* %8
br label %29
29: ; preds = %28, %20
%30 = zext i1 %27 to i8
store i8 %30, i8* %9
%31 = load i8, i8* %9
%32 = trunc i8 %31 to i1
%33 = xor i1 %32, true
br i1 %33, label %13, label %34
34: ; preds = %29
%35 = load i16, i16* %8
ret i16 %35
}

LLVM IR (-O2):
define zeroext i16 @__atomic_fetch_xor_2(i8* nocapture %0, i16 zeroext %1, i32 %2) {
%4 = bitcast i8* %0 to i16*
%5 = load atomic i16, i16* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i16 [ %5, %3 ], [ %11, %6 ]
%8 = xor i16 %7, %1
%9 = cmpxchg weak i16* %4, i16 %7, i16 %8 seq_cst seq_cst
%10 = extractvalue { i16, i1 } %9, 1
%11 = extractvalue { i16, i1 } %9, 0
br i1 %10, label %12, label %6
12: ; preds = %6
ret i16 %7
}
/* Variables and functions */
float box_muller(float, float);
float ranfn(float mean, float stdev) { return box_muller(mean, stdev); }


x86 assembly (clang, -O0):
<ranfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <box_muller@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ranfn>:
jmp    1030 <box_muller@plt>

LLVM IR (-O0):
define float @ranfn(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @box_muller(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @ranfn(float %0, float %1) {
%3 = tail call float @box_muller(float %0, float %1)
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int feof(int /*<<< orphan*/ *);
int fisEof(void *ud) { return feof((FILE *)ud); }


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

x86 assembly (clang, -O2):
<fisEof>:
jmp    1030 <feof@plt>

LLVM IR (-O0):
define i32 @fisEof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @feof(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fisEof(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @feof(i32* %2)
ret i32 %3
}
long SPUconfigure(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @SPUconfigure() {
ret i64 0
}

LLVM IR (-O2):
define i64 @SPUconfigure() {
ret i64 0
}
int should_continue(char contineChar) {
  if (contineChar == 'y' || contineChar == 'Y') {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<should_continue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     1124 <should_continue+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
jne    1130 <should_continue+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <should_continue+0x37>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_continue>:
and    $0xdf,%dil
xor    %eax,%eax
cmp    $0x59,%dil
setne  %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @should_continue(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 121
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 89
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 0, i32* %2
br label %13
12: ; preds = %7
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @should_continue(i8 signext %0) {
%2 = and i8 %0, -33
%3 = icmp ne i8 %2, 89
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __aeabi_unwind_cpp_pr1(void) { abort(); }


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

x86 assembly (clang, -O2):
<__aeabi_unwind_cpp_pr1>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__aeabi_unwind_cpp_pr1() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @__aeabi_unwind_cpp_pr1() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ *fdopendir(int);
void resourceLeak_fdopendir(int fd) { DIR *leak1 = fdopendir(fd); }


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

x86 assembly (clang, -O2):
<resourceLeak_fdopendir>:
jmp    1030 <fdopendir@plt>

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

LLVM IR (-O2):
define void @resourceLeak_fdopendir(i32 %0) {
%2 = tail call i32* @fdopendir(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int main(int argc, char **argv) {
  argv[0] = "cat";
  execvp(argv[0], argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xed6(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <execvp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"cat\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %4
%11 = call i32 @execvp(i8* %9, i8** %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"cat\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @execvp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1)
ret i32 0
}
/* Variables and functions */
int printTheHello();
int main() {
  int retVal = 0;
  retVal = printTheHello();
  return retVal;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @printTheHello()
store i32 %3, i32* %2
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printTheHello()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ strtol(char const *, char **, int);
int32_t str_to_int32(const char *nptr, char **endptr, int base) {
  return strtol(nptr, endptr, base);
}


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

x86 assembly (clang, -O2):
<str_to_int32>:
jmp    1030 <strtol@plt>

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

LLVM IR (-O2):
define i32 @str_to_int32(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i32 @strtol(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double morpheus_mean(int, double const *);
double morpheus_stddev_m(double, int, double const *);
double morpheus_stddev(int n, const double *x) {
  if (n < 2)
    return 0;
  double m = morpheus_mean(n, x);
  return morpheus_stddev_m(m, n, x);
}


x86 assembly (clang, -O0):
<morpheus_stddev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1146 <morpheus_stddev+0x26>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116d <morpheus_stddev+0x4d>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <morpheus_mean@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <morpheus_stddev_m@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morpheus_stddev>:
cmp    $0x2,%edi
jge    1129 <morpheus_stddev+0x9>
xorps  %xmm0,%xmm0
ret
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <morpheus_mean@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <morpheus_stddev_m@plt>

LLVM IR (-O0):
define double @morpheus_stddev(i32 %0, double* %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double*
%6 = alloca double
store i32 %0, i32* %4
store double* %1, double** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store double 0.000000e+00, double* %3
br label %18
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load double*, double** %5
%13 = call double @morpheus_mean(i32 %11, double* %12)
store double %13, double* %6
%14 = load double, double* %6
%15 = load i32, i32* %4
%16 = load double*, double** %5
%17 = call double @morpheus_stddev_m(double %14, i32 %15, double* %16)
store double %17, double* %3
br label %18
18: ; preds = %10, %9
%19 = load double, double* %3
ret double %19
}

LLVM IR (-O2):
define double @morpheus_stddev(i32 %0, double* %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call double @morpheus_mean(i32 %0, double* %1)
%6 = tail call double @morpheus_stddev_m(double %5, i32 %0, double* %1)
br label %7
7: ; preds = %2, %4
%8 = phi double [ %6, %4 ], [ 0.000000e+00, %2 ]
ret double %8
}
void rt_numa_set_numa_run_on_node(int n, int c) {}


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

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

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

LLVM IR (-O2):
define void @rt_numa_set_numa_run_on_node(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ testBool(int);
void testInt(int X) {
  printf("%d ", X);
  testBool(X != 0);
}


x86 assembly (clang, -O0):
<testInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <testBool@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testInt>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
pop    %rbx
jmp    1030 <testBool@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @testInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @testBool(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @testInt(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i32 %0, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @testBool(i32 %4)
ret void
}
void test_PTHREAD_PRIO_PROTECT(void) { int dummy = "PTHREAD_PRIO_PROTECT"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"PTHREAD_PRIO_PROTECT\00"
define void @test_PTHREAD_PRIO_PROTECT() {
%1 = alloca i32
store i32 ptrtoint ([21 x i8]* @.str to i32), i32* %1
ret void
}

LLVM IR (-O2):
define void @test_PTHREAD_PRIO_PROTECT() {
ret void
}
void a(int i) {}


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

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

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

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