xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ MacMsg(char *, char *, int /*<<< orphan*/);
void WarnMsgUnsupportedROM(void) {
  MacMsg("Unsupported ROM",
         "The ROM image file ;[^r;{ loaded successfully, but I don;}t support "
         "this ROM version.",
         0);
}


x86 assembly (clang, -O0):
<WarnMsgUnsupportedROM>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %edx,%edx
call   1030 <MacMsg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WarnMsgUnsupportedROM>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
xor    %edx,%edx
jmp    1030 <MacMsg@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Unsupported ROM\00"
@.str.1 = [86 x i8] c"The ROM image file ;[^r;{ loaded successfully, but I don;}t support this ROM version.\00"
define void @WarnMsgUnsupportedROM() {
%1 = call i32 @MacMsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Unsupported ROM\00"
@.str.1 = [86 x i8] c"The ROM image file ;[^r;{ loaded successfully, but I don;}t support this ROM version.\00"
define void @WarnMsgUnsupportedROM() {
%1 = tail call i32 @MacMsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
void av_opt_serialize() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_serialize() {
ret void
}
void lj_mcode_sync(void *start, void *end) {
  ((void)(start));
  ((void)(end));
}


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

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

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

LLVM IR (-O2):
define void @lj_mcode_sync(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int read(int, void *, int);
int I2C_read(int i2c_fd, void *rx_buffer, int n_bytes) {
  int ret;
  ret = read(i2c_fd, rx_buffer, n_bytes);
  if (ret < 0)
    return ret;
  return 0;
}


x86 assembly (clang, -O0):
<I2C_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1149 <I2C_read+0x39>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <I2C_read+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2C_read>:
push   %rax
call   1030 <read@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @I2C_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i32 @read(i32 %9, i8* %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i32, i32* %8
store i32 %16, i32* %4
br label %18
17: ; preds = %3
store i32 0, i32* %4
br label %18
18: ; preds = %17, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @I2C_read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = icmp slt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t begin, end;
  long i;
  char c[1000000000];
  while (1) {
    begin = time(NULL);
    for (i = 0; i < 100000; i++)
      ;
    end = time(NULL);
    sleep(difftime(end, begin));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3b9aca20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x186a0,-0x18(%rbp)
jge    117a <main+0x4a>
jmp    1169 <main+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <main+0x26>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <difftime@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
jmp    1142 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <difftime@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = alloca [1000000000 x i8]
store i32 0, i32* %1
br label %6
6: ; preds = %0, %15
%7 = call i32 @time(i32* null)
store i32 %7, i32* %2
store i64 0, i64* %4
br label %8
8: ; preds = %12, %6
%9 = load i64, i64* %4
%10 = icmp slt i64 %9, 100000
br i1 %10, label %11, label %15
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load i64, i64* %4
%14 = add nsw i64 %13, 1
store i64 %14, i64* %4
br label %8
15: ; preds = %8
%16 = call i32 @time(i32* null)
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = call i32 @difftime(i32 %17, i32 %18)
%20 = call i32 @sleep(i32 %19)
br label %6
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @difftime(i32 %3, i32 %2)
%5 = tail call i32 @sleep(i32 %4)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ makeResultName(char *, char *, char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ writeGulp(char *, char *, int /*<<< orphan*/);
void writeAutoUpgradeTableResult(char *tableName, char *columnName,
                                 char *result) {
  char path[512];
  makeResultName(tableName, columnName, path);
  writeGulp(path, result, strlen(result));
}


x86 assembly (clang, -O0):
<writeAutoUpgradeTableResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x220(%rbp),%rdx
call   1040 <makeResultName@plt>
lea    -0x220(%rbp),%rax
mov    %rax,-0x230(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x228(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x230(%rbp),%rdi
mov    -0x228(%rbp),%rsi
mov    %eax,%edx
call   1050 <writeGulp@plt>
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeAutoUpgradeTableResult>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %rdx,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1040 <makeResultName@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <writeGulp@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @writeAutoUpgradeTableResult(i8* %0, i8* %1, i8* %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @makeResultName(i8* %0, i8* %1, i8* %5)
%7 = call i32 @strlen(i8* %2)
%8 = call i32 @writeGulp(i8* %5, i8* %2, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ es1(int *, int);
int main() {
  int array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  es1(array, sizeof(array) / sizeof(array[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <es1@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <es1@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es1(i32* %3, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @es1(i32* %3, i32 10)
ret i32 0
}
/* Variables and functions */
double sin(double);
double SineEaseIn(double p) {
  return sin((p - 1) * 3.14159265358979323846264338327 / 2) + 1;
}


x86 assembly (clang, -O0):
<SineEaseIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  0xead(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SineEaseIn>:
push   %rax
addsd  0xee7(%rip),%xmm0
mulsd  0xee7(%rip),%xmm0
mulsd  0xee7(%rip),%xmm0
call   1030 <sin@plt>
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @SineEaseIn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
%5 = fmul double %4, 0x400921FB54442D18
%6 = fdiv double %5, 2.000000e+00
%7 = call double @sin(double %6)
%8 = fadd double %7, 1.000000e+00
ret double %8
}

LLVM IR (-O2):
define double @SineEaseIn(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = fmul double %2, 0x400921FB54442D18
%4 = fmul double %3, 5.000000e-01
%5 = tail call double @sin(double %4)
%6 = fadd double %5, 1.000000e+00
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ LCD_CLR_A0();
unsigned char Read1();
unsigned char LCD_X_Read01(void) {
  unsigned char Data;
  ;
  LCD_CLR_A0();
  Data = Read1();
  ;
  return Data;
}


x86 assembly (clang, -O0):
<LCD_X_Read01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <LCD_CLR_A0@plt>
mov    $0x0,%al
call   1040 <Read1@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Read01>:
push   %rax
xor    %eax,%eax
call   1030 <LCD_CLR_A0@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Read1@plt>

LLVM IR (-O0):
define zeroext i8 @LCD_X_Read01() {
%1 = alloca i8
%2 = call i32 (...) @LCD_CLR_A0()
%3 = call zeroext i8 (...) @Read1()
store i8 %3, i8* %1
%4 = load i8, i8* %1
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @LCD_X_Read01() {
%1 = tail call i32 (...) @LCD_CLR_A0()
%2 = tail call zeroext i8 (...) @Read1()
ret i8 %2
}
/* Variables and functions */
int min(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  printf("%d\n", min(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <min@plt>
mov    %eax,%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <min@plt>
lea    0xe99(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @min(i32 %10, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @min(i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
void Timer2_Callback(void const *arg) {}


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

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

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

LLVM IR (-O2):
define void @Timer2_Callback(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 3;
  assert(x - 1 == 2);
  assert(23 - x == 20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x17,%eax
sub    -0x8(%rbp),%eax
cmp    $0x14,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = sub nsw i32 23, %8
%10 = icmp eq i32 %9, 20
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
int XDoesBackingStore() {}


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

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

LLVM IR (-O0):
define i32 @XDoesBackingStore() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XDoesBackingStore() {
ret i32 undef
}
double MinF(double x, double y) {
  if (x < y) {
    return (x);
  } else {
    return (y);
  }
}


x86 assembly (clang, -O0):
<MinF>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <MinF+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <MinF+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MinF>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @MinF(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int test_imm_A5int16_reg(short val) {
  return ((val) & (0xA5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A5int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xa5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A5int16_reg>:
test   $0xa5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A5int16_reg(i16 signext %0) {
%2 = and i16 %0, 165
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printBanner() {
  printf("\n\n\rPROGRAM for detect robot within 55cm\n\n\r");
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"\0A\0A\0DPROGRAM for detect robot within 55cm\0A\0A\0D\00"
define void @printBanner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0A\0A\0DPROGRAM for detect robot within 55cm\0A\0A\0D\00"
define void @printBanner() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}
char *kol_clip_get(int n) {
  asm volatile("int $0x40" ::"a"(54), "b"(1), "c"(n));
}


x86 assembly (clang, -O0):
<kol_clip_get>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x36,%eax
mov    $0x1,%ebx
int    $0x40
mov    -0x10(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_clip_get>:
push   %rbx
mov    %edi,%ecx
mov    $0x36,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @kol_clip_get(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 54, i32 1, i32 %0)
ret i8* undef
}
void users_set_band_no(void) {}


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

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

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

LLVM IR (-O2):
define void @users_set_band_no() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appFree(void *);
void mspack_free(void *ptr) { appFree(ptr); }


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

x86 assembly (clang, -O2):
<mspack_free>:
jmp    1030 <appFree@plt>

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

LLVM IR (-O2):
define void @mspack_free(i8* %0) {
%2 = tail call i32 @appFree(i8* %0)
ret void
}
int mDB_read(fn, recno, dst) {
  return mDBi_msg('r', fn, recno, 0, 0, 0, 0, dst);
}


x86 assembly (clang, -O0):
<mDB_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%eax
mov    $0x72,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <mDBi_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDB_read>:
push   %rax
mov    %edx,%r10d
mov    %esi,%edx
mov    %edi,%esi
mov    $0x72,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   %r10
push   $0x0
call   1030 <mDBi_msg@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mDB_read(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 114, i32 %7, i32 %8, i32 0, i32 0, i32 0, i32 0, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mDB_read(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 114, i32 %0, i32 %1, i32 0, i32 0, i32 0, i32 0, i32 %2)
ret i32 %4
}
void i2sStartPlay(void) {
  *((volatile unsigned int *)((0xB0009000 + 0x24))) = 0x1;
  *((volatile unsigned int *)((0xB0009000 + 0x04))) =
      (*((volatile unsigned int *)((0xB0009000 + 0x04)))) | (1 << 5);
}


x86 assembly (clang, -O0):
<i2sStartPlay>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0009024,%eax
movl   $0x1,(%rax)
mov    $0xb0009004,%eax
mov    (%rax),%ecx
or     $0x20,%ecx
mov    $0xb0009004,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2sStartPlay>:
mov    $0xb0009004,%eax
movl   $0x1,0x20(%rax)
orl    $0x20,(%rax)
ret

LLVM IR (-O0):
define void @i2sStartPlay() {
store volatile i32 1, i32* inttoptr (i64 2952826916 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 2952826884 to i32*)
%2 = or i32 %1, 32
store volatile i32 %2, i32* inttoptr (i64 2952826884 to i32*)
ret void
}

LLVM IR (-O2):
define void @i2sStartPlay() {
store volatile i32 1, i32* inttoptr (i64 2952826916 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 2952826884 to i32*)
%2 = or i32 %1, 32
store volatile i32 %2, i32* inttoptr (i64 2952826884 to i32*)
ret void
}
void fd233(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  a:;
    typedef int(*i)[n];
  p026A:
    goto p026A;
    goto a;
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd233>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd233+0x7>

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

LLVM IR (-O0):
define void @fd233(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; No predecessors!
%37 = load i32, i32* %2
%38 = zext i32 %37 to i64
br label %39
39: ; preds = %39, %36
br label %39
40: ; preds = %40
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd233(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_arr(int arr[], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf(" %d", arr[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_arr+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_arr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_arr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_arr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
define void @print_arr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void _M2_RTco_init(void) {}


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

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

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

LLVM IR (-O2):
define void @_M2_RTco_init() {
ret void
}
char *gamecp_name(int event) {
  static const char *ich2_event_names[] = {
      "ICH2_TDM0",
  };
  enum GAMECP_INTERRUPT_REASONS {
    GAMECP_INTERRUPTS_ENABLE,
    GAMECP_INTERRUPTS_DISABLE,
  };
  const int size[] = {
      GAMECP_INTERRUPTS_ENABLE,
      GAMECP_INTERRUPTS_DISABLE,
  };
  return (char *)ich2_event_names[event / (sizeof(size) / sizeof(size[0]))];
}


x86 assembly (clang, -O0):
<gamecp_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0xefe(%rip),%rax
mov    %rax,-0xc(%rbp)
movslq -0x4(%rbp),%rcx
shr    $0x1,%rcx
lea    0x2eff(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@gamecp_name.ich2_event_names = internal global [1 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0)]
@.str = [10 x i8] c"ICH2_TDM0\00"
@__const.gamecp_name.size = [2 x i32] [i32 0, i32 1]
define i8* @gamecp_name(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i32]
store i32 %0, i32* %2
%4 = bitcast [2 x i32]* %3 to i8*
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = udiv i64 %6, 2
%8 = getelementptr inbounds [1 x i8*], [1 x i8*]* @gamecp_name.ich2_event_names, i64 0, i64 %7
%9 = load i8*, i8** %8
ret i8* %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"ICH2_TDM0\00"
define i8* @gamecp_name(i32 %0) {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int SIGALRM;
int kill(scalar_t__, int);
void test(void) {
  pid_t pid;
  int signal_number;
  int result;
  pid = 0;
  signal_number = SIGALRM;
  result = kill(pid, signal_number);
}


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

x86 assembly (clang, -O2):
<test>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
define void @test() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i32
store i64 0, i64* %1
%4 = load i32, i32* @SIGALRM
store i32 %4, i32* %2
%5 = load i64, i64* %1
%6 = load i32, i32* %2
%7 = call i32 @kill(i64 %5, i32 %6)
store i32 %7, i32* %3
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
define void @test() {
%1 = load i32, i32* @SIGALRM
%2 = tail call i32 @kill(i64 0, i32 %1)
ret void
}
int roi_get_sensor_response_bump_r(char *buff) { return buff[0] & 0x01; }


x86 assembly (clang, -O0):
<roi_get_sensor_response_bump_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_get_sensor_response_bump_r>:
movzbl (%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @roi_get_sensor_response_bump_r(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 = sext i8 %5 to i32
%7 = and i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @roi_get_sensor_response_bump_r(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 1
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  fprintf(stderr, "hello, travis-ci\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"hello, travis-ci\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"hello, travis-ci\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t extract_short(uint8_t *buf) { return *(int16_t *)buf; }


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

x86 assembly (clang, -O2):
<extract_short>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @extract_short(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
void blk_throtl_exit(struct request_queue *q) {}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
define void @blk_throtl_exit(%struct.request_queue* %0) {
%2 = alloca %struct.request_queue*
store %struct.request_queue* %0, %struct.request_queue** %2
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
define void @blk_throtl_exit(%struct.request_queue* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void funcThread(void *argp) {
  printf("bloqueando...\n");
  sleep(20);
  printf("\ndesbloqueado\n");
}


x86 assembly (clang, -O0):
<funcThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <sleep@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcThread>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x14,%edi
call   1040 <sleep@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"bloqueando...\0A\00"
@.str.1 = [15 x i8] c"\0Adesbloqueado\0A\00"
define void @funcThread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 20)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"bloqueando...\00"
@str.2 = [14 x i8] c"\0Adesbloqueado\00"
define void @funcThread(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 20)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_subb_data(char *str, uint8_t data) {
  sprintf(str,
          "SUBB  A, #"
          "0x%02X"
          "                  ",
          data);
}


x86 assembly (clang, -O0):
<sprint_subb_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_subb_data>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"SUBB A,x%02X \00"
define void @sprint_subb_data(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"SUBB A,x%02X \00"
define void @sprint_subb_data(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
void set_cpu_affinity(int cpu, cpu_set_t *mask) { CPU_SET(cpu, mask); }


x86 assembly (clang, -O0):
<set_cpu_affinity>:
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 <CPU_SET@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cpu_affinity>:
jmp    1030 <CPU_SET@plt>

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

LLVM IR (-O2):
define void @set_cpu_affinity(i32 %0, i32* %1) {
%3 = tail call i32 @CPU_SET(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
char *longestPalindrome(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  if (argc > 1)
    printf("%s\n", longestPalindrome(argv[1]));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    115c <main+0x3c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <longestPalindrome@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1142 <main+0x22>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <longestPalindrome@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i8* @longestPalindrome(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
double pow(double, double);
int main(int argc, char const *argv[]) {
  if (pow(-0.0, 1.0) == 0.0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115a <main+0x4a>
jp     115a <main+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1161 <main+0x51>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call double @pow(double -0.000000e+00, double 1.000000e+00)
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %10
9: ; preds = %2
store i32 1, i32* %3
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int test_imm_8Auint8_mem(unsigned char *val) {
  return ((*val) & (0x8A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Auint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -118
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int ArgItem();
void Act_CutRope(void) { ArgItem(), ArgItem(); }


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

x86 assembly (clang, -O2):
<Act_CutRope>:
push   %rax
xor    %eax,%eax
call   1030 <ArgItem@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ArgItem@plt>

LLVM IR (-O0):
define void @Act_CutRope() {
%1 = call i32 (...) @ArgItem()
%2 = call i32 (...) @ArgItem()
ret void
}

LLVM IR (-O2):
define void @Act_CutRope() {
%1 = tail call i32 (...) @ArgItem()
%2 = tail call i32 (...) @ArgItem()
ret void
}
void RasterDMASoftWareClkDisable(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x6C)))) &= ~(0x00000004u);
}


x86 assembly (clang, -O0):
<RasterDMASoftWareClkDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterDMASoftWareClkDisable>:
add    $0x6c,%edi
andl   $0xfffffffb,(%rdi)
ret

LLVM IR (-O0):
define void @RasterDMASoftWareClkDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 108
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -5
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @RasterDMASoftWareClkDisable(i32 %0) {
%2 = add i32 %0, 108
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, -5
store volatile i32 %6, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mealy17() { printf("mealy17 likes fried chicken and grape soda.\n"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"mealy17 likes fried chicken and grape soda.\0A\00"
define void @mealy17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"mealy17 likes fried chicken and grape soda.\00"
define void @mealy17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
int sock_puts(sockfd, str)
int sockfd;
char *str;
{ return sock_write(sockfd, str, strlen(str)); }


x86 assembly (clang, -O0):
<sock_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
mov    $0x0,%al
call   1040 <sock_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_puts>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sock_write@plt>

LLVM IR (-O0):
define i32 @sock_puts(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @sock_write to i32 (i32, i8*, i64, ...)*)(i32 %5, i8* %6, i64 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @sock_puts(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @sock_write to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %1, i64 %3)
ret i32 %4
}
char foo(char x) { return x; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @foo(i8 returned signext %0) {
ret i8 %0
}
/* Variables and functions */
size_t strcspn(char *, char *);
void remove_newline(char *str) { str[strcspn(str, "\n")] = 0; }


x86 assembly (clang, -O0):
<remove_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strcspn@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_newline>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @remove_newline(i8* nocapture %0) {
%2 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds i8, i8* %0, i64 %2
store i8 0, i8* %3
ret void
}