xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char c = 'a';
  int i = 32;
  float f = 2.3;
  printf("Address of Character is %p\n", &c);
  printf("Address of Integer   is %p\n", &i);
  printf("Address of Float     is %p\n", &f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0x1(%rbp)
movl   $0x20,-0x8(%rbp)
movss  0xed5(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xecd(%rip),%rdi
lea    -0x1(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x61,0xf(%rsp)
movl   $0x20,0x14(%rsp)
movl   $0x40133333,0x10(%rsp)
40
lea    0xed0(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Address of Character is %p\0A\00"
@.str.1 = [28 x i8] c"Address of Integer is %p\0A\00"
@.str.2 = [28 x i8] c"Address of Float is %p\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
store i8 97, i8* %1
store i32 32, i32* %2
store float 0x4002666660000000, float* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Address of Character is %p\0A\00"
@.str.1 = [28 x i8] c"Address of Integer is %p\0A\00"
@.str.2 = [28 x i8] c"Address of Float is %p\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
store i8 97, i8* %1
%4 = bitcast i32* %2 to i8*
store i32 32, i32* %2
%5 = bitcast float* %3 to i8*
store float 0x4002666660000000, float* %3
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float* %3)
ret i32 0
}
void _Jv_charClass(void) {}


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

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

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

LLVM IR (-O2):
define void @_Jv_charClass() {
ret void
}
/* Type definitions */
struct tdb_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int _tdb_lock(struct tdb_context *, int, int, int /*<<< orphan*/);
int ext2fs_tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype) {
  return _tdb_lock(tdb, list, ltype, F_SETLK);
}


x86 assembly (clang, -O0):
<ext2fs_tdb_lock_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
call   1030 <_tdb_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_tdb_lock_nonblock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <_tdb_lock@plt>

LLVM IR (-O0):
%struct.tdb_context = type { i32 }
@F_SETLK = global i32 0
define i32 @ext2fs_tdb_lock_nonblock(%struct.tdb_context* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tdb_context*
%5 = alloca i32
%6 = alloca i32
store %struct.tdb_context* %0, %struct.tdb_context** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.tdb_context*, %struct.tdb_context** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @F_SETLK
%11 = call i32 @_tdb_lock(%struct.tdb_context* %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.tdb_context = type { i32 }
@F_SETLK = global i32 0
define i32 @ext2fs_tdb_lock_nonblock(%struct.tdb_context* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @F_SETLK
%5 = tail call i32 @_tdb_lock(%struct.tdb_context* %0, i32 %1, i32 %2, i32 %4)
ret i32 %5
}
void StartVideoCodecTriggerHost(unsigned long MMIOBase, unsigned long offset) {
  *(volatile unsigned long *)((unsigned long)(0x1E700000) +
                              (unsigned long)(offset)) =
      (((*(volatile unsigned long *)((unsigned long)(0x1E700000) +
                                     (unsigned long)(offset))) &
        (~0x00000010)) |
       (unsigned long)((0) & (0x00000010)));
  *(volatile unsigned long *)((unsigned long)(0x1E700000) +
                              (unsigned long)(offset)) =
      (((*(volatile unsigned long *)((unsigned long)(0x1E700000) +
                                     (unsigned long)(offset))) &
        (~0x00000010)) |
       (unsigned long)((0x00000010) & (0x00000010)));
}


x86 assembly (clang, -O0):
<StartVideoCodecTriggerHost>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    (%rax),%rcx
and    $0xffffffffffffffef,%rcx
or     $0x0,%rcx
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    (%rax),%rcx
and    $0xffffffffffffffef,%rcx
or     $0x10,%rcx
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartVideoCodecTriggerHost>:
andq   $0xffffffffffffffef,0x1e700000(%rsi)
ef
orq    $0x10,0x1e700000(%rsi)
10
ret

LLVM IR (-O0):
define void @StartVideoCodecTriggerHost(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = add i64 510656512, %5
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -17
%10 = or i64 %9, 0
%11 = load i64, i64* %4
%12 = add i64 510656512, %11
%13 = inttoptr i64 %12 to i64*
store volatile i64 %10, i64* %13
%14 = load i64, i64* %4
%15 = add i64 510656512, %14
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = and i64 %17, -17
%19 = or i64 %18, 16
%20 = load i64, i64* %4
%21 = add i64 510656512, %20
%22 = inttoptr i64 %21 to i64*
store volatile i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @StartVideoCodecTriggerHost(i64 %0, i64 %1) {
%3 = add i64 %1, 510656512
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -17
store volatile i64 %6, i64* %4
%7 = load volatile i64, i64* %4
%8 = or i64 %7, 16
store volatile i64 %8, i64* %4
ret void
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncmp(char const *, char const *, size_t);
const char *prefix_skip(const char *str, const char *prefix) {
  size_t len = strlen(prefix);
  return strncmp(str, prefix, len) ? NULL : str + len;
}


x86 assembly (clang, -O0):
<prefix_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1163 <prefix_skip+0x43>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    116f <prefix_skip+0x4f>
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prefix_skip>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
add    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @prefix_skip(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i64 @strncmp(i8* %8, i8* %9, i64 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
br label %18
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i64, i64* %5
%17 = getelementptr inbounds i8, i8* %15, i64 %16
br label %18
18: ; preds = %14, %13
%19 = phi i8* [ null, %13 ], [ %17, %14 ]
ret i8* %19
}

LLVM IR (-O2):
define i8* @prefix_skip(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %0, i64 %3
%7 = select i1 %5, i8* %6, i8* null
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ enablePin(int, int, int);
int /*<<< orphan*/ rtcEnable(int, int, int, int, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ rtcSetPeriodicEvent(int);
int /*<<< orphan*/ setPin(int, int /*<<< orphan*/);
void blink(void) {
  enablePin(1, 0, 0x80);
  enablePin(1, 1, 0x80);
  setPin(1, 0);
  rtcEnable(2015, 1, 1, 9, 0, 0);
  rtcSetPeriodicEvent((1 << 0));
}


x86 assembly (clang, -O0):
<blink>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <enablePin@plt>
mov    $0x1,%esi
mov    $0x80,%edx
mov    %esi,%edi
call   1040 <enablePin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <setPin@plt>
mov    $0x7df,%edi
mov    $0x1,%edx
mov    $0x9,%ecx
xor    %r9d,%r9d
mov    %edx,%esi
mov    %r9d,%r8d
call   1030 <rtcEnable@plt>
mov    $0x1,%edi
call   1050 <rtcSetPeriodicEvent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <enablePin@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x80,%edx
call   1040 <enablePin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <setPin@plt>
mov    $0x7df,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x9,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <rtcEnable@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <rtcSetPeriodicEvent@plt>

LLVM IR (-O0):
define void @blink() {
%1 = call i32 @enablePin(i32 1, i32 0, i32 128)
%2 = call i32 @enablePin(i32 1, i32 1, i32 128)
%3 = call i32 @setPin(i32 1, i32 0)
%4 = call i32 @rtcEnable(i32 2015, i32 1, i32 1, i32 9, i32 0, i32 0)
%5 = call i32 @rtcSetPeriodicEvent(i32 1)
ret void
}

LLVM IR (-O2):
define void @blink() {
%1 = tail call i32 @enablePin(i32 1, i32 0, i32 128)
%2 = tail call i32 @enablePin(i32 1, i32 1, i32 128)
%3 = tail call i32 @setPin(i32 1, i32 0)
%4 = tail call i32 @rtcEnable(i32 2015, i32 1, i32 1, i32 9, i32 0, i32 0)
%5 = tail call i32 @rtcSetPeriodicEvent(i32 1)
ret void
}
int is_blank(char c) { return c == ' ' || c == '\t' || c == '\n' || c == '\r'; }


x86 assembly (clang, -O0):
<is_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_blank+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_blank+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_blank+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank>:
cmp    $0x20,%dil
ja     1120 <is_blank+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_blank+0x20>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_blank(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __rcu_read_unlock_bh();
__attribute__((always_)) void rcu_read_unlock_bh(void) {
  do {
  } while (0);
  (void)0;
  __rcu_read_unlock_bh();
}


x86 assembly (clang, -O0):
<rcu_read_unlock_bh>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <rcu_read_unlock_bh+0x9>
jmp    111e <rcu_read_unlock_bh+0xe>
mov    $0x0,%al
call   1030 <__rcu_read_unlock_bh@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rcu_read_unlock_bh() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @__rcu_read_unlock_bh()
ret void
}

LLVM IR (-O2):
define void @rcu_read_unlock_bh() {
%1 = tail call i32 (...) @__rcu_read_unlock_bh()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uartout(int);
void putchar(int c) { uartout(c); }


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

x86 assembly (clang, -O2):
<putchar>:
jmp    1030 <uartout@plt>

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

LLVM IR (-O2):
define void @putchar(i32 %0) {
%2 = tail call i32 @uartout(i32 %0)
ret void
}
/* Type definitions */
struct sl {
  int dummy;
};

/* Variables and functions */
scalar_t__ __nondet();
struct sl *create_sl_with_head_and_tail();
int /*<<< orphan*/ destroy_sl(struct sl *);
int /*<<< orphan*/ sl_random_insert(struct sl *);
int main() {
  struct sl *sl = create_sl_with_head_and_tail();
  while (__nondet())
    sl_random_insert(sl);
  destroy_sl(sl);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <create_sl_with_head_and_tail@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <__nondet@plt>
cmp    $0x0,%rax
je     1179 <main+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <sl_random_insert@plt>
jmp    115a <main+0x1a>
mov    -0x10(%rbp),%rdi
call   1050 <destroy_sl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <create_sl_with_head_and_tail@plt>
mov    %rax,%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <__nondet@plt>
test   %rax,%rax
je     1166 <main+0x26>
mov    %rbx,%rdi
call   1030 <sl_random_insert@plt>
jmp    1150 <main+0x10>
mov    %rbx,%rdi
call   1050 <destroy_sl@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sl = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sl*
store i32 0, i32* %1
%3 = call %struct.sl* (...) @create_sl_with_head_and_tail()
store %struct.sl* %3, %struct.sl** %2
br label %4
4: ; preds = %7, %0
%5 = call i64 (...) @__nondet()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load %struct.sl*, %struct.sl** %2
%9 = call i32 @sl_random_insert(%struct.sl* %8)
br label %4
10: ; preds = %4
%11 = load %struct.sl*, %struct.sl** %2
%12 = call i32 @destroy_sl(%struct.sl* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.sl = type { i32 }
define i32 @main() {
%1 = tail call %struct.sl* (...) @create_sl_with_head_and_tail()
%2 = tail call i64 (...) @__nondet()
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0, %4
%5 = tail call i32 @sl_random_insert(%struct.sl* %1)
%6 = tail call i64 (...) @__nondet()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %0
%9 = tail call i32 @destroy_sl(%struct.sl* %1)
ret i32 0
}
unsigned int getdigits(unsigned int value) {
  int digits = 1;
  while (value > 9) {
    digits++;
    value /= 10;
  }
  return digits;
}


x86 assembly (clang, -O0):
<getdigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jbe    1135 <getdigits+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <getdigits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdigits>:
mov    $0x1,%eax
cmp    $0xa,%edi
jb     1134 <getdigits+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <getdigits+0x20>
ret

LLVM IR (-O0):
define i32 @getdigits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ugt i32 %5, 9
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = udiv i32 %10, 10
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @getdigits(i32 %0) {
%2 = icmp ugt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i32 %5, 10
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel(void *);
int /*<<< orphan*/ printf(char *, char *);
void UpnpRemoteIOClient_ChannelManager_UnregisterChannel(void *upnptoken,
                                                         char *PeerConnection) {
  printf("Invoke: UpnpRemoteIOClient_ChannelManager_UnregisterChannel(%s);\r\n",
         PeerConnection);
  UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel(upnptoken);
}


x86 assembly (clang, -O0):
<UpnpRemoteIOClient_ChannelManager_UnregisterChannel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_ChannelManager_UnregisterChannel>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"Invoke: UpnpRemoteIOClient_ChannelManager_UnregisterChannel(%s);\0D\0A\00"
define void @UpnpRemoteIOClient_ChannelManager_UnregisterChannel(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"Invoke: UpnpRemoteIOClient_ChannelManager_UnregisterChannel(%s);\0D\0A\00"
define void @UpnpRemoteIOClient_ChannelManager_UnregisterChannel(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @UpnpResponse_RemoteIOClient_ChannelManager_UnregisterChannel(i8* %0)
ret void
}
int my_swap(int *a, int *b) {
  int c;
  c = *a;
  *a = *b;
  *b = c;
}


x86 assembly (clang, -O0):
<my_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @my_swap(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @my_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
int digitsBaseTwo(unsigned long x) {
  int digits = 0;
  while (x) {
    digits += 1;
    x >>= 1;
  }
  return digits;
}


x86 assembly (clang, -O0):
<digitsBaseTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <digitsBaseTwo+0x34>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <digitsBaseTwo+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitsBaseTwo>:
xor    %eax,%eax
test   %rdi,%rdi
je     111f <digitsBaseTwo+0x1f>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <digitsBaseTwo+0x10>
ret

LLVM IR (-O0):
define i32 @digitsBaseTwo(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i64, i64* %2
%11 = lshr i64 %10, 1
store i64 %11, i64* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @digitsBaseTwo(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i64 %5, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ amostra(char *);
int /*<<< orphan*/ desligarTodosLeds();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ lerArquivo(char *);
int /*<<< orphan*/ stdscr;
int main() {
  int row, col, i, j;
  char string[50];
  initscr();
  getmaxyx(stdscr, row, col);
  desligarTodosLeds();
  lerArquivo(string);
  amostra(string);
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <getmaxyx@plt>
mov    $0x0,%al
call   1090 <desligarTodosLeds@plt>
lea    -0x50(%rbp),%rdi
call   1080 <lerArquivo@plt>
lea    -0x50(%rbp),%rdi
call   1050 <amostra@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
xor    %eax,%eax
call   1030 <initscr@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1040 <getmaxyx@plt>
xor    %eax,%eax
call   1090 <desligarTodosLeds@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1080 <lerArquivo@plt>
mov    %rbx,%rdi
call   1050 <amostra@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
call   1070 <endwin@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdscr = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [50 x i8]
store i32 0, i32* %1
%7 = call i32 (...) @initscr()
%8 = load i32, i32* @stdscr
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @getmaxyx(i32 %8, i32 %9, i32 %10)
%12 = call i32 (...) @desligarTodosLeds()
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%14 = call i32 @lerArquivo(i8* %13)
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%16 = call i32 @amostra(i8* %15)
%17 = call i32 (...) @getch()
%18 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@stdscr = global i32 0
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @initscr()
%4 = load i32, i32* @stdscr
%5 = tail call i32 @getmaxyx(i32 %4, i32 undef, i32 undef)
%6 = tail call i32 (...) @desligarTodosLeds()
%7 = call i32 @lerArquivo(i8* %2)
%8 = call i32 @amostra(i8* %2)
%9 = call i32 (...) @getch()
%10 = call i32 (...) @endwin()
ret i32 0
}
int isascii(int c) { return (-1 < c && c < 128); }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1127 <isascii+0x27>
cmpl   $0x80,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 -1, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
int fun409() { return 409; }


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

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

LLVM IR (-O0):
define i32 @fun409() {
ret i32 409
}

LLVM IR (-O2):
define i32 @fun409() {
ret i32 409
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int difftime(scalar_t__, scalar_t__);
double floor(int);
scalar_t__ time(int /*<<< orphan*/ *);
double age_of_game(time_t date) {
  static time_t tnow = 0;
  if (!tnow)
    tnow = time(NULL);
  return floor(difftime(tnow, date) / (24 * 3600));
}


x86 assembly (clang, -O0):
<age_of_game>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,0x2efc(%rip)
jne    115a <age_of_game+0x2a>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,0x2ee6(%rip)
mov    0x2edf(%rip),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <difftime@plt>
mov    $0x15180,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<age_of_game>:
push   %rbx
mov    %rdi,%rbx
mov    0x2f05(%rip),%rdi
test   %rdi,%rdi
jne    1151 <age_of_game+0x21>
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%rdi
mov    %rax,0x2eef(%rip)
mov    %rbx,%rsi
call   1030 <difftime@plt>
movslq %eax,%rdi
imul   $0xffffffffc22e4507,%rdi,%rax
shr    $0x20,%rax
add    %eax,%edi
mov    %edi,%eax
shr    $0x1f,%eax
sar    $0x10,%edi
add    %eax,%edi
pop    %rbx
jmp    1050 <floor@plt>

LLVM IR (-O0):
@age_of_game.tnow = internal global i64 0
define double @age_of_game(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* @age_of_game.tnow
%4 = icmp ne i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i64 @time(i32* null)
store i64 %6, i64* @age_of_game.tnow
br label %7
7: ; preds = %5, %1
%8 = load i64, i64* @age_of_game.tnow
%9 = load i64, i64* %2
%10 = call i32 @difftime(i64 %8, i64 %9)
%11 = sdiv i32 %10, 86400
%12 = call double @floor(i32 %11)
ret double %12
}

LLVM IR (-O2):
@age_of_game.tnow = internal unnamed_addr global i64 0
define double @age_of_game(i64 %0) {
%2 = load i64, i64* @age_of_game.tnow
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @time(i32* null)
store i64 %5, i64* @age_of_game.tnow
br label %6
6: ; preds = %4, %1
%7 = phi i64 [ %5, %4 ], [ %2, %1 ]
%8 = tail call i32 @difftime(i64 %7, i64 %0)
%9 = sdiv i32 %8, 86400
%10 = tail call double @floor(i32 %9)
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int safe_atou(char const *, unsigned int *);
int safe_atou32(const char *s, uint32_t *ret_u) {
  struct _assert_struct_8 {
    char x[(sizeof(uint32_t) == sizeof(unsigned)) ? 0 : -1];
  };
  return safe_atou(s, (unsigned *)ret_u);
}


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

x86 assembly (clang, -O2):
<safe_atou32>:
jmp    1030 <safe_atou@plt>

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

LLVM IR (-O2):
define i32 @safe_atou32(i8* %0, i32* %1) {
%3 = tail call i32 @safe_atou(i8* %0, i32* %1)
ret i32 %3
}
void matrizB(int l, int c, char matriz[l][c]) {
  int i, j, k = 3;
  for (i = 0; i < l; i++) {
    for (j = 0; j < k; j++) {
      matriz[i][j] = '*';
    }
    k--;
  }
}


x86 assembly (clang, -O0):
<matrizB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x28(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1182 <matrizB+0x82>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    116b <matrizB+0x6b>
mov    -0x28(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movb   $0x2a,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1136 <matrizB+0x36>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <matrizB+0x23>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrizB>:
test   %edi,%edi
jle    1123 <matrizB+0x23>
movb   $0x2a,0x2(%rdx)
movw   $0x2a2a,(%rdx)
cmp    $0x1,%edi
je     1123 <matrizB+0x23>
mov    %esi,%eax
movw   $0x2a2a,(%rdx,%rax,1)
cmp    $0x2,%edi
je     1123 <matrizB+0x23>
movb   $0x2a,(%rdx,%rax,2)
ret

LLVM IR (-O0):
define void @matrizB(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
store i32 3, i32* %9
store i32 0, i32* %7
br label %14
14: ; preds = %38, %3
%15 = load i32, i32* %7
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %41
18: ; preds = %14
store i32 0, i32* %8
br label %19
19: ; preds = %32, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = load i8*, i8** %6
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = mul nsw i64 %26, %13
%28 = getelementptr inbounds i8, i8* %24, i64 %27
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
store i8 42, i8* %31
br label %32
32: ; preds = %23
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %19
35: ; preds = %19
%36 = load i32, i32* %9
%37 = add nsw i32 %36, -1
store i32 %37, i32* %9
br label %38
38: ; preds = %35
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %14
41: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @matrizB(i32 %0, i32 %1, i8* nocapture writeonly %2) {
%4 = zext i32 %1 to i64
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = icmp eq i32 %0, 1
br i1 %7, label %15, label %8
8: ; preds = %6
%9 = getelementptr i8, i8* %2, i64 %4
%10 = bitcast i8* %9 to i16*
store i16 10794, i16* %10
%11 = icmp eq i32 %0, 2
br i1 %11, label %15, label %12
12: ; preds = %8
%13 = shl nuw nsw i64 %4, 1
%14 = getelementptr i8, i8* %2, i64 %13
store i8 42, i8* %14
br label %15
15: ; preds = %12, %6, %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strstr(char *, char const *);
char *qd_fol_next(char *text, const char *separator) {
  char *next = strstr(text, separator);
  if (next) {
    *next = '\0';
    next += strlen(separator);
  }
  return next;
}


x86 assembly (clang, -O0):
<qd_fol_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116c <qd_fol_next+0x4c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_fol_next>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <strstr@plt>
test   %rax,%rax
je     1146 <qd_fol_next+0x26>
mov    %rax,%rbx
movb   $0x0,(%rax)
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
jmp    1148 <qd_fol_next+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @qd_fol_next(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
store i8 0, i8* %3
%6 = tail call i32 @strlen(i8* %1)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
br label %9
9: ; preds = %5, %2
%10 = phi i8* [ %8, %5 ], [ null, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int use_Basic_Auth(char *s) {
  if (strstr(s, "WWW-Authenticate: Basic") != NULL) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<use_Basic_Auth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <use_Basic_Auth+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <use_Basic_Auth+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_Basic_Auth>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"WWW-Authenticate: Basic\00"
define i32 @use_Basic_Auth(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strstr(i8* %4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [24 x i8] c"WWW-Authenticate: Basic\00"
define i32 @use_Basic_Auth(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
int multiple(int n1, int n2) {
  int ret;
  if (0 == n1 % n2) {
    ret = 1;
  } else
    ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<multiple>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
xor    %eax,%eax
cmp    %edx,%eax
jne    1127 <multiple+0x27>
movl   $0x1,-0xc(%rbp)
jmp    112e <multiple+0x2e>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiple>:
mov    %edi,%eax
cltd
idiv   %esi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @multiple(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
extern int SizeofLng() { return sizeof(long); }


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

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

LLVM IR (-O0):
define i32 @SizeofLng() {
ret i32 8
}

LLVM IR (-O2):
define i32 @SizeofLng() {
ret i32 8
}
void test(int x) {
  if (!x) {
  ERROR:
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111b <test+0x1b>
jmp    1116 <test+0x16>
jmp    1116 <test+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
test   %edi,%edi
je     1110 <test+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <test+0x10>

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

LLVM IR (-O2):
define void @test(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
unsigned char rev_byte_bits(unsigned char input) {
  int j;
  unsigned char output = 0;
  for (j = 0; j < 8; j++) {
    if (input & (1 << j))
      output |= (0x80 >> j);
  }
  return output;
}


x86 assembly (clang, -O0):
<rev_byte_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x9(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1162 <rev_byte_bits+0x62>
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     114f <rev_byte_bits+0x4f>
mov    -0x8(%rbp),%ecx
mov    $0x80,%eax
sar    %cl,%eax
mov    %eax,%ecx
movzbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
jmp    1154 <rev_byte_bits+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <rev_byte_bits+0x15>
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_byte_bits>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @rev_byte_bits(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %4
store i32 0, i32* %3
br label %5
5: ; preds = %23, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %26
8: ; preds = %5
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = load i32, i32* %3
%12 = shl i32 1, %11
%13 = and i32 %10, %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %8
%16 = load i32, i32* %3
%17 = ashr i32 128, %16
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %19, %17
%21 = trunc i32 %20 to i8
store i8 %21, i8* %4
br label %22
22: ; preds = %15, %8
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
%27 = load i8, i8* %4
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @rev_byte_bits(i8 zeroext %0) {
%2 = call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
/* Variables and functions */
int foo(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", foo(3, 4, 5));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
mov    $0x5,%edx
call   1040 <foo@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 3, i32 4, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_metadata_credentials_notify_from_plugin() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_metadata_credentials_notify_from_plugin>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_metadata_credentials_notify_from_plugin>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_credentials_notify_from_plugin() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_metadata_credentials_notify_from_plugin() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int hash(int c, int font) { return (c ^ (font * 97)) % 4096; }


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x61,-0x8(%rbp),%ecx
xor    %ecx,%eax
mov    $0x1000,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
imul   $0x61,%esi,%eax
xor    %edi,%eax
lea    0xfff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffff000,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash(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 = mul nsw i32 %6, 97
%8 = xor i32 %5, %7
%9 = srem i32 %8, 4096
ret i32 %9
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 97
%4 = xor i32 %3, %0
%5 = srem i32 %4, 4096
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int swscanf(const wchar_t *s, const wchar_t *format, ...) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<swscanf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swscanf>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @swscanf(i32* nocapture readnone %0, i32* nocapture readnone %1, ...) {
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x6f() {
  Assert_real((isdigit(111) == 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_isdigit.c",
              560, ("isdigit should be 0 for o"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x6f>:
push   %rax
mov    $0x6f,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x230,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for o\00"
define void @t_isdigit_0x6f() {
%1 = call i64 @isdigit(i32 111)
%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 560, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for o\00"
define void @t_isdigit_0x6f() {
%1 = tail call i64 @isdigit(i32 111)
%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 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}