xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ beep_long();
int /*<<< orphan*/ beep_short();
int /*<<< orphan*/ usleep(int);
void sound(const char *c) {
  while (*c != 0) {
    if (*c == '-') {
      beep_long();
    } else {
      beep_short();
    }
    usleep(300000);
    ++c;
  }
}


x86 assembly (clang, -O0):
<sound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     118a <sound+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1168 <sound+0x38>
mov    $0x0,%al
call   1030 <beep_long@plt>
jmp    116f <sound+0x3f>
mov    $0x0,%al
call   1040 <beep_short@plt>
mov    $0x493e0,%edi
call   1050 <usleep@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    113c <sound+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sound>:
push   %rbx
mov    %rdi,%rbx
jmp    1155 <sound+0x25>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <beep_long@plt>
mov    $0x493e0,%edi
call   1050 <usleep@plt>
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x2d,%al
je     1140 <sound+0x10>
test   %al,%al
je     1169 <sound+0x39>
xor    %eax,%eax
call   1040 <beep_short@plt>
jmp    1147 <sound+0x17>
pop    %rbx
ret

LLVM IR (-O0):
define void @sound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %17, %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 %21
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 45
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 (...) @beep_long()
br label %17
15: ; preds = %8
%16 = call i32 (...) @beep_short()
br label %17
17: ; preds = %15, %13
%18 = call i32 @usleep(i32 300000)
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @sound(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i8* [ %0, %1 ], [ %11, %9 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 0, label %12
i8 45, label %5
]
5: ; preds = %2
%6 = tail call i32 (...) @beep_long()
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @beep_short()
br label %9
9: ; preds = %7, %5
%10 = tail call i32 @usleep(i32 300000)
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %2
ret void
}
char *coltoa(int col) {
  static char rname[3];
  register char *p = rname;
  if (col > 25) {
    *p++ = col / 26 + 'A' - 1;
    col %= 26;
  }
  *p++ = col + 'A';
  *p = '\0';
  return (rname);
}


x86 assembly (clang, -O0):
<coltoa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0x2f13(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x19,-0x4(%rbp)
jle    114e <coltoa+0x4e>
mov    -0x4(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%eax
sub    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x41,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2eac(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coltoa>:
cmp    $0x1a,%edi
jl     112e <coltoa+0x2e>
mov    %edi,%eax
imul   $0x4ec4ec4f,%rax,%rax
shr    $0x23,%rax
lea    0x40(%rax),%ecx
mov    %cl,0x2f06(%rip)
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
sub    %ecx,%edi
lea    0x2ef6(%rip),%rax
jmp    1135 <coltoa+0x35>
lea    0x2eec(%rip),%rax
add    $0x41,%dil
mov    %dil,(%rax)
movb   $0x0,0x1(%rax)
lea    0x2eda(%rip),%rax
ret

LLVM IR (-O0):
@coltoa.rname = internal global [3 x i8] zeroinitializer
define i8* @coltoa(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 25
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 26
%9 = add nsw i32 %8, 65
%10 = sub nsw i32 %9, 1
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
store i8 %11, i8* %12
%14 = load i32, i32* %2
%15 = srem i32 %14, 26
store i32 %15, i32* %2
br label %16
16: ; preds = %6, %1
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 65
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
store i8 %19, i8* %20
%22 = load i8*, i8** %3
store i8 0, i8* %22
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 0)
}

LLVM IR (-O2):
@coltoa.rname = internal global [3 x i8] zeroinitializer
define i8* @coltoa(i32 %0) {
%2 = icmp sgt i32 %0, 25
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = udiv i32 %0, 26
%5 = trunc i32 %4 to i8
%6 = add i8 %5, 64
store i8 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 0)
%7 = urem i32 %0, 26
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ %7, %3 ], [ %0, %1 ]
%10 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 1), %3 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 0), %1 ]
%11 = trunc i32 %9 to i8
%12 = add i8 %11, 65
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
store i8 0, i8* %13
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @coltoa.rname, i64 0, i64 0)
}
unsigned int gf_mult(register unsigned int a, register unsigned int b,
                     register unsigned int m) {
  register unsigned int res = 0;
  while (b) {
    if (b & 1)
      res ^= a;
    a <<= 1;
    b >>= 1;
    if (a >= 256)
      a ^= m;
  }
  return (res);
}


x86 assembly (clang, -O0):
<gf_mult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1163 <gf_mult+0x63>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1136 <gf_mult+0x36>
mov    -0x4(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x100,-0x4(%rbp)
jb     115e <gf_mult+0x5e>
mov    -0xc(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <gf_mult+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_mult>:
xor    %eax,%eax
test   %esi,%esi
jne    1120 <gf_mult+0x20>
ret
nopw   0x0(%rax,%rax,1)
xor    %ecx,%eax
mov    %esi,%ecx
shr    %ecx
xor    %r8d,%edi
cmp    $0x1,%esi
mov    %ecx,%esi
jbe    1106 <gf_mult+0x6>
mov    %esi,%ecx
and    $0x1,%ecx
neg    %ecx
and    %edi,%ecx
add    %edi,%edi
mov    %edx,%r8d
cmp    $0x100,%edi
jae    1110 <gf_mult+0x10>
xor    %r8d,%r8d
jmp    1110 <gf_mult+0x10>

LLVM IR (-O0):
define i32 @gf_mult(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %30, %3
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %31
11: ; preds = %8
%12 = load i32, i32* %5
%13 = and i32 %12, 1
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i32, i32* %4
%17 = load i32, i32* %7
%18 = xor i32 %17, %16
store i32 %18, i32* %7
br label %19
19: ; preds = %15, %11
%20 = load i32, i32* %4
%21 = shl i32 %20, 1
store i32 %21, i32* %4
%22 = load i32, i32* %5
%23 = lshr i32 %22, 1
store i32 %23, i32* %5
%24 = load i32, i32* %4
%25 = icmp uge i32 %24, 256
br i1 %25, label %26, label %30
26: ; preds = %19
%27 = load i32, i32* %6
%28 = load i32, i32* %4
%29 = xor i32 %28, %27
store i32 %29, i32* %4
br label %30
30: ; preds = %26, %19
br label %8
31: ; preds = %8
%32 = load i32, i32* %7
ret i32 %32
}

LLVM IR (-O2):
define i32 @gf_mult(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %19, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ 0, %3 ]
%7 = phi i32 [ %17, %5 ], [ %0, %3 ]
%8 = phi i32 [ %14, %5 ], [ %1, %3 ]
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 0, i32 %7
%12 = xor i32 %11, %6
%13 = shl i32 %7, 1
%14 = lshr i32 %8, 1
%15 = icmp ugt i32 %13, 255
%16 = select i1 %15, i32 %2, i32 0
%17 = xor i32 %16, %13
%18 = icmp ult i32 %8, 2
br i1 %18, label %19, label %5
19: ; preds = %5, %3
%20 = phi i32 [ 0, %3 ], [ %12, %5 ]
ret i32 %20
}
int element_exists_delimiter(char *option_data, char delimiter) {
  while (*option_data) {
    if (*option_data == delimiter)
      return 1;
    option_data++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<element_exists_delimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <element_exists_delimiter+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    113a <element_exists_delimiter+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1152 <element_exists_delimiter+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <element_exists_delimiter+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_exists_delimiter>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <element_exists_delimiter+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <element_exists_delimiter+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <element_exists_delimiter+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @element_exists_delimiter(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i8 %9, %1
%12 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
scalar_t__ strchr(char const *, int /*<<< orphan*/);
char *strpbrk(const char *s1, const char *s2) {
  while (*s1)
    if (strchr(s2, *s1++))
      return (char *)--s1;
  return 0;
}


x86 assembly (clang, -O0):
<strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116c <strpbrk+0x5c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1167 <strpbrk+0x57>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1174 <strpbrk+0x64>
jmp    1120 <strpbrk+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strpbrk>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
xchg   %ax,%ax
movsbl 0x1(%rbx),%esi
test   %esi,%esi
je     113b <strpbrk+0x2b>
mov    %r14,%rdi
call   1030 <strchr@plt>
add    $0x1,%rbx
test   %rax,%rax
je     1120 <strpbrk+0x10>
jmp    113d <strpbrk+0x2d>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strpbrk(i8* %0, i8* %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i64 @strchr(i8* %1, i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %3, label %12
12: ; preds = %3, %7
%13 = phi i8* [ %4, %7 ], [ null, %3 ]
ret i8* %13
}
/* Variables and functions */
char *malloc(int);
int main(int argc, char *argv[]) {
  char *pointer1 = 0;
  pointer1 = malloc(64);
  pointer1 = malloc(32);
  pointer1 = NULL;
  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)
movq   $0x0,-0x18(%rbp)
mov    $0x40,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x20,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pthread_cancel(int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
void ctry_abort_default() { pthread_cancel(pthread_self()); }


x86 assembly (clang, -O0):
<ctry_abort_default>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pthread_self@plt>
mov    %eax,%edi
call   1040 <pthread_cancel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctry_abort_default>:
push   %rax
xor    %eax,%eax
call   1030 <pthread_self@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pthread_cancel@plt>

LLVM IR (-O0):
define void @ctry_abort_default() {
%1 = call i32 (...) @pthread_self()
%2 = call i32 @pthread_cancel(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ctry_abort_default() {
%1 = tail call i32 (...) @pthread_self()
%2 = tail call i32 @pthread_cancel(i32 %1)
ret void
}
void res2_except() {}


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

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

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

LLVM IR (-O2):
define void @res2_except() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ slick_fatal(char *);
void slick_sigfpe(int sig) { slick_fatal("Floating-point exception."); }


x86 assembly (clang, -O0):
<slick_sigfpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <slick_fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"Floating-point exception.\00"
define void @slick_sigfpe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @slick_fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Floating-point exception.\00"
define void @slick_sigfpe(i32 %0) {
%2 = tail call i32 @slick_fatal(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_4Duint32_reg(unsigned int val) {
  return ((val) & (0x4D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Duint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_4Duint32_reg(i32 %0) {
%2 = and i32 %0, 77
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
bool unquote2(char *expr) {
  bool retval = (bool)expr;
  return retval;
}


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

x86 assembly (clang, -O2):
<unquote2>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @unquote2(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gui_chat_utf_char_valid(char const *);
int utf8_char_size_screen(char const *);
int gui_chat_char_size_screen(const char *utf_char) {
  if (!gui_chat_utf_char_valid(utf_char))
    return 1;
  return utf8_char_size_screen(utf_char);
}


x86 assembly (clang, -O0):
<gui_chat_char_size_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <gui_chat_utf_char_valid@plt>
cmp    $0x0,%eax
jne    114a <gui_chat_char_size_screen+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1156 <gui_chat_char_size_screen+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <utf8_char_size_screen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_chat_char_size_screen>:
push   %rbx
mov    %rdi,%rbx
call   1030 <gui_chat_utf_char_valid@plt>
test   %eax,%eax
je     1136 <gui_chat_char_size_screen+0x16>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <utf8_char_size_screen@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gui_chat_char_size_screen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @gui_chat_utf_char_valid(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @utf8_char_size_screen(i8* %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @gui_chat_char_size_screen(i8* %0) {
%2 = tail call i32 @gui_chat_utf_char_valid(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @utf8_char_size_screen(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Variables and functions */
int rand_r(unsigned int *);
unsigned int time(int /*<<< orphan*/ *);
int new_seed(void) {
  unsigned int t = time(NULL);
  return rand_r(&t);
}


x86 assembly (clang, -O0):
<new_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <rand_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_seed>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <rand_r@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @new_seed() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
store i32 %2, i32* %1
%3 = call i32 @rand_r(i32* %1)
ret i32 %3
}

LLVM IR (-O2):
define i32 @new_seed() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i32 @rand_r(i32* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int identImplicit(int);
void testImplicit() {
  int res = identImplicit(6);
  clang_analyzer_eval(res == 6);
}


x86 assembly (clang, -O0):
<testImplicit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
call   1030 <identImplicit@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testImplicit>:
push   %rax
mov    $0x6,%edi
call   1030 <identImplicit@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @testImplicit() {
%1 = alloca i32
%2 = call i32 @identImplicit(i32 6)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 6
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
define void @testImplicit() {
%1 = tail call i32 @identImplicit(i32 6)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
void ffkey_() {}


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

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

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

LLVM IR (-O2):
define void @ffkey_() {
ret void
}
int test_imm_03int16_mem(short *val) {
  return ((*val) & (0x03 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_03int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 3
%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_03int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 3
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char const *ngettext(char const *, char const *, unsigned long);
__attribute__((format_arg(1))) __attribute__((format_arg(2))) const char *
Q_(const char *msgid, const char *plu, unsigned long n) {
  return ngettext(msgid, plu, n);
}


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

x86 assembly (clang, -O2):
<Q_>:
jmp    1030 <ngettext@plt>

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

LLVM IR (-O2):
define i8* @Q_(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ngettext(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int strcmp(char const *, char const *);
int str_comp(const void *a, const void *b) {
  return strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<str_comp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @str_comp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @str_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ weak_def();
int main(void) {
  weak_def();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @weak_def()
ret i32 0
}
/* Variables and functions */
scalar_t__ trunc(double);
long double truncl(long double x) { return (long double)trunc((double)x); }


x86 assembly (clang, -O0):
<truncl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <trunc@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <trunc@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @truncl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @trunc(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @truncl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @trunc(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
void outminus() { outbyte('-'); }


x86 assembly (clang, -O0):
<outminus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1030 <outbyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outminus>:
mov    $0x2d,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define void @outminus() {
%1 = call i32 @outbyte(i8 signext 45)
ret void
}

LLVM IR (-O2):
define void @outminus() {
%1 = tail call i32 @outbyte(i8 signext 45)
ret void
}
/* Type definitions */
struct terminal {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ move_cursor(struct terminal *, int /*<<< orphan*/, int);
int sum(struct parm_t *);
void curs_forward(struct terminal *term, struct parm_t *parm) {
  int num = sum(parm);
  if (num <= 0)
    num = 1;
  move_cursor(term, 0, num);
}


x86 assembly (clang, -O0):
<curs_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     114d <curs_forward+0x2d>
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <move_cursor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_forward>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <sum@plt>
test   %eax,%eax
mov    $0x1,%edx
cmovg  %eax,%edx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <move_cursor@plt>

LLVM IR (-O0):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_forward(%struct.terminal* %0, %struct.parm_t* %1) {
%3 = alloca %struct.terminal*
%4 = alloca %struct.parm_t*
%5 = alloca i32
store %struct.terminal* %0, %struct.terminal** %3
store %struct.parm_t* %1, %struct.parm_t** %4
%6 = load %struct.parm_t*, %struct.parm_t** %4
%7 = call i32 @sum(%struct.parm_t* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %5
br label %11
11: ; preds = %10, %2
%12 = load %struct.terminal*, %struct.terminal** %3
%13 = load i32, i32* %5
%14 = call i32 @move_cursor(%struct.terminal* %12, i32 0, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_forward(%struct.terminal* %0, %struct.parm_t* %1) {
%3 = tail call i32 @sum(%struct.parm_t* %1)
%4 = icmp sgt i32 %3, 1
%5 = select i1 %4, i32 %3, i32 1
%6 = tail call i32 @move_cursor(%struct.terminal* %0, i32 0, i32 %5)
ret void
}
int apm_reject(int fd) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @apm_reject(i32 %0) {
ret i32 0
}
void mcu_arch_init(void) {}


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

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

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

LLVM IR (-O2):
define void @mcu_arch_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_NOW;
void *dlopen(char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void *safe_libload(char *lib_path) {
  void *lib_handler = dlopen(lib_path, RTLD_NOW);
  if (lib_handler == NULL) {
    fprintf(stderr, "Error: cound not open the library at [%p]\n", lib_handler);
    exit(-1);
  }
  return lib_handler;
}


x86 assembly (clang, -O0):
<safe_libload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <safe_libload+0x50>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe8f(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_libload>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
test   %rax,%rax
je     1146 <safe_libload+0x16>
pop    %rcx
ret
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
xor    %edx,%edx
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@RTLD_NOW = global i32 0
@stderr = global i32 0
@.str = [43 x i8] c"Error: cound not open the library at [%p]\0A\00"
define i8* @safe_libload(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @RTLD_NOW
%6 = call i8* @dlopen(i8* %4, i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %3
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@RTLD_NOW = global i32 0
@stderr = global i32 0
@.str = [43 x i8] c"Error: cound not open the library at [%p]\0A\00"
define i8* @safe_libload(i8* %0) {
%2 = load i32, i32* @RTLD_NOW
%3 = tail call i8* @dlopen(i8* %0, i32 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* null)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
ret i8* %3
}
float erfunc(float x) {
  float gammp(float a, float x);
  if (x < 0.0)
    return (-gammp(0.5, x * x));
  else
    return (gammp(0.5, x * x));
}


x86 assembly (clang, -O0):
<erfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1161 <erfunc+0x51>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xebb(%rip),%xmm0
call   1030 <gammp@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117d <erfunc+0x6d>
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe8d(%rip),%xmm0
call   1030 <gammp@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfunc>:
sub    $0x18,%rsp
movaps %xmm0,(%rsp)
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xed9(%rip),%xmm0
call   1030 <gammp@plt>
movaps 0xedd(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
movaps (%rsp),%xmm3
cmpltss %xmm2,%xmm3
movaps %xmm3,%xmm2
andnps %xmm0,%xmm2
andps  %xmm1,%xmm3
orps   %xmm2,%xmm3
movaps %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @erfunc(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = call float @gammp(float 5.000000e-01, float %10)
%12 = fneg float %11
store float %12, float* %2
br label %18
13: ; preds = %1
%14 = load float, float* %3
%15 = load float, float* %3
%16 = fmul float %14, %15
%17 = call float @gammp(float 5.000000e-01, float %16)
store float %17, float* %2
br label %18
18: ; preds = %13, %7
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @erfunc(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fmul float %0, %0
%4 = tail call float @gammp(float 5.000000e-01, float %3)
%5 = fneg float %4
%6 = select i1 %2, float %5, float %4
ret float %6
}
int first_set_bit(unsigned int x) { return __builtin_ffs(x) - 1; }


x86 assembly (clang, -O0):
<first_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
bsf    %edx,%eax
add    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_set_bit>:
bsf    %edi,%ecx
mov    $0xffffffff,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @first_set_bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.cttz.i32(i32 %3, i1 true)
%5 = add i32 %4, 1
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i32 0, i32 %5
%8 = sub nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @first_set_bit(i32 %0) {
%2 = tail call i32 @llvm.cttz.i32(i32 %0, i1 true)
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 -1, i32 %2
ret i32 %4
}
double test(double x, int sel1, int sel2) {
  double input = sel1 ? -x : x + 1;
  if (sel2)
    return __builtin_cos(input);
  else
    return __builtin_cosh(input);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1163 <test+0x43>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1175 <test+0x55>
movsd  0xe95(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     119d <test+0x7d>
movsd  -0x20(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    11ac <test+0x8c>
movsd  -0x20(%rbp),%xmm0
call   1030 <cosh@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
test   %edi,%edi
je     1135 <test+0x15>
xorpd  0xed4(%rip),%xmm0
test   %esi,%esi
je     1141 <test+0x21>
jmp    1040 <cos@plt>
addsd  0xed3(%rip),%xmm0
test   %esi,%esi
jne    1130 <test+0x10>
jmp    1030 <cosh@plt>

LLVM IR (-O0):
define double @test(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store double %0, double* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load double, double* %5
%13 = fneg double %12
br label %17
14: ; preds = %3
%15 = load double, double* %5
%16 = fadd double %15, 1.000000e+00
br label %17
17: ; preds = %14, %11
%18 = phi double [ %13, %11 ], [ %16, %14 ]
store double %18, double* %8
%19 = load i32, i32* %7
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load double, double* %8
%23 = call double @cos(double %22)
store double %23, double* %4
br label %27
24: ; preds = %17
%25 = load double, double* %8
%26 = call double @cosh(double %25)
store double %26, double* %4
br label %27
27: ; preds = %24, %21
%28 = load double, double* %4
ret double %28
}

LLVM IR (-O2):
define double @test(double %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = fneg double %0
%6 = fadd double %0, 1.000000e+00
%7 = select i1 %4, double %6, double %5
%8 = icmp eq i32 %2, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call double @cos(double %7)
br label %13
11: ; preds = %3
%12 = tail call double @cosh(double %7)
br label %13
13: ; preds = %11, %9
%14 = phi double [ %10, %9 ], [ %12, %11 ]
ret double %14
}
/* Variables and functions */
scalar_t__ FindMajority(char *, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char majority;
  if (FindMajority("AAACCBBCCCBCC", 13, &majority))
    printf("Мажорант: %c\n", majority);
  else
    printf("Няма мажорант.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0xd,%esi
lea    -0x5(%rbp),%rdx
call   1030 <FindMajority@plt>
cmp    $0x0,%rax
je     1165 <main+0x45>
movsbl -0x5(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1173 <main+0x53>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rdx
mov    $0xd,%esi
call   1030 <FindMajority@plt>
test   %rax,%rax
je     1161 <main+0x31>
movsbl 0x7(%rsp),%esi
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    116d <main+0x3d>
lea    0xebc(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"AAACCBBCCCBCC\00"
@.str.1 = [22 x i8] c"\D0\9C\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82: %c\0A\00"
@.str.2 = [28 x i8] c"\D0\9D\D1\8F\D0\BC\D0\B0 \D0\BC\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i64 @FindMajority(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13, i8* %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"AAACCBBCCCBCC\00"
@.str.1 = [22 x i8] c"\D0\9C\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82: %c\0A\00"
@str = [27 x i8] c"\D0\9D\D1\8F\D0\BC\D0\B0 \D0\BC\D0\B0\D0\B6\D0\BE\D1\80\D0\B0\D0\BD\D1\82.\00"
define i32 @main() {
%1 = alloca i8
%2 = call i64 @FindMajority(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13, i8* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret i32 0
}
/* Type definitions */
struct test_result {
  int dummy;
};
struct test_case {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
void _test_abort(struct test_case *__test__, struct test_result *__result__,
                 void *usrptr) {
  abort();
}


x86 assembly (clang, -O0):
<_test_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_test_abort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.test_case = type { i32 }
%struct.test_result = type { i32 }
define void @_test_abort(%struct.test_case* %0, %struct.test_result* %1, i8* %2) {
%4 = alloca %struct.test_case*
%5 = alloca %struct.test_result*
%6 = alloca i8*
store %struct.test_case* %0, %struct.test_case** %4
store %struct.test_result* %1, %struct.test_result** %5
store i8* %2, i8** %6
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.test_case = type { i32 }
%struct.test_result = type { i32 }
define void @_test_abort(%struct.test_case* nocapture readnone %0, %struct.test_result* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @abort()
unreachable
}
const char *picosat_config(void) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @picosat_config() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @picosat_config() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_exit() {
  printf("\nGood-bye!\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"\0AGood-bye!\0A\00"
define void @msg_exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"\0AGood-bye!\00"
define void @msg_exit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_75int8_mem(signed char *val) {
  return ((*val) & (-0x75 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_75int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -117
%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_75int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -117
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "%s\n%s\n",
          "usage: ypmatch [-kt] [-d domainname] key ... mapname",
          "       ypmatch -x");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecc(%rip),%rdx
lea    0xefa(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xefd(%rip),%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [53 x i8] c"usage: ypmatch [-kt] [-d domainname] key ... mapname\00"
@.str.2 = [18 x i8] c" ypmatch -x\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [53 x i8] c"usage: ypmatch [-kt] [-d domainname] key ... mapname\00"
@.str.2 = [18 x i8] c" ypmatch -x\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
OP(dd, ce) { op_ce(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_ce()
ret i32 undef
}
void gdk_colormap_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_colormap_get_type() {
ret void
}