xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, unsigned int *, unsigned int *,
                          unsigned int *, unsigned int *);
unsigned int ipv4_rank(char *ip_str) {
  unsigned int a, b, c, d;
  sscanf(ip_str, "%d.%d.%d.%d", &a, &b, &c, &d);
  return (a << 24) + (b << 16) + (c << 8) + d;
}


x86 assembly (clang, -O0):
<ipv4_rank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1030 <sscanf@plt>
mov    -0xc(%rbp),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
add    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_rank>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
call   1030 <sscanf@plt>
mov    0x14(%rsp),%eax
shl    $0x18,%eax
mov    0x10(%rsp),%ecx
shl    $0x10,%ecx
add    %eax,%ecx
mov    0xc(%rsp),%eax
shl    $0x8,%eax
add    %ecx,%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i32 @ipv4_rank(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %6)
%9 = load i32, i32* %3
%10 = shl i32 %9, 24
%11 = load i32, i32* %4
%12 = shl i32 %11, 16
%13 = add i32 %10, %12
%14 = load i32, i32* %5
%15 = shl i32 %14, 8
%16 = add i32 %13, %15
%17 = load i32, i32* %6
%18 = add i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i32 @ipv4_rank(i8* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%11 = load i32, i32* %2
%12 = shl i32 %11, 24
%13 = load i32, i32* %3
%14 = shl i32 %13, 16
%15 = add i32 %14, %12
%16 = load i32, i32* %4
%17 = shl i32 %16, 8
%18 = add i32 %15, %17
%19 = load i32, i32* %5
%20 = add i32 %18, %19
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_err() {
  printf("Usage: ./tab-to-space n string\n");
  printf("  OR   ./tab-to-space n -f filename\n");
  printf("    where n is the number of spaces to replace each tab with.\n\n");
  printf("Example: ./tab-to-space 2 \"This is a string\t with a tab.\"\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: ./tab-to-space n string\0A\00"
@.str.1 = [37 x i8] c" OR ./tab-to-space n -f filename\0A\00"
@.str.2 = [64 x i8] c" where n is the number of spaces to replace each tab with.\0A\0A\00"
@.str.3 = [59 x i8] c"Example: ./tab-to-space 2 \22This is a string\09 with a tab.\22\0A\00"
define void @print_usage_err() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"Usage: ./tab-to-space n string\00"
@str.4 = [36 x i8] c" OR ./tab-to-space n -f filename\00"
@str.5 = [63 x i8] c" where n is the number of spaces to replace each tab with.\0A\00"
@str.6 = [58 x i8] c"Example: ./tab-to-space 2 \22This is a string\09 with a tab.\22\00"
define void @print_usage_err() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *);
void printxy(int x, int y, char *ch) {
  move(y + 1, x);
  printw(ch);
}


x86 assembly (clang, -O0):
<printxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0x4(%rbp),%esi
call   1040 <move@plt>
mov    -0x10(%rbp),%rdi
call   1030 <printw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printxy>:
push   %rbx
mov    %rdx,%rbx
mov    %edi,%eax
lea    0x1(%rsi),%edi
mov    %eax,%esi
call   1040 <move@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printw@plt>

LLVM IR (-O0):
define void @printxy(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = call i32 @move(i32 %8, i32 %9)
%11 = load i8*, i8** %6
%12 = call i32 @printw(i8* %11)
ret void
}

LLVM IR (-O2):
define void @printxy(i32 %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, 1
%5 = tail call i32 @move(i32 %4, i32 %0)
%6 = tail call i32 @printw(i8* %2)
ret void
}
void free4(void ****p) {
  free(p[0][0][0]);
  free(p[0][0]);
  free(p[0]);
  free(p);
}


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

x86 assembly (clang, -O2):
<free4>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free4(i8**** %0) {
%2 = alloca i8****
store i8**** %0, i8***** %2
%3 = load i8****, i8***** %2
%4 = getelementptr inbounds i8***, i8**** %3, i64 0
%5 = load i8***, i8**** %4
%6 = getelementptr inbounds i8**, i8*** %5, i64 0
%7 = load i8**, i8*** %6
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = load i8****, i8***** %2
%11 = getelementptr inbounds i8***, i8**** %10, i64 0
%12 = load i8***, i8**** %11
%13 = getelementptr inbounds i8**, i8*** %12, i64 0
%14 = load i8**, i8*** %13
%15 = bitcast i8** %14 to i8*
%16 = load i8****, i8***** %2
%17 = getelementptr inbounds i8***, i8**** %16, i64 0
%18 = load i8***, i8**** %17
%19 = bitcast i8*** %18 to i8*
%20 = load i8****, i8***** %2
%21 = bitcast i8**** %20 to i8*
ret void
}

LLVM IR (-O2):
define void @free4(i8**** nocapture %0) {
%2 = load i8***, i8**** %0
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast i8**** %0 to i8***
%6 = load i8**, i8*** %5
%7 = load i8*, i8** %6
tail call void @free(i8* %7)
%8 = bitcast i8**** %0 to i8**
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = bitcast i8**** %0 to i8*
tail call void @free(i8* %10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XSetWindowAttributes;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void DitherEffectPreCreateWindow(void *unused_self, Display *unused_display,
                                 XSetWindowAttributes *unused_dimattrs,
                                 unsigned long *unused_dimmask) {
  (void)unused_self;
  (void)unused_display;
  (void)unused_dimattrs;
  *unused_dimmask = *unused_dimmask;
}


x86 assembly (clang, -O0):
<DitherEffectPreCreateWindow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @DitherEffectPreCreateWindow(i8* nocapture %0, i32* nocapture %1, i32* nocapture %2, i64* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x54() {
  Assert_real((isprint(84)),
              "/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_isprint.c",
              425, ("isprint should be 1 for T"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x54>:
push   %rax
mov    $0x54,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1a9,%edx
pop    %rax
jmp    1040 <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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for T\00"
define void @t_isprint_0x54() {
%1 = call i32 @isprint(i32 84)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for T\00"
define void @t_isprint_0x54() {
%1 = tail call i32 @isprint(i32 84)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int uwsgi_abort_request() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @uwsgi_abort_request() {
ret i32 0
}
/* Variables and functions */
int M_PI;
float kyklos(float factor) { return 2 * M_PI * factor; }


x86 assembly (clang, -O0):
<kyklos>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    0x2ed8(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kyklos>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @kyklos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i32, i32* @M_PI
%4 = mul nsw i32 2, %3
%5 = sitofp i32 %4 to float
%6 = load float, float* %2
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @kyklos(float %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to float
%5 = fmul float %4, %0
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, char *);
float rf() {
  float testfloat = 1.3;
  char string['C'];
  printf("'%f' '%s'", testfloat, string);
  return testfloat;
}


x86 assembly (clang, -O0):
<rf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x50(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rf>:
sub    $0x48,%rsp
lea    0xee9(%rip),%rdi
movss  0xedd(%rip),%xmm0
mov    %rsp,%rsi
call   1030 <printf@plt>
movss  0xecd(%rip),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"'%f' '%s'\00"
define float @rf() {
%1 = alloca float
%2 = alloca [67 x i8]
store float 0x3FF4CCCCC0000000, float* %1
%3 = load float, float* %1
%4 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %3, i8* %4)
%6 = load float, float* %1
ret float %6
}

LLVM IR (-O2):
@.str = [10 x i8] c"'%f' '%s'\00"
define float @rf() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float 0x3FF4CCCCC0000000, i8* %2)
ret float 0x3FF4CCCCC0000000
}
int benchmark_finirun() {
  ;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @benchmark_finirun() {
ret i32 0
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ printf(char *);
void sigint_handler(int signo) {
  if (signo == SIGINT) {
    printf("Catching the SIGINT signal!\n");
    return;
  } else {
    printf("Err: Unrecognized Signal!\n");
    return;
  }
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    113e <sigint_handler+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    114a <sigint_handler+0x3a>
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigint_handler>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
lea    0xefa(%rip),%rax
lea    0xed9(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [29 x i8] c"Catching the SIGINT signal!\0A\00"
@.str.1 = [27 x i8] c"Err: Unrecognized Signal!\0A\00"
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [26 x i8] c"Err: Unrecognized Signal!\00"
@str.2 = [28 x i8] c"Catching the SIGINT signal!\00"
define void @sigint_handler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
%4 = select i1 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NSubTab(char);
void IF_NsubTab(void) { NSubTab((char)0); }


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

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

LLVM IR (-O0):
define void @IF_NsubTab() {
%1 = call i32 @NSubTab(i8 signext 0)
ret void
}

LLVM IR (-O2):
define void @IF_NsubTab() {
%1 = tail call i32 @NSubTab(i8 signext 0)
ret void
}
void baz(void) {
  void *p = (void *)&p;
  __asm__ __volatile__("" : "=@ccng"(p) : "r"(1));
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
lea    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x1,%eax
setle  %al
movzbl %al,%eax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
lea    -0x8(%rsp),%rax
mov    %rax,-0x8(%rsp)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define void @baz() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* %2, i8** %1
%3 = call i8* asm sideeffect "", "={@ccng},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
store i8* %3, i8** %1
ret void
}

LLVM IR (-O2):
define void @baz() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = bitcast i8** %1 to i8***
store i8** %1, i8*** %3
%4 = call i8* asm sideeffect "", "={@ccng},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
ret void
}
int __ocl_min_int_int(int src1, int src2) {
  return (src1 < src2) ? src1 : src2;
}


x86 assembly (clang, -O0):
<__ocl_min_int_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <__ocl_min_int_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <__ocl_min_int_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_min_int_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @__ocl_min_int_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int process_msyn_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @process_msyn_init() {
ret i32 0
}
void _isdead() {}


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

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

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

LLVM IR (-O2):
define void @_isdead() {
ret void
}
void *tchk_tracesrefchook_copy(void *hook) { return hook; }


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

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

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

LLVM IR (-O2):
define i8* @tchk_tracesrefchook_copy(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ frequence_of_chars();
int main(void) {
  frequence_of_chars();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @frequence_of_chars()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ six();
int main() { six(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @six()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
void psf_put_be16(uint8_t *ptr, int offset, int16_t value) {
  ptr[offset] = value >> 8;
  ptr[offset + 1] = value;
}


x86 assembly (clang, -O0):
<psf_put_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
sar    $0x8,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<psf_put_be16>:
mov    %edx,%eax
sar    $0x8,%eax
movslq %esi,%rcx
mov    %eax,(%rdi,%rcx,4)
mov    %edx,0x4(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @psf_put_be16(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = ashr i32 %7, 8
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 %8, i32* %12
%13 = load i32, i32* %6
%14 = load i32*, i32** %4
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
store i32 %13, i32* %18
ret void
}

LLVM IR (-O2):
define void @psf_put_be16(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 8
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %4, i32* %6
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %2, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int rumRead() {
  int val;
  scanf("%d", &val);
  return val;
}


x86 assembly (clang, -O0):
<rumRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rumRead>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @rumRead() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @rumRead() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
void clear_string(char string[10000]) {
  int i = 0;
  for (i = 0; i < 155; i++) {
    string[i] = 0;
  };
}


x86 assembly (clang, -O0):
<clear_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9b,-0xc(%rbp)
jge    113d <clear_string+0x3d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <clear_string+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_string>:
xorps  %xmm0,%xmm0
movups %xmm0,0x8b(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @clear_string(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
long double __q_cosd(long double *);
long double intr_wrap_035(long double p1) { return __q_cosd(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_035>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <__q_cosd@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_035>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
mov    %rsp,%rdi
call   1030 <__q_cosd@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @intr_wrap_035(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_cosd(x86_fp80* %2)
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @intr_wrap_035(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 @__q_cosd(x86_fp80* %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int /*<<< orphan*/ f2();
int main() {
  f1();
  f2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f1@plt>
mov    $0x0,%al
call   1030 <f2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f1()
%3 = call i32 (...) @f2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 (...) @f2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G161_f(char *s) {
  debug("G161_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G161_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G161_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"G161_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G161_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"G161_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G161_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef size_t uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mqtt_sn_log_warn(char *, int, int);
size_t write(int, void const *, size_t);
void serial_write_packet(int fd, const void *packet) {
  size_t sent, len = ((uint8_t *)packet)[0];
  sent = write(fd, packet, len);
  if (sent != len) {
    mqtt_sn_log_warn("Warning: only sent %d of %d bytes", (int)sent, (int)len);
  }
}


x86 assembly (clang, -O0):
<serial_write_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1174 <serial_write_packet+0x54>
mov    -0x18(%rbp),%rax
mov    %eax,%esi
mov    -0x20(%rbp),%rax
mov    %eax,%edx
lea    0xe91(%rip),%rdi
call   1040 <mqtt_sn_log_warn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write_packet>:
push   %rbx
mov    (%rsi),%rbx
mov    %rbx,%rdx
call   1030 <write@plt>
cmp    %rbx,%rax
jne    1133 <serial_write_packet+0x13>
pop    %rbx
ret
lea    0xec6(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <mqtt_sn_log_warn@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Warning: only sent %d of %d bytes\00"
define void @serial_write_packet(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i64*
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
store i64 %10, i64* %6
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i64 @write(i32 %11, i8* %12, i64 %13)
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = icmp ne i64 %15, %16
br i1 %17, label %18, label %24
18: ; preds = %2
%19 = load i64, i64* %5
%20 = trunc i64 %19 to i32
%21 = load i64, i64* %6
%22 = trunc i64 %21 to i32
%23 = call i32 @mqtt_sn_log_warn(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %22)
br label %24
24: ; preds = %18, %2
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Warning: only sent %d of %d bytes\00"
define void @serial_write_packet(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i64*
%4 = load i64, i64* %3
%5 = tail call i64 @write(i32 %0, i8* %1, i64 %4)
%6 = icmp eq i64 %5, %4
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = trunc i64 %5 to i32
%9 = trunc i64 %4 to i32
%10 = tail call i32 @mqtt_sn_log_warn(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7, %2
ret void
}
/* Variables and functions */
int BIO_dgram_non_fatal_error(int);
int get_last_socket_error();
int BIO_dgram_should_retry(int i) {
  int err;
  if ((i == 0) || (i == -1)) {
    err = get_last_socket_error();
    return (BIO_dgram_non_fatal_error(err));
  }
  return (0);
}


x86 assembly (clang, -O0):
<BIO_dgram_should_retry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113f <BIO_dgram_should_retry+0x1f>
cmpl   $0xffffffff,-0x8(%rbp)
jne    1159 <BIO_dgram_should_retry+0x39>
mov    $0x0,%al
call   1040 <get_last_socket_error@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <BIO_dgram_non_fatal_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <BIO_dgram_should_retry+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_dgram_should_retry>:
add    $0x1,%edi
cmp    $0x1,%edi
ja     1138 <BIO_dgram_should_retry+0x18>
push   %rax
xor    %eax,%eax
call   1040 <get_last_socket_error@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <BIO_dgram_non_fatal_error@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @BIO_dgram_should_retry(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %7, %1
%11 = call i32 (...) @get_last_socket_error()
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @BIO_dgram_non_fatal_error(i32 %12)
store i32 %13, i32* %2
br label %15
14: ; preds = %7
store i32 0, i32* %2
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @BIO_dgram_should_retry(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (...) @get_last_socket_error()
%6 = tail call i32 @BIO_dgram_non_fatal_error(i32 %5)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
int gator_event_sampling_start(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gator_event_sampling_start() {
ret i32 0
}
long double test_logbl(long double x) { return __builtin_logbl(x); }


x86 assembly (clang, -O0):
<test_logbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logbl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_logbl>:
jmp    1030 <logbl@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 @logbl(x86_fp80 %0)
ret x86_fp80 %2
}
void test_ip_multicast_vif(int sock, const char *socktypename) {}


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

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

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

LLVM IR (-O2):
define void @test_ip_multicast_vif(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void *function(void *ptr) { printf("%s\n", (char *)ptr); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define noalias i8* @function(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sample_format_is_be() {
  printf("NOT IMPLEMENTED:"
         "pa_sample_format_is_be"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"NOT IMPLEMENTED:pa_sample_format_is_be\0A\00"
define i32 @pa_sample_format_is_be() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_sample_format_is_be\00"
define i32 @pa_sample_format_is_be() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
int write(int, char *, int /*<<< orphan*/);
int my_putstr(char *str) { return (write(1, str, my_strlen(str))); }


x86 assembly (clang, -O0):
<my_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <write@plt>

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

LLVM IR (-O2):
define i32 @my_putstr(i8* %0) {
%2 = tail call i32 @my_strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void inc_m32(void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0xFF);
  put8(0x05);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<inc_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xff,%edi
call   1030 <put8@plt>
mov    $0x5,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inc_m32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xff,%edi
call   1030 <put8@plt>
mov    $0x5,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @inc_m32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = call i32 @put8(i32 255)
%7 = call i32 @put8(i32 5)
%8 = load i64*, i64** %3
%9 = ptrtoint i64* %8 to i64
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @inc_m32(i8* %0) {
%2 = tail call i32 @put8(i32 255)
%3 = tail call i32 @put8(i32 5)
%4 = ptrtoint i8* %0 to i64
%5 = tail call i32 @put32(i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigsuspend(int /*<<< orphan*/ *);
int pause() {
  sigset_t set;
  sigemptyset(&set);
  sigsuspend(&set);
  return 0;
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <sigemptyset@plt>
lea    -0x4(%rbp),%rdi
call   1040 <sigsuspend@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sigemptyset@plt>
mov    %rbx,%rdi
call   1040 <sigsuspend@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @pause() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = call i32 @sigsuspend(i32* %1)
ret i32 0
}

LLVM IR (-O2):
define i32 @pause() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = call i32 @sigsuspend(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void deleteBranch(const char *branchName) {
  printf("git branch -d %s\n", branchName);
  printf("git push origin --delete %s\n", branchName);
}


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

x86 assembly (clang, -O2):
<deleteBranch>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"git branch -d %s\0A\00"
@.str.1 = [29 x i8] c"git push origin --delete %s\0A\00"
define void @deleteBranch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"git branch -d %s\0A\00"
@.str.1 = [29 x i8] c"git push origin --delete %s\0A\00"
define void @deleteBranch(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > y) {
    x = x - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114d <main+0x3d>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
scalar_t__ random();
float ranf(void) { return (float)random() / (float)(~0UL); }


x86 assembly (clang, -O0):
<ranf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <random@plt>
cvtsi2ss %rax,%xmm0
movss  0xed8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ranf>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cvtsi2ss %rax,%xmm0
mulss  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @ranf() {
%1 = call i64 (...) @random()
%2 = sitofp i64 %1 to float
%3 = fdiv float %2, 0x43F0000000000000
ret float %3
}

LLVM IR (-O2):
define float @ranf() {
%1 = tail call i64 (...) @random()
%2 = sitofp i64 %1 to float
%3 = fmul float %2, 0x3BF0000000000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
unsigned char getchar();
int /*<<< orphan*/ printf(char *);
void ask_permission() {
  unsigned char answer;
  printf("\nDo you wish to enable monitor mode for your interface at this "
         "time? [y|n] ");
  answer = getchar();
  if (answer != 'y') {
    printf(
        "\nerror: AirTraf exiting... can't run while not in monitor mode.\n");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<ask_permission>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x79,%eax
je     1171 <ask_permission+0x41>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask_permission>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x79,%al
jne    115a <ask_permission+0x1a>
pop    %rax
ret
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [76 x i8] c"\0ADo you wish to enable monitor mode for your interface at this time? [y|n] \00"
@.str.1 = [65 x i8] c"\0Aerror: AirTraf exiting... can't run while not in monitor mode.\0A\00"
define void @ask_permission() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = call zeroext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = icmp ne i32 %5, 121
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"\0ADo you wish to enable monitor mode for your interface at this time? [y|n] \00"
@str = [64 x i8] c"\0Aerror: AirTraf exiting... can't run while not in monitor mode.\00"
define void @ask_permission() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%2 = tail call zeroext i8 (...) @getchar()
%3 = icmp eq i8 %2, 121
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int sclose(int fd) {
  if (3 > fd)
    return 1;
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<sclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x3,%eax
cmp    -0x8(%rbp),%eax
jle    1135 <sclose+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1144 <sclose+0x34>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sclose>:
mov    $0x1,%eax
cmp    $0x3,%edi
jl     1126 <sclose+0x16>
push   %rax
call   1030 <close@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @sclose(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}