xunge/DecIR huggingface dataset:
/* Variables and functions */
int sodoku(char **, int /*<<< orphan*/, int /*<<< orphan*/);
int solveSudoku(char **board, int boardRowSize, int boardColSize) {
  return sodoku(board, 0, 0);
}


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

x86 assembly (clang, -O2):
<solveSudoku>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <sodoku@plt>

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

LLVM IR (-O2):
define i32 @solveSudoku(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @sodoku(i8** %0, i32 0, i32 0)
ret i32 %4
}
/* Type definitions */
struct config {
  int dummy;
};

/* Variables and functions */
struct config *null_init(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.config = type { i32 }
define %struct.config* @null_init() {
ret %struct.config* null
}

LLVM IR (-O2):
%struct.config = type { i32 }
define noalias %struct.config* @null_init() {
ret %struct.config* null
}
double y0(double x) { return 0.0; }


x86 assembly (clang, -O0):
<y0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<y0>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @y0(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @y0(double %0) {
ret double 0.000000e+00
}
int search(int a[], int key, int size) {
  int present = 0;
  int index = 0;
  for (; index < size; index++) {
    if (a[index] == key) {
      present = 1;
      break;
    }
  }
  return present;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115b <search+0x5b>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jne    1148 <search+0x48>
movl   $0x1,-0x14(%rbp)
jmp    115b <search+0x5b>
jmp    114d <search+0x4d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <search+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
test   %edx,%edx
jle    111e <search+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %esi,(%rdi,%rcx,4)
je     1121 <search+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <search+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @search(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %1
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %7, %9, %3
%16 = phi i32 [ 0, %3 ], [ 1, %9 ], [ 0, %7 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ MessageBeep(int /*<<< orphan*/);
void ring_bell(void) { MessageBeep(0); }


x86 assembly (clang, -O0):
<ring_bell>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <MessageBeep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_bell>:
xor    %edi,%edi
jmp    1030 <MessageBeep@plt>

LLVM IR (-O0):
define void @ring_bell() {
%1 = call i32 @MessageBeep(i32 0)
ret void
}

LLVM IR (-O2):
define void @ring_bell() {
%1 = tail call i32 @MessageBeep(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_PRINTABLE_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_STRING *ASN1_PRINTABLE_new(void) {
  return (ASN1_STRING *)ASN1_item_new(&ASN1_PRINTABLE_it);
}


x86 assembly (clang, -O0):
<ASN1_PRINTABLE_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_PRINTABLE_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_PRINTABLE_it = global i32 0
define i32* @ASN1_PRINTABLE_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_PRINTABLE_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_PRINTABLE_it = global i32 0
define i32* @ASN1_PRINTABLE_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_PRINTABLE_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int func1() {
  printf("debug: "
         "%s:%d: "
         "return to %p"
         "\n",
         __func__, 11, __builtin_return_address(0));
  return 1;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    0x8(%rbp),%rcx
lea    0xee1(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0xb,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
push   %rax
mov    0x8(%rsp),%rcx
lea    0xee3(%rip),%rdi
lea    0xef8(%rip),%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"debug: %s:%d: return to %p\0A\00"
@__func__.func1 = [6 x i8] c"func1\00"
define i32 @func1() {
%1 = call i8* @llvm.returnaddress(i32 0)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.func1, i64 0, i64 0), i32 11, i8* %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [28 x i8] c"debug: %s:%d: return to %p\0A\00"
@__func__.func1 = [6 x i8] c"func1\00"
define i32 @func1() {
%1 = tail call i8* @llvm.returnaddress(i32 0)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.func1, i64 0, i64 0), i32 11, i8* %1)
ret i32 1
}
void unsigned_char_or_signed_char_unsigned_char(unsigned char *LHS,
                                                unsigned char RHS) {
  (*LHS) |= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_or_signed_char_unsigned_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_or_signed_char_unsigned_char>:
or     %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_or_signed_char_unsigned_char(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = or i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_or_signed_char_unsigned_char(i8* nocapture %0, i8 zeroext %1) {
%3 = load i8, i8* %0
%4 = or i8 %3, %1
store i8 %4, i8* %0
ret void
}
void pil_desc_release(struct pil_desc *desc) {}


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

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

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

LLVM IR (-O2):
%struct.pil_desc = type opaque
define void @pil_desc_release(%struct.pil_desc* nocapture %0) {
ret void
}
void *test_setup_test_case(void) {
  static int bVal;
  bVal = 0;
  return (void *)&bVal;
}


x86 assembly (clang, -O0):
<test_setup_test_case>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,0x2f16(%rip)
lea    0x2f0f(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_setup_test_case>:
movl   $0x0,0x2f1a(%rip)
lea    0x2f13(%rip),%rax
ret

LLVM IR (-O0):
@test_setup_test_case.bVal = internal global i32 0
define i8* @test_setup_test_case() {
store i32 0, i32* @test_setup_test_case.bVal
ret i8* bitcast (i32* @test_setup_test_case.bVal to i8*)
}

LLVM IR (-O2):
@test_setup_test_case.bVal = internal global i32 0
define i8* @test_setup_test_case() {
store i32 0, i32* @test_setup_test_case.bVal
ret i8* bitcast (i32* @test_setup_test_case.bVal to i8*)
}
/* Variables and functions */
size_t tm_block_index_at(uintptr_t addr) { return addr / (1ul << (3)); }


x86 assembly (clang, -O0):
<tm_block_index_at>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_block_index_at>:
mov    %rdi,%rax
shr    $0x3,%rax
ret

LLVM IR (-O0):
define i64 @tm_block_index_at(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = udiv i64 %3, 8
ret i64 %4
}

LLVM IR (-O2):
define i64 @tm_block_index_at(i64 %0) {
%2 = lshr i64 %0, 3
ret i64 %2
}
/* Variables and functions */
int SIGTERM;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
void sigterm(int sig) {
  if (sig == SIGTERM) {
    kill(0, SIGTERM);
    _exit(0);
  }
}


x86 assembly (clang, -O0):
<sigterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1154 <sigterm+0x34>
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1040 <kill@plt>
xor    %edi,%edi
call   1030 <_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigterm>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
je     112e <sigterm+0xe>
pop    %rax
ret
mov    %edi,%esi
xor    %edi,%edi
call   1040 <kill@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
define void @sigterm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGTERM
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @SIGTERM
%8 = call i32 @kill(i32 0, i32 %7)
%9 = call i32 @_exit(i32 0)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define void @sigterm(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @kill(i32 0, i32 %0)
%6 = tail call i32 @_exit(i32 0)
unreachable
7: ; preds = %1
ret void
}
void gtk_container_forall() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_forall() {
ret void
}
void GC_gcollect(void) { return; }


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

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

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

LLVM IR (-O2):
define void @GC_gcollect() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void tlv_set_type(uint8_t *p_tlv, uint16_t i_type) {
  p_tlv[0] = i_type >> 8;
  p_tlv[1] = i_type & 0xff;
}


x86 assembly (clang, -O0):
<tlv_set_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tlv_set_type>:
movzbl %sil,%eax
sar    $0x8,%esi
mov    %esi,(%rdi)
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @tlv_set_type(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @tlv_set_type(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
store i32 %3, i32* %0
%4 = and i32 %1, 255
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
ret void
}
/* Variables and functions */
int rindex_nondigit(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
signed int nondigit_prefix(const char *input, char *output) {
  signed int i = rindex_nondigit(input);
  if (i++ >= 0) {
    strncpy(output, input, i);
    output[i] = '\0';
  }
  return i;
}


x86 assembly (clang, -O0):
<nondigit_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rindex_nondigit@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jl     116c <nondigit_prefix+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nondigit_prefix>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <rindex_nondigit@plt>
lea    0x1(%rax),%ebp
test   %eax,%eax
js     114a <nondigit_prefix+0x2a>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %ebp,%eax
movb   $0x0,(%r14,%rax,1)
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @nondigit_prefix(i8* %0, i8* %1) {
%3 = tail call i32 @rindex_nondigit(i8* %0)
%4 = add nsw i32 %3, 1
%5 = icmp sgt i32 %3, -1
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 @strncpy(i8* %1, i8* %0, i32 %4)
%8 = zext i32 %4 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %6, %2
ret i32 %4
}
void g_setup_view(rot_x, rot_y, dist, zoom) float rot_x, rot_y, dist, zoom;
{}


x86 assembly (clang, -O0):
<g_setup_view>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm3,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movaps %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm3,%xmm3
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm3,-0x4(%rbp)
movss  %xmm2,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @g_setup_view(double %0, double %1, double %2, double %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = fptrunc double %0 to float
%10 = fptrunc double %1 to float
%11 = fptrunc double %2 to float
%12 = fptrunc double %3 to float
store float %9, float* %5
store float %10, float* %6
store float %11, float* %7
store float %12, float* %8
ret void
}

LLVM IR (-O2):
define void @g_setup_view(double %0, double %1, double %2, double %3) {
ret void
}
void ExttMonthAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttMonthAuxTable() {
ret void
}
void INT_Excep_MTU10_TGIV10(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU10_TGIV10() {
ret void
}
void stubHandler(int nIRQ, void *pParam) {}


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

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

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

LLVM IR (-O2):
define void @stubHandler(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void say_hello(const char *name) { printf("Hello %s\n", name); }


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

x86 assembly (clang, -O2):
<say_hello>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Hello %s\0A\00"
define void @say_hello(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Hello %s\0A\00"
define void @say_hello(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int do_execute_command(const char *command) {
  char *buf, **argv;
  int argc = split_execute_command(command, &buf, &argv);
  if (argc < 0)
    return argc;
  int ret = do_execute_command_with_argv(argc, argv);
  free(argv);
  free(buf);
  return ret;
}


x86 assembly (clang, -O0):
<do_execute_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1050 <split_execute_command@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1167 <do_execute_command+0x37>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1190 <do_execute_command+0x60>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <do_execute_command_with_argv@plt>
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_execute_command>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1050 <split_execute_command@plt>
mov    %eax,%ebx
test   %eax,%eax
js     116c <do_execute_command+0x3c>
mov    (%rsp),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <do_execute_command_with_argv@plt>
mov    %eax,%ebx
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @do_execute_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
%4 = bitcast i8** %2 to i8*
%5 = bitcast i8*** %3 to i8*
%6 = call i32 (i8*, i8**, i8***, ...) bitcast (i32 (...)* @split_execute_command to i32 (i8*, i8**, i8***, ...)*)(i8* %0, i8** %2, i8*** %3)
%7 = icmp slt i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i8**, i8*** %3
%10 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @do_execute_command_with_argv to i32 (i32, i8**, ...)*)(i32 %6, i8** %9)
%11 = bitcast i8*** %3 to i8**
%12 = load i8*, i8** %11
%13 = load i8*, i8** %2
br label %14
14: ; preds = %1, %8
%15 = phi i32 [ %10, %8 ], [ %6, %1 ]
ret i32 %15
}
double val(int n) {
  switch (n) {
  case 2:
    return 1.880;
    break;
  case 3:
    return 1.023;
    break;
  case 4:
    return 0.729;
    break;
  case 5:
    return 0.577;
    break;
  case 6:
    return 0.483;
    break;
  case 7:
    return 0.419;
    break;
  case 8:
    return 0.373;
    break;
  case 9:
    return 0.337;
    break;
  }
  return 0.308;
}


x86 assembly (clang, -O0):
<val>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x7,%eax
ja     11c0 <val+0xc0>
mov    -0x18(%rbp),%rax
lea    0xf21(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xf00(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xe64(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xe4a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11cd <val+0xcd>
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<val>:
add    $0xfffffffe,%edi
cmp    $0x7,%edi
ja     1118 <val+0x18>
movslq %edi,%rax
lea    0xef6(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret
movsd  0xee0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @val(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 2, label %5
i32 3, label %6
i32 4, label %7
i32 5, label %8
i32 6, label %9
i32 7, label %10
i32 8, label %11
i32 9, label %12
]
5: ; preds = %1
store double 1.880000e+00, double* %2
br label %14
6: ; preds = %1
store double 1.023000e+00, double* %2
br label %14
7: ; preds = %1
store double 7.290000e-01, double* %2
br label %14
8: ; preds = %1
store double 5.770000e-01, double* %2
br label %14
9: ; preds = %1
store double 4.830000e-01, double* %2
br label %14
10: ; preds = %1
store double 4.190000e-01, double* %2
br label %14
11: ; preds = %1
store double 3.730000e-01, double* %2
br label %14
12: ; preds = %1
store double 3.370000e-01, double* %2
br label %14
13: ; preds = %1
store double 3.080000e-01, double* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
@switch.table.val = [8 x double] [double 1.880000e+00, double 1.023000e+00, double 7.290000e-01, double 5.770000e-01, double 4.830000e-01, double 4.190000e-01, double 3.730000e-01, double 3.370000e-01]
define double @val(i32 %0) {
%2 = add i32 %0, -2
%3 = icmp ult i32 %2, 8
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [8 x double], [8 x double]* @switch.table.val, i64 0, i64 %5
%7 = load double, double* %6
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 3.080000e-01, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ testforty_state_pop(char *, void *);
void testforty_state_pop_two(void *context) {
  testforty_state_pop("TWO", context);
}


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

x86 assembly (clang, -O2):
<testforty_state_pop_two>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <testforty_state_pop@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"TWO\00"
define void @testforty_state_pop_two(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @testforty_state_pop(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"TWO\00"
define void @testforty_state_pop_two(i8* %0) {
%2 = tail call i32 @testforty_state_pop(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xad() {
  Assert_real((isbdigit(173) == 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_isbdigit.c",
              870, ("isbdigit should be 0 for 0xad"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xad>:
push   %rax
mov    $0xad,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x366,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xad\00"
define void @t_isbdigit_0xad() {
%1 = call i64 @isbdigit(i32 173)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xad\00"
define void @t_isbdigit_0xad() {
%1 = tail call i64 @isbdigit(i32 173)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 870, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int f, i, a = 1;
  f = 10;
  for (i = 1; i <= f; ++i) {
    a = a * i;
  }
  printf("%d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1158 <main+0x48>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x24>
mov    -0x10(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x375f00,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fio_printf(int, char *);
int /*<<< orphan*/ fizz();
int level2(void) {
  fizz();
  fio_printf(1, "Should not reach here!!!\n\r");
  return 1;
}


x86 assembly (clang, -O0):
<level2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fizz@plt>
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
call   1040 <fio_printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<level2>:
push   %rax
xor    %eax,%eax
call   1030 <fizz@plt>
lea    0xed1(%rip),%rsi
mov    $0x1,%edi
call   1040 <fio_printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Should not reach here!!!\0A\0D\00"
define i32 @level2() {
%1 = call i32 (...) @fizz()
%2 = call i32 @fio_printf(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [27 x i8] c"Should not reach here!!!\0A\0D\00"
define i32 @level2() {
%1 = tail call i32 (...) @fizz()
%2 = tail call i32 @fio_printf(i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void arr_uint16_clear_conditional(unsigned short int *pDest,
                                  unsigned long int *pTest,
                                  unsigned long int num) {
  unsigned short int i;
  for (i = 0; i < num; i++) {
    if (pTest[i] == 0) {
      pDest[i] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<arr_uint16_clear_conditional>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movw   $0x0,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    115b <arr_uint16_clear_conditional+0x5b>
mov    -0x10(%rbp),%rax
movzwl -0x1a(%rbp),%ecx
cmpq   $0x0,(%rax,%rcx,8)
jne    1145 <arr_uint16_clear_conditional+0x45>
mov    -0x8(%rbp),%rax
movzwl -0x1a(%rbp),%ecx
movw   $0x0,(%rax,%rcx,2)
jmp    114a <arr_uint16_clear_conditional+0x4a>
mov    -0x1a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1a(%rbp)
jmp    1116 <arr_uint16_clear_conditional+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arr_uint16_clear_conditional>:
test   %rdx,%rdx
je     112d <arr_uint16_clear_conditional+0x2d>
mov    $0x1,%eax
jmp    111c <arr_uint16_clear_conditional+0x1c>
nopl   0x0(%rax)
movzwl %ax,%ecx
add    $0x1,%rax
cmp    %rdx,%rcx
jae    112d <arr_uint16_clear_conditional+0x2d>
cmpq   $0x0,-0x8(%rsi,%rax,8)
jne    1110 <arr_uint16_clear_conditional+0x10>
movw   $0x0,-0x2(%rdi,%rax,2)
jmp    1110 <arr_uint16_clear_conditional+0x10>
ret

LLVM IR (-O0):
define void @arr_uint16_clear_conditional(i16* %0, i64* %1, i64 %2) {
%4 = alloca i16*
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i16
store i16* %0, i16** %4
store i64* %1, i64** %5
store i64 %2, i64* %6
store i16 0, i16* %7
br label %8
8: ; preds = %26, %3
%9 = load i16, i16* %7
%10 = zext i16 %9 to i64
%11 = load i64, i64* %6
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %29
13: ; preds = %8
%14 = load i64*, i64** %5
%15 = load i16, i16* %7
%16 = zext i16 %15 to i64
%17 = getelementptr inbounds i64, i64* %14, i64 %16
%18 = load i64, i64* %17
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %25
20: ; preds = %13
%21 = load i16*, i16** %4
%22 = load i16, i16* %7
%23 = zext i16 %22 to i64
%24 = getelementptr inbounds i16, i16* %21, i64 %23
store i16 0, i16* %24
br label %25
25: ; preds = %20, %13
br label %26
26: ; preds = %25
%27 = load i16, i16* %7
%28 = add i16 %27, 1
store i16 %28, i16* %7
br label %8
29: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @arr_uint16_clear_conditional(i16* nocapture writeonly %0, i64* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3, %12
%6 = phi i64 [ %13, %12 ], [ 0, %3 ]
%7 = getelementptr inbounds i64, i64* %1, i64 %6
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = getelementptr inbounds i16, i16* %0, i64 %6
store i16 0, i16* %11
br label %12
12: ; preds = %5, %10
%13 = add i64 %6, 1
%14 = and i64 %13, 65535
%15 = icmp ult i64 %14, %2
br i1 %15, label %5, label %16
16: ; preds = %12, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
void ECDSA_free(void *p) { __coverity_free__(p); }


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

x86 assembly (clang, -O2):
<ECDSA_free>:
jmp    1030 <__coverity_free__@plt>

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

LLVM IR (-O2):
define void @ECDSA_free(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() { printf("\n Hello World "); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"\0A Hello World \00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0A Hello World \00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
struct can_frame {
  scalar_t__ can_id;
  int can_dlc;
};

/* Variables and functions */
bool is_sdo_confirmation(struct can_frame frame, uint8_t node_id) {
  return frame.can_id == 0x580 + node_id && frame.can_dlc == 8;
}


x86 assembly (clang, -O0):
<is_sdo_confirmation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
add    $0x580,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x19(%rbp)
jne    1136 <is_sdo_confirmation+0x36>
cmpl   $0x8,-0x8(%rbp)
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sdo_confirmation>:
add    $0x580,%rdx
cmp    %rdi,%rdx
sete   %al
cmp    $0x8,%esi
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i64, i32 }
define i32 @is_sdo_confirmation(i64 %0, i32 %1, i64 %2) {
%4 = alloca %struct.can_frame
%5 = alloca i64
%6 = bitcast %struct.can_frame* %4 to { i64, i32 }*
%7 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %6, i32 0, i32 0
store i64 %0, i64* %7
%8 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %6, i32 0, i32 1
store i32 %1, i32* %8
store i64 %2, i64* %5
%9 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %4, i32 0, i32 0
%10 = load i64, i64* %9
%11 = load i64, i64* %5
%12 = add nsw i64 1408, %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %4, i32 0, i32 1
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 8
br label %18
18: ; preds = %14, %3
%19 = phi i1 [ false, %3 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_sdo_confirmation(i64 %0, i32 %1, i64 %2) {
%4 = add nsw i64 %2, 1408
%5 = icmp eq i64 %4, %0
%6 = icmp eq i32 %1, 8
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
void mem_cgroup_print_bad_page(struct page *page) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @mem_cgroup_print_bad_page(%struct.page* nocapture %0) {
ret void
}
/* Type definitions */
struct sock {
  int dummy;
};

/* Variables and functions */
int smtp_get_msg(struct sock *, int);
int /*<<< orphan*/ sock_sendmsg(struct sock *, char *, char const *);
int smtp_ehlo(struct sock *sock, const char *user) {
  sock_sendmsg(sock, "EHLO %s", user);
  return smtp_get_msg(sock, 1);
}


x86 assembly (clang, -O0):
<smtp_ehlo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1040 <sock_sendmsg@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <smtp_get_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smtp_ehlo>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
call   1040 <sock_sendmsg@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <smtp_get_msg@plt>

LLVM IR (-O0):
%struct.sock = type { i32 }
@.str = [8 x i8] c"EHLO %s\00"
define i32 @smtp_ehlo(%struct.sock* %0, i8* %1) {
%3 = alloca %struct.sock*
%4 = alloca i8*
store %struct.sock* %0, %struct.sock** %3
store i8* %1, i8** %4
%5 = load %struct.sock*, %struct.sock** %3
%6 = load i8*, i8** %4
%7 = call i32 @sock_sendmsg(%struct.sock* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load %struct.sock*, %struct.sock** %3
%9 = call i32 @smtp_get_msg(%struct.sock* %8, i32 1)
ret i32 %9
}

LLVM IR (-O2):
%struct.sock = type { i32 }
@.str = [8 x i8] c"EHLO %s\00"
define i32 @smtp_ehlo(%struct.sock* %0, i8* %1) {
%3 = tail call i32 @sock_sendmsg(%struct.sock* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @smtp_get_msg(%struct.sock* %0, i32 1)
ret i32 %4
}
int main() {
  long adr = function("asdf");
  return adr == "asdf";
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <function@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <function@plt>
movslq %eax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @function to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = inttoptr i64 %5 to i8*
%7 = icmp eq i8* %6, getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @function to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i8*
%4 = icmp eq i8* %3, getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printVersion() { printf("cpgStats version %s \n", "0.1"); }


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

x86 assembly (clang, -O2):
<printVersion>:
lea    0xee9(%rip),%rdi
lea    0xef8(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"cpgStats version %s \0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @printVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"cpgStats version %s \0A\00"
@.str.1 = [4 x i8] c"0.1\00"
define void @printVersion() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
equal(s1, s2) char *s1, *s2;
{
  register char *r1, *r2;
  r1 = s1;
  r2 = s2;
  while (*r1++ == *r2)
    if (*r2++ == 0)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
mov    -0x28(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1169 <equal+0x69>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1164 <equal+0x64>
movl   $0x1,-0x4(%rbp)
jmp    1170 <equal+0x70>
jmp    111c <equal+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1126 <equal+0x26>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <equal+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @equal(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = phi i8* [ %1, %2 ], [ %11, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %9
%14 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
int ioctl(int, int /*<<< orphan*/, int);
int tcflush(int fd, int queue_selector) {
  return ioctl(fd, TCFLSH, queue_selector);
}


x86 assembly (clang, -O0):
<tcflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcflush>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
define i32 @tcflush(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* @TCFLSH
%7 = load i32, i32* %4
%8 = call i32 @ioctl(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@TCFLSH = global i32 0
define i32 @tcflush(i32 %0, i32 %1) {
%3 = load i32, i32* @TCFLSH
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
int os_log_shim_legacy_logging_enabled(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @os_log_shim_legacy_logging_enabled() {
ret i32 0
}

LLVM IR (-O2):
define i32 @os_log_shim_legacy_logging_enabled() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ GetKey();
int /*<<< orphan*/ Push(int /*<<< orphan*/);
void pRAWKEY() { Push(GetKey()); }


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

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

LLVM IR (-O0):
define void @pRAWKEY() {
%1 = call i32 (...) @GetKey()
%2 = call i32 @Push(i32 %1)
ret void
}

LLVM IR (-O2):
define void @pRAWKEY() {
%1 = tail call i32 (...) @GetKey()
%2 = tail call i32 @Push(i32 %1)
ret void
}
int mdp4_wfd_pipe_commit(struct msm_fb_data_type *mfd, int cndx, int wait) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
define i32 @mdp4_wfd_pipe_commit(%struct.msm_fb_data_type* %0, i32 %1, i32 %2) {
%4 = alloca %struct.msm_fb_data_type*
%5 = alloca i32
%6 = alloca i32
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define i32 @mdp4_wfd_pipe_commit(%struct.msm_fb_data_type* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}