xunge/DecIR huggingface dataset:
int dv(int x, int y) {
  if (x == 0)
    return 0;
  return ((x - y + (255)) % (255)) + 1;
}


x86 assembly (clang, -O0):
<dv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <dv+0x20>
movl   $0x0,-0x4(%rbp)
jmp    1139 <dv+0x39>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0xff,%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dv>:
test   %edi,%edi
je     113a <dv+0x3a>
sub    %esi,%edi
mov    %edi,%eax
add    $0xff,%eax
cltq
imul   $0xffffffff80808081,%rax,%rax
shr    $0x20,%rax
add    %edi,%eax
add    $0xff,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x7,%eax
add    %ecx,%eax
mov    %eax,%ecx
shl    $0x8,%ecx
sub    %ecx,%eax
add    %edi,%eax
add    $0x100,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %16
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
%13 = add nsw i32 %12, 255
%14 = srem i32 %13, 255
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @dv(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = add i32 %0, 255
%6 = sub i32 %5, %1
%7 = srem i32 %6, 255
%8 = add nsw i32 %7, 1
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ FIRCalcBlackmanWindow(int, double *, double);
void FIRCalcExactBlackmanWindow(int length, double *window) {
  FIRCalcBlackmanWindow(length, window, 0.16);
}


x86 assembly (clang, -O0):
<FIRCalcExactBlackmanWindow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movsd  0xed2(%rip),%xmm0
call   1030 <FIRCalcBlackmanWindow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIRCalcExactBlackmanWindow>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <FIRCalcBlackmanWindow@plt>

LLVM IR (-O0):
define void @FIRCalcExactBlackmanWindow(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call i32 @FIRCalcBlackmanWindow(i32 %5, double* %6, double 1.600000e-01)
ret void
}

LLVM IR (-O2):
define void @FIRCalcExactBlackmanWindow(i32 %0, double* %1) {
%3 = tail call i32 @FIRCalcBlackmanWindow(i32 %0, double* %1, double 1.600000e-01)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: ffs volume blocs inoeuds\n"); }


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"usage: ffs volume blocs inoeuds\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DestroyDisplayedBrowse();
int /*<<< orphan*/ GetTopSpecNode(int);
int /*<<< orphan*/ Popup_Info(char *);
int /*<<< orphan*/ card_gset1(int *);
int /*<<< orphan*/ inc_htx_curr_obj();
int /*<<< orphan*/ load_gset1_top_spec_nodes();
void htx_spec_but_CB() {
  int nn;
  load_gset1_top_spec_nodes();
  card_gset1(&nn);
  if (!nn) {
    Popup_Info("No specifications to display   ");
  } else {
    DestroyDisplayedBrowse();
    inc_htx_curr_obj();
    GetTopSpecNode(nn);
  }
}


x86 assembly (clang, -O0):
<htx_spec_but_CB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <load_gset1_top_spec_nodes@plt>
lea    -0x4(%rbp),%rdi
call   1070 <card_gset1@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1193 <htx_spec_but_CB+0x33>
lea    0xe77(%rip),%rdi
call   1050 <Popup_Info@plt>
jmp    11a9 <htx_spec_but_CB+0x49>
mov    $0x0,%al
call   1080 <DestroyDisplayedBrowse@plt>
mov    $0x0,%al
call   1030 <inc_htx_curr_obj@plt>
mov    -0x4(%rbp),%edi
call   1040 <GetTopSpecNode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htx_spec_but_CB>:
push   %rax
xor    %eax,%eax
call   1060 <load_gset1_top_spec_nodes@plt>
lea    0x4(%rsp),%rdi
call   1070 <card_gset1@plt>
cmpl   $0x0,0x4(%rsp)
je     1192 <htx_spec_but_CB+0x32>
xor    %eax,%eax
call   1080 <DestroyDisplayedBrowse@plt>
xor    %eax,%eax
call   1030 <inc_htx_curr_obj@plt>
mov    0x4(%rsp),%edi
call   1040 <GetTopSpecNode@plt>
pop    %rax
ret
lea    0xe67(%rip),%rdi
call   1050 <Popup_Info@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [32 x i8] c"No specifications to display \00"
define void @htx_spec_but_CB() {
%1 = alloca i32
%2 = call i32 (...) @load_gset1_top_spec_nodes()
%3 = call i32 @card_gset1(i32* %1)
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @Popup_Info(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %13
8: ; preds = %0
%9 = call i32 (...) @DestroyDisplayedBrowse()
%10 = call i32 (...) @inc_htx_curr_obj()
%11 = load i32, i32* %1
%12 = call i32 @GetTopSpecNode(i32 %11)
br label %13
13: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"No specifications to display \00"
define void @htx_spec_but_CB() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @load_gset1_top_spec_nodes()
%4 = call i32 @card_gset1(i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @Popup_Info(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %14
9: ; preds = %0
%10 = call i32 (...) @DestroyDisplayedBrowse()
%11 = call i32 (...) @inc_htx_curr_obj()
%12 = load i32, i32* %1
%13 = call i32 @GetTopSpecNode(i32 %12)
br label %14
14: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sqlite3Fts3GetVarint32(char *, int *);
void fts3GetDeltaPosition(char **pp, int *piPos) {
  int iVal;
  *pp += sqlite3Fts3GetVarint32(*pp, &iVal);
  *piPos += (iVal - 2);
}


x86 assembly (clang, -O0):
<fts3GetDeltaPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <sqlite3Fts3GetVarint32@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts3GetDeltaPosition>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0x4(%rsp),%rsi
call   1030 <sqlite3Fts3GetVarint32@plt>
cltq
add    %rax,(%rbx)
mov    0x4(%rsp),%eax
mov    (%r14),%ecx
add    %ecx,%eax
add    $0xfffffffe,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @fts3GetDeltaPosition(i8** nocapture %0, i32* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i8*, i8** %0
%6 = call i32 @sqlite3Fts3GetVarint32(i8* %5, i32* %3)
%7 = load i8*, i8** %0
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %0
%10 = load i32, i32* %3
%11 = add nsw i32 %10, -2
%12 = load i32, i32* %1
%13 = add nsw i32 %11, %12
store i32 %13, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void clearScreen(int delay) {
  sleep(delay);
  int i;
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sleep@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    115e <clearScreen+0x3e>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <clearScreen+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearScreen>:
push   %rbx
call   1040 <sleep@plt>
mov    $0x32,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <clearScreen+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @clearScreen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sleep(i32 %4)
store i32 0, i32* %3
br label %6
6: ; preds = %11, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 50
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %6
14: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @clearScreen(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @putchar(i32 10)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 50
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, ...);
void Jump_If_Greater(char *label) {
  Inst_Printf("bg", "%s", label);
  Inst_Printf("nop", "");
}


x86 assembly (clang, -O0):
<Jump_If_Greater>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    0xeca(%rip),%rdi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump_If_Greater>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
lea    0xed6(%rip),%rdi
lea    0xecb(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"bg\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"nop\00"
@.str.3 = [1 x i8] zeroinitializer
define void @Jump_If_Greater(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"bg\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"nop\00"
@.str.3 = [1 x i8] zeroinitializer
define void @Jump_If_Greater(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ I2CSlaveBaseValid(unsigned long);
void I2CSlaveDataPut(unsigned long ulBase, unsigned char ucData) {
  DEBUG_ASSERT(I2CSlaveBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x00000008))) = ucData;
}


x86 assembly (clang, -O0):
<I2CSlaveDataPut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <I2CSlaveBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
movzbl -0x9(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveDataPut>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <I2CSlaveBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    %ebp,%eax
mov    %rax,0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @I2CSlaveDataPut(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
%6 = call i32 @I2CSlaveBaseValid(i64 %5)
%7 = call i32 @DEBUG_ASSERT(i32 %6)
%8 = load i8, i8* %4
%9 = zext i8 %8 to i64
%10 = load i64, i64* %3
%11 = add i64 %10, 8
%12 = inttoptr i64 %11 to i64*
store volatile i64 %9, i64* %12
ret void
}

LLVM IR (-O2):
define void @I2CSlaveDataPut(i64 %0, i8 zeroext %1) {
%3 = tail call i32 @I2CSlaveBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = zext i8 %1 to i64
%6 = add i64 %0, 8
%7 = inttoptr i64 %6 to i64*
store volatile i64 %5, i64* %7
ret void
}
int josephus(int no, int h) {
  if (no == 1)
    return 1;
  else
    return (josephus(no - 1, h) + h - 1) % no + 1;
}


x86 assembly (clang, -O0):
<josephus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1134 <josephus+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1152 <josephus+0x42>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <josephus@plt>
add    -0xc(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<josephus>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1140 <josephus+0x30>
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <josephus@plt>
add    %r14d,%eax
add    $0xffffffff,%eax
cltd
idiv   %ebx
mov    %edx,%eax
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @josephus(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %12, %6 ], [ 1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add nsw i32 %0, -1
%8 = tail call i32 @josephus(i32 %7, i32 %1)
%9 = add i32 %1, -1
%10 = add i32 %9, %8
%11 = srem i32 %10, %0
%12 = add nsw i32 %11, 1
br label %4
}
int f() {
  int biv, giv;
  for (biv = 0, giv = 0; giv != 8; biv++)
    giv = biv * 8;
  return giv;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
je     1133 <f+0x33>
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 8
}
/* Type definitions */
typedef int /*<<< orphan*/ XArc;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XArc(void) {
  XArc *_p = (XArc *)malloc(sizeof(XArc));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XArc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XArc+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XArc>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XArc+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XArc() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XArc() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ flip_bit(int, int);
int /*<<< orphan*/ sleep(int);
void task2() {
  while (1) {
    flip_bit(0x40000000 + 0x08000000 + 0x00400, 5);
    sleep(2);
    flip_bit(0x40000000 + 0x08000000 + 0x00400, 5);
    sleep(88);
  }
}


x86 assembly (clang, -O0):
<task2>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <task2+0x9>
mov    $0x48000400,%edi
mov    $0x5,%esi
call   1030 <flip_bit@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    $0x48000400,%edi
mov    $0x5,%esi
call   1030 <flip_bit@plt>
mov    $0x58,%edi
call   1040 <sleep@plt>
jmp    1129 <task2+0x9>

x86 assembly (clang, -O2):
<task2>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x48000400,%edi
mov    $0x5,%esi
call   1030 <flip_bit@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    $0x48000400,%edi
mov    $0x5,%esi
call   1030 <flip_bit@plt>
mov    $0x58,%edi
call   1040 <sleep@plt>
jmp    1130 <task2+0x10>

LLVM IR (-O0):
define void @task2() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @flip_bit(i32 1207960576, i32 5)
%3 = call i32 @sleep(i32 2)
%4 = call i32 @flip_bit(i32 1207960576, i32 5)
%5 = call i32 @sleep(i32 88)
br label %1
}

LLVM IR (-O2):
define void @task2() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @flip_bit(i32 1207960576, i32 5)
%3 = tail call i32 @sleep(i32 2)
%4 = tail call i32 @flip_bit(i32 1207960576, i32 5)
%5 = tail call i32 @sleep(i32 88)
br label %1
}
void foo(double *a) {
  *a = *a + 3.14;
  return;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
addsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movsd  (%rdi),%xmm0
addsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @foo(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fadd double %4, 3.140000e+00
%6 = load double*, double** %2
store double %5, double* %6
ret void
}

LLVM IR (-O2):
define void @foo(double* nocapture %0) {
%2 = load double, double* %0
%3 = fadd double %2, 3.140000e+00
store double %3, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void cmp_preg64preg64_imm8(int reg1, int reg2, unsigned char imm8) {
  put8(0x80);
  put8(0x3C);
  put8((reg1 << 3) | reg2);
  put8(imm8);
}


x86 assembly (clang, -O0):
<cmp_preg64preg64_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0x80,%edi
call   1030 <put8@plt>
mov    $0x3c,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
or     -0x8(%rbp),%eax
movzbl %al,%edi
call   1030 <put8@plt>
movzbl -0x9(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_preg64preg64_imm8>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x80,%edi
call   1030 <put8@plt>
mov    $0x3c,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
movzbl %bl,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @cmp_preg64preg64_imm8(i32 %0, i32 %1, i8 zeroext %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 = call i32 @put8(i8 zeroext -128)
%8 = call i32 @put8(i8 zeroext 60)
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = load i32, i32* %5
%12 = or i32 %10, %11
%13 = trunc i32 %12 to i8
%14 = call i32 @put8(i8 zeroext %13)
%15 = load i8, i8* %6
%16 = call i32 @put8(i8 zeroext %15)
ret void
}

LLVM IR (-O2):
define void @cmp_preg64preg64_imm8(i32 %0, i32 %1, i8 zeroext %2) {
%4 = tail call i32 @put8(i8 zeroext -128)
%5 = tail call i32 @put8(i8 zeroext 60)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = trunc i32 %7 to i8
%9 = tail call i32 @put8(i8 zeroext %8)
%10 = tail call i32 @put8(i8 zeroext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dirfirst(char *);
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushStringCopy(int /*<<< orphan*/);
void basDirFirst() {
  char *path;
  path = popString();
  pushStringCopy(dirfirst(path));
  eFree(path);
}


x86 assembly (clang, -O0):
<basDirFirst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <dirfirst@plt>
mov    %eax,%edi
call   1060 <pushStringCopy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <eFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basDirFirst>:
push   %rbx
xor    %eax,%eax
call   1050 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <dirfirst@plt>
mov    %eax,%edi
call   1060 <pushStringCopy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <eFree@plt>

LLVM IR (-O0):
define void @basDirFirst() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @dirfirst(i8* %3)
%5 = call i32 @pushStringCopy(i32 %4)
%6 = load i8*, i8** %1
%7 = call i32 @eFree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @basDirFirst() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @dirfirst(i8* %1)
%3 = tail call i32 @pushStringCopy(i32 %2)
%4 = tail call i32 @eFree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sign(char *, int /*<<< orphan*/, unsigned int *, int);
int /*<<< orphan*/ strlen(char *);
int test_simple_sign() {
  unsigned int result[16];
  char *my_data = "hello world!";
  printf("\n* Testing simple signing of data:\n");
  sign(my_data, strlen(my_data), result, 16);
  return 0;
}


x86 assembly (clang, -O0):
<test_simple_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%esi
lea    -0x40(%rbp),%rdx
mov    $0x10,%ecx
call   1050 <sign@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_simple_sign>:
push   %rbx
sub    $0x40,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x10,%ecx
call   1050 <sign@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
@.str.1 = [36 x i8] c"\0A* Testing simple signing of data:\0A\00"
define i32 @test_simple_sign() {
%1 = alloca [16 x i32]
%2 = alloca i8*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%8 = call i32 @sign(i8* %4, i32 %6, i32* %7, i32 16)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
@str = [35 x i8] c"\0A* Testing simple signing of data:\00"
define i32 @test_simple_sign() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @strlen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%6 = call i32 @sign(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4, i32* %5, i32 16)
ret i32 0
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IFSOCK;
scalar_t__ stat(char *, struct stat *);
int _is_file_socket(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0)
    return 0;
  return (st.st_mode & S_IFSOCK) ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <_is_file_socket+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115b <_is_file_socket+0x4b>
mov    -0x18(%rbp),%edx
mov    0x2e97(%rip),%rax
and    (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_file_socket>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1125 <_is_file_socket+0x15>
pop    %rcx
ret
mov    0x2eb4(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
test   %ecx,(%rsp)
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFSOCK = global i32 0
define i32 @_is_file_socket(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %17
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = load i32, i32* @S_IFSOCK
%13 = and i32 %11, %12
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
store i32 %16, i32* %2
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFSOCK = global i32 0
define i32 @_is_file_socket(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = load i32, i32* @S_IFSOCK
%10 = and i32 %9, %8
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %1, %6
%14 = phi i32 [ %12, %6 ], [ 0, %1 ]
ret i32 %14
}
int isRelop(char c) { return '=' == c || '#' == c || '<' == c || '>' == c; }


x86 assembly (clang, -O0):
<isRelop>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x3d,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <isRelop+0x5d>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x23,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <isRelop+0x5d>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x3c,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <isRelop+0x5d>
movsbl -0x1(%rbp),%ecx
mov    $0x3e,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isRelop>:
cmp    $0x3d,%dil
ja     1120 <isRelop+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x3000000800000000,%rdx
bt     %rcx,%rdx
jae    1120 <isRelop+0x20>
ret
xor    %eax,%eax
cmp    $0x3e,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isRelop(i8 signext %0) {
switch i8 %0, label %2 [
i8 61, label %5
i8 60, label %5
i8 35, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 62
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_standard_Laurent_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(777, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_standard_Laurent_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x309,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_standard_Laurent_container_to_start_system>:
mov    $0x309,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_standard_Laurent_container_to_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 777, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_standard_Laurent_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 777, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
char *difference(char *src1, char *src2) {
  char *i = "not yet implemented";
  return i;
}


x86 assembly (clang, -O0):
<difference>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeed(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<difference>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"not yet implemented\00"
define i8* @difference(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@.str = [20 x i8] c"not yet implemented\00"
define i8* @difference(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0)
}
float obdConvert_14_1B(unsigned int A, unsigned int B, unsigned int C,
                       unsigned int D) {
  return (float)A * 0.005f;
}


x86 assembly (clang, -O0):
<obdConvert_14_1B>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee0(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_14_1B>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mulss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_14_1B(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = fmul float %10, 0x3F747AE140000000
ret float %11
}

LLVM IR (-O2):
define float @obdConvert_14_1B(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = fmul float %5, 0x3F747AE140000000
ret float %6
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
int line_iswarning(char *line) {
  int rc = (strncmp(line, "*** WARNING[", 12) == 0);
  return rc;
}


x86 assembly (clang, -O0):
<line_iswarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xc,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"*** WARNING[\00"
define i32 @line_iswarning(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"*** WARNING[\00"
define i32 @line_iswarning(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ put_bit(int);
void put_bit_string(unsigned x, int count) {
  while (count) {
    put_bit((x & 0x8000) != 0);
    x <<= 1;
    count--;
  }
}


x86 assembly (clang, -O0):
<put_bit_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <put_bit_string+0x47>
mov    -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <put_bit@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    111e <put_bit_string+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_bit_string>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
je     1134 <put_bit_string+0x24>
mov    %esi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
shr    $0xf,%edi
and    $0x1,%edi
call   1030 <put_bit@plt>
add    %ebp,%ebp
add    $0xffffffff,%ebx
jne    1120 <put_bit_string+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @put_bit_string(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %3
%10 = and i32 %9, 32768
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @put_bit(i32 %12)
%14 = load i32, i32* %3
%15 = shl i32 %14, 1
store i32 %15, i32* %3
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @put_bit_string(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i32 [ %10, %4 ], [ %0, %2 ]
%7 = lshr i32 %6, 15
%8 = and i32 %7, 1
%9 = tail call i32 @put_bit(i32 %8)
%10 = shl i32 %6, 1
%11 = add nsw i32 %5, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glFogfv(int /*<<< orphan*/, int /*<<< orphan*/ *);
void Fogfv(GLenum pname, GLfloat *params) { glFogfv(pname, params); }


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

x86 assembly (clang, -O2):
<Fogfv>:
jmp    1030 <glFogfv@plt>

LLVM IR (-O0):
define void @Fogfv(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 = call i32 @glFogfv(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @Fogfv(i32 %0, i32* %1) {
%3 = tail call i32 @glFogfv(i32 %0, i32* %1)
ret void
}
int undistorted(distorted_species_number)
int distorted_species_number;
{
  int i, species_number;
  for (i = 0; i < 100; i++) {
    species_number = i + 1;
    if (distorted(species_number) == distorted_species_number)
      return species_number;
  }
  return 0;
}


x86 assembly (clang, -O0):
<undistorted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1166 <undistorted+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   1030 <distorted@plt>
cmp    -0x8(%rbp),%eax
jne    1153 <undistorted+0x43>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <undistorted+0x5d>
jmp    1158 <undistorted+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <undistorted+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undistorted>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x1,%ebp
xor    %r14d,%r14d
xchg   %ax,%ax
cmp    $0x65,%ebp
je     113b <undistorted+0x2b>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <distorted@plt>
add    $0x1,%ebp
cmp    %ebx,%eax
jne    1120 <undistorted+0x10>
add    $0xffffffff,%ebp
mov    %ebp,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @undistorted(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i32 [ 0, %1 ], [ %6, %5 ]
%4 = icmp eq i32 %3, 100
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = add nuw nsw i32 %3, 1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @distorted to i32 (i32, ...)*)(i32 %6)
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %2
9: ; preds = %2, %5
%10 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %10
}
/* Type definitions */
typedef size_t off_t;

/* Variables and functions */
off_t find_end(char *buf, size_t len) {
  off_t off = 0;
  while (off < len) {
    if (buf[off] == 0)
      break;
    off++;
  }
  return (off);
}


x86 assembly (clang, -O0):
<find_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    114d <find_end+0x4d>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113c <find_end+0x3c>
jmp    114d <find_end+0x4d>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <find_end+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_end>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <find_end+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <find_end+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <find_end+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @find_end(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %9 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ register_con_sil_function_list();
void con_sil_init() { register_con_sil_function_list(); }


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

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

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

LLVM IR (-O2):
define void @con_sil_init() {
%1 = tail call i32 (...) @register_con_sil_function_list()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
int access(char *, int /*<<< orphan*/);
int Ftestdir(char *dirname) { return (access(dirname, X_OK)); }


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

x86 assembly (clang, -O2):
<Ftestdir>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <access@plt>

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @Ftestdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @X_OK
%5 = call i32 @access(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @Ftestdir(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
ret i32 %3
}
extern long shmem_long_fadd(long *target, long value, int pe) {
  return *target;
}


x86 assembly (clang, -O0):
<shmem_long_fadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @shmem_long_fadd(i64* nocapture %0, i64 %1, i32 %2) {
%4 = load i64, i64* %0
ret i64 %4
}
int logicalShift(int x, int n) {
  return ((x >> n) & ~(((0x00000001 << 31) >> n) << 1));
}


x86 assembly (clang, -O0):
<logicalShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x8(%rbp),%ecx
mov    $0x80000000,%edx
sar    %cl,%edx
mov    %edx,%ecx
shl    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logicalShift>:
mov    %esi,%ecx
sar    %cl,%edi
mov    $0x80000000,%eax
sar    %cl,%eax
add    %eax,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @logicalShift(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 = ashr i32 %5, %6
%8 = load i32, i32* %4
%9 = ashr i32 -2147483648, %8
%10 = shl i32 %9, 1
%11 = xor i32 %10, -1
%12 = and i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @logicalShift(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = ashr i32 -2147483648, %1
%5 = shl i32 %4, 1
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rnd_128_rotl(const uint64_t x, int k) {
  return (x << k) | (x >> (64 - k));
}


x86 assembly (clang, -O0):
<rnd_128_rotl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_128_rotl>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rnd_128_rotl(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 64, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rnd_128_rotl(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 64, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}