xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t CRYPTOIntStatus(bool bMasked) {
  uint32_t ui32Mask;
  if (bMasked) {
    ui32Mask = (*((volatile unsigned long *)(0x40024000 + 0x00000784)));
    return (ui32Mask &
            (*((volatile unsigned long *)(0x40024000 + 0x00000790))));
  } else {
    return ((*((volatile unsigned long *)(0x40024000 + 0x00000790))) &
            0x00000003);
  }
}


x86 assembly (clang, -O0):
<CRYPTOIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <CRYPTOIntStatus+0x35>
mov    $0x40024784,%eax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x40024790,%ecx
mov    (%rcx),%rcx
and    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1145 <CRYPTOIntStatus+0x45>
mov    $0x40024790,%eax
mov    (%rax),%rax
and    $0x3,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTOIntStatus>:
test   %edi,%edi
je     111f <CRYPTOIntStatus+0x1f>
mov    0x40024784,%rax
40
mov    %rax,-0x8(%rsp)
mov    -0x8(%rsp),%rax
and    0x40024790,%rax
40
ret
mov    $0x3,%eax
and    0x40024790,%rax
40
ret

LLVM IR (-O0):
define i64 @CRYPTOIntStatus(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
store volatile i64 %8, i64* %4
%9 = load volatile i64, i64* %4
%10 = load volatile i64, i64* inttoptr (i64 1073891216 to i64*)
%11 = and i64 %9, %10
store i64 %11, i64* %2
br label %15
12: ; preds = %1
%13 = load volatile i64, i64* inttoptr (i64 1073891216 to i64*)
%14 = and i64 %13, 3
store i64 %14, i64* %2
br label %15
15: ; preds = %12, %7
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
define i64 @CRYPTOIntStatus(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 1073891204 to i64*)
store volatile i64 %6, i64* %2
%7 = load volatile i64, i64* %2
br label %8
8: ; preds = %1, %5
%9 = phi i64 [ %7, %5 ], [ 3, %1 ]
%10 = load volatile i64, i64* inttoptr (i64 1073891216 to i64*)
%11 = and i64 %10, %9
ret i64 %11
}
/* Variables and functions */
char *strchr(const char *s, int c) {
  const char *cur;
  for (cur = s; *cur; cur++) {
    if (*cur == c) {
      return ((char *)cur);
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <strchr+0x53>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113d <strchr+0x3d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <strchr+0x5b>
jmp    1142 <strchr+0x42>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1113 <strchr+0x13>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
mov    %rdi,%rax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = icmp eq i32 %8, %1
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
void __attribute__((cdecl)) foo12(d) short d;
{}


x86 assembly (clang, -O0):
<foo12>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo12(i32 %0) {
%2 = alloca i16
%3 = trunc i32 %0 to i16
store i16 %3, i16* %2
ret void
}

LLVM IR (-O2):
define void @foo12(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PathPlanHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void PathPlanLogging() { UAVObjLogging(PathPlanHandle()); }


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

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

LLVM IR (-O0):
define void @PathPlanLogging() {
%1 = call i32 (...) @PathPlanHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @PathPlanLogging() {
%1 = tail call i32 (...) @PathPlanHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
char *strcat(char *restrict whither, const char *restrict whence) {
  strcpy(whither + strlen(whither), whence);
  return whither;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @strcat(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @strcat(i8* noalias returned %0, i8* noalias %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret i8* %0
}
/* Variables and functions */
int thTryLockMutex(void *);
int thTryLockFastMutex(void *p) { return (thTryLockMutex(p)); }


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

x86 assembly (clang, -O2):
<thTryLockFastMutex>:
jmp    1030 <thTryLockMutex@plt>

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

LLVM IR (-O2):
define i32 @thTryLockFastMutex(i8* %0) {
%2 = tail call i32 @thTryLockMutex(i8* %0)
ret i32 %2
}
void TLBHandler() {}


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

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

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

LLVM IR (-O2):
define void @TLBHandler() {
ret void
}
/* Variables and functions */
void *getbytes(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *copybytes(void *src, size_t nbytes) {
  void *ret;
  ret = getbytes(nbytes);
  if (nbytes)
    memcpy(ret, src, nbytes);
  return (ret);
}


x86 assembly (clang, -O0):
<copybytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getbytes@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <copybytes+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copybytes>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <getbytes@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1149 <copybytes+0x29>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @copybytes(i8* %0, i64 %1) {
%3 = tail call i8* @getbytes(i64 %1)
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_to_bytes(uintptr_t, uintptr_t);
void fiat_25519_to_bytes(uint8_t out1[32], const uint32_t arg1[10]) {
  internal_fiat_25519_to_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_25519_to_bytes>:
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 <internal_fiat_25519_to_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_25519_to_bytes>:
jmp    1030 <internal_fiat_25519_to_bytes@plt>

LLVM IR (-O0):
define void @fiat_25519_to_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_to_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_to_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_to_bytes(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bfin_cli();
void raw_local_irq_disable(void) { bfin_cli(); }


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

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

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

LLVM IR (-O2):
define void @raw_local_irq_disable() {
%1 = tail call i32 (...) @bfin_cli()
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
void init_stack(struct node *head) { head = NULL; }


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

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

LLVM IR (-O0):
%struct.node = type { i32 }
define void @init_stack(%struct.node* %0) {
%2 = alloca %struct.node*
store %struct.node* %0, %struct.node** %2
store %struct.node* null, %struct.node** %2
ret void
}

LLVM IR (-O2):
%struct.node = type { i32 }
define void @init_stack(%struct.node* nocapture %0) {
ret void
}
void ff_hevc_put_hevc_bi_pel_pixels6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels6_8_sse4() {
ret void
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ member_0;
};
struct sembuf {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int semtimedop(int, struct sembuf *, size_t, struct timespec *);
int main(void) {
  int semid = 0;
  struct sembuf ops = {0};
  size_t nsops = 1;
  struct timespec timeout = {0};
  return semtimedop(semid, &ops, nsops, &timeout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movq   $0x1,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rcx
call   1040 <semtimedop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    $0x1,%edx
xor    %edi,%edi
call   1030 <semtimedop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32 }
%struct.timespec = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.sembuf
%4 = alloca i64
%5 = alloca %struct.timespec
store i32 0, i32* %1
store i32 0, i32* %2
%6 = bitcast %struct.sembuf* %3 to i8*
store i64 1, i64* %4
%7 = bitcast %struct.timespec* %5 to i8*
%8 = load i32, i32* %2
%9 = load i64, i64* %4
%10 = call i32 @semtimedop(i32 %8, %struct.sembuf* %3, i64 %9, %struct.timespec* %5)
ret i32 %10
}

LLVM IR (-O2):
%struct.sembuf = type { i32 }
%struct.timespec = type { i32 }
define i32 @main() {
%1 = alloca %struct.sembuf
%2 = alloca %struct.timespec
%3 = bitcast %struct.sembuf* %1 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %1, i64 0, i32 0
store i32 0, i32* %4
%5 = bitcast %struct.timespec* %2 to i8*
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 0, i32* %6
%7 = call i32 @semtimedop(i32 0, %struct.sembuf* %1, i64 1, %struct.timespec* %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
p_bye() { printf("bye\n"); }


x86 assembly (clang, -O0):
<p_bye>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [4 x i8] c"bye\00"
define i32 @p_bye() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int getNumWords() {
  int numWords;
  printf("How many words will you enter?\n> ");
  scanf("%d", &numWords);
  return numWords;
}


x86 assembly (clang, -O0):
<getNumWords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumWords>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"How many words will you enter?\0A> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getNumWords() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [34 x i8] c"How many words will you enter?\0A> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @getNumWords() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
long int __isnormalf(float x) {
  unsigned long int iexp;
  union {
    unsigned long int lval;
    float fval;
  } z;
  z.fval = x;
  iexp = z.lval & 0x7f800000;
  return ((iexp != 0x7f800000) && (iexp != 0));
}


x86 assembly (clang, -O0):
<__isnormalf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x7f800000,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x7f800000,-0x10(%rbp)
7f
mov    %al,-0x19(%rbp)
je     113f <__isnormalf+0x3f>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isnormalf>:
movd   %xmm0,%eax
and    $0x7f800000,%eax
cmp    $0x7f800000,%eax
setne  %cl
test   %eax,%eax
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define i64 @__isnormalf(float %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca %union.anon
store float %0, float* %2
%5 = load float, float* %2
%6 = bitcast %union.anon* %4 to float*
store float %5, float* %6
%7 = bitcast %union.anon* %4 to i64*
%8 = load i64, i64* %7
%9 = and i64 %8, 2139095040
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = icmp ne i64 %10, 2139095040
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %12, %1
%16 = phi i1 [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = sext i32 %17 to i64
ret i64 %18
}

LLVM IR (-O2):
define i64 @__isnormalf(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2139095040
%4 = icmp ne i32 %3, 2139095040
%5 = icmp ne i32 %3, 0
%6 = and i1 %4, %5
%7 = zext i1 %6 to i64
ret i64 %7
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void reflect(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 180)) {
    add_status(target, 25);
  }
}


x86 assembly (clang, -O0):
<reflect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xb4,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <reflect+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x19,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reflect>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xb4,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <reflect+0x41>
mov    %r14,%rdi
mov    $0x19,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @reflect(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 180)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 25)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @reflect(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 180)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 25)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_62() {
  Assert_real((isqrt(62) == 7),
              "/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/stdlib/isqrt.c",
              315, ("Integer square root of 62 should be 7"));
}


x86 assembly (clang, -O0):
<t_sqrt_62>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e,%edi
call   1030 <isqrt@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x13b,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_62>:
push   %rax
mov    $0x3e,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x13b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 62 should be 7\00"
define void @t_sqrt_62() {
%1 = call i32 @isqrt(i32 62)
%2 = icmp eq i32 %1, 7
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 62 should be 7\00"
define void @t_sqrt_62() {
%1 = tail call i32 @isqrt(i32 62)
%2 = icmp eq i32 %1, 7
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
extern void nc_ignorefpe(int doit) {
  if (doit)
    (void)signal(SIGFPE, SIG_IGN);
}


x86 assembly (clang, -O0):
<nc_ignorefpe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <nc_ignorefpe+0x2c>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_ignorefpe>:
test   %edi,%edi
je     112b <nc_ignorefpe+0x1b>
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
jmp    1030 <signal@plt>
ret

LLVM IR (-O0):
@SIGFPE = global i32 0
@SIG_IGN = global i32 0
define void @nc_ignorefpe(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 %5, label %9
5: ; preds = %1
%6 = load i32, i32* @SIGFPE
%7 = load i32, i32* @SIG_IGN
%8 = call i32 @signal(i32 %6, i32 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@SIGFPE = global i32 0
@SIG_IGN = global i32 0
define void @nc_ignorefpe(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i32, i32* @SIGFPE
%5 = load i32, i32* @SIG_IGN
%6 = tail call i32 @signal(i32 %4, i32 %5)
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR3D_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR3D_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR3D_swap(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 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR3D_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int read_byte(int);
int /*<<< orphan*/ write_byte(int, int);
void set_bits(uint8_t addr, uint8_t mask) {
  write_byte(addr, read_byte(addr) | mask);
}


x86 assembly (clang, -O0):
<set_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <read_byte@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
or     -0x8(%rbp),%esi
call   1040 <write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bits>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <read_byte@plt>
or     %eax,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <write_byte@plt>

LLVM IR (-O0):
define void @set_bits(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* %3
%7 = call i32 @read_byte(i32 %6)
%8 = load i32, i32* %4
%9 = or i32 %7, %8
%10 = call i32 @write_byte(i32 %5, i32 %9)
ret void
}

LLVM IR (-O2):
define void @set_bits(i32 %0, i32 %1) {
%3 = tail call i32 @read_byte(i32 %0)
%4 = or i32 %3, %1
%5 = tail call i32 @write_byte(i32 %0, i32 %4)
ret void
}
unsigned int __atomic_load_4(const volatile void *atom, int memorder) {
  return *(volatile unsigned int *)atom;
}


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

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

LLVM IR (-O0):
define i32 @__atomic_load_4(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 = bitcast i8* %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @__atomic_load_4(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load volatile i32, i32* %3
ret i32 %4
}
int fun1350() { return 1350; }


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

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

LLVM IR (-O0):
define i32 @fun1350() {
ret i32 1350
}

LLVM IR (-O2):
define i32 @fun1350() {
ret i32 1350
}
void rop3_214_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T & S;
  stk3 = *D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_214_0_0>:
mov    %edx,%eax
and    %sil,%al
or     (%rdi),%al
xor    %sil,%dl
xor    %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_214_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %10
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %6
%31 = zext i8 %30 to i32
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = xor i32 %31, %33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = load i8*, i8** %4
store i8 %36, i8* %37
ret void
}

LLVM IR (-O2):
define void @rop3_214_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %2, %1
%8 = xor i8 %7, %6
store i8 %8, i8* %0
ret void
}
int isalph(c)
char c;
{
  return (c >= 'A' && c <= '~') || c == '!' || c == '&' || c == '.' ||
         c == ':' || c == '?';
}


x86 assembly (clang, -O0):
<isalph>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <isalph+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7e,%ecx
mov    %al,-0x2(%rbp)
jle    117e <isalph+0x7e>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x21,%ecx
mov    %al,-0x2(%rbp)
je     117e <isalph+0x7e>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x26,%ecx
mov    %al,-0x2(%rbp)
je     117e <isalph+0x7e>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     117e <isalph+0x7e>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x2(%rbp)
je     117e <isalph+0x7e>
movsbl -0x1(%rbp),%eax
cmp    $0x3f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalph>:
mov    %edi,%eax
shl    $0x18,%eax
cmp    $0x40000001,%eax
setge  %cl
cmp    $0x7f000000,%eax
setne  %dl
and    %cl,%dl
cmp    $0x21000000,%eax
sete   %sil
and    $0xf7,%edi
cmp    $0x26,%edi
sete   %cl
or     %sil,%cl
or     %dl,%cl
cmp    $0x3a000000,%eax
sete   %dl
cmp    $0x3f000000,%eax
sete   %al
or     %dl,%al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isalph(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 126
br i1 %10, label %31, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 33
br i1 %14, label %31, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 38
br i1 %18, label %31, label %19
19: ; preds = %15
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 46
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %2
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 58
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 63
br label %31
31: ; preds = %27, %23, %19, %15, %11, %7
%32 = phi i1 [ true, %23 ], [ true, %19 ], [ true, %15 ], [ true, %11 ], [ true, %7 ], [ %30, %27 ]
%33 = zext i1 %32 to i32
ret i32 %33
}

LLVM IR (-O2):
define i32 @isalph(i32 %0) {
%2 = shl i32 %0, 24
%3 = icmp sgt i32 %2, 1073741824
%4 = icmp ne i32 %2, 2130706432
%5 = and i1 %3, %4
%6 = icmp eq i32 %2, 553648128
%7 = or i1 %6, %5
%8 = and i32 %0, 247
%9 = icmp eq i32 %8, 38
%10 = or i1 %9, %7
%11 = icmp eq i32 %2, 973078528
%12 = or i1 %11, %10
%13 = icmp eq i32 %2, 1056964608
%14 = or i1 %13, %12
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
void I_EndRead(void) {}


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

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

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

LLVM IR (-O2):
define void @I_EndRead() {
ret void
}
double multiply_doubles(double a, double b) { return a * b; }


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

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

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

LLVM IR (-O2):
define double @multiply_doubles(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Type definitions */
typedef scalar_t__ time_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void log_time(FILE *fp, time_t request_time) {
  fprintf(fp, "%d\n", (int)request_time);
}


x86 assembly (clang, -O0):
<log_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_time>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @log_time(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @log_time(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int sasl_mutex_unlock(void *mutex __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sasl_mutex_unlock(i8* nocapture readnone %0) {
ret i32 0
}
__attribute__((no_sanitize("integer"))) unsigned char
blacklist_1(unsigned int src) {
  return src;
}


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

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

LLVM IR (-O0):
define zeroext i8 @blacklist_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @blacklist_1(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t a52e_get_lfeon(const uint8_t *p_a52) { return p_a52[4] & 0x1; }


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

x86 assembly (clang, -O2):
<a52e_get_lfeon>:
mov    0x10(%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @a52e_get_lfeon(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = and i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @a52e_get_lfeon(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ obter_string(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char nome[255];
  obter_string(nome, 255);
  printf("string lida: %s\n", nome);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0xff,%esi
call   1040 <obter_string@plt>
lea    -0x110(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1040 <obter_string@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"string lida: %s\0A\00"
define i32 @main() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @obter_string(i8* %2, i32 255)
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() { foo(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exibeNumero(int);
int /*<<< orphan*/ setup();
int /*<<< orphan*/ setupLCD();
int main() {
  int contador = 0;
  setup();
  setupLCD();
  while (1 == 1) {
    exibeNumero(contador);
    contador++;
    if (contador > 9999)
      contador = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <setup@plt>
mov    $0x0,%al
call   1040 <setupLCD@plt>
mov    -0x8(%rbp),%edi
call   1030 <exibeNumero@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x270f,-0x8(%rbp)
jle    1179 <main+0x49>
movl   $0x0,-0x8(%rbp)
jmp    1154 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <setup@plt>
xor    %eax,%eax
call   1040 <setupLCD@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <exibeNumero@plt>
cmp    $0x270f,%ebx
lea    0x1(%rbx),%eax
cmovge %ebp,%eax
mov    %eax,%ebx
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @setupLCD()
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 0, %0 ], [ %8, %3 ]
%5 = tail call i32 @exibeNumero(i32 %4)
%6 = add nsw i32 %4, 1
%7 = icmp sgt i32 %4, 9998
%8 = select i1 %7, i32 0, i32 %6
br label %3
}
void emit_to_target() {}


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

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

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

LLVM IR (-O2):
define void @emit_to_target() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error_msg(char *, char const *);
int /*<<< orphan*/ exit(int);
void out_of_memory(const char *prefix) {
  error_msg("%s: *out of memory*\n", prefix);
  exit(-2);
}


x86 assembly (clang, -O0):
<out_of_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <error_msg@plt>
mov    $0xfffffffe,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<out_of_memory>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <error_msg@plt>
mov    $0xfffffffe,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%s: *out of memory*\0A\00"
define void @out_of_memory(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error_msg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -2)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s: *out of memory*\0A\00"
define void @out_of_memory(i8* %0) {
%2 = tail call i32 @error_msg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -2)
unreachable
}
void J422ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @J422ToABGR() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int get_current_time(struct tm *tmptr) {
  time_t t = time(NULL);
  *tmptr = *gmtime(&t);
  if (tmptr == NULL)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <gmtime@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    (%rcx),%ecx
mov    %ecx,(%rax)
cmpq   $0x0,-0x10(%rbp)
jne    116b <get_current_time+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <get_current_time+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <gmtime@plt>
mov    (%rax),%eax
mov    %eax,(%rbx)
cmp    $0x1,%rbx
sbb    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @get_current_time(%struct.tm* %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
%4 = alloca i32
store %struct.tm* %0, %struct.tm** %3
%5 = call i32 @time(i32* null)
store i32 %5, i32* %4
%6 = load %struct.tm*, %struct.tm** %3
%7 = call %struct.tm* @gmtime(i32* %4)
%8 = bitcast %struct.tm* %6 to i8*
%9 = bitcast %struct.tm* %7 to i8*
%10 = load %struct.tm*, %struct.tm** %3
%11 = icmp eq %struct.tm* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @get_current_time(%struct.tm* writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @gmtime(i32* %2)
%6 = getelementptr %struct.tm, %struct.tm* %5, i64 0, i32 0
%7 = getelementptr %struct.tm, %struct.tm* %0, i64 0, i32 0
%8 = load i32, i32* %6
store i32 %8, i32* %7
%9 = icmp eq %struct.tm* %0, null
%10 = sext i1 %9 to i32
ret i32 %10
}
int mDB_close(fn) { return mDBi_msg('C', fn, 0, 0, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<mDB_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x43,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
mov    $0x0,%al
call   1030 <mDBi_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDB_close>:
push   %rax
mov    %edi,%esi
mov    $0x43,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   $0x0
push   $0x0
call   1030 <mDBi_msg@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mDB_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 67, i32 %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
ret i32 %4
}

LLVM IR (-O2):
define i32 @mDB_close(i32 %0) {
%2 = tail call i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @mDBi_msg to i32 (i32, i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 67, i32 %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
ret i32 %2
}