xunge/DecIR huggingface dataset:
/* Variables and functions */
int delpasswd(char *);
int delshadow(char *);
int removeuser(char *user) {
  int i;
  if ((i = delpasswd(user)) != 0) {
    return i;
  }
  if ((i = delshadow(user)) != 0) {
    return i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<removeuser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <delpasswd@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114c <removeuser+0x2c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <removeuser+0x53>
mov    -0x10(%rbp),%rdi
call   1040 <delshadow@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     116c <removeuser+0x4c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <removeuser+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeuser>:
push   %rbx
mov    %rdi,%rbx
call   1030 <delpasswd@plt>
test   %eax,%eax
je     112f <removeuser+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <delshadow@plt>

LLVM IR (-O0):
define i32 @removeuser(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @delpasswd(i8* %5)
store i32 %6, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %17
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @delshadow(i8* %11)
store i32 %12, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i32, i32* %4
store i32 %15, i32* %2
br label %17
16: ; preds = %10
store i32 0, i32* %2
br label %17
17: ; preds = %16, %14, %8
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @removeuser(i8* %0) {
%2 = tail call i32 @delpasswd(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @delshadow(i8* %0)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ %2, %1 ], [ %5, %4 ]
ret i32 %7
}
int fun320() { return 320; }


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

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

LLVM IR (-O0):
define i32 @fun320() {
ret i32 320
}

LLVM IR (-O2):
define i32 @fun320() {
ret i32 320
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdir(char const *, int /*<<< orphan*/);
int fs_mkdir(const char *path, int mode) { return mkdir(path, (mode_t)mode); }


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

x86 assembly (clang, -O2):
<fs_mkdir>:
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define i32 @fs_mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @mkdir(i8* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ulong;

/* Variables and functions */
main() { ulong x; }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
#pragma omp parallel
  { printf("hello %d\n", omp_get_thread_num()); }
  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 <omp_get_thread_num@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"hello %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 (...) @omp_get_thread_num()
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"hello %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int time(int /*<<< orphan*/ *);
int utilGetTime() { return time(NULL); }


x86 assembly (clang, -O0):
<utilGetTime>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<utilGetTime>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @utilGetTime() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @utilGetTime() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ openfilesend();
void button_sendfile_onpress(void) { openfilesend(); }


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

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

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

LLVM IR (-O2):
define void @button_sendfile_onpress() {
%1 = tail call i32 (...) @openfilesend()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_least32_t;
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t endian_32lo8(uint_least32_t dword) { return (uint8_t)dword; }


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

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

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

LLVM IR (-O2):
define i32 @endian_32lo8(i32 returned %0) {
ret i32 %0
}
char get_blank_from_bit(const char bit) { return (bit == 0) ? ' ' : '\t'; }


x86 assembly (clang, -O0):
<get_blank_from_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x9,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_blank_from_bit>:
test   %dil,%dil
mov    $0x20,%ecx
mov    $0x9,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @get_blank_from_bit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 32, i32 9
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @get_blank_from_bit(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i8 32, i8 9
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const);
int /*<<< orphan*/ stderr;
void progress(int idx) {
  const char pic[] = {'-', '\\', '|', '/'};
  fprintf(stderr, "%c\r", pic[idx % 4]);
}


x86 assembly (clang, -O0):
<progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
lea    0xec2(%rip),%rsi
movsbl -0x8(%rbp,%rax,1),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
lea    0x3(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%edi
movslq %edi,%rcx
lea    0xed0(%rip),%rdx
movsbl (%rcx,%rdx,1),%edx
lea    0xec9(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@__const.progress.pic = [4 x i8] c"-\\|/"
@stderr = global i32 0
@.str = [4 x i8] c"%c\0D\00"
define void @progress(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load i32, i32* @stderr
%6 = load i32, i32* %2
%7 = srem i32 %6, 4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %10)
ret void
}

LLVM IR (-O2):
@__const.progress.pic = [4 x i8] c"-\\|/"
@stderr = global i32 0
@.str = [4 x i8] c"%c\0D\00"
define void @progress(i32 %0) {
%2 = load i32, i32* @stderr
%3 = srem i32 %0, 4
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [4 x i8], [4 x i8]* @__const.progress.pic, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret void
}
/* Type definitions */
typedef size_t uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ nfp_crc32_be(int /*<<< orphan*/, size_t *, int);
uint32_t nfp_crc32_posix_end(uint32_t crc, size_t total_len) {
  while (total_len != 0) {
    uint8_t c = total_len & 0xff;
    crc = nfp_crc32_be(crc, &c, 1);
    total_len >>= 8;
  }
  return ~crc;
}


x86 assembly (clang, -O0):
<nfp_crc32_posix_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <nfp_crc32_posix_end+0x4d>
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <nfp_crc32_be@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <nfp_crc32_posix_end+0xf>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nfp_crc32_posix_end>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%eax
test   %rsi,%rsi
je     1158 <nfp_crc32_posix_end+0x48>
mov    %rsi,%r15
lea    0x8(%rsp),%r14
mov    %rsi,%rbx
nopl   0x0(%rax,%rax,1)
movzbl %r15b,%ecx
mov    %rcx,0x8(%rsp)
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <nfp_crc32_be@plt>
shr    $0x8,%rbx
cmp    $0xff,%r15
mov    %rbx,%r15
ja     1130 <nfp_crc32_posix_end+0x20>
not    %eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @nfp_crc32_posix_end(i32 %0, i64 %1) {
%3 = alloca i64
%4 = icmp eq i64 %1, 0
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = bitcast i64* %3 to i8*
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %1, %5 ], [ %12, %7 ]
%9 = phi i32 [ %0, %5 ], [ %11, %7 ]
%10 = and i64 %8, 255
store i64 %10, i64* %3
%11 = call i32 @nfp_crc32_be(i32 %9, i64* %3, i32 1)
%12 = lshr i64 %8, 8
%13 = icmp ult i64 %8, 256
br i1 %13, label %14, label %7
14: ; preds = %7, %2
%15 = phi i32 [ %0, %2 ], [ %11, %7 ]
%16 = xor i32 %15, -1
ret i32 %16
}
void dis_assemble_3(x, r) unsigned int x;
unsigned int *r;
{ *r = (((x & 4) >> 2) | ((x & 3) << 1)) & 7; }


x86 assembly (clang, -O0):
<dis_assemble_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x4,%ecx
shr    $0x2,%ecx
mov    -0x4(%rbp),%eax
and    $0x3,%eax
shl    $0x1,%eax
or     %eax,%ecx
and    $0x7,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dis_assemble_3>:
mov    %edi,%eax
shr    $0x2,%eax
and    $0x1,%eax
and    $0x3,%edi
lea    (%rax,%rdi,2),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @dis_assemble_3(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 = and i32 %5, 4
%7 = lshr i32 %6, 2
%8 = load i32, i32* %3
%9 = and i32 %8, 3
%10 = shl i32 %9, 1
%11 = or i32 %7, %10
%12 = and i32 %11, 7
%13 = load i32*, i32** %4
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
define void @dis_assemble_3(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 2
%4 = and i32 %3, 1
%5 = shl i32 %0, 1
%6 = and i32 %5, 6
%7 = or i32 %4, %6
store i32 %7, i32* %1
ret void
}
/* Variables and functions */
int random();
void FP_arithmetic_weakness_ok() {
  int x = random();
  int y = random();
  if (x < y && x > y) {
    int *p = NULL;
    *p = 42;
  }
}


x86 assembly (clang, -O0):
<FP_arithmetic_weakness_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1156 <FP_arithmetic_weakness_ok+0x46>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1156 <FP_arithmetic_weakness_ok+0x46>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_arithmetic_weakness_ok>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <random@plt>

LLVM IR (-O0):
define void @FP_arithmetic_weakness_ok() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = call i32 (...) @random()
store i32 %4, i32* %1
%5 = call i32 (...) @random()
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
store i32* null, i32** %3
%14 = load i32*, i32** %3
store i32 42, i32* %14
br label %15
15: ; preds = %13, %9, %0
ret void
}

LLVM IR (-O2):
define void @FP_arithmetic_weakness_ok() {
%1 = tail call i32 (...) @random()
%2 = tail call i32 (...) @random()
ret void
}
int bfdcfg_is_hex(char c) {
  return (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F')) ||
          ((c >= 'a') && (c <= 'f')));
}


x86 assembly (clang, -O0):
<bfdcfg_is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <bfdcfg_is_hex+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <bfdcfg_is_hex+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <bfdcfg_is_hex+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x46,%ecx
mov    %al,-0x2(%rbp)
jle    116d <bfdcfg_is_hex+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <bfdcfg_is_hex+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x66,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfdcfg_is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @bfdcfg_is_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 70
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 97
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 102
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @bfdcfg_is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int /*<<< orphan*/);
int main(void) {
  print("Depart", 0);
  print("Arrive", 0);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"Depart\00"
@.str.1 = [7 x i8] c"Arrive\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = call i32 @print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Depart\00"
@.str.1 = [7 x i8] c"Arrive\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
void ff_hevc_put_hevc_uni_w_pel_pixels6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels6_8_sse4() {
ret void
}
double mu_BJ(double x) { return (x < 1 ? x : 1); }


x86 assembly (clang, -O0):
<mu_BJ>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    112b <mu_BJ+0x2b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113d <mu_BJ+0x3d>
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113d <mu_BJ+0x3d>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mu_BJ>:
minsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mu_BJ(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 1.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi double [ %6, %5 ], [ 1.000000e+00, %7 ]
ret double %9
}

LLVM IR (-O2):
define double @mu_BJ(double %0) {
%2 = fcmp olt double %0, 1.000000e+00
%3 = select i1 %2, double %0, double 1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x17() {
  Assert_real((isgraph(23) == 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_isgraph.c",
              120, ("isgraph should be 0 for 0x17"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x17>:
push   %rax
mov    $0x17,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x78,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x17\00"
define void @t_isgraph_0x17() {
%1 = call i64 @isgraph(i32 23)
%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 120, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x17\00"
define void @t_isgraph_0x17() {
%1 = tail call i64 @isgraph(i32 23)
%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 120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int owHasProgramPulse(int portnum) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @owHasProgramPulse(i32 %0) {
ret i32 1
}
void glTexCoord2f(float a, float b) {}


x86 assembly (clang, -O0):
<glTexCoord2f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @glTexCoord2f(float %0, float %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x17() {
  Assert_real((isodigit(23) == 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",
              120, ("isodigit should be 0 for 0x17"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x17>:
push   %rax
mov    $0x17,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x78,%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 0x17\00"
define void @t_isodigit_0x17() {
%1 = call i64 @isodigit(i32 23)
%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 120, 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 0x17\00"
define void @t_isodigit_0x17() {
%1 = tail call i64 @isodigit(i32 23)
%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 120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBLPMIntEnable(uint32_t ui32Base, uint32_t ui32Ints) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000363))) |= ui32Ints;
}


x86 assembly (clang, -O0):
<USBLPMIntEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x363,%eax
cltq
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBLPMIntEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
or     %ebx,0x363(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBLPMIntEnable(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 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 867
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = or i32 %14, %9
store volatile i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @USBLPMIntEnable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 867
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = or i32 %9, %1
store volatile i32 %10, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strnappend(char const *, char const *, int /*<<< orphan*/);
char *strappend(const char *s, const char *suffix) {
  return strnappend(s, suffix, suffix ? strlen(suffix) : 0);
}


x86 assembly (clang, -O0):
<strappend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <strappend+0x3c>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
jmp    1166 <strappend+0x46>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1166 <strappend+0x46>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
call   1030 <strnappend@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strappend>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     113b <strappend+0x1b>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
jmp    113d <strappend+0x1d>
xor    %edx,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strnappend@plt>

LLVM IR (-O0):
define i8* @strappend(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %9
%14 = phi i32 [ %11, %9 ], [ 0, %12 ]
%15 = call i8* @strnappend(i8* %5, i8* %6, i32 %14)
ret i8* %15
}

LLVM IR (-O2):
define i8* @strappend(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
%8 = tail call i8* @strnappend(i8* %0, i8* %1, i32 %7)
ret i8* %8
}
/* Type definitions */
struct _satoshi_tx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _satoshi_tx *);
void SATOSHI_TX_free(struct _satoshi_tx *p_tx) { free(p_tx); }


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

x86 assembly (clang, -O2):
<SATOSHI_TX_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._satoshi_tx = type { i32 }
define void @SATOSHI_TX_free(%struct._satoshi_tx* %0) {
%2 = alloca %struct._satoshi_tx*
store %struct._satoshi_tx* %0, %struct._satoshi_tx** %2
%3 = load %struct._satoshi_tx*, %struct._satoshi_tx** %2
%4 = call i32 @free(%struct._satoshi_tx* %3)
ret void
}

LLVM IR (-O2):
%struct._satoshi_tx = type { i32 }
define void @SATOSHI_TX_free(%struct._satoshi_tx* nocapture %0) {
%2 = tail call i32 @free(%struct._satoshi_tx* %0)
ret void
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
int /*<<< orphan*/ geteuid();
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  struct passwd *pwd;
  pwd = getpwuid(geteuid());
  printf("user = %s\n", pwd->pw_name);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <geteuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rsi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
@.str = [11 x i8] c"user = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.passwd*
store i32 0, i32* %1
%3 = call i32 (...) @geteuid()
%4 = call %struct.passwd* @getpwuid(i32 %3)
store %struct.passwd* %4, %struct.passwd** %2
%5 = load %struct.passwd*, %struct.passwd** %2
%6 = getelementptr inbounds %struct.passwd, %struct.passwd* %5, i32 0, i32 0
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
@.str = [11 x i8] c"user = %s\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @geteuid()
%2 = tail call %struct.passwd* @getpwuid(i32 %1)
%3 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
const char *mbed_trace_include_filters_get(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @mbed_trace_include_filters_get() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @mbed_trace_include_filters_get() {
ret i8* null
}
unsigned long pool_poolOffset(struct _WsbmBufStorage *buf) { return 0UL; }


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

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

LLVM IR (-O0):
%struct._WsbmBufStorage = type opaque
define i64 @pool_poolOffset(%struct._WsbmBufStorage* %0) {
%2 = alloca %struct._WsbmBufStorage*
store %struct._WsbmBufStorage* %0, %struct._WsbmBufStorage** %2
ret i64 0
}

LLVM IR (-O2):
%struct._WsbmBufStorage = type opaque
define i64 @pool_poolOffset(%struct._WsbmBufStorage* nocapture readnone %0) {
ret i64 0
}
extern int f2(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<f2>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @f2(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void __restore() {}


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

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

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

LLVM IR (-O2):
define void @__restore() {
ret void
}
/* Variables and functions */
int islower(int);
bool invalidFunctionArgBool_islower(bool b, int c) {
  (void)islower(b);
  return islower(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_islower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <islower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_islower>:
xor    %edi,%edi
test   %esi,%esi
setne  %dil
jmp    1030 <islower@plt>

LLVM IR (-O0):
define i32 @invalidFunctionArgBool_islower(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 = call i32 @islower(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @islower(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_islower(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @islower(i32 %4)
ret i32 %5
}
void f15(unsigned x, unsigned y) {
  int count = x * y;
  int z[count];
}


x86 assembly (clang, -O0):
<f15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f15(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = mul i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %6
%14 = alloca i32, i64 %12
store i64 %12, i64* %7
%15 = load i8*, i8** %6
ret void
}

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


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define void @ICPrint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
int islower(int c) {
  if ((c >= 'a') && (c <= 'z'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <islower+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <islower+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int Vec_StrBase10Log(unsigned Num) {
  int Res;
  if (Num == 0)
    return 0;
  if (Num == 1)
    return 1;
  for (Res = 0, Num--; Num; Num /= 10, Res++)
    ;
  return Res;
}


x86 assembly (clang, -O0):
<Vec_StrBase10Log>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <Vec_StrBase10Log+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1175 <Vec_StrBase10Log+0x75>
cmpl   $0x1,-0x8(%rbp)
jne    1133 <Vec_StrBase10Log+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1175 <Vec_StrBase10Log+0x75>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116f <Vec_StrBase10Log+0x6f>
jmp    1152 <Vec_StrBase10Log+0x52>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <Vec_StrBase10Log+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_StrBase10Log>:
mov    %edi,%eax
test   %edi,%edi
je     1134 <Vec_StrBase10Log+0x34>
cmp    $0x1,%eax
jne    1111 <Vec_StrBase10Log+0x11>
mov    $0x1,%eax
ret
mov    %eax,%ecx
add    $0xffffffff,%ecx
xor    %eax,%eax
mov    $0xcccccccd,%edx
nopl   (%rax)
mov    %ecx,%esi
imul   %rdx,%rsi
shr    $0x23,%rsi
add    $0x1,%eax
cmp    $0x9,%ecx
mov    %esi,%ecx
ja     1120 <Vec_StrBase10Log+0x20>
ret

LLVM IR (-O0):
define i32 @Vec_StrBase10Log(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %26
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 1, i32* %2
br label %26
12: ; preds = %8
store i32 0, i32* %4
%13 = load i32, i32* %3
%14 = add i32 %13, -1
store i32 %14, i32* %3
br label %15
15: ; preds = %19, %12
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %15
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = udiv i32 %20, 10
store i32 %21, i32* %3
%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* %4
store i32 %25, i32* %2
br label %26
26: ; preds = %24, %11, %7
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @Vec_StrBase10Log(i32 %0) {
switch i32 %0, label %3 [
i32 0, label %11
i32 1, label %2
]
2: ; preds = %1
br label %11
3: ; preds = %1
%4 = add i32 %0, -1
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ 0, %3 ]
%7 = phi i32 [ %8, %5 ], [ %4, %3 ]
%8 = udiv i32 %7, 10
%9 = add nuw nsw i32 %6, 1
%10 = icmp ult i32 %7, 10
br i1 %10, label %11, label %5
11: ; preds = %5, %1, %2
%12 = phi i32 [ 1, %2 ], [ %0, %1 ], [ %9, %5 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int stoptimer(pid_t pid) {
  int err;
  if ((err = kill(pid, SIGTERM)) != 0) {
    printf("Error: Couldn't send the SIGTERM signal to the timer.\n");
    printf("Please kill the timer process manually\n");
  }
  return (0);
}


x86 assembly (clang, -O0):
<stoptimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1160 <stoptimer+0x40>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoptimer>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
test   %eax,%eax
je     114b <stoptimer+0x2b>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGTERM = global i32 0
@.str = [55 x i8] c"Error: Couldn't send the SIGTERM signal to the timer.\0A\00"
@.str.1 = [40 x i8] c"Please kill the timer process manually\0A\00"
define i32 @stoptimer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @SIGTERM
%6 = call i32 @kill(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %8, %1
ret i32 0
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@str = [54 x i8] c"Error: Couldn't send the SIGTERM signal to the timer.\00"
@str.2 = [39 x i8] c"Please kill the timer process manually\00"
define i32 @stoptimer(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @kill(i32 %0, i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.2, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret i32 0
}
/* Variables and functions */
scalar_t__ fprintf(int /*<<< orphan*/, char *, char const *,
                   unsigned long long);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ write_error();
void write_numeric_metadata(const char *key, unsigned long long value) {
  if (fprintf(stdout, "%s:\t%llu\n", key, value) < 0) {
    write_error();
  }
}


x86 assembly (clang, -O0):
<write_numeric_metadata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    115e <write_numeric_metadata+0x3e>
mov    $0x0,%al
call   1040 <write_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_numeric_metadata>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     1143 <write_numeric_metadata+0x23>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <write_error@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [10 x i8] c"%s:\09%llu\0A\00"
define void @write_numeric_metadata(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @write_error()
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [10 x i8] c"%s:\09%llu\0A\00"
define void @write_numeric_metadata(i8* %0, i64 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i64 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @write_error()
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
struct allLedControlStruct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sendOutLedData(struct allLedControlStruct *, int const, int,
                                  int, int /*<<< orphan*/);
void sendOutLedDataDefaults(struct allLedControlStruct *ledStructure,
                            const int spi_device) {
  sendOutLedData(ledStructure, spi_device, 50000, 8, 0);
}


x86 assembly (clang, -O0):
<sendOutLedDataDefaults>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0xc350,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
call   1030 <sendOutLedData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendOutLedDataDefaults>:
mov    $0xc350,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
jmp    1030 <sendOutLedData@plt>

LLVM IR (-O0):
%struct.allLedControlStruct = type { i32 }
define void @sendOutLedDataDefaults(%struct.allLedControlStruct* %0, i32 %1) {
%3 = alloca %struct.allLedControlStruct*
%4 = alloca i32
store %struct.allLedControlStruct* %0, %struct.allLedControlStruct** %3
store i32 %1, i32* %4
%5 = load %struct.allLedControlStruct*, %struct.allLedControlStruct** %3
%6 = load i32, i32* %4
%7 = call i32 @sendOutLedData(%struct.allLedControlStruct* %5, i32 %6, i32 50000, i32 8, i32 0)
ret void
}

LLVM IR (-O2):
%struct.allLedControlStruct = type { i32 }
define void @sendOutLedDataDefaults(%struct.allLedControlStruct* %0, i32 %1) {
%3 = tail call i32 @sendOutLedData(%struct.allLedControlStruct* %0, i32 %1, i32 50000, i32 8, i32 0)
ret void
}
void HalfFloatRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @HalfFloatRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stdout;
void ki_egesz(unsigned szam) { fprintf(stdout, "%u\n", szam); }


x86 assembly (clang, -O0):
<ki_egesz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ki_egesz>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%u\0A\00"
define void @ki_egesz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%u\0A\00"
define void @ki_egesz(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}