xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int unknown_result();
void test_16c(int i) {
  int j;
  j = i;
  __analyzer_eval(j == i);
  j = unknown_result();
  __analyzer_eval(j == i);
}


x86 assembly (clang, -O0):
<test_16c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__analyzer_eval@plt>
mov    $0x0,%al
call   1030 <unknown_result@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_16c>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1040 <__analyzer_eval@plt>
xor    %eax,%eax
call   1030 <unknown_result@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
pop    %rbx
jmp    1040 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test_16c(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__analyzer_eval(i32 %8)
%10 = call i32 (...) @unknown_result()
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @__analyzer_eval(i32 %14)
ret void
}

LLVM IR (-O2):
define void @test_16c(i32 %0) {
%2 = tail call i32 @__analyzer_eval(i32 1)
%3 = tail call i32 (...) @unknown_result()
%4 = icmp eq i32 %3, %0
%5 = zext i1 %4 to i32
%6 = tail call i32 @__analyzer_eval(i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ wint_t;

/* Variables and functions */
int iswdigit(wint_t wc) { return (unsigned)wc - '0' < 10; }


x86 assembly (clang, -O0):
<iswdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x30,%eax
cmp    $0xa,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @iswdigit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = sub i32 %4, 48
%6 = icmp ult i32 %5, 10
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @iswdigit(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO2(int, int);
int BNCLCDEchoOn() {
  int ii, stat = 99;
  char com1, data;
  BNCIO2(33, 1);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCLCDEchoOn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <BNCIO2@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCLCDEchoOn>:
push   %rax
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <BNCIO2@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNCLCDEchoOn() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO2(i32 33, i32 1)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNCLCDEchoOn() {
%1 = tail call i32 @BNCIO2(i32 33, i32 1)
ret i32 99
}
int add(int *fu, int *re) {
  __asm__("add %a1,%b1" : : "a"(fu), "b"(re));
  return 0;
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
add    (%rbx),%bl
xor    %eax,%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rax
add    (%rbx),%bl
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @add(i32* %0, i32* %1) {
tail call void asm sideeffect "add ${1:a},${1:b}", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32* %0, i32* %1)
ret i32 0
}
/* Variables and functions */
unsigned int __builtin_arm_cls(unsigned long);
unsigned int clsl(unsigned long v) { return __builtin_arm_cls(v); }


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

x86 assembly (clang, -O2):
<clsl>:
jmp    1030 <__builtin_arm_cls@plt>

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

LLVM IR (-O2):
define i32 @clsl(i64 %0) {
%2 = tail call i32 @__builtin_arm_cls(i64 %0)
ret i32 %2
}
void sti(void) { __asm__ __volatile__("sti"); }


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

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

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

LLVM IR (-O2):
define void @sti() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int setlen(char **, int);
int main(void) {
  char *seqs[4] = {"ATTAGACCTG", "CCTGCCGGAA", "AGACCTGCCG", "GCCGGAATAC"};
  printf("%d\n", setlen(seqs, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cc7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cc4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cc1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
call   1040 <setlen@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0x2ce5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <setlen@plt>
lea    0xedd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"ATTAGACCTG\00"
@.str.1 = [11 x i8] c"CCTGCCGGAA\00"
@.str.2 = [11 x i8] c"AGACCTGCCG\00"
@.str.3 = [11 x i8] c"GCCGGAATAC\00"
@__const.main.seqs = [4 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8*]
store i32 0, i32* %1
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%5 = call i32 @setlen(i8** %4, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"ATTAGACCTG\00"
@.str.1 = [11 x i8] c"CCTGCCGGAA\00"
@.str.2 = [11 x i8] c"AGACCTGCCG\00"
@.str.3 = [11 x i8] c"GCCGGAATAC\00"
@__const.main.seqs = [4 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = bitcast [4 x i8*]* %1 to i8*
%3 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%4 = call i32 @setlen(i8** %3, i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ awosEnd();
void awEnd() { awosEnd(); }


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

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

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

LLVM IR (-O2):
define void @awEnd() {
%1 = tail call i32 (...) @awosEnd()
ret void
}
int enable_pmtu_discovery(int s) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @enable_pmtu_discovery(i32 %0) {
ret i32 0
}
/* Type definitions */
struct timeval {
  int tv_sec;
};
struct event {
  int dummy;
};

/* Variables and functions */
int event_add(struct event *, struct timeval *);
int /*<<< orphan*/ evutil_timerclear(struct timeval *);
int bev_add(struct event *ev, int timeout) {
  struct timeval tv, *ptv = NULL;
  if (timeout) {
    evutil_timerclear(&tv);
    tv.tv_sec = timeout;
    ptv = &tv;
  }
  return event_add(ev, ptv);
}


x86 assembly (clang, -O0):
<bev_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1158 <bev_add+0x38>
lea    -0x10(%rbp),%rdi
call   1030 <evutil_timerclear@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <event_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bev_add>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
test   %esi,%esi
je     1144 <bev_add+0x24>
mov    %esi,%ebp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <evutil_timerclear@plt>
mov    %ebp,0x8(%rsp)
jmp    1146 <bev_add+0x26>
xor    %ebx,%ebx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <event_add@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.event = type { i32 }
%struct.timeval = type { i32 }
define i32 @bev_add(%struct.event* %0, i32 %1) {
%3 = alloca %struct.event*
%4 = alloca i32
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval*
store %struct.event* %0, %struct.event** %3
store i32 %1, i32* %4
store %struct.timeval* null, %struct.timeval** %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 @evutil_timerclear(%struct.timeval* %5)
%11 = load i32, i32* %4
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %11, i32* %12
store %struct.timeval* %5, %struct.timeval** %6
br label %13
13: ; preds = %9, %2
%14 = load %struct.event*, %struct.event** %3
%15 = load %struct.timeval*, %struct.timeval** %6
%16 = call i32 @event_add(%struct.event* %14, %struct.timeval* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.event = type { i32 }
%struct.timeval = type { i32 }
define i32 @bev_add(%struct.event* %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = icmp eq i32 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = call i32 @evutil_timerclear(%struct.timeval* %3)
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 %1, i32* %8
br label %9
9: ; preds = %6, %2
%10 = phi %struct.timeval* [ %3, %6 ], [ null, %2 ]
%11 = call i32 @event_add(%struct.event* %0, %struct.timeval* %10)
ret i32 %11
}
/* Variables and functions */
int *func_ret_null() { return NULL; }


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

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

LLVM IR (-O0):
define i32* @func_ret_null() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @func_ret_null() {
ret i32* null
}
unsigned int nlz_long(unsigned long x) {
  if (x == 0)
    return 8 * 8;
  return (unsigned int)__builtin_clzl(x);
}


x86 assembly (clang, -O0):
<nlz_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <nlz_long+0x1f>
movl   $0x40,-0x4(%rbp)
jmp    112e <nlz_long+0x2e>
mov    -0x10(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlz_long>:
test   %rdi,%rdi
je     110e <nlz_long+0xe>
bsr    %rdi,%rax
xor    $0x3f,%rax
ret
mov    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @nlz_long(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 64, i32* %2
br label %11
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @llvm.ctlz.i64(i64 %8, i1 true)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @nlz_long(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 false)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int cairo_code_draw_powerbg_get_width() { return 487; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_powerbg_get_width() {
ret i32 487
}

LLVM IR (-O2):
define i32 @cairo_code_draw_powerbg_get_width() {
ret i32 487
}
/* Variables and functions */
void *nfa_compare_equal(void *nfa1, void *nfa2) {
  void *ret = NULL;
  if (nfa1 == NULL || nfa2 == NULL) {
    return ret;
  }
  if (nfa1 == nfa2) {
    ret = nfa1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<nfa_compare_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112a <nfa_compare_equal+0x2a>
cmpq   $0x0,-0x18(%rbp)
jne    1137 <nfa_compare_equal+0x37>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <nfa_compare_equal+0x55>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    114d <nfa_compare_equal+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nfa_compare_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
cmove  %rdi,%rax
test   %rsi,%rsi
cmove  %rsi,%rax
test   %rdi,%rdi
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i8* @nfa_compare_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* null, i8** %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %9, %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %22
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = icmp eq i8* %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i8*, i8** %4
store i8* %19, i8** %6
br label %20
20: ; preds = %18, %14
%21 = load i8*, i8** %6
store i8* %21, i8** %3
br label %22
22: ; preds = %20, %12
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @nfa_compare_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
%6 = icmp eq i8* %0, %1
%7 = select i1 %6, i8* %0, i8* null
%8 = select i1 %5, i8* null, i8* %7
ret i8* %8
}
int trans_6_x(int x, int y) { return y; }


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

x86 assembly (clang, -O2):
<trans_6_x>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @trans_6_x(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Type definitions */
struct xdg_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void xdg_surface_unset_maximized(struct xdg_surface *xdg_surface) {
  wl_proxy_marshal((struct wl_proxy *)xdg_surface, 11);
}


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

x86 assembly (clang, -O2):
<xdg_surface_unset_maximized>:
mov    $0xb,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_unset_maximized(%struct.xdg_surface* %0) {
%2 = alloca %struct.xdg_surface*
store %struct.xdg_surface* %0, %struct.xdg_surface** %2
%3 = load %struct.xdg_surface*, %struct.xdg_surface** %2
%4 = bitcast %struct.xdg_surface* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 11)
ret void
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_unset_maximized(%struct.xdg_surface* %0) {
%2 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 11)
ret void
}
int test_imm_26uint8_reg(unsigned char val) {
  return ((val) & (0x26 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_26uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x26,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_26uint8_reg>:
test   $0x26,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_26uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 38
%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_26uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 38
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ smp_mb();
void smp_mb__after_lock(void) { smp_mb(); }


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

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

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

LLVM IR (-O2):
define void @smp_mb__after_lock() {
%1 = tail call i32 (...) @smp_mb()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendWeaponPref2();
void AutoBrake2_OnChange(void) { SendWeaponPref2(); }


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

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

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

LLVM IR (-O2):
define void @AutoBrake2_OnChange() {
%1 = tail call i32 (...) @SendWeaponPref2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double, double);
double sin(double);
int main() {
  double x;
  int i = 3;
  x = 1.0 / (double)i;
  double y = sin(x);
  printf("i = %d, x = %f, y = %f\n", i, x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
mov    $0x3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"i = %d, x = %f, y = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
store i32 3, i32* %3
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = fdiv double 1.000000e+00, %6
store double %7, double* %2
%8 = load double, double* %2
%9 = call double @sin(double %8)
store double %9, double* %4
%10 = load i32, i32* %3
%11 = load double, double* %2
%12 = load double, double* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %10, double %11, double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"i = %d, x = %f, y = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 3, double 0x3FD5555555555555, double 0x3FD4F0C2068A80C6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *make_sourcename(char const *);
int access_sourcename(const char *name) {
  char *fname = make_sourcename(name);
  int rc = access(fname, F_OK);
  free(fname);
  return rc;
}


x86 assembly (clang, -O0):
<access_sourcename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <make_sourcename@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
call   1050 <access@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_sourcename>:
push   %rbp
push   %rbx
push   %rax
call   1040 <make_sourcename@plt>
mov    %rax,%rbx
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <access@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @access_sourcename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @make_sourcename(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = load i32, i32* @F_OK
%9 = call i32 @access(i8* %7, i32 %8)
store i32 %9, i32* %4
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @access_sourcename(i8* %0) {
%2 = tail call i8* @make_sourcename(i8* %0)
%3 = load i32, i32* @F_OK
%4 = tail call i32 @access(i8* %2, i32 %3)
%5 = tail call i32 @free(i8* %2)
ret i32 %4
}
int execute_accept4() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_accept4() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_accept4() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int i;
  int s = 0;
#pragma omp parallel shared(s)
  {
#pragma omp for reduction(+ : s)
    for (i = 0; i < 100; i++) {
      s = s + i;
    }
  }
  if (s != (((100 - 1) * 100) / 2)) {
    fprintf(stderr, "s == %d != %d\n", s, (((100 - 1) * 100) / 2));
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1165 <main+0x45>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
cmpl   $0x1356,-0x18(%rbp)
je     1196 <main+0x76>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%edx
lea    0xe7b(%rip),%rsi
mov    $0x1356,%ecx
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"s == %d != %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %6
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
store i32 %14, i32* %7
br label %15
15: ; preds = %11
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %8
18: ; preds = %8
%19 = load i32, i32* %7
%20 = icmp ne i32 %19, 4950
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* @stderr
%23 = load i32, i32* %7
%24 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %23, i32 4950)
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
uint32_t read32(FILE *fp) {
  uint32_t result;
  fread((&((uint8_t *)&result)[0]), 1, 1, fp);
  fread((&((uint8_t *)&result)[1]), 1, 1, fp);
  fread((&((uint8_t *)&result)[2]), 1, 1, fp);
  fread((&((uint8_t *)&result)[3]), 1, 1, fp);
  return result;
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
lea    -0xc(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
lea    -0xc(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
lea    -0xc(%rbp),%rdi
add    $0xc,%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
lea    0x14(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
lea    0x18(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read32(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 1, i32 1, i32* %0)
%5 = getelementptr inbounds i32, i32* %2, i64 1
%6 = call i32 @fread(i32* %5, i32 1, i32 1, i32* %0)
%7 = getelementptr inbounds i32, i32* %2, i64 2
%8 = call i32 @fread(i32* %7, i32 1, i32 1, i32* %0)
%9 = getelementptr inbounds i32, i32* %2, i64 3
%10 = call i32 @fread(i32* %9, i32 1, i32 1, i32* %0)
%11 = load i32, i32* %2
ret i32 %11
}
/* Variables and functions */
int makeChange(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", makeChange(6, 25));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
mov    $0x19,%esi
call   1040 <makeChange@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @makeChange(i32 6, i32 25)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CPUwfi();
void PRCMSleep(void) { CPUwfi(); }


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

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

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

LLVM IR (-O2):
define void @PRCMSleep() {
%1 = tail call i32 (...) @CPUwfi()
ret void
}
/* Type definitions */
struct dht_server {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ds_stop(struct dht_server *);
int /*<<< orphan*/ free(struct dht_server *);
void ds_cleanup(struct dht_server *ds) {
  ds_stop(ds);
  free(ds);
}


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

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

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

LLVM IR (-O2):
%struct.dht_server = type { i32 }
define void @ds_cleanup(%struct.dht_server* %0) {
%2 = tail call i32 @ds_stop(%struct.dht_server* %0)
%3 = tail call i32 @free(%struct.dht_server* %0)
ret void
}
/* Variables and functions */
void libretro_dummy_retro_cheat_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @libretro_dummy_retro_cheat_reset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ strlen(char *);
void process_request(int client) {
  char send_mes[30];
  sprintf(send_mes, "<h1>Hello!\r\n");
  printf("client connected sending mes");
  send(client, send_mes, strlen(send_mes), 0);
  close(client);
}


x86 assembly (clang, -O0):
<process_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1070 <sprintf@plt>
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
mov    -0x4(%rbp),%edi
call   1060 <close@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_request>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
movabs $0xa0d216f6c6c65,%rax
mov    %rax,0x5(%rsp)
movabs $0x6c6c65483e31683c,%rax
65 6c 6c
mov    %rax,(%rsp)
lea    0xea0(%rip),%rdi
call   1050 <printf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
mov    %ebx,%edi
call   1060 <close@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"<h1>Hello!\0D\0A\00"
@.str.1 = [29 x i8] c"client connected sending mes\00"
define void @process_request(i32 %0) {
%2 = alloca i32
%3 = alloca [30 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @send(i32 %7, i8* %8, i32 %10, i32 0)
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<h1>Hello!\0D\0A\00"
@.str.1 = [29 x i8] c"client connected sending mes\00"
define void @process_request(i32 %0) {
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @strlen(i8* %3)
%6 = call i32 @send(i32 %0, i8* %3, i32 %5, i32 0)
%7 = call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
void os_sleep(unsigned int seconds) { sleep(seconds); }


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

x86 assembly (clang, -O2):
<os_sleep>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @os_sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
void handle(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle(i32 %0) {
ret void
}
/* Variables and functions */
int wdog_reset_reason_clr();
int wdog_clear_reason(void) { return wdog_reset_reason_clr(); }


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

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

LLVM IR (-O0):
define i32 @wdog_clear_reason() {
%1 = call i32 (...) @wdog_reset_reason_clr()
ret i32 %1
}

LLVM IR (-O2):
define i32 @wdog_clear_reason() {
%1 = tail call i32 (...) @wdog_reset_reason_clr()
ret i32 %1
}
/* Variables and functions */
scalar_t__ baud_encode(int);
int serial_speed_valid(int bps) { return baud_encode(bps) > 0; }


x86 assembly (clang, -O0):
<serial_speed_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <baud_encode@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_speed_valid>:
push   %rax
call   1030 <baud_encode@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_speed_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @baud_encode(i32 %3)
%5 = icmp sgt i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @serial_speed_valid(i32 %0) {
%2 = tail call i64 @baud_encode(i32 %0)
%3 = icmp sgt i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outer();
int main() { outer(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @outer()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void quit(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @quit() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int lchmod(const char *file, mode_t mode) {
  __set_errno(ENOSYS);
  return -1;
}


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

x86 assembly (clang, -O2):
<lchmod>:
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 @lchmod(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @lchmod(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
scalar_t__ COND_LS();
int /*<<< orphan*/ EA_AY_DI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_sls_8_di(void) {
  m68ki_write_8(EA_AY_DI_8(), COND_LS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_sls_8_di>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_DI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_LS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sls_8_di>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_DI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_LS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sls_8_di() {
%1 = call i32 (...) @EA_AY_DI_8()
%2 = call i64 (...) @COND_LS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sls_8_di() {
%1 = tail call i32 (...) @EA_AY_DI_8()
%2 = tail call i64 (...) @COND_LS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int arr[], int n) {
  for (int i = 0; i < n; i++) {
    printf("%d ", arr[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ LTC2309_set_channel(int);
int /*<<< orphan*/ gpio_iic_init();
uint8_t LTC2309_init() {
  gpio_iic_init();
  return LTC2309_set_channel((0x88));
}


x86 assembly (clang, -O0):
<LTC2309_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <gpio_iic_init@plt>
mov    $0x88,%edi
call   1030 <LTC2309_set_channel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LTC2309_init>:
push   %rax
xor    %eax,%eax
call   1040 <gpio_iic_init@plt>
mov    $0x88,%edi
pop    %rax
jmp    1030 <LTC2309_set_channel@plt>

LLVM IR (-O0):
define i32 @LTC2309_init() {
%1 = call i32 (...) @gpio_iic_init()
%2 = call i32 @LTC2309_set_channel(i32 136)
ret i32 %2
}

LLVM IR (-O2):
define i32 @LTC2309_init() {
%1 = tail call i32 (...) @gpio_iic_init()
%2 = tail call i32 @LTC2309_set_channel(i32 136)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int get_void(FILE *f) {
  int c;
  while ((c = getc(f)) != EOF && c != '\n')
    ;
  return (c != EOF);
}


x86 assembly (clang, -O0):
<get_void>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2eb5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     1148 <get_void+0x38>
cmpl   $0xa,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1158 <get_void+0x48>
jmp    115d <get_void+0x4d>
jmp    111c <get_void+0xc>
mov    -0xc(%rbp),%eax
mov    0x2e81(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_void>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <getc@plt>
mov    (%r14),%edx
cmp    $0xa,%eax
je     1134 <get_void+0x24>
cmp    %edx,%eax
jne    1120 <get_void+0x10>
xor    %ecx,%ecx
cmp    %edx,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @get_void(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = icmp ne i32 %3, 10
%7 = and i1 %6, %5
br i1 %7, label %2, label %8
8: ; preds = %2
%9 = zext i1 %5 to i32
ret i32 %9
}
int max(int i1, int i2) { return (i1 > i2) ? i1 : i2; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt 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 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}