xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ compute(int);
int /*<<< orphan*/ populate_initial_matrixes(int);
void computeall(int mynum) {
  int i;
  populate_initial_matrixes(mynum);
  for (i = 2; i < 11; i++) {
    compute(i);
  }
}


x86 assembly (clang, -O0):
<computeall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <populate_initial_matrixes@plt>
movl   $0x2,-0x8(%rbp)
cmpl   $0xb,-0x8(%rbp)
jge    115a <computeall+0x3a>
mov    -0x8(%rbp),%edi
call   1040 <compute@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <computeall+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeall>:
push   %rax
call   1030 <populate_initial_matrixes@plt>
mov    $0x2,%edi
call   1040 <compute@plt>
mov    $0x3,%edi
call   1040 <compute@plt>
mov    $0x4,%edi
call   1040 <compute@plt>
mov    $0x5,%edi
call   1040 <compute@plt>
mov    $0x6,%edi
call   1040 <compute@plt>
mov    $0x7,%edi
call   1040 <compute@plt>
mov    $0x8,%edi
call   1040 <compute@plt>
mov    $0x9,%edi
call   1040 <compute@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <compute@plt>

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

LLVM IR (-O2):
define void @computeall(i32 %0) {
%2 = tail call i32 @populate_initial_matrixes(i32 %0)
%3 = tail call i32 @compute(i32 2)
%4 = tail call i32 @compute(i32 3)
%5 = tail call i32 @compute(i32 4)
%6 = tail call i32 @compute(i32 5)
%7 = tail call i32 @compute(i32 6)
%8 = tail call i32 @compute(i32 7)
%9 = tail call i32 @compute(i32 8)
%10 = tail call i32 @compute(i32 9)
%11 = tail call i32 @compute(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ opt_number(void *);
int /*<<< orphan*/ opthelp_n(int /*<<< orphan*/, char *);
void opthelp(void *v, char *help) { opthelp_n(opt_number(v), help); }


x86 assembly (clang, -O0):
<opthelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <opt_number@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <opthelp_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opthelp>:
push   %rbx
mov    %rsi,%rbx
call   1040 <opt_number@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <opthelp_n@plt>

LLVM IR (-O0):
define void @opthelp(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 = call i32 @opt_number(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @opthelp_n(i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
define void @opthelp(i8* %0, i8* %1) {
%3 = tail call i32 @opt_number(i8* %0)
%4 = tail call i32 @opthelp_n(i32 %3, i8* %1)
ret void
}
/* Variables and functions */
int STDIN_FILENO;
int /*<<< orphan*/ close(int);
void close_with_dash(int fd) {
  if (fd != STDIN_FILENO)
    close(fd);
}


x86 assembly (clang, -O0):
<close_with_dash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
je     1135 <close_with_dash+0x25>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_with_dash>:
mov    0x2ec9(%rip),%rax
cmp    %edi,(%rax)
jne    111c <close_with_dash+0xc>
ret
jmp    1030 <close@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @close_with_dash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @STDIN_FILENO
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @close_with_dash(i32 %0) {
%2 = load i32, i32* @STDIN_FILENO
%3 = icmp eq i32 %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcstombs(char *, int /*<<< orphan*/ *, size_t);
void uninitvar_wcstombs(void) {
  char *mbstr;
  wchar_t *wcstr;
  size_t n;
  (void)wcstombs(mbstr, wcstr, n);
}


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

x86 assembly (clang, -O2):
<uninitvar_wcstombs>:
jmp    1030 <wcstombs@plt>

LLVM IR (-O0):
define void @uninitvar_wcstombs() {
%1 = alloca i8*
%2 = alloca i32*
%3 = alloca i64
%4 = load i8*, i8** %1
%5 = load i32*, i32** %2
%6 = load i64, i64* %3
%7 = call i32 @wcstombs(i8* %4, i32* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_wcstombs() {
%1 = tail call i32 @wcstombs(i8* undef, i32* undef, i64 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
const char *skip_arg(const char *cp) {
  while (*cp && !isspace(*cp))
    cp++;
  return cp;
}


x86 assembly (clang, -O0):
<skip_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skip_arg+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_arg+0x48>
jmp    1169 <skip_arg+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_arg+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_arg>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <skip_arg+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <skip_arg+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_arg+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_arg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isspace(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @skip_arg(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
size_t strnlen(const char *s, size_t n) {
  const char *p = s;
  while (n-- && *p)
    p++;
  return p - s;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     1142 <strnlen+0x42>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1152 <strnlen+0x52>
jmp    1163 <strnlen+0x63>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <strnlen+0x14>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1125 <strnlen+0x25>
lea    (%rdi,%rsi,1),%rcx
mov    %rdi,%rax
nop
cmpb   $0x0,(%rax)
je     1125 <strnlen+0x25>
add    $0xffffffffffffffff,%rsi
add    $0x1,%rax
test   %rsi,%rsi
jne    1110 <strnlen+0x10>
mov    %rcx,%rax
sub    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @strnlen(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
store i8* %6, i8** %5
br label %7
7: ; preds = %18, %2
%8 = load i64, i64* %4
%9 = add i64 %8, -1
store i64 %9, i64* %4
%10 = icmp ne i64 %8, 0
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %11, %7
%17 = phi i1 [ false, %7 ], [ %15, %11 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %5
br label %7
21: ; preds = %16
%22 = load i8*, i8** %5
%23 = load i8*, i8** %3
%24 = ptrtoint i8* %22 to i64
%25 = ptrtoint i8* %23 to i64
%26 = sub i64 %24, %25
ret i64 %26
}

LLVM IR (-O2):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = getelementptr i8, i8* %0, i64 %1
br label %6
6: ; preds = %4, %12
%7 = phi i64 [ %9, %12 ], [ %1, %4 ]
%8 = phi i8* [ %13, %12 ], [ %0, %4 ]
%9 = add i64 %7, -1
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = icmp eq i64 %9, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %12, %2
%16 = phi i8* [ %0, %2 ], [ %5, %12 ], [ %8, %6 ]
%17 = ptrtoint i8* %16 to i64
%18 = ptrtoint i8* %0 to i64
%19 = sub i64 %17, %18
ret i64 %19
}
int test_imm_BCuint8_mem(unsigned char *val) {
  return ((*val) & (0xBC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BCuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xbc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BCuint8_mem>:
testb  $0xbc,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BCuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -68
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int m2(int z) {
  int y = 0;
  int x = 5;
  if (z < 10) {
    int x = 7;
    if (x == 6)
      return x / y;
  }
  if (x == 5)
    return x / y;
  else
    return 0;
}


x86 assembly (clang, -O0):
<m2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1144 <m2+0x44>
movl   $0x7,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jne    113f <m2+0x3f>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1164 <m2+0x64>
jmp    1144 <m2+0x44>
cmpl   $0x5,-0x10(%rbp)
jne    115d <m2+0x5d>
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1164 <m2+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @m2(i32 %0) {
ret i32 0
}
char ws_lshiftC(char c, int n) { return c << n; }


x86 assembly (clang, -O0):
<ws_lshiftC>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_lshiftC>:
mov    %esi,%ecx
movzbl %dil,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define signext i8 @ws_lshiftC(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @ws_lshiftC(i8 signext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = shl i32 %3, %1
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) int32_t __QSUB(int32_t x, int32_t y) {
  int64_t tmp;
  int32_t result;
  tmp = (int64_t)x - (int64_t)y;
  if (tmp > 0x7fffffff) {
    tmp = 0x7fffffff;
  } else if (tmp < (-2147483647 - 1)) {
    tmp = -2147483647 - 1;
  }
  result = tmp;
  return result;
}


x86 assembly (clang, -O0):
<__QSUB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7fffffff,-0xc(%rbp)
jle    112c <__QSUB+0x2c>
movl   $0x7fffffff,-0xc(%rbp)
jmp    1145 <__QSUB+0x45>
cmpl   $0x80000000,-0xc(%rbp)
jge    1140 <__QSUB+0x40>
movl   $0x80000000,-0xc(%rbp)
jmp    1145 <__QSUB+0x45>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__QSUB(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
vdpnta(x, y) float *x, *y;
{ vipnta(x, y); }


x86 assembly (clang, -O0):
<vdpnta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <vipnta@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @vdpnta(float* %0, float* %1) {
%3 = alloca i32
%4 = alloca float*
%5 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
%6 = load float*, float** %4
%7 = load float*, float** %5
%8 = call i32 (float*, float*, ...) bitcast (i32 (...)* @vipnta to i32 (float*, float*, ...)*)(float* %6, float* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @vdpnta(float* %0, float* %1) {
%3 = tail call i32 (float*, float*, ...) bitcast (i32 (...)* @vipnta to i32 (float*, float*, ...)*)(float* %0, float* %1)
ret i32 undef
}
/* Type definitions */
typedef int uint16_t;
typedef scalar_t__ __x;

/* Variables and functions */
uint16_t bswap16(uint16_t x) {
  return ({
    uint16_t __x = (x);
    ((uint16_t)((((uint16_t)(__x) & (uint16_t)0x00ffU) << 8) |
                (((uint16_t)(__x) & (uint16_t)0xff00U) >> 8)));
  });
}


x86 assembly (clang, -O0):
<bswap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @bswap16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = and i32 %9, 65280
%11 = ashr i32 %10, 8
%12 = or i32 %8, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @bswap16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
void I2CDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) &= ~(0x00000001);
}


x86 assembly (clang, -O0):
<I2CDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CDisable>:
andq   $0xfffffffffffffffe,(%rdi)
ret

LLVM IR (-O0):
define void @I2CDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 0
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @I2CDisable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, -2
store volatile i64 %4, i64* %2
ret void
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
uid_t __getuid() {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getuid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getuid>:
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 @__getuid() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getuid() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
void instr_00() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @instr_00() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sig_int(int signo) {
  void print_cpu_time(void);
  print_cpu_time();
  exit(0);
}


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
call   1030 <print_cpu_time@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_int>:
push   %rax
call   1030 <print_cpu_time@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sig_int(i32 %0) {
tail call void @print_cpu_time()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
off_t tell(int fildes) { return lseek(fildes, 0, SEEK_CUR); }


x86 assembly (clang, -O0):
<tell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tell>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <lseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define i32 @tell(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SEEK_CUR
%5 = call i32 @lseek(i32 %3, i32 0, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @tell(i32 %0) {
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i32 @lseek(i32 %0, i32 0, i32 %2)
ret i32 %3
}
/* Variables and functions */
float hgetfontheight();
float hgetfh_() { return (hgetfontheight()); }


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

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

LLVM IR (-O0):
define float @hgetfh_() {
%1 = call float (...) @hgetfontheight()
ret float %1
}

LLVM IR (-O2):
define float @hgetfh_() {
%1 = tail call float (...) @hgetfontheight()
ret float %1
}
char *setlocale(int category, const char *locale) { return "C.UTF-8"; }


x86 assembly (clang, -O0):
<setlocale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"C.UTF-8\00"
define i8* @setlocale(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"C.UTF-8\00"
define i8* @setlocale(i32 %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
int IsAlpha(char c) {
  return (((1 << 6) | (c)) >= 'A') && (((1 << 6) | (c)) <= 'Z');
}


x86 assembly (clang, -O0):
<IsAlpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
or     $0x40,%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     112f <IsAlpha+0x2f>
movsbl -0x1(%rbp),%eax
or     $0x40,%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsAlpha>:
or     $0x40,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @IsAlpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = or i32 64, %4
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = or i32 64, %9
%11 = icmp sle i32 %10, 90
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsAlpha(i8 signext %0) {
%2 = or i8 %0, 64
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ iface_refresh();
int /*<<< orphan*/ options_get_bool(char *);
void iface_restore() {
  iface_refresh();
  if (!options_get_bool("UseCursorSelection"))
    curs_set(0);
}


x86 assembly (clang, -O0):
<iface_restore>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <iface_refresh@plt>
lea    0xebe(%rip),%rdi
call   1040 <options_get_bool@plt>
cmp    $0x0,%eax
jne    1157 <iface_restore+0x27>
xor    %edi,%edi
call   1050 <curs_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iface_restore>:
push   %rax
xor    %eax,%eax
call   1030 <iface_refresh@plt>
lea    0xec1(%rip),%rdi
call   1040 <options_get_bool@plt>
test   %eax,%eax
je     114a <iface_restore+0x1a>
pop    %rax
ret
xor    %edi,%edi
pop    %rax
jmp    1050 <curs_set@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"UseCursorSelection\00"
define void @iface_restore() {
%1 = call i32 (...) @iface_refresh()
%2 = call i32 @options_get_bool(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @curs_set(i32 0)
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"UseCursorSelection\00"
define void @iface_restore() {
%1 = tail call i32 (...) @iface_refresh()
%2 = tail call i32 @options_get_bool(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @curs_set(i32 0)
br label %6
6: ; preds = %4, %0
ret void
}
const char *utf8proc_version(void) { return "1.1.5"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.1.5\00"
define i8* @utf8proc_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
sendline(c) {
  char d;
  d = c;
  write(1, &d, 1);
}


x86 assembly (clang, -O0):
<sendline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    $0x1,%edx
lea    -0x9(%rbp),%rsi
mov    %edx,%edi
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendline>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sendline(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = trunc i32 %5 to i8
store i8 %6, i8* %4
%7 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* %4, i32 1)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @sendline(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* %2, i32 1)
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t mbcGetNoExtRAM8(uint16_t addr) {
  (void)addr;
  return 0xFF;
}


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

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

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

LLVM IR (-O2):
define i32 @mbcGetNoExtRAM8(i32 %0) {
ret i32 255
}
double threshold_concentration(double thresh, double out) {
  return out * out / (thresh * thresh + out * out);
}


x86 assembly (clang, -O0):
<threshold_concentration>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<threshold_concentration>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @threshold_concentration(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %4
%7 = fmul double %5, %6
%8 = load double, double* %3
%9 = load double, double* %3
%10 = load double, double* %4
%11 = load double, double* %4
%12 = fmul double %10, %11
%13 = call double @llvm.fmuladd.f64(double %8, double %9, double %12)
%14 = fdiv double %7, %13
ret double %14
}

LLVM IR (-O2):
define double @threshold_concentration(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = fdiv double %3, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int getLEdword(unsigned char *);
unsigned get4(FILE *fp) {
  unsigned char buf[4];
  if (fread(buf, 4, 1, fp))
    return getLEdword(buf);
  return 0xffffffff;
}


x86 assembly (clang, -O0):
<get4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x0,%rax
je     115e <get4+0x3e>
lea    -0x14(%rbp),%rdi
call   1040 <getLEdword@plt>
mov    %eax,-0x4(%rbp)
jmp    1165 <get4+0x45>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get4>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
test   %rax,%rax
je     1149 <get4+0x29>
lea    0x4(%rsp),%rdi
call   1040 <getLEdword@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get4(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [4 x i8]
store i32* %0, i32** %3
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%6 = load i32*, i32** %3
%7 = call i64 @fread(i8* %5, i32 4, i32 1, i32* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%11 = call i32 @getLEdword(i8* %10)
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @get4(i32* nocapture %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i64 @fread(i8* %3, i32 4, i32 1, i32* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @getLEdword(i8* %3)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int f355(int *);
int f356(int *p) { return f355(p); }


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

x86 assembly (clang, -O2):
<f356>:
jmp    1030 <f355@plt>

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

LLVM IR (-O2):
define i32 @f356(i32* %0) {
%2 = tail call i32 @f355(i32* %0)
ret i32 %2
}
unsigned int hweight32(unsigned int w) {
  unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
  res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
  res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F);
  res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF);
  return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
}


x86 assembly (clang, -O0):
<hweight32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x55555555,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x33333333,%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
and    $0xf0f0f0f,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff00ff,%eax
mov    -0x8(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
mov    -0x8(%rbp),%ecx
shr    $0x10,%ecx
and    $0xffff,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hweight32>:
mov    %edi,%eax
and    $0x55555555,%eax
shr    %edi
and    $0x55555555,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x33333333,%ecx
shr    $0x2,%eax
and    $0x33333333,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x7070707,%ecx
shr    $0x4,%eax
and    $0x7070707,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0xf000f,%ecx
shr    $0x8,%eax
and    $0xf000f,%eax
add    %ecx,%eax
movzwl %ax,%ecx
shr    $0x10,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hweight32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 1431655765
%6 = load i32, i32* %2
%7 = lshr i32 %6, 1
%8 = and i32 %7, 1431655765
%9 = add i32 %5, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = and i32 %10, 858993459
%12 = load i32, i32* %3
%13 = lshr i32 %12, 2
%14 = and i32 %13, 858993459
%15 = add i32 %11, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = and i32 %16, 252645135
%18 = load i32, i32* %3
%19 = lshr i32 %18, 4
%20 = and i32 %19, 252645135
%21 = add i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = and i32 %22, 16711935
%24 = load i32, i32* %3
%25 = lshr i32 %24, 8
%26 = and i32 %25, 16711935
%27 = add i32 %23, %26
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = and i32 %28, 65535
%30 = load i32, i32* %3
%31 = lshr i32 %30, 16
%32 = and i32 %31, 65535
%33 = add i32 %29, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @hweight32(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = lshr i32 %0, 1
%4 = and i32 %3, 1431655765
%5 = add nuw i32 %4, %2
%6 = and i32 %5, 858993459
%7 = lshr i32 %5, 2
%8 = and i32 %7, 858993459
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 117901063
%11 = lshr i32 %9, 4
%12 = and i32 %11, 117901063
%13 = add nuw nsw i32 %12, %10
%14 = and i32 %13, 983055
%15 = lshr i32 %13, 8
%16 = and i32 %15, 983055
%17 = add nuw nsw i32 %16, %14
%18 = and i32 %17, 31
%19 = lshr i32 %17, 16
%20 = add nuw nsw i32 %18, %19
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void parallel_mode_detector(int mode) {
  switch (mode) {
  case 0:
    printf("Parallel LED driver works in Single LED Blinking mode.\n");
    break;
  case 1:
    printf("Parallel LED driver works in Whole LED Blinking mode.\n");
    break;
  default:
    printf("Parallel LED driver works in COUNTER LED mode.\n");
  }
}


x86 assembly (clang, -O0):
<parallel_mode_detector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     113f <parallel_mode_detector+0x2f>
jmp    112e <parallel_mode_detector+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1150 <parallel_mode_detector+0x40>
jmp    1161 <parallel_mode_detector+0x51>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    116d <parallel_mode_detector+0x5d>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
jmp    116d <parallel_mode_detector+0x5d>
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_mode_detector>:
cmp    $0x1,%edi
lea    0xee6(%rip),%rax
lea    0xf4c(%rip),%rcx
cmove  %rax,%rcx
test   %edi,%edi
lea    0xf08(%rip),%rdi
cmovne %rcx,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Parallel LED driver works in Single LED Blinking mode.\0A\00"
@.str.1 = [55 x i8] c"Parallel LED driver works in Whole LED Blinking mode.\0A\00"
@.str.2 = [48 x i8] c"Parallel LED driver works in COUNTER LED mode.\0A\00"
define void @parallel_mode_detector(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 0, label %4
i32 1, label %6
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6, %4
ret void
}

LLVM IR (-O2):
@str = [54 x i8] c"Parallel LED driver works in Whole LED Blinking mode.\00"
@str.3 = [55 x i8] c"Parallel LED driver works in Single LED Blinking mode.\00"
@str.4 = [47 x i8] c"Parallel LED driver works in COUNTER LED mode.\00"
define void @parallel_mode_detector(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @str.4, i64 0, i64 0)
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @str.3, i64 0, i64 0), i8* %3
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
ret void
}
int socket_send_feedback(const char *buffer) {
  return 0;
  do {
    (void)(buffer);
  } while (0);
}


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

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

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

LLVM IR (-O2):
define i32 @socket_send_feedback(i8* nocapture readnone %0) {
ret i32 0
}
void gtk_notebook_set_menu_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_set_menu_label() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts(argv[1]);
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <puts@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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @puts(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
range(a, b, separator) char *separator;
{
  printf("%d", a > b ? b : a);
  if (a < b) {
    printf("%s%d", separator, b);
  }
}


x86 assembly (clang, -O0):
<range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1139 <range+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    113f <range+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1171 <range+0x61>
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebx
mov    %edi,%ebp
cmp    %esi,%edi
mov    %edi,%esi
cmovg  %ebx,%esi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %ebx,%ebp
jge    1147 <range+0x37>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%s%d\00"
define i32 @range(i32 %0, i32 %1, i8* %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp slt i32 %0, %1
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %1)
br label %10
10: ; preds = %8, %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_swi_hfclk_stop();
void nrf_802154_priority_drop_hfclk_stop(void) { nrf_802154_swi_hfclk_stop(); }


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

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

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

LLVM IR (-O2):
define void @nrf_802154_priority_drop_hfclk_stop() {
%1 = tail call i32 (...) @nrf_802154_swi_hfclk_stop()
ret void
}
/* Type definitions */
typedef short const uint32_t;

/* Variables and functions */
short UINT32_C(int);
uint32_t align(uint32_t x, short shift) {
  const uint32_t mask = ~(UINT32_C(-1) << shift);
  return (x + mask) >> shift;
}


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <UINT32_C@plt>
cwtl
movswl -0x4(%rbp),%ecx
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %ax,-0x6(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x6(%rbp),%ecx
add    %ecx,%eax
movswl -0x4(%rbp),%ecx
sar    %cl,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xffffffff,%edi
call   1030 <UINT32_C@plt>
movzwl %ax,%eax
mov    %ebx,%ecx
shl    %cl,%eax
not    %eax
cwtl
add    %ebp,%eax
sar    %cl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i16 @align(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = call signext i16 @UINT32_C(i32 -1)
%7 = sext i16 %6 to i32
%8 = load i16, i16* %4
%9 = sext i16 %8 to i32
%10 = shl i32 %7, %9
%11 = xor i32 %10, -1
%12 = trunc i32 %11 to i16
store i16 %12, i16* %5
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = load i16, i16* %5
%16 = sext i16 %15 to i32
%17 = add nsw i32 %14, %16
%18 = load i16, i16* %4
%19 = sext i16 %18 to i32
%20 = ashr i32 %17, %19
%21 = trunc i32 %20 to i16
ret i16 %21
}

LLVM IR (-O2):
define signext i16 @align(i16 signext %0, i16 signext %1) {
%3 = tail call signext i16 @UINT32_C(i32 -1)
%4 = zext i16 %3 to i32
%5 = sext i16 %1 to i32
%6 = shl i32 %4, %5
%7 = xor i32 %6, -1
%8 = sext i16 %0 to i32
%9 = shl i32 %7, 16
%10 = ashr exact i32 %9, 16
%11 = add nsw i32 %10, %8
%12 = ashr i32 %11, %5
%13 = trunc i32 %12 to i16
ret i16 %13
}
void rop3_221_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~*D;
  stk1 = S | stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_221_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_221_0_0>:
mov    (%rdi),%al
not    %al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_221_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %8
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %7
%20 = load i8, i8* %7
%21 = load i8*, i8** %4
store i8 %20, i8* %21
ret void
}

LLVM IR (-O2):
define void @rop3_221_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = or i8 %5, %1
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_p(long *addr, long value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_p(i64* %0, i64 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i32
store i64* %0, i64** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_p(i64* nocapture readnone %0, i64 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _XACC_util_init();
void _XACC_init(void) { _XACC_util_init(); }


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

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

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

LLVM IR (-O2):
define void @_XACC_init() {
%1 = tail call i32 (...) @_XACC_util_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void User_Error_Cb(const char *msg, char *opt_name) {
  (void)msg;
  (void)opt_name;
  exit(2);
}


x86 assembly (clang, -O0):
<User_Error_Cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<User_Error_Cb>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @User_Error_Cb(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 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @User_Error_Cb(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @exit(i32 2)
unreachable
}