xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xa9() {
  Assert_real((iscntrl(169) == 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_iscntrl.c",
              850, ("iscntrl should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x352,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xa9\00"
define void @t_iscntrl_0xa9() {
%1 = call i64 @iscntrl(i32 169)
%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 850, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xa9\00"
define void @t_iscntrl_0xa9() {
%1 = tail call i64 @iscntrl(i32 169)
%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 850, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cctools_debug(long long, char *);
int auth_kerberos_register(void) {
  cctools_debug((1LL << 12), "kerberos: not compiled in");
  return 0;
}


x86 assembly (clang, -O0):
<auth_kerberos_register>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1000,%edi
lea    0xee0(%rip),%rsi
call   1030 <cctools_debug@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<auth_kerberos_register>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1000,%edi
call   1030 <cctools_debug@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"kerberos: not compiled in\00"
define i32 @auth_kerberos_register() {
%1 = call i32 @cctools_debug(i64 4096, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"kerberos: not compiled in\00"
define i32 @auth_kerberos_register() {
%1 = tail call i32 @cctools_debug(i64 4096, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int do_on_knox(int /*<<< orphan*/);
int is_knox_present(void) { return do_on_knox(0); }


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

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

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

LLVM IR (-O2):
define i32 @is_knox_present() {
%1 = tail call i32 @do_on_knox(i32 0)
ret i32 %1
}
void f118(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  ({
    ({
      goto a;
      0;
    });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f118>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1119 <f118+0x19>

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

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

LLVM IR (-O2):
define void @f118() {
br label %1
1: ; preds = %1, %0
br label %1
}
void mt_restore_banked_registers(unsigned int *container) {}


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

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

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

LLVM IR (-O2):
define void @mt_restore_banked_registers(i32* nocapture %0) {
ret void
}
int lsrchint(int *a, int n, int k) {
  int i;
  for (i = 0; i < n; i++) {
    if (*(a + i) == k)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<lsrchint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <lsrchint+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1140 <lsrchint+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <lsrchint+0x5a>
jmp    1145 <lsrchint+0x45>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <lsrchint+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsrchint>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <lsrchint+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edx,(%rdi,%rcx,4)
je     111f <lsrchint+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <lsrchint+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @lsrchint(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** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %24, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %27
13: ; preds = %9
%14 = load i32*, i32** %5
%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* %7
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %13
%22 = load i32, i32* %8
store i32 %22, i32* %4
br label %28
23: ; preds = %13
br label %24
24: ; preds = %23
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
br label %9
27: ; preds = %9
store i32 -1, i32* %4
br label %28
28: ; preds = %27, %21
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @lsrchint(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
void SPISend(const unsigned int cbase, const unsigned short word) {
  (((volatile unsigned int *)(cbase + 0x080)))[15] = word;
  while ((*((volatile unsigned int *const)(cbase + 0x038))) & 0x80)
    ;
}


x86 assembly (clang, -O0):
<SPISend>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x80,%eax
mov    %eax,%eax
mov    %ecx,0x3c(%rax)
mov    -0x4(%rbp),%eax
add    $0x38,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     113c <SPISend+0x3c>
jmp    111f <SPISend+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SPISend>:
lea    0x80(%rdi),%eax
mov    %esi,0x3c(%rax)
add    $0x38,%edi
nopl   0x0(%rax)
testl  $0x80,(%rdi)
jne    1110 <SPISend+0x10>
ret

LLVM IR (-O0):
define void @SPISend(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = load i32, i32* %3
%8 = add i32 %7, 128
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = getelementptr inbounds i32, i32* %10, i64 15
store volatile i32 %6, i32* %11
br label %12
12: ; preds = %20, %2
%13 = load i32, i32* %3
%14 = add i32 %13, 56
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = and i32 %17, 128
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %12
br label %12
21: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @SPISend(i32 %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = add i32 %0, 128
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 15
store volatile i32 %3, i32* %7
%8 = add i32 %0, 56
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
br label %11
11: ; preds = %11, %2
%12 = load volatile i32, i32* %10
%13 = and i32 %12, 128
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %11
15: ; preds = %11
ret void
}
/* Variables and functions */
char *ndb_unix_makeExtFileName(char const *);
char *ndb_osdep_makeExtFileName(const char *pIntFile) {
  return ndb_unix_makeExtFileName(pIntFile);
}


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

x86 assembly (clang, -O2):
<ndb_osdep_makeExtFileName>:
jmp    1030 <ndb_unix_makeExtFileName@plt>

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

LLVM IR (-O2):
define i8* @ndb_osdep_makeExtFileName(i8* %0) {
%2 = tail call i8* @ndb_unix_makeExtFileName(i8* %0)
ret i8* %2
}
void UnaryOperators(int a, int *b) {
  (float)a;
  -a;
  +a;
  &a;
  *b;
  !a;
  sizeof a;
  sizeof(int);
  _Alignof(int);
}


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

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

LLVM IR (-O0):
define void @UnaryOperators(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 = sitofp i32 %5 to float
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %3
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
ret void
}

LLVM IR (-O2):
define void @UnaryOperators(i32 %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ g_set_error(size_t, int *);
int get_contents_stdio(FILE *f, int *length, char **contents) {
  size_t total_bytes = 0;
  assert(f != NULL);
  if (!length) {
    g_set_error(total_bytes, length);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<get_contents_stdio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
jne    1172 <get_contents_stdio+0x52>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <g_set_error@plt>
movl   $0x0,-0x4(%rbp)
jmp    1179 <get_contents_stdio+0x59>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_contents_stdio>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    $0x1,%ebx
test   %r14,%r14
jne    114b <get_contents_stdio+0x2b>
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <g_set_error@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @get_contents_stdio(i32* readnone %0, i32* readnone %1, i8** nocapture readnone %2) {
%4 = icmp ne i32* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp eq i32* %1, null
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 @g_set_error(i64 0, i32* null)
br label %10
10: ; preds = %3, %8
%11 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %11
}
long double gammal(long double __d) {
  signed int __local_signgam = 0;
  long double return_value_lgammal_r$1;
  return_value_lgammal_r$1 = lgammal_r(__d, &__local_signgam);
  return return_value_lgammal_r$1;
}


x86 assembly (clang, -O0):
<gammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
movl   $0x0,-0x14(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
lea    -0x14(%rbp),%rdi
call   1030 <lgammal_r@plt>
mov    %eax,-0x34(%rbp)
fildl  -0x34(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammal>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
movl   $0x0,0x14(%rsp)
fstpt  (%rsp)
lea    0x14(%rsp),%rdi
xor    %eax,%eax
call   1030 <lgammal_r@plt>
mov    %eax,0x10(%rsp)
fildl  0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @gammal(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
store i32 0, i32* %3
%5 = load x86_fp80, x86_fp80* %2
%6 = call i32 (x86_fp80, i32*, ...) bitcast (i32 (...)* @lgammal_r to i32 (x86_fp80, i32*, ...)*)(x86_fp80 %5, i32* %3)
%7 = sitofp i32 %6 to x86_fp80
store x86_fp80 %7, x86_fp80* %4
%8 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %8
}

LLVM IR (-O2):
define x86_fp80 @gammal(x86_fp80 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 (x86_fp80, i32*, ...) bitcast (i32 (...)* @lgammal_r to i32 (x86_fp80, i32*, ...)*)(x86_fp80 %0, i32* %2)
%5 = sitofp i32 %4 to x86_fp80
ret x86_fp80 %5
}
/* Variables and functions */
scalar_t__ load_from_file(char const *, unsigned char *, int *);
int buffer_from_file(const char *filename, unsigned char *buffer,
                     int size_to_check) {
  return load_from_file(filename, buffer, &size_to_check) ? 0 : -1;
}


x86 assembly (clang, -O0):
<buffer_from_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <load_from_file@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_from_file>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <load_from_file@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @buffer_from_file(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @load_from_file(i8* %7, i8* %8, i32* %6)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 -1
ret i32 %12
}

LLVM IR (-O2):
define i32 @buffer_from_file(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i64 @load_from_file(i8* %0, i8* %1, i32* %4)
%6 = icmp eq i64 %5, 0
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test() {
  { hash(1); };
}


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

x86 assembly (clang, -O2):
<test>:
mov    $0x1,%edi
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 @hash(i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 1)
ret void
}
void output_char2() { return; }


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

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

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

LLVM IR (-O2):
define void @output_char2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int SSIBaseValid(unsigned long);
void SSIClockSourceSet(unsigned long ulBase, unsigned long ulSource) {
  DEBUG_ASSERT(SSIBaseValid(ulBase));
  DEBUG_ASSERT((ulSource == 0x00000000) || (ulSource == 0x00000005));
  (*((volatile unsigned long *)(ulBase + 0x00000FC8))) = ulSource;
}


x86 assembly (clang, -O0):
<SSIClockSourceSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x1,%al
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     115b <SSIClockSourceSet+0x3b>
cmpq   $0x5,-0x10(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0xfc8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIClockSourceSet>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
test   %rbx,%rbx
sete   %al
cmp    $0x5,%rbx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,0xfc8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @SSIClockSourceSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @SSIBaseValid(i64 %5)
%7 = call i32 @DEBUG_ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp eq i64 %11, 5
br label %13
13: ; preds = %10, %2
%14 = phi i1 [ true, %2 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
%16 = call i32 @DEBUG_ASSERT(i32 %15)
%17 = load i64, i64* %4
%18 = load i64, i64* %3
%19 = add i64 %18, 4040
%20 = inttoptr i64 %19 to i64*
store volatile i64 %17, i64* %20
ret void
}

LLVM IR (-O2):
define void @SSIClockSourceSet(i64 %0, i64 %1) {
%3 = tail call i32 @SSIBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = icmp eq i64 %1, 0
%6 = icmp eq i64 %1, 5
%7 = or i1 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = add i64 %0, 4040
%11 = inttoptr i64 %10 to i64*
store volatile i64 %1, i64* %11
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void setArrayL(int64_t *arr, int idx, int64_t v) { arr[idx] = v; }


x86 assembly (clang, -O0):
<setArrayL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setArrayL>:
movslq %esi,%rax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @setArrayL(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 %7, i32* %11
ret void
}

LLVM IR (-O2):
define void @setArrayL(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %2, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenStartCommentLine(void) { printf2("\t; "); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\09; \00"
define void @GenStartCommentLine() {
%1 = call i32 @printf2(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\09; \00"
define void @GenStartCommentLine() {
%1 = tail call i32 @printf2(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
long double C_Utils_min_longdouble(const long double item1,
                                   const long double item2) {
  return item1 > item2 ? item1 : item2;
}


x86 assembly (clang, -O0):
<C_Utils_min_longdouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    1132 <C_Utils_min_longdouble+0x32>
jmp    1127 <C_Utils_min_longdouble+0x27>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1138 <C_Utils_min_longdouble+0x38>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_min_longdouble>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomi %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @C_Utils_min_longdouble(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp ogt x86_fp80 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load x86_fp80, x86_fp80* %3
br label %12
10: ; preds = %2
%11 = load x86_fp80, x86_fp80* %4
br label %12
12: ; preds = %10, %8
%13 = phi x86_fp80 [ %9, %8 ], [ %11, %10 ]
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @C_Utils_min_longdouble(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ogt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void crea_file_con_wid(int wid) {
  FILE *fp;
  char *filename = malloc(20);
  sprintf(filename,
          "wator_worker_"
          "%d",
          wid);
  fp = fopen(filename, "w");
  free(filename);
  fclose(fp);
}


x86 assembly (clang, -O0):
<crea_file_con_wid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe89(%rip),%rsi
call   1070 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crea_file_con_wid>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x14,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xe97(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1070 <sprintf@plt>
lea    0xe96(%rip),%rsi
mov    %rbx,%rdi
call   1060 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"wator_worker_%d\00"
@.str.1 = [2 x i8] c"w\00"
define void @crea_file_con_wid(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call i8* @malloc(i32 20)
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %4
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %3
%11 = load i8*, i8** %4
%12 = call i32 @free(i8* %11)
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"wator_worker_%d\00"
@.str.1 = [2 x i8] c"w\00"
define void @crea_file_con_wid(i32 %0) {
%2 = tail call dereferenceable_or_null(20) i8* @malloc(i32 20)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @free(i8* %2)
%6 = tail call i32 @fclose(i32* %4)
ret void
}
void nrf_802154_lp_timer_critical_section_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @nrf_802154_lp_timer_critical_section_exit() {
ret void
}
/* Variables and functions */
int __ctype_isspace(int);
int isspace(int c) { return __ctype_isspace(c); }


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

x86 assembly (clang, -O2):
<isspace>:
jmp    1030 <__ctype_isspace@plt>

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = tail call i32 @__ctype_isspace(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
main() {
  int k, l;
  int r = 2;
  if (l) {
    r = 3;
    assert(0);
  } else {
    r = 5;
    assert(0);
  }
  if (k) {
    r = 6;
    assert(0);
  }
  if (l) {
    r = 7;
    assert(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1143 <main+0x33>
movl   $0x3,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1151 <main+0x41>
movl   $0x5,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
je     1169 <main+0x59>
movl   $0x6,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0xc(%rbp)
je     1181 <main+0x71>
movl   $0x7,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
size_t PTHREAD_STACK_MIN;
size_t getpagesize();
size_t tp_info_minstack() { return PTHREAD_STACK_MIN + getpagesize(); }


x86 assembly (clang, -O0):
<tp_info_minstack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp_info_minstack>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%rbx
xor    %eax,%eax
call   1030 <getpagesize@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@PTHREAD_STACK_MIN = global i64 0
define i64 @tp_info_minstack() {
%1 = load i64, i64* @PTHREAD_STACK_MIN
%2 = call i64 (...) @getpagesize()
%3 = add i64 %1, %2
ret i64 %3
}

LLVM IR (-O2):
@PTHREAD_STACK_MIN = global i64 0
define i64 @tp_info_minstack() {
%1 = load i64, i64* @PTHREAD_STACK_MIN
%2 = tail call i64 (...) @getpagesize()
%3 = add i64 %2, %1
ret i64 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int a = 5, b = 7;
  printf("Before exchange a = %d b = %d\n", a, b);
  swap(&a, &b);
  printf("after exchange a = %d b = %d", a, b);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
movl   $0x7,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0x5,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Before exchange a = %d b = %d\0A\00"
@.str.1 = [29 x i8] c"after exchange a = %d b = %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 7, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 @swap(i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [31 x i8] c"Before exchange a = %d b = %d\0A\00"
@.str.1 = [29 x i8] c"after exchange a = %d b = %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 7, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5, i32 7)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ PinConfigSet(unsigned long, int, int);
int /*<<< orphan*/ PinModeSet(unsigned long, unsigned long);
void PinTypeSDHost(unsigned long ulPin, unsigned long ulPinMode) {
  PinModeSet(ulPin, ulPinMode);
  PinConfigSet(ulPin, 0x00000020, 0x00000000);
}


x86 assembly (clang, -O0):
<PinTypeSDHost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <PinModeSet@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
xor    %edx,%edx
call   1040 <PinConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PinTypeSDHost>:
push   %rbx
mov    %rdi,%rbx
call   1030 <PinModeSet@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <PinConfigSet@plt>

LLVM IR (-O0):
define void @PinTypeSDHost(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @PinModeSet(i64 %5, i64 %6)
%8 = load i64, i64* %3
%9 = call i32 @PinConfigSet(i64 %8, i32 32, i32 0)
ret void
}

LLVM IR (-O2):
define void @PinTypeSDHost(i64 %0, i64 %1) {
%3 = tail call i32 @PinModeSet(i64 %0, i64 %1)
%4 = tail call i32 @PinConfigSet(i64 %0, i32 32, i32 0)
ret void
}
void ctest2(int *i, char *cData) { *i = 100; }


x86 assembly (clang, -O0):
<ctest2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x64,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctest2>:
movl   $0x64,(%rdi)
ret

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

LLVM IR (-O2):
define void @ctest2(i32* nocapture writeonly %0, i8* nocapture readnone %1) {
store i32 100, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pci_config_writeb(int const, int, int);
int /*<<< orphan*/ pci_config_writel(int const, int, int);
void setup_piix_pm(void) {
  const int bdf = (1 << 3) | 3;
  pci_config_writel(bdf, 0x40, 0x601);
  pci_config_writeb(bdf, 0x80, 0x01);
  pci_config_writel(bdf, 0x90, 0x701);
  pci_config_writeb(bdf, 0xd2, 0x09);
}


x86 assembly (clang, -O0):
<setup_piix_pm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xb,-0x4(%rbp)
mov    $0xb,%edi
mov    $0x40,%esi
mov    $0x601,%edx
call   1030 <pci_config_writel@plt>
mov    $0xb,%edi
mov    $0x80,%esi
mov    $0x1,%edx
call   1040 <pci_config_writeb@plt>
mov    $0xb,%edi
mov    $0x90,%esi
mov    $0x701,%edx
call   1030 <pci_config_writel@plt>
mov    $0xb,%edi
mov    $0xd2,%esi
mov    $0x9,%edx
call   1040 <pci_config_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_piix_pm>:
push   %rax
mov    $0xb,%edi
mov    $0x40,%esi
mov    $0x601,%edx
call   1030 <pci_config_writel@plt>
mov    $0xb,%edi
mov    $0x80,%esi
mov    $0x1,%edx
call   1040 <pci_config_writeb@plt>
mov    $0xb,%edi
mov    $0x90,%esi
mov    $0x701,%edx
call   1030 <pci_config_writel@plt>
mov    $0xb,%edi
mov    $0xd2,%esi
mov    $0x9,%edx
pop    %rax
jmp    1040 <pci_config_writeb@plt>

LLVM IR (-O0):
define void @setup_piix_pm() {
%1 = alloca i32
store i32 11, i32* %1
%2 = call i32 @pci_config_writel(i32 11, i32 64, i32 1537)
%3 = call i32 @pci_config_writeb(i32 11, i32 128, i32 1)
%4 = call i32 @pci_config_writel(i32 11, i32 144, i32 1793)
%5 = call i32 @pci_config_writeb(i32 11, i32 210, i32 9)
ret void
}

LLVM IR (-O2):
define void @setup_piix_pm() {
%1 = tail call i32 @pci_config_writel(i32 11, i32 64, i32 1537)
%2 = tail call i32 @pci_config_writeb(i32 11, i32 128, i32 1)
%3 = tail call i32 @pci_config_writel(i32 11, i32 144, i32 1793)
%4 = tail call i32 @pci_config_writeb(i32 11, i32 210, i32 9)
ret void
}
int maxi(int const x, int const y) { return (x > y ? x : y); }


x86 assembly (clang, -O0):
<maxi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <maxi+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maxi+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxi>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maxi(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
scalar_t__ COND_GT();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_sgt_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_GT() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_sgt_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_GT@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sgt_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_GT@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sgt_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_GT()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sgt_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_GT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
void ff_hevc_put_hevc_uni_w_epel_h12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_h12_10_sse4() {
ret void
}
/* Variables and functions */
size_t strlen(const char *string) {
  size_t count = 0;
  while (*string) {
    string++;
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <strlen+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
void *test_anti_range_128(long n) {
  extern void *alloc_anti_range_128(long) __attribute__((alloc_size(1)));
  if ((-0x7fffffffffffffffL - 1) + 2 <= n && n <= 1)
    n = (-0x7fffffffffffffffL - 1) + 2 - 1;
  return alloc_anti_range_128(n);
}


x86 assembly (clang, -O0):
<test_anti_range_128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000002,%rax
cmp    -0x8(%rbp),%rax
jg     1149 <test_anti_range_128+0x39>
cmpq   $0x1,-0x8(%rbp)
jg     1149 <test_anti_range_128+0x39>
movabs $0x8000000000000001,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_128@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_128>:
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
lea    0x3(%rax),%rcx
add    %rdi,%rax
cmovns %rcx,%rdi
jmp    1030 <alloc_anti_range_128@plt>

LLVM IR (-O0):
define i8* @test_anti_range_128(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 -9223372036854775806, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 -9223372036854775807, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_128(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_128(i64 %0) {
%2 = add i64 %0, 9223372036854775806
%3 = icmp sgt i64 %2, -1
%4 = select i1 %3, i64 -9223372036854775807, i64 %0
%5 = tail call i8* @alloc_anti_range_128(i64 %4)
ret i8* %5
}
/* Type definitions */
struct ft_cxt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ft_put_word(struct ft_cxt *, int);
void ft_end_node(struct ft_cxt *cxt) { ft_put_word(cxt, 0x2); }


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

x86 assembly (clang, -O2):
<ft_end_node>:
mov    $0x2,%esi
jmp    1030 <ft_put_word@plt>

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

LLVM IR (-O2):
%struct.ft_cxt = type { i32 }
define void @ft_end_node(%struct.ft_cxt* %0) {
%2 = tail call i32 @ft_put_word(%struct.ft_cxt* %0, i32 2)
ret void
}
void *tag_buffer(void *p, int len, int test_mte) {
  (void)len;
  (void)test_mte;
  return p;
}


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

x86 assembly (clang, -O2):
<tag_buffer>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @tag_buffer(i8* readnone returned %0, i32 %1, i32 %2) {
ret i8* %0
}
/* Variables and functions */
int remove(char *);
int delete_pid() { return remove("/var/run/mbpfan.pid"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"/var/run/mbpfan.pid\00"
define i32 @delete_pid() {
%1 = call i32 @remove(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [20 x i8] c"/var/run/mbpfan.pid\00"
define i32 @delete_pid() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void RTEnvExist(void) {}


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

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

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

LLVM IR (-O2):
define void @RTEnvExist() {
ret void
}
void uart_putc(void *uart_base, char character) {
  *(volatile unsigned long *)uart_base = character;
}


x86 assembly (clang, -O0):
<uart_putc>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbq -0x9(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_putc>:
movslq %esi,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @uart_putc(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i64
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store volatile i64 %6, i64* %8
ret void
}

LLVM IR (-O2):
define void @uart_putc(i8* %0, i8 signext %1) {
%3 = sext i8 %1 to i64
%4 = bitcast i8* %0 to i64*
store volatile i64 %3, i64* %4
ret void
}
/* Variables and functions */
char *calloc(int, int);
int /*<<< orphan*/ dfs(int, int /*<<< orphan*/, int /*<<< orphan*/, char *,
                       int /*<<< orphan*/, char **, int *);
char **malloc(int);
char **generateParenthesis(int n, int *returnSize) {
  char *stack = calloc(2 * n + 1, sizeof(char));
  char **parentheses = malloc(5000 * sizeof(char *));
  *returnSize = 0;
  dfs(n, 0, 0, stack, 0, parentheses, returnSize);
  return parentheses;
}


x86 assembly (clang, -O0):
<generateParenthesis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x9c40,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r9
mov    -0x10(%rbp),%rax
xor    %r8d,%r8d
mov    %r8d,%esi
mov    %r8d,%edx
mov    %rax,(%rsp)
call   1050 <dfs@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateParenthesis>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%r14d
lea    (%r14,%r14,1),%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%r15
mov    $0x9c40,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%r12)
mov    %r12,(%rsp)
mov    %r14d,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %r15,%rcx
xor    %r8d,%r8d
mov    %rax,%r9
call   1050 <dfs@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8** @generateParenthesis(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8**
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32, i32* %3
%8 = mul nsw i32 2, %7
%9 = add nsw i32 %8, 1
%10 = call i8* @calloc(i32 %9, i32 1)
store i8* %10, i8** %5
%11 = call i8** @malloc(i32 40000)
store i8** %11, i8*** %6
%12 = load i32*, i32** %4
store i32 0, i32* %12
%13 = load i32, i32* %3
%14 = load i8*, i8** %5
%15 = load i8**, i8*** %6
%16 = load i32*, i32** %4
%17 = call i32 @dfs(i32 %13, i32 0, i32 0, i8* %14, i32 0, i8** %15, i32* %16)
%18 = load i8**, i8*** %6
ret i8** %18
}

LLVM IR (-O2):
define i8** @generateParenthesis(i32 %0, i32* %1) {
%3 = shl nsw i32 %0, 1
%4 = or i32 %3, 1
%5 = tail call i8* @calloc(i32 %4, i32 1)
%6 = tail call i8** @malloc(i32 40000)
store i32 0, i32* %1
%7 = tail call i32 @dfs(i32 %0, i32 0, i32 0, i8* %5, i32 0, i8** %6, i32* %1)
ret i8** %6
}
void __flash_acquire(void) {}


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

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

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

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