xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void main() { print("Hello world!"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world!\00"
define void @main() {
%1 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define void @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
long long test(long long a, long long b) { return a | b; }


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

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

LLVM IR (-O0):
define i64 @test(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = or i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @test(i64 %0, i64 %1) {
%3 = or i64 %1, %0
ret i64 %3
}
void SplitRGBPlane() {}


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

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

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

LLVM IR (-O2):
define void @SplitRGBPlane() {
ret void
}
void copia(void) {
  int i;
  extern char linea[], linea_max[];
  i = 0;
  while (1) {
    linea_max[i] = linea[i];
    if (linea_max[i] == '\0')
      i--;
  }
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    0x2eb4(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movslq -0x4(%rbp),%rcx
mov    0x2ea6(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1148 <copia+0x48>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copia+0xb>

x86 assembly (clang, -O2):
<copia>:
xor    %eax,%eax
mov    0x2ee7(%rip),%rsi
mov    0x2ec8(%rip),%rdx
cltq
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
cmp    $0x1,%cl
sbb    $0x0,%eax
jmp    1110 <copia+0x10>

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %19
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %8
store i8 %6, i8* %9
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load i32, i32* %1
%18 = add nsw i32 %17, -1
store i32 %18, i32* %1
br label %19
19: ; preds = %16, %2
br label %2
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %9, %1 ]
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %3
%5 = load i8, i8* %4
%6 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %3
store i8 %5, i8* %6
%7 = icmp eq i8 %5, 0
%8 = sext i1 %7 to i32
%9 = add nsw i32 %2, %8
br label %1
}
void f_e(char *a) {}


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

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

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

LLVM IR (-O2):
define void @f_e(i8* nocapture %0) {
ret void
}
void ff_hevc_put_hevc_pel_pixels16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_pel_pixels16_12_sse4() {
ret void
}
/* Variables and functions */
scalar_t__ lowbit(int);
int sum(int *c, int end) {
  int sum = 0;
  while (end > 0) {
    sum += c[end];
    end -= lowbit(end);
  }
  return sum;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115b <sum+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <lowbit@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0xc(%rbp)
jmp    1126 <sum+0x16>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1135 <sum+0x25>
mov    %esi,%ebx
mov    %rdi,%r14
xor    %ebp,%ebp
nop
mov    %ebx,%eax
add    (%r14,%rax,4),%ebp
mov    %ebx,%edi
call   1030 <lowbit@plt>
sub    %eax,%ebx
test   %ebx,%ebx
jg     1120 <sum+0x10>
jmp    1137 <sum+0x27>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sum(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 = %9, %2
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = load i32, i32* %5
%16 = add nsw i32 %15, %14
store i32 %16, i32* %5
%17 = load i32, i32* %4
%18 = call i64 @lowbit(i32 %17)
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = sub nsw i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %4
br label %6
23: ; preds = %6
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @sum(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32 [ %13, %4 ], [ %1, %2 ]
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %5
%11 = tail call i64 @lowbit(i32 %6)
%12 = trunc i64 %11 to i32
%13 = sub i32 %6, %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %4, label %15
15: ; preds = %4, %2
%16 = phi i32 [ 0, %2 ], [ %10, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ LLWU_DriverIRQHandler();
__attribute__((weak, section(".after_vectors"))) void LLWU_IRQHandler(void) {
  LLWU_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @LLWU_IRQHandler() section ".after_vectors" {
%1 = call i32 (...) @LLWU_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @LLWU_IRQHandler() section ".after_vectors" {
%1 = tail call i32 (...) @LLWU_DriverIRQHandler()
ret void
}
char __ocl_convert_char_char(char src) { return (char)src; }


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

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

LLVM IR (-O0):
define signext i8 @__ocl_convert_char_char(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 @__ocl_convert_char_char(i8 returned signext %0) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ RLIMIT_STACK;
int /*<<< orphan*/ cdecl_func__RLIMIT_STACK(int /*<<< orphan*/);
void cdecl_expr__RLIMIT_STACK() { cdecl_func__RLIMIT_STACK(RLIMIT_STACK); }


x86 assembly (clang, -O0):
<cdecl_expr__RLIMIT_STACK>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__RLIMIT_STACK@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__RLIMIT_STACK>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__RLIMIT_STACK@plt>

LLVM IR (-O0):
@RLIMIT_STACK = global i32 0
define void @cdecl_expr__RLIMIT_STACK() {
%1 = load i32, i32* @RLIMIT_STACK
%2 = call i32 @cdecl_func__RLIMIT_STACK(i32 %1)
ret void
}

LLVM IR (-O2):
@RLIMIT_STACK = global i32 0
define void @cdecl_expr__RLIMIT_STACK() {
%1 = load i32, i32* @RLIMIT_STACK
%2 = tail call i32 @cdecl_func__RLIMIT_STACK(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disable_cache_as_ram();
void disable_cache_as_ram_bsp(void) { disable_cache_as_ram(); }


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

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

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

LLVM IR (-O2):
define void @disable_cache_as_ram_bsp() {
%1 = tail call i32 (...) @disable_cache_as_ram()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ startFonCoovaChilli(int);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (!strcmp(argv[1], "0")) {
    startFonCoovaChilli(0);
  } else {
    startFonCoovaChilli(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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <main+0x3f>
xor    %edi,%edi
call   1040 <startFonCoovaChilli@plt>
jmp    1169 <main+0x49>
mov    $0x1,%edi
call   1040 <startFonCoovaChilli@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0xed4(%rip),%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1040 <startFonCoovaChilli@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strcmp(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @startFonCoovaChilli(i32 0)
br label %15
13: ; preds = %2
%14 = call i32 @startFonCoovaChilli(i32 1)
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @startFonCoovaChilli(i32 %7)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  clock_t begin, end;
  double time_spent;
  begin = clock();
  end = clock();
  time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
  printf("%f\n", time_spent);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2e88(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
cvtsi2sd %rax,%xmm0
mov    0x2ea7(%rip),%rax
divsd  (%rax),%xmm0
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i64 (...) @clock()
store i64 %9, i64* %6
%10 = call i64 (...) @clock()
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = load i64, i64* %6
%13 = sub nsw i64 %11, %12
%14 = sitofp i64 %13 to double
%15 = load double, double* @CLOCKS_PER_SEC
%16 = fdiv double %14, %15
store double %16, double* %8
%17 = load double, double* %8
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %17)
ret i32 0
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @clock()
%4 = tail call i64 (...) @clock()
%5 = sub nsw i64 %4, %3
%6 = sitofp i64 %5 to double
%7 = load double, double* @CLOCKS_PER_SEC
%8 = fdiv double %6, %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}
int verify_rncryptor_format(unsigned char version, unsigned char options) {
  if (version == 0x03 && (options == 0x00 || options == 0x01)) {
    return 0x00;
  }
  return 0x01;
}


x86 assembly (clang, -O0):
<verify_rncryptor_format>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x3,%eax
jne    1143 <verify_rncryptor_format+0x43>
movzbl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1137 <verify_rncryptor_format+0x37>
movzbl -0x6(%rbp),%eax
cmp    $0x1,%eax
jne    1143 <verify_rncryptor_format+0x43>
movl   $0x0,-0x4(%rbp)
jmp    114a <verify_rncryptor_format+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_rncryptor_format>:
cmp    $0x3,%dil
setne  %al
cmp    $0x2,%sil
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @verify_rncryptor_format(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp ne i8 %0, 3
%4 = icmp ugt i8 %1, 1
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void _Jv_AttachCurrentThread() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_AttachCurrentThread() {
ret void
}
/* Variables and functions */
double sqrt(double);
double f2_dashed2(double x) {
  double alpha = sqrt(1.0 + 5.0 * x * x);
  return (1.0 / (alpha * alpha * alpha));
}


x86 assembly (clang, -O0):
<f2_dashed2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec5(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xea0(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2_dashed2>:
push   %rax
movapd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedb(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113d <f2_dashed2+0x2d>
sqrtsd %xmm0,%xmm0
jmp    1142 <f2_dashed2+0x32>
call   1030 <sqrt@plt>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f2_dashed2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 5.000000e+00, %4
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %5, double %6, double 1.000000e+00)
%8 = call double @sqrt(double %7)
store double %8, double* %3
%9 = load double, double* %3
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = load double, double* %3
%13 = fmul double %11, %12
%14 = fdiv double 1.000000e+00, %13
ret double %14
}

LLVM IR (-O2):
define double @f2_dashed2(double %0) {
%2 = fmul double %0, 5.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = tail call double @sqrt(double %3)
%5 = fmul double %4, %4
%6 = fmul double %4, %5
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
void SePErrorF(fmt, a, b, c) char *fmt, *a, *b, *c;
{
  char buf[256];
  sprintf(buf, fmt, a, b, c);
  SePError(buf);
}


x86 assembly (clang, -O0):
<SePErrorF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x120(%rbp),%rdi
mov    $0x0,%al
call   1030 <SePError@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SePErrorF>:
push   %rbx
sub    $0x100,%rsp
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <SePError@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @SePErrorF(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = call i32 (i8*, i8*, ...) @sprintf(i8* %10, i8* %11, i8* %12, i8* %13, i8* %14)
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @SePError to i32 (i8*, ...)*)(i8* %16)
ret void
}

LLVM IR (-O2):
define void @SePErrorF(i8* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) %0, i8* %1, i8* %2, i8* %3)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @SePError to i32 (i8*, ...)*)(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compileBlock5();
int /*<<< orphan*/ compileSubDecls();
void compileBlock4(void) {
  compileSubDecls();
  compileBlock5();
}


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

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

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

LLVM IR (-O2):
define void @compileBlock4() {
%1 = tail call i32 (...) @compileSubDecls()
%2 = tail call i32 (...) @compileBlock5()
ret void
}
void pwm3_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @pwm3_iomux_config() {
ret void
}
int test_imm_B5uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xB5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B5uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 777389080576
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void llenarRandom(int *vector, unsigned int tope) {
  srand(time(NULL));
  int i;
  for (i = 0; i < tope; i++) {
    vector[i] = (rand() % 100);
  }
}


x86 assembly (clang, -O0):
<llenarRandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    118a <llenarRandom+0x5a>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <llenarRandom+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llenarRandom>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
test   %ebp,%ebp
je     117f <llenarRandom+0x4f>
mov    %ebp,%ebp
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <llenarRandom+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @llenarRandom(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp eq i32 %1, 0
br i1 %5, label %15, label %6
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 100
%12 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %11, i32* %12
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void add_m32_reg32(unsigned int *m32, int reg32) {
  put8(0x01);
  put8((reg32 << 3) | 5);
  put32((unsigned int)(m32));
}


x86 assembly (clang, -O0):
<add_m32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_m32_reg32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x1,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%edi
call   1030 <put8@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @add_m32_reg32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 1)
%6 = load i32, i32* %4
%7 = shl i32 %6, 3
%8 = or i32 %7, 5
%9 = call i32 @put8(i32 %8)
%10 = load i32*, i32** %3
%11 = ptrtoint i32* %10 to i32
%12 = call i32 @put32(i32 %11)
ret void
}

LLVM IR (-O2):
define void @add_m32_reg32(i32* %0, i32 %1) {
%3 = tail call i32 @put8(i32 1)
%4 = shl i32 %1, 3
%5 = or i32 %4, 5
%6 = tail call i32 @put8(i32 %5)
%7 = ptrtoint i32* %0 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @put32(i32 %8)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_set_structure(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc4c(115, a, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @clear_set_structure() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 115, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fclose(int /*<<< orphan*/ *);
bool close_3(FILE *this) {
  if (this != NULL)
    return fclose(this) == 0;
  else
    return true;
}


x86 assembly (clang, -O0):
<close_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1144 <close_3+0x34>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <close_3+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_3>:
test   %rdi,%rdi
je     112b <close_3+0x1b>
push   %rax
call   1030 <fclose@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

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

/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
FILE *open_file(char *fname) {
  FILE *fp;
  if ((fp = fopen(fname, "w")) == NULL) {
    fprintf(stderr, "Error (errno: %d) opening file '%s' for writing.", errno,
            fname);
    exit(1);
  }
  return fp;
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1186 <open_file+0x56>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    0x2e6e(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rcx
lea    0xe8b(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <open_file+0x17>
pop    %rbx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
lea    0xea2(%rip),%rsi
mov    %rbx,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.1 = [49 x i8] c"Error (errno: %d) opening file '%s' for writing.\00"
@errno = global i32 0
define i32* @open_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* @errno
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %9, i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.1 = [49 x i8] c"Error (errno: %d) opening file '%s' for writing.\00"
@errno = global i32 0
define noalias i32* @open_file(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %6, i8* %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret i32* %2
}
void initInfrared() { (*(unsigned int *)0x50008000) &= ~(1 << 8); }


x86 assembly (clang, -O0):
<initInfrared>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50008000,%eax
mov    (%rax),%ecx
and    $0xfffffeff,%ecx
mov    $0x50008000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initInfrared>:
andb   $0xfe,0x50008001
fe
ret

LLVM IR (-O0):
define void @initInfrared() {
%1 = load i32, i32* inttoptr (i64 1342210048 to i32*)
%2 = and i32 %1, -257
store i32 %2, i32* inttoptr (i64 1342210048 to i32*)
ret void
}

LLVM IR (-O2):
define void @initInfrared() {
%1 = load i32, i32* inttoptr (i64 1342210048 to i32*)
%2 = and i32 %1, -257
store i32 %2, i32* inttoptr (i64 1342210048 to i32*)
ret void
}
/* Variables and functions */
int d09(int);
int d10(int a) { return d09(d09(a)); }


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

x86 assembly (clang, -O2):
<d10>:
push   %rax
call   1030 <d09@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d09@plt>

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

LLVM IR (-O2):
define i32 @d10(i32 %0) {
%2 = tail call i32 @d09(i32 %0)
%3 = tail call i32 @d09(i32 %2)
ret i32 %3
}
int do_221() { return 221; }


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

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

LLVM IR (-O0):
define i32 @do_221() {
ret i32 221
}

LLVM IR (-O2):
define i32 @do_221() {
ret i32 221
}
/* Variables and functions */
int /*<<< orphan*/ FTFE_DriverIRQHandler();
__attribute__((weak)) void FTFE_IRQHandler(void) { FTFE_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @FTFE_IRQHandler() {
%1 = call i32 (...) @FTFE_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FTFE_IRQHandler() {
%1 = tail call i32 (...) @FTFE_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int validate_move(void) {
  printf("\nMouvement validé.");
  return 1;
}


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

x86 assembly (clang, -O2):
<validate_move>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0AMouvement valid\C3\A9.\00"
define i32 @validate_move() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0AMouvement valid\C3\A9.\00"
define i32 @validate_move() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err(char *msg) {
  fprintf(stderr, "ERROR: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
struct udcFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ udcMustRead(struct udcFile *, unsigned char *, int);
int udcGetChar(struct udcFile *file) {
  unsigned char b;
  udcMustRead(file, &b, 1);
  return b;
}


x86 assembly (clang, -O0):
<udcGetChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <udcMustRead@plt>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udcGetChar>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <udcMustRead@plt>
movzbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.udcFile = type { i32 }
define i32 @udcGetChar(%struct.udcFile* %0) {
%2 = alloca %struct.udcFile*
%3 = alloca i8
store %struct.udcFile* %0, %struct.udcFile** %2
%4 = load %struct.udcFile*, %struct.udcFile** %2
%5 = call i32 @udcMustRead(%struct.udcFile* %4, i8* %3, i32 1)
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.udcFile = type { i32 }
define i32 @udcGetChar(%struct.udcFile* %0) {
%2 = alloca i8
%3 = call i32 @udcMustRead(%struct.udcFile* %0, i8* %2, i32 1)
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
ret i32 %5
}
int f7(unsigned x) {
  unsigned a = 1, b = 0x7fffffff - 1;
  return x - a > b;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x7ffffffe,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
xor    %eax,%eax
test   %edi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @f7(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
store i32 2147483646, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = sub i32 %5, %6
%8 = load i32, i32* %4
%9 = icmp ugt i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f7(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int file_exists(char *);
int has_sysfs(void) {
  static int init;
  static int sysfs;
  if (!init) {
    sysfs = file_exists("/sys");
    init = 1;
  }
  return sysfs;
}


x86 assembly (clang, -O0):
<has_sysfs>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    113d <has_sysfs+0x2d>
lea    0xed8(%rip),%rdi
call   1030 <file_exists@plt>
mov    %eax,0x2efd(%rip)
movl   $0x1,0x2eef(%rip)
mov    0x2eed(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_sysfs>:
push   %rax
cmpb   $0x1,0x2f14(%rip)
jne    1122 <has_sysfs+0x12>
mov    0x2f10(%rip),%eax
pop    %rcx
ret
lea    0xed7(%rip),%rdi
call   1030 <file_exists@plt>
mov    %eax,0x2efc(%rip)
movb   $0x1,0x2ef1(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@has_sysfs.init = internal global i32 0
@has_sysfs.sysfs = internal global i32 0
@.str = [5 x i8] c"/sys\00"
define i32 @has_sysfs() {
%1 = load i32, i32* @has_sysfs.init
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 @file_exists(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @has_sysfs.sysfs
store i32 1, i32* @has_sysfs.init
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @has_sysfs.sysfs
ret i32 %6
}

LLVM IR (-O2):
@has_sysfs.init = internal unnamed_addr global i1 false
@has_sysfs.sysfs = internal unnamed_addr global i32 0
@.str = [5 x i8] c"/sys\00"
define i32 @has_sysfs() {
%1 = load i1, i1* @has_sysfs.init
br i1 %1, label %2, label %4
2: ; preds = %0
%3 = load i32, i32* @has_sysfs.sysfs
br label %6
4: ; preds = %0
%5 = tail call i32 @file_exists(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* @has_sysfs.sysfs
store i1 true, i1* @has_sysfs.init
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %3, %2 ], [ %5, %4 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char *, int);
int32_t unpack_int32(char **value) {
  int32_t result;
  memcpy(&result, *value, sizeof(int32_t));
  result = htonl(result);
  *value += sizeof(int32_t);
  return result;
}


x86 assembly (clang, -O0):
<unpack_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_int32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0xc(%rsp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0xc(%rsp),%edi
call   1030 <htonl@plt>
addq   $0x4,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @unpack_int32(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = call i32 @memcpy(i32* %3, i8* %5, i32 4)
%7 = load i32, i32* %3
%8 = call i32 @htonl(i32 %7)
store i32 %8, i32* %3
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i64 4
store i8* %11, i8** %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @unpack_int32(i8** nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i8*, i8** %0
%5 = call i32 @memcpy(i32* %2, i8* %4, i32 4)
%6 = load i32, i32* %2
%7 = call i32 @htonl(i32 %6)
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 4
store i8* %9, i8** %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __scroll_up(int /*<<< orphan*/, int, int /*<<< orphan*/, int,
                               int, int);
void __attribute__((no)) scroll_up_one(void) {
  __scroll_up(0, 24, 0, 79, 0x07, 1);
}


x86 assembly (clang, -O0):
<scroll_up_one>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x18,%esi
mov    $0x4f,%ecx
mov    $0x7,%r8d
mov    $0x1,%r9d
mov    %edx,%edi
call   1030 <__scroll_up@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scroll_up_one>:
xor    %edi,%edi
mov    $0x18,%esi
xor    %edx,%edx
mov    $0x4f,%ecx
mov    $0x7,%r8d
mov    $0x1,%r9d
jmp    1030 <__scroll_up@plt>

LLVM IR (-O0):
define void @scroll_up_one() {
%1 = call i32 @__scroll_up(i32 0, i32 24, i32 0, i32 79, i32 7, i32 1)
ret void
}

LLVM IR (-O2):
define void @scroll_up_one() {
%1 = tail call i32 @__scroll_up(i32 0, i32 24, i32 0, i32 79, i32 7, i32 1)
ret void
}
int f2(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f2() {
ret i32 0
}
void module_dummy_free(void) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<module_dummy_free>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <module_dummy_free+0x9>
jmp    110e <module_dummy_free+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @module_dummy_free() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @module_dummy_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_unix_error(char *);
int setsockopt(int, int, int, void const *, int);
int Setsockopt(int s, int level, int optname, const void *optval, int optlen) {
  int rc;
  if ((rc = setsockopt(s, level, optname, optval, optlen)) < 0)
    log_unix_error("Setsockopt error");
  return rc;
}


x86 assembly (clang, -O0):
<Setsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <setsockopt@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jge    1167 <Setsockopt+0x47>
lea    0xe9e(%rip),%rdi
call   1040 <log_unix_error@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Setsockopt>:
push   %rbx
call   1030 <setsockopt@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Setsockopt+0x18>
lea    0xecd(%rip),%rdi
call   1040 <log_unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Setsockopt error\00"
define i32 @Setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @log_unix_error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ _cursor_setpos(int, int);
int /*<<< orphan*/ rvid_getpos(int *, int *);
void _cursor_update() {
  int x, y;
  rvid_getpos(&x, &y);
  _cursor_setpos(x, y);
}


x86 assembly (clang, -O0):
<_cursor_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <rvid_getpos@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_cursor_setpos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cursor_update>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <rvid_getpos@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <_cursor_setpos@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_cursor_update() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @rvid_getpos(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @_cursor_setpos(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @_cursor_update() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @rvid_getpos(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @_cursor_setpos(i32 %6, i32 %7)
ret void
}
long long l_max(one, two)
long long one, two;
{
  if (one > two)
    return (one);
  else
    return (two);
}


x86 assembly (clang, -O0):
<l_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <l_max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <l_max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @l_max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}