xunge/DecIR huggingface dataset:
/* Type definitions */
struct ks10_uinsn {
  int dummy;
};

/* Variables and functions */
scalar_t__ ifMEM(int, struct ks10_uinsn *);
scalar_t__ ifWORK(int, struct ks10_uinsn *);
int otherw(int i, struct ks10_uinsn *insn) {
  return !(ifMEM(i, insn) || ifWORK(i, insn));
}


x86 assembly (clang, -O0):
<otherw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <ifMEM@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1163 <otherw+0x43>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ifWORK@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<otherw>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <ifMEM@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    114c <otherw+0x2c>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <ifWORK@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.ks10_uinsn = type { i32 }
define i32 @otherw(i32 %0, %struct.ks10_uinsn* %1) {
%3 = alloca i32
%4 = alloca %struct.ks10_uinsn*
store i32 %0, i32* %3
store %struct.ks10_uinsn* %1, %struct.ks10_uinsn** %4
%5 = load i32, i32* %3
%6 = load %struct.ks10_uinsn*, %struct.ks10_uinsn** %4
%7 = call i64 @ifMEM(i32 %5, %struct.ks10_uinsn* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load %struct.ks10_uinsn*, %struct.ks10_uinsn** %4
%12 = call i64 @ifWORK(i32 %10, %struct.ks10_uinsn* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
%struct.ks10_uinsn = type { i32 }
define i32 @otherw(i32 %0, %struct.ks10_uinsn* %1) {
%3 = tail call i64 @ifMEM(i32 %0, %struct.ks10_uinsn* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @ifWORK(i32 %0, %struct.ks10_uinsn* %1)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fwrite(char *, size_t, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void write_buff_tmp(char *buff, size_t length, FILE *fd) {
  if (fwrite(buff, length, 1, fd) < 1) {
    perror("error writing buffer to temporary file");
    fclose(fd);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<write_buff_tmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x1,%edx
call   1060 <fwrite@plt>
cmp    $0x1,%eax
jge    1192 <write_buff_tmp+0x52>
lea    0xe86(%rip),%rdi
call   1040 <perror@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_buff_tmp>:
push   %rbx
mov    %rdx,%rbx
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
test   %eax,%eax
jle    1157 <write_buff_tmp+0x17>
pop    %rbx
ret
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"error writing buffer to temporary file\00"
define void @write_buff_tmp(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32*, i32** %6
%10 = call i32 @fwrite(i8* %7, i64 %8, i32 1, i32* %9)
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%14 = load i32*, i32** %6
%15 = call i32 @fclose(i32* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"error writing buffer to temporary file\00"
define void @write_buff_tmp(i8* nocapture %0, i64 %1, i32* nocapture %2) {
%4 = tail call i32 @fwrite(i8* %0, i64 %1, i32 1, i32* %2)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @fclose(i32* %2)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ naturalN(int);
int /*<<< orphan*/ printf(char *, int);
void naturalParN(int N) {
  if (N > 0)
    naturalN(N - 2);
  printf("%d ", N);
  return;
}


x86 assembly (clang, -O0):
<naturalParN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1140 <naturalParN+0x20>
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <naturalN@plt>
mov    -0x4(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<naturalParN>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jle    112f <naturalParN+0xf>
lea    -0x2(%rbx),%edi
call   1030 <naturalN@plt>
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @naturalParN(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 2
%8 = call i32 @naturalN(i32 %7)
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @naturalParN(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = add nsw i32 %0, -2
%5 = tail call i32 @naturalN(i32 %4)
br label %6
6: ; preds = %3, %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isdigit(int);
void t_isdigit_0x32() {
  Assert_real((isdigit(50)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              255, ("isdigit should be 1 for 2"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
call   1030 <isdigit@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xff,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x32>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xff,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 1 for 2\00"
define void @t_isdigit_0x32() {
%1 = call i32 @isdigit(i32 50)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 1 for 2\00"
define void @t_isdigit_0x32() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
void xsoPart2() {
  sleep(1);
  printf("%s\n", "xsoPart2");
}


x86 assembly (clang, -O0):
<xsoPart2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xecb(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsoPart2>:
push   %rax
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xece(%rip),%rdi
lea    0xecb(%rip),%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"xsoPart2\00"
define void @xsoPart2() {
%1 = call i32 @sleep(i32 1)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"xsoPart2\00"
define void @xsoPart2() {
%1 = tail call i32 @sleep(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ticks_to_msecs(int t) { return (t >> 5); }


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

x86 assembly (clang, -O2):
<ticks_to_msecs>:
mov    %edi,%eax
sar    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @ticks_to_msecs(i32 %0) {
%2 = ashr i32 %0, 5
ret i32 %2
}
/* Variables and functions */
char *date_get_now_date_yyyy_mm_dd(int);
char *date_get_now_yyyy_mm_dd(int utc_offset) {
  return date_get_now_date_yyyy_mm_dd(utc_offset);
}


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

x86 assembly (clang, -O2):
<date_get_now_yyyy_mm_dd>:
jmp    1030 <date_get_now_date_yyyy_mm_dd@plt>

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

LLVM IR (-O2):
define i8* @date_get_now_yyyy_mm_dd(i32 %0) {
%2 = tail call i8* @date_get_now_date_yyyy_mm_dd(i32 %0)
ret i8* %2
}
void foo_1_1_1_1_1_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_1_1_2_2_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *lanli_calloc(size_t nmemb, size_t size) {
  void *ret = calloc(nmemb, size);
  if (!ret) {
    fprintf(stderr, "Allocation failed.\n");
    abort();
  }
  return ret;
}


x86 assembly (clang, -O0):
<lanli_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1178 <lanli_calloc+0x48>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lanli_calloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     113d <lanli_calloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define i8* @lanli_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Allocation failed.\0A\00"
define noalias i8* @lanli_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %3
}
__attribute__((weak)) void handler_Default() {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define weak void @handler_Default() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int atoi(char *);
scalar_t__ gets(char *);
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int n;
  char arr[100];
  while (gets(arr) > 0) {
    n = atoi(arr);
    itoa(n, arr);
    printf("%s\n", arr);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
jle    118f <main+0x4f>
lea    -0x70(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x70(%rbp),%rsi
call   1060 <itoa@plt>
lea    -0x70(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1040 <gets@plt>
test   %rax,%rax
jle    118a <main+0x4a>
mov    %rsp,%rbx
lea    0xea2(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1060 <itoa@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
jg     1160 <main+0x20>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = call i64 @gets(i8* %5)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%13 = call i32 @itoa(i32 %11, i8* %12)
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %4
16: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i64 @gets(i8* %2)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = call i32 @atoi(i8* %2)
%7 = call i32 @itoa(i32 %6, i8* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i64 @gets(i8* %2)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_AY_IX_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_ix(void) {
  m68ki_write_8(EA_AY_IX_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_ix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_IX_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_CS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scs_8_ix>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_IX_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_CS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scs_8_ix() {
%1 = call i32 (...) @EA_AY_IX_8()
%2 = call i64 (...) @COND_CS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scs_8_ix() {
%1 = tail call i32 (...) @EA_AY_IX_8()
%2 = tail call i64 (...) @COND_CS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};
struct dentry {
  int dummy;
};

/* Variables and functions */
int vfs_symlink(struct inode *, struct dentry *, char const *,
                int /*<<< orphan*/);
int backport_vfs_symlink(struct inode *dir, struct dentry *dentry,
                         const char *oldname) {
  return vfs_symlink(dir, dentry, oldname, 0);
}


x86 assembly (clang, -O0):
<backport_vfs_symlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <vfs_symlink@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backport_vfs_symlink>:
xor    %ecx,%ecx
jmp    1030 <vfs_symlink@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.dentry = type { i32 }
define i32 @backport_vfs_symlink(%struct.inode* %0, %struct.dentry* %1, i8* %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.dentry*
%6 = alloca i8*
store %struct.inode* %0, %struct.inode** %4
store %struct.dentry* %1, %struct.dentry** %5
store i8* %2, i8** %6
%7 = load %struct.inode*, %struct.inode** %4
%8 = load %struct.dentry*, %struct.dentry** %5
%9 = load i8*, i8** %6
%10 = call i32 @vfs_symlink(%struct.inode* %7, %struct.dentry* %8, i8* %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.dentry = type { i32 }
define i32 @backport_vfs_symlink(%struct.inode* %0, %struct.dentry* %1, i8* %2) {
%4 = tail call i32 @vfs_symlink(%struct.inode* %0, %struct.dentry* %1, i8* %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ E_P24(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ memset(unsigned char *, char, int);
void SMBOWFencrypt(unsigned char passwd[16], unsigned char *c8,
                   unsigned char p24[24]) {
  unsigned char p21[21];
  memset(p21, '\0', 21);
  memcpy(p21, passwd, 16);
  E_P24(p21, c8, p24);
}


x86 assembly (clang, -O0):
<SMBOWFencrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x15,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x10,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <E_P24@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SMBOWFencrypt>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x15,%edx
call   1040 <memset@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1050 <memcpy@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <E_P24@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @SMBOWFencrypt(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [21 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i8 signext 0, i32 21)
%10 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = call i32 @memcpy(i8* %10, i8* %11, i32 16)
%13 = getelementptr inbounds [21 x i8], [21 x i8]* %7, i64 0, i64 0
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 @E_P24(i8* %13, i8* %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @SMBOWFencrypt(i8* %0, i8* %1, i8* %2) {
%4 = alloca [21 x i8]
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %4, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i8 signext 0, i32 21)
%7 = call i32 @memcpy(i8* %5, i8* %0, i32 16)
%8 = call i32 @E_P24(i8* %5, i8* %1, i8* %2)
ret void
}
int fun483() { return 483; }


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

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

LLVM IR (-O0):
define i32 @fun483() {
ret i32 483
}

LLVM IR (-O2):
define i32 @fun483() {
ret i32 483
}
roundFunction(float x) { return (int)(x + .5); }


x86 assembly (clang, -O0):
<roundFunction>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundFunction>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @roundFunction(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @roundFunction(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
char *jsonCmdString(char *, char *);
char *jsonCmdSetChannelMask(char *channelMask) {
  return (jsonCmdString("chanmask", channelMask));
}


x86 assembly (clang, -O0):
<jsonCmdSetChannelMask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <jsonCmdString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonCmdSetChannelMask>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <jsonCmdString@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"chanmask\00"
define i8* @jsonCmdSetChannelMask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @jsonCmdString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"chanmask\00"
define i8* @jsonCmdSetChannelMask(i8* %0) {
%2 = tail call i8* @jsonCmdString(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
/* Variables and functions */
double *_zero_arr_plus_double_fn(double *, int, int, char const *,
                                 unsigned int);
double *_zero_arr_inplace_plus_double_fn(double **x, int orig_i,
                                         const char *filename,
                                         unsigned lineno) {
  *x = _zero_arr_plus_double_fn(*x, 1, orig_i, filename, lineno);
  return *x;
}


x86 assembly (clang, -O0):
<_zero_arr_inplace_plus_double_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%esi
call   1030 <_zero_arr_plus_double_fn@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zero_arr_inplace_plus_double_fn>:
push   %rbx
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    $0x1,%esi
call   1030 <_zero_arr_plus_double_fn@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define double* @_zero_arr_inplace_plus_double_fn(double** %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca double**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store double** %0, double*** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load double**, double*** %5
%10 = load double*, double** %9
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call double* @_zero_arr_plus_double_fn(double* %10, i32 1, i32 %11, i8* %12, i32 %13)
%15 = load double**, double*** %5
store double* %14, double** %15
%16 = load double**, double*** %5
%17 = load double*, double** %16
ret double* %17
}

LLVM IR (-O2):
define double* @_zero_arr_inplace_plus_double_fn(double** nocapture %0, i32 %1, i8* %2, i32 %3) {
%5 = load double*, double** %0
%6 = tail call double* @_zero_arr_plus_double_fn(double* %5, i32 1, i32 %1, i8* %2, i32 %3)
store double* %6, double** %0
ret double* %6
}
/* Variables and functions */
int current_year();
int max(int, int);
int month_left();
int /*<<< orphan*/ print_current_date();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Current year: %d\n", current_year());
  printf("Months left:  %d\n", month_left());
  printf("max:          %d\n", max(12, 13));
  print_current_date();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <current_year@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <month_left@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xc,%edi
mov    $0xd,%esi
call   1050 <max@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_current_date@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <current_year@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <month_left@plt>
lea    0xe9e(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xc,%edi
mov    $0xd,%esi
call   1050 <max@plt>
lea    0xe93(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <print_current_date@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Current year: %d\0A\00"
@.str.1 = [18 x i8] c"Months left: %d\0A\00"
@.str.2 = [18 x i8] c"max: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @current_year()
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @month_left()
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @max(i32 12, i32 13)
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @print_current_date()
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Current year: %d\0A\00"
@.str.1 = [18 x i8] c"Months left: %d\0A\00"
@.str.2 = [18 x i8] c"max: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @current_year()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @month_left()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @max(i32 12, i32 13)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @print_current_date()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Help() {
  printf("testScreenInfoTool\n");
  printf("testScreenInfoTool n     // get info of /dev/fbn\n");
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"testScreenInfoTool\0A\00"
@.str.1 = [50 x i8] c"testScreenInfoTool n // get info of /dev/fbn\0A\00"
define void @Help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"testScreenInfoTool\00"
@str.2 = [49 x i8] c"testScreenInfoTool n // get info of /dev/fbn\00"
define void @Help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
struct PatternGen_Random {
  int dummy;
};

/* Variables and functions */
int PatternGen_Rand(struct PatternGen_Random *);
uint8_t PatternGen_BoolChance(struct PatternGen_Random *R) {
  int r = PatternGen_Rand(R);
  return ((((r >> 13)) & 1) == 1) ? 1 : 0;
}


x86 assembly (clang, -O0):
<PatternGen_BoolChance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <PatternGen_Rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
sar    $0xd,%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PatternGen_BoolChance>:
push   %rax
call   1030 <PatternGen_Rand@plt>
shr    $0xd,%eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.PatternGen_Random = type { i32 }
define i32 @PatternGen_BoolChance(%struct.PatternGen_Random* %0) {
%2 = alloca %struct.PatternGen_Random*
%3 = alloca i32
store %struct.PatternGen_Random* %0, %struct.PatternGen_Random** %2
%4 = load %struct.PatternGen_Random*, %struct.PatternGen_Random** %2
%5 = call i32 @PatternGen_Rand(%struct.PatternGen_Random* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = ashr i32 %6, 13
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
%struct.PatternGen_Random = type { i32 }
define i32 @PatternGen_BoolChance(%struct.PatternGen_Random* %0) {
%2 = tail call i32 @PatternGen_Rand(%struct.PatternGen_Random* %0)
%3 = lshr i32 %2, 13
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ doStreamReadBlock(int *, char *, int, int);
char readStream(int *s) {
  char c = 0;
  doStreamReadBlock(s, &c, 1, *s);
  return c;
}


x86 assembly (clang, -O0):
<readStream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <doStreamReadBlock@plt>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readStream>:
push   %rax
movb   $0x0,0x7(%rsp)
mov    (%rdi),%ecx
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <doStreamReadBlock@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

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

LLVM IR (-O2):
define signext i8 @readStream(i32* %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = load i32, i32* %0
%4 = call i32 @doStreamReadBlock(i32* %0, i8* %2, i32 1, i32 %3)
%5 = load i8, i8* %2
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void exception_isr(int n) { printf("Exception_isr %d\n", n); }


x86 assembly (clang, -O0):
<exception_isr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exception_isr>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Exception_isr %d\0A\00"
define void @exception_isr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Exception_isr %d\0A\00"
define void @exception_isr(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ silc_free(void *);
void silc_schedule_fd_destructor(void *key, void *context, void *user_context) {
  silc_free(context);
}


x86 assembly (clang, -O0):
<silc_schedule_fd_destructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <silc_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<silc_schedule_fd_destructor>:
mov    %rsi,%rdi
jmp    1030 <silc_free@plt>

LLVM IR (-O0):
define void @silc_schedule_fd_destructor(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 @silc_free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @silc_schedule_fd_destructor(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @silc_free(i8* %1)
ret void
}
extern __attribute__((gnu_)) long labs(long __n) {
  return (__n < 0L) ? -__n : __n;
}


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
long long llabs(long long n) { return (n < 0) ? -n : n; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
signed int mknodat(signed int __fd, const char *__path, unsigned int __mode,
                   unsigned long int __dev) {
  signed int return_value___xmknodat$1;
  return_value___xmknodat$1 = __xmknodat(0, __fd, __path, __mode, &__dev);
  return return_value___xmknodat$1;
}


x86 assembly (clang, -O0):
<mknodat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
lea    -0x20(%rbp),%r8
mov    $0x0,%al
call   1030 <__xmknodat@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mknodat>:
push   %rax
mov    %edx,%eax
mov    %rsi,%rdx
mov    %edi,%esi
mov    %rcx,(%rsp)
mov    %rsp,%r8
xor    %edi,%edi
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <__xmknodat@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mknodat(i32 %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = call i32 (i32, i32, i8*, i32, i64*, ...) bitcast (i32 (...)* @__xmknodat to i32 (i32, i32, i8*, i32, i64*, ...)*)(i32 0, i32 %10, i8* %11, i32 %12, i64* %8)
store i32 %13, i32* %9
%14 = load i32, i32* %9
ret i32 %14
}

LLVM IR (-O2):
define i32 @mknodat(i32 %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i64
store i64 %3, i64* %5
%6 = call i32 (i32, i32, i8*, i32, i64*, ...) bitcast (i32 (...)* @__xmknodat to i32 (i32, i32, i8*, i32, i64*, ...)*)(i32 0, i32 %0, i8* %1, i32 %2, i64* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  printf("The second largest number is %d", c);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [32 x i8] c"The second largest number is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d%d%d%d\00"
@.str.1 = [32 x i8] c"The second largest number is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ retarr();
int /*<<< orphan*/ retstr();
int /*<<< orphan*/ retunempty();
int /*<<< orphan*/ retunion();
int main() {
  retstr();
  retarr();
  retunion();
  retunempty();
  {
    printf("Error %d\n", (int)6);
    exit(6);
  };
  {
    printf("Error %d\n", (int)3);
    exit(3);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <retstr@plt>
mov    $0x0,%al
call   1070 <retarr@plt>
mov    $0x0,%al
call   1060 <retunion@plt>
mov    $0x0,%al
call   1050 <retunempty@plt>
lea    0xe6e(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x6,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <retstr@plt>
xor    %eax,%eax
call   1070 <retarr@plt>
xor    %eax,%eax
call   1060 <retunion@plt>
xor    %eax,%eax
call   1050 <retunempty@plt>
lea    0xe7c(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @retstr()
%3 = call i32 (...) @retarr()
%4 = call i32 (...) @retunion()
%5 = call i32 (...) @retunempty()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = call i32 @exit(i32 6)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @retstr()
%2 = tail call i32 (...) @retarr()
%3 = tail call i32 (...) @retunion()
%4 = tail call i32 (...) @retunempty()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 6)
%6 = tail call i32 @exit(i32 6)
unreachable
}
void setup(void) {
  do {
    seatest_assert_int_equal(0, chdir("test-data/sandbox"), __FUNCTION__, 10);
  } while (0);
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <setup+0x9>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <chdir@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xed0(%rip),%rdx
mov    $0xa,%ecx
mov    $0x0,%al
call   1040 <seatest_assert_int_equal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <chdir@plt>
lea    0xedc(%rip),%rdx
xor    %edi,%edi
mov    %eax,%esi
mov    $0xa,%ecx
xor    %eax,%eax
pop    %r8
jmp    1040 <seatest_assert_int_equal@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"test-data/sandbox\00"
@__FUNCTION__.setup = [6 x i8] c"setup\00"
define void @setup() {
br label %1
1: ; preds = %0
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @chdir to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.setup, i64 0, i64 0), i32 10)
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"test-data/sandbox\00"
@__FUNCTION__.setup = [6 x i8] c"setup\00"
define void @setup() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @chdir to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i32, i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_int_equal to i32 (i32, i32, i8*, i32, ...)*)(i32 0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.setup, i64 0, i64 0), i32 10)
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  write(1, "aBcDeFgHiJkLmNoPqRsTuVwXyZ\n", 27);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xed5(%rip),%rsi
mov    $0x1b,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x1b,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"aBcDeFgHiJkLmNoPqRsTuVwXyZ\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 27)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"aBcDeFgHiJkLmNoPqRsTuVwXyZ\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 27)
ret i32 0
}
double TimesTwo(double num) {
  return num * 2;
  for (unsigned i = 0; i < 10; ++i) {
    ++i;
  }
}


x86 assembly (clang, -O0):
<TimesTwo>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimesTwo>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @TimesTwo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 2.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @TimesTwo(double %0) {
%2 = fmul double %0, 2.000000e+00
ret double %2
}
/* Variables and functions */
int INET_ADDRSTRLEN;
int getifaddr(char const *, char *, int, int /*<<< orphan*/ *,
              int /*<<< orphan*/ *);
int get_wan_connection_status(const char *ifname) {
  char addr[INET_ADDRSTRLEN];
  int r;
  r = getifaddr(ifname, addr, INET_ADDRSTRLEN, NULL, NULL);
  return (r < 0) ? (5) : (2);
}


x86 assembly (clang, -O0):
<get_wan_connection_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <getifaddr@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
mov    $0x2,%eax
mov    $0x5,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_wan_connection_status>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rsi
mov    %rdx,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <getifaddr@plt>
shr    $0x1f,%eax
lea    (%rax,%rax,2),%eax
add    $0x2,%eax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
@INET_ADDRSTRLEN = global i32 0
define i32 @get_wan_connection_status(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i32, i32* @INET_ADDRSTRLEN
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = load i8*, i8** %2
%11 = load i32, i32* @INET_ADDRSTRLEN
%12 = call i32 @getifaddr(i8* %10, i8* %9, i32 %11, i32* null, i32* null)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 5, i32 2
%17 = load i8*, i8** %3
ret i32 %16
}

LLVM IR (-O2):
@INET_ADDRSTRLEN = global i32 0
define i32 @get_wan_connection_status(i8* %0) {
%2 = load i32, i32* @INET_ADDRSTRLEN
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @getifaddr(i8* %0, i8* %4, i32 %2, i32* null, i32* null)
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 5, i32 2
ret i32 %7
}