xunge/DecIR huggingface dataset:
int is_digit(unsigned char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_digit+0x29>
movzbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_digit(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int gcd(int a, int b) {
  while (b ^= a ^= b ^= a %= b)
    ;
  return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,-0x4(%rbp)
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1138 <gcd+0x38>
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %16, %2
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = srem i32 %7, %6
store i32 %8, i32* %3
%9 = load i32, i32* %4
%10 = xor i32 %9, %8
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = xor i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %4
%14 = xor i32 %13, %12
store i32 %14, i32* %4
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %5
br label %5
17: ; preds = %5
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ do_log(char *, int);
scalar_t__ fork();
int main(void) {
  if (fork() == 0)
    do_log("A", 2);
  do_log("B", 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
jne    1151 <main+0x31>
lea    0xeb9(%rip),%rdi
mov    $0x2,%esi
call   1030 <do_log@plt>
lea    0xeaa(%rip),%rdi
mov    $0x3,%esi
call   1030 <do_log@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
jne    113e <main+0x1e>
lea    0xecc(%rip),%rdi
mov    $0x2,%esi
call   1030 <do_log@plt>
lea    0xebd(%rip),%rdi
mov    $0x3,%esi
call   1030 <do_log@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @fork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @do_log(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
br label %6
6: ; preds = %4, %0
%7 = call i32 @do_log(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 3)
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @do_log(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @do_log(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x < 0) {
    x = x + y;
    y = y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x5e() {
  Assert_real((iscntrl(94) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              475, ("iscntrl should be 0 for ^"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x5e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5e,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1db,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x5e>:
push   %rax
mov    $0x5e,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1db,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for ^\00"
define void @t_iscntrl_0x5e() {
%1 = call i64 @iscntrl(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for ^\00"
define void @t_iscntrl_0x5e() {
%1 = tail call i64 @iscntrl(i32 94)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cond_signal(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
int thread_syn_flag_clr(pthread_mutex_t *mutex, pthread_cond_t *cond,
                        int *flag) {
  pthread_mutex_lock(mutex);
  *flag = 0;
  pthread_cond_signal(cond);
  pthread_mutex_unlock(mutex);
  return 0;
}


x86 assembly (clang, -O0):
<thread_syn_flag_clr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_lock@plt>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_cond_signal@plt>
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_unlock@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_syn_flag_clr>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <pthread_mutex_lock@plt>
movl   $0x0,(%r15)
mov    %r14,%rdi
call   1030 <pthread_cond_signal@plt>
mov    %rbx,%rdi
call   1040 <pthread_mutex_unlock@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @thread_syn_flag_clr(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = call i32 @pthread_mutex_lock(i32* %7)
%9 = load i32*, i32** %6
store i32 0, i32* %9
%10 = load i32*, i32** %5
%11 = call i32 @pthread_cond_signal(i32* %10)
%12 = load i32*, i32** %4
%13 = call i32 @pthread_mutex_unlock(i32* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @thread_syn_flag_clr(i32* %0, i32* %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @pthread_mutex_lock(i32* %0)
store i32 0, i32* %2
%5 = tail call i32 @pthread_cond_signal(i32* %1)
%6 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret i32 0
}
int setbitat(int num, int idx, int val) {
  if (val)
    num |= 0x1 << idx;
  else
    num &= ~(0x1 << idx);
  return num;
}


x86 assembly (clang, -O0):
<setbitat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     112c <setbitat+0x2c>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <setbitat+0x3f>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbitat>:
mov    %edi,%eax
bts    %esi,%eax
btr    %esi,%edi
test   %edx,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @setbitat(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %5
%11 = shl i32 1, %10
%12 = load i32, i32* %4
%13 = or i32 %12, %11
store i32 %13, i32* %4
br label %20
14: ; preds = %3
%15 = load i32, i32* %5
%16 = shl i32 1, %15
%17 = xor i32 %16, -1
%18 = load i32, i32* %4
%19 = and i32 %18, %17
store i32 %19, i32* %4
br label %20
20: ; preds = %14, %9
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @setbitat(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = shl nuw i32 1, %1
%6 = or i32 %5, %0
%7 = xor i32 %5, -1
%8 = and i32 %7, %0
%9 = select i1 %4, i32 %8, i32 %6
ret i32 %9
}
/* Variables and functions */
scalar_t__ expect_line_break();
char get_char();
int /*<<< orphan*/ unget_char(char);
int expect_line_break_or(char expected) {
  if (expect_line_break()) {
    return 1;
  }
  char c = get_char();
  if (c == expected) {
    return 1;
  }
  unget_char(c);
  return 0;
}


x86 assembly (clang, -O0):
<expect_line_break_or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    $0x0,%al
call   1030 <expect_line_break@plt>
cmp    $0x0,%rax
je     115b <expect_line_break_or+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1191 <expect_line_break_or+0x61>
mov    $0x0,%al
call   1040 <get_char@plt>
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1181 <expect_line_break_or+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1191 <expect_line_break_or+0x61>
movsbl -0x6(%rbp),%edi
call   1050 <unget_char@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_line_break_or>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <expect_line_break@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    115c <expect_line_break_or+0x2c>
xor    %eax,%eax
call   1040 <get_char@plt>
cmp    %bpl,%al
je     115c <expect_line_break_or+0x2c>
movsbl %al,%edi
call   1050 <unget_char@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @expect_line_break_or(i8 signext %0) {
%2 = tail call i64 (...) @expect_line_break()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call signext i8 (...) @get_char()
%6 = icmp eq i8 %5, %0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @unget_char(i8 signext %5)
br label %9
9: ; preds = %7, %4, %1
%10 = phi i32 [ 1, %1 ], [ 0, %7 ], [ 1, %4 ]
ret i32 %10
}
unsigned int __mulsi3(unsigned int a, unsigned int b) {
  unsigned int r = 0;
  while (a) {
    if (a & 1)
      r += b;
    a >>= 1;
    b <<= 1;
  }
  return r;
}


x86 assembly (clang, -O0):
<__mulsi3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114a <__mulsi3+0x4a>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1133 <__mulsi3+0x33>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <__mulsi3+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mulsi3>:
xor    %eax,%eax
test   %edi,%edi
je     1126 <__mulsi3+0x26>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
neg    %edx
and    %esi,%edx
add    %edx,%eax
shr    %ecx
add    %esi,%esi
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <__mulsi3+0x10>
ret

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

LLVM IR (-O2):
define i32 @__mulsi3(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i32 [ %13, %4 ], [ %1, %2 ]
%7 = phi i32 [ %12, %4 ], [ %0, %2 ]
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 %6
%11 = add i32 %10, %5
%12 = lshr i32 %7, 1
%13 = shl i32 %6, 1
%14 = icmp ult i32 %7, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %16
}
int test_imm_9Auint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x9A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Auint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x9a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_9Auint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 154
%7 = icmp ne i64 %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_9Auint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 661424963584
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
DispenserManager_end_of_the_day() {}


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

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

LLVM IR (-O0):
define i32 @DispenserManager_end_of_the_day() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @DispenserManager_end_of_the_day() {
ret i32 undef
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t small_id(uint64_t id) { return (uint16_t)(id >> 54); }


x86 assembly (clang, -O0):
<small_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x36,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @small_id(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int __WORDSIZE;
unsigned long __fls(unsigned long b) {
  int i;
  for (i = __WORDSIZE - 1; i >= 0; i--)
    if (b & (1UL << i))
      return i;
  return __WORDSIZE;
}


x86 assembly (clang, -O0):
<__fls>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1160 <__fls+0x60>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     114d <__fls+0x4d>
movslq -0x14(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <__fls+0x6e>
jmp    1152 <__fls+0x52>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <__fls+0x17>
mov    0x2e81(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fls>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    %rax,%rcx
nopl   0x0(%rax)
test   %ecx,%ecx
jle    1120 <__fls+0x20>
add    $0xffffffffffffffff,%rcx
bt     %rcx,%rdi
jae    1110 <__fls+0x10>
mov    %ecx,%eax
cltq
ret

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

LLVM IR (-O2):
@__WORDSIZE = global i32 0
define i64 @__fls(i64 %0) {
%2 = load i32, i32* @__WORDSIZE
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %9, %1
%5 = phi i64 [ %6, %9 ], [ %3, %1 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = and i64 %6, 4294967295
%11 = shl nuw i64 1, %10
%12 = and i64 %11, %0
%13 = icmp eq i64 %12, 0
br i1 %13, label %4, label %14
14: ; preds = %9
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %4, %14
%17 = phi i32 [ %15, %14 ], [ %2, %4 ]
%18 = sext i32 %17 to i64
ret i64 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ ptrdiff_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _mini_getdelim(char **, size_t *, char,
                                  int /*<<< orphan*/ *);
ptrdiff_t _mini_getline(char **lineptr, size_t *n, FILE *stream) {
  return _mini_getdelim(lineptr, n, '\n', stream);
}


x86 assembly (clang, -O0):
<_mini_getline>:
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),%rcx
mov    $0xa,%edx
call   1030 <_mini_getdelim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mini_getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <_mini_getdelim@plt>

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

LLVM IR (-O2):
define i32 @_mini_getline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @_mini_getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
int clip(int v, int m, int M) { return v < m ? m : v > M ? M : v; }


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1124 <clip+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <clip+0x47>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113b <clip+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <clip+0x41>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @clip(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int main() {
  int num, r, rn = 0, print = num;
  while (num) {
    r = num % 10;
    rn = rn * 10 + r;
    num = num / 10;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
imul   $0xa,-0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1118 <main+0x18>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ UP3D_GetParameter(int);
int32_t UP3D_GetFeedErrorLength() { return UP3D_GetParameter(0x1D); }


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

x86 assembly (clang, -O2):
<UP3D_GetFeedErrorLength>:
mov    $0x1d,%edi
jmp    1030 <UP3D_GetParameter@plt>

LLVM IR (-O0):
define i32 @UP3D_GetFeedErrorLength() {
%1 = call i32 @UP3D_GetParameter(i32 29)
ret i32 %1
}

LLVM IR (-O2):
define i32 @UP3D_GetFeedErrorLength() {
%1 = tail call i32 @UP3D_GetParameter(i32 29)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ assert_in_range_2(int, int);
int /*<<< orphan*/ assert_in_wide_range(int);
int /*<<< orphan*/ clang_analyzer_eval(int);
void equal(int m, int n) {
  assert_in_range_2(m, n);
  if (m != n)
    return;
  assert_in_wide_range(m - n);
  clang_analyzer_eval(n == m);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <assert_in_range_2@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     115a <equal+0x2a>
jmp    1178 <equal+0x48>
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1040 <assert_in_wide_range@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <assert_in_range_2@plt>
cmp    %ebx,%ebp
jne    1157 <equal+0x27>
xor    %edi,%edi
call   1040 <assert_in_wide_range@plt>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <clang_analyzer_eval@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @equal(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @assert_in_range_2(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %2
br label %22
12: ; preds = %2
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sub nsw i32 %13, %14
%16 = call i32 @assert_in_wide_range(i32 %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = icmp eq i32 %17, %18
%20 = zext i1 %19 to i32
%21 = call i32 @clang_analyzer_eval(i32 %20)
br label %22
22: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @equal(i32 %0, i32 %1) {
%3 = tail call i32 @assert_in_range_2(i32 %0, i32 %1)
%4 = icmp eq i32 %0, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @assert_in_wide_range(i32 0)
%7 = tail call i32 @clang_analyzer_eval(i32 1)
br label %8
8: ; preds = %2, %5
ret void
}
float filt_triangle(float x) {
  if (x < -1.0)
    return 0.0;
  if (x < 0.0)
    return 1.0 + x;
  if (x < 1.0)
    return 1.0 - x;
  return 0.0;
}


x86 assembly (clang, -O0):
<filt_triangle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <filt_triangle+0x31>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11b0 <filt_triangle+0xb0>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    116a <filt_triangle+0x6a>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11b0 <filt_triangle+0xb0>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe8d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a8 <filt_triangle+0xa8>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe72(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11b0 <filt_triangle+0xb0>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<filt_triangle>:
xorps  %xmm1,%xmm1
movss  0xef5(%rip),%xmm2
ucomiss %xmm0,%xmm2
ja     1135 <filt_triangle+0x35>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1121 <filt_triangle+0x21>
addss  0xee4(%rip),%xmm0
ret
movss  0xedb(%rip),%xmm2
ucomiss %xmm0,%xmm2
jbe    1135 <filt_triangle+0x35>
subss  %xmm0,%xmm2
movaps %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @filt_triangle(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, -1.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0.000000e+00, float* %2
br label %27
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fadd double 1.000000e+00, %14
%16 = fptrunc double %15 to float
store float %16, float* %2
br label %27
17: ; preds = %8
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = fcmp olt double %19, 1.000000e+00
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load float, float* %3
%23 = fpext float %22 to double
%24 = fsub double 1.000000e+00, %23
%25 = fptrunc double %24 to float
store float %25, float* %2
br label %27
26: ; preds = %17
store float 0.000000e+00, float* %2
br label %27
27: ; preds = %26, %21, %12, %7
%28 = load float, float* %2
ret float %28
}

LLVM IR (-O2):
define float @filt_triangle(float %0) {
%2 = fcmp olt float %0, -1.000000e+00
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = fcmp olt float %0, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fadd float %0, 1.000000e+00
br label %11
7: ; preds = %3
%8 = fcmp olt float %0, 1.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = fsub float 1.000000e+00, %0
br label %11
11: ; preds = %7, %1, %9, %5
%12 = phi float [ %6, %5 ], [ %10, %9 ], [ 0.000000e+00, %1 ], [ 0.000000e+00, %7 ]
ret float %12
}
void analogWrite(int __val) {}


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

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

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

LLVM IR (-O2):
define void @analogWrite(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x2;
};
typedef TYPE_1__ XSegment;

/* Variables and functions */
short get_XSegment_x2(void *_p) { return (short)((XSegment *)_p)->x2; }


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

x86 assembly (clang, -O2):
<get_XSegment_x2>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XSegment_x2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XSegment_x2(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int current_setting(char *);
int is_setting_active(char *path) {
  int current = current_setting(path);
  return current == 1;
}


x86 assembly (clang, -O0):
<is_setting_active>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <current_setting@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_setting_active>:
push   %rax
call   1030 <current_setting@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_setting_active(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @current_setting(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_setting_active(i8* %0) {
%2 = tail call i32 @current_setting(i8* %0)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int dobldobl_scale_system(int mode, double *cff) {
  int fail, *b;
  fail = _ada_use_c2phc4c(591, &mode, b, cff, 0);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_scale_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x24f,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_scale_system>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x24f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dobldobl_scale_system(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %3
store double* %1, double** %4
%7 = load i32*, i32** %6
%8 = load double*, double** %4
%9 = call i32 @_ada_use_c2phc4c(i32 591, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @dobldobl_scale_system(i32 %0, double* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 591, i32* %3, i32* undef, double* %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
scalar_t__ strncmp(char *, char *, int);
int is_http_protocol(char *msg_from_client) {
  return 1;
  int index = 0;
  while (msg_from_client[index] != '\0' && msg_from_client[index] != '\n') {
    index++;
    printf("%d%c", index - 1, msg_from_client[index - 1]);
  }
  if (strncmp(msg_from_client + index - 10, "HTTP/", 5) == 0) {
    return 1;
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @is_http_protocol(i8* nocapture readnone %0) {
ret i32 1
}
int imcomp_calc_max_elem(int comptype, int nx, int blocksize) {
  if (comptype == 11) {
    return (sizeof(float) * nx + nx / blocksize + 2 + 4);
  } else if (comptype == 21) {
    return (nx * sizeof(int) / 2);
  } else
    return (nx * sizeof(int));
}


x86 assembly (clang, -O0):
<imcomp_calc_max_elem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0xb,-0x8(%rbp)
jne    1146 <imcomp_calc_max_elem+0x46>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x2,%rax
add    $0x4,%rax
mov    %eax,-0x4(%rbp)
jmp    116f <imcomp_calc_max_elem+0x6f>
cmpl   $0x15,-0x8(%rbp)
jne    1164 <imcomp_calc_max_elem+0x64>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
shr    $0x1,%rax
mov    %eax,-0x4(%rbp)
jmp    116f <imcomp_calc_max_elem+0x6f>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imcomp_calc_max_elem>:
cmp    $0x15,%edi
je     111a <imcomp_calc_max_elem+0x1a>
cmp    $0xb,%edi
jne    111f <imcomp_calc_max_elem+0x1f>
mov    %edx,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
lea    (%rax,%rsi,4),%esi
add    $0x6,%esi
mov    %esi,%eax
ret
add    %esi,%esi
mov    %esi,%eax
ret
shl    $0x2,%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @imcomp_calc_max_elem(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 11
br i1 %9, label %10, label %22
10: ; preds = %3
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = mul i64 4, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = sdiv i32 %14, %15
%17 = sext i32 %16 to i64
%18 = add i64 %13, %17
%19 = add i64 %18, 2
%20 = add i64 %19, 4
%21 = trunc i64 %20 to i32
store i32 %21, i32* %4
br label %36
22: ; preds = %3
%23 = load i32, i32* %5
%24 = icmp eq i32 %23, 21
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 4
%29 = udiv i64 %28, 2
%30 = trunc i64 %29 to i32
store i32 %30, i32* %4
br label %36
31: ; preds = %22
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 4
%35 = trunc i64 %34 to i32
store i32 %35, i32* %4
br label %36
36: ; preds = %31, %25, %10
%37 = load i32, i32* %4
ret i32 %37
}

LLVM IR (-O2):
define i32 @imcomp_calc_max_elem(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %11 [
i32 11, label %4
i32 21, label %9
]
4: ; preds = %3
%5 = shl i32 %1, 2
%6 = sdiv i32 %1, %2
%7 = add i32 %5, 6
%8 = add i32 %7, %6
br label %13
9: ; preds = %3
%10 = shl i32 %1, 1
br label %13
11: ; preds = %3
%12 = shl i32 %1, 2
br label %13
13: ; preds = %11, %9, %4
%14 = phi i32 [ %8, %4 ], [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ test_basic_Queue();
void run_tests() { test_basic_Queue(); }


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

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

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

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

/* Variables and functions */
int32_t ev3_speaker_play_tone(uint16_t freq, int32_t ms) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_speaker_play_tone(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t GPIO_getOutputEnableDio(uint32_t dioNumber) {
  ;
  return (
      ((*((volatile unsigned long *)(0x40022000 + 0x000000D0))) >> dioNumber) &
      1);
}


x86 assembly (clang, -O0):
<GPIO_getOutputEnableDio>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400220d0,%eax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
shr    %cl,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIO_getOutputEnableDio>:
mov    %rdi,-0x8(%rsp)
mov    0x400220d0,%rax
40
mov    -0x8(%rsp),%rcx
shr    %cl,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @GPIO_getOutputEnableDio(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073881296 to i64*)
%4 = load volatile i64, i64* %2
%5 = lshr i64 %3, %4
%6 = and i64 %5, 1
ret i64 %6
}

LLVM IR (-O2):
define i64 @GPIO_getOutputEnableDio(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073881296 to i64*)
%4 = load volatile i64, i64* %2
%5 = lshr i64 %3, %4
%6 = and i64 %5, 1
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ dologout(int /*<<< orphan*/);
int /*<<< orphan*/ reply(int, char *, ...);
void fatal(char *s) {
  reply(451, "Error in server: %s\n", s);
  reply(221, "Closing connection due to server error.");
  dologout(0);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1c3,%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1040 <reply@plt>
mov    $0xdd,%edi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1040 <reply@plt>
xor    %edi,%edi
call   1030 <dologout@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rsi
mov    $0x1c3,%edi
xor    %eax,%eax
call   1040 <reply@plt>
lea    0xed7(%rip),%rsi
mov    $0xdd,%edi
xor    %eax,%eax
call   1040 <reply@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <dologout@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Error in server: %s\0A\00"
@.str.1 = [40 x i8] c"Closing connection due to server error.\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i32, i8*, ...) @reply(i32 451, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i32, i8*, ...) @reply(i32 221, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @dologout(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Error in server: %s\0A\00"
@.str.1 = [40 x i8] c"Closing connection due to server error.\00"
define void @fatal(i8* %0) {
%2 = tail call i32 (i32, i8*, ...) @reply(i32 451, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i32, i8*, ...) @reply(i32 221, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @dologout(i32 0)
ret void
}
int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sock = type opaque
define i32 @bpf_sk_storage_clone(%struct.sock* %0, %struct.sock* %1) {
%3 = alloca %struct.sock*
%4 = alloca %struct.sock*
store %struct.sock* %0, %struct.sock** %3
store %struct.sock* %1, %struct.sock** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sock = type opaque
define i32 @bpf_sk_storage_clone(%struct.sock* nocapture readnone %0, %struct.sock* nocapture readnone %1) {
ret i32 0
}
int main() {
  int c, b;
  c *b;
  unsigned a, d;
  a *d;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = mul i32 %9, %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void quantifier2ONEMORE() {}


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

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

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

LLVM IR (-O2):
define void @quantifier2ONEMORE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gethostname(char *, int);
int strlen(char *);
void igethname(char *name, int *ln) {
  gethostname(name, 256);
  *ln = strlen(name);
}


x86 assembly (clang, -O0):
<igethname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1040 <gethostname@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igethname>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x100,%esi
call   1040 <gethostname@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @igethname(i8* %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 = call i32 @gethostname(i8* %5, i32 256)
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = load i32*, i32** %4
store i32 %8, i32* %9
ret void
}

LLVM IR (-O2):
define void @igethname(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @gethostname(i8* %0, i32 256)
%4 = tail call i32 @strlen(i8* %0)
store i32 %4, i32* %1
ret void
}