xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcpy(const char *y, char *x) {
  int i = 0;
  while ((*x++ = *y++) != '\0')
    i = i + 1;
  *x = '\0';
  return (i + 1);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     114f <strcpy+0x4f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy+0x13>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    (%rdi),%al
mov    %al,(%rsi)
test   %al,%al
je     1126 <strcpy+0x26>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,(%rsi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy+0x10>
add    %rax,%rsi
movb   $0x0,(%rsi)
ret
add    $0x1,%rsi
mov    $0x1,%eax
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @strcpy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %3, i8* %1
%5 = icmp eq i8 %3, 0
br i1 %5, label %15, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %13, %6 ], [ %4, %2 ]
%8 = phi i32 [ %11, %6 ], [ 1, %2 ]
%9 = phi i8* [ %10, %6 ], [ %0, %2 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = add i32 %8, 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %12, i8* %7
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %2
%16 = phi i32 [ 1, %2 ], [ %11, %6 ]
%17 = phi i8* [ %4, %2 ], [ %13, %6 ]
store i8 0, i8* %17
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: cres <file1> <file2> ...\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"usage: cres <file1> <file2> ...\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"usage: cres <file1> <file2> ...\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
void mystrcpy(s1, s2) register char *s1;
char *s2;
{
  while (*s1++ = codeeval(&s2))
    ;
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <codeeval@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1149 <mystrcpy+0x39>
jmp    1120 <mystrcpy+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsi,(%rsp)
mov    %rsp,%r14
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <codeeval@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <mystrcpy+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mystrcpy(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 = %11, %2
%6 = call i32 (i8**, ...) bitcast (i32 (...)* @codeeval to i32 (i8**, ...)*)(i8** %4)
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
store i8 %7, i8* %8
%10 = icmp ne i8 %7, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @mystrcpy(i8* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
br label %4
4: ; preds = %4, %2
%5 = phi i8* [ %0, %2 ], [ %8, %4 ]
%6 = call i32 (i8**, ...) bitcast (i32 (...)* @codeeval to i32 (i8**, ...)*)(i8** %3)
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %4
10: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Reserved71_DriverIRQHandler();
__attribute__((weak)) void Reserved71_IRQHandler(void) {
  Reserved71_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved71_IRQHandler() {
%1 = call i32 (...) @Reserved71_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved71_IRQHandler() {
%1 = tail call i32 (...) @Reserved71_DriverIRQHandler()
ret void
}
void RGB24ToYRow_C() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToYRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void printRetVal(char *s, int value) {
  fprintf(stderr, "%s \t$$ %d\n", s, value);
}


x86 assembly (clang, -O0):
<printRetVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRetVal>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"%s \09$$ %d\0A\00"
define void @printRetVal(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s \09$$ %d\0A\00"
define void @printRetVal(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
char *strskips(char *p) {
  while (*p == ' ' || *p == '\t')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<strskips>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <strskips+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <strskips+0x3d>
jmp    114e <strskips+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <strskips+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strskips>:
mov    %rdi,%rax
jmp    1114 <strskips+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <strskips+0x10>
cmp    $0x9,%cl
je     1110 <strskips+0x10>
ret

LLVM IR (-O0):
define i8* @strskips(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @strskips(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncasecmp(char *, char *, int);
void strncasecmp_2() {
  char *x = "abc";
  char *y = "Bcd";
  clang_analyzer_eval(strncasecmp(x, y, 3) == -1);
}


x86 assembly (clang, -O0):
<strncasecmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strncasecmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncasecmp(i8* %3, i8* %4, i32 3)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strncasecmp_2() {
%1 = tail call i32 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_69() {
  Assert_real((isqrt(69) == 8),
              "/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/stdlib/isqrt.c",
              350, ("Integer square root of 69 should be 8"));
}


x86 assembly (clang, -O0):
<t_sqrt_69>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
call   1030 <isqrt@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x15e,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_69>:
push   %rax
mov    $0x45,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x15e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 69 should be 8\00"
define void @t_sqrt_69() {
%1 = call i32 @isqrt(i32 69)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 69 should be 8\00"
define void @t_sqrt_69() {
%1 = tail call i32 @isqrt(i32 69)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int tolower(int /*<<< orphan*/);
unsigned int hash_func(const char *buf, int len) {
  unsigned int hash = 5381;
  while (len--) {
    hash = ((hash << 5) + hash) + (tolower(*buf++));
  }
  return (hash);
}


x86 assembly (clang, -O0):
<hash_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     116c <hash_func+0x5c>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <hash_func+0x16>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_func>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     114e <hash_func+0x3e>
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0x1505,%eax
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %eax,%ebp
shl    $0x5,%ebp
add    %eax,%ebp
movsbl (%r14,%rbx,1),%edi
call   1030 <tolower@plt>
add    %ebp,%eax
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <hash_func+0x20>
jmp    1153 <hash_func+0x43>
mov    $0x1505,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @hash_func(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %16, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %14, %4 ], [ 5381, %2 ]
%6 = phi i32 [ %8, %4 ], [ %1, %2 ]
%7 = phi i8* [ %10, %4 ], [ %0, %2 ]
%8 = add nsw i32 %6, -1
%9 = mul i32 %5, 33
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = tail call i32 @tolower(i32 %12)
%14 = add i32 %13, %9
%15 = icmp eq i32 %8, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %2
%17 = phi i32 [ 5381, %2 ], [ %14, %4 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char *);
int fstype_default_p(const char *fstype) { return !strcmp(fstype, "ext4"); }


x86 assembly (clang, -O0):
<fstype_default_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstype_default_p>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"ext4\00"
define i32 @fstype_default_p(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void gtk_plug_construct() {}


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

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

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

LLVM IR (-O2):
define void @gtk_plug_construct() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_KEEPALIVE;
int __sapi_sock_reset_optint(int, int /*<<< orphan*/, int /*<<< orphan*/);
int sapi_sock_reset_keepalive(int sock) {
  return __sapi_sock_reset_optint(sock, SOL_SOCKET, SO_KEEPALIVE);
}


x86 assembly (clang, -O0):
<sapi_sock_reset_keepalive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
call   1030 <__sapi_sock_reset_optint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sapi_sock_reset_keepalive>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
jmp    1030 <__sapi_sock_reset_optint@plt>

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_KEEPALIVE = global i32 0
define i32 @sapi_sock_reset_keepalive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_KEEPALIVE
%6 = call i32 @__sapi_sock_reset_optint(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_KEEPALIVE = global i32 0
define i32 @sapi_sock_reset_keepalive(i32 %0) {
%2 = load i32, i32* @SOL_SOCKET
%3 = load i32, i32* @SO_KEEPALIVE
%4 = tail call i32 @__sapi_sock_reset_optint(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
const unsigned int usicChannelBase(const int channel) {
  switch (channel) {
  case 0:
    return 0x48000000;
  case 1:
    return 0x48000200;
  }
  return 0;
}


x86 assembly (clang, -O0):
<usicChannelBase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     112b <usicChannelBase+0x2b>
jmp    111a <usicChannelBase+0x1a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1137 <usicChannelBase+0x37>
jmp    1143 <usicChannelBase+0x43>
movl   $0x48000000,-0x4(%rbp)
jmp    114a <usicChannelBase+0x4a>
movl   $0x48000200,-0x4(%rbp)
jmp    114a <usicChannelBase+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usicChannelBase>:
xor    %eax,%eax
cmp    $0x1,%edi
mov    $0x48000200,%ecx
cmovne %eax,%ecx
test   %edi,%edi
mov    $0x48000000,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @usicChannelBase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i32 1207959552, i32* %2
br label %8
6: ; preds = %1
store i32 1207960064, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @usicChannelBase(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 1207960064, i32 0
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 1207959552, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int /*<<< orphan*/ __VERIFIER_assume(int);
int __VERIFIER_nondet_int();
int main() {
  int i = 0, x = 0, y = 0;
  int n = __VERIFIER_nondet_int();
  __VERIFIER_assume(n > 0);
  for (i = 0; 1; i++) {
    __VERIFIER_assert(x == 0);
  }
  __VERIFIER_assert(x == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__VERIFIER_assume@plt>
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1185 <main+0x55>
jmp    11a4 <main+0x74>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1176 <main+0x46>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1050 <__VERIFIER_assume@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @__VERIFIER_assume(i32 %3)
br label %5
5: ; preds = %5, %0
%6 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
}
/* Type definitions */
struct dune_tf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dune_ret_from_user(int /*<<< orphan*/);
void syscall_handler1(struct dune_tf *tf) { dune_ret_from_user(0); }


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

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

LLVM IR (-O0):
%struct.dune_tf = type { i32 }
define void @syscall_handler1(%struct.dune_tf* %0) {
%2 = alloca %struct.dune_tf*
store %struct.dune_tf* %0, %struct.dune_tf** %2
%3 = call i32 @dune_ret_from_user(i32 0)
ret void
}

LLVM IR (-O2):
%struct.dune_tf = type { i32 }
define void @syscall_handler1(%struct.dune_tf* nocapture readnone %0) {
%2 = tail call i32 @dune_ret_from_user(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *getFullFileName(int dirLen, char *fileName, char *dirName) {
  char *name = (char *)malloc(dirLen);
  strcpy(name, fileName);
  strcat(name, "/");
  strcat(name, dirName);
  return name;
}


x86 assembly (clang, -O0):
<getFullFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFullFileName>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xeab(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @getFullFileName(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %7
%15 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %7
%17 = load i8*, i8** %6
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @getFullFileName(i32 %0, i8* %1, i8* %2) {
%4 = tail call i64 @malloc(i32 %0)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
%7 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @strcat(i8* %5, i8* %2)
ret i8* %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t node_size_blk(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @node_size_blk() {
ret i32 1
}

LLVM IR (-O2):
define i32 @node_size_blk() {
ret i32 1
}
void false(c) {
  if (c)
    abort();
}


x86 assembly (clang, -O0):
<false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112a <false+0x1a>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<false>:
test   %edi,%edi
jne    1115 <false+0x5>
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @false(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @false(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret void
}
char *stpcpy(dest, src)
char *dest;
const char *src;
{
  char *d = dest;
  const char *s = src;
  do
    *d++ = *s;
  while (*s++ != '\0');
  return d - 1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    111c <stpcpy+0x1c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
cmpb   $0x0,(%rsi)
lea    0x1(%rsi),%rsi
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = phi i8* [ %1, %2 ], [ %8, %3 ]
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %6, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Variables and functions */
double third_order_polynomial(double, double, double, double, double);
double ascending_longitude_moon(double jce) {
  return third_order_polynomial(1.0 / 450000.0, 0.0020708, -1934.136261,
                                125.04452, jce);
}


x86 assembly (clang, -O0):
<ascending_longitude_moon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm4
movsd  0xed6(%rip),%xmm0
movsd  0xed6(%rip),%xmm1
movsd  0xed6(%rip),%xmm2
movsd  0xed6(%rip),%xmm3
call   1030 <third_order_polynomial@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascending_longitude_moon>:
movaps %xmm0,%xmm4
movsd  0xee5(%rip),%xmm0
movsd  0xee5(%rip),%xmm1
movsd  0xee5(%rip),%xmm2
movsd  0xee5(%rip),%xmm3
jmp    1030 <third_order_polynomial@plt>

LLVM IR (-O0):
define double @ascending_longitude_moon(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @third_order_polynomial(double 0x3EC2A42F961F79B9, double 2.070800e-03, double 0xC09E388B8800EAE2, double 0x405F42D96A6A0126, double %3)
ret double %4
}

LLVM IR (-O2):
define double @ascending_longitude_moon(double %0) {
%2 = tail call double @third_order_polynomial(double 0x3EC2A42F961F79B9, double 2.070800e-03, double 0xC09E388B8800EAE2, double 0x405F42D96A6A0126, double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
void strzncpy(char *dst, const char *src, int n) {
  strncpy(dst, src, n);
  dst[n - 1] = 0;
}


x86 assembly (clang, -O0):
<strzncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strzncpy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @strzncpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @strzncpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = add nsw i32 %2, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret void
}
int test_imm_B2uint8_mem(unsigned char *val) {
  return ((*val) & (-0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 78
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t power(uint64_t x, int n) {
  if (n == 0)
    return 1;
  if (n == 1)
    return x;
  else
    return (x * power(x, n - 1)) % 1000000007;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1134 <power+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1170 <power+0x60>
cmpl   $0x1,-0xc(%rbp)
jne    1149 <power+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <power+0x60>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <power@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    $0x3b9aca07,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
push   %rbx
test   %esi,%esi
je     114a <power+0x3a>
mov    %edi,%ebx
cmp    $0x1,%esi
je     114f <power+0x3f>
add    $0xffffffff,%esi
mov    %ebx,%edi
call   1030 <power@plt>
imul   %ebx,%eax
movslq %eax,%rbx
imul   $0x44b82f99,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x3c,%rax
add    %ecx,%eax
imul   $0x3b9aca07,%eax,%eax
sub    %eax,%ebx
jmp    114f <power+0x3f>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
switch i32 %1, label %6 [
i32 0, label %4
i32 1, label %3
]
3: ; preds = %2
br label %4
4: ; preds = %3, %2, %6
%5 = phi i32 [ %10, %6 ], [ %0, %3 ], [ 1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = tail call i32 @power(i32 %0, i32 %7)
%9 = mul nsw i32 %8, %0
%10 = srem i32 %9, 1000000007
br label %4
}
char *td_getcwd(char *buf, unsigned long size) {
  buf[0] = '.';
  buf[1] = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<td_getcwd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2e,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<td_getcwd>:
mov    %rdi,%rax
movw   $0x2e,(%rdi)
ret

LLVM IR (-O0):
define i8* @td_getcwd(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 46, i8* %6
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %8
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @td_getcwd(i8* returned writeonly %0, i64 %1) {
store i8 46, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %3
ret i8* %0
}
unsigned xrop3_129_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = D ^ S;
  stk1 = stk1 | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_129_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %4, %6
%8 = or i32 %7, 255
%9 = xor i32 %8, -1
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %11, %9
ret i32 %12
}
/* Variables and functions */
int strncmp(char *, char *, int);
int ascending(const void *a1, const void *a2) {
  return strncmp((char *)a1, (char *)a2, 26);
}


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

x86 assembly (clang, -O2):
<ascending>:
mov    $0x1a,%edx
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @ascending(i8* %0, i8* %1) {
%3 = tail call i32 @strncmp(i8* %0, i8* %1, i32 26)
ret i32 %3
}
__attribute__((no, noclone)) signed __int128 t139_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(x, (unsigned __int128)(1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t139_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rcx,%rdi
sar    $0x3f,%rdi
add    $0xffffffffffffffff,%rdx
adc    $0xffffffffffffffff,%rcx
mov    %rdi,%rsi
adc    $0xffffffffffffffff,%rsi
adc    $0xffffffffffffffff,%rdi
mov    %esi,%eax
and    $0x1,%eax
neg    %rax
mov    %rax,%r8
xor    %rdi,%r8
xor    %rsi,%rax
or     %r8,%rax
mov    %rcx,%r8
sar    $0x3f,%r8
xor    %r8,%rsi
xor    %r8,%rdi
or     %rdi,%rsi
or     %rsi,%rax
setne  %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1191 <t139_5sub+0x81>
jmp    1198 <t139_5sub+0x88>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t139_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0xffffffffffffffff,%r14
mov    %rsi,%rbx
adc    $0xffffffffffffffff,%rbx
movabs $0x8000000000000000,%rax
xor    %rsi,%rax
or     %rdi,%rax
jne    113b <t139_5sub+0x2b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define { i64, i64 } @t139_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = add nsw i129 %7, -1
%9 = icmp eq i128 %6, -170141183460469231731687303715884105728
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
char *calloc(int, int);
char *decode_recurse(char const *, struct tree const *, char **);
char *decode(const char *input, const struct tree *tree) {
  char *result = calloc(1, 1);
  do {
    input = decode_recurse(input, tree, &result);
  } while (*input);
  return result;
}


x86 assembly (clang, -O0):
<decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <decode_recurse@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1140 <decode+0x20>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%r15
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <decode_recurse@plt>
mov    %rax,%rbx
cmpb   $0x0,(%rax)
jne    1150 <decode+0x30>
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.tree = type { i32 }
define i8* @decode(i8* %0, %struct.tree* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call dereferenceable_or_null(1) i8* @calloc(i32 1, i32 1)
store i8* %5, i8** %3
br label %6
6: ; preds = %6, %2
%7 = phi i8* [ %0, %2 ], [ %8, %6 ]
%8 = call i8* @decode_recurse(i8* %7, %struct.tree* %1, i8** %3)
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6
%12 = load i8*, i8** %3
ret i8* %12
}
/* Variables and functions */
double strtod(char const *, char **);
int get_double(double *p, const char *s) {
  char *endptr;
  *p = strtod(s, &endptr);
  return endptr != s;
}


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

x86 assembly (clang, -O2):
<get_double>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strtod@plt>
movsd  %xmm0,(%r14)
xor    %eax,%eax
cmp    %rbx,(%rsp)
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @get_double(double* %0, i8* %1) {
%3 = alloca double*
%4 = alloca i8*
%5 = alloca i8*
store double* %0, double** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call double @strtod(i8* %6, i8** %5)
%8 = load double*, double** %3
store double %7, double* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = icmp ne i8* %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @get_double(double* nocapture writeonly %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call double @strtod(i8* %1, i8** %3)
store double %5, double* %0
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, %1
%8 = zext i1 %7 to i32
ret i32 %8
}