xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _Warning(long, char *);
void Warning_UnicodeEscapeTooBig(long p_position) {
  _Warning(p_position, "Unicode escape sequence too big, replaced with U+FFFD");
}


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

x86 assembly (clang, -O2):
<Warning_UnicodeEscapeTooBig>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Warning@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"Unicode escape sequence too big, replaced with U+FFFD\00"
define void @Warning_UnicodeEscapeTooBig(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Warning(i64 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"Unicode escape sequence too big, replaced with U+FFFD\00"
define void @Warning_UnicodeEscapeTooBig(i64 %0) {
%2 = tail call i32 @_Warning(i64 %0, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}
int pp_yywrap(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @pp_yywrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @pp_yywrap() {
ret i32 1
}
void gettext__error(const unsigned char *str) {}


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

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

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

LLVM IR (-O2):
define void @gettext__error(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void killpidpath() { unlink("/var/run/rtmpserver.pid"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"/var/run/rtmpserver.pid\00"
define void @killpidpath() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"/var/run/rtmpserver.pid\00"
define void @killpidpath() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
void sh_pid() { printf("%d\n", getpid()); }


x86 assembly (clang, -O0):
<sh_pid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sh_pid>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @sh_pid() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ autoupdatebob(int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basAutoUpdateBob() {
  int m;
  m = popNumber();
  pushNumber(autoupdatebob(m));
}


x86 assembly (clang, -O0):
<basAutoUpdateBob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <autoupdatebob@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basAutoUpdateBob>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <autoupdatebob@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basAutoUpdateBob() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @autoupdatebob(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basAutoUpdateBob() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @autoupdatebob(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
int main(argc, argv)
int argc;
char **argv;
{
  while (--argc > 0)
    printf("%s\n", stem((unsigned char *)*++argv));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1177 <main+0x57>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <stem@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1162 <main+0x42>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x8,%rbx
add    $0x1,%ebp
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    (%rbx),%rdi
xor    %eax,%eax
call   1030 <stem@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
ja     1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i8** [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = add nsw i32 %6, -1
%8 = getelementptr inbounds i8*, i8** %5, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @stem to i32 (i8*, ...)*)(i8* %9)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp ugt i32 %6, 2
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret i32 0
}
int test8(int l) { return ~l >= 2; }


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x2,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8>:
xor    %eax,%eax
cmp    $0xfffffffe,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @test8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = icmp sge i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test8(i32 %0) {
%2 = icmp slt i32 %0, -2
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int dow(int);
int hour(int);
int month(int);
int tdm(int);
int seasonMode(int i, int Mode) {
  switch (Mode) {
  case 1:
    return hour(i);
  case 2:
    return dow(i);
  case 3:
    return tdm(i);
  case 4:
    return month(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<seasonMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     11b7 <seasonMode+0x77>
mov    -0x18(%rbp),%rax
lea    0xe92(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%edi
call   1030 <hour@plt>
mov    %eax,-0x4(%rbp)
jmp    11be <seasonMode+0x7e>
mov    -0x8(%rbp),%edi
call   1060 <dow@plt>
mov    %eax,-0x4(%rbp)
jmp    11be <seasonMode+0x7e>
mov    -0x8(%rbp),%edi
call   1040 <tdm@plt>
mov    %eax,-0x4(%rbp)
jmp    11be <seasonMode+0x7e>
mov    -0x8(%rbp),%edi
call   1050 <month@plt>
mov    %eax,-0x4(%rbp)
jmp    11be <seasonMode+0x7e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seasonMode>:
add    $0xffffffff,%esi
cmp    $0x3,%esi
ja     115d <seasonMode+0x1d>
lea    0xeb1(%rip),%rax
movslq (%rax,%rsi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
jmp    1030 <hour@plt>
xor    %eax,%eax
ret
jmp    1060 <dow@plt>
jmp    1040 <tdm@plt>
jmp    1050 <month@plt>

LLVM IR (-O0):
define i32 @seasonMode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
switch i32 %6, label %19 [
i32 1, label %7
i32 2, label %10
i32 3, label %13
i32 4, label %16
]
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @hour(i32 %8)
store i32 %9, i32* %3
br label %20
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 @dow(i32 %11)
store i32 %12, i32* %3
br label %20
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @tdm(i32 %14)
store i32 %15, i32* %3
br label %20
16: ; preds = %2
%17 = load i32, i32* %4
%18 = call i32 @month(i32 %17)
store i32 %18, i32* %3
br label %20
19: ; preds = %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %16, %13, %10, %7
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @seasonMode(i32 %0, i32 %1) {
switch i32 %1, label %11 [
i32 1, label %3
i32 2, label %5
i32 3, label %7
i32 4, label %9
]
3: ; preds = %2
%4 = tail call i32 @hour(i32 %0)
br label %11
5: ; preds = %2
%6 = tail call i32 @dow(i32 %0)
br label %11
7: ; preds = %2
%8 = tail call i32 @tdm(i32 %0)
br label %11
9: ; preds = %2
%10 = tail call i32 @month(i32 %0)
br label %11
11: ; preds = %2, %9, %7, %5, %3
%12 = phi i32 [ %10, %9 ], [ %8, %7 ], [ %6, %5 ], [ %4, %3 ], [ 0, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, unsigned char);
int /*<<< orphan*/ stderr;
void baudot_skip_warning(char char_out) {
  unsigned char byte = char_out;
  fprintf(stderr, "W: baudot skipping non-encodable character '%c' 0x%02x\n",
          char_out, byte);
}


x86 assembly (clang, -O0):
<baudot_skip_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%al
lea    0xec9(%rip),%rsi
movsbl %al,%edx
movzbl -0x2(%rbp),%ecx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baudot_skip_warning>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
movzbl %dl,%ecx
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"W: baudot skipping non-encodable character '%c' 0x%02x\0A\00"
define void @baudot_skip_warning(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
store i8 %4, i8* %3
%5 = load i32, i32* @stderr
%6 = load i8, i8* %2
%7 = load i8, i8* %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"W: baudot skipping non-encodable character '%c' 0x%02x\0A\00"
define void @baudot_skip_warning(i8 signext %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8 zeroext %0)
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void PWMOutputState(uint32_t ui32Base, uint32_t ui32PWMOutBits, bool bEnable) {
  ;

  ;
  if (bEnable == true) {
    (*((volatile uint32_t *)(ui32Base + 0x00000008))) |= ui32PWMOutBits;
  } else {
    (*((volatile uint32_t *)(ui32Base + 0x00000008))) &= ~(ui32PWMOutBits);
  }
}


x86 assembly (clang, -O0):
<PWMOutputState>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1131 <PWMOutputState+0x31>
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x8(%rax)
jmp    1148 <PWMOutputState+0x48>
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMOutputState>:
mov    %rdi,-0x10(%rsp)
mov    %rsi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
cmp    $0x1,%edx
jne    111e <PWMOutputState+0x1e>
mov    -0x10(%rsp),%rcx
or     %rax,0x8(%rcx)
ret
not    %rax
mov    -0x10(%rsp),%rcx
and    %rax,0x8(%rcx)
ret

LLVM IR (-O0):
define void @PWMOutputState(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store volatile i64 %0, i64* %4
store volatile i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load volatile i64, i64* %5
%11 = load volatile i64, i64* %4
%12 = add nsw i64 %11, 8
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = or i64 %14, %10
store volatile i64 %15, i64* %13
br label %24
16: ; preds = %3
%17 = load volatile i64, i64* %5
%18 = xor i64 %17, -1
%19 = load volatile i64, i64* %4
%20 = add nsw i64 %19, 8
%21 = inttoptr i64 %20 to i64*
%22 = load volatile i64, i64* %21
%23 = and i64 %22, %18
store volatile i64 %23, i64* %21
br label %24
24: ; preds = %16, %9
ret void
}

LLVM IR (-O2):
define void @PWMOutputState(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %4
store volatile i64 %1, i64* %5
%6 = icmp eq i32 %2, 1
%7 = load volatile i64, i64* %5
br i1 %6, label %8, label %14
8: ; preds = %3
%9 = load volatile i64, i64* %4
%10 = add nsw i64 %9, 8
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %7
store volatile i64 %13, i64* %11
br label %21
14: ; preds = %3
%15 = xor i64 %7, -1
%16 = load volatile i64, i64* %4
%17 = add nsw i64 %16, 8
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = and i64 %19, %15
store volatile i64 %20, i64* %18
br label %21
21: ; preds = %14, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, j;
  j = 5;
  scanf("%d", &i);
  i = i * j + i * (i * j - j * j + i);
  printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0xc(%rbp),%edx
mov    -0xc(%rbp),%esi
imul   -0xc(%rbp),%esi
sub    %esi,%edx
add    -0x8(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,1),%esi
add    $0xffffffe7,%esi
imul   %eax,%esi
add    %ecx,%esi
mov    %esi,0x4(%rsp)
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 5
%6 = add i32 %4, -25
%7 = add i32 %6, %5
%8 = mul nsw i32 %7, %4
%9 = add nsw i32 %8, %5
store i32 %9, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void on_button_press(union ui_state *state, int button, int x, int y) {}


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

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

LLVM IR (-O0):
%union.ui_state = type opaque
define void @on_button_press(%union.ui_state* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %union.ui_state*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %union.ui_state* %0, %union.ui_state** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%union.ui_state = type opaque
define void @on_button_press(%union.ui_state* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
void wpcap_packet_load(void) { return; }


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

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

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

LLVM IR (-O2):
define void @wpcap_packet_load() {
ret void
}
/* Variables and functions */
char *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *const, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
char *echogets(char *s, int echo) {
  char *const retval = fgets(s, 2048, stdin);
  if (echo != 0 && retval != NULL) {
    fputs(retval, stderr);
  }
  return retval;
}


x86 assembly (clang, -O0):
<echogets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    $0x800,%esi
call   1040 <fgets@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1171 <echogets+0x51>
cmpq   $0x0,-0x18(%rbp)
je     1171 <echogets+0x51>
mov    -0x18(%rbp),%rdi
mov    0x2e6e(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echogets>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
mov    $0x800,%esi
call   1040 <fgets@plt>
mov    %rax,%rbx
test   %ebp,%ebp
je     1155 <echogets+0x35>
test   %rbx,%rbx
je     1155 <echogets+0x35>
mov    0x2e8d(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@stderr = global i32 0
define i8* @echogets(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i8* @fgets(i8* %0, i32 2048, i32 %3)
%5 = icmp ne i32 %1, 0
%6 = icmp ne i8* %4, null
%7 = select i1 %5, i1 %6, i1 false
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputs(i8* %4, i32 %9)
br label %11
11: ; preds = %8, %2
ret i8* %4
}
/* Variables and functions */
int __ctype_toupper(int);
int toupper(int c) { return __ctype_toupper(c); }


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

x86 assembly (clang, -O2):
<toupper>:
jmp    1030 <__ctype_toupper@plt>

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i32 @__ctype_toupper(i32 %0)
ret i32 %2
}
int slt_nand_test(unsigned int chip_id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @slt_nand_test(i32 %0) {
ret i32 0
}
__attribute__((no, noclone)) unsigned __int128 t122_3mul(signed __int128 y) {
  unsigned __int128 r;
  if (__builtin_mul_overflow((signed __int128)(0), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t122_3mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
test   $0x1,%al
jne    114f <t122_3mul+0x3f>
jmp    1156 <t122_3mul+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define { i64, i64 } @t122_3mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.smul.with.overflow.i129(i129 0, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t122_3mul(i64 %0, i64 %1) {
ret { i64, i64 } zeroinitializer
}
/* Variables and functions */
int pow(double, double);
double getucf(double order) {
  if (order < 0.0)
    order = 0.0;
  if (order == 1.0)
    return (1.0);
  else
    return (1. / pow(28.317, (order - 1.0)));
}


x86 assembly (clang, -O0):
<getucf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1133 <getucf+0x23>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1162 <getucf+0x52>
jp     1162 <getucf+0x52>
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1195 <getucf+0x85>
movsd  -0x10(%rbp),%xmm1
movsd  0xe91(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe8d(%rip),%xmm0
call   1030 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe74(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getucf>:
push   %rax
xorpd  %xmm1,%xmm1
maxsd  %xmm0,%xmm1
movsd  0xedf(%rip),%xmm0
ucomisd %xmm0,%xmm1
jne    112b <getucf+0x1b>
jp     112b <getucf+0x1b>
pop    %rax
ret
addsd  0xed5(%rip),%xmm1
movsd  0xed5(%rip),%xmm0
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xeb1(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @getucf(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %3
br label %7
7: ; preds = %6, %1
%8 = load double, double* %3
%9 = fcmp oeq double %8, 1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e+00, double* %2
br label %17
11: ; preds = %7
%12 = load double, double* %3
%13 = fsub double %12, 1.000000e+00
%14 = call i32 @pow(double 2.831700e+01, double %13)
%15 = sitofp i32 %14 to double
%16 = fdiv double 1.000000e+00, %15
store double %16, double* %2
br label %17
17: ; preds = %11, %10
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @getucf(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double 0.000000e+00, double %0
%4 = fcmp oeq double %3, 1.000000e+00
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = fadd double %3, -1.000000e+00
%7 = tail call i32 @pow(double 2.831700e+01, double %6)
%8 = sitofp i32 %7 to double
%9 = fdiv double 1.000000e+00, %8
br label %10
10: ; preds = %1, %5
%11 = phi double [ %9, %5 ], [ 1.000000e+00, %1 ]
ret double %11
}
int varchar(char x) {
  if (x == 'x' || x == 'y' || x == 'z') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<varchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x78,%eax
je     1131 <varchar+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     1131 <varchar+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    113d <varchar+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <varchar+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<varchar>:
add    $0x88,%dil
xor    %eax,%eax
cmp    $0x3,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @varchar(i8 signext %0) {
%2 = add i8 %0, -120
%3 = icmp ult i8 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct yaffs_obj {
  int dummy;
};

/* Variables and functions */
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *, char const *);
int yaffs_unlink_obj(struct yaffs_obj *);
int yaffs_unlinker(struct yaffs_obj *dir, const char *name) {
  struct yaffs_obj *obj;
  obj = yaffs_find_by_name(dir, name);
  return yaffs_unlink_obj(obj);
}


x86 assembly (clang, -O0):
<yaffs_unlinker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <yaffs_find_by_name@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <yaffs_unlink_obj@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_unlinker>:
push   %rax
call   1030 <yaffs_find_by_name@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <yaffs_unlink_obj@plt>

LLVM IR (-O0):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_unlinker(%struct.yaffs_obj* %0, i8* %1) {
%3 = alloca %struct.yaffs_obj*
%4 = alloca i8*
%5 = alloca %struct.yaffs_obj*
store %struct.yaffs_obj* %0, %struct.yaffs_obj** %3
store i8* %1, i8** %4
%6 = load %struct.yaffs_obj*, %struct.yaffs_obj** %3
%7 = load i8*, i8** %4
%8 = call %struct.yaffs_obj* @yaffs_find_by_name(%struct.yaffs_obj* %6, i8* %7)
store %struct.yaffs_obj* %8, %struct.yaffs_obj** %5
%9 = load %struct.yaffs_obj*, %struct.yaffs_obj** %5
%10 = call i32 @yaffs_unlink_obj(%struct.yaffs_obj* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_unlinker(%struct.yaffs_obj* %0, i8* %1) {
%3 = tail call %struct.yaffs_obj* @yaffs_find_by_name(%struct.yaffs_obj* %0, i8* %1)
%4 = tail call i32 @yaffs_unlink_obj(%struct.yaffs_obj* %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int tlv_get_length(int /*<<< orphan*/ const *);
bool tlv_validate_param(const uint8_t *p_tlv, const uint8_t *p_tlv_n,
                        uint16_t i_length) {
  uint16_t i_tlv_size = tlv_get_length(p_tlv);
  return (p_tlv_n + i_length - p_tlv <= i_tlv_size);
}


x86 assembly (clang, -O0):
<tlv_validate_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <tlv_get_length@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
movslq -0x18(%rbp),%rcx
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlv_validate_param>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <tlv_get_length@plt>
movslq %ebp,%rcx
lea    (%r14,%rcx,4),%rcx
sub    %rbx,%rcx
sar    $0x2,%rcx
movslq %eax,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
setle  %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @tlv_validate_param(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = call i32 @tlv_get_length(i32* %8)
store i32 %9, i32* %7
%10 = load i32*, i32** %5
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32*, i32** %4
%15 = ptrtoint i32* %13 to i64
%16 = ptrtoint i32* %14 to i64
%17 = sub i64 %15, %16
%18 = sdiv exact i64 %17, 4
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = icmp sle i64 %18, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @tlv_validate_param(i32* %0, i32* %1, i32 %2) {
%4 = tail call i32 @tlv_get_length(i32* %0)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %1, i64 %5
%7 = ptrtoint i32* %6 to i64
%8 = ptrtoint i32* %0 to i64
%9 = sub i64 %7, %8
%10 = ashr exact i64 %9, 2
%11 = sext i32 %4 to i64
%12 = icmp sle i64 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void ASN1_UTCTIME_new(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_UTCTIME_new() {
ret void
}
int pcre_config(int what, void *where) {
  switch (what) {
  case 0:
    *((int *)where) = 0;
    break;
  case 1:
    *((int *)where) = '\x0D';
    break;
  case 2:
    *((int *)where) = 2;
    break;
  case 3:
    *((int *)where) = 10;
    break;
  case 4:
    *((unsigned int *)where) = 10000000;
    break;
  default:
    return (-3);
  }
  return 0;
}


x86 assembly (clang, -O0):
<pcre_config>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x4,%rax
ja     117b <pcre_config+0x7b>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0xd,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0xa,(%rax)
jmp    1187 <pcre_config+0x87>
mov    -0x10(%rbp),%rax
movl   $0x989680,(%rax)
jmp    1187 <pcre_config+0x87>
movl   $0xfffffffd,-0x4(%rbp)
jmp    118e <pcre_config+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcre_config>:
mov    $0xfffffffd,%eax
cmp    $0x4,%edi
ja     111b <pcre_config+0x1b>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @pcre_config(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
switch i32 %6, label %22 [
i32 0, label %7
i32 1, label %10
i32 2, label %13
i32 3, label %16
i32 4, label %19
]
7: ; preds = %2
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
store i32 0, i32* %9
br label %23
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
store i32 13, i32* %12
br label %23
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = bitcast i8* %14 to i32*
store i32 2, i32* %15
br label %23
16: ; preds = %2
%17 = load i8*, i8** %5
%18 = bitcast i8* %17 to i32*
store i32 10, i32* %18
br label %23
19: ; preds = %2
%20 = load i8*, i8** %5
%21 = bitcast i8* %20 to i32*
store i32 10000000, i32* %21
br label %23
22: ; preds = %2
store i32 -3, i32* %3
br label %24
23: ; preds = %19, %16, %13, %10, %7
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@switch.table.pcre_config = [5 x i32] [i32 0, i32 13, i32 2, i32 10, i32 10000000]
define i32 @pcre_config(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp ult i32 %0, 5
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds [5 x i32], [5 x i32]* @switch.table.pcre_config, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = bitcast i8* %1 to i32*
store i32 %7, i32* %8
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ -3, %2 ], [ 0, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ InitIntegratedMotorEncoders();
void initIME() { InitIntegratedMotorEncoders(); }


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

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

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

LLVM IR (-O2):
define void @initIME() {
%1 = tail call i32 (...) @InitIntegratedMotorEncoders()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "This program is running\n");
  while (1)
    sleep(60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3c,%edi
call   1040 <sleep@plt>
jmp    114b <main+0x2b>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
mov    $0x3c,%edi
call   1040 <sleep@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"This program is running\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %8
%9 = call i32 @sleep(i32 60)
br label %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"This program is running\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %2, %5
%6 = tail call i32 @sleep(i32 60)
br label %5
}
int main() {
  int a;
  a = 5;
  int b;
  b = 2;
  return a >> b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort_image();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ putlog(char *, int);
int /*<<< orphan*/ restore_console();
int /*<<< orphan*/ restore_tty();
void signals(int signo) {
  abort_image();
  restore_console();
  restore_tty();
  putlog("Exit with status %d", signo);
  exit(signo);
}


x86 assembly (clang, -O0):
<signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort_image@plt>
mov    $0x0,%al
call   1050 <restore_console@plt>
mov    $0x0,%al
call   1060 <restore_tty@plt>
mov    -0x4(%rbp),%esi
lea    0xe86(%rip),%rdi
call   1040 <putlog@plt>
mov    -0x4(%rbp),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<signals>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <abort_image@plt>
xor    %eax,%eax
call   1050 <restore_console@plt>
xor    %eax,%eax
call   1060 <restore_tty@plt>
lea    0xe91(%rip),%rdi
mov    %ebx,%esi
call   1040 <putlog@plt>
mov    %ebx,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Exit with status %d\00"
define void @signals(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort_image()
%4 = call i32 (...) @restore_console()
%5 = call i32 (...) @restore_tty()
%6 = load i32, i32* %2
%7 = call i32 @putlog(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Exit with status %d\00"
define void @signals(i32 %0) {
%2 = tail call i32 (...) @abort_image()
%3 = tail call i32 (...) @restore_console()
%4 = tail call i32 (...) @restore_tty()
%5 = tail call i32 @putlog(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
size_t high_size_bit(int);
size_t vdirect_bit_LaceKVE_joint() { return high_size_bit(2); }


x86 assembly (clang, -O0):
<vdirect_bit_LaceKVE_joint>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <high_size_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdirect_bit_LaceKVE_joint>:
mov    $0x2,%edi
jmp    1030 <high_size_bit@plt>

LLVM IR (-O0):
define i64 @vdirect_bit_LaceKVE_joint() {
%1 = call i64 @high_size_bit(i32 2)
ret i64 %1
}

LLVM IR (-O2):
define i64 @vdirect_bit_LaceKVE_joint() {
%1 = tail call i64 @high_size_bit(i32 2)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ serial_send(int /*<<< orphan*/, int);
void putDebugChar(int c) { serial_send(0, c); }


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

x86 assembly (clang, -O2):
<putDebugChar>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <serial_send@plt>

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

LLVM IR (-O2):
define void @putDebugChar(i32 %0) {
%2 = tail call i32 @serial_send(i32 0, i32 %0)
ret void
}
char codeToLetter(char code) { return (char)code + 'A'; }


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

x86 assembly (clang, -O2):
<codeToLetter>:
lea    0x41(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @codeToLetter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 65
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @codeToLetter(i8 signext %0) {
%2 = add i8 %0, 65
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ gocode_init();
int /*<<< orphan*/ gocode_main();
int main(int argc, char **argv) {
  gocode_init();
  gocode_main();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @gocode_init()
%7 = call i32 (...) @gocode_main()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @gocode_init()
%4 = tail call i32 (...) @gocode_main()
ret i32 0
}
void _ZGr30_java_Sutil_Sweeks__properties(void) {}


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

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

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

LLVM IR (-O2):
define void @_ZGr30_java_Sutil_Sweeks__properties() {
ret void
}
void set_digits(char *digits, int num) {
  if (num < 0)
    num = -num;
  while (num > 0) {
    int digit = num % 10;
    num /= 10;
    digits[digit] += 1;
  }
}


x86 assembly (clang, -O0):
<set_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    111d <set_digits+0x1d>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <set_digits+0x22>
cmpl   $0x0,-0xc(%rbp)
jle    115f <set_digits+0x5f>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
add    $0x1,%edx
mov    %dl,(%rax,%rcx,1)
jmp    1122 <set_digits+0x22>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_digits>:
test   %esi,%esi
je     113f <set_digits+0x3f>
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
mov    $0xcccccccd,%r8d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %eax,%ecx
sub    %esi,%ecx
addb   $0x1,(%rdi,%rcx,1)
cmp    $0x9,%eax
mov    %edx,%eax
ja     1120 <set_digits+0x20>
ret

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

LLVM IR (-O2):
define void @set_digits(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = urem i32 %7, 10
%9 = udiv i32 %7, 10
%10 = zext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = add i8 %12, 1
store i8 %13, i8* %11
%14 = icmp ult i32 %7, 10
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *const, char const *const);
size_t strlen(char const *const);
void Xstrncat(char *const buffer, char const *const what, size_t *len) {
  size_t const what_len = strlen(what);
  if (what_len < *len) {
    strcat(buffer, what);
    *len -= what_len;
  }
}


x86 assembly (clang, -O0):
<Xstrncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jae    1170 <Xstrncat+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xstrncat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
cmp    (%r14),%rax
jae    114f <Xstrncat+0x2f>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <strcat@plt>
sub    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @Xstrncat(i8* %0, i8* %1, i64* nocapture %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = load i64, i64* %2
%6 = icmp ult i64 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i32 @strcat(i8* %0, i8* %1)
%9 = load i64, i64* %2
%10 = sub i64 %9, %4
store i64 %10, i64* %2
br label %11
11: ; preds = %7, %3
ret void
}