xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void die(const char *message) {
  if (errno > 0) {
    perror(message);
  } else {
    fprintf(stderr, "Error: %s\n", message);
  }
  abort();
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpq   $0x0,(%rax)
jle    115b <die+0x2b>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
jmp    1174 <die+0x44>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
jle    1150 <die+0x20>
mov    %rdx,%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %5
%13 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @die(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %6, %4
%10 = tail call i32 (...) @abort()
unreachable
}
void BN_ucmp(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_ucmp() {
ret void
}
/* Variables and functions */
int strlen(const char *s) {
  int l;
  for (l = 0; *s; s++, l++)
    ;
  return l;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113b <strlen+0x3b>
jmp    1121 <strlen+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @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 i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %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 i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void clean_up() {
  unlink("write_test_temporary_file"
         ".txt");
  unlink("write_test_temporary_file"
         ".xmp");
}


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

x86 assembly (clang, -O2):
<clean_up>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xefa(%rip),%rdi
pop    %rax
jmp    1030 <unlink@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"write_test_temporary_file.txt\00"
@.str.1 = [30 x i8] c"write_test_temporary_file.xmp\00"
define void @clean_up() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"write_test_temporary_file.txt\00"
@.str.1 = [30 x i8] c"write_test_temporary_file.xmp\00"
define void @clean_up() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove_line_ending(char *, char);
void remove_line_endings(char *buffer) {
  remove_line_ending(buffer, '\n');
  remove_line_ending(buffer, '\r');
  remove_line_ending(buffer, '\"');
}


x86 assembly (clang, -O0):
<remove_line_endings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <remove_line_ending@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <remove_line_ending@plt>
mov    -0x8(%rbp),%rdi
mov    $0x22,%esi
call   1030 <remove_line_ending@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_line_endings>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%esi
call   1030 <remove_line_ending@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <remove_line_ending@plt>
mov    %rbx,%rdi
mov    $0x22,%esi
pop    %rbx
jmp    1030 <remove_line_ending@plt>

LLVM IR (-O0):
define void @remove_line_endings(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @remove_line_ending(i8* %3, i8 signext 10)
%5 = load i8*, i8** %2
%6 = call i32 @remove_line_ending(i8* %5, i8 signext 13)
%7 = load i8*, i8** %2
%8 = call i32 @remove_line_ending(i8* %7, i8 signext 34)
ret void
}

LLVM IR (-O2):
define void @remove_line_endings(i8* %0) {
%2 = tail call i32 @remove_line_ending(i8* %0, i8 signext 10)
%3 = tail call i32 @remove_line_ending(i8* %0, i8 signext 13)
%4 = tail call i32 @remove_line_ending(i8* %0, i8 signext 34)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t mul32x32_64(uint32_t a, uint32_t b) { return (uint64_t)a * b; }


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

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

LLVM IR (-O0):
define i32 @mul32x32_64(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mul32x32_64(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void f1(q) int *q;
{
  *q = 1;
#pragma omp flush
}


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

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

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

LLVM IR (-O2):
define void @f1(i32* nocapture writeonly %0) {
store i32 1, i32* %0
ret void
}
int aurora_l2_pm_enter(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @aurora_l2_pm_enter() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ run_tests();
int /*<<< orphan*/ system_init();
int main(int argc, char *argv[]) {
  system_init();
  printf(":: format test harness ::\n");
  run_tests();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <system_init@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <run_tests@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c":: format test harness ::\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @system_init()
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @run_tests()
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c":: format test harness ::\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @system_init()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @run_tests()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ uint8Clear(int /*<<< orphan*/ *);
void uint8Destroy(uint8_t *data) {
  uint8Clear(data);
  free(data);
}


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

x86 assembly (clang, -O2):
<uint8Destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <uint8Clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @uint8Destroy(i32* %0) {
%2 = tail call i32 @uint8Clear(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_uint8_t(uint8_t *const dest) { (void)dest; }


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_uint8_t(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
#define SIGINT 130
#define SIGUSR1 129
#define SIGUSR2 128
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sighandler(int sig) {
  switch (sig) {
  case SIGINT:
    printf("Ctrl+C pressed, exiting\n");
    exit(EXIT_FAILURE);
    break;
  case SIGUSR1:
    break;
  case SIGUSR2:
    break;
  }
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x80,%eax
je     1186 <sighandler+0x66>
jmp    1141 <sighandler+0x21>
mov    -0x8(%rbp),%eax
sub    $0x81,%eax
je     1181 <sighandler+0x61>
jmp    1154 <sighandler+0x34>
mov    -0x8(%rbp),%eax
sub    $0x82,%eax
jne    118b <sighandler+0x6b>
jmp    1167 <sighandler+0x47>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
jmp    118b <sighandler+0x6b>
jmp    118b <sighandler+0x6b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
cmp    $0x82,%edi
je     1129 <sighandler+0x9>
ret
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Ctrl+C pressed, exiting\0A\00"
@EXIT_FAILURE = global i32 0
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 130, label %4
i32 129, label %8
i32 128, label %9
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [24 x i8] c"Ctrl+C pressed, exiting\00"
define void @sighandler(i32 %0) {
%2 = icmp eq i32 %0, 130
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %1
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char const *, struct stat *);
int es_directorio(const char *ruta) {
  struct stat stat_ruta;
  stat(ruta, &stat_ruta);
  return S_ISDIR(stat_ruta.st_mode);
}


x86 assembly (clang, -O0):
<es_directorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<es_directorio>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @es_directorio(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISDIR(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @es_directorio(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISDIR(i32 %6)
ret i32 %7
}
void RTUtf16ICmp(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUtf16ICmp() {
ret void
}
void fc1b(x) volatile _Atomic int x;
{}


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

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

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

LLVM IR (-O2):
define void @fc1b(i32 %0) {
ret void
}
void string__NativeString___91d_93d_61d(char *self, long p0, char p1) {
  self[p0] = p1;
RET_LABEL:;
}


x86 assembly (clang, -O0):
<string__NativeString___91d_93d_61d>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<string__NativeString___91d_93d_61d>:
mov    %dl,(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @string__NativeString___91d_93d_61d(i8* %0, i64 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i8, i8* %8, i64 %9
store i8 %7, i8* %10
br label %11
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @string__NativeString___91d_93d_61d(i8* nocapture writeonly %0, i64 %1, i8 signext %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %1
store i8 %2, i8* %4
ret void
}
void bf_write(char *b, int nr, int value) {
  int idx = nr / 8;
  int mask = 1 << (nr % 8);
  if (value)
    b[idx] |= mask;
  else
    b[idx] &= mask ^ 0xff;
}


x86 assembly (clang, -O0):
<bf_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1156 <bf_write+0x56>
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
jmp    1170 <bf_write+0x70>
mov    -0x18(%rbp),%esi
xor    $0xff,%esi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_write>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
and    $0x7,%cl
mov    $0x1,%esi
shl    %cl,%esi
sar    $0x3,%eax
movslq %eax,%r8
mov    (%rdi,%r8,1),%cl
mov    %esi,%eax
not    %al
and    %cl,%al
or     %sil,%cl
test   %edx,%edx
movzbl %al,%eax
movzbl %cl,%ecx
cmove  %eax,%ecx
mov    %cl,(%rdi,%r8,1)
ret

LLVM IR (-O0):
define void @bf_write(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = sdiv i32 %9, 8
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = srem i32 %11, 8
%13 = shl i32 1, %12
store i32 %13, i32* %8
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %3
%17 = load i32, i32* %8
%18 = load i8*, i8** %4
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = or i32 %23, %17
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %37
26: ; preds = %3
%27 = load i32, i32* %8
%28 = xor i32 %27, 255
%29 = load i8*, i8** %4
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = and i32 %34, %28
%36 = trunc i32 %35 to i8
store i8 %36, i8* %32
br label %37
37: ; preds = %26, %16
ret void
}

LLVM IR (-O2):
define void @bf_write(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sdiv i32 %1, 8
%5 = and i32 %1, 7
%6 = shl nuw nsw i32 1, %5
%7 = icmp eq i32 %2, 0
%8 = sext i32 %4 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = trunc i32 %6 to i8
%12 = xor i8 %11, -1
%13 = and i8 %10, %12
%14 = or i8 %10, %11
%15 = select i1 %7, i8 %13, i8 %14
store i8 %15, i8* %9
ret void
}
void delete_chip() { (*(volatile unsigned long *)0x70200004) |= (1 << 1); }


x86 assembly (clang, -O0):
<delete_chip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70200004,%eax
mov    (%rax),%rcx
or     $0x2,%rcx
mov    $0x70200004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_chip>:
orq    $0x2,0x70200004
70 02
ret

LLVM IR (-O0):
define void @delete_chip() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}

LLVM IR (-O2):
define void @delete_chip() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR63_get(void) { return U_WMRCORENONE_get("U_WMR63"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR63\00"
define i32 @U_WMR63_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR63\00"
define i32 @U_WMR63_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
double __infer_nondet_double();
double exp2(double x) { return __infer_nondet_double(); }


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

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

LLVM IR (-O0):
define double @exp2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @__infer_nondet_double()
ret double %3
}

LLVM IR (-O2):
define double @exp2(double %0) {
%2 = tail call double (...) @__infer_nondet_double()
ret double %2
}
/* Type definitions */
struct b6_list {
  int dummy;
};
struct b6_dref {
  int dummy;
};

/* Variables and functions */
struct b6_dref *b6_list_del(int /*<<< orphan*/);
int /*<<< orphan*/ b6_list_last(struct b6_list *);
struct b6_dref *b6_list_del_last(struct b6_list *list) {
  return b6_list_del(b6_list_last(list));
}


x86 assembly (clang, -O0):
<b6_list_del_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <b6_list_last@plt>
mov    %eax,%edi
call   1030 <b6_list_del@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b6_list_del_last>:
push   %rax
call   1040 <b6_list_last@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <b6_list_del@plt>

LLVM IR (-O0):
%struct.b6_dref = type { i32 }
%struct.b6_list = type { i32 }
define %struct.b6_dref* @b6_list_del_last(%struct.b6_list* %0) {
%2 = alloca %struct.b6_list*
store %struct.b6_list* %0, %struct.b6_list** %2
%3 = load %struct.b6_list*, %struct.b6_list** %2
%4 = call i32 @b6_list_last(%struct.b6_list* %3)
%5 = call %struct.b6_dref* @b6_list_del(i32 %4)
ret %struct.b6_dref* %5
}

LLVM IR (-O2):
%struct.b6_dref = type { i32 }
%struct.b6_list = type { i32 }
define %struct.b6_dref* @b6_list_del_last(%struct.b6_list* %0) {
%2 = tail call i32 @b6_list_last(%struct.b6_list* %0)
%3 = tail call %struct.b6_dref* @b6_list_del(i32 %2)
ret %struct.b6_dref* %3
}
int compare(long ref, long testee) { return (ref && ref != testee); }


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     112a <compare+0x2a>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
test   %rdi,%rdi
setne  %al
cmp    %rsi,%rdi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @compare(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 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = icmp ne i64 %8, %9
br label %11
11: ; preds = %7, %2
%12 = phi i1 [ false, %2 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @compare(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, 0
%4 = icmp ne i64 %0, %1
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned int f2(unsigned int x, long int y) {
  return (x << y) | (x >> ((-y) & (8 * 4 - 1)));
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %rsi,%rcx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f2(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = shl i32 %5, %7
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = sub nsw i64 0, %10
%12 = and i64 %11, 31
%13 = trunc i64 %12 to i32
%14 = lshr i32 %9, %13
%15 = or i32 %8, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %0, %3
%5 = sub i32 0, %3
%6 = and i32 %5, 31
%7 = lshr i32 %0, %6
%8 = or i32 %7, %4
ret i32 %8
}
int test_imm_12uint8_mem(unsigned char *val) {
  return ((*val) & (-0x12 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_12uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffee,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_12uint8_mem>:
testb  $0xee,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_12uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -18
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_12uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -18
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ mylog_reopen();
void reopen_log_file(int signal) { mylog_reopen(); }


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

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

LLVM IR (-O0):
define void @reopen_log_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @mylog_reopen()
ret void
}

LLVM IR (-O2):
define void @reopen_log_file(i32 %0) {
%2 = tail call i32 (...) @mylog_reopen()
ret void
}
float squaref(float i) { return i * i; }


x86 assembly (clang, -O0):
<squaref>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<squaref>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @squaref(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @squaref(float %0) {
%2 = fmul float %0, %0
ret float %2
}
void foo666() {}


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

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

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

LLVM IR (-O2):
define void @foo666() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ specify_any_Gx(int);
int specify_G1(const char *the_title) {
  specify_any_Gx(1);
  return 0;
}


x86 assembly (clang, -O0):
<specify_G1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <specify_any_Gx@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @specify_G1(i8* nocapture readnone %0) {
%2 = tail call i32 @specify_any_Gx(i32 1)
ret i32 0
}
void X509V3_set_ctx(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_set_ctx() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int get_2(int /*<<< orphan*/ *);
unsigned int get_4(FILE *fp) {
  unsigned int result;
  result = get_2(fp) << 16;
  result |= get_2(fp);
  return result;
}


x86 assembly (clang, -O0):
<get_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_2@plt>
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_2@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_4>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <get_2@plt>
mov    %eax,%ebp
shl    $0x10,%ebp
mov    %rbx,%rdi
call   1030 <get_2@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @get_2(i32* %4)
%6 = shl i32 %5, 16
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @get_2(i32* %7)
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @get_4(i32* %0) {
%2 = tail call i32 @get_2(i32* %0)
%3 = shl i32 %2, 16
%4 = tail call i32 @get_2(i32* %0)
%5 = or i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ func_static(int /*<<< orphan*/);
int /*<<< orphan*/ no_args_or_locals();
int main(void) {
  int localvar = 50;
  int shadowed = 51;
  int bound = 3;
  int unresolved = 10;
  int globalshadow = 100;
  int staticshadow = 200;
  int externed = 9;
  int f = 0;
  static int static_local = 77000;
  {
    int another_local = 7;
    int shadowed = 52;
    extern int unresolved;
    extern int externed;
    int vla[bound];
    func_static(0);
    no_args_or_locals();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
movl   $0x33,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x64,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
movl   $0x9,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x7,-0x28(%rbp)
movl   $0x34,-0x2c(%rbp)
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
xor    %edi,%edi
call   1030 <func_static@plt>
mov    $0x0,%al
call   1040 <no_args_or_locals@plt>
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@main.static_local = internal global i32 77000
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
store i32 0, i32* %1
store i32 50, i32* %2
store i32 51, i32* %3
store i32 3, i32* %4
store i32 10, i32* %5
store i32 100, i32* %6
store i32 200, i32* %7
store i32 9, i32* %8
store i32 0, i32* %9
store i32 7, i32* %10
store i32 52, i32* %11
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %12
%17 = alloca i32, i64 %15
store i64 %15, i64* %13
%18 = call i32 @func_static(i32 0)
%19 = call i32 (...) @no_args_or_locals()
%20 = load i8*, i8** %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func_static(i32 0)
%2 = tail call i32 (...) @no_args_or_locals()
ret i32 0
}
void stdio_open_graphics(void) {}


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

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

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

LLVM IR (-O2):
define void @stdio_open_graphics() {
ret void
}
/* Variables and functions */
scalar_t__ clockSelect32k(int /*<<< orphan*/);
int /*<<< orphan*/ clockSetMainSrc(int);
void halMcuInit(void) {
  if (clockSelect32k(0) != 0) {
    clockSetMainSrc(1);
    if (clockSelect32k(0) != 0) {
      for (;;)
        ;
    }
  }
  clockSetMainSrc(0);
}


x86 assembly (clang, -O0):
<halMcuInit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <clockSelect32k@plt>
cmp    $0x0,%rax
je     115f <halMcuInit+0x3f>
mov    $0x1,%edi
call   1030 <clockSetMainSrc@plt>
xor    %edi,%edi
call   1040 <clockSelect32k@plt>
cmp    $0x0,%rax
je     115a <halMcuInit+0x3a>
jmp    1155 <halMcuInit+0x35>
jmp    1155 <halMcuInit+0x35>
jmp    115f <halMcuInit+0x3f>
xor    %edi,%edi
call   1030 <clockSetMainSrc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<halMcuInit>:
push   %rax
xor    %edi,%edi
call   1040 <clockSelect32k@plt>
test   %rax,%rax
je     1152 <halMcuInit+0x32>
mov    $0x1,%edi
call   1030 <clockSetMainSrc@plt>
xor    %edi,%edi
call   1040 <clockSelect32k@plt>
test   %rax,%rax
je     1152 <halMcuInit+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
jmp    1150 <halMcuInit+0x30>
xor    %edi,%edi
pop    %rax
jmp    1030 <clockSetMainSrc@plt>

LLVM IR (-O0):
define void @halMcuInit() {
%1 = call i64 @clockSelect32k(i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = call i32 @clockSetMainSrc(i32 1)
%5 = call i64 @clockSelect32k(i32 0)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
br label %8
8: ; preds = %8, %7
br label %8
9: ; preds = %3
br label %10
10: ; preds = %9, %0
%11 = call i32 @clockSetMainSrc(i32 0)
ret void
}

LLVM IR (-O2):
define void @halMcuInit() {
%1 = tail call i64 @clockSelect32k(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 @clockSetMainSrc(i32 1)
%5 = tail call i64 @clockSelect32k(i32 0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %3, %7
br label %7
8: ; preds = %3, %0
%9 = tail call i32 @clockSetMainSrc(i32 0)
ret void
}
/* Type definitions */
struct sc_error {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sc_die_on_error(struct sc_error *);
void sc_error_forward(struct sc_error **recipient, struct sc_error *error) {
  if (recipient != NULL) {
    *recipient = error;
  } else {
    sc_die_on_error(error);
  }
}


x86 assembly (clang, -O0):
<sc_error_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113b <sc_error_forward+0x2b>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1144 <sc_error_forward+0x34>
mov    -0x10(%rbp),%rdi
call   1030 <sc_die_on_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_error_forward>:
test   %rdi,%rdi
je     1119 <sc_error_forward+0x9>
mov    %rsi,(%rdi)
ret
mov    %rsi,%rdi
jmp    1030 <sc_die_on_error@plt>

LLVM IR (-O0):
%struct.sc_error = type { i32 }
define void @sc_error_forward(%struct.sc_error** %0, %struct.sc_error* %1) {
%3 = alloca %struct.sc_error**
%4 = alloca %struct.sc_error*
store %struct.sc_error** %0, %struct.sc_error*** %3
store %struct.sc_error* %1, %struct.sc_error** %4
%5 = load %struct.sc_error**, %struct.sc_error*** %3
%6 = icmp ne %struct.sc_error** %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.sc_error*, %struct.sc_error** %4
%9 = load %struct.sc_error**, %struct.sc_error*** %3
store %struct.sc_error* %8, %struct.sc_error** %9
br label %13
10: ; preds = %2
%11 = load %struct.sc_error*, %struct.sc_error** %4
%12 = call i32 @sc_die_on_error(%struct.sc_error* %11)
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
%struct.sc_error = type { i32 }
define void @sc_error_forward(%struct.sc_error** writeonly %0, %struct.sc_error* %1) {
%3 = icmp eq %struct.sc_error** %0, null
br i1 %3, label %5, label %4
4: ; preds = %2
store %struct.sc_error* %1, %struct.sc_error** %0
br label %7
5: ; preds = %2
%6 = tail call i32 @sc_die_on_error(%struct.sc_error* %1)
br label %7
7: ; preds = %5, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void synopsis(char *progname) {
  printf("\nSynopsis:\n");
  printf("%s [-r machinename] [-p netport] [-s \"stty params\"] [-m "
         "maxconnect] [-q] [-w] [-h] [-H] device\n\n",
         progname);
}


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

x86 assembly (clang, -O2):
<synopsis>:
push   %rbx
mov    %rdi,%rbx
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\0ASynopsis:\0A\00"
@.str.1 = [97 x i8] c"%s [-r machinename] [-p netport] [-s \22stty params\22] [-m maxconnect] [-q] [-w] [-h] [-H] device\0A\0A\00"
define void @synopsis(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [97 x i8] c"%s [-r machinename] [-p netport] [-s \22stty params\22] [-m maxconnect] [-q] [-w] [-h] [-H] device\0A\0A\00"
@str = [11 x i8] c"\0ASynopsis:\00"
define void @synopsis(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int pin_config_group_get(const char *dev_name, const char *pin_group,
                         unsigned long *config) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pin_config_group_get(i8* %0, i8* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64* %2, i64** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @pin_config_group_get(i8* nocapture readnone %0, i8* nocapture readnone %1, i64* nocapture readnone %2) {
ret i32 0
}
void itoj(int a[], int i, int j) {
  int tmp = a[i];
  a[i] = a[j];
  a[j] = tmp;
}


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

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

LLVM IR (-O0):
define void @itoj(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, 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
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @itoj(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ threeHeads();
int main(int argc, const char *argv[]) {
  threeHeads();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <threeHeads@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @threeHeads()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @threeHeads()
ret i32 0
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int f_bold() { return fputs("[1m", stdout); }


x86 assembly (clang, -O0):
<f_bold>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bold>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[1m\00"
@stdout = global i32 0
define i32 @f_bold() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1m\00"
@stdout = global i32 0
define i32 @f_bold() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
short h_dim(short *, short *);
short intr_wrap_171(short p1, short p2) { return h_dim(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_171>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <h_dim@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_171>:
push   %rax
mov    %di,0x6(%rsp)
mov    %si,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <h_dim@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_171(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @h_dim(i16* %3, i16* %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @intr_wrap_171(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @h_dim(i16* %3, i16* %4)
ret i16 %5
}
void AdPlug_LogFile(char *filename) {}


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

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

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

LLVM IR (-O2):
define void @AdPlug_LogFile(i8* nocapture %0) {
ret void
}
void audio_setsndvolume(int volume) {}


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

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

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

LLVM IR (-O2):
define void @audio_setsndvolume(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgbool(void) {
  gen("negq\t%rax");
  gen("sbbq\t%rax,%rax");
  gen("negq\t%rax");
}


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

x86 assembly (clang, -O2):
<cgbool>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <gen@plt>
lea    0xee3(%rip),%rdi
call   1030 <gen@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"negq\09%rax\00"
@.str.1 = [15 x i8] c"sbbq\09%rax,%rax\00"
define void @cgbool() {
%1 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"negq\09%rax\00"
@.str.1 = [15 x i8] c"sbbq\09%rax,%rax\00"
define void @cgbool() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @gen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ afficher_zone(void *, size_t, int);
void afficher_zone_libre(void *adresse, size_t taille, int free) {
  if (free)
    afficher_zone(adresse, taille, 1);
}


x86 assembly (clang, -O0):
<afficher_zone_libre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     113f <afficher_zone_libre+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <afficher_zone@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficher_zone_libre>:
test   %edx,%edx
je     111e <afficher_zone_libre+0xe>
mov    $0x1,%edx
jmp    1030 <afficher_zone@plt>
ret

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

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

/* Variables and functions */
int SQLITE_OK;
int memClose(sqlite3_file *pFile) { return SQLITE_OK; }


x86 assembly (clang, -O0):
<memClose>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memClose>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @memClose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @memClose(i32* nocapture readnone %0) {
%2 = load i32, i32* @SQLITE_OK
ret i32 %2
}