xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void ts_packet_set_cont(uint8_t *ts_packet, uint8_t value) {
  ts_packet[3] = (ts_packet[3] & ~0x0F) | (value & ~0xF0);
}


x86 assembly (clang, -O0):
<ts_packet_set_cont>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xfffffff0,%ecx
mov    -0xc(%rbp),%eax
and    $0xffffff0f,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_packet_set_cont>:
mov    0xc(%rdi),%eax
and    $0xfffffff0,%eax
and    $0xffffff0f,%esi
or     %eax,%esi
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @ts_packet_set_cont(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
%6 = getelementptr inbounds i32, i32* %5, i64 3
%7 = load i32, i32* %6
%8 = and i32 %7, -16
%9 = load i32, i32* %4
%10 = and i32 %9, -241
%11 = or i32 %8, %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 3
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @ts_packet_set_cont(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = load i32, i32* %3
%5 = and i32 %4, -16
%6 = and i32 %1, -241
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hal_io_irq_send_eoi();
void hal_io_IPI_send_eoi() {
  hal_io_irq_send_eoi();
  return;
}


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

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

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

LLVM IR (-O2):
define void @hal_io_IPI_send_eoi() {
%1 = tail call i32 (...) @hal_io_irq_send_eoi()
ret void
}
int strcmp(const char *str1, const char *str2) {
  for (; *str1 && (*str1 == *str2); str1++, str2++)
    ;
  return *(const unsigned char *)str1 - *(const unsigned char *)str2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1169 <strcmp+0x69>
jmp    114c <strcmp+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
test   %al,%al
je     1123 <strcmp+0x23>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    (%rsi),%al
jne    1125 <strcmp+0x25>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
movzbl %al,%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %21, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %13, %16
br label %18
18: ; preds = %10, %5
%19 = phi i1 [ false, %5 ], [ %17, %10 ]
br i1 %19, label %20, label %26
20: ; preds = %18
br label %21
21: ; preds = %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %3
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %4
br label %5
26: ; preds = %18
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = sub nsw i32 %29, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = icmp eq i8 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %1, %2 ], [ %13, %11 ], [ %7, %5 ]
%18 = phi i8 [ 0, %2 ], [ 0, %11 ], [ %6, %5 ]
%19 = zext i8 %18 to i32
%20 = load i8, i8* %17
%21 = zext i8 %20 to i32
%22 = sub nsw i32 %19, %21
ret i32 %22
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t hashint(uint32_t a) {
  a -= (a << 6);
  a ^= (a >> 17);
  a -= (a << 9);
  a ^= (a << 4);
  a -= (a << 3);
  a ^= (a << 10);
  a ^= (a >> 15);
  return a;
}


x86 assembly (clang, -O0):
<hashint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x6,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x11,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x9,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashint>:
mov    %edi,%eax
shl    $0x6,%eax
sub    %eax,%edi
mov    %edi,%ecx
sar    $0x11,%ecx
xor    %edi,%ecx
mov    %ecx,%eax
shl    $0x9,%eax
imul   $0xffffe010,%ecx,%edx
sub    %eax,%ecx
xor    %edx,%ecx
lea    0x0(,%rcx,8),%eax
imul   $0xffffe400,%ecx,%edx
sub    %eax,%ecx
xor    %edx,%ecx
mov    %ecx,%eax
sar    $0xf,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hashint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 6
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 17
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = shl i32 %11, 9
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = shl i32 %15, 4
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = shl i32 %19, 3
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = shl i32 %23, 10
%25 = load i32, i32* %2
%26 = xor i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = ashr i32 %27, 15
%29 = load i32, i32* %2
%30 = xor i32 %29, %28
store i32 %30, i32* %2
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @hashint(i32 %0) {
%2 = mul i32 %0, -63
%3 = ashr i32 %2, 17
%4 = xor i32 %3, %2
%5 = mul i32 %4, -511
%6 = mul i32 %4, -8176
%7 = xor i32 %5, %6
%8 = mul i32 %7, -7
%9 = mul i32 %7, -7168
%10 = xor i32 %8, %9
%11 = ashr i32 %10, 15
%12 = xor i32 %11, %10
ret i32 %12
}
void f(void) {
#pragma hlt fusion
  {
    for (;;) {
    }
    for (;;) {
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @f() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
scalar_t__ signal(int, void *);
void *arm_signal(int sig, void *action) { return (void *)signal(sig, action); }


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

x86 assembly (clang, -O2):
<arm_signal>:
jmp    1030 <signal@plt>

LLVM IR (-O0):
define i8* @arm_signal(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i64 @signal(i32 %5, i8* %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @arm_signal(i32 %0, i8* %1) {
%3 = tail call i64 @signal(i32 %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
scalar_t__ calc_tree(struct tree *);
double op_lower(struct tree *left, struct tree *right) {
  return calc_tree(left) < calc_tree(right);
}


x86 assembly (clang, -O0):
<op_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <calc_tree@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <calc_tree@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_lower>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <calc_tree@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <calc_tree@plt>
cmp    %rax,%rbx
jl     1131 <op_lower+0x21>
xorps  %xmm0,%xmm0
jmp    1139 <op_lower+0x29>
movsd  0xec7(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tree = type { i32 }
define double @op_lower(%struct.tree* %0, %struct.tree* %1) {
%3 = alloca %struct.tree*
%4 = alloca %struct.tree*
store %struct.tree* %0, %struct.tree** %3
store %struct.tree* %1, %struct.tree** %4
%5 = load %struct.tree*, %struct.tree** %3
%6 = call i64 @calc_tree(%struct.tree* %5)
%7 = load %struct.tree*, %struct.tree** %4
%8 = call i64 @calc_tree(%struct.tree* %7)
%9 = icmp slt i64 %6, %8
%10 = zext i1 %9 to i32
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
%struct.tree = type { i32 }
define double @op_lower(%struct.tree* %0, %struct.tree* %1) {
%3 = tail call i64 @calc_tree(%struct.tree* %0)
%4 = tail call i64 @calc_tree(%struct.tree* %1)
%5 = icmp slt i64 %3, %4
%6 = uitofp i1 %5 to double
ret double %6
}
/* Type definitions */
struct clad_test {
  int dummy;
};

/* Variables and functions */
struct clad_test *clad_test_assert(struct clad_test *, int, char *, long, long,
                                   char const *);
struct clad_test *clad_test_longneq(struct clad_test *test, long i1, long i2,
                                    const char *explain) {
  return clad_test_assert(test, i1 != i2,
                          "Integers should not be equal: %ld %ld; %s ", i1, i2,
                          explain);
}


x86 assembly (clang, -O0):
<clad_test_longneq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xeb1(%rip),%rdx
call   1030 <clad_test_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clad_test_longneq>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
xor    %esi,%esi
cmp    %rdx,%rcx
setne  %sil
lea    0xed7(%rip),%rdx
jmp    1030 <clad_test_assert@plt>

LLVM IR (-O0):
%struct.clad_test = type { i32 }
@.str = [43 x i8] c"Integers should not be equal: %ld %ld; %s \00"
define %struct.clad_test* @clad_test_longneq(%struct.clad_test* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca %struct.clad_test*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
store %struct.clad_test* %0, %struct.clad_test** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load %struct.clad_test*, %struct.clad_test** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = icmp ne i64 %10, %11
%13 = zext i1 %12 to i32
%14 = load i64, i64* %6
%15 = load i64, i64* %7
%16 = load i8*, i8** %8
%17 = call %struct.clad_test* @clad_test_assert(%struct.clad_test* %9, i32 %13, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %14, i64 %15, i8* %16)
ret %struct.clad_test* %17
}

LLVM IR (-O2):
%struct.clad_test = type { i32 }
@.str = [43 x i8] c"Integers should not be equal: %ld %ld; %s \00"
define %struct.clad_test* @clad_test_longneq(%struct.clad_test* %0, i64 %1, i64 %2, i8* %3) {
%5 = icmp ne i64 %1, %2
%6 = zext i1 %5 to i32
%7 = tail call %struct.clad_test* @clad_test_assert(%struct.clad_test* %0, i32 %6, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %1, i64 %2, i8* %3)
ret %struct.clad_test* %7
}
/* Variables and functions */
int /*<<< orphan*/ mill_msleep(scalar_t__, char *);
scalar_t__ now();
__attribute__((no)) void dummy(void) {
  mill_msleep(
      (now() + 50),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/ebfe/libmill/refs/heads/master/tests/go.c"
      ":"
      "43");
}


x86 assembly (clang, -O0):
<dummy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <now@plt>
mov    %rax,%rdi
add    $0x32,%rdi
lea    0xec7(%rip),%rsi
call   1030 <mill_msleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dummy>:
push   %rax
xor    %eax,%eax
call   1040 <now@plt>
lea    0x32(%rax),%rdi
lea    0xecd(%rip),%rsi
pop    %rax
jmp    1030 <mill_msleep@plt>

LLVM IR (-O0):
@.str = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ebfe/libmill/refs/heads/master/tests/go.c:43\00"
define void @dummy() {
%1 = call i64 (...) @now()
%2 = add nsw i64 %1, 50
%3 = call i32 @mill_msleep(i64 %2, i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [135 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ebfe/libmill/refs/heads/master/tests/go.c:43\00"
define void @dummy() {
%1 = tail call i64 (...) @now()
%2 = add nsw i64 %1, 50
%3 = tail call i32 @mill_msleep(i64 %2, i8* getelementptr inbounds ([135 x i8], [135 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) int bar(int *s) { return *s; }


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

x86 assembly (clang, -O2):
<bar>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int main(int argc, char **argv) {
  struct timespec now;
  return (1);
  return (0);
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int allArgsNullable(int *, int *);
int f(int *arr, int *arr2) { return allArgsNullable(arr, arr2); }


x86 assembly (clang, -O0):
<f>:
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 <allArgsNullable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
jmp    1030 <allArgsNullable@plt>

LLVM IR (-O0):
define i32 @f(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
%6 = load i32*, i32** %4
%7 = call i32 @allArgsNullable(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32* %0, i32* %1) {
%3 = tail call i32 @allArgsNullable(i32* %0, i32* %1)
ret i32 %3
}
int test_imm_4Duint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x4D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Duint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x4d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Duint64_lowword_mem>:
testb  $0x4d,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Duint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 77
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void numlock_set_off() {}


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

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

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

LLVM IR (-O2):
define void @numlock_set_off() {
ret void
}
int alarg(int *a, int *b) {
  int tmp;
  if (*b > *a) {
    tmp = *a;
    *a = *b;
    *b = tmp;
  }
  return *a;
}


x86 assembly (clang, -O0):
<alarg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jle    113c <alarg+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alarg>:
mov    (%rsi),%ecx
mov    (%rdi),%eax
cmp    %eax,%ecx
jle    110e <alarg+0xe>
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @alarg(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** %4
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = icmp sgt i32 %7, %9
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
store i32 %13, i32* %5
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
store i32 %15, i32* %16
%17 = load i32, i32* %5
%18 = load i32*, i32** %4
store i32 %17, i32* %18
br label %19
19: ; preds = %11, %2
%20 = load i32*, i32** %3
%21 = load i32, i32* %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @alarg(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = icmp sgt i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
store i32 %3, i32* %0
store i32 %4, i32* %1
%7 = load i32, i32* %0
br label %8
8: ; preds = %6, %2
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
ret i32 %9
}
void test2() {
  printf("\t*** %s ***\n", __func__);
  small_string_test("123,456,abcac,\'multiword field 4\'\n"
                    "none,none,0\n"
                    ",,\n"
                    ",,");
  printf("\t*** %s: done ***\n", __func__);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <small_string_test@plt>
lea    0xef9(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xede(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <small_string_test@plt>
lea    0xef9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\09*** %s ***\0A\00"
@__func__.test2 = [6 x i8] c"test2\00"
@.str.1 = [52 x i8] c"123,456,abcac,'multiword field 4'\0Anone,none,0\0A,,\0A,,\00"
@.str.2 = [19 x i8] c"\09*** %s: done ***\0A\00"
define void @test2() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test2, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @small_string_test to i32 (i8*, ...)*)(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09*** %s ***\0A\00"
@__func__.test2 = [6 x i8] c"test2\00"
@.str.1 = [52 x i8] c"123,456,abcac,'multiword field 4'\0Anone,none,0\0A,,\0A,,\00"
@.str.2 = [19 x i8] c"\09*** %s: done ***\0A\00"
define void @test2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @small_string_test to i32 (i8*, ...)*)(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test2, i64 0, i64 0))
ret void
}
void gtk_window_remove_embedded_xid() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_remove_embedded_xid() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/ *);
char getByteFromFile(FILE *file) {
  char c;
  if (EOF == (c = fgetc(file))) {
    return EOF;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<getByteFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ec5(%rip),%rax
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,%cl
mov    -0x18(%rbp),%eax
mov    %cl,-0x11(%rbp)
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1156 <getByteFromFile+0x46>
mov    0x2e9c(%rip),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
jmp    115c <getByteFromFile+0x4c>
mov    -0x11(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getByteFromFile>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
mov    (%r14),%bl
call   1030 <fgetc@plt>
cmp    %al,%bl
movzbl (%r14),%ecx
movzbl %al,%eax
cmove  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i8 0
define signext i8 @getByteFromFile(i32* nocapture %0) {
%2 = load i8, i8* @EOF
%3 = tail call signext i8 @fgetc(i32* %0)
%4 = icmp eq i8 %2, %3
%5 = load i8, i8* @EOF
%6 = select i1 %4, i8 %5, i8 %3
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ Mult(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num1 = 0;
  printf("\nEnter a number to see if it is even or odd --> ");
  scanf("%d", &num1);
  Mult(num1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <Mult@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <Mult@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"\0AEnter a number to see if it is even or odd --> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @Mult(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"\0AEnter a number to see if it is even or odd --> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @Mult(i32 %5)
ret i32 0
}
int process_smac_dmac(const char *line) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @process_smac_dmac(i8* nocapture readnone %0) {
ret i32 -1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xresizerequest_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xresizerequest.serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xresizerequest_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xresizerequest_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int fromHex(char);
void call_fromHex_sym_Good(char c) {
  char arr[16];
  int idx = fromHex(c);
  if (idx >= 0) {
    arr[idx] = 'H';
  }
}


x86 assembly (clang, -O0):
<call_fromHex_sym_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <fromHex@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     113d <call_fromHex_sym_Good+0x2d>
movslq -0x24(%rbp),%rax
movb   $0x48,-0x20(%rbp,%rax,1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_fromHex_sym_Good>:
jmp    1030 <fromHex@plt>

LLVM IR (-O0):
define void @call_fromHex_sym_Good(i8 signext %0) {
%2 = alloca i8
%3 = alloca [16 x i8]
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = call i32 @fromHex(i8 signext %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %11
store i8 72, i8* %12
br label %13
13: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @call_fromHex_sym_Good(i8 signext %0) {
%2 = tail call i32 @fromHex(i8 signext %0)
ret void
}
int testDeprecatedUsedMessage() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testDeprecatedUsedMessage() {
ret i32 0
}
__attribute__((no, noclone)) unsigned __int128 t100_1add(signed char x,
                                                         signed char y) {
  unsigned __int128 r;
  if (__builtin_add_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
movsbq -0x11(%rbp),%rdx
mov    %rdx,%r9
sar    $0x3f,%r9
movsbq -0x12(%rbp),%rcx
mov    %rcx,%rax
sar    $0x3f,%rax
add    %rcx,%rdx
mov    %r9,%rcx
adc    %rax,%rcx
mov    %r9,%r8
adc    %rax,%r8
adc    %rax,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    1183 <t100_1add+0x73>
jmp    118a <t100_1add+0x7a>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r14
push   %rbx
push   %rax
movslq %edi,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
movslq %esi,%rbx
mov    %rbx,%rdx
sar    $0x3f,%rdx
add    %rax,%rbx
mov    %rdx,%r14
adc    %rcx,%r14
adc    %rcx,%rdx
and    $0x1,%edx
neg    %rdx
jns    1143 <t100_1add+0x33>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t100_1add(i8 signext %0, i8 signext %1) {
%3 = alloca i128
%4 = alloca i8
%5 = alloca i8
%6 = alloca i128
store i8 %0, i8* %4
store i8 %1, i8* %5
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = sext i8 %7 to i129
%10 = sext i8 %8 to i129
%11 = call { i129, i1 } @llvm.sadd.with.overflow.i129(i129 %9, i129 %10)
%12 = extractvalue { i129, i1 } %11, 1
%13 = extractvalue { i129, i1 } %11, 0
%14 = trunc i129 %13 to i128
%15 = zext i128 %14 to i129
%16 = icmp ne i129 %13, %15
%17 = or i1 %12, %16
store i128 %14, i128* %6
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (...) @bar()
br label %20
20: ; preds = %18, %2
%21 = load i128, i128* %6
store i128 %21, i128* %3
%22 = bitcast i128* %3 to { i64, i64 }*
%23 = load { i64, i64 }, { i64, i64 }* %22
ret { i64, i64 } %23
}

LLVM IR (-O2):
define { i64, i64 } @t100_1add(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i129
%4 = sext i8 %1 to i129
%5 = add nsw i129 %4, %3
%6 = icmp slt i129 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @bar()
br label %9
9: ; preds = %7, %2
%10 = trunc i129 %5 to i64
%11 = lshr i129 %5, 64
%12 = trunc i129 %11 to i64
%13 = insertvalue { i64, i64 } poison, i64 %10, 0
%14 = insertvalue { i64, i64 } %13, i64 %12, 1
ret { i64, i64 } %14
}
void g_DUMMY_set_commandlocking(int win_id, int lock) {
  win_id = win_id;
  lock = lock;
}


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

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

LLVM IR (-O0):
define void @g_DUMMY_set_commandlocking(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
store i32 %5, i32* %3
%6 = load i32, i32* %4
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @g_DUMMY_set_commandlocking(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int any_int();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  int tmp = -1;
  unsigned int G;
  tmp = any_int();
  G = tmp;
  tmp = tmp - 3;
  if (tmp != 0) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1040 <any_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     117f <main+0x4f>
lea    0xe97(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <any_int@plt>
cmp    $0x3,%eax
jne    1160 <main+0x20>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe99(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 -1, i32* %1
%3 = call i32 (...) @any_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = sub nsw i32 %5, 3
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
@str = [8 x i8] c"Success\00"
define void @main() {
%1 = tail call i32 (...) @any_int()
%2 = icmp eq i32 %1, 3
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
}
int main() {
  int start, end;
  start = 0;
  end = 1000000000;
  while (start < end)
    start += 1;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x3b9aca00,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1133 <main+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
void psync_sql_err_callback(void *ptr, int code, const char *msg) {
  do {
    if (40 <= 50)
      psync_debug("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/pcloudcom/pclsync/refs/"
                  "heads/master/plibs.c",
                  __FUNCTION__, 319, 40, "database warning %d: %s", code, msg);
  } while (0);
}


x86 assembly (clang, -O0):
<psync_sql_err_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%r9d
mov    -0x18(%rbp),%rax
lea    0xece(%rip),%rdi
lea    0xf4d(%rip),%rsi
mov    $0x13f,%edx
mov    $0x28,%ecx
lea    0xf53(%rip),%r8
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <psync_debug@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psync_sql_err_callback>:
push   %rax
mov    %esi,%r9d
mov    %rdx,(%rsp)
lea    0xee1(%rip),%rdi
lea    0xf60(%rip),%rsi
lea    0xf70(%rip),%r8
mov    $0x13f,%edx
mov    $0x28,%ecx
xor    %eax,%eax
call   1030 <psync_debug@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pcloudcom/pclsync/refs/heads/master/plibs.c\00"
@__FUNCTION__.psync_sql_err_callback = [23 x i8] c"psync_sql_err_callback\00"
@.str.1 = [24 x i8] c"database warning %d: %s\00"
define void @psync_sql_err_callback(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
br label %7
7: ; preds = %3
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 (i8*, i8*, i32, i32, i8*, i32, i8*, ...) bitcast (i32 (...)* @psync_debug to i32 (i8*, i8*, i32, i32, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.psync_sql_err_callback, i64 0, i64 0), i32 319, i32 40, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %8, i8* %9)
br label %11
11: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pcloudcom/pclsync/refs/heads/master/plibs.c\00"
@__FUNCTION__.psync_sql_err_callback = [23 x i8] c"psync_sql_err_callback\00"
@.str.1 = [24 x i8] c"database warning %d: %s\00"
define void @psync_sql_err_callback(i8* nocapture readnone %0, i32 %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, i32, i32, i8*, i32, i8*, ...) bitcast (i32 (...)* @psync_debug to i32 (i8*, i8*, i32, i32, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.psync_sql_err_callback, i64 0, i64 0), i32 319, i32 40, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %1, i8* %2)
ret void
}
/* Variables and functions */
long double log2l(long double);
long double logl(long double x) {
  long double ln2;
  return ln2 * log2l(x);
}


x86 assembly (clang, -O0):
<logl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log2l@plt>
fldt   -0x2c(%rbp)
fmulp  %st,%st(1)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fldz
fucomip %st(1),%st
jae    112b <logl+0x1b>
fstp   %st(0)
flds   0xeda(%rip)
add    $0x18,%rsp
ret
fstpt  (%rsp)
call   1030 <log2l@plt>
fstp   %st(0)
fldz
jmp    111e <logl+0xe>

LLVM IR (-O0):
define x86_fp80 @logl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %3
%5 = load x86_fp80, x86_fp80* %2
%6 = call x86_fp80 @log2l(x86_fp80 %5)
%7 = fmul x86_fp80 %4, %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @logl(x86_fp80 %0) {
%2 = fcmp ugt x86_fp80 %0, 0xK00000000000000000000
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call x86_fp80 @log2l(x86_fp80 %0)
br label %5
5: ; preds = %1, %3
ret x86_fp80 0xK7FFFC000000000000000
}
/* Variables and functions */
void *malloc(size_t);
void *mag_malloc(size_t size) {
  void *ptr = NULL;
  if (size > 0)
    ptr = malloc(size);
  return ptr;
}


x86 assembly (clang, -O0):
<mag_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    113c <mag_malloc+0x2c>
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mag_malloc>:
test   %rdi,%rdi
je     111a <mag_malloc+0xa>
jmp    1030 <malloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @mag_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = icmp ugt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @mag_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
br label %5
5: ; preds = %3, %1
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xc8() {
  Assert_real((isodigit(200) == 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_isodigit.c",
              1005, ("isodigit should be 0 for 0xc8"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xc8>:
push   %rax
mov    $0xc8,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3ed,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc8\00"
define void @t_isodigit_0xc8() {
%1 = call i64 @isodigit(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc8\00"
define void @t_isodigit_0xc8() {
%1 = tail call i64 @isodigit(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int NextArcList(Schema, A)
struct frvStruct *Schema;
struct Arc **A;
{
  (*A) = AccessArcArcListNext(*A);
  if ((*A) == 0)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<NextArcList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <AccessArcArcListNext@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1152 <NextArcList+0x42>
movl   $0x0,-0x4(%rbp)
jmp    1159 <NextArcList+0x49>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NextArcList>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
xor    %eax,%eax
call   1030 <AccessArcArcListNext@plt>
movslq %eax,%rcx
mov    %rcx,(%rbx)
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.frvStruct = type opaque
%struct.Arc = type opaque
define i32 @NextArcList(%struct.frvStruct* %0, %struct.Arc** %1) {
%3 = alloca i32
%4 = alloca %struct.frvStruct*
%5 = alloca %struct.Arc**
store %struct.frvStruct* %0, %struct.frvStruct** %4
store %struct.Arc** %1, %struct.Arc*** %5
%6 = load %struct.Arc**, %struct.Arc*** %5
%7 = load %struct.Arc*, %struct.Arc** %6
%8 = call i32 (%struct.Arc*, ...) bitcast (i32 (...)* @AccessArcArcListNext to i32 (%struct.Arc*, ...)*)(%struct.Arc* %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to %struct.Arc*
%11 = load %struct.Arc**, %struct.Arc*** %5
store %struct.Arc* %10, %struct.Arc** %11
%12 = load %struct.Arc**, %struct.Arc*** %5
%13 = load %struct.Arc*, %struct.Arc** %12
%14 = icmp eq %struct.Arc* %13, null
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %17
16: ; preds = %2
store i32 1, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.frvStruct = type opaque
%struct.Arc = type opaque
define i32 @NextArcList(%struct.frvStruct* nocapture readnone %0, %struct.Arc** nocapture %1) {
%3 = load %struct.Arc*, %struct.Arc** %1
%4 = tail call i32 (%struct.Arc*, ...) bitcast (i32 (...)* @AccessArcArcListNext to i32 (%struct.Arc*, ...)*)(%struct.Arc* %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.Arc*
store %struct.Arc* %6, %struct.Arc** %1
%7 = icmp ne i32 %4, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
int main(int argc, char *argv[]) {
  asm("call *0xFFFFFFF");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
call   *0xfffffff
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
call   *0xfffffff
xor    %eax,%eax
ret

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "call *0xFFFFFFF", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}