xunge/DecIR huggingface dataset:
int getSum(int a, int b) {
  while (a & b) {
    a = a ^ b;
    b = ((a ^ b) & b) << 1;
  }
  return a ^ b;
}


x86 assembly (clang, -O0):
<getSum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     1136 <getSum+0x36>
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
and    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <getSum+0xa>
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSum>:
mov    %edi,%eax
mov    %esi,%ecx
and    %edi,%ecx
je     111c <getSum+0x1c>
nopl   0x0(%rax,%rax,1)
xor    %esi,%eax
mov    %ecx,%esi
add    %ecx,%esi
mov    %esi,%ecx
and    %eax,%ecx
jne    1110 <getSum+0x10>
xor    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @getSum(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ %3, %2 ]
%7 = phi i32 [ %10, %5 ], [ %1, %2 ]
%8 = phi i32 [ %9, %5 ], [ %0, %2 ]
%9 = xor i32 %7, %8
%10 = shl i32 %6, 1
%11 = and i32 %10, %9
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i32 [ %0, %2 ], [ %9, %5 ]
%15 = phi i32 [ %1, %2 ], [ %10, %5 ]
%16 = xor i32 %15, %14
ret i32 %16
}
void curl_slist_free_all() {}


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

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

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

LLVM IR (-O2):
define void @curl_slist_free_all() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PathDesiredHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void PathDesiredLogging() { UAVObjLogging(PathDesiredHandle()); }


x86 assembly (clang, -O0):
<PathDesiredLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <PathDesiredHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PathDesiredLogging>:
push   %rax
xor    %eax,%eax
call   1040 <PathDesiredHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @PathDesiredLogging() {
%1 = call i32 (...) @PathDesiredHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathDesiredLogging() {
%1 = tail call i32 (...) @PathDesiredHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_tiff_histogram();
void Reset_Tiff_Histogram() { reset_tiff_histogram(); }


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

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

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

LLVM IR (-O2):
define void @Reset_Tiff_Histogram() {
%1 = tail call i32 (...) @reset_tiff_histogram()
ret void
}
/* Type definitions */
struct elem {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clean_list(struct elem *, size_t);
struct elem *init_list(size_t);
int /*<<< orphan*/ traverse_list(struct elem *, int);
int main(void) {
  struct elem *head = NULL;
  size_t len = 10;
  head = init_list(len);
  traverse_list(head, 2);
  clean_list(head, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0xa,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <init_list@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1040 <traverse_list@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <clean_list@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1050 <init_list@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2,%esi
call   1040 <traverse_list@plt>
mov    $0xa,%esi
mov    %rbx,%rdi
call   1030 <clean_list@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.elem = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.elem*
%3 = alloca i64
store i32 0, i32* %1
store %struct.elem* null, %struct.elem** %2
store i64 10, i64* %3
%4 = load i64, i64* %3
%5 = call %struct.elem* @init_list(i64 %4)
store %struct.elem* %5, %struct.elem** %2
%6 = load %struct.elem*, %struct.elem** %2
%7 = call i32 @traverse_list(%struct.elem* %6, i32 2)
%8 = load %struct.elem*, %struct.elem** %2
%9 = load i64, i64* %3
%10 = call i32 @clean_list(%struct.elem* %8, i64 %9)
ret i32 0
}

LLVM IR (-O2):
%struct.elem = type { i32 }
define i32 @main() {
%1 = tail call %struct.elem* @init_list(i64 10)
%2 = tail call i32 @traverse_list(%struct.elem* %1, i32 2)
%3 = tail call i32 @clean_list(%struct.elem* %1, i64 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void addParam(char *param, char *value) {
  if (strlen(param) < 4)
    strcat(param, value);
  else {
    strcat(param, ",");
    strcat(param, value);
  }
}


x86 assembly (clang, -O0):
<addParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
jge    1154 <addParam+0x34>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
jmp    1171 <addParam+0x51>
mov    -0x8(%rbp),%rdi
lea    0xea1(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addParam>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x4,%eax
jl     1143 <addParam+0x23>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @addParam(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 = call i32 @strlen(i8* %5)
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @strcat(i8* %9, i8* %10)
br label %18
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = call i32 @strcat(i8* %15, i8* %16)
br label %18
18: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define void @addParam(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, 4
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = tail call i32 @strcat(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_vala_comment_entities();
int /*<<< orphan*/ test_vala_comments();
void all_vala_tests() {
  test_vala_comments();
  test_vala_comment_entities();
}


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

x86 assembly (clang, -O2):
<all_vala_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_vala_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_vala_comment_entities@plt>

LLVM IR (-O0):
define void @all_vala_tests() {
%1 = call i32 (...) @test_vala_comments()
%2 = call i32 (...) @test_vala_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_vala_tests() {
%1 = tail call i32 (...) @test_vala_comments()
%2 = tail call i32 (...) @test_vala_comment_entities()
ret void
}
void mlt_strlower(char *buffer) {
  while (*buffer != '\0') {
    if ((*buffer >= 'A') && (*buffer <= 'Z'))
      *buffer += 32;
    buffer++;
  }
}


x86 assembly (clang, -O0):
<mlt_strlower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <mlt_strlower+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1144 <mlt_strlower+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1144 <mlt_strlower+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <mlt_strlower+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlt_strlower>:
mov    (%rdi),%al
test   %al,%al
je     112a <mlt_strlower+0x2a>
add    $0x1,%rdi
jmp    111b <mlt_strlower+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <mlt_strlower+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <mlt_strlower+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <mlt_strlower+0x10>
ret

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

LLVM IR (-O2):
define void @mlt_strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_STORE_CTX;

/* Variables and functions */
int verify_cb(int ok, X509_STORE_CTX *ctx) { return ok; }


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

x86 assembly (clang, -O2):
<verify_cb>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @verify_cb(i32 returned %0, i32* nocapture readnone %1) {
ret i32 %0
}
int sSumas_itr(int v, int n) {
  int a = n;
  if (n == 0 || v == 0)
    return 0;
  else {
    while (v > 1) {
      n = n + a;
      v--;
    }
    return n;
  }
}


x86 assembly (clang, -O0):
<sSumas_itr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1124 <sSumas_itr+0x24>
cmpl   $0x0,-0x8(%rbp)
jne    1130 <sSumas_itr+0x30>
movl   $0x0,-0x4(%rbp)
jmp    115c <sSumas_itr+0x5c>
jmp    1135 <sSumas_itr+0x35>
cmpl   $0x1,-0x8(%rbp)
jle    1156 <sSumas_itr+0x56>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <sSumas_itr+0x35>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sSumas_itr>:
test   %edi,%edi
mov    $0x1,%eax
cmovg  %edi,%eax
imul   %esi,%eax
test   %esi,%esi
cmove  %esi,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @sSumas_itr(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, 0
%5 = or i1 %4, %3
%6 = icmp sgt i32 %0, 1
%7 = select i1 %6, i32 %0, i32 1
%8 = mul i32 %7, %1
%9 = select i1 %5, i32 0, i32 %8
ret i32 %9
}
void foo673() {}


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

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

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

LLVM IR (-O2):
define void @foo673() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "Hello, world!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [15 x i8] c"Hello, world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [15 x i8] c"Hello, world!\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void putc(int ch) {}


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

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

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

LLVM IR (-O2):
define void @putc(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(char *);
int cpu_get_bogomips(void) {
  err("cpu_get_bogomips: not implemented");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"cpu_get_bogomips: not implemented\00"
define i32 @cpu_get_bogomips() {
%1 = call i32 @err(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [34 x i8] c"cpu_get_bogomips: not implemented\00"
define i32 @cpu_get_bogomips() {
%1 = tail call i32 @err(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
float float_saturate(float f) { return f < 0 ? 0 : (f > 1 ? 1 : f); }


x86 assembly (clang, -O0):
<float_saturate>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1123 <float_saturate+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    115f <float_saturate+0x5f>
movss  -0x4(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <float_saturate+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1155 <float_saturate+0x55>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_saturate>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @float_saturate(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load float, float* %2
%8 = fcmp ogt float %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load float, float* %2
br label %12
12: ; preds = %10, %9
%13 = phi float [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi float [ 0.000000e+00, %5 ], [ %13, %12 ]
ret float %15
}

LLVM IR (-O2):
define float @float_saturate(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 1.000000e+00
%4 = select i1 %3, float 1.000000e+00, float %0
%5 = select i1 %2, float 0.000000e+00, float %4
ret float %5
}
int isodigit(int c) { return (c >= '0' && c <= '7'); }


x86 assembly (clang, -O0):
<isodigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isodigit+0x20>
cmpl   $0x37,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isodigit>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isodigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 55
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 @isodigit(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
__attribute__((no, noclone)) unsigned __int128 t162_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((unsigned __int128)(-1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t162_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
not    %rcx
not    %rdx
xor    %eax,%eax
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    1155 <t162_3sub+0x45>
jmp    115c <t162_3sub+0x4c>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t162_3sub>:
mov    %rsi,%rdx
mov    %rdi,%rax
not    %rax
not    %rdx
ret

LLVM IR (-O0):
define { i64, i64 } @t162_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 -1, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t162_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = xor i128 %6, -1
%8 = trunc i128 %7 to i64
%9 = lshr i128 %7, 64
%10 = trunc i128 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
/* Variables and functions */
unsigned int version_8to32(int, int, int, int /*<<< orphan*/);
unsigned int jool_version(void) { return version_8to32(3, 3, 4, 0); }


x86 assembly (clang, -O0):
<jool_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
mov    %esi,%edi
call   1030 <version_8to32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jool_version>:
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %ecx,%ecx
jmp    1030 <version_8to32@plt>

LLVM IR (-O0):
define i32 @jool_version() {
%1 = call i32 @version_8to32(i32 3, i32 3, i32 4, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @jool_version() {
%1 = tail call i32 @version_8to32(i32 3, i32 3, i32 4, i32 0)
ret i32 %1
}
double fac(int m, int n) {
  if (m <= 1)
    return 1;
  else
    return m * fac(m, n - 1);
}


x86 assembly (clang, -O0):
<fac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     113a <fac+0x2a>
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1163 <fac+0x53>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
call   1030 <fac@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fac>:
push   %rax
cmp    $0x1,%edi
jg     1120 <fac+0x10>
movsd  0xee2(%rip),%xmm0
pop    %rax
ret
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
add    $0xffffffff,%esi
call   1030 <fac@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fac(i32 %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
store double 1.000000e+00, double* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = call double @fac(i32 %12, i32 %14)
%16 = fmul double %11, %15
store double %16, double* %3
br label %17
17: ; preds = %9, %8
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @fac(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi double [ %10, %6 ], [ 1.000000e+00, %2 ]
ret double %5
6: ; preds = %2
%7 = sitofp i32 %0 to double
%8 = add nsw i32 %1, -1
%9 = tail call double @fac(i32 %0, i32 %8)
%10 = fmul double %9, %7
br label %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rotr(uint32_t x, uint32_t n) {
  uint32_t top = x & ((1 << n) - 1);
  return (x >> n) | (top << (32 - n));
}


x86 assembly (clang, -O0):
<rotr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0xc(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = sub nsw i32 %8, 1
%10 = and i32 %6, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = ashr i32 %11, %12
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 32, %15
%17 = shl i32 %14, %16
%18 = or i32 %13, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @rotr(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
size_t randgen(int);
char rand_digit(void) { return "0123456789"[randgen(10)]; }


x86 assembly (clang, -O0):
<rand_digit>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <randgen@plt>
mov    %rax,%rcx
lea    0xed8(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_digit>:
push   %rax
mov    $0xa,%edi
call   1030 <randgen@plt>
lea    0xede(%rip),%rcx
mov    (%rax,%rcx,1),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define signext i8 @rand_digit() {
%1 = call i64 @randgen(i32 10)
%2 = getelementptr inbounds [11 x i8], [11 x i8]* @.str, i64 0, i64 %1
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define signext i8 @rand_digit() {
%1 = tail call i64 @randgen(i32 10)
%2 = getelementptr inbounds [11 x i8], [11 x i8]* @.str, i64 0, i64 %1
%3 = load i8, i8* %2
ret i8 %3
}
void SetTag2JointLengths(double *tagLengths) {}


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

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

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

LLVM IR (-O2):
define void @SetTag2JointLengths(double* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RB_AUTOBOOT;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ sync();
int reboot_system() {
  fprintf(stderr, "Rebooting...\n");
  sync();
  reboot(RB_AUTOBOOT);
  return 0;
}


x86 assembly (clang, -O0):
<reboot_system>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <sync@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <reboot@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reboot_system>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <sync@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <reboot@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Rebooting...\0A\00"
@RB_AUTOBOOT = global i32 0
define i32 @reboot_system() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @sync()
%4 = load i32, i32* @RB_AUTOBOOT
%5 = call i32 @reboot(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Rebooting...\0A\00"
@RB_AUTOBOOT = global i32 0
define i32 @reboot_system() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @sync()
%4 = load i32, i32* @RB_AUTOBOOT
%5 = tail call i32 @reboot(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char s[] = "abcdefg";
  reverse(s);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0xc(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x67666564636261,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [8 x i8] c"abcdefg\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
store i32 0, i32* %1
%3 = bitcast [8 x i8]* %2 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @reverse(i8* %4)
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 29104508263162465, i64* %1
%3 = call i32 @reverse(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int fun716() { return 716; }


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

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

LLVM IR (-O0):
define i32 @fun716() {
ret i32 716
}

LLVM IR (-O2):
define i32 @fun716() {
ret i32 716
}
/* Variables and functions */
int deref04(int *);
int /*<<< orphan*/ idc(int *);
int test04(int *p) {
  if (p)
    ;
  idc(p);
  return deref04(p);
}


x86 assembly (clang, -O0):
<test04>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <test04+0x1c>
jmp    113c <test04+0x1c>
mov    -0x8(%rbp),%rdi
call   1040 <idc@plt>
mov    -0x8(%rbp),%rdi
call   1030 <deref04@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test04>:
push   %rbx
mov    %rdi,%rbx
call   1040 <idc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <deref04@plt>

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

LLVM IR (-O2):
define i32 @test04(i32* %0) {
%2 = tail call i32 @idc(i32* %0)
%3 = tail call i32 @deref04(i32* %0)
ret i32 %3
}
char *deconstify_char_ptr(const char *p) { return (char *)p; }


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

x86 assembly (clang, -O2):
<deconstify_char_ptr>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @deconstify_char_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @deconstify_char_ptr(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xa2() {
  Assert_real((isupper(162) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              815, ("isupper should be 0 for 0xa2"));
}


x86 assembly (clang, -O0):
<t_isupper_0xa2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa2,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x32f,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xa2>:
push   %rax
mov    $0xa2,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xa2\00"
define void @t_isupper_0xa2() {
%1 = call i64 @isupper(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xa2\00"
define void @t_isupper_0xa2() {
%1 = tail call i64 @isupper(i32 162)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 815, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "dec2hex: illegal input.\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"dec2hex: illegal input.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"dec2hex: illegal input.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int dirfd(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundcets_dirfd(DIR *dirp) {
  return dirfd(dirp);
}


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

x86 assembly (clang, -O2):
<softboundcets_dirfd>:
jmp    1030 <dirfd@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_dirfd(i32* %0) {
%2 = tail call i32 @dirfd(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void some_func_v1() { puts("some_func_v1"); }


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

x86 assembly (clang, -O2):
<some_func_v1>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"some_func_v1\00"
define void @some_func_v1() {
%1 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

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


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"RESULT: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test()
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"RESULT: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @test()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int i2eq(void *key1, void *key2) {
  return (((int *)key1)[0] == ((int *)key2)[0]) &&
         (((int *)key1)[1] == ((int *)key2)[1]);
}


x86 assembly (clang, -O0):
<i2eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rdx),%ecx
mov    %al,-0x11(%rbp)
jne    1137 <i2eq+0x37>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2eq>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
jne    1113 <i2eq+0x13>
mov    0x4(%rdi),%ecx
xor    %eax,%eax
cmp    0x4(%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @i2eq(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 = bitcast i8* %5 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = icmp eq i32 %8, %12
br i1 %13, label %14, label %24
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = bitcast i8* %15 to i32*
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = load i8*, i8** %4
%20 = bitcast i8* %19 to i32*
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = icmp eq i32 %18, %22
br label %24
24: ; preds = %14, %2
%25 = phi i1 [ false, %2 ], [ %23, %14 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @i2eq(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = getelementptr inbounds i8, i8* %1, i64 4
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = icmp eq i32 %11, %14
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %8, %2
%18 = phi i32 [ 0, %2 ], [ %16, %8 ]
ret i32 %18
}
void isr_panic() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<isr_panic>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <isr_panic+0x9>
jmp    1109 <isr_panic+0x9>

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

LLVM IR (-O0):
define void @isr_panic() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @isr_panic() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ obj2func();
void d(void) { obj2func(); }


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

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

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

LLVM IR (-O2):
define void @d() {
%1 = tail call i32 (...) @obj2func()
ret void
}
int peek(addr)
int addr;
{
  char *p;
  int i;
  p = (char *)addr;
  i = *p;
  return (i);
}


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek>:
movslq %edi,%rax
movsbl (%rax),%eax
ret

LLVM IR (-O0):
define i32 @peek(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @peek(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dtzpadcpy_(char *, char *, int *, int *, int *, double *,
                              int *, double *, int *);
void wcc_dtzpadcpy_(char *UPLO, char *DIAG, int *M, int *N, int *IOFFD, char *A,
                    int *LDA, char *B, int *LDB) {
  dtzpadcpy_(UPLO, DIAG, M, N, IOFFD, (double *)A, LDA, (double *)B, LDB);
}


x86 assembly (clang, -O0):
<wcc_dtzpadcpy_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <dtzpadcpy_@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dtzpadcpy_>:
jmp    1030 <dtzpadcpy_@plt>

LLVM IR (-O0):
define void @wcc_dtzpadcpy_(i8* %0, i8* %1, i32* %2, i32* %3, i32* %4, i8* %5, i32* %6, i8* %7, i32* %8) {
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca i32*
%17 = alloca i8*
%18 = alloca i32*
store i8* %0, i8** %10
store i8* %1, i8** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i8* %5, i8** %15
store i32* %6, i32** %16
store i8* %7, i8** %17
store i32* %8, i32** %18
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = load i32*, i32** %12
%22 = load i32*, i32** %13
%23 = load i32*, i32** %14
%24 = load i8*, i8** %15
%25 = bitcast i8* %24 to double*
%26 = load i32*, i32** %16
%27 = load i8*, i8** %17
%28 = bitcast i8* %27 to double*
%29 = load i32*, i32** %18
%30 = call i32 @dtzpadcpy_(i8* %19, i8* %20, i32* %21, i32* %22, i32* %23, double* %25, i32* %26, double* %28, i32* %29)
ret void
}

LLVM IR (-O2):
define void @wcc_dtzpadcpy_(i8* %0, i8* %1, i32* %2, i32* %3, i32* %4, i8* %5, i32* %6, i8* %7, i32* %8) {
%10 = bitcast i8* %5 to double*
%11 = bitcast i8* %7 to double*
%12 = tail call i32 @dtzpadcpy_(i8* %0, i8* %1, i32* %2, i32* %3, i32* %4, double* %10, i32* %6, double* %11, i32* %8)
ret void
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
wchar_t test22(void) { return L'c'; }


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

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

LLVM IR (-O0):
define i32 @test22() {
ret i32 99
}

LLVM IR (-O2):
define i32 @test22() {
ret i32 99
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("The id is %d\n", getpid());
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"The id is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @getpid()
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"The id is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
unsigned xrop3_211_0_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;
  unsigned stk3;
  stk3 = D | S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_211_0_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    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_211_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
lea    (%rdi,%rax,1),%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
or     $0xff,%eax
and    %edx,%eax
xor    %ecx,%eax
not    %eax
ret

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

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