xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int TranspositionGetColumns(int letters, int *key_columns) {
  int tmp = 0;
  do {
    scanf("%d", &tmp);
  } while (tmp < 1 || tmp >= letters);
  *key_columns = tmp;
  return 0;
}


x86 assembly (clang, -O0):
<TranspositionGetColumns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xed3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jl     1151 <TranspositionGetColumns+0x41>
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
setge  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1126 <TranspositionGetColumns+0x16>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TranspositionGetColumns>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebp
movl   $0x0,0x4(%rsp)
lea    0xed5(%rip),%r15
lea    0x4(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1130 <TranspositionGetColumns+0x20>
cmp    %ebp,%eax
jge    1130 <TranspositionGetColumns+0x20>
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @TranspositionGetColumns(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %8
8: ; preds = %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 1
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = icmp sge i32 %12, %13
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ true, %8 ], [ %14, %11 ]
br i1 %16, label %6, label %17
17: ; preds = %15
%18 = load i32, i32* %5
%19 = load i32*, i32** %4
store i32 %18, i32* %19
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @TranspositionGetColumns(i32 %0, i32* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %5, %2
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 1
%9 = icmp sge i32 %7, %0
%10 = or i1 %8, %9
br i1 %10, label %5, label %11
11: ; preds = %5
store i32 %7, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR2;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int /*<<< orphan*/ stderr;
void sigusr2(int sig) {
  signal(SIGUSR2, sigusr2);
  fprintf(stderr, "W:\t%s\n", "trapped USR2 and continue");
}


x86 assembly (clang, -O0):
<sigusr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2e8d(%rip),%rsi
call   1030 <signal@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
lea    0xeb0(%rip),%rdx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigusr2>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rsi
call   1030 <signal@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
lea    0xeba(%rip),%rdx
pop    %rax
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@SIGUSR2 = global i32 0
@stderr = global i32 0
@.str = [7 x i8] c"W:\09%s\0A\00"
@.str.1 = [26 x i8] c"trapped USR2 and continue\00"
define void @sigusr2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGUSR2
%4 = call i32 @signal(i32 %3, void (i32)* @sigusr2)
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@SIGUSR2 = global i32 0
@stderr = global i32 0
@.str = [7 x i8] c"W:\09%s\0A\00"
@.str.1 = [26 x i8] c"trapped USR2 and continue\00"
define void @sigusr2(i32 %0) {
%2 = load i32, i32* @SIGUSR2
%3 = tail call i32 @signal(i32 %2, void (i32)* @sigusr2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int month, day, year;
  printf("Enter a date (mm/dd/yy): ");
  scanf("%d/%d/%d", &month, &day, &year);
  printf("You entered the date %.2d%.2d%.4d\n", month, day, year);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter a date (mm/dd/yy): \00"
@.str.1 = [9 x i8] c"%d/%d/%d\00"
@.str.2 = [35 x i8] c"You entered the date %.2d%.2d%.4d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Enter a date (mm/dd/yy): \00"
@.str.1 = [9 x i8] c"%d/%d/%d\00"
@.str.2 = [35 x i8] c"You entered the date %.2d%.2d%.4d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret i32 0
}
/* Variables and functions */
long double fmin(long double x, long double y) {
  if (x < y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1130 <fmin+0x30>
jmp    1125 <fmin+0x25>
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
jmp    1136 <fmin+0x36>
fldt   -0x30(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fucomi %st(1),%st
fcmovnbe %st(1),%st
fstp   %st(1)
ret

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

LLVM IR (-O2):
define x86_fp80 @fmin(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp olt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
int writeFile(const char *filename, const char *chTable) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @writeFile(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int boaDeleteGroup(char *group) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @boaDeleteGroup(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ anotherWay();
int /*<<< orphan*/ oneWay();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\noneWay:\n");
  oneWay();
  printf("\nantherWay:\n");
  anotherWay();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <oneWay@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <anotherWay@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <oneWay@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <anotherWay@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\0AoneWay:\0A\00"
@.str.1 = [13 x i8] c"\0AantherWay:\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @oneWay()
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @anotherWay()
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"\0AoneWay:\00"
@str.2 = [12 x i8] c"\0AantherWay:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @oneWay()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (...) @anotherWay()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_cs_help(void) {
  puts("full      all characters supported by ssocr");
  puts("digits    digits 0 to 9");
  puts("decimal   digits 0 to 9, decimal point, minus");
  puts("hex       digits 0 to f, decimal point, minus ");
}


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

x86 assembly (clang, -O2):
<print_cs_help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"full all characters supported by ssocr\00"
@.str.1 = [24 x i8] c"digits digits 0 to 9\00"
@.str.2 = [46 x i8] c"decimal digits 0 to 9, decimal point, minus\00"
@.str.3 = [47 x i8] c"hex digits 0 to f, decimal point, minus \00"
define void @print_cs_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"full all characters supported by ssocr\00"
@.str.1 = [24 x i8] c"digits digits 0 to 9\00"
@.str.2 = [46 x i8] c"decimal digits 0 to 9, decimal point, minus\00"
@.str.3 = [47 x i8] c"hex digits 0 to f, decimal point, minus \00"
define void @print_cs_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strspn(char *, char *);
int strtol(char *, char **, int);
int get_int(char **s, int *i) {
  register char *t;
  t = *s + strspn(*s, ",;:"
                      " \f\n\r\t\v");
  *i = strtol(t, s, 10);
  return (t != *s);
}


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%r12
lea    0xec8(%rip),%rsi
mov    %r12,%rdi
call   1030 <strspn@plt>
movslq %eax,%rbx
add    %r12,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,(%r14)
xor    %eax,%eax
cmp    (%r15),%rbx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c",;: \0C\0A\0D\09\0B\00"
define i32 @get_int(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = call i32 @strspn(i8* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8**, i8*** %3
%15 = call i32 @strtol(i8* %13, i8** %14, i32 10)
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i8*, i8** %5
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = icmp ne i8* %17, %19
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
@.str = [10 x i8] c",;: \0C\0A\0D\09\0B\00"
define i32 @get_int(i8** nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strspn(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = tail call i32 @strtol(i8* %6, i8** %0, i32 10)
store i32 %7, i32* %1
%8 = load i8*, i8** %0
%9 = icmp ne i8* %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long fileSize(FILE *file) {
  long offset, length;
  offset = ftell(file);
  fseek(file, 0L, SEEK_END);
  length = ftell(file);
  fseek(file, 0L, SEEK_SET);
  return length;
}


x86 assembly (clang, -O0):
<fileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e71(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileSize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fileSize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* @SEEK_SET
%14 = call i32 @fseek(i32* %12, i64 0, i32 %13)
%15 = load i64, i64* %4
ret i64 %15
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fileSize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 0, i32 %6)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ checksum(unsigned char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ wrapsum(int /*<<< orphan*/);
uint16_t ipv4_chksum(unsigned char *buff, int len) {
  return wrapsum(checksum(buff, len, 0));
}


x86 assembly (clang, -O0):
<ipv4_chksum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <checksum@plt>
mov    %eax,%edi
call   1040 <wrapsum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_chksum>:
push   %rax
xor    %edx,%edx
call   1030 <checksum@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <wrapsum@plt>

LLVM IR (-O0):
define i32 @ipv4_chksum(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 @checksum(i8* %5, i32 %6, i32 0)
%8 = call i32 @wrapsum(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @ipv4_chksum(i8* %0, i32 %1) {
%3 = tail call i32 @checksum(i8* %0, i32 %1, i32 0)
%4 = tail call i32 @wrapsum(i32 %3)
ret i32 %4
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  char s[100] = "1231.2e-6";
  printf("%g\n", atof(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x64,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1030 <atof@plt>
lea    0xf00(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@__const.main.s = [100 x i8] c"1231.2e-6\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = tail call double @atof(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @__const.main.s, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
extern void oops(const char *s1, const char *s2) {
  fprintf(stderr, "Error: %s ", s1);
  perror(s2);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<oops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<oops>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s \00"
@EXIT_FAILURE = global i32 0
define void @oops(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @perror(i8* %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s \00"
@EXIT_FAILURE = global i32 0
define void @oops(i8* %0, i8* nocapture %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)
%5 = tail call i32 @perror(i8* %1)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ TIOCCBRK;
int /*<<< orphan*/ TIOCSBRK;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ usleep(int);
int SerialSendBreak(int fd, int duration) {
  ioctl(fd, TIOCSBRK);
  usleep(duration);
  ioctl(fd, TIOCCBRK);
  return 0;
}


x86 assembly (clang, -O0):
<SerialSendBreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%edi
call   1040 <usleep@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SerialSendBreak>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %ebx,%edi
call   1040 <usleep@plt>
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1030 <ioctl@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@TIOCSBRK = global i32 0
@TIOCCBRK = global i32 0
define i32 @SerialSendBreak(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* @TIOCSBRK
%7 = call i32 @ioctl(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @usleep(i32 %8)
%10 = load i32, i32* %3
%11 = load i32, i32* @TIOCCBRK
%12 = call i32 @ioctl(i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@TIOCSBRK = global i32 0
@TIOCCBRK = global i32 0
define i32 @SerialSendBreak(i32 %0, i32 %1) {
%3 = load i32, i32* @TIOCSBRK
%4 = tail call i32 @ioctl(i32 %0, i32 %3)
%5 = tail call i32 @usleep(i32 %1)
%6 = load i32, i32* @TIOCCBRK
%7 = tail call i32 @ioctl(i32 %0, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ statements();
main() { statements(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <statements@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @statements()
ret i32 0
}
onum(num) int num;
{
  outdec(num);
  outbyte('.');
}


x86 assembly (clang, -O0):
<onum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <outdec@plt>
mov    $0x2e,%edi
mov    $0x0,%al
call   1040 <outbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onum>:
push   %rax
xor    %eax,%eax
call   1030 <outdec@plt>
mov    $0x2e,%edi
xor    %eax,%eax
pop    %rcx
jmp    1040 <outbyte@plt>

LLVM IR (-O0):
define i32 @onum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %4)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 46)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @onum(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @outbyte to i32 (i32, ...)*)(i32 46)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Run_CtrlC(int sig) { exit(0); }


x86 assembly (clang, -O0):
<Run_CtrlC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Run_CtrlC>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @Run_CtrlC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Run_CtrlC(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void merge_sort(int data[], int start, int end) {
  if (start < end) {
    int middle = (start + end) / 2;
    merge_sort(data, start, middle);
    merge_sort(data, middle + 1, end);
    merge(data, start, middle, end);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge_sort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %edx,%esi
jge    1172 <merge_sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

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

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @merge_sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @merge_sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
testjump(label, ft) int label;
int ft;
{
  ol("cmp.l\t%d0,&0");
  if (ft)
    ot("beq\t");
  else
    ot("bne\t");
  printlabel(label);
  nl();
}


x86 assembly (clang, -O0):
<testjump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1050 <ol@plt>
cmpl   $0x0,-0xc(%rbp)
je     1179 <testjump+0x39>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <ot@plt>
jmp    1187 <testjump+0x47>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <ot@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1060 <printlabel@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testjump>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1050 <ol@plt>
test   %ebx,%ebx
lea    0xeb4(%rip),%rax
lea    0xea8(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <ot@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1060 <printlabel@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"cmp.l\09%d0,&0\00"
@.str.1 = [5 x i8] c"beq\09\00"
@.str.2 = [5 x i8] c"bne\09\00"
define i32 @testjump(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %4
%15 = call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %14)
%16 = call i32 (...) @nl()
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [13 x i8] c"cmp.l\09%d0,&0\00"
@.str.1 = [5 x i8] c"beq\09\00"
@.str.2 = [5 x i8] c"bne\09\00"
define i32 @testjump(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* %5)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @printlabel to i32 (i32, ...)*)(i32 %0)
%8 = tail call i32 (...) @nl()
ret i32 undef
}
/* Variables and functions */
int f();
void g(int t) {
  int a;
  while (a < f())
    ;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jge    113a <g+0x2a>
jmp    111b <g+0xb>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @g(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = call i32 (...) @f()
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @g(i32 %0) {
%2 = tail call i32 (...) @f()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int const *);
int label_is_normal(const uint8_t *label) {
  assert(label);
  return (label[0] & 0xc0) == 0;
}


x86 assembly (clang, -O0):
<label_is_normal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xc0,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_is_normal>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
xor    %eax,%eax
testb  $0xc0,(%rbx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @label_is_normal(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @assert(i32* %3)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 192
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @label_is_normal(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = load i32, i32* %0
%4 = and i32 %3, 192
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
void Fan(int fancmd) {
  char cmdstr[256];
  sprintf(cmdstr, "setfan %d 1>/dev/null 2>/dev/null", fancmd);
  system(cmdstr);
}


x86 assembly (clang, -O0):
<Fan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fan>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"setfan %d 1>/dev/null 2>/dev/null\00"
define void @Fan(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"setfan %d 1>/dev/null 2>/dev/null\00"
define void @Fan(i32 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ traffic_mv();
int main() {
  if (traffic_mv() == 0)
    printf("traffic.db mv failure\n");
  else
    printf("traffic.db mv success!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <traffic_mv@plt>
cmp    $0x0,%rax
jne    1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <traffic_mv@plt>
test   %rax,%rax
lea    0xee5(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"traffic.db mv failure\0A\00"
@.str.1 = [24 x i8] c"traffic.db mv success!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @traffic_mv()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@str = [23 x i8] c"traffic.db mv success!\00"
@str.2 = [22 x i8] c"traffic.db mv failure\00"
define i32 @main() {
%1 = tail call i64 (...) @traffic_mv()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int kfork();
int kkfork() { return (kfork()); }


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

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

LLVM IR (-O0):
define i32 @kkfork() {
%1 = call i32 (...) @kfork()
ret i32 %1
}

LLVM IR (-O2):
define i32 @kkfork() {
%1 = tail call i32 (...) @kfork()
ret i32 %1
}
int test_imm_7Euint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x7E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_7Euint64_highword_reg>:
movabs $0x7e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Euint64_highword_reg(i64 %0) {
%2 = and i64 %0, 541165879296
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ rte_align32pow2(scalar_t__);
scalar_t__ rte_bsf32(scalar_t__);
uint32_t rte_log2_u32(uint32_t v) {
  if (v == 0)
    return 0;
  v = rte_align32pow2(v);
  return rte_bsf32(v);
}


x86 assembly (clang, -O0):
<rte_log2_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <rte_log2_u32+0x24>
movq   $0x0,-0x8(%rbp)
jmp    115e <rte_log2_u32+0x3e>
mov    -0x10(%rbp),%rdi
call   1030 <rte_align32pow2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rte_bsf32@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_log2_u32>:
test   %rdi,%rdi
je     1134 <rte_log2_u32+0x14>
push   %rax
call   1030 <rte_align32pow2@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <rte_bsf32@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @rte_log2_u32(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %12
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @rte_align32pow2(i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = call i64 @rte_bsf32(i64 %10)
store i64 %11, i64* %2
br label %12
12: ; preds = %7, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @rte_log2_u32(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @rte_align32pow2(i64 %0)
%5 = tail call i64 @rte_bsf32(i64 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i64 [ %5, %3 ], [ 0, %1 ]
ret i64 %7
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int cec_has_playback(__u16 log_addr_mask) {
  return log_addr_mask & ((1 << 4) | (1 << 8) | (1 << 11));
}


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

x86 assembly (clang, -O2):
<cec_has_playback>:
mov    %edi,%eax
and    $0x910,%eax
ret

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

LLVM IR (-O2):
define i32 @cec_has_playback(i32 %0) {
%2 = and i32 %0, 2320
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *localtime64_r() {
  fprintf(stderr, "nixpkgs: call into localtime64_r\n");
  abort();
}


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

x86 assembly (clang, -O2):
<localtime64_r>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"nixpkgs: call into localtime64_r\0A\00"
define i8* @localtime64_r() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"nixpkgs: call into localtime64_r\0A\00"
define noalias i8* @localtime64_r() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int sched_getscheduler(int);
int getScheduler(int iProcessId) { return sched_getscheduler(iProcessId); }


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

x86 assembly (clang, -O2):
<getScheduler>:
jmp    1030 <sched_getscheduler@plt>

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

LLVM IR (-O2):
define i32 @getScheduler(i32 %0) {
%2 = tail call i32 @sched_getscheduler(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *strdup(char *);
char *module_load(const char *filename, const char *symbname,
                  int (*shouldload)(void *symb, void *misc, char **err),
                  void *misc, void **dll, void **symb) {
  if (dll)
    *dll = NULL;
  if (symb)
    *symb = NULL;
  return strdup("module loading disabled");
}


x86 assembly (clang, -O0):
<module_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1146 <module_load+0x36>
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     115c <module_load+0x4c>
mov    -0x30(%rbp),%rax
movq   $0x0,(%rax)
lea    0xe9d(%rip),%rdi
call   1030 <strdup@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_load>:
test   %r8,%r8
je     111c <module_load+0xc>
movq   $0x0,(%r8)
test   %r9,%r9
je     1128 <module_load+0x18>
movq   $0x0,(%r9)
lea    0xed1(%rip),%rdi
jmp    1030 <strdup@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"module loading disabled\00"
define i8* @module_load(i8* %0, i8* %1, i32 (i8*, i8*, i8**)* %2, i8* %3, i8** %4, i8** %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32 (i8*, i8*, i8**)*
%10 = alloca i8*
%11 = alloca i8**
%12 = alloca i8**
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 (i8*, i8*, i8**)* %2, i32 (i8*, i8*, i8**)** %9
store i8* %3, i8** %10
store i8** %4, i8*** %11
store i8** %5, i8*** %12
%13 = load i8**, i8*** %11
%14 = icmp ne i8** %13, null
br i1 %14, label %15, label %17
15: ; preds = %6
%16 = load i8**, i8*** %11
store i8* null, i8** %16
br label %17
17: ; preds = %15, %6
%18 = load i8**, i8*** %12
%19 = icmp ne i8** %18, null
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = load i8**, i8*** %12
store i8* null, i8** %21
br label %22
22: ; preds = %20, %17
%23 = call i8* @strdup(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i8* %23
}

LLVM IR (-O2):
@.str = [24 x i8] c"module loading disabled\00"
define noalias i8* @module_load(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 (i8*, i8*, i8**)* nocapture readnone %2, i8* nocapture readnone %3, i8** writeonly %4, i8** writeonly %5) {
%7 = icmp eq i8** %4, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i8* null, i8** %4
br label %9
9: ; preds = %8, %6
%10 = icmp eq i8** %5, null
br i1 %10, label %12, label %11
11: ; preds = %9
store i8* null, i8** %5
br label %12
12: ; preds = %11, %9
%13 = tail call dereferenceable_or_null(24) i8* @strdup(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i8* %13
}