xunge/DecIR huggingface dataset:
char *bar2(void *printf, int a, char *c) {
  void (*ptr)(const char *, ...);
  ptr = printf;
  ptr(c);
  return "Hello, World!";
}


x86 assembly (clang, -O0):
<bar2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   *%rcx
lea    0xed2(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar2>:
push   %rax
mov    %rdi,%rcx
mov    %rdx,%rdi
xor    %eax,%eax
call   *%rcx
lea    0xeee(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World!\00"
define i8* @bar2(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca void (i8*, ...)*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to void (i8*, ...)*
store void (i8*, ...)* %9, void (i8*, ...)** %7
%10 = load void (i8*, ...)*, void (i8*, ...)** %7
%11 = load i8*, i8** %6
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i8* @bar2(i8* nocapture %0, i32 %1, i8* %2) {
%4 = bitcast i8* %0 to void (i8*, ...)*
tail call void (i8*, ...) %4(i8* %2)
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12_SAFEBAG;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_SAFEBAG_it;
PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void) {
  return (PKCS12_SAFEBAG *)ASN1_item_new(&PKCS12_SAFEBAG_it);
}


x86 assembly (clang, -O0):
<PKCS12_SAFEBAG_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS12_SAFEBAG_new>:
mov    0x2ee1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS12_SAFEBAG_it = global i32 0
define i32* @PKCS12_SAFEBAG_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS12_SAFEBAG_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS12_SAFEBAG_it = global i32 0
define i32* @PKCS12_SAFEBAG_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS12_SAFEBAG_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int main() {
  int x = 0;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t rol(uint32_t x, unsigned s) { return (x << s) | (x >> (32 - s)); }


x86 assembly (clang, -O0):
<rol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rol(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int close(int);
int CloseClientSocket(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<CloseClientSocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @CloseClientSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int myrand(int n) {
  static int lcg = 0;
  int x;
  lcg = 1664525 * lcg + 1013904223;
  x = lcg % n;
  return x < 0 ? x + n : x;
}


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x19660d,0x2f13(%rip),%eax
add    $0x3c6ef35f,%eax
mov    %eax,0x2f08(%rip)
mov    0x2f02(%rip),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1141 <myrand+0x41>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <myrand+0x47>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrand>:
imul   $0x19660d,0x2f1a(%rip),%eax
add    $0x3c6ef35f,%eax
mov    %eax,0x2f0f(%rip)
cltd
idiv   %edi
mov    %edx,%eax
sar    $0x1f,%eax
and    %edi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
@myrand.lcg = internal global i32 0
define i32 @myrand(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @myrand.lcg
%5 = mul nsw i32 1664525, %4
%6 = add nsw i32 %5, 1013904223
store i32 %6, i32* @myrand.lcg
%7 = load i32, i32* @myrand.lcg
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add nsw i32 %13, %14
br label %18
16: ; preds = %1
%17 = load i32, i32* %3
br label %18
18: ; preds = %16, %12
%19 = phi i32 [ %15, %12 ], [ %17, %16 ]
ret i32 %19
}

LLVM IR (-O2):
@myrand.lcg = internal unnamed_addr global i32 0
define i32 @myrand(i32 %0) {
%2 = load i32, i32* @myrand.lcg
%3 = mul nsw i32 %2, 1664525
%4 = add nsw i32 %3, 1013904223
store i32 %4, i32* @myrand.lcg
%5 = srem i32 %4, %0
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 %0, i32 0
%8 = add nsw i32 %7, %5
ret i32 %8
}
void callgrind_start(void) {}


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

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

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

LLVM IR (-O2):
define void @callgrind_start() {
ret void
}
int main(int argc, char **argv) {
  int (*func)();
  func = (int (*)())argv[1];
  (int)(*func)();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   *-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   *0x8(%rsi)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32 (...)*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = bitcast i8* %8 to i32 (...)*
store i32 (...)* %9, i32 (...)** %5
%10 = load i32 (...)*, i32 (...)** %5
%11 = call i32 (...) %10()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = bitcast i8** %3 to i32 (...)**
%5 = load i32 (...)*, i32 (...)** %4
%6 = tail call i32 (...) %5()
ret i32 0
}
void *_dictStringKeyValCopyHTValDup(void *privdata, const void *val) {
  int len = strlen(val);
  char *copy = _dictAlloc(len + 1);
  ((void)privdata);
  memcpy(copy, val, len);
  copy[len] = '\0';
  return copy;
}


x86 assembly (clang, -O0):
<_dictStringKeyValCopyHTValDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
mov    $0x0,%al
call   1040 <_dictAlloc@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dictStringKeyValCopyHTValDup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%edi
xor    %eax,%eax
call   1040 <_dictAlloc@plt>
movslq %eax,%rbx
movslq %r15d,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @_dictStringKeyValCopyHTValDup(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @_dictAlloc to i32 (i32, ...)*)(i32 %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %6
%15 = load i8*, i8** %3
%16 = load i8*, i8** %6
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = load i8*, i8** %6
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %6
ret i8* %24
}

LLVM IR (-O2):
define i8* @_dictStringKeyValCopyHTValDup(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = add nsw i32 %4, 1
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @_dictAlloc to i32 (i32, ...)*)(i32 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = shl i64 %3, 32
%10 = ashr exact i64 %9, 32
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %8, i8* align 1 %1, i64 %10, i1 false)
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 0, i8* %11
ret i8* %8
}
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructPPForm(void *, struct constructHeader *);
const char *EnvGetDefinstancesPPForm(void *theEnv, void *theDefinstances) {
  return GetConstructPPForm(theEnv, (struct constructHeader *)theDefinstances);
}


x86 assembly (clang, -O0):
<EnvGetDefinstancesPPForm>:
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 <GetConstructPPForm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnvGetDefinstancesPPForm>:
jmp    1030 <GetConstructPPForm@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefinstancesPPForm(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 = bitcast i8* %6 to %struct.constructHeader*
%8 = call i8* @GetConstructPPForm(i8* %5, %struct.constructHeader* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDefinstancesPPForm(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructPPForm(i8* %0, %struct.constructHeader* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int read(int, unsigned char *, int);
int /*<<< orphan*/ stderr;
int get_size(int fd) {
  int size = 0, ret = 0;
  unsigned char *c = (unsigned char *)&size;
  if ((ret = read(fd, c, sizeof(unsigned char))) != 1) {
    fprintf(stderr, "Failure to get the size of the frequency.\n");
    exit(1);
  }
  return size;
}


x86 assembly (clang, -O0):
<get_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x1,%eax
je     118d <get_size+0x5d>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_size>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    1153 <get_size+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Failure to get the size of the frequency.\0A\00"
define i32 @get_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%6 = bitcast i32* %3 to i8*
store i8* %6, i8** %5
%7 = load i32, i32* %2
%8 = load i8*, i8** %5
%9 = call i32 @read(i32 %7, i8* %8, i32 1)
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Failure to get the size of the frequency.\0A\00"
define i32 @get_size(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @read(i32 %0, i8* %3, i32 1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i32, i32* %2
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fn(unsigned long long *);
void f4(void) {
  unsigned long long a __attribute__((aligned(16)));
  fn(&a);
}


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

x86 assembly (clang, -O2):
<f4>:
push   %rax
mov    %rsp,%rdi
call   1030 <fn@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @f4() {
%1 = alloca i64
%2 = call i32 @fn(i64* %1)
ret void
}

LLVM IR (-O2):
define void @f4() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @fn(i64* %1)
ret void
}
void t5() { float _Complex x = t4(); }


x86 assembly (clang, -O0):
<t5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <t4@plt>
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t5() {
%1 = alloca { float, float }
%2 = call i32 (...) @t4()
%3 = sitofp i32 %2 to float
%4 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 0
%5 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 1
store float %3, float* %4
store float 0.000000e+00, float* %5
ret void
}

LLVM IR (-O2):
define void @t5() {
%1 = tail call i32 (...) @t4()
ret void
}
/* Variables and functions */
scalar_t__ nrfx_usbd_errata_type_52840();
int /*<<< orphan*/ nrfx_usbd_errata_type_52840_eng_b_or_later();
bool nrfx_usbd_errata_104(void) {
  return (1 && (nrfx_usbd_errata_type_52840() &&
                !nrfx_usbd_errata_type_52840_eng_b_or_later()));
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_104>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <nrfx_usbd_errata_type_52840@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1153 <nrfx_usbd_errata_104+0x33>
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_b_or_later@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrfx_usbd_errata_104>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <nrfx_usbd_errata_type_52840@plt>
test   %rax,%rax
je     113d <nrfx_usbd_errata_104+0x1d>
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_b_or_later@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_104() {
%1 = call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @nrfx_usbd_errata_type_52840_eng_b_or_later()
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_104() {
%1 = tail call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @nrfx_usbd_errata_type_52840_eng_b_or_later()
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int error_code) {
  (void)printf("Usage: seetex file1.F [file2.f file3.fh ...] file.tex\n\n");
  (void)printf("Flags: -h or -help prints the usage and syntax info\n");
  (void)printf(
      "\nNote: tex file must be specified last with the .tex extension\n");
  (void)exit((int)error_code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: seetex file1.F [file2.f file3.fh ...] file.tex\0A\0A\00"
@.str.1 = [53 x i8] c"Flags: -h or -help prints the usage and syntax info\0A\00"
@.str.2 = [64 x i8] c"\0ANote: tex file must be specified last with the .tex extension\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@str = [55 x i8] c"Usage: seetex file1.F [file2.f file3.fh ...] file.tex\0A\00"
@str.3 = [52 x i8] c"Flags: -h or -help prints the usage and syntax info\00"
@str.4 = [63 x i8] c"\0ANote: tex file must be specified last with the .tex extension\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
carl(int a, int b) { printf("B: %d\n", a + b); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"B: %d\0A\00"
define i32 @carl(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* %4
%7 = load i32, i32* %5
%8 = add nsw i32 %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %3
ret i32 %10
}

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

/* Variables and functions */
int bsd_syscall_setsockopt(int, int, int, char *, int /*<<< orphan*/);
int uptcp_setsockopt(int s, int level, int name, const void *val,
                     socklen_t valsize) {
  return bsd_syscall_setsockopt(s, level, name, (char *)val, valsize);
}


x86 assembly (clang, -O0):
<uptcp_setsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <bsd_syscall_setsockopt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptcp_setsockopt>:
jmp    1030 <bsd_syscall_setsockopt@plt>

LLVM IR (-O0):
define i32 @uptcp_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @bsd_syscall_setsockopt(i32 %11, i32 %12, i32 %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @uptcp_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @bsd_syscall_setsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32 %4)
ret i32 %6
}
void PointerTarget(const int *p, int y) { *((int *)p) = y; }


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

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

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

LLVM IR (-O2):
define void @PointerTarget(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
int ft_int_twodfree(int **two, int num) {
  int i;
  if (!two)
    return (0);
  i = -1;
  while (++i < num)
    free(two[i]);
  free(two);
  return (1);
}


x86 assembly (clang, -O0):
<ft_int_twodfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <ft_int_twodfree+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1175 <ft_int_twodfree+0x65>
movl   $0xffffffff,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmp    -0x14(%rbp),%eax
jge    1165 <ft_int_twodfree+0x55>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    113d <ft_int_twodfree+0x2d>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_int_twodfree>:
test   %rdi,%rdi
je     1155 <ft_int_twodfree+0x45>
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <ft_int_twodfree+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <ft_int_twodfree+0x20>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_int_twodfree(i32** %0, i32 %1) {
%3 = icmp eq i32** %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = getelementptr inbounds i32*, i32** %0, i64 %9
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %4
%16 = bitcast i32** %0 to i8*
tail call void @free(i8* %16)
br label %17
17: ; preds = %2, %15
%18 = phi i32 [ 1, %15 ], [ 0, %2 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
int /*<<< orphan*/ printf(char *);
void emitln(char *s) {
  emit(s);
  printf("\n");
}


x86 assembly (clang, -O0):
<emitln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <emit@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emitln>:
push   %rax
call   1040 <emit@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @emitln(i8* %0) {
%2 = tail call i32 @emit(i8* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sys_Mkdir(char *);
void FS_CreatePath(char *path) {
  char *ofs;
  for (ofs = path + 1; *ofs; ofs++) {
    if (*ofs == '/') {
      *ofs = '\0';
      Sys_Mkdir(path);
      *ofs = '/';
    }
  }
}


x86 assembly (clang, -O0):
<FS_CreatePath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1172 <FS_CreatePath+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    115c <FS_CreatePath+0x4c>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <Sys_Mkdir@plt>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
jmp    1161 <FS_CreatePath+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <FS_CreatePath+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FS_CreatePath>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x1(%rdi),%rbx
jmp    1132 <FS_CreatePath+0x22>
nopl   (%rax)
movb   $0x0,(%rbx)
mov    %r14,%rdi
call   1030 <Sys_Mkdir@plt>
movb   $0x2f,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x2f,%al
je     1120 <FS_CreatePath+0x10>
test   %al,%al
je     1143 <FS_CreatePath+0x33>
add    $0x1,%rbx
jmp    1132 <FS_CreatePath+0x22>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @FS_CreatePath(i8* %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %4, %6 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %9
i8 47, label %7
]
6: ; preds = %2, %7
br label %2
7: ; preds = %2
store i8 0, i8* %4
%8 = tail call i32 @Sys_Mkdir(i8* %0)
store i8 47, i8* %4
br label %6
9: ; preds = %2
ret void
}
/* Type definitions */
struct heap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct heap *);
int /*<<< orphan*/ heap_destroy(struct heap *);
void heap_delete(struct heap *__restrict heap) {
  heap_destroy(heap);
  free(heap);
}


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

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

LLVM IR (-O0):
%struct.heap = type { i32 }
define void @heap_delete(%struct.heap* noalias %0) {
%2 = alloca %struct.heap*
store %struct.heap* %0, %struct.heap** %2
%3 = load %struct.heap*, %struct.heap** %2
%4 = call i32 @heap_destroy(%struct.heap* %3)
%5 = load %struct.heap*, %struct.heap** %2
%6 = call i32 @free(%struct.heap* %5)
ret void
}

LLVM IR (-O2):
%struct.heap = type { i32 }
define void @heap_delete(%struct.heap* noalias %0) {
%2 = tail call i32 @heap_destroy(%struct.heap* %0)
%3 = tail call i32 @free(%struct.heap* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int /*<<< orphan*/ list_combination(int *, int);
int main() {
  int a[] = {1, 2, 3};
  list_combination(a, 3);
  int b[] = {7, 9, 11, 13, 17, 19, 23, 29};
  list_combination(b, sizeof(b) / sizeof(b[0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1030 <list_combination@plt>
mov    0xec8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1030 <list_combination@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xeee(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xedb(%rip),%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <list_combination@plt>
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x8,%esi
call   1030 <list_combination@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.b = [8 x i32] [i32 7, i32 9, i32 11, i32 13, i32 17, i32 19, i32 23, i32 29]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [8 x i32]
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = call i32 @list_combination(i32* %5, i32 3)
%7 = bitcast [8 x i32]* %3 to i8*
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%9 = call i32 @list_combination(i32* %8, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.b = [8 x i32] [i32 7, i32 9, i32 11, i32 13, i32 17, i32 19, i32 23, i32 29]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [8 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @list_combination(i32* %4, i32 3)
%6 = bitcast [8 x i32]* %2 to i8*
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%8 = call i32 @list_combination(i32* %7, i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Usage:  deposit -bw|<addr>[,|=]<val>[,] ...\n"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: deposit -bw|<addr>[,|=]<val>[,] ...\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"Usage: deposit -bw|<addr>[,|=]<val>[,] ...\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
gen_swap_stack() {
  output_line("move\t$t1, $v0");
  output_line("lw\t$v0, 16($sp)");
  output_line("sw\t$t1, 16($sp)");
}


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

x86 assembly (clang, -O2):
<gen_swap_stack>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <output_line@plt>
lea    0xeea(%rip),%rdi
call   1030 <output_line@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1030 <output_line@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"move\09$t1, $v0\00"
@.str.1 = [16 x i8] c"lw\09$v0, 16($sp)\00"
@.str.2 = [16 x i8] c"sw\09$t1, 16($sp)\00"
define i32 @gen_swap_stack() {
%1 = alloca i32
%2 = call i32 @output_line(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @output_line(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @output_line(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [14 x i8] c"move\09$t1, $v0\00"
@.str.1 = [16 x i8] c"lw\09$v0, 16($sp)\00"
@.str.2 = [16 x i8] c"sw\09$t1, 16($sp)\00"
define i32 @gen_swap_stack() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_line(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @output_line(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBOTGMode(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x0000041C))) = 0;
}


x86 assembly (clang, -O0):
<USBOTGMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x41c,%eax
cltq
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBOTGMode>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
movq   $0x0,0x41c(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBOTGMode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1052
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i64*
store volatile i64 0, i64* %10
ret void
}

LLVM IR (-O2):
define void @USBOTGMode(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1052
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
store volatile i64 0, i64* %7
ret void
}
void string_emitter(char c, void *data) {
  char **output_string = (char **)data;
  *((*output_string)++) = c;
  **output_string = 0;
}


x86 assembly (clang, -O0):
<string_emitter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x18(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_emitter>:
mov    (%rsi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rsi)
mov    %dil,(%rax)
mov    (%rsi),%rax
movb   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @string_emitter(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8**
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %5
%8 = load i8, i8* %3
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %9
store i8 %8, i8* %10
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
store i8 0, i8* %13
ret void
}

LLVM IR (-O2):
define void @string_emitter(i8 signext %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %3
store i8 %0, i8* %4
%6 = load i8*, i8** %3
store i8 0, i8* %6
ret void
}
char *test8_helper_3() { return "TESTstring\n"; }


x86 assembly (clang, -O0):
<test8_helper_3>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8_helper_3>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"TESTstring\0A\00"
define i8* @test8_helper_3() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"TESTstring\0A\00"
define i8* @test8_helper_3() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ L_add_c(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ L_mult(int /*<<< orphan*/, int /*<<< orphan*/);
int32_t L_macNs(int32_t L_var3, int16_t var1, int16_t var2) {
  int32_t L_var_out;
  L_var_out = L_mult(var1, var2);
  L_var_out = L_add_c(L_var3, L_var_out);
  return (L_var_out);
}


x86 assembly (clang, -O0):
<L_macNs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <L_mult@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <L_add_c@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<L_macNs>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %edx,%esi
call   1030 <L_mult@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <L_add_c@plt>

LLVM IR (-O0):
define i32 @L_macNs(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* %5
%9 = load i32, i32* %6
%10 = call i32 @L_mult(i32 %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = load i32, i32* %7
%13 = call i32 @L_add_c(i32 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @L_macNs(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @L_mult(i32 %1, i32 %2)
%5 = tail call i32 @L_add_c(i32 %0, i32 %4)
ret i32 %5
}
void data_to_output(int fd, void *vdata) {}


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

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

LLVM IR (-O0):
define void @data_to_output(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @data_to_output(i32 %0, i8* nocapture %1) {
ret void
}
int LexIsInlineComment(char c) {
  if (c == '#') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<LexIsInlineComment>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x23,%eax
jne    1123 <LexIsInlineComment+0x23>
movl   $0x1,-0x4(%rbp)
jmp    112a <LexIsInlineComment+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LexIsInlineComment>:
xor    %eax,%eax
cmp    $0x23,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @LexIsInlineComment(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, 35
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @LexIsInlineComment(i8 signext %0) {
%2 = icmp eq i8 %0, 35
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int useconds_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int usleep(useconds_t usec) {
  char szBuf[128];
  sprintf(szBuf, "in usleep: usec = %d\n", usec);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xed1(%rip),%rsi
call   1030 <sprintf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
sub    $0x88,%rsp
mov    %edi,%edx
lea    0xee0(%rip),%rsi
mov    %rsp,%rdi
call   1030 <sprintf@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"in usleep: usec = %d\0A\00"
define i32 @usleep(i32 %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
void handle_ILL(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_ILL(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__3__Control__setControlAsCompare();
void Msp430AlarmC__0__Msp430TimerControl__setControlAsCompare(void) {
  Msp430TimerCapComP__3__Control__setControlAsCompare();
}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__0__Msp430TimerControl__setControlAsCompare() {
%1 = tail call i32 (...) @Msp430TimerCapComP__3__Control__setControlAsCompare()
ret void
}
/* Variables and functions */
int read_long_data(unsigned char *, unsigned char *);
int op_raw_read_recv(unsigned char *packet, unsigned char *data) {
  return read_long_data(packet, data);
}


x86 assembly (clang, -O0):
<op_raw_read_recv>:
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 <read_long_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_raw_read_recv>:
jmp    1030 <read_long_data@plt>

LLVM IR (-O0):
define i32 @op_raw_read_recv(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 @read_long_data(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @op_raw_read_recv(i8* %0, i8* %1) {
%3 = tail call i32 @read_long_data(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int bind_error(int i) {
  printf("Error binding socket %d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<bind_error>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"Error binding socket %d\0A\00"
define i32 @bind_error(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
int f_ge_cr2(float a1) { return !(((100) >= (a1))); }


x86 assembly (clang, -O0):
<f_ge_cr2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ge_cr2>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setb   %al
ret

LLVM IR (-O0):
define i32 @f_ge_cr2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_ge_cr2(float %0) {
%2 = fcmp ugt float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}