xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  x = __VERIFIER_nondet_int();
  while (x <= 100) {
    if (__VERIFIER_nondet_int() != 0) {
      x = -2 * x + 2;
    } else {
      x = -3 * x - 2;
    }
  }
  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)
cmpl   $0x64,-0x8(%rbp)
jg     1167 <main+0x57>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     1155 <main+0x45>
imul   $0xfffffffe,-0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <main+0x52>
imul   $0xfffffffd,-0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x64,%eax
jg     1144 <main+0x34>
mov    %eax,%ebx
nop
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x2,%edx
sub    %ebx,%edx
sub    %ebx,%edx
lea    (%rbx,%rbx,2),%ecx
mov    $0xfffffffe,%ebx
sub    %ecx,%ebx
test   %eax,%eax
cmovne %edx,%ebx
cmp    $0x65,%ebx
jl     1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 101
br i1 %2, label %3, label %13
3: ; preds = %0, %3
%4 = phi i32 [ %11, %3 ], [ %1, %0 ]
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = icmp eq i32 %5, 0
%7 = mul nsw i32 %4, -2
%8 = add nsw i32 %7, 2
%9 = mul nsw i32 %4, -3
%10 = add nsw i32 %9, -2
%11 = select i1 %6, i32 %10, i32 %8
%12 = icmp slt i32 %11, 101
br i1 %12, label %3, label %13
13: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arr_ops(char **, int, char **);
int main(int argc, char **argv) {
  char *arr[100];
  arr_ops(arr, argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x330(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <arr_ops@plt>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x328,%rsp
mov    %rsi,%rdx
mov    %edi,%esi
mov    %rsp,%rdi
call   1030 <arr_ops@plt>
xor    %eax,%eax
add    $0x328,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [100 x i8*]
%4 = bitcast [100 x i8*]* %3 to i8*
%5 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%6 = call i32 @arr_ops(i8** %5, i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int f();
__attribute__((no, noclone)) int g4(int p1, int p2, int p3, int p4) {
  return f();
}


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

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

LLVM IR (-O0):
define i32 @g4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 (...) @f()
ret i32 %9
}

LLVM IR (-O2):
define i32 @g4(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @f()
ret i32 %5
}
char StringGet(void *getClosure) {
  char **p = (char **)getClosure;
  return *((*p)++);
}


x86 assembly (clang, -O0):
<StringGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringGet>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    (%rax),%al
ret

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

LLVM IR (-O2):
define signext i8 @StringGet(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %4, i8** %2
%5 = load i8, i8* %3
ret i8 %5
}
void f61(void) {
  ({
    ({ 0; });
    ({
      goto a;
      0;
    });
  a:
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f61>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f61() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
br label %8
8: ; preds = %0
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
store i32 0, i32* %6
%12 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @f61() {
ret void
}
void be_write32(void *pp, const unsigned i) {
  char *p = (char *)pp;
  p[0] = (i >> 24) & 0xff;
  p[1] = (i >> 16) & 0xff;
  p[2] = (i >> 8) & 0xff;
  p[3] = i & 0xff;
}


x86 assembly (clang, -O0):
<be_write32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @be_write32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = lshr i32 %7, 24
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i32, i32* %4
%14 = lshr i32 %13, 16
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
%19 = load i32, i32* %4
%20 = lshr i32 %19, 8
%21 = and i32 %20, 255
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 2
store i8 %22, i8* %24
%25 = load i32, i32* %4
%26 = and i32 %25, 255
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 3
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @be_write32(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
void alan_exit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @alan_exit() {
ret void
}
int http_uri_length(const char *s) {
  int i;
  for (i = 0; s[i] != ' '; i++) {
    if (!s[i])
      return 0;
  }
  return i;
}


x86 assembly (clang, -O0):
<http_uri_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1155 <http_uri_length+0x55>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
jne    1142 <http_uri_length+0x42>
movl   $0x0,-0x4(%rbp)
jmp    115b <http_uri_length+0x5b>
jmp    1147 <http_uri_length+0x47>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <http_uri_length+0xf>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_uri_length>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <http_uri_length+0x23>
cmp    $0x20,%cl
je     1125 <http_uri_length+0x25>
add    $0x1,%rax
jmp    1110 <http_uri_length+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @http_uri_length(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 32, label %8
i8 0, label %10
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRB8_set(void) { return U_WMRCORENONE_set("U_WMRB8"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRB8\00"
define i8* @U_WMRB8_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRB8\00"
define i8* @U_WMRB8_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ helper(struct TreeNode *, int *, int *);
int rob(struct TreeNode *root) {
  int w = 0;
  int wo = 0;
  helper(root, &w, &wo);
  return w > wo ? w : wo;
}


x86 assembly (clang, -O0):
<rob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <helper@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1152 <rob+0x42>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1158 <rob+0x48>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rob>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <helper@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%eax
cmp    %eax,%ecx
cmovg  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @rob(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32
%4 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load %struct.TreeNode*, %struct.TreeNode** %2
%6 = call i32 @helper(%struct.TreeNode* %5, i32* %3, i32* %4)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %3
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
br label %14
14: ; preds = %12, %10
%15 = phi i32 [ %11, %10 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @rob(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = call i32 @helper(%struct.TreeNode* %0, i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %7, %8
%10 = select i1 %9, i32 %7, i32 %8
ret i32 %10
}
void dsi_runtime_put(struct platform_device *dsidev) {}


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define void @dsi_runtime_put(%struct.platform_device* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t i2c_is_busy(uint32_t *i2c) { return i2c[0x004 / 4] & 0x1; }


x86 assembly (clang, -O0):
<i2c_is_busy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_is_busy>:
mov    0x4(%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @i2c_is_busy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @i2c_is_busy(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, 1
ret i32 %4
}
void ble_rsp_gap_set_adv_data(
    const struct ble_msg_gap_set_adv_data_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_gap_set_adv_data_rsp_t = type opaque
define void @ble_rsp_gap_set_adv_data(%struct.ble_msg_gap_set_adv_data_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void varsyntax_calc1_error(const char *s) { fprintf(stderr, "%s\n", s); }


x86 assembly (clang, -O0):
<varsyntax_calc1_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<varsyntax_calc1_error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @varsyntax_calc1_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ *stderr;
FILE *open_logfile() {
  FILE *f;
  if ((f = fopen("plaza.log", "a")) == NULL)
    return stderr;
  return f;
}


x86 assembly (clang, -O0):
<open_logfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114c <open_logfile+0x3c>
mov    0x2ea0(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <open_logfile+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_logfile>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
jne    1133 <open_logfile+0x23>
mov    0x2eb0(%rip),%rax
mov    (%rax),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"plaza.log\00"
@.str.1 = [2 x i8] c"a\00"
@stderr = global i32* null
define i32* @open_logfile() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
%3 = load i32*, i32** @stderr
%4 = select i1 %2, i32* %3, i32* %1
ret i32* %4
}
void outportb(unsigned short port, unsigned char data) {
  __asm__("out %%al, %%dx" : : "a"(data), "d"(port));
}


x86 assembly (clang, -O0):
<outportb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outportb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outportb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "out %al, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int chroot(const char *path) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<chroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chroot>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @chroot(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @chroot(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
int uvmperm() { return 0x2 | 0x4; }


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

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

LLVM IR (-O0):
define i32 @uvmperm() {
ret i32 6
}

LLVM IR (-O2):
define i32 @uvmperm() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  printf("The next largest even multiple of %i and %i is %i.\n", 365, 7,
         365 + 7 - 365 % 7);
  printf("The next largest even multiple of %i and %i is %i.\n", 12258, 23,
         12258 + 23 - 12258 % 23);
  printf("The next largest even multiple of %i and %i is %i.\n", 996, 4,
         996 + 4 - 996 % 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x16d,%esi
mov    $0x7,%edx
mov    $0x173,%ecx
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x2fe2,%esi
mov    $0x17,%edx
mov    $0x2fe3,%ecx
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
mov    $0x3e4,%esi
mov    $0x4,%edx
mov    $0x3e8,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x16d,%esi
mov    $0x7,%edx
mov    $0x173,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2fe2,%esi
mov    $0x17,%edx
mov    $0x2fe3,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e4,%esi
mov    $0x4,%edx
mov    $0x3e8,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"The next largest even multiple of %i and %i is %i.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 365, i32 7, i32 371)
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 12258, i32 23, i32 12259)
%4 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 996, i32 4, i32 1000)
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"The next largest even multiple of %i and %i is %i.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 365, i32 7, i32 371)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 12258, i32 23, i32 12259)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 996, i32 4, i32 1000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ str_reverse(char *);
int main(int argc, const char *argv[]) {
  char buf[1000];
  scanf("%s", buf);
  str_reverse(buf);
  printf("%s", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x400(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x400(%rbp),%rdi
call   1040 <str_reverse@plt>
lea    -0x400(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
lea    0xebf(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <str_reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%10 = call i32 @str_reverse(i8* %9)
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @str_reverse(i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf(
      "\x48\x6F\x6C\x61\x20\x61			\x20\x74\x6F\x64\x6F\x73\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hola a\09\09\09 todos\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hola a\09\09\09 todos\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exemploGrafoAciclico();
int /*<<< orphan*/ exemploGrafoCiclico();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("1 equivale à VERDADEIRO; 0 equivale à FALSO\n\n");
  exemploGrafoAciclico();
  exemploGrafoCiclico();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"1 equivale \C3\A0 VERDADEIRO; 0 equivale \C3\A0 FALSO\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @exemploGrafoAciclico()
%4 = call i32 (...) @exemploGrafoCiclico()
ret i32 0
}

LLVM IR (-O2):
@str = [47 x i8] c"1 equivale \C3\A0 VERDADEIRO; 0 equivale \C3\A0 FALSO\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @exemploGrafoAciclico()
%3 = tail call i32 (...) @exemploGrafoCiclico()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_string(char const *);
void write_word(const char *s) {
  write_string(s);
  write_string(" ");
}


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

x86 assembly (clang, -O2):
<write_word>:
push   %rax
call   1030 <write_string@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <write_string@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @write_word(i8* %0) {
%2 = tail call i32 @write_string(i8* %0)
%3 = tail call i32 @write_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *nn_alloc_(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<nn_alloc_>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @nn_alloc_(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @nn_alloc_(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Type definitions */
struct bgp_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprint_bgp_file_fmt(int /*<<< orphan*/,
                                       struct bgp_file const *, char const *);
int /*<<< orphan*/ stdout;
void print_bgp_file_fmt(const struct bgp_file *sf, const char *fmt) {
  fprint_bgp_file_fmt(stdout, sf, fmt);
}


x86 assembly (clang, -O0):
<print_bgp_file_fmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <fprint_bgp_file_fmt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bgp_file_fmt>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprint_bgp_file_fmt@plt>

LLVM IR (-O0):
%struct.bgp_file = type { i32 }
@stdout = global i32 0
define void @print_bgp_file_fmt(%struct.bgp_file* %0, i8* %1) {
%3 = alloca %struct.bgp_file*
%4 = alloca i8*
store %struct.bgp_file* %0, %struct.bgp_file** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stdout
%6 = load %struct.bgp_file*, %struct.bgp_file** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprint_bgp_file_fmt(i32 %5, %struct.bgp_file* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.bgp_file = type { i32 }
@stdout = global i32 0
define void @print_bgp_file_fmt(%struct.bgp_file* %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprint_bgp_file_fmt(i32 %3, %struct.bgp_file* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
void set_block(int fd) {
  int fl = fcntl(fd, F_GETFL, 0);
  fcntl(fd, F_SETFL, fl & ~O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    %eax,%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_block>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb5(%rip),%rcx
mov    (%rcx),%edx
not    %edx
and    %eax,%edx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 @fcntl(i32 %4, i32 %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* @F_SETFL
%9 = load i32, i32* %3
%10 = load i32, i32* @O_NONBLOCK
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
%13 = call i32 @fcntl(i32 %7, i32 %8, i32 %12)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_block(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
%8 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %7)
ret void
}
/* Type definitions */
struct uevent {
  int dummy;
};

/* Variables and functions */
int uevent_get_env_positive_int(struct uevent const *, char *);
int uevent_get_disk_ro(const struct uevent *uev) {
  return uevent_get_env_positive_int(uev, "DISK_RO");
}


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

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

LLVM IR (-O0):
%struct.uevent = type { i32 }
@.str = [8 x i8] c"DISK_RO\00"
define i32 @uevent_get_disk_ro(%struct.uevent* %0) {
%2 = alloca %struct.uevent*
store %struct.uevent* %0, %struct.uevent** %2
%3 = load %struct.uevent*, %struct.uevent** %2
%4 = call i32 @uevent_get_env_positive_int(%struct.uevent* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.uevent = type { i32 }
@.str = [8 x i8] c"DISK_RO\00"
define i32 @uevent_get_disk_ro(%struct.uevent* %0) {
%2 = tail call i32 @uevent_get_env_positive_int(%struct.uevent* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void ecspi2_iomux_config() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ send(int, void const *, size_t, int);
__attribute__((weak)) ssize_t __real_send(int fd, const void *buf, size_t len,
                                          int flags) {
  return send(fd, buf, len, flags);
}


x86 assembly (clang, -O0):
<__real_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__real_send>:
jmp    1030 <send@plt>

LLVM IR (-O0):
define weak i32 @__real_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @send(i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define weak i32 @__real_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
int main() { foo(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strtod(char const *, char **);
int IsNumber(const char *s) {
  char **endptr;
  char *p;
  if (s[0] == 0) {
    return (0);
  }
  endptr = &p;
  strtod(s, endptr);
  if (**endptr != 0) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<IsNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1138 <IsNumber+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1173 <IsNumber+0x63>
lea    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116c <IsNumber+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <IsNumber+0x63>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNumber>:
push   %rax
cmpb   $0x0,(%rdi)
je     112c <IsNumber+0x1c>
mov    %rsp,%rsi
call   1030 <strtod@plt>
mov    (%rsp),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @IsNumber(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = call i32 @strtod(i8* %0, i8** %2)
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *CopyString(const char *string) {
  if (string == NULL)
    return NULL;
  char *copy = malloc(strlen(string) + 1);
  strcpy(copy, string);
  return copy;
}


x86 assembly (clang, -O0):
<CopyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <CopyString+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1182 <CopyString+0x52>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyString>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <CopyString+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <CopyString+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @CopyString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
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 i8* null, i8** %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %8, %7
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @CopyString(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
void f(const int *__restrict a, const int *b) { a = ((a) > (b) ? (a) : (b)); }


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

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

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

LLVM IR (-O2):
define void @f(i32* noalias nocapture %0, i32* nocapture %1) {
ret void
}
void ff_hevc_put_hevc_uni_w_pel_pixels16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels16_8_sse4() {
ret void
}
/* Variables and functions */
int IPC_CREAT;
int *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int shmget(int, int, int);
int shm_init() {
  int shmid = shmget(4321, 512, IPC_CREAT | 0600);
  int *max = shmat(shmid, NULL, 0);
  (*max) = 0;
  return 0;
}


x86 assembly (clang, -O0):
<shm_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
or     $0x180,%edx
mov    $0x10e1,%edi
mov    $0x200,%esi
call   1040 <shmget@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shm_init>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    $0x180,%edx
or     (%rax),%edx
mov    $0x10e1,%edi
mov    $0x200,%esi
call   1040 <shmget@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @shm_init() {
%1 = alloca i32
%2 = alloca i32*
%3 = load i32, i32* @IPC_CREAT
%4 = or i32 %3, 384
%5 = call i32 @shmget(i32 4321, i32 512, i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32* @shmat(i32 %6, i32* null, i32 0)
store i32* %7, i32** %2
%8 = load i32*, i32** %2
store i32 0, i32* %8
ret i32 0
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @shm_init() {
%1 = load i32, i32* @IPC_CREAT
%2 = or i32 %1, 384
%3 = tail call i32 @shmget(i32 4321, i32 512, i32 %2)
%4 = tail call i32* @shmat(i32 %3, i32* null, i32 0)
store i32 0, i32* %4
ret i32 0
}
void TC2_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<TC2_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <TC2_IRQHandler+0x9>
jmp    1109 <TC2_IRQHandler+0x9>

x86 assembly (clang, -O2):
<TC2_IRQHandler>:
jmp    1100 <TC2_IRQHandler>

LLVM IR (-O0):
define void @TC2_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @TC2_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ CompileMark(int, int);
int /*<<< orphan*/ MakeLink(int, int /*<<< orphan*/);
void DoElse(void) {
  MakeLink(2, 0);
  CompileMark(29, 2);
}


x86 assembly (clang, -O0):
<DoElse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <MakeLink@plt>
mov    $0x1d,%edi
mov    $0x2,%esi
call   1030 <CompileMark@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoElse>:
push   %rax
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <MakeLink@plt>
mov    $0x1d,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <CompileMark@plt>

LLVM IR (-O0):
define void @DoElse() {
%1 = call i32 @MakeLink(i32 2, i32 0)
%2 = call i32 @CompileMark(i32 29, i32 2)
ret void
}

LLVM IR (-O2):
define void @DoElse() {
%1 = tail call i32 @MakeLink(i32 2, i32 0)
%2 = tail call i32 @CompileMark(i32 29, i32 2)
ret void
}
void dlnaCloseLog() {}


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

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

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

LLVM IR (-O2):
define void @dlnaCloseLog() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core7_print(char *, char *, char *, char const *);
void U_EMRSETWINDOWORGEX_print(const char *contents) {
  core7_print("U_EMRSETWINDOWORGEX", "ptlOrigin:", "", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRSETWINDOWORGEX_print>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xef6(%rip),%rdx
jmp    1030 <core7_print@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"U_EMRSETWINDOWORGEX\00"
@.str.1 = [11 x i8] c"ptlOrigin:\00"
@.str.2 = [1 x i8] zeroinitializer
define void @U_EMRSETWINDOWORGEX_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core7_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"U_EMRSETWINDOWORGEX\00"
@.str.1 = [11 x i8] c"ptlOrigin:\00"
@.str.2 = [1 x i8] zeroinitializer
define void @U_EMRSETWINDOWORGEX_print(i8* %0) {
%2 = tail call i32 @core7_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}