xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  if (a % 2 == 0 && b % 2 == 0) {
    printf("desconto\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1177 <main+0x57>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1177 <main+0x57>
lea    0xe93(%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
mov    %rsp,%rdx
call   1040 <scanf@plt>
testb  $0x1,0x4(%rsp)
jne    114e <main+0x2e>
testb  $0x1,(%rsp)
jne    114e <main+0x2e>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@str = [9 x i8] c"desconto\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load i32, i32* %2
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %15
15: ; preds = %13, %9, %0
ret i32 0
}
int foo(void) {
  int a, i;
  for (i = 1; i <= 10; i++) {
    if (i < 3)
      a = 1;
    else
      break;
    a = 5;
  }
  return a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1145 <foo+0x45>
cmpl   $0x3,-0x8(%rbp)
jge    112b <foo+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1130 <foo+0x30>
jmp    1145 <foo+0x45>
movl   $0x5,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <foo+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 5
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
bool signalSafeClose(int fd) {
  bool interrupted;
  int closeRetVal;
  do {
    closeRetVal = close(fd);
    interrupted = ((closeRetVal == -1) && (errno == EINTR));
  } while (interrupted);
  return (closeRetVal != -1);
}


x86 assembly (clang, -O0):
<signalSafeClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jne    114f <signalSafeClose+0x3f>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111b <signalSafeClose+0xb>
cmpl   $0xffffffff,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalSafeClose>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1144 <signalSafeClose+0x34>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <signalSafeClose+0x20>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @signalSafeClose(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = load i64, i64* @errno
%12 = load i64, i64* @EINTR
%13 = icmp eq i64 %11, %12
br label %14
14: ; preds = %10, %5
%15 = phi i1 [ false, %5 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
store i32 %16, i32* %3
br label %17
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %5, label %20
20: ; preds = %17
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, -1
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @signalSafeClose(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @close(i32 %0)
%4 = icmp eq i32 %3, -1
%5 = load i64, i64* @errno
%6 = load i64, i64* @EINTR
%7 = icmp eq i64 %5, %6
%8 = select i1 %4, i1 %7, i1 false
br i1 %8, label %2, label %9
9: ; preds = %2
%10 = icmp ne i32 %3, -1
%11 = zext i1 %10 to i32
ret i32 %11
}
void functionToCall(int foo, int *fp, int **fpp) {
  foo = 3;
  *fp = 5;
  **fpp = 7;
}


x86 assembly (clang, -O0):
<functionToCall>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x3,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movl   $0x7,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<functionToCall>:
movl   $0x5,(%rsi)
mov    (%rdx),%rax
movl   $0x7,(%rax)
ret

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

LLVM IR (-O2):
define void @functionToCall(i32 %0, i32* nocapture writeonly %1, i32** nocapture %2) {
store i32 5, i32* %1
%4 = load i32*, i32** %2
store i32 7, i32* %4
ret void
}
void pos_prn(s, x, y) char *s;
int x, y;
{ plintf("%s\n", s); }


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

x86 assembly (clang, -O2):
<pos_prn>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <plintf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @pos_prn(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @plintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint_least32_t;

/* Variables and functions */
int /*<<< orphan*/ b2w(scalar_t__ *, unsigned char const *, int);
void md4step(uint_least32_t state[4], const unsigned char *data) {
  uint_least32_t A, X[16];
  b2w(X, data, 64);
  state[0] += A;
}


x86 assembly (clang, -O0):
<md4step>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x40,%edx
call   1030 <b2w@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md4step>:
sub    $0x88,%rsp
mov    %rsp,%rdi
mov    $0x40,%edx
call   1030 <b2w@plt>
add    $0x88,%rsp
ret

LLVM IR (-O0):
define void @md4step(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca [16 x i64]
store i64* %0, i64** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [16 x i64], [16 x i64]* %6, i64 0, i64 0
%8 = load i8*, i8** %4
%9 = call i32 @b2w(i64* %7, i8* %8, i32 64)
%10 = load i64, i64* %5
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 0
%13 = load i64, i64* %12
%14 = add nsw i64 %13, %10
store i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @md4step(i64* nocapture readnone %0, i8* %1) {
%3 = alloca [16 x i64]
%4 = bitcast [16 x i64]* %3 to i8*
%5 = getelementptr inbounds [16 x i64], [16 x i64]* %3, i64 0, i64 0
%6 = call i32 @b2w(i64* %5, i8* %1, i32 64)
ret void
}
/* Type definitions */
typedef scalar_t__ __v8qi;
typedef scalar_t__ __m64;

/* Variables and functions */
__m64 __attribute__((__always___, __nodebug__))
_mm_cmpeq_pi8(__m64 __m1, __m64 __m2) {
  return (__m64)((__v8qi)__m1 == (__v8qi)__m2);
}


x86 assembly (clang, -O0):
<_mm_cmpeq_pi8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cmpeq_pi8>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @_mm_cmpeq_pi8(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 eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @_mm_cmpeq_pi8(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int sock_op_put_creds(int sock_fd) { abort(); }


x86 assembly (clang, -O0):
<sock_op_put_creds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sock_op_put_creds>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @sock_op_put_creds(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @sock_op_put_creds(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int O_CLOEXEC;
int O_NOCTTY;
int /*<<< orphan*/ assert(int);
int open(char *, int);
void stdinout_open(int fd, char *path, int flags) {
  assert(open(path, flags | O_CLOEXEC | O_NOCTTY) == fd);
}


x86 assembly (clang, -O0):
<stdinout_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    0x2e90(%rip),%rax
or     (%rax),%esi
mov    0x2e97(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdinout_open>:
push   %rbx
mov    0x2ea8(%rip),%rax
or     (%rax),%edx
mov    %edi,%ebx
mov    0x2ead(%rip),%rax
or     (%rax),%edx
mov    %rsi,%rdi
mov    %edx,%esi
call   1040 <open@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
pop    %rbx
jmp    1030 <assert@plt>

LLVM IR (-O0):
@O_CLOEXEC = global i32 0
@O_NOCTTY = global i32 0
define void @stdinout_open(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* @O_CLOEXEC
%10 = or i32 %8, %9
%11 = load i32, i32* @O_NOCTTY
%12 = or i32 %10, %11
%13 = call i32 @open(i8* %7, i32 %12)
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret void
}

LLVM IR (-O2):
@O_CLOEXEC = global i32 0
@O_NOCTTY = global i32 0
define void @stdinout_open(i32 %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @O_CLOEXEC
%5 = or i32 %4, %2
%6 = load i32, i32* @O_NOCTTY
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %1, i32 %7)
%9 = icmp eq i32 %8, %0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
ret void
}
/* Variables and functions */
int xbp_rename(char const *, char const *);
int __wrap_rename(const char *oldname, const char *newname) {
  return xbp_rename(oldname, newname);
}


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

x86 assembly (clang, -O2):
<__wrap_rename>:
jmp    1030 <xbp_rename@plt>

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

LLVM IR (-O2):
define i32 @__wrap_rename(i8* %0, i8* %1) {
%3 = tail call i32 @xbp_rename(i8* %0, i8* %1)
ret i32 %3
}
void TimerOC1PreloadConfigure(unsigned long ulBase, unsigned long ulOCPreload) {
  unsigned long ulTempccmr1 = 0;

  ;

  ;
  ulTempccmr1 = (*((volatile unsigned long *)(ulBase + 0x00000018)));
  ulTempccmr1 &= ~0x00000008;
  ulTempccmr1 |= ulOCPreload;
  (*((volatile unsigned long *)(ulBase + 0x00000018))) = ulTempccmr1;
}


x86 assembly (clang, -O0):
<TimerOC1PreloadConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffffff7,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC1PreloadConfigure>:
mov    0x18(%rdi),%rax
and    $0xfffffffffffffff7,%rax
or     %rsi,%rax
mov    %rax,0x18(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC1PreloadConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %3
%7 = add i64 %6, 24
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -9
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = or i64 %13, %12
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = load i64, i64* %3
%17 = add i64 %16, 24
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
ret void
}

LLVM IR (-O2):
define void @TimerOC1PreloadConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -9
%7 = or i64 %6, %1
store volatile i64 %7, i64* %4
ret void
}
int lower(int c) {
  if (c >= 'A' && c <= 'Z') {
    return c - 'A' + 'a';
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112c <lower+0x2c>
cmpl   $0x5a,-0x8(%rbp)
jg     112c <lower+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <lower+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int sam_index_build3(char const *, char const *, int, int /*<<< orphan*/);
int sam_index_build2(const char *fn, const char *fnidx, int min_shift) {
  return sam_index_build3(fn, fnidx, min_shift, 0);
}


x86 assembly (clang, -O0):
<sam_index_build2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <sam_index_build3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sam_index_build2>:
xor    %ecx,%ecx
jmp    1030 <sam_index_build3@plt>

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

LLVM IR (-O2):
define i32 @sam_index_build2(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sam_index_build3(i8* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128Timer3P__CompareB__default__fired();
void HplAtm128Timer3P__CompareB__fired(void) {
  HplAtm128Timer3P__CompareB__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128Timer3P__CompareB__fired() {
%1 = tail call i32 (...) @HplAtm128Timer3P__CompareB__default__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_help(const char *name) {
  printf("Usage: %s <number>...\n\n", name);
  printf("Given a list of integers (a_1, a_2, ..., a_n),\n"
         "computes (a_2 - a_1, a_3 - a_2, ..., a_1 - a_n),\n"
         "then repeats again on the output list.\n\n");
  printf("Example: %s 0 0 1 0 0\n"
         "0 1 -1 0 0\n",
         name);
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: %s <number>...\0A\0A\00"
@.str.1 = [137 x i8] c"Given a list of integers (a_1, a_2, ..., a_n),\0Acomputes (a_2 - a_1, a_3 - a_2, ..., a_1 - a_n),\0Athen repeats again on the output list.\0A\0A\00"
@.str.2 = [34 x i8] c"Example: %s 0 0 1 0 0\0A0 1 -1 0 0\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: %s <number>...\0A\0A\00"
@.str.2 = [34 x i8] c"Example: %s 0 0 1 0 0\0A0 1 -1 0 0\0A\00"
@str = [136 x i8] c"Given a list of integers (a_1, a_2, ..., a_n),\0Acomputes (a_2 - a_1, a_3 - a_2, ..., a_1 - a_n),\0Athen repeats again on the output list.\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([136 x i8], [136 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
int isTrailingWhitespace(char c) {
  switch (c) {
  case ' ':
  case '\t':
  case '\n':
  case ':':
  case ',':
  case '.':
  case ';':
  case '-':
  case '\r':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isTrailingWhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     116c <isTrailingWhitespace+0x6c>
jmp    1122 <isTrailingWhitespace+0x22>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     116c <isTrailingWhitespace+0x6c>
jmp    1133 <isTrailingWhitespace+0x33>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     116c <isTrailingWhitespace+0x6c>
jmp    1144 <isTrailingWhitespace+0x44>
mov    -0xc(%rbp),%eax
add    $0xffffffd4,%eax
sub    $0x3,%eax
jb     116c <isTrailingWhitespace+0x6c>
jmp    1158 <isTrailingWhitespace+0x58>
mov    -0xc(%rbp),%eax
add    $0xffffffc6,%eax
sub    $0x1,%eax
ja     1178 <isTrailingWhitespace+0x78>
jmp    116c <isTrailingWhitespace+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    117f <isTrailingWhitespace+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTrailingWhitespace>:
cmp    $0x3b,%edi
ja     111d <isTrailingWhitespace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0xc00700100002600,%rdx
bt     %rcx,%rdx
jae    111d <isTrailingWhitespace+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isTrailingWhitespace(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
switch i32 %5, label %7 [
i32 32, label %6
i32 9, label %6
i32 10, label %6
i32 58, label %6
i32 44, label %6
i32 46, label %6
i32 59, label %6
i32 45, label %6
i32 13, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isTrailingWhitespace(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 9, label %4
i32 10, label %4
i32 58, label %4
i32 44, label %4
i32 46, label %4
i32 59, label %4
i32 45, label %4
i32 13, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ wcstombs(char *, int /*<<< orphan*/ const *, size_t);
char *to_multibyte(const wchar_t *s) {
  size_t len;
  char *result;
  len = wcstombs(NULL, s, 0) + 1;
  if ((result = malloc(len)) == NULL)
    return NULL;
  wcstombs(result, s, len);
  return result;
}


x86 assembly (clang, -O0):
<to_multibyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1040 <wcstombs@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1169 <to_multibyte+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1182 <to_multibyte+0x62>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <wcstombs@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_multibyte>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %edi,%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <wcstombs@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <to_multibyte+0x38>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <wcstombs@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @to_multibyte(i32* %0) {
%2 = tail call i32 @wcstombs(i8* null, i32* %0, i64 0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @wcstombs(i8* %5, i32* %0, i64 %4)
br label %9
9: ; preds = %1, %7
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(int /*<<< orphan*/);
void ft_putstr(const char *s) {
  while (*s)
    ft_putchar(*s++);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <ft_putstr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
jmp    111c <ft_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @ft_putchar(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @ft_putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int my_strnbrlen(unsigned char *str) {
  int i;
  if (str == NULL)
    return (0);
  i = -1;
  while (str[++i] != 255)
    ;
  return (i);
}


x86 assembly (clang, -O0):
<my_strnbrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <my_strnbrlen+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1150 <my_strnbrlen+0x50>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0xff,%eax
je     114a <my_strnbrlen+0x4a>
jmp    1126 <my_strnbrlen+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strnbrlen>:
test   %rdi,%rdi
je     111d <my_strnbrlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0xff,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strnbrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strnbrlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ -1, %1 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, -1
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %5 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  int z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  if (y > 0) {
    while (x >= z) {
      z = z + y;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    116b <main+0x5b>
jmp    114c <main+0x3c>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1166 <main+0x56>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <main+0x3c>
jmp    116b <main+0x5b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void init_uart(int baudrate) {}


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

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

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

LLVM IR (-O2):
define void @init_uart(i32 %0) {
ret void
}
/* Variables and functions */
float fabsf(float);
float IvAbs(float f) { return fabsf(f); }


x86 assembly (clang, -O0):
<IvAbs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<IvAbs>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @IvAbs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @IvAbs(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t get_uint64_be(const unsigned char *ptr_) {
  return (uint64_t)ptr_[7] | ((uint64_t)ptr_[6] << 8) |
         ((uint64_t)ptr_[5] << 16) | ((uint64_t)ptr_[4] << 24) |
         ((uint64_t)ptr_[3] << 32) | ((uint64_t)ptr_[2] << 40) |
         ((uint64_t)ptr_[1] << 48) | ((uint64_t)ptr_[0] << 56);
}


x86 assembly (clang, -O0):
<get_uint64_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x7(%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x6(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @get_uint64_be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 6
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 5
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = or i32 %18, %23
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 3
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = shl i32 %28, 32
%30 = or i32 %24, %29
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i64 2
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = shl i32 %34, 40
%36 = or i32 %30, %35
%37 = load i8*, i8** %2
%38 = getelementptr inbounds i8, i8* %37, i64 1
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = shl i32 %40, 48
%42 = or i32 %36, %41
%43 = load i8*, i8** %2
%44 = getelementptr inbounds i8, i8* %43, i64 0
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = shl i32 %46, 56
%48 = or i32 %42, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @get_uint64_be(i8* nocapture readnone %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ fclose(void *);
void dumb_stdfile_close(void *f) { fclose(f); }


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

x86 assembly (clang, -O2):
<dumb_stdfile_close>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @dumb_stdfile_close(i8* nocapture %0) {
%2 = tail call i32 @fclose(i8* %0)
ret void
}
void XrmGetFileDatabase() {}


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

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

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

LLVM IR (-O2):
define void @XrmGetFileDatabase() {
ret void
}
int roadmap_city_hash_key(const char *name) {
  int key = 0;
  while (*name) {
    key = key * 256 + *name++;
  }
  return key;
}


x86 assembly (clang, -O0):
<roadmap_city_hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <roadmap_city_hash_key+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <roadmap_city_hash_key+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_city_hash_key>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <roadmap_city_hash_key+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x8,%eax
movsbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <roadmap_city_hash_key+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @roadmap_city_hash_key(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, 256
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = add nsw i32 %10, %14
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @roadmap_city_hash_key(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl nsw i32 %6, 8
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add nsw i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void menuReturn() {
  printf("\npress any key to return to main menu");
  getch();
  system("cls");
}


x86 assembly (clang, -O0):
<menuReturn>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuReturn>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
lea    0xedb(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"\0Apress any key to return to main menu\00"
@.str.1 = [4 x i8] c"cls\00"
define void @menuReturn() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getch()
%3 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"\0Apress any key to return to main menu\00"
@.str.1 = [4 x i8] c"cls\00"
define void @menuReturn() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getch()
%3 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void XtBuildEventMask() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo706() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A();
int /*<<< orphan*/ AA();
int /*<<< orphan*/ B();
scalar_t__ xx();
int main(void) {
  if (xx())
    A();
  else
    B();
  AA();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <xx@plt>
cmp    $0x0,%rax
je     116c <main+0x2c>
mov    $0x0,%al
call   1060 <A@plt>
jmp    1173 <main+0x33>
mov    $0x0,%al
call   1030 <B@plt>
mov    $0x0,%al
call   1050 <AA@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <xx@plt>
test   %rax,%rax
je     1156 <main+0x16>
xor    %eax,%eax
call   1060 <A@plt>
jmp    115d <main+0x1d>
xor    %eax,%eax
call   1030 <B@plt>
xor    %eax,%eax
call   1050 <AA@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @xx()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @A()
br label %8
6: ; preds = %0
%7 = call i32 (...) @B()
br label %8
8: ; preds = %6, %4
%9 = call i32 (...) @AA()
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @xx()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @A()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @B()
br label %7
7: ; preds = %5, %3
%8 = tail call i32 (...) @AA()
ret i32 0
}
int main() { return 1 << 32; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 poison
}
void EVP_CIPHER_block_size(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_block_size() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ stderr;
void showTermNullMessage(char term) {
  fprintf(stderr, "Error. Term %c null.\n", term);
}


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

x86 assembly (clang, -O2):
<showTermNullMessage>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Error. Term %c null.\0A\00"
define void @showTermNullMessage(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i32, i32* @stderr
%4 = load i8, i8* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Error. Term %c null.\0A\00"
define void @showTermNullMessage(i8 signext %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Variables and functions */
int toaster_run_range(int /*<<< orphan*/, int, int (*)());
int toaster_run_max(int max, int (*test)(void)) {
  return toaster_run_range(0, max, test);
}


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

x86 assembly (clang, -O2):
<toaster_run_max>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <toaster_run_range@plt>

LLVM IR (-O0):
define i32 @toaster_run_max(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 = bitcast i32 ()* %6 to i32 (...)*
%8 = call i32 @toaster_run_range(i32 0, i32 %5, i32 (...)* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @toaster_run_max(i32 %0, i32 ()* %1) {
%3 = bitcast i32 ()* %1 to i32 (...)*
%4 = tail call i32 @toaster_run_range(i32 0, i32 %0, i32 (...)* %3)
ret i32 %4
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ perror(char *);
int socket_close(int socket_fd) {
  if (close(socket_fd) == -1) {
    perror("socket_close");
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<socket_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1154 <socket_close+0x34>
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <socket_close+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_close>:
push   %rax
call   1030 <close@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1131 <socket_close+0x11>
pop    %rcx
ret
lea    0xec8(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"socket_close\00"
define i32 @socket_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
long double strtox(char const *, char **, int);
long double strtold(const char *restrict s, char **restrict p) {
  return strtox(s, p, 2);
}


x86 assembly (clang, -O0):
<strtold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <strtox@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtold>:
mov    $0x2,%edx
jmp    1030 <strtox@plt>

LLVM IR (-O0):
define x86_fp80 @strtold(i8* noalias %0, i8** noalias %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call x86_fp80 @strtox(i8* %5, i8** %6, i32 2)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @strtold(i8* noalias %0, i8** noalias %1) {
%3 = tail call x86_fp80 @strtox(i8* %0, i8** %1, i32 2)
ret x86_fp80 %3
}