xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_set_sink_mute_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_set_sink_mute_by_name"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_context_set_sink_mute_by_name\00"
define i32 @pa_context_set_sink_mute_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void RTFileUnlock(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileUnlock() {
ret void
}
/* Variables and functions */
int _ctype_lookup(int);
int isblank(int c) { return _ctype_lookup(c) & (0x80); }


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

x86 assembly (clang, -O2):
<isblank>:
push   %rax
call   1030 <_ctype_lookup@plt>
and    $0x80,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_ctype_lookup(i32 %3)
%5 = and i32 %4, 128
ret i32 %5
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = tail call i32 @_ctype_lookup(i32 %0)
%3 = and i32 %2, 128
ret i32 %3
}
void sdram_first_normal_reference(void) {}


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

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

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

LLVM IR (-O2):
define void @sdram_first_normal_reference() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ seed48(unsigned short *);
unsigned short time(int /*<<< orphan*/);
void myseed() {
  int i;
  unsigned short seed16v[3];
  for (i = 0; i < 3; i++)
    seed16v[i] = time(0);
  seed48(seed16v);
}


x86 assembly (clang, -O0):
<myseed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    115a <myseed+0x3a>
xor    %edi,%edi
call   1030 <time@plt>
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0xa(%rbp,%rax,2)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <myseed+0xf>
lea    -0xa(%rbp),%rdi
call   1040 <seed48@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myseed>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %ax,0x2(%rsp)
xor    %edi,%edi
call   1030 <time@plt>
mov    %ax,0x4(%rsp)
xor    %edi,%edi
call   1030 <time@plt>
mov    %ax,0x6(%rsp)
lea    0x2(%rsp),%rdi
call   1040 <seed48@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @myseed() {
%1 = alloca i32
%2 = alloca [3 x i16]
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = call zeroext i16 @time(i32 0)
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 %9
store i16 %7, i16* %10
br label %11
11: ; preds = %6
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %3
14: ; preds = %3
%15 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 0
%16 = call i32 @seed48(i16* %15)
ret void
}

LLVM IR (-O2):
define void @myseed() {
%1 = alloca [3 x i16]
%2 = bitcast [3 x i16]* %1 to i8*
%3 = tail call zeroext i16 @time(i32 0)
%4 = getelementptr inbounds [3 x i16], [3 x i16]* %1, i64 0, i64 0
store i16 %3, i16* %4
%5 = tail call zeroext i16 @time(i32 0)
%6 = getelementptr inbounds [3 x i16], [3 x i16]* %1, i64 0, i64 1
store i16 %5, i16* %6
%7 = tail call zeroext i16 @time(i32 0)
%8 = getelementptr inbounds [3 x i16], [3 x i16]* %1, i64 0, i64 2
store i16 %7, i16* %8
%9 = call i32 @seed48(i16* %4)
ret void
}
void nop_printf(const char *fmt, ...) { (void)fmt; }


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

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

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

LLVM IR (-O2):
define void @nop_printf(i8* nocapture %0, ...) {
ret void
}
void arteUnlock(void) {}


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

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

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

LLVM IR (-O2):
define void @arteUnlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
char *string_next_nonwhitespace(const char *s) {
  while (*s != '\0') {
    if (!isspace(*s)) {
      return (char *)s;
    }
    s++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<string_next_nonwhitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115f <string_next_nonwhitespace+0x4f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114e <string_next_nonwhitespace+0x3e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <string_next_nonwhitespace+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <string_next_nonwhitespace+0xc>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_next_nonwhitespace>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <string_next_nonwhitespace+0x28>
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     113a <string_next_nonwhitespace+0x2a>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <string_next_nonwhitespace+0x10>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @string_next_nonwhitespace(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ null, %1 ], [ null, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ config_MODULE_CCCAM();
int config_MODULE_CCCSHARE(void) { return config_MODULE_CCCAM() ? 1 : 0; }


x86 assembly (clang, -O0):
<config_MODULE_CCCSHARE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <config_MODULE_CCCAM@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_MODULE_CCCSHARE>:
push   %rax
xor    %eax,%eax
call   1030 <config_MODULE_CCCAM@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @config_MODULE_CCCSHARE() {
%1 = call i64 (...) @config_MODULE_CCCAM()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @config_MODULE_CCCSHARE() {
%1 = tail call i64 (...) @config_MODULE_CCCAM()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ executeSQLCommand(int /*<<< orphan*/ *, char *);
char *sqlite3_mprintf(char *, char *);
void removeUser(sqlite3 *db, char *username) {
  char *sql =
      sqlite3_mprintf("Delete from Database Where Username = '%q';", username);
  executeSQLCommand(db, sql);
}


x86 assembly (clang, -O0):
<removeUser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <executeSQLCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeUser>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <executeSQLCommand@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Delete from Database Where Username = '%q';\00"
define void @removeUser(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %6)
store i8* %7, i8** %5
%8 = load i32*, i32** %3
%9 = load i8*, i8** %5
%10 = call i32 @executeSQLCommand(i32* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Delete from Database Where Username = '%q';\00"
define void @removeUser(i32* %0, i8* %1) {
%3 = tail call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @executeSQLCommand(i32* %0, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short);
__attribute__((no, noclone)) unsigned short f27(unsigned short x,
                                                unsigned short y) {
  unsigned short r = x + y;
  if (x < r)
    foo(r);
  return r;
}


x86 assembly (clang, -O0):
<f27>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jge    114d <f27+0x3d>
movzwl -0x6(%rbp),%edi
call   1030 <foo@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f27>:
push   %rbx
mov    %esi,%ebx
add    %edi,%ebx
cmp    %di,%bx
jbe    1122 <f27+0x12>
movzwl %bx,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @f27(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i16, i16* %5
%19 = call i32 @foo(i16 zeroext %18)
br label %20
20: ; preds = %17, %2
%21 = load i16, i16* %5
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @f27(i16 zeroext %0, i16 zeroext %1) {
%3 = add i16 %1, %0
%4 = icmp ugt i16 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i16 zeroext %3)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ vWriteFrmtd(char *, int, ...);
void vprintf_t() {
  vWriteFrmtd("%d variable argument\n", 1);
  vWriteFrmtd("%d variable %s\n", 2, "arguments");
}


x86 assembly (clang, -O0):
<vprintf_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <vWriteFrmtd@plt>
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
lea    0xeec(%rip),%rdx
mov    $0x0,%al
call   1030 <vWriteFrmtd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf_t>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <vWriteFrmtd@plt>
lea    0xeeb(%rip),%rdi
lea    0xef4(%rip),%rdx
mov    $0x2,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <vWriteFrmtd@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"%d variable argument\0A\00"
@.str.1 = [16 x i8] c"%d variable %s\0A\00"
@.str.2 = [10 x i8] c"arguments\00"
define void @vprintf_t() {
%1 = call i32 (i8*, i32, ...) @vWriteFrmtd(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = call i32 (i8*, i32, ...) @vWriteFrmtd(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%d variable argument\0A\00"
@.str.1 = [16 x i8] c"%d variable %s\0A\00"
@.str.2 = [10 x i8] c"arguments\00"
define void @vprintf_t() {
%1 = tail call i32 (i8*, i32, ...) @vWriteFrmtd(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, i32, ...) @vWriteFrmtd(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int elg_pform_is_gclock() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @elg_pform_is_gclock() {
ret i32 0
}
int test_imm_86uint32_mem(unsigned int *val) {
  return ((*val) & (0x86 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_86uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 134
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ Malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
scalar_t__ strlen(char *);
char *strcat2(char *s1, char *s2) {
  char *s;
  s = (char *)Malloc(strlen(s1) + strlen(s2) + 1);
  sprintf(s, "%s%s", s1, s2);
  return s;
}


x86 assembly (clang, -O0):
<strcat2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1030 <Malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe83(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat2>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1030 <Malloc@plt>
mov    %rax,%rbx
lea    0xe9b(%rip),%rsi
mov    %rax,%rdi
mov    %r12,%rdx
mov    %r14,%rcx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define i8* @strcat2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 1
%12 = call i64 @Malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define i8* @strcat2(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i64 @Malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %8
}
/* Variables and functions */
unsigned int hash_ulong(void const *);
unsigned int hash_long(const void *key) { return hash_ulong(key); }


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

x86 assembly (clang, -O2):
<hash_long>:
jmp    1030 <hash_ulong@plt>

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

LLVM IR (-O2):
define i32 @hash_long(i8* %0) {
%2 = tail call i32 @hash_ulong(i8* %0)
ret i32 %2
}
unsigned int inl(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "Nd"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl ${1:w},$0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w},$0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Variables and functions */
int close(int);
int udp_close(void *arg) {
  int *fd = (int *)arg;
  return close(*fd);
}


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

x86 assembly (clang, -O2):
<udp_close>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @udp_close(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @close(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @udp_close(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ v4l2_std_id;
typedef int /*<<< orphan*/ id;

/* Variables and functions */
int main(void) {
  v4l2_std_id id;
  (void)id;
  return sizeof(id);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int MD5_DIGEST_LENGTH;
int /*<<< orphan*/ printf(char *, unsigned char);
void print_md5_sum(unsigned char *md) {
  int i;
  for (i = 0; i < MD5_DIGEST_LENGTH; i++) {
    printf("%02x", md[i]);
  }
}


x86 assembly (clang, -O0):
<print_md5_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jge    115b <print_md5_sum+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
lea    0xebc(%rip),%rdi
movzbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_md5_sum+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_md5_sum>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2ec1(%rip),%r15
cmpl   $0x0,(%r15)
jle    1159 <print_md5_sum+0x49>
mov    %rdi,%r12
xor    %ebx,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%r12,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
movslq (%r15),%rax
cmp    %rax,%rbx
jl     1140 <print_md5_sum+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@MD5_DIGEST_LENGTH = global i32 0
@.str = [5 x i8] c"%02x\00"
define void @print_md5_sum(i8* nocapture %0) {
%2 = load i32, i32* @MD5_DIGEST_LENGTH
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = add nuw nsw i64 %5, 1
%10 = load i32, i32* @MD5_DIGEST_LENGTH
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void key_6_handler(void) {
  uart_puts("\nkey_6_handler");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"\0Akey_6_handler\00"
define void @key_6_handler() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printLine1(const char *content) { printf("%s\n\r", content); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s\0A\0D\00"
define void @printLine1(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void op_code_normal_case0x40(void) {}


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

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

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

LLVM IR (-O2):
define void @op_code_normal_case0x40() {
ret void
}
char bitfield_get(char *bitfield, int index) {
  return (1 << (index % 8) & bitfield[index / 8]) > 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<bitfield_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitfield_get>:
mov    %esi,%eax
and    $0x7,%al
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
movzbl (%rdi,%rcx,1),%ecx
movzbl %al,%eax
bt     %eax,%ecx
setb   %al
ret

LLVM IR (-O0):
define signext i8 @bitfield_get(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = srem i32 %5, 8
%7 = shl i32 1, %6
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 8
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = and i32 %7, %14
%16 = icmp sgt i32 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 0
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @bitfield_get(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = sdiv i32 %1, 8
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = and i32 %4, %9
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i8
ret i8 %12
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dapxsum(int, double, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dapxsum(N, 5.0, x, stride);
  printf("sum: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%edx
movsd  0xe93(%rip),%xmm0
call   1050 <stdlib_strided_dapxsum@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movsd  0xea5(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dapxsum@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dapxsum(i32 %6, double 5.000000e+00, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dapxsum(i32 4, double 5.000000e+00, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int stop_script(int pi, unsigned script_id) {
  return pigpio_command(pi, 41, script_id, 0, 1);
}


x86 assembly (clang, -O0):
<stop_script>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x29,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_script>:
mov    %esi,%edx
mov    $0x29,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @stop_script(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 = call i32 @pigpio_command(i32 %5, i32 41, i32 %6, i32 0, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stop_script(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 41, i32 %1, i32 0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int profits, profits3;
  int expenses = 27;
  int income = 120;
  profits = income - expenses;
  profits3 = (income - expenses) * 3;
  printf("Garage sale profits were $%d.", profits);
  printf("\nTriple profits would have been $%d.", profits3);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1b,-0x10(%rbp)
movl   $0x78,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"Garage sale profits were $%d.\00"
@.str.1 = [37 x i8] c"\0ATriple profits would have been $%d.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 27, i32* %4
store i32 120, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = mul nsw i32 %11, 3
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Garage sale profits were $%d.\00"
@.str.1 = [37 x i8] c"\0ATriple profits would have been $%d.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 93)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 279)
ret i32 0
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
void freeze(struct task_struct *p) { BUG(); }


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

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

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @freeze(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = call i32 (...) @BUG()
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @freeze(%struct.task_struct* nocapture readnone %0) {
%2 = tail call i32 (...) @BUG()
ret void
}
char __SubStrings__ASCII__LowerC(const char C) {
  if (C >= 'A' && C <= 'Z')
    return C + ('a' - 'A');
  else
    return C;
}


x86 assembly (clang, -O0):
<__SubStrings__ASCII__LowerC>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <__SubStrings__ASCII__LowerC+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <__SubStrings__ASCII__LowerC+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <__SubStrings__ASCII__LowerC+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SubStrings__ASCII__LowerC>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @__SubStrings__ASCII__LowerC(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @__SubStrings__ASCII__LowerC(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ clear_rect(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void clear_topbar(void) { clear_rect(0, 0, 1, 80); }


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

x86 assembly (clang, -O2):
<clear_topbar>:
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x50,%ecx
jmp    1030 <clear_rect@plt>

LLVM IR (-O0):
define void @clear_topbar() {
%1 = call i32 @clear_rect(i32 0, i32 0, i32 1, i32 80)
ret void
}

LLVM IR (-O2):
define void @clear_topbar() {
%1 = tail call i32 @clear_rect(i32 0, i32 0, i32 1, i32 80)
ret void
}
int _thread_cnt(int cnt) {
  if (cnt <= 0)
    return 4;
  else
    return cnt;
}


x86 assembly (clang, -O0):
<_thread_cnt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <_thread_cnt+0x1d>
movl   $0x4,-0x4(%rbp)
jmp    1123 <_thread_cnt+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_thread_cnt>:
test   %edi,%edi
mov    $0x4,%eax
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @_thread_cnt(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = select i1 %2, i32 4, i32 %0
ret i32 %3
}
int isNumber(char car) { return (car >= '0' && car <= '9') || car == '-'; }


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <isNumber+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1136 <isNumber+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x2d,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isNumber(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isNumber(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = icmp eq i8 %0, 45
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
void testAsmSuit() {
  int aaa = 1;
  int bbbbb = 1;
  int c = 1;
  __asm__("add %1,%0\n\t"
          "mov %0,%2\n\t"
          : "=r"(aaa)
          : "r"(bbbbb), "r"(aaa));
  assert(aaa == 2);
}


x86 assembly (clang, -O0):
<testAsmSuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    %eax,%eax
mov    %eax,%ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAsmSuit>:
mov    $0x1,%eax
add    %eax,%eax
mov    %eax,%eax
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
xor    %eax,%eax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @testAsmSuit() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 1, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = call i32 asm "add $1,$0\0A\09mov $0,$2\0A\09", "=r,r,r,~{dirflag},~{fpsr},~{flags}"(i32 %4, i32 %5)
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 2
%9 = zext i1 %8 to i32
%10 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %9)
ret void
}

LLVM IR (-O2):
define void @testAsmSuit() {
%1 = tail call i32 asm "add $1,$0\0A\09mov $0,$2\0A\09", "=r,r,r,~{dirflag},~{fpsr},~{flags}"(i32 1, i32 1)
%2 = icmp eq i32 %1, 2
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %3)
ret void
}
signed char explicit_voidptr_to_signed_char(void *src) {
  return (signed char)src;
}


x86 assembly (clang, -O0):
<explicit_voidptr_to_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @explicit_voidptr_to_signed_char(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @explicit_voidptr_to_signed_char(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i8
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char *);
int /*<<< orphan*/ stderr;
int _protoid_error(char const *message, int ret) {
  fprintf(stderr, "%s: %s: %s\n", "protoid", message, "Protocol not found");
  return ret;
}


x86 assembly (clang, -O0):
<_protoid_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xecd(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xed3(%rip),%r8
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_protoid_error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
lea    0xedf(%rip),%rdx
lea    0xee0(%rip),%r8
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@.str.1 = [8 x i8] c"protoid\00"
@.str.2 = [19 x i8] c"Protocol not found\00"
define i32 @_protoid_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@.str.1 = [8 x i8] c"protoid\00"
@.str.2 = [19 x i8] c"Protocol not found\00"
define i32 @_protoid_error(i8* %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}
double fade(double t) { return t * t * t * (t * (t * 6 - 15) + 10); }


x86 assembly (clang, -O0):
<fade>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0xede(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeda(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeba(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fade>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeec(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xee4(%rip),%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fade(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = load double, double* %2
%10 = call double @llvm.fmuladd.f64(double %9, double 6.000000e+00, double -1.500000e+01)
%11 = call double @llvm.fmuladd.f64(double %8, double %10, double 1.000000e+01)
%12 = fmul double %7, %11
ret double %12
}

LLVM IR (-O2):
define double @fade(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
%4 = tail call double @llvm.fmuladd.f64(double %0, double 6.000000e+00, double -1.500000e+01)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 1.000000e+01)
%6 = fmul double %3, %5
ret double %6
}
/* Type definitions */
typedef int __u64;

/* Variables and functions */
int hea_u64_bit(int);
__u64 hea_set_u64_bit(__u64 v, int b) { return v | hea_u64_bit(b); }


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

x86 assembly (clang, -O2):
<hea_set_u64_bit>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <hea_u64_bit@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hea_set_u64_bit(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 = call i32 @hea_u64_bit(i32 %6)
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hea_set_u64_bit(i32 %0, i32 %1) {
%3 = tail call i32 @hea_u64_bit(i32 %1)
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ time(int);
__attribute__((visibility("hidden"))) void func_0xE2_0x00() {
  time(2);
  ;
}


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

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

LLVM IR (-O0):
define hidden void @func_0xE2_0x00() {
%1 = call i32 @time(i32 2)
ret void
}

LLVM IR (-O2):
define hidden void @func_0xE2_0x00() {
%1 = tail call i32 @time(i32 2)
ret void
}
/* Variables and functions */
bool nrf52_errata_213(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_213() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gmx_clustsize(int, char **);
int main(int argc, char *argv[]) {
  gmx_clustsize(argc, argv);
  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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_clustsize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_clustsize@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_clustsize(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_clustsize(i32 %0, i8** %1)
ret i32 0
}
char getc(void) {
  while (((*((volatile unsigned long *)0x7F005018)) & 0x7f) == 0)
    ;
  return (*((volatile unsigned char *)0x7F005024));
}


x86 assembly (clang, -O0):
<getc>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <getc+0x9>
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x7f,%rax
cmp    $0x0,%rax
jne    1124 <getc+0x24>
jmp    1109 <getc+0x9>
mov    $0x7f005024,%eax
mov    (%rax),%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc>:
testq  $0x7f,0x7f005018
je     1100 <getc>
mov    0x7f005024,%al
ret

LLVM IR (-O0):
define signext i8 @getc() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @getc() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %6
}