xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_action(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x00D0);
}


x86 assembly (clang, -O0):
<ieee80211_is_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xd0,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_action>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xd0,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_action(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 208)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_action(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 208)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void RTVfsIoStrmSkip(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmSkip() {
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
extern const char *str_basename(const char *filename) {
  const char *sep;
  if ((sep = strrchr(filename, '/'))) {
    filename = sep + 1;
  }
  return filename;
}


x86 assembly (clang, -O0):
<str_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1144 <str_basename+0x34>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @str_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %1
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @str_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
int main() {
  unsigned int arg = 0x80000000;
  unsigned int out = 0;
  __asm__("movb $1, %%cl; roll %%cl, %%eax;" : "=a"(out) : "a"(arg));
  return (out == 0x1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x1,%cl
rol    %cl,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x80000000,%eax
mov    $0x1,%cl
rol    %cl,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -2147483648, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 asm "movb $$1, %cl; roll %cl, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "movb $$1, %cl; roll %cl, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 -2147483648)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct tm {
  int tm_isdst;
};

/* Variables and functions */
int /*<<< orphan*/ tm_normalize(struct tm *);
int tm_isdaylightsavingextrawintertime(struct tm date) {
  if (date.tm_isdst)
    return 0;
  date.tm_isdst = 1;
  tm_normalize(&date);
  return (date.tm_isdst ? 1 : 0);
}


x86 assembly (clang, -O0):
<tm_isdaylightsavingextrawintertime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1131 <tm_isdaylightsavingextrawintertime+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1154 <tm_isdaylightsavingextrawintertime+0x44>
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <tm_normalize@plt>
mov    -0x8(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_isdaylightsavingextrawintertime>:
xor    %eax,%eax
test   %edi,%edi
je     1117 <tm_isdaylightsavingextrawintertime+0x7>
ret
push   %rax
movl   $0x1,(%rsp)
mov    %rsp,%rdi
call   1030 <tm_normalize@plt>
xor    %eax,%eax
cmpl   $0x0,(%rsp)
setne  %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @tm_isdaylightsavingextrawintertime(i32 %0) {
%2 = alloca %struct.tm
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %1
store i32 1, i32* %3
%6 = call i32 @tm_normalize(%struct.tm* %2)
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_socket_setrbuf_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_socket@%p::setrbuf (rtpp_socket_setrbuf) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_socket_setrbuf_fin>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_socket@%p::setrbuf (rtpp_socket_setrbuf) is invoked after destruction\0A\00"
define void @rtpp_socket_setrbuf_fin(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 ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_socket@%p::setrbuf (rtpp_socket_setrbuf) is invoked after destruction\0A\00"
define void @rtpp_socket_setrbuf_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void wrtmsg(s) char *s;
{
  write(1, s, length(s));
  write(1, "\n", 1);
}


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

x86 assembly (clang, -O2):
<wrtmsg>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <length@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <write@plt>
lea    0xebd(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @wrtmsg(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @length to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* %0, i32 %2)
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int BLAS_char_uplo_is_lo(char uplo) { return uplo == 'L' || uplo == 'l'; }


x86 assembly (clang, -O0):
<BLAS_char_uplo_is_lo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x4c,%ecx
mov    %al,-0x2(%rbp)
je     1129 <BLAS_char_uplo_is_lo+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x6c,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLAS_char_uplo_is_lo>:
and    $0xdf,%dil
xor    %eax,%eax
cmp    $0x4c,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @BLAS_char_uplo_is_lo(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 76
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 108
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @BLAS_char_uplo_is_lo(i8 signext %0) {
%2 = and i8 %0, -33
%3 = icmp eq i8 %2, 76
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clock();
int main() {
  clock();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @clock()
ret i32 0
}
void test12(void) {}


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

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

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

LLVM IR (-O2):
define void @test12() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ serial_set_raw_speed(int, int /*<<< orphan*/);
void serial_speed(int tty, speed_t speed) { serial_set_raw_speed(tty, speed); }


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

x86 assembly (clang, -O2):
<serial_speed>:
jmp    1030 <serial_set_raw_speed@plt>

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

LLVM IR (-O2):
define void @serial_speed(i32 %0, i32 %1) {
%3 = tail call i32 @serial_set_raw_speed(i32 %0, i32 %1)
ret void
}
unsigned str_first_pos(const char *str, unsigned f_char, unsigned l_char,
                       char c) {
  unsigned i;
  for (i = f_char; i <= l_char; i++)
    if (str[i] == c)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<str_first_pos>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
ja     115a <str_first_pos+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
movsbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jne    1147 <str_first_pos+0x47>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <str_first_pos+0x61>
jmp    114c <str_first_pos+0x4c>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1119 <str_first_pos+0x19>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_first_pos>:
mov    $0xffffffff,%eax
cmp    %edx,%esi
ja     1120 <str_first_pos+0x20>
nopl   0x0(%rax)
mov    %esi,%r8d
cmp    %cl,(%rdi,%r8,1)
je     1121 <str_first_pos+0x21>
add    $0x1,%esi
cmp    %edx,%esi
jbe    1110 <str_first_pos+0x10>
ret
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @str_first_pos(i8* %0, i32 %1, i32 %2, i8 signext %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8 %3, i8* %9
%11 = load i32, i32* %7
store i32 %11, i32* %10
br label %12
12: ; preds = %29, %4
%13 = load i32, i32* %10
%14 = load i32, i32* %8
%15 = icmp ule i32 %13, %14
br i1 %15, label %16, label %32
16: ; preds = %12
%17 = load i8*, i8** %6
%18 = load i32, i32* %10
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = load i8, i8* %9
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %22, %24
br i1 %25, label %26, label %28
26: ; preds = %16
%27 = load i32, i32* %10
store i32 %27, i32* %5
br label %33
28: ; preds = %16
br label %29
29: ; preds = %28
%30 = load i32, i32* %10
%31 = add i32 %30, 1
store i32 %31, i32* %10
br label %12
32: ; preds = %12
store i32 -1, i32* %5
br label %33
33: ; preds = %32, %26
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @str_first_pos(i8* nocapture %0, i32 %1, i32 %2, i8 signext %3) {
%5 = icmp ugt i32 %1, %2
br i1 %5, label %15, label %6
6: ; preds = %4, %12
%7 = phi i32 [ %13, %12 ], [ %1, %4 ]
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %3
br i1 %11, label %15, label %12
12: ; preds = %6
%13 = add i32 %7, 1
%14 = icmp ugt i32 %13, %2
br i1 %14, label %15, label %6
15: ; preds = %6, %12, %4
%16 = phi i32 [ -1, %4 ], [ -1, %12 ], [ %7, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_memoffs32_eax(void *_memoffs32) {
  unsigned long *memoffs32 = (unsigned long *)_memoffs32;
  put8(0xA3);
  put32((unsigned int)(memoffs32));
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void sprint_xrl_to_direct(char *str, uint8_t direct) {
  sprintf(str,
          "XRL   "
          "0x%02X"
          ", A                   ",
          direct);
}


x86 assembly (clang, -O0):
<sprint_xrl_to_direct>:
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_xrl_to_direct>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"XRL 0x%02X, A \00"
define void @sprint_xrl_to_direct(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"XRL 0x%02X, A \00"
define void @sprint_xrl_to_direct(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 uint8_t;

/* Variables and functions */
int rtp2435_get_type(int *);
uint8_t *rtp2435_restart(uint8_t *header) {
  uint8_t t = rtp2435_get_type(header);
  if (64 <= t && t <= 127)
    return header + 8;
  else
    return NULL;
}


x86 assembly (clang, -O0):
<rtp2435_restart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <rtp2435_get_type@plt>
mov    %eax,-0x14(%rbp)
mov    $0x40,%eax
cmp    -0x14(%rbp),%eax
jg     1151 <rtp2435_restart+0x41>
cmpl   $0x7f,-0x14(%rbp)
jg     1151 <rtp2435_restart+0x41>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <rtp2435_restart+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp2435_restart>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rtp2435_get_type@plt>
and    $0xffffffc0,%eax
add    $0x20,%rbx
xor    %ecx,%ecx
cmp    $0x40,%eax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @rtp2435_restart(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @rtp2435_get_type(i32* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sle i32 64, %7
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 127
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 8
store i32* %14, i32** %2
br label %16
15: ; preds = %9, %1
store i32* null, i32** %2
br label %16
16: ; preds = %15, %12
%17 = load i32*, i32** %2
ret i32* %17
}

LLVM IR (-O2):
define i32* @rtp2435_restart(i32* %0) {
%2 = tail call i32 @rtp2435_get_type(i32* %0)
%3 = and i32 %2, -64
%4 = icmp eq i32 %3, 64
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = select i1 %4, i32* %5, i32* null
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void sbb_reg32_reg32(int reg1, int reg2) {
  put8(0x19);
  put8((reg2 << 3) | reg1 | 0xC0);
}


x86 assembly (clang, -O0):
<sbb_reg32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x19,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     -0x4(%rbp),%edi
or     $0xc0,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbb_reg32_reg32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x19,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @sbb_reg32_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 25)
%6 = load i32, i32* %4
%7 = shl i32 %6, 3
%8 = load i32, i32* %3
%9 = or i32 %7, %8
%10 = or i32 %9, 192
%11 = call i32 @put8(i32 %10)
ret void
}

LLVM IR (-O2):
define void @sbb_reg32_reg32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 25)
%4 = shl i32 %1, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @put8(i32 %6)
ret void
}
void main(void) {
  static const int sdivisor = 20;
  const int *pdivisor;
  unsigned rdpreamble;
  unsigned divisor;
  pdivisor = &sdivisor;
  divisor = *pdivisor;
  rdpreamble = 0;
  if (divisor == 20) {
    rdpreamble = 18;
  } else {
    if (divisor == 15) {
      rdpreamble = 16;
    } else {
      if (divisor == 12) {
        rdpreamble = 15;
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0x10(%rbp)
jne    1135 <main+0x35>
movl   $0x12,-0xc(%rbp)
jmp    1166 <main+0x66>
cmpl   $0xf,-0x10(%rbp)
jne    114b <main+0x4b>
movl   $0x10,-0xc(%rbp)
jmp    1161 <main+0x61>
cmpl   $0xc,-0x10(%rbp)
jne    115c <main+0x5c>
movl   $0xf,-0xc(%rbp)
jmp    1161 <main+0x61>
jmp    1166 <main+0x66>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Type definitions */
struct ev_loop {
  int dummy;
};

/* Variables and functions */
unsigned int ev_iteration(struct ev_loop *);
unsigned int ev_loop_count(struct ev_loop *loop) { return ev_iteration(loop); }


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

x86 assembly (clang, -O2):
<ev_loop_count>:
jmp    1030 <ev_iteration@plt>

LLVM IR (-O0):
%struct.ev_loop = type { i32 }
define i32 @ev_loop_count(%struct.ev_loop* %0) {
%2 = alloca %struct.ev_loop*
store %struct.ev_loop* %0, %struct.ev_loop** %2
%3 = load %struct.ev_loop*, %struct.ev_loop** %2
%4 = call i32 @ev_iteration(%struct.ev_loop* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.ev_loop = type { i32 }
define i32 @ev_loop_count(%struct.ev_loop* %0) {
%2 = tail call i32 @ev_iteration(%struct.ev_loop* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void error(void) {
  fprintf(stderr, "error\n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"error\0A\00"
define void @error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"error\0A\00"
define void @error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void gdk_event_send_client_message_for_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_event_send_client_message_for_display() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void pool_debug_value(void) {
  printf("debug %d\n", 2);
  printf("debug %d\n", (8 + 1));
  printf("debug %d\n", 3);
}


x86 assembly (clang, -O0):
<pool_debug_value>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_debug_value>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"debug %d\0A\00"
define void @pool_debug_value() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
void MIDI_send_active_sensing(void) {}


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

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

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

LLVM IR (-O2):
define void @MIDI_send_active_sensing() {
ret void
}
int x5_process_request(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x5_process_request(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void printpath(unsigned depth, const char *name) {
  for (unsigned d = 0; d < depth; ++d)
    fputc('\t', stdout);
  printf("%s\n", name);
}


x86 assembly (clang, -O0):
<printpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1163 <printpath+0x43>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
mov    $0x9,%edi
call   1040 <fputc@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <printpath+0x16>
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printpath>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
je     1151 <printpath+0x31>
mov    %edi,%ebp
mov    0x2eac(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%esi
mov    $0x9,%edi
call   1040 <fputc@plt>
add    $0xffffffff,%ebp
jne    1140 <printpath+0x20>
lea    0xea8(%rip),%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @printpath(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* @stdout
%12 = call i32 @fputc(i8 signext 9, i32 %11)
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
%17 = load i8*, i8** %4
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @printpath(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ 0, %2 ]
%8 = load i32, i32* @stdout
%9 = tail call i32 @fputc(i8 signext 9, i32 %8)
%10 = add nuw i32 %7, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %4, label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int __u32;

/* Variables and functions */
extern void __put_unaligned_2(__u32 __v, register __u8 *__p) {
  *__p++ = __v;
  *__p++ = __v >> 8;
}


x86 assembly (clang, -O0):
<__put_unaligned_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__put_unaligned_2>:
mov    %edi,(%rsi)
sar    $0x8,%edi
mov    %edi,0x4(%rsi)
ret

LLVM IR (-O0):
define void @__put_unaligned_2(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 = getelementptr inbounds i32, i32* %6, i32 1
store i32* %7, i32** %4
store i32 %5, i32* %6
%8 = load i32, i32* %3
%9 = ashr i32 %8, 8
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %4
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_2(i32 %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %0, i32* %1
%4 = ashr i32 %0, 8
store i32 %4, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
void add_to_string(char *string, char *addition) { strcat(string, addition); }


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

x86 assembly (clang, -O2):
<add_to_string>:
jmp    1030 <strcat@plt>

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

LLVM IR (-O2):
define void @add_to_string(i8* %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
char tolower(char);
void toLowerN(char *s, int n) {
  int i;
  for (i = 0; i < n; ++i)
    s[i] = tolower(s[i]);
}


x86 assembly (clang, -O0):
<toLowerN>:
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    115e <toLowerN+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <toLowerN+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toLowerN>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1147 <toLowerN+0x37>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <toLowerN+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @toLowerN(i8* 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 i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @tolower(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void Sound_Play2(uint32_t period) {
  if (period == 0) {
    (*((volatile uint32_t *)0xE000E014)) = 0;
  } else {
    (*((volatile uint32_t *)0xE000E014)) = period - 1;
  }
}


x86 assembly (clang, -O0):
<Sound_Play2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1124 <Sound_Play2+0x24>
mov    $0xe000e014,%eax
movq   $0x0,(%rax)
jmp    1134 <Sound_Play2+0x34>
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
mov    $0xe000e014,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sound_Play2>:
xor    %eax,%eax
sub    $0x1,%rdi
cmovae %rdi,%rax
mov    $0xe000e014,%ecx
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @Sound_Play2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store volatile i64 0, i64* inttoptr (i64 3758153748 to i64*)
br label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = sub nsw i64 %7, 1
store volatile i64 %8, i64* inttoptr (i64 3758153748 to i64*)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @Sound_Play2(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = add nsw i64 %0, -1
%4 = select i1 %2, i64 0, i64 %3
store volatile i64 %4, i64* inttoptr (i64 3758153748 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RemoveNetworks();
void Finish(void) { RemoveNetworks(); }


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

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

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

LLVM IR (-O2):
define void @Finish() {
%1 = tail call i32 (...) @RemoveNetworks()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XKeymapEvent;

/* Variables and functions */
int get_XKeymapEvent_type(void *_p) { return (int)((XKeymapEvent *)_p)->type; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XKeymapEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XKeymapEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *make_format_string(char const *, size_t *, int, void const **,
                         int /*<<< orphan*/, int /*<<< orphan*/ *);
char *spn_string_format_cstr(const char *fmt, size_t *len, const void **argv) {
  return make_format_string(fmt, len, -1, argv, 0, NULL);
}


x86 assembly (clang, -O0):
<spn_string_format_cstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0xffffffff,%edx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <make_format_string@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spn_string_format_cstr>:
mov    %rdx,%rcx
mov    $0xffffffff,%edx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <make_format_string@plt>

LLVM IR (-O0):
define i8* @spn_string_format_cstr(i8* %0, i64* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i8**
store i8* %0, i8** %4
store i64* %1, i64** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i64*, i64** %5
%9 = load i8**, i8*** %6
%10 = call i8* @make_format_string(i8* %7, i64* %8, i32 -1, i8** %9, i32 0, i32* null)
ret i8* %10
}

LLVM IR (-O2):
define i8* @spn_string_format_cstr(i8* %0, i64* %1, i8** %2) {
%4 = tail call i8* @make_format_string(i8* %0, i64* %1, i32 -1, i8** %2, i32 0, i32* null)
ret i8* %4
}
void Rename_VAL_BTS(s, b, n) int *s, b, n;
{ Rename_VMS_BTS(s, b, n, n); }


x86 assembly (clang, -O0):
<Rename_VAL_BTS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x0,%al
call   1030 <Rename_VMS_BTS@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rename_VAL_BTS>:
mov    %edx,%ecx
xor    %eax,%eax
jmp    1030 <Rename_VMS_BTS@plt>

LLVM IR (-O0):
define void @Rename_VAL_BTS(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 = load i32, i32* %6
%11 = call i32 (i32*, i32, i32, i32, ...) bitcast (i32 (...)* @Rename_VMS_BTS to i32 (i32*, i32, i32, i32, ...)*)(i32* %7, i32 %8, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @Rename_VAL_BTS(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32*, i32, i32, i32, ...) bitcast (i32 (...)* @Rename_VMS_BTS to i32 (i32*, i32, i32, i32, ...)*)(i32* %0, i32 %1, i32 %2, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ sendfile(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, int /*<<< orphan*/);
void test_sendfile() {
  ssize_t result = sendfile(STDOUT_FILENO, STDIN_FILENO, NULL, 0);
}


x86 assembly (clang, -O0):
<test_sendfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <sendfile@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sendfile>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <sendfile@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@STDIN_FILENO = global i32 0
define void @test_sendfile() {
%1 = alloca i32
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i32, i32* @STDIN_FILENO
%4 = call i32 @sendfile(i32 %2, i32 %3, i32* null, i32 0)
store i32 %4, i32* %1
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@STDIN_FILENO = global i32 0
define void @test_sendfile() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = load i32, i32* @STDIN_FILENO
%3 = tail call i32 @sendfile(i32 %1, i32 %2, i32* null, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mp2vseqdx_set_color(int /*<<< orphan*/ *);
void mp2vseqdx_set_primaries(uint8_t *p_mp2vseqdx, uint8_t i_primaries) {
  mp2vseqdx_set_color(p_mp2vseqdx);
  p_mp2vseqdx[5] = i_primaries;
}


x86 assembly (clang, -O0):
<mp2vseqdx_set_primaries>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mp2vseqdx_set_color@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqdx_set_primaries>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <mp2vseqdx_set_color@plt>
mov    %ebp,0x14(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @mp2vseqdx_set_primaries(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 = call i32 @mp2vseqdx_set_color(i32* %5)
%7 = load i32, i32* %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 5
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @mp2vseqdx_set_primaries(i32* %0, i32 %1) {
%3 = tail call i32 @mp2vseqdx_set_color(i32* %0)
%4 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
yyerror(char *s) { printf("Errore Sintattico\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Errore Sintattico\00"
define i32 @yyerror(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ precheckPrime(int);
int checkPrime(int number) {
  if (precheckPrime(number) == 0) {
    return 0;
  }
}


x86 assembly (clang, -O0):
<checkPrime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <precheckPrime@plt>
cmp    $0x0,%rax
jne    1134 <checkPrime+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @checkPrime(i32 %0) {
%2 = tail call i64 @precheckPrime(i32 %0)
ret i32 0
}
void pm_freearray(its, rows) char **its;
int rows;
{
  free(its[0]);
  free(its);
}


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

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

LLVM IR (-O0):
define void @pm_freearray(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 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load i8**, i8*** %3
%9 = bitcast i8** %8 to i8*
ret void
}

LLVM IR (-O2):
define void @pm_freearray(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
tail call void @free(i8* %3)
%4 = bitcast i8** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ imprimeSerie(int, int, int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Serie de 1 a 10 com inclemento de 4: ");
  imprimeSerie(1, 10, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x4,%edx
call   1030 <imprimeSerie@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x4,%edx
call   1030 <imprimeSerie@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Serie de 1 a 10 com inclemento de 4: \00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @imprimeSerie(i32 1, i32 10, i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Serie de 1 a 10 com inclemento de 4: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @imprimeSerie(i32 1, i32 10, i32 4)
ret i32 0
}
void EXTI0_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @EXTI0_IRQHandler() {
ret void
}