xunge/DecIR huggingface dataset:
/* Variables and functions */
long ENOTSUP;
long sys_fsgetpath(const char *buf, unsigned long size, void *fsid,
                   unsigned long long objid) {
  return -ENOTSUP;
}


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

x86 assembly (clang, -O2):
<sys_fsgetpath>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%rax
ret

LLVM IR (-O0):
@ENOTSUP = global i64 0
define i64 @sys_fsgetpath(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* @ENOTSUP
%10 = sub nsw i64 0, %9
ret i64 %10
}

LLVM IR (-O2):
@ENOTSUP = global i64 0
define i64 @sys_fsgetpath(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2, i64 %3) {
%5 = load i64, i64* @ENOTSUP
%6 = sub nsw i64 0, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ Atm128GpioInterruptC__1__Atm128Interrupt__fired();
void HplAtm128InterruptPinP__4__Irq__fired(void) {
  Atm128GpioInterruptC__1__Atm128Interrupt__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128InterruptPinP__4__Irq__fired() {
%1 = tail call i32 (...) @Atm128GpioInterruptC__1__Atm128Interrupt__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Write(int, int /*<<< orphan*/ *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_turn(long a) { Write(29, NULL, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_turn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1d,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_turn>:
mov    %rdi,%rdx
mov    $0x1d,%edi
xor    %esi,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
define void @send_turn(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @Write(i32 29, i32* null, i64 %3, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @send_turn(i64 %0) {
%2 = tail call i32 @Write(i32 29, i32* null, i64 %0, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f1(long);
int f2(long);
int f3(long);
int f4(long);
int f5(long);
int f6(long);
main() {
  long a = 0x89ABCDEF;
  if (f1(a) != 0x89000000L || f2(a) != 0x00ABCDEFL || f3(a) != 0x000000EFL ||
      f4(a) != 0x89ABCD00L || f5(a) != 0x0000CDEFL || f6(a) != 0x89AB0000L)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x89abcdef,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <f1@plt>
cltq
mov    $0x89000000,%ecx
cmp    %rcx,%rax
jne    1228 <main+0xa8>
mov    -0x10(%rbp),%rdi
call   1030 <f2@plt>
cltq
cmp    $0xabcdef,%rax
jne    1228 <main+0xa8>
mov    -0x10(%rbp),%rdi
call   1060 <f3@plt>
cltq
cmp    $0xef,%rax
jne    1228 <main+0xa8>
mov    -0x10(%rbp),%rdi
call   10a0 <f4@plt>
cltq
mov    $0x89abcd00,%ecx
cmp    %rcx,%rax
jne    1228 <main+0xa8>
mov    -0x10(%rbp),%rdi
call   1080 <f5@plt>
cltq
cmp    $0xcdef,%rax
jne    1228 <main+0xa8>
mov    -0x10(%rbp),%rdi
call   1040 <f6@plt>
cltq
mov    $0x89ab0000,%ecx
cmp    %rcx,%rax
je     122f <main+0xaf>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x89abcdef,%edi
call   1040 <f1@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 2309737967, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @f1(i64 %3)
%5 = sext i32 %4 to i64
%6 = icmp ne i64 %5, 2298478592
br i1 %6, label %32, label %7
7: ; preds = %0
%8 = load i64, i64* %2
%9 = call i32 @f2(i64 %8)
%10 = sext i32 %9 to i64
%11 = icmp ne i64 %10, 11259375
br i1 %11, label %32, label %12
12: ; preds = %7
%13 = load i64, i64* %2
%14 = call i32 @f3(i64 %13)
%15 = sext i32 %14 to i64
%16 = icmp ne i64 %15, 239
br i1 %16, label %32, label %17
17: ; preds = %12
%18 = load i64, i64* %2
%19 = call i32 @f4(i64 %18)
%20 = sext i32 %19 to i64
%21 = icmp ne i64 %20, 2309737728
br i1 %21, label %32, label %22
22: ; preds = %17
%23 = load i64, i64* %2
%24 = call i32 @f5(i64 %23)
%25 = sext i32 %24 to i64
%26 = icmp ne i64 %25, 52719
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i64, i64* %2
%29 = call i32 @f6(i64 %28)
%30 = sext i32 %29 to i64
%31 = icmp ne i64 %30, 2309685248
br i1 %31, label %32, label %34
32: ; preds = %27, %22, %17, %12, %7, %0
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %27
%35 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f1(i64 2309737967)
%2 = tail call i32 (...) @abort()
unreachable
}
int h(int e) {
  while (e < 10) {
    if (e < -10) {
      continue;
    }
    if (e < 0) {
      break;
    }
    e = e - 1;
  }
  return e;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    113d <h+0x3d>
cmpl   $0xfffffff6,-0x4(%rbp)
jge    1120 <h+0x20>
jmp    1107 <h+0x7>
cmpl   $0x0,-0x4(%rbp)
jge    112f <h+0x2f>
jmp    113d <h+0x3d>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <h+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
cmp    $0x9,%edi
jg     1144 <h+0x44>
cmp    $0xffffffff,%edi
mov    $0xffffffff,%eax
cmovl  %edi,%eax
cmp    $0xfffffff5,%edi
mov    $0xfffffff5,%edx
cmovl  %edi,%edx
mov    %edi,%ecx
sub    %edx,%ecx
mov    %edi,%edx
sub    %eax,%edx
cmp    %edx,%ecx
jbe    1140 <h+0x40>
add    $0x1,%edi
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%edi
js     1142 <h+0x42>
cmp    %edx,%ecx
ja     1130 <h+0x30>
nopl   0x0(%rax)
jmp    1140 <h+0x40>
mov    %eax,%edi
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %3, label %16
3: ; preds = %1
%4 = call i32 @llvm.smin.i32(i32 %0, i32 -1)
%5 = call i32 @llvm.smin.i32(i32 %0, i32 -11)
%6 = sub i32 %0, %5
%7 = sub i32 %0, %4
%8 = icmp ugt i32 %6, %7
br i1 %8, label %13, label %11
9: ; preds = %13
%10 = add nsw i32 %14, -1
br i1 %8, label %13, label %11
11: ; preds = %9, %3
br label %12
12: ; preds = %11, %12
br label %12
13: ; preds = %3, %9
%14 = phi i32 [ %10, %9 ], [ %0, %3 ]
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %9
16: ; preds = %13, %1
%17 = phi i32 [ %0, %1 ], [ %4, %13 ]
ret i32 %17
}
void m1sdr_PlayStart(void) {}


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

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

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

LLVM IR (-O2):
define void @m1sdr_PlayStart() {
ret void
}
void outl(x) {
  wrc(' ');
  wrc('L');
  wrn(x);
  wrc(' ');
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
mov    $0x4c,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <wrn@plt>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
push   %rbx
mov    %edi,%ebx
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <wrc@plt>
mov    $0x4c,%edi
xor    %eax,%eax
call   1030 <wrc@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <wrn@plt>
mov    $0x20,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <wrc@plt>

LLVM IR (-O0):
define void @outl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%4 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 76)
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
ret void
}

LLVM IR (-O2):
define void @outl(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 76)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %0)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
void read_word(u_int32_t *w, FILE *f) { fread(w, 4, 1, f); }


x86 assembly (clang, -O0):
<read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_word>:
mov    %rsi,%rcx
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define void @read_word(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fread(i32* %0, i32 4, i32 1, i32* %1)
ret void
}
int test_imm_56uint8_reg(unsigned char val) {
  return ((val) & (-0x56 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_56uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffaa,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_56uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -86
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
short ShortSwap(short);
short BigShort(short l) { return ShortSwap(l); }


x86 assembly (clang, -O0):
<BigShort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1030 <ShortSwap@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BigShort>:
jmp    1030 <ShortSwap@plt>

LLVM IR (-O0):
define signext i16 @BigShort(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call signext i16 @ShortSwap(i16 signext %3)
ret i16 %4
}

LLVM IR (-O2):
define signext i16 @BigShort(i16 signext %0) {
%2 = tail call signext i16 @ShortSwap(i16 signext %0)
ret i16 %2
}
void XkbGetGeometry() {}


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

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

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

LLVM IR (-O2):
define void @XkbGetGeometry() {
ret void
}
/* Variables and functions */
char *hmalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *hstrdup(const char *s) {
  char *p;
  p = hmalloc(strlen(s) + 1);
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<hstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <hmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <hmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @hstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @hmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @hstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @hmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int strlen(char *);
char *strip_newline(char *string) {
  if (string[strlen(string) - 1] == '\n')
    string[strlen(string) - 1] = '\0';
  return string;
}


x86 assembly (clang, -O0):
<strip_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1167 <strip_newline+0x57>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_newline>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1131 <strip_newline+0x21>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strip_newline(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = tail call i32 @strlen(i8* %0)
%10 = add nsw i32 %9, -1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %8, %1
ret i8* %0
}
void McASPRxReset(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x60)))) = 0x0;
}


x86 assembly (clang, -O0):
<McASPRxReset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%eax
mov    %eax,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPRxReset>:
add    $0x60,%edi
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @McASPRxReset(i32 %0) {
%2 = add i32 %0, 96
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
store volatile i32 0, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
unsigned short getshort(FILE *inf) {
  unsigned char buf[2];
  fread(buf, 2, 1, inf);
  return ((buf[0] << 8) + (buf[1] << 0));
}


x86 assembly (clang, -O0):
<getshort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzbl -0xa(%rbp),%eax
shl    $0x8,%eax
movzbl -0x9(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshort>:
push   %rax
mov    %rdi,%rcx
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzwl 0x6(%rsp),%eax
rol    $0x8,%ax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @getshort(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 2, i32 1, i32* %5)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 0
%15 = add nsw i32 %10, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @getshort(i32* nocapture %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 2, i32 1, i32* %0)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i16
%11 = or i16 %7, %10
ret i16 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int callFun(int x) { printf("%d\n", x); }


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

x86 assembly (clang, -O2):
<callFun>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @callFun(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ useconds_t;

/* Variables and functions */
int /*<<< orphan*/ usleep(int /*<<< orphan*/);
void delay(long millis) { usleep((useconds_t)(millis * 1000)); }


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
imul   $0x3e8,-0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @delay(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 1000
%5 = trunc i64 %4 to i32
%6 = call i32 @usleep(i32 %5)
ret void
}

LLVM IR (-O2):
define void @delay(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = mul i32 %2, 1000
%4 = tail call i32 @usleep(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ erase();
int /*<<< orphan*/ refresh();
void free_ncurses(void) {
  erase();
  refresh();
  endwin();
}


x86 assembly (clang, -O0):
<free_ncurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_ncurses>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <endwin@plt>

LLVM IR (-O0):
define void @free_ncurses() {
%1 = call i32 (...) @erase()
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @free_ncurses() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @endwin()
ret void
}
void vpu_hfi_deinit_qhdr(struct hfi_queue_header *qhdr) {}


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

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

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

LLVM IR (-O2):
%struct.hfi_queue_header = type opaque
define void @vpu_hfi_deinit_qhdr(%struct.hfi_queue_header* nocapture %0) {
ret void
}
void gpio_fec_active(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_fec_active() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test() { printf("nihao\n\r"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"nihao\0A\0D\00"
define void @test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"nihao\0A\0D\00"
define void @test() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
int /*<<< orphan*/ output_newline();
void end_table(void) {
  output_newline();
  output_line("};");
}


x86 assembly (clang, -O0):
<end_table>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <output_newline@plt>
lea    0xece(%rip),%rdi
call   1030 <output_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_table>:
push   %rax
xor    %eax,%eax
call   1040 <output_newline@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <output_line@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"};\00"
define void @end_table() {
%1 = call i32 (...) @output_newline()
%2 = call i32 @output_line(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"};\00"
define void @end_table() {
%1 = tail call i32 (...) @output_newline()
%2 = tail call i32 @output_line(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cx18_stream {
  int dummy;
};
struct cx18_queue {
  int dummy;
};
struct cx18_buffer {
  int dummy;
};

/* Variables and functions */
struct cx18_queue *_cx18_enqueue(struct cx18_stream *, struct cx18_buffer *,
                                 struct cx18_queue *, int);
struct cx18_queue *cx18_push(struct cx18_stream *s, struct cx18_buffer *buf,
                             struct cx18_queue *q) {
  return _cx18_enqueue(s, buf, q, 1);
}


x86 assembly (clang, -O0):
<cx18_push>:
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),%rdx
mov    $0x1,%ecx
call   1030 <_cx18_enqueue@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cx18_push>:
mov    $0x1,%ecx
jmp    1030 <_cx18_enqueue@plt>

LLVM IR (-O0):
%struct.cx18_stream = type { i32 }
%struct.cx18_buffer = type { i32 }
%struct.cx18_queue = type { i32 }
define %struct.cx18_queue* @cx18_push(%struct.cx18_stream* %0, %struct.cx18_buffer* %1, %struct.cx18_queue* %2) {
%4 = alloca %struct.cx18_stream*
%5 = alloca %struct.cx18_buffer*
%6 = alloca %struct.cx18_queue*
store %struct.cx18_stream* %0, %struct.cx18_stream** %4
store %struct.cx18_buffer* %1, %struct.cx18_buffer** %5
store %struct.cx18_queue* %2, %struct.cx18_queue** %6
%7 = load %struct.cx18_stream*, %struct.cx18_stream** %4
%8 = load %struct.cx18_buffer*, %struct.cx18_buffer** %5
%9 = load %struct.cx18_queue*, %struct.cx18_queue** %6
%10 = call %struct.cx18_queue* @_cx18_enqueue(%struct.cx18_stream* %7, %struct.cx18_buffer* %8, %struct.cx18_queue* %9, i32 1)
ret %struct.cx18_queue* %10
}

LLVM IR (-O2):
%struct.cx18_stream = type { i32 }
%struct.cx18_buffer = type { i32 }
%struct.cx18_queue = type { i32 }
define %struct.cx18_queue* @cx18_push(%struct.cx18_stream* %0, %struct.cx18_buffer* %1, %struct.cx18_queue* %2) {
%4 = tail call %struct.cx18_queue* @_cx18_enqueue(%struct.cx18_stream* %0, %struct.cx18_buffer* %1, %struct.cx18_queue* %2, i32 1)
ret %struct.cx18_queue* %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int read_dobldobl_start_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(763, a, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @read_dobldobl_start_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 763, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int do_466() { return 466; }


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

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

LLVM IR (-O0):
define i32 @do_466() {
ret i32 466
}

LLVM IR (-O2):
define i32 @do_466() {
ret i32 466
}
void tmove(h, v) long h, v;
{ move((int)h, (int)v); }


x86 assembly (clang, -O0):
<tmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0x0,%al
call   1030 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tmove(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 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @tmove(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret void
}
gdec(lval) int lval[];
{
  if (lval[2] == (2 << 2))
    ol("subd\t#2");
  else
    ol("subd\t#1");
}


x86 assembly (clang, -O0):
<gdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x8,0x8(%rax)
jne    113d <gdec+0x2d>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
jmp    114b <gdec+0x3b>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdec>:
cmpl   $0x8,0x8(%rdi)
lea    0xee5(%rip),%rax
lea    0xee6(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"subd\09\00"
@.str.1 = [8 x i8] c"subd\09\00"
define i32 @gdec(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 8
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %1
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"subd\09\00"
@.str.1 = [8 x i8] c"subd\09\00"
define i32 @gdec(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 8
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i, j;
  i = 1;
  if (j)
    goto l;
  i = 2;
l:;
  assert(i == 1 || !j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <main+0x25>
jmp    113c <main+0x2c>
movl   $0x2,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1157 <main+0x47>
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
br label %8
7: ; preds = %0
store i32 2, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ true, %8 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
unsigned long ___ia64_readq(void *addr) {
  return *(volatile unsigned long *)addr;
}


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

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

LLVM IR (-O0):
define i64 @___ia64_readq(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @___ia64_readq(i8* %0) {
%2 = bitcast i8* %0 to i64*
%3 = load volatile i64, i64* %2
ret i64 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int bits_per_rgb;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
void set_Visual_bits_per_rgb(void *_p, int _v) {
  ((Visual *)_p)->bits_per_rgb = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_Visual_bits_per_rgb>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_Visual_bits_per_rgb(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atmel_atmega328_PD0_clear__E();
void test22_Blink3_pollen__reset__E() { atmel_atmega328_PD0_clear__E(); }


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

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

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

LLVM IR (-O2):
define void @test22_Blink3_pollen__reset__E() {
%1 = tail call i32 (...) @atmel_atmega328_PD0_clear__E()
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t __MIN(int64_t a, int64_t b) { return (a < b ? a : b); }


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

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

LLVM IR (-O0):
define i64 @__MIN(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 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @__MIN(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
__m128i test__slli_si128(__m128i a) { return _mm_slli_si128(a, 3); }


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

x86 assembly (clang, -O2):
<test__slli_si128>:
mov    $0x3,%esi
jmp    1030 <_mm_slli_si128@plt>

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

LLVM IR (-O2):
define i32 @test__slli_si128(i32 %0) {
%2 = tail call i32 @_mm_slli_si128(i32 %0, i32 3)
ret i32 %2
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nmemb, size_t size) {
  void *mp;
  nmemb = nmemb * size;
  if (mp = malloc(nmemb))
    memset(mp, 0, nmemb);
  return (mp);
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1163 <calloc+0x43>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul i64 %6, %7
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = load i64, i64* %3
%15 = call i32 @memset(i8* %13, i32 0, i64 %14)
br label %16
16: ; preds = %12, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
int security_sem_semop(struct sem_array *sma, int semid, struct sembuf *sops,
                       unsigned nsops, int alter) {
  return 0;
}


x86 assembly (clang, -O0):
<security_sem_semop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sem_array = type opaque
%struct.sembuf = type opaque
define i32 @security_sem_semop(%struct.sem_array* %0, i32 %1, %struct.sembuf* %2, i32 %3, i32 %4) {
%6 = alloca %struct.sem_array*
%7 = alloca i32
%8 = alloca %struct.sembuf*
%9 = alloca i32
%10 = alloca i32
store %struct.sem_array* %0, %struct.sem_array** %6
store i32 %1, i32* %7
store %struct.sembuf* %2, %struct.sembuf** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
%struct.sem_array = type opaque
%struct.sembuf = type opaque
define i32 @security_sem_semop(%struct.sem_array* nocapture readnone %0, i32 %1, %struct.sembuf* nocapture readnone %2, i32 %3, i32 %4) {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16r4(uint16_t x) { return (x >> 4) | (x << 12); }


x86 assembly (clang, -O0):
<rot16r4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    -0x4(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16r4>:
mov    %edi,%eax
sar    $0x4,%eax
shl    $0xc,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot16r4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = load i32, i32* %2
%6 = shl i32 %5, 12
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16r4(i32 %0) {
%2 = ashr i32 %0, 4
%3 = shl i32 %0, 12
%4 = or i32 %2, %3
ret i32 %4
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ __list_splice_tail(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_empty(struct list_head *);
void list_splice_tail_init(struct list_head *list, struct list_head *head) {
  if (!list_empty(list)) {
    __list_splice_tail(list, head);
    INIT_LIST_HEAD(list);
  }
}


x86 assembly (clang, -O0):
<list_splice_tail_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
jne    1168 <list_splice_tail_init+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__list_splice_tail@plt>
mov    -0x8(%rbp),%rdi
call   1040 <INIT_LIST_HEAD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice_tail_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <list_empty@plt>
test   %eax,%eax
je     114b <list_splice_tail_init+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <__list_splice_tail@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_splice_tail_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_empty(%struct.list_head* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load %struct.list_head*, %struct.list_head** %3
%10 = load %struct.list_head*, %struct.list_head** %4
%11 = call i32 @__list_splice_tail(%struct.list_head* %9, %struct.list_head* %10)
%12 = load %struct.list_head*, %struct.list_head** %3
%13 = call i32 @INIT_LIST_HEAD(%struct.list_head* %12)
br label %14
14: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_splice_tail_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_empty(%struct.list_head* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @__list_splice_tail(%struct.list_head* %0, %struct.list_head* %1)
%7 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
br label %8
8: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int int8_t;

/* Variables and functions */
int readByte(int, int, int *);
int8_t readBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum,
               uint8_t *data) {
  uint8_t b;
  uint8_t count = readByte(devAddr, regAddr, &b);
  *data = b & (1 << bitNum);
  return count;
}


x86 assembly (clang, -O0):
<readBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x1c(%rbp),%rdx
call   1030 <readByte@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x24(%rbp),%ecx
and    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readBit>:
push   %rbp
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%ebp
lea    0x4(%rsp),%rdx
call   1030 <readByte@plt>
mov    $0x1,%edx
mov    %ebp,%ecx
shl    %cl,%edx
and    0x4(%rsp),%edx
mov    %edx,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @readBit(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @readByte(i32 %11, i32 %12, i32* %9)
store i32 %13, i32* %10
%14 = load i32, i32* %9
%15 = load i32, i32* %7
%16 = shl i32 1, %15
%17 = and i32 %14, %16
%18 = load i32*, i32** %8
store i32 %17, i32* %18
%19 = load i32, i32* %10
ret i32 %19
}

LLVM IR (-O2):
define i32 @readBit(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @readByte(i32 %0, i32 %1, i32* %5)
%8 = load i32, i32* %5
%9 = shl nuw i32 1, %2
%10 = and i32 %8, %9
store i32 %10, i32* %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("This is a simple Makefile based \"mpro\" target.\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"This is a simple Makefile based \22mpro\22 target.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [47 x i8] c"This is a simple Makefile based \22mpro\22 target.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void foo_1_2_2_2_2_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_2_2_1_2() {
ret void
}
/* Type definitions */
typedef int uint64_t;
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int floor(int);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t currentTimeMillis() {
  struct timeval te;
  gettimeofday(&te, NULL);
  uint64_t millis = (uint64_t)te.tv_sec * 1000 + floor(te.tv_usec / 1000);
  return millis;
}


x86 assembly (clang, -O0):
<currentTimeMillis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentTimeMillis>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%ebx
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
call   1040 <floor@plt>
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @currentTimeMillis() {
%1 = alloca %struct.timeval
%2 = alloca i32
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = call i32 @floor(i32 %10)
%12 = add nsw i32 %7, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @currentTimeMillis() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = tail call i32 @floor(i32 %10)
%12 = add nsw i32 %7, %11
ret i32 %12
}