xunge/DecIR huggingface dataset:
int meil(int a, int b) {
  if (a > b) {
    if (a % b == 0) {
      return a / b;
    } else {
      return a / b + 1;
    }
  } else
    return 1;
}


x86 assembly (clang, -O0):
<meil>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1147 <meil+0x47>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1135 <meil+0x35>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    114e <meil+0x4e>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114e <meil+0x4e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<meil>:
mov    $0x1,%eax
cmp    %esi,%edi
jle    1114 <meil+0x14>
mov    %edi,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
sbb    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @meil(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = srem i32 %0, %1
%6 = icmp ne i32 %5, 0
%7 = sdiv i32 %0, %1
%8 = zext i1 %6 to i32
%9 = add nsw i32 %7, %8
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 1, %2 ], [ %9, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int hammingWeight(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  uint32_t a = 11;
  printf("%d\n", hammingWeight(a));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xb,%edi
call   1040 <hammingWeight@plt>
lea    0xece(%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
%2 = alloca i32
store i32 0, i32* %1
store i32 11, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @hammingWeight(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @hammingWeight(i32 11)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void iNemoEngineAPI_Run(int delta_time, struct RawCounts *RawCnts) {}


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

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

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

LLVM IR (-O2):
%struct.RawCounts = type opaque
define void @iNemoEngineAPI_Run(i32 %0, %struct.RawCounts* nocapture %1) {
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      if (!(state[0UL] > local1)) {
        state[0UL] += state[0UL];
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] + 792422477UL) + 0xfffffffff7856444UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    115b <RandomFunc+0x5b>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     114a <RandomFunc+0x4a>
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
add    $0x2f3b684d,%rcx
add    $0xfffffffff7856444,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0x2626d7d6,%eax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, -10089659
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %26, %2
%13 = load i64, i64* %6
%14 = icmp ult i64 %13, 0
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%17 = load i64, i64* %16
%18 = load i64, i64* %6
%19 = icmp ugt i64 %17, %18
br i1 %19, label %26, label %20
20: ; preds = %15
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = add i64 %24, %22
store i64 %25, i64* %23
br label %26
26: ; preds = %20, %15
%27 = load i64, i64* %6
%28 = add i64 %27, 2
store i64 %28, i64* %6
br label %12
29: ; preds = %12
%30 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%31 = load i64, i64* %30
%32 = add i64 %31, 792422477
%33 = add i64 %32, -142252988
%34 = load i64*, i64** %4
%35 = getelementptr inbounds i64, i64* %34, i64 0
store i64 %33, i64* %35
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, 640079830
store i64 %4, i64* %1
ret void
}
void RTAvlroGCPhysGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlroGCPhysGet() {
ret void
}
/* Variables and functions */
scalar_t__ isPrime(unsigned int);
bool isPairOfTwins(unsigned num) {
  if (isPrime(num) && isPrime(num + 2)) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<isPairOfTwins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isPrime@plt>
cmp    $0x0,%rax
je     114e <isPairOfTwins+0x3e>
mov    -0x8(%rbp),%edi
add    $0x2,%edi
call   1030 <isPrime@plt>
cmp    $0x0,%rax
je     114e <isPairOfTwins+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <isPairOfTwins+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPairOfTwins>:
push   %rbx
mov    %edi,%ebx
call   1030 <isPrime@plt>
test   %rax,%rax
je     1136 <isPairOfTwins+0x26>
add    $0x2,%ebx
mov    %ebx,%edi
call   1030 <isPrime@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1136 <isPairOfTwins+0x26>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isPairOfTwins(i32 %0) {
%2 = tail call i64 @isPrime(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = add i32 %0, 2
%6 = tail call i64 @isPrime(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void LECROY_TCP_bored_now(int sig) {
  printf("Well, I got bored waiting to connect, so I'm going to quit. Bye!\n");
  exit(1);
}


x86 assembly (clang, -O0):
<LECROY_TCP_bored_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<LECROY_TCP_bored_now>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"Well, I got bored waiting to connect, so I'm going to quit. Bye!\0A\00"
define void @LECROY_TCP_bored_now(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [65 x i8] c"Well, I got bored waiting to connect, so I'm going to quit. Bye!\00"
define void @LECROY_TCP_bored_now(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void sws_isSupportedOutput() {}


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

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

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

LLVM IR (-O2):
define void @sws_isSupportedOutput() {
ret void
}
/* Variables and functions */
int simple_trie_tests();
int /*<<< orphan*/ urltrie_tests();
int main(void) {
  int rc;
  urltrie_tests();
  rc = simple_trie_tests();
  if (rc != 1) {
    return (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 <urltrie_tests@plt>
mov    $0x0,%al
call   1040 <simple_trie_tests@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1156 <main+0x36>
movl   $0x1,-0x4(%rbp)
jmp    115d <main+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <urltrie_tests@plt>
xor    %eax,%eax
call   1040 <simple_trie_tests@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @urltrie_tests()
%4 = call i32 (...) @simple_trie_tests()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @urltrie_tests()
%2 = tail call i32 (...) @simple_trie_tests()
%3 = icmp ne i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int getlineuser(char *, int);
int /*<<< orphan*/ reverse(char *);
int main() {
  int len;
  char line[1000];
  while ((len = getlineuser(line, 1000)) > 0)
    reverse(line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getlineuser@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1160 <main+0x40>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getlineuser@plt>
test   %eax,%eax
jle    1159 <main+0x39>
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getlineuser@plt>
test   %eax,%eax
jg     1140 <main+0x20>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getlineuser(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 @reverse(i8* %9)
br label %4
11: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getlineuser(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @getlineuser(i8* %2, i32 1000)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) {}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
define void @blk_mq_debugfs_unregister_hctxs(%struct.request_queue* %0) {
%2 = alloca %struct.request_queue*
store %struct.request_queue* %0, %struct.request_queue** %2
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
define void @blk_mq_debugfs_unregister_hctxs(%struct.request_queue* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void deleteSubEvt(void *my) { free(my); }


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

x86 assembly (clang, -O2):
<deleteSubEvt>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @deleteSubEvt(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
main() {
  int x, m;
  x = 100;
  while (x > 0) {
    m = __VERIFIER_nondet_int();
    x = x - 1;
  }
  __VERIFIER_assert(x == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1158 <main+0x38>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x65,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <main+0x10>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 100, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = add nsw i32 %2, -1
%5 = icmp ugt i32 %2, 1
br i1 %5, label %1, label %6
6: ; preds = %1
%7 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
int rnd(low, high)
int low, high;
{
  int i;
  float randomperc();
  if (low >= high)
    i = low;
  else {
    i = (randomperc() * (high - low + 1)) + low;
    if (i > high)
      i = high;
  }
  return (i);
}


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1135 <rnd+0x25>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1174 <rnd+0x64>
mov    $0x0,%al
call   1030 <randomperc@plt>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm2
cvtsi2ssl -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    116f <rnd+0x5f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1174 <rnd+0x64>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    %esi,%ebp
sub    %edi,%ebp
jle    1144 <rnd+0x34>
mov    %esi,%r14d
xor    %eax,%eax
call   1030 <randomperc@plt>
add    $0x1,%ebp
cvtsi2ss %ebp,%xmm1
cvtsi2ss %ebx,%xmm2
mulss  %xmm0,%xmm1
addss  %xmm2,%xmm1
cvttss2si %xmm1,%ebx
cmp    %r14d,%ebx
cmovg  %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rnd(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 = icmp sge i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
store i32 %10, i32* %5
br label %28
11: ; preds = %2
%12 = call float (...) @randomperc()
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to float
%18 = load i32, i32* %3
%19 = sitofp i32 %18 to float
%20 = call float @llvm.fmuladd.f32(float %12, float %17, float %19)
%21 = fptosi float %20 to i32
store i32 %21, i32* %5
%22 = load i32, i32* %5
%23 = load i32, i32* %4
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %11
%26 = load i32, i32* %4
store i32 %26, i32* %5
br label %27
27: ; preds = %25, %11
br label %28
28: ; preds = %27, %9
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @rnd(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = tail call float (...) @randomperc()
%6 = sub i32 1, %0
%7 = add i32 %6, %1
%8 = sitofp i32 %7 to float
%9 = sitofp i32 %0 to float
%10 = tail call float @llvm.fmuladd.f32(float %5, float %8, float %9)
%11 = fptosi float %10 to i32
%12 = icmp sgt i32 %11, %1
%13 = select i1 %12, i32 %1, i32 %11
br label %14
14: ; preds = %4, %2
%15 = phi i32 [ %0, %2 ], [ %13, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void space(int x) {
  int i;
  for (i = 0; i < x; i++) {
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <space+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <space+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<space>:
push   %rbx
test   %edi,%edi
jle    112f <space+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <space+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @space(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 32)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
char *modifyNickMode(int, void *);
char *halfopCmd(void *args) { return modifyNickMode(5, args); }


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

x86 assembly (clang, -O2):
<halfopCmd>:
mov    %rdi,%rsi
mov    $0x5,%edi
jmp    1030 <modifyNickMode@plt>

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

LLVM IR (-O2):
define i8* @halfopCmd(i8* %0) {
%2 = tail call i8* @modifyNickMode(i32 5, i8* %0)
ret i8* %2
}
/* Variables and functions */
int nrand(int);
int rnd(int n1, int n2) { return n1 - 1 + nrand(n2 - n1 + 1); }


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

x86 assembly (clang, -O2):
<rnd>:
push   %rbx
mov    %edi,%ebx
sub    %edi,%esi
lea    0x1(%rsi),%edi
call   1030 <nrand@plt>
add    %ebx,%eax
add    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rnd(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 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = add nsw i32 %9, 1
%11 = call i32 @nrand(i32 %10)
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rnd(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = tail call i32 @nrand(i32 %5)
%7 = add nsw i32 %3, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char const *, int);
void make_dir(const char *dir) { mkdir(dir, 0777); }


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

x86 assembly (clang, -O2):
<make_dir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define void @make_dir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret void
}
/* Variables and functions */
scalar_t__ GLeeInit();
int /*<<< orphan*/ pglEndConditionalRenderNV();
void _Lazy_glEndConditionalRenderNV(void) {
  if (GLeeInit())
    pglEndConditionalRenderNV();
}


x86 assembly (clang, -O0):
<_Lazy_glEndConditionalRenderNV>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GLeeInit@plt>
cmp    $0x0,%rax
je     113c <_Lazy_glEndConditionalRenderNV+0x1c>
mov    $0x0,%al
call   1040 <pglEndConditionalRenderNV@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glEndConditionalRenderNV>:
push   %rax
xor    %eax,%eax
call   1030 <GLeeInit@plt>
test   %rax,%rax
je     1135 <_Lazy_glEndConditionalRenderNV+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pglEndConditionalRenderNV@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_Lazy_glEndConditionalRenderNV() {
%1 = call i64 (...) @GLeeInit()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pglEndConditionalRenderNV()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Lazy_glEndConditionalRenderNV() {
%1 = tail call i64 (...) @GLeeInit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pglEndConditionalRenderNV()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xCPUwfi();
void SysCtlSleep(void) { xCPUwfi(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int /*<<< orphan*/ stdout;
void hide_cursor(void) {
  char command[13];
  snprintf(command, sizeof(command), "%c[?25l", 0x1B);
  fprintf(stdout, "%s", command);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<hide_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xd(%rbp),%rdi
mov    $0xd,%esi
lea    0xeb8(%rip),%rdx
mov    $0x1b,%ecx
call   1030 <snprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    -0xd(%rbp),%rdx
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hide_cursor>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rdx
lea    0xb(%rsp),%r14
mov    %r14,%rdi
mov    $0xd,%esi
mov    $0x1b,%ecx
call   1030 <snprintf@plt>
mov    0x2e84(%rip),%rbx
mov    (%rbx),%edi
lea    0xea3(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%c[?25l\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @hide_cursor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27)
%4 = load i32, i32* @stdout
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%c[?25l\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @hide_cursor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27)
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret void
}
double dl_square(double value, int index) { return value * value; }


x86 assembly (clang, -O0):
<dl_square>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dl_square>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @dl_square(double %0, i32 %1) {
%3 = fmul double %0, %0
ret double %3
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double SuperLU_timer_() {
  struct timeval tp;
  double tmp;
  gettimeofday(&tp, NULL);
  tmp = tp.tv_sec + tp.tv_usec / 1000000.0;
  return (tmp);
}


x86 assembly (clang, -O0):
<SuperLU_timer_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuperLU_timer_>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @SuperLU_timer_() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
store double %9, double* %2
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @SuperLU_timer_() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
unsigned char *UINT16_TO_STREAM_f(unsigned char *p, unsigned short u16) {
  *(p)++ = (unsigned char)(u16);
  *(p)++ = (unsigned char)((u16) >> 8);
  return p;
}


x86 assembly (clang, -O0):
<UINT16_TO_STREAM_f>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UINT16_TO_STREAM_f>:
mov    %si,(%rdi)
lea    0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @UINT16_TO_STREAM_f(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = trunc i16 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %3
store i8 %6, i8* %7
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
store i8 %12, i8* %13
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @UINT16_TO_STREAM_f(i8* writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %0
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %4
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x0c() {
  Assert_real((isupper(12) == 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_isupper.c",
              65, ("isupper should be 0 for 0x0c"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x0c>:
push   %rax
mov    $0xc,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x41,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x0c\00"
define void @t_isupper_0x0c() {
%1 = call i64 @isupper(i32 12)
%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 65, i8* getelementptr inbounds ([29 x i8], [29 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x0c\00"
define void @t_isupper_0x0c() {
%1 = tail call i64 @isupper(i32 12)
%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 65, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __get_array_size(void const *);
int __infer_nondet_int();
int memcmp(const void *s1, const void *s2, size_t n) {
  int size_s1;
  int size_s2;
  size_s1 = __get_array_size(s1);
  size_s2 = __get_array_size(s2);
  if ((n > size_s1) || (n > size_s2))
    while (1)
      ;
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<memcmp>:
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   1040 <__get_array_size@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmp    %rcx,%rax
ja     116e <memcmp+0x4e>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmp    %rcx,%rax
jbe    1178 <memcmp+0x58>
jmp    1173 <memcmp+0x53>
jmp    1173 <memcmp+0x53>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
call   1040 <__get_array_size@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <__get_array_size@plt>
movslq %ebp,%rcx
cmp    %rbx,%rcx
jb     1160 <memcmp+0x40>
cltq
cmp    %rbx,%rax
jb     1160 <memcmp+0x40>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <__infer_nondet_int@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
jmp    1160 <memcmp+0x40>

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

LLVM IR (-O2):
define i32 @memcmp(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @__get_array_size(i8* %0)
%5 = tail call i32 @__get_array_size(i8* %1)
%6 = sext i32 %4 to i64
%7 = icmp ult i64 %6, %2
%8 = sext i32 %5 to i64
%9 = icmp ult i64 %8, %2
%10 = select i1 %7, i1 true, i1 %9
br i1 %10, label %11, label %12
11: ; preds = %3, %11
br label %11
12: ; preds = %3
%13 = tail call i32 (...) @__infer_nondet_int()
ret i32 %13
}
/* Type definitions */
struct cont_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ resize_cont(struct cont_t **, size_t);
extern struct cont_t *init_cont(size_t sizeof_elem) {
  struct cont_t *coll = NULL;
  resize_cont(&coll, sizeof_elem);
  return coll;
}


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

x86 assembly (clang, -O2):
<init_cont>:
push   %rax
mov    %rdi,%rsi
movq   $0x0,(%rsp)
mov    %rsp,%rdi
call   1030 <resize_cont@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.cont_t = type { i32 }
define %struct.cont_t* @init_cont(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.cont_t*
store i64 %0, i64* %2
store %struct.cont_t* null, %struct.cont_t** %3
%4 = load i64, i64* %2
%5 = call i32 @resize_cont(%struct.cont_t** %3, i64 %4)
%6 = load %struct.cont_t*, %struct.cont_t** %3
ret %struct.cont_t* %6
}

LLVM IR (-O2):
%struct.cont_t = type { i32 }
define %struct.cont_t* @init_cont(i64 %0) {
%2 = alloca %struct.cont_t*
%3 = bitcast %struct.cont_t** %2 to i8*
store %struct.cont_t* null, %struct.cont_t** %2
%4 = call i32 @resize_cont(%struct.cont_t** %2, i64 %0)
%5 = load %struct.cont_t*, %struct.cont_t** %2
ret %struct.cont_t* %5
}
/* Type definitions */
struct uwsgi_buffer {
  int dummy;
};

/* Variables and functions */
scalar_t__ uwsgi_buffer_append(struct uwsgi_buffer *, char *, int);
int uwsgi_webdav_multistatus_prop_new(struct uwsgi_buffer *ub) {
  if (uwsgi_buffer_append(ub, "<D:prop>\n", 9))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<uwsgi_webdav_multistatus_prop_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x9,%edx
call   1030 <uwsgi_buffer_append@plt>
cmp    $0x0,%rax
je     1147 <uwsgi_webdav_multistatus_prop_new+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <uwsgi_webdav_multistatus_prop_new+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_webdav_multistatus_prop_new>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x9,%edx
call   1030 <uwsgi_buffer_append@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.uwsgi_buffer = type { i32 }
@.str = [10 x i8] c"<D:prop>\0A\00"
define i32 @uwsgi_webdav_multistatus_prop_new(%struct.uwsgi_buffer* %0) {
%2 = alloca i32
%3 = alloca %struct.uwsgi_buffer*
store %struct.uwsgi_buffer* %0, %struct.uwsgi_buffer** %3
%4 = load %struct.uwsgi_buffer*, %struct.uwsgi_buffer** %3
%5 = call i64 @uwsgi_buffer_append(%struct.uwsgi_buffer* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%6 = icmp ne i64 %5, 0
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):
%struct.uwsgi_buffer = type { i32 }
@.str = [10 x i8] c"<D:prop>\0A\00"
define i32 @uwsgi_webdav_multistatus_prop_new(%struct.uwsgi_buffer* %0) {
%2 = tail call i64 @uwsgi_buffer_append(%struct.uwsgi_buffer* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = icmp ne i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
extern int _unlink(const char *path) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_unlink(i8* nocapture readnone %0) {
ret i32 -1
}
void SensorSetMode_Test(unsigned char val) {}


x86 assembly (clang, -O0):
<SensorSetMode_Test>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SensorSetMode_Test(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cstrcpy(char *, char *, int);
scalar_t__ memalloc(int);
int strlen(char *);
char *cstrdup(char *s) {
  char *p;
  int len;
  if (s == NULL)
    return NULL;
  len = strlen(s) + 1;
  if ((p = (char *)memalloc(len)) == NULL)
    return NULL;
  cstrcpy(p, s, len);
  return p;
}


x86 assembly (clang, -O0):
<cstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <cstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    119e <cstrdup+0x6e>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <memalloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1186 <cstrdup+0x56>
movq   $0x0,-0x8(%rbp)
jmp    119e <cstrdup+0x6e>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <cstrcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstrdup>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     1164 <cstrdup+0x34>
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1030 <memalloc@plt>
test   %rax,%rax
je     1164 <cstrdup+0x34>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <cstrcpy@plt>
jmp    1166 <cstrdup+0x36>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @cstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* null, i8** %2
br label %24
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %11, 1
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i64 @memalloc(i32 %13)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %4
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %18
17: ; preds = %9
store i8* null, i8** %2
br label %24
18: ; preds = %9
%19 = load i8*, i8** %4
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = call i32 @cstrcpy(i8* %19, i8* %20, i32 %21)
%23 = load i8*, i8** %4
store i8* %23, i8** %2
br label %24
24: ; preds = %18, %17, %8
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
define i8* @cstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @memalloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i64 %6, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @cstrcpy(i8* %7, i8* %0, i32 %5)
br label %11
11: ; preds = %3, %1, %9
%12 = phi i8* [ %7, %9 ], [ null, %1 ], [ null, %3 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ cput_nibble(int);
void cput_hex_byte(int n) {
  cput_nibble(n >> 4);
  cput_nibble(n);
}


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

x86 assembly (clang, -O2):
<cput_hex_byte>:
push   %rbx
mov    %edi,%ebx
sar    $0x4,%edi
call   1030 <cput_nibble@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <cput_nibble@plt>

LLVM IR (-O0):
define void @cput_hex_byte(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = call i32 @cput_nibble(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @cput_nibble(i32 %6)
ret void
}

LLVM IR (-O2):
define void @cput_hex_byte(i32 %0) {
%2 = ashr i32 %0, 4
%3 = tail call i32 @cput_nibble(i32 %2)
%4 = tail call i32 @cput_nibble(i32 %0)
ret void
}
/* Variables and functions */
int round(double);
int rnd(double a) { return round(a); }


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

x86 assembly (clang, -O2):
<rnd>:
jmp    1030 <round@plt>

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

LLVM IR (-O2):
define i32 @rnd(double %0) {
%2 = tail call i32 @round(double %0)
ret i32 %2
}
/* Variables and functions */
int WIFSIGNALED(int);
int wifsignaled(int status) { return WIFSIGNALED(status); }


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

x86 assembly (clang, -O2):
<wifsignaled>:
jmp    1030 <WIFSIGNALED@plt>

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

LLVM IR (-O2):
define i32 @wifsignaled(i32 %0) {
%2 = tail call i32 @WIFSIGNALED(i32 %0)
ret i32 %2
}