xunge/DecIR huggingface dataset:
void lgtd_lifx_wire_decode_header(struct lgtd_lifx_packet_header *hdr) {
  (void)hdr;
}


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

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

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

LLVM IR (-O2):
%struct.lgtd_lifx_packet_header = type opaque
define void @lgtd_lifx_wire_decode_header(%struct.lgtd_lifx_packet_header* nocapture %0) {
ret void
}
void isr_usagefault(void) {
  while (1)
    ;
  ;
}


x86 assembly (clang, -O0):
<isr_usagefault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <isr_usagefault+0x9>
jmp    1109 <isr_usagefault+0x9>

x86 assembly (clang, -O2):
<isr_usagefault>:
jmp    1100 <isr_usagefault>

LLVM IR (-O0):
define void @isr_usagefault() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @isr_usagefault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int *);
int *functA(int elem) {
  int i = elem;
  printf("i: %d, &i:%p\n", i, &i);
  i++;
  printf("i: %d, &i:%p\n", i, &i);
  return &i;
}


x86 assembly (clang, -O0):
<functA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rdx
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rdx
call   1030 <printf@plt>
lea    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<functA>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%esi
mov    %edi,0x4(%rsp)
lea    0xedf(%rip),%r14
lea    0x4(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
add    $0x1,%esi
mov    %esi,0x4(%rsp)
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"i: %d, &i:%p\0A\00"
define i32* @functA(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32* %3)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32* %3)
ret i32* %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"i: %d, &i:%p\0A\00"
define i32* @functA(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32* %2)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i32* %2)
ret i32* %2
}
void lckResourceHandleInstanceDestructor(void *instance) {}


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

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

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

LLVM IR (-O2):
define void @lckResourceHandleInstanceDestructor(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Jump_If_Equal(char *label) { Inst_Printf("beqz", "$12,%s", label); }


x86 assembly (clang, -O0):
<Jump_If_Equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump_If_Equal>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee4(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"beqz\00"
@.str.1 = [7 x i8] c"$12,%s\00"
define void @Jump_If_Equal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"beqz\00"
@.str.1 = [7 x i8] c"$12,%s\00"
define void @Jump_If_Equal(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct evbuffer {
  int dummy;
};
struct bufferevent {
  int dummy;
};

/* Variables and functions */
struct evbuffer *bufferevent_get_input(struct bufferevent *bufev) {
  (void)bufev;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.evbuffer = type { i32 }
%struct.bufferevent = type { i32 }
define %struct.evbuffer* @bufferevent_get_input(%struct.bufferevent* %0) {
%2 = alloca %struct.bufferevent*
store %struct.bufferevent* %0, %struct.bufferevent** %2
%3 = load %struct.bufferevent*, %struct.bufferevent** %2
ret %struct.evbuffer* null
}

LLVM IR (-O2):
%struct.evbuffer = type { i32 }
%struct.bufferevent = type { i32 }
define noalias %struct.evbuffer* @bufferevent_get_input(%struct.bufferevent* nocapture readnone %0) {
ret %struct.evbuffer* null
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_int_val();
main() {
  int x = __VERIFIER_nondet_int_val();
  int *p = &x;
  while (x < 100) {
    (*p)++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int_val@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    114b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1131 <main+0x21>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int_val()
ret i32 0
}
/* Type definitions */
struct blob_attr {
  int dummy;
};
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ blob_get_u16(struct blob_attr const *);
int16_t blob_get_int16(const struct blob_attr *attr) {
  return blob_get_u16(attr);
}


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

x86 assembly (clang, -O2):
<blob_get_int16>:
jmp    1030 <blob_get_u16@plt>

LLVM IR (-O0):
%struct.blob_attr = type { i32 }
define i32 @blob_get_int16(%struct.blob_attr* %0) {
%2 = alloca %struct.blob_attr*
store %struct.blob_attr* %0, %struct.blob_attr** %2
%3 = load %struct.blob_attr*, %struct.blob_attr** %2
%4 = call i32 @blob_get_u16(%struct.blob_attr* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.blob_attr = type { i32 }
define i32 @blob_get_int16(%struct.blob_attr* %0) {
%2 = tail call i32 @blob_get_u16(%struct.blob_attr* %0)
ret i32 %2
}
unsigned int fbit_pend(unsigned int num) {
  int i;
  i = 0;
  do {
    if ((num & 0x1) == 0x1)
      break;
    num = num >> 1;
    i++;
  } while (num);
  return i;
}


x86 assembly (clang, -O0):
<fbit_pend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1122 <fbit_pend+0x22>
jmp    113e <fbit_pend+0x3e>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    110e <fbit_pend+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbit_pend>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   $0x1,%dil
jne    1124 <fbit_pend+0x24>
mov    %edi,%ecx
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <fbit_pend+0x10>
ret

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

LLVM IR (-O2):
define i32 @fbit_pend(i32 %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ %0, %1 ], [ %8, %7 ]
%4 = phi i32 [ 0, %1 ], [ %9, %7 ]
%5 = and i32 %3, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = lshr i32 %3, 1
%9 = add nuw nsw i32 %4, 1
%10 = icmp ult i32 %3, 2
br i1 %10, label %11, label %2
11: ; preds = %2, %7
%12 = phi i32 [ %4, %2 ], [ %9, %7 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_DETACH;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void ptrace_detach(pid_t target) {
  if (ptrace(PTRACE_DETACH, target, NULL, NULL) == -1) {
    fprintf(stderr, "ptrace(PTRACE_DETACH) failed\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<ptrace_detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1040 <ptrace@plt>
cmp    $0xffffffff,%eax
jne    117b <ptrace_detach+0x4b>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrace_detach>:
push   %rax
mov    %edi,%esi
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <ptrace@plt>
cmp    $0xffffffff,%eax
je     114c <ptrace_detach+0x1c>
pop    %rax
ret
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@PTRACE_DETACH = global i32 0
@stderr = global i32 0
@.str = [30 x i8] c"ptrace(PTRACE_DETACH) failed\0A\00"
define void @ptrace_detach(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @PTRACE_DETACH
%4 = load i32, i32* %2
%5 = call i32 @ptrace(i32 %3, i32 %4, i32* null, i32* null)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@PTRACE_DETACH = global i32 0
@stderr = global i32 0
@.str = [30 x i8] c"ptrace(PTRACE_DETACH) failed\0A\00"
define void @ptrace_detach(i32 %0) {
%2 = load i32, i32* @PTRACE_DETACH
%3 = tail call i32 @ptrace(i32 %2, i32 %0, i32* null, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}
int toggle(int player) {
  if (player == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<toggle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <toggle+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <toggle+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @toggle(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void compute_add_sources_ac_cuda_(long *Mesh_pointer, int *phase_is_innerf,
                                  int *NSOURCESf, double *h_stf_pre_compute) {}


x86 assembly (clang, -O0):
<compute_add_sources_ac_cuda_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @compute_add_sources_ac_cuda_(i64* %0, i32* %1, i32* %2, double* %3) {
%5 = alloca i64*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
store i64* %0, i64** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store double* %3, double** %8
ret void
}

LLVM IR (-O2):
define void @compute_add_sources_ac_cuda_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2, double* nocapture %3) {
ret void
}
/* Variables and functions */
int __simc(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int simc_argv_size(void) { return __simc(1001, 0, 0, 0); }


x86 assembly (clang, -O0):
<simc_argv_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e9,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <__simc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<simc_argv_size>:
mov    $0x3e9,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__simc@plt>

LLVM IR (-O0):
define i32 @simc_argv_size() {
%1 = call i32 @__simc(i32 1001, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @simc_argv_size() {
%1 = tail call i32 @__simc(i32 1001, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
unsigned int vabsdiffu4(unsigned int, unsigned int);
unsigned int vsadu4(unsigned int a, unsigned int b) {
  unsigned int r, s;
  r = vabsdiffu4(a, b);
  s = r >> 8;
  r = (r & 0x00ff00ff) + (s & 0x00ff00ff);
  r = ((r << 16) + r) >> 16;
  return r;
}


x86 assembly (clang, -O0):
<vsadu4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <vabsdiffu4@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff00ff,%eax
mov    -0x10(%rbp),%ecx
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
add    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsadu4>:
push   %rax
call   1030 <vabsdiffu4@plt>
mov    %eax,%ecx
shr    $0x8,%ecx
and    $0xff00ff,%eax
and    $0xff00ff,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
shr    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vsadu4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @vabsdiffu4(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = lshr i32 %10, 8
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = and i32 %12, 16711935
%14 = load i32, i32* %6
%15 = and i32 %14, 16711935
%16 = add i32 %13, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = shl i32 %17, 16
%19 = load i32, i32* %5
%20 = add i32 %18, %19
%21 = lshr i32 %20, 16
store i32 %21, i32* %5
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @vsadu4(i32 %0, i32 %1) {
%3 = tail call i32 @vabsdiffu4(i32 %0, i32 %1)
%4 = lshr i32 %3, 8
%5 = and i32 %3, 16711935
%6 = and i32 %4, 16711935
%7 = add nuw nsw i32 %6, %5
%8 = mul i32 %7, 65537
%9 = lshr i32 %8, 16
ret i32 %9
}
long int clamp_z(long int x) {
  if (x < 0)
    x = 0;
  else if (x >= (long int)0x40000000)
    x = (long int)0x40000000 - 1;
  return (x >> (30 - 28));
}


x86 assembly (clang, -O0):
<clamp_z>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1120 <clamp_z+0x20>
movq   $0x0,-0x8(%rbp)
jmp    113b <clamp_z+0x3b>
cmpq   $0x40000000,-0x8(%rbp)
40
jl     1136 <clamp_z+0x36>
movq   $0x3fffffff,-0x8(%rbp)
3f
jmp    113b <clamp_z+0x3b>
mov    -0x8(%rbp),%rax
sar    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_z>:
cmp    $0x3fffffff,%rdi
mov    $0x3fffffff,%ecx
cmovl  %rdi,%rcx
sar    $0x2,%rcx
xor    %eax,%eax
test   %rdi,%rdi
cmovns %rcx,%rax
ret

LLVM IR (-O0):
define i64 @clamp_z(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 0, i64* %2
br label %11
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp sge i64 %7, 1073741824
br i1 %8, label %9, label %10
9: ; preds = %6
store i64 1073741823, i64* %2
br label %10
10: ; preds = %9, %6
br label %11
11: ; preds = %10, %5
%12 = load i64, i64* %2
%13 = ashr i64 %12, 2
ret i64 %13
}

LLVM IR (-O2):
define i64 @clamp_z(i64 %0) {
%2 = icmp slt i64 %0, 0
%3 = icmp slt i64 %0, 1073741823
%4 = select i1 %3, i64 %0, i64 1073741823
%5 = ashr i64 %4, 2
%6 = select i1 %2, i64 0, i64 %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ USE(void *);
void USE2(void *a, void *b) {
  USE(a);
  USE(b);
}


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

x86 assembly (clang, -O2):
<USE2>:
push   %rbx
mov    %rsi,%rbx
call   1030 <USE@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <USE@plt>

LLVM IR (-O0):
define void @USE2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @USE(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @USE(i8* %7)
ret void
}

LLVM IR (-O2):
define void @USE2(i8* %0, i8* %1) {
%3 = tail call i32 @USE(i8* %0)
%4 = tail call i32 @USE(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
int reverse(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  printf("Enter a number: ");
  scanf("%d", &a);
  printf("Reverse of %d is %d", a, reverse(a));
  getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <reverse@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <reverse@plt>
lea    0xe9b(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Reverse of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 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* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @reverse(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
%9 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Reverse of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 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
%6 = call i32 @reverse(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 (...) @getch()
ret i32 0
}
int outer(int x, int y) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @outer(i32 %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void water_forward(void) {
  gpio_set(20, 1);
  gpio_set(21, 0);
}


x86 assembly (clang, -O0):
<water_forward>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x15,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<water_forward>:
push   %rax
mov    $0x14,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x15,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @water_forward() {
%1 = call i32 @gpio_set(i32 20, i32 1)
%2 = call i32 @gpio_set(i32 21, i32 0)
ret void
}

LLVM IR (-O2):
define void @water_forward() {
%1 = tail call i32 @gpio_set(i32 20, i32 1)
%2 = tail call i32 @gpio_set(i32 21, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xe7() {
  Assert_real((ispunct(231) == 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_ispunct.c",
              1160, ("ispunct should be 0 for 0xe7"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xe7>:
push   %rax
mov    $0xe7,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x488,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe7\00"
define void @t_ispunct_0xe7() {
%1 = call i64 @ispunct(i32 231)
%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 1160, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe7\00"
define void @t_ispunct_0xe7() {
%1 = tail call i64 @ispunct(i32 231)
%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 1160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
main(int argc, char **argv) {
  for (__typeof(0) i = 0; i < argc; i++)
    printf("argv[%d] = \"%s\"\n", i, argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1164 <main+0x54>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1149 <main+0x39>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xed7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"argv[%d] = \22%s\22\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"argv[%d] = \22%s\22\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret i32 0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i = 50;
  printf("Corresponding ASCII character from number 50 to 100\n");
  for (i; i <= 100; i++) {
    printf("%d is %C \n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x64,-0x8(%rbp)
jg     1160 <main+0x50>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x32,%ebx
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [53 x i8] c"Corresponding ASCII character from number 50 to 100\0A\00"
@.str.1 = [11 x i8] c"%d is %C \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 50, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %5
15: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"%d is %C \0A\00"
@str = [52 x i8] c"Corresponding ASCII character from number 50 to 100\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 50, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 101
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
void hmd_init() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTLogRelSetDefaultInstance() {
ret void
}
unsigned long long dynref__nmsgs(const struct dynref__obj *p) {}


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

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

LLVM IR (-O0):
%struct.dynref__obj = type opaque
define i64 @dynref__nmsgs(%struct.dynref__obj* %0) {
%2 = alloca i64
%3 = alloca %struct.dynref__obj*
store %struct.dynref__obj* %0, %struct.dynref__obj** %3
%4 = load i64, i64* %2
ret i64 %4
}

LLVM IR (-O2):
%struct.dynref__obj = type opaque
define i64 @dynref__nmsgs(%struct.dynref__obj* nocapture readnone %0) {
ret i64 undef
}
extern struct _TEB *__attribute__((__stdcall__)) NtCurrentTeb(void) {}


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

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

LLVM IR (-O0):
%struct._TEB = type opaque
define %struct._TEB* @NtCurrentTeb() {
%1 = alloca %struct._TEB*
%2 = load %struct._TEB*, %struct._TEB** %1
ret %struct._TEB* %2
}

LLVM IR (-O2):
%struct._TEB = type opaque
define noalias %struct._TEB* @NtCurrentTeb() {
ret %struct._TEB* undef
}
OP(fd, cc) { op_cc(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_cc()
ret i32 undef
}
void ble_rsp_system_reset(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @ble_rsp_system_reset(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int /*<<< orphan*/ __require_allocated_array(char const *);
int access(const char *path, int mode) {
  int success;
  __require_allocated_array(path);
  success = __infer_nondet_int();
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__require_allocated_array@plt>
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access>:
push   %rax
call   1040 <__require_allocated_array@plt>
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @access(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @__require_allocated_array(i8* %6)
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 -1
ret i32 %12
}

LLVM IR (-O2):
define i32 @access(i8* %0, i32 %1) {
%3 = tail call i32 @__require_allocated_array(i8* %0)
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = icmp slt i32 %4, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int sv_close_slot(int);
int vox_close_slot(int slot) { return sv_close_slot(slot); }


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

x86 assembly (clang, -O2):
<vox_close_slot>:
jmp    1030 <sv_close_slot@plt>

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

LLVM IR (-O2):
define i32 @vox_close_slot(i32 %0) {
%2 = tail call i32 @sv_close_slot(i32 %0)
ret i32 %2
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tprint_iov_upto(struct tcb *, unsigned long, unsigned long,
                                   int, unsigned long);
void tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr,
                int decode_iov) {
  tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long)-1L);
}


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

x86 assembly (clang, -O2):
<tprint_iov>:
mov    $0xffffffffffffffff,%r8
jmp    1030 <tprint_iov_upto@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
define void @tprint_iov(%struct.tcb* %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca %struct.tcb*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store %struct.tcb* %0, %struct.tcb** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load %struct.tcb*, %struct.tcb** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @tprint_iov_upto(%struct.tcb* %9, i64 %10, i64 %11, i32 %12, i64 -1)
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define void @tprint_iov(%struct.tcb* %0, i64 %1, i64 %2, i32 %3) {
%5 = tail call i32 @tprint_iov_upto(%struct.tcb* %0, i64 %1, i64 %2, i32 %3, i64 -1)
ret void
}
void ASN1_ENUMERATED_free(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_ENUMERATED_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errorAllocation(void) { error("Allocation failure"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Allocation failure\00"
define void @errorAllocation() {
%1 = call i32 @error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Allocation failure\00"
define void @errorAllocation() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
void join_minmax_with_sum_unsigned_Good(unsigned int x, unsigned int y) {
  char a[x + y + 1];
  int i = 0;
  while (i < x + y) {
    if (i > 5) {
      y = 0;
    }
    i++;
  }
  a[i] = 2;
}


x86 assembly (clang, -O0):
<join_minmax_with_sum_unsigned_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    %edx,%eax
lea    0x1(%rax,%rcx,1),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jae    1176 <join_minmax_with_sum_unsigned_Good+0x76>
cmpl   $0x5,-0x1c(%rbp)
jle    1168 <join_minmax_with_sum_unsigned_Good+0x68>
movl   $0x0,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1146 <join_minmax_with_sum_unsigned_Good+0x46>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x2,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @join_minmax_with_sum_unsigned_Good(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add i32 %8, %9
%11 = add i32 %10, 1
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %5
%14 = alloca i8, i64 %12
store i64 %12, i64* %6
store i32 0, i32* %7
br label %15
15: ; preds = %25, %2
%16 = load i32, i32* %7
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = add i32 %17, %18
%20 = icmp ult i32 %16, %19
br i1 %20, label %21, label %28
21: ; preds = %15
%22 = load i32, i32* %7
%23 = icmp sgt i32 %22, 5
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 0, i32* %4
br label %25
25: ; preds = %24, %21
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %15
28: ; preds = %15
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %14, i64 %30
store i8 2, i8* %31
%32 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
define void @join_minmax_with_sum_unsigned_Good(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ diag(char *, int, int);
int /*<<< orphan*/ ok(int, char *);
void is_int(int got, int expect, char *name) {
  if (got == expect)
    ok(1, name);
  else {
    ok(0, name);
    diag("got %d expected %d", got, expect);
  }
}


x86 assembly (clang, -O0):
<is_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1151 <is_int+0x31>
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1030 <ok@plt>
jmp    116e <is_int+0x4e>
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
call   1030 <ok@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1040 <diag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_int>:
cmp    %esi,%edi
jne    1131 <is_int+0x11>
mov    $0x1,%edi
mov    %rdx,%rsi
jmp    1030 <ok@plt>
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    %rdx,%rsi
call   1030 <ok@plt>
lea    0xeb7(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <diag@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"got %d expected %d\00"
define void @is_int(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i32 @ok(i32 1, i8* %11)
br label %19
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = call i32 @ok(i32 0, i8* %14)
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @diag(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17)
br label %19
19: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"got %d expected %d\00"
define void @is_int(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @ok(i32 1, i8* %2)
br label %10
7: ; preds = %3
%8 = tail call i32 @ok(i32 0, i8* %2)
%9 = tail call i32 @diag(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %10
10: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x5d() {
  Assert_real((isspace(93) == 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_isspace.c",
              470, ("isspace should be 0 for ]"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x5d>:
push   %rax
mov    $0x5d,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1d6,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for ]\00"
define void @t_isspace_0x5d() {
%1 = call i64 @isspace(i32 93)
%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 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for ]\00"
define void @t_isspace_0x5d() {
%1 = tail call i64 @isspace(i32 93)
%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 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void putdouble(void) {}


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

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

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

LLVM IR (-O2):
define void @putdouble() {
ret void
}
double calc_temp_penalty(temp, tempcrit)
double temp, tempcrit;
{
  double value = 0.0;
  if (temp > tempcrit) {
    value = (temp - tempcrit) * (temp - tempcrit) / (10);
  }
  return (value);
}


x86 assembly (clang, -O0):
<calc_temp_penalty>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114f <calc_temp_penalty+0x4f>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_temp_penalty>:
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm0
jbe    111e <calc_temp_penalty+0x1e>
subsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
divsd  0xee6(%rip),%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @calc_temp_penalty(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fsub double %10, %11
%13 = load double, double* %3
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = fmul double %12, %15
%17 = fdiv double %16, 1.000000e+01
store double %17, double* %5
br label %18
18: ; preds = %9, %2
%19 = load double, double* %5
ret double %19
}

LLVM IR (-O2):
define double @calc_temp_penalty(double %0, double %1) {
%3 = fcmp ogt double %0, %1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = fsub double %0, %1
%6 = fmul double %5, %5
%7 = fdiv double %6, 1.000000e+01
br label %8
8: ; preds = %4, %2
%9 = phi double [ %7, %4 ], [ 0.000000e+00, %2 ]
ret double %9
}
int DB_ReadFileNum_Native(unsigned char *filedata, void *db) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DB_ReadFileNum_Native(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}