xunge/DecIR huggingface dataset:
/* Type definitions */
struct sk_buff_head {
  int dummy;
};
struct sk_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree_skb(struct sk_buff *);
struct sk_buff *skb_dequeue(struct sk_buff_head *);
void skb_queue_purge(struct sk_buff_head *list) {
  struct sk_buff *skb;
  while ((skb = skb_dequeue(list)) != NULL)
    kfree_skb(skb);
}


x86 assembly (clang, -O0):
<skb_queue_purge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skb_dequeue@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1151 <skb_queue_purge+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <kfree_skb@plt>
jmp    112c <skb_queue_purge+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skb_queue_purge>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <skb_dequeue@plt>
test   %rax,%rax
je     1147 <skb_queue_purge+0x27>
mov    %rax,%rdi
call   1030 <kfree_skb@plt>
mov    %rbx,%rdi
jmp    1130 <skb_queue_purge+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.sk_buff_head = type { i32 }
%struct.sk_buff = type { i32 }
define void @skb_queue_purge(%struct.sk_buff_head* %0) {
%2 = alloca %struct.sk_buff_head*
%3 = alloca %struct.sk_buff*
store %struct.sk_buff_head* %0, %struct.sk_buff_head** %2
br label %4
4: ; preds = %8, %1
%5 = load %struct.sk_buff_head*, %struct.sk_buff_head** %2
%6 = call %struct.sk_buff* @skb_dequeue(%struct.sk_buff_head* %5)
store %struct.sk_buff* %6, %struct.sk_buff** %3
%7 = icmp ne %struct.sk_buff* %6, null
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load %struct.sk_buff*, %struct.sk_buff** %3
%10 = call i32 @kfree_skb(%struct.sk_buff* %9)
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.sk_buff_head = type { i32 }
%struct.sk_buff = type { i32 }
define void @skb_queue_purge(%struct.sk_buff_head* %0) {
%2 = tail call %struct.sk_buff* @skb_dequeue(%struct.sk_buff_head* %0)
%3 = icmp eq %struct.sk_buff* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi %struct.sk_buff* [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 @kfree_skb(%struct.sk_buff* %5)
%7 = tail call %struct.sk_buff* @skb_dequeue(%struct.sk_buff_head* %0)
%8 = icmp eq %struct.sk_buff* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
ffc(i) register int i;
{
  register int n;
  for (n = 8 * sizeof(int); n > 0; n--, i >>= 1)
    if (!(i & 1))
      return (8 * sizeof(int) + 1) - n;
  return -1;
}


x86 assembly (clang, -O0):
<ffc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1157 <ffc+0x57>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    113b <ffc+0x3b>
movslq -0xc(%rbp),%rcx
mov    $0x21,%eax
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    115e <ffc+0x5e>
jmp    1140 <ffc+0x40>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ffc+0xe>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffc>:
mov    $0x20,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
test   $0x1,%dil
je     1143 <ffc+0x43>
test   $0x2,%dil
je     1136 <ffc+0x36>
test   $0x4,%dil
je     113b <ffc+0x3b>
test   $0x8,%dil
je     1140 <ffc+0x40>
sar    $0x4,%edi
add    $0xfffffffc,%ecx
jne    1110 <ffc+0x10>
mov    $0xffffffff,%eax
ret
add    $0xffffffff,%ecx
jmp    1143 <ffc+0x43>
add    $0xfffffffe,%ecx
jmp    1143 <ffc+0x43>
add    $0xfffffffd,%ecx
mov    $0x21,%eax
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ffc(i32 %0) {
br label %2
2: ; preds = %24, %1
%3 = phi i32 [ 32, %1 ], [ %25, %24 ]
%4 = phi i32 [ %0, %1 ], [ %26, %24 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %14
7: ; preds = %17
%8 = add nsw i32 %3, -2
br label %11
9: ; preds = %14
%10 = add nsw i32 %3, -1
br label %11
11: ; preds = %2, %20, %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ], [ %21, %20 ], [ %3, %2 ]
%13 = sub nsw i32 33, %12
br label %28
14: ; preds = %2
%15 = and i32 %4, 2
%16 = icmp eq i32 %15, 0
br i1 %16, label %9, label %17
17: ; preds = %14
%18 = and i32 %4, 4
%19 = icmp eq i32 %18, 0
br i1 %19, label %7, label %20
20: ; preds = %17
%21 = add nsw i32 %3, -3
%22 = and i32 %4, 8
%23 = icmp eq i32 %22, 0
br i1 %23, label %11, label %24
24: ; preds = %20
%25 = add nsw i32 %3, -4
%26 = ashr i32 %4, 4
%27 = icmp eq i32 %21, 1
br i1 %27, label %28, label %2
28: ; preds = %24, %11
%29 = phi i32 [ %13, %11 ], [ -1, %24 ]
ret i32 %29
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, unsigned long);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *p;
  p = realloc(ptr, size);
  if (p == NULL)
    errx(EXIT_FAILURE, "out of memory allocation %lu bytes",
         (unsigned long)size);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1165 <xrealloc+0x45>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea0(%rip),%rsi
call   1030 <errx@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <xrealloc+0x2c>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
mov    %r14,%rdx
call   1030 <errx@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [35 x i8] c"out of memory allocation %lu bytes\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @EXIT_FAILURE
%13 = load i64, i64* %4
%14 = call i32 @errx(i32 %12, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [35 x i8] c"out of memory allocation %lu bytes\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @errx(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
__typeof__(stpncpy(1, 1, (void *)1)) test_stpncpy_142(void) {
  return stpncpy(1, 1, (void *)1);
}


x86 assembly (clang, -O0):
<test_stpncpy_142>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1030 <stpncpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stpncpy_142>:
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
jmp    1030 <stpncpy@plt>

LLVM IR (-O0):
define i8* @test_stpncpy_142() {
%1 = call i8* @stpncpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_stpncpy_142() {
%1 = tail call i8* @stpncpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* %1
}
/* Variables and functions */
int ustrncmp(char const *, char const *, int);
int ustrcmp(const char *pcStr1, const char *pcStr2) {
  return (ustrncmp(pcStr1, pcStr2, -1));
}


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

x86 assembly (clang, -O2):
<ustrcmp>:
mov    $0xffffffff,%edx
jmp    1030 <ustrncmp@plt>

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

LLVM IR (-O2):
define i32 @ustrcmp(i8* %0, i8* %1) {
%3 = tail call i32 @ustrncmp(i8* %0, i8* %1, i32 -1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *, char const *);
void usage(const char *filepath) {
  error(1, 0, "Usage: %s [options] <test>", filepath);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%edi
xor    %esi,%esi
lea    0xed2(%rip),%rdx
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: %s [options] <test>\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: %s [options] <test>\00"
define void @usage(i8* %0) {
%2 = tail call i32 @error(i32 1, i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void topnhead(int osvers, int osrel, int ossub) {
  printf("  pid command  net%% |   pid command  net%% | "
         "  pid command  net%%_top3_");
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c" pid command net%% | pid command net%% | pid command net%%_top3_\00"
define void @topnhead(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [73 x i8] c" pid command net%% | pid command net%% | pid command net%%_top3_\00"
define void @topnhead(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal(const char *mesg) {
  fprintf(stderr, "%s\n", mesg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(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)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fatal(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)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
long double fromRep128(int, int);
long double makeInf128() { return fromRep128(0x7fff000000000000UL, 0x0UL); }


x86 assembly (clang, -O0):
<makeInf128>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <fromRep128@plt>
fld    %st(0)
fstp   %st(0)
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeInf128>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <fromRep128@plt>

LLVM IR (-O0):
define x86_fp80 @makeInf128() {
%1 = call x86_fp80 @fromRep128(i32 0, i32 0)
ret x86_fp80 %1
}

LLVM IR (-O2):
define x86_fp80 @makeInf128() {
%1 = tail call x86_fp80 @fromRep128(i32 0, i32 0)
ret x86_fp80 %1
}
/* Variables and functions */
int /*<<< orphan*/ expression();
int /*<<< orphan*/ match(char);
int /*<<< orphan*/ popCompare();
int /*<<< orphan*/ setLessOrEqual();
void lessOrEqual() {
  match('=');
  expression();
  popCompare();
  setLessOrEqual();
}


x86 assembly (clang, -O0):
<lessOrEqual>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1050 <match@plt>
mov    $0x0,%al
call   1040 <expression@plt>
mov    $0x0,%al
call   1030 <popCompare@plt>
mov    $0x0,%al
call   1060 <setLessOrEqual@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lessOrEqual>:
push   %rax
mov    $0x3d,%edi
call   1050 <match@plt>
xor    %eax,%eax
call   1040 <expression@plt>
xor    %eax,%eax
call   1030 <popCompare@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <setLessOrEqual@plt>

LLVM IR (-O0):
define void @lessOrEqual() {
%1 = call i32 @match(i8 signext 61)
%2 = call i32 (...) @expression()
%3 = call i32 (...) @popCompare()
%4 = call i32 (...) @setLessOrEqual()
ret void
}

LLVM IR (-O2):
define void @lessOrEqual() {
%1 = tail call i32 @match(i8 signext 61)
%2 = tail call i32 (...) @expression()
%3 = tail call i32 (...) @popCompare()
%4 = tail call i32 (...) @setLessOrEqual()
ret void
}
void tegra_agic_clear_active(int irq) { return; }


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

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

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

LLVM IR (-O2):
define void @tegra_agic_clear_active(i32 %0) {
ret void
}
int mDNSAddToFirewall(const char *ignored, const char *also_ignored) {
  (void)ignored;
  (void)also_ignored;
  return 0;
}


x86 assembly (clang, -O0):
<mDNSAddToFirewall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mDNSAddToFirewall(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
ret i32 0
}

LLVM IR (-O2):
define i32 @mDNSAddToFirewall(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void twrite_prolog(string) char *string;
{
  printw("%s", string);
  refresh();
}


x86 assembly (clang, -O0):
<twrite_prolog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twrite_prolog>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <refresh@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @twrite_prolog(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @printw to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
scalar_t__ prj_get_resoptions();
int prj_getlistsize(void **);
int prj_get_numresoptions() {
  return prj_getlistsize((void **)prj_get_resoptions());
}


x86 assembly (clang, -O0):
<prj_get_numresoptions>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <prj_get_resoptions@plt>
mov    %rax,%rdi
call   1030 <prj_getlistsize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prj_get_numresoptions>:
push   %rax
xor    %eax,%eax
call   1040 <prj_get_resoptions@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <prj_getlistsize@plt>

LLVM IR (-O0):
define i32 @prj_get_numresoptions() {
%1 = call i64 (...) @prj_get_resoptions()
%2 = inttoptr i64 %1 to i8**
%3 = call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @prj_get_numresoptions() {
%1 = tail call i64 (...) @prj_get_resoptions()
%2 = inttoptr i64 %1 to i8**
%3 = tail call i32 @prj_getlistsize(i8** %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int /*<<< orphan*/ thr5(int /*<<< orphan*/);
int /*<<< orphan*/ thr6(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
__CPROVER_ASYNC_2:
  thr3(0);
__CPROVER_ASYNC_3:
  thr4(0);
__CPROVER_ASYNC_4:
  thr5(0);
__CPROVER_ASYNC_5:
  thr6(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1080 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1070 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   1080 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1070 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr3(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @thr4(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @thr5(i32 0)
br label %12
12: ; preds = %10
%13 = call i32 @thr6(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
%3 = tail call i32 @thr3(i32 0)
%4 = tail call i32 @thr4(i32 0)
%5 = tail call i32 @thr5(i32 0)
%6 = tail call i32 @thr6(i32 0)
ret i32 0
}
void nameTableProcessorDone(struct stNameTableProcessor *this) {}


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

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

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

LLVM IR (-O2):
%struct.stNameTableProcessor = type opaque
define void @nameTableProcessorDone(%struct.stNameTableProcessor* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *fp, int argc, char **argv) {
  fprintf(fp,
          "Usage: %s [options]\n\n"
          "Options:\n"
          "-h | --help          Print this message\n"
          "-v | --version       Print version\n"
          "-P | --pidfile       PID file\n"
          "-L | --logfile       Log file\n"
          "-p | --port          Port number\n"
          "-n | --nodaemon      Don't put the applciation in the background\n"
          "",
          argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdx),%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [264 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-h | --help Print this message\0A-v | --version Print version\0A-P | --pidfile PID file\0A-L | --logfile Log file\0A-p | --port Port number\0A-n | --nodaemon Don't put the applciation in the background\0A\00"
define void @usage(i32* %0, i32 %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8**
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32*, i32** %4
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [264 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-h | --help Print this message\0A-v | --version Print version\0A-P | --pidfile PID file\0A-L | --logfile Log file\0A-p | --port Port number\0A-n | --nodaemon Don't put the applciation in the background\0A\00"
define void @usage(i32* nocapture %0, i32 %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
char *day_name(int n) {
  static char name[8][20] = {"Monday", "Tuesday",  "Wednesday", "Thrusday",
                             "Friday", "Saturday", "Sunday",    "INVALID"};
  if (n < 8)
    return (*(name + n - 1) + 0);
  return (*(name + 7) + 0);
}


x86 assembly (clang, -O0):
<day_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1130 <day_name+0x30>
movslq -0xc(%rbp),%rcx
lea    0x2f14(%rip),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffec,%rax
mov    %rax,-0x8(%rbp)
jmp    1141 <day_name+0x41>
lea    0x2ef9(%rip),%rax
add    $0x8c,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<day_name>:
cmp    $0x8,%edi
movslq %edi,%rax
lea    (%rax,%rax,4),%rax
lea    0x2f1f(%rip),%rcx
lea    -0x14(%rcx,%rax,4),%rcx
lea    0x2f9f(%rip),%rax
cmovl  %rcx,%rax
ret

LLVM IR (-O0):
@day_name.name = internal global [8 x [20 x i8]] [[20 x i8] c"Monday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Tuesday\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Wednesday\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Thrusday\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Friday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Saturday\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Sunday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"INVALID\00\00\00\00\00\00\00\00\00\00\00\00\00"]
define i8* @day_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 8
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [20 x i8], [20 x i8]* getelementptr inbounds ([8 x [20 x i8]], [8 x [20 x i8]]* @day_name.name, i64 0, i64 0), i64 %8
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 -1
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %10, i64 0, i64 0
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8* %12, i8** %2
br label %14
13: ; preds = %1
store i8* getelementptr inbounds ([8 x [20 x i8]], [8 x [20 x i8]]* @day_name.name, i64 0, i64 7, i64 0), i8** %2
br label %14
14: ; preds = %13, %6
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@day_name.name = internal global [8 x [20 x i8]] [[20 x i8] c"Monday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Tuesday\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Wednesday\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Thrusday\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Friday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Saturday\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Sunday\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"INVALID\00\00\00\00\00\00\00\00\00\00\00\00\00"]
define i8* @day_name(i32 %0) {
%2 = icmp slt i32 %0, 8
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds [8 x [20 x i8]], [8 x [20 x i8]]* @day_name.name, i64 0, i64 %3
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 -1, i64 0
%6 = select i1 %2, i8* %5, i8* getelementptr inbounds ([8 x [20 x i8]], [8 x [20 x i8]]* @day_name.name, i64 0, i64 7, i64 0)
ret i8* %6
}
/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ pr_warn(char *);
scalar_t__ strstr(char *, char *);
int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *modname) {
  if (strstr(param, "dyndbg")) {
    pr_warn("dyndbg supported only in "
            "CONFIG_DYNAMIC_DEBUG builds\n");
    return 0;
  }
  return -EINVAL;
}


x86 assembly (clang, -O0):
<ddebug_dyndbg_module_param_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1166 <ddebug_dyndbg_module_param_cb+0x46>
lea    0xeb2(%rip),%rdi
call   1030 <pr_warn@plt>
movl   $0x0,-0x4(%rbp)
jmp    1174 <ddebug_dyndbg_module_param_cb+0x54>
xor    %eax,%eax
mov    0x2e71(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddebug_dyndbg_module_param_cb>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1142 <ddebug_dyndbg_module_param_cb+0x22>
lea    0xece(%rip),%rdi
call   1030 <pr_warn@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e97(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"dyndbg\00"
@.str.1 = [54 x i8] c"dyndbg supported only in CONFIG_DYNAMIC_DEBUG builds\0A\00"
@EINVAL = global i32 0
define i32 @ddebug_dyndbg_module_param_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %5
%9 = call i64 @strstr(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 @pr_warn(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %16
13: ; preds = %3
%14 = load i32, i32* @EINVAL
%15 = sub nsw i32 0, %14
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %11
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@.str = [7 x i8] c"dyndbg\00"
@.str.1 = [54 x i8] c"dyndbg supported only in CONFIG_DYNAMIC_DEBUG builds\0A\00"
@EINVAL = global i32 0
define i32 @ddebug_dyndbg_module_param_cb(i8* %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @pr_warn(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %3
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ 0, %6 ], [ %10, %8 ]
ret i32 %12
}
int test_imm_DEuint16_reg(unsigned short val) {
  return ((val) & (-0xDE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DEuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DEuint16_reg>:
test   $0xff22,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DEuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -222
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t li_chr_decode(int /*<<< orphan*/ *, char const *);
extern size_t li_chr_count(const char *s) {
  size_t count = 0;
  size_t n;
  while ((n = li_chr_decode(NULL, s))) {
    s += n;
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<li_chr_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1030 <li_chr_decode@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115c <li_chr_count+0x4c>
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <li_chr_count+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<li_chr_count>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <li_chr_decode@plt>
test   %rax,%rax
je     1146 <li_chr_count+0x36>
xor    %r14d,%r14d
nopl   0x0(%rax)
add    %rax,%rbx
add    $0x1,%r14
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <li_chr_decode@plt>
test   %rax,%rax
jne    1130 <li_chr_count+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @li_chr_count(i8* %0) {
%2 = tail call i64 @li_chr_decode(i32* null, i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %9, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 %5
%9 = add i64 %7, 1
%10 = tail call i64 @li_chr_decode(i32* null, i8* %8)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i64 [ 0, %1 ], [ %9, %4 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ japi_setborderlayout(int);
void j_setborderlayout(int arg0) { japi_setborderlayout(arg0); }


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

x86 assembly (clang, -O2):
<j_setborderlayout>:
jmp    1030 <japi_setborderlayout@plt>

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

LLVM IR (-O2):
define void @j_setborderlayout(i32 %0) {
%2 = tail call i32 @japi_setborderlayout(i32 %0)
ret void
}
/* Variables and functions */
double fromRep64(int);
double makeNegativeInf64(void) { return fromRep64(0xfff0000000000000UL); }


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

x86 assembly (clang, -O2):
<makeNegativeInf64>:
xor    %edi,%edi
jmp    1030 <fromRep64@plt>

LLVM IR (-O0):
define double @makeNegativeInf64() {
%1 = call double @fromRep64(i32 0)
ret double %1
}

LLVM IR (-O2):
define double @makeNegativeInf64() {
%1 = tail call double @fromRep64(i32 0)
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ dsm_server_close(int);
int main(int argc, char **argv) {
  dsm_server_close(3);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dsm_server_close(i32 3)
ret i32 0
}
/* Type definitions */
struct flock {
  scalar_t__ l_len;
  scalar_t__ l_start;
  int /*<<< orphan*/ l_whence;
  int /*<<< orphan*/ l_type;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_WRLCK;
int /*<<< orphan*/ SEEK_SET;
int fcntl(int, int /*<<< orphan*/, struct flock *);
int lock_fd(int fd) {
  struct flock lock;
  lock.l_type = F_WRLCK;
  lock.l_whence = SEEK_SET;
  lock.l_start = 0;
  lock.l_len = 0;
  return fcntl(fd, F_SETLK, &lock);
}


x86 assembly (clang, -O0):
<lock_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <fcntl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_fd>:
sub    $0x18,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <fcntl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.flock = type { i64, i64, i32, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
define i32 @lock_fd(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.flock
store i32 %0, i32* %2
%4 = load i32, i32* @F_WRLCK
%5 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 3
store i32 %4, i32* %5
%6 = load i32, i32* @SEEK_SET
%7 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 2
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 1
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 0
store i64 0, i64* %9
%10 = load i32, i32* %2
%11 = load i32, i32* @F_SETLK
%12 = call i32 @fcntl(i32 %10, i32 %11, %struct.flock* %3)
ret i32 %12
}

LLVM IR (-O2):
%struct.flock = type { i64, i64, i32, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
define i32 @lock_fd(i32 %0) {
%2 = alloca %struct.flock
%3 = bitcast %struct.flock* %2 to i8*
%4 = load i32, i32* @F_WRLCK
%5 = getelementptr inbounds %struct.flock, %struct.flock* %2, i64 0, i32 3
store i32 %4, i32* %5
%6 = load i32, i32* @SEEK_SET
%7 = getelementptr inbounds %struct.flock, %struct.flock* %2, i64 0, i32 2
store i32 %6, i32* %7
%8 = bitcast %struct.flock* %2 to i8*
%9 = load i32, i32* @F_SETLK
%10 = call i32 @fcntl(i32 %0, i32 %9, %struct.flock* %2)
ret i32 %10
}
int int_dec(const void *buf) { return *((int *)buf); }


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

x86 assembly (clang, -O2):
<int_dec>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @int_dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void init_sysORTable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @init_sysORTable() {
ret void
}
/* Variables and functions */
int f180(int *);
int f181(int *p) { return f180(p); }


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

x86 assembly (clang, -O2):
<f181>:
jmp    1030 <f180@plt>

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

LLVM IR (-O2):
define i32 @f181(i32* %0) {
%2 = tail call i32 @f180(i32* %0)
ret i32 %2
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_del_entry(struct list_head *);
int /*<<< orphan*/ init_list_head(struct list_head *);
void list_del_init(struct list_head *entry) {
  __list_del_entry(entry);
  init_list_head(entry);
}


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

x86 assembly (clang, -O2):
<list_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__list_del_entry@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <init_list_head@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @__list_del_entry(%struct.list_head* %3)
%5 = load %struct.list_head*, %struct.list_head** %2
%6 = call i32 @init_list_head(%struct.list_head* %5)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = tail call i32 @__list_del_entry(%struct.list_head* %0)
%3 = tail call i32 @init_list_head(%struct.list_head* %0)
ret void
}
void foo275() {}


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

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

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

LLVM IR (-O2):
define void @foo275() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_HAL_I2C_SDA_LO();
int /*<<< orphan*/ I2C_HAL_SDA_OUT_MODE();
void I2C_SDA_LOW(void) {
  I2C_HAL_SDA_OUT_MODE();
  I2C_HAL_I2C_SDA_LO();
}


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

x86 assembly (clang, -O2):
<I2C_SDA_LOW>:
push   %rax
xor    %eax,%eax
call   1030 <I2C_HAL_SDA_OUT_MODE@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <I2C_HAL_I2C_SDA_LO@plt>

LLVM IR (-O0):
define void @I2C_SDA_LOW() {
%1 = call i32 (...) @I2C_HAL_SDA_OUT_MODE()
%2 = call i32 (...) @I2C_HAL_I2C_SDA_LO()
ret void
}

LLVM IR (-O2):
define void @I2C_SDA_LOW() {
%1 = tail call i32 (...) @I2C_HAL_SDA_OUT_MODE()
%2 = tail call i32 (...) @I2C_HAL_I2C_SDA_LO()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void test22_free(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<test22_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @test22_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int local_string_to_cp850_string(char *, char *, unsigned int);
int local_string_to_dos_string(char *out, char *in, unsigned int out_size) {
  return local_string_to_cp850_string(out, in, out_size);
}


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

x86 assembly (clang, -O2):
<local_string_to_dos_string>:
jmp    1030 <local_string_to_cp850_string@plt>

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

LLVM IR (-O2):
define i32 @local_string_to_dos_string(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @local_string_to_cp850_string(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double alpha_h(double const);
double beta_h(double const);
double h_inf(const double V_tilde) {
  return alpha_h(V_tilde) / (alpha_h(V_tilde) + beta_h(V_tilde));
}


x86 assembly (clang, -O0):
<h_inf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <alpha_h@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <alpha_h@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <beta_h@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_inf>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1030 <alpha_h@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1030 <alpha_h@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <beta_h@plt>
addsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @h_inf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @alpha_h(double %3)
%5 = load double, double* %2
%6 = call double @alpha_h(double %5)
%7 = load double, double* %2
%8 = call double @beta_h(double %7)
%9 = fadd double %6, %8
%10 = fdiv double %4, %9
ret double %10
}

LLVM IR (-O2):
define double @h_inf(double %0) {
%2 = tail call double @alpha_h(double %0)
%3 = tail call double @alpha_h(double %0)
%4 = tail call double @beta_h(double %0)
%5 = fadd double %3, %4
%6 = fdiv double %2, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(void *);
int /*<<< orphan*/ perror(char *);
void *shmat(int, void *, int /*<<< orphan*/);
void *_map_sharedmem(int shmid, void *base) {
  void *_base;
  if ((_base = shmat(shmid, base, 0)) < 0) {
    perror("Existing with error code from shmat() ...\n");
    exit(_base);
  }
  return _base;
}


x86 assembly (clang, -O0):
<_map_sharedmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <shmat@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jae    1170 <_map_sharedmem+0x40>
lea    0xe9e(%rip),%rdi
call   1030 <perror@plt>
mov    -0x18(%rbp),%rdi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_map_sharedmem>:
xor    %edx,%edx
jmp    1030 <shmat@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Existing with error code from shmat() ...\0A\00"
define i8* @_map_sharedmem(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i8* @shmat(i32 %6, i8* %7, i32 0)
store i8* %8, i8** %5
%9 = icmp ult i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %5
%13 = call i32 @exit(i8* %12)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @_map_sharedmem(i32 %0, i8* %1) {
%3 = tail call i8* @shmat(i32 %0, i8* %1, i32 0)
ret i8* %3
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int /*<<< orphan*/ debug_perror(char *);
int32_t tcp_accept(int sockfd, struct sockaddr *client_addr,
                   int32_t *addr_len) {
  int32_t fd;
  if ((fd = accept(sockfd, client_addr, addr_len)) < 0)
    debug_perror("Could not accept connection");
  return (fd);
}


x86 assembly (clang, -O0):
<tcp_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <accept@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    115b <tcp_accept+0x3b>
lea    0xeaa(%rip),%rdi
call   1030 <debug_perror@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcp_accept>:
push   %rbx
call   1040 <accept@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <tcp_accept+0x18>
lea    0xecd(%rip),%rdi
call   1030 <debug_perror@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [28 x i8] c"Could not accept connection\00"
define i32 @tcp_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load %struct.sockaddr*, %struct.sockaddr** %5
%10 = load i32*, i32** %6
%11 = call i32 @accept(i32 %8, %struct.sockaddr* %9, i32* %10)
store i32 %11, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @debug_perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [28 x i8] c"Could not accept connection\00"
define i32 @tcp_accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @debug_perror(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}