xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ do_buffered_acceptable_preference_wme_changes();
int /*<<< orphan*/ do_buffered_link_changes();
int /*<<< orphan*/ do_buffered_wm_changes();
int /*<<< orphan*/ remove_garbage_slots();
void do_buffered_wm_and_ownership_changes(void) {
  do_buffered_acceptable_preference_wme_changes();
  do_buffered_link_changes();
  do_buffered_wm_changes();
  remove_garbage_slots();
}


x86 assembly (clang, -O0):
<do_buffered_wm_and_ownership_changes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <do_buffered_acceptable_preference_wme_changes@plt>
mov    $0x0,%al
call   1030 <do_buffered_link_changes@plt>
mov    $0x0,%al
call   1050 <do_buffered_wm_changes@plt>
mov    $0x0,%al
call   1040 <remove_garbage_slots@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_buffered_wm_and_ownership_changes>:
push   %rax
xor    %eax,%eax
call   1060 <do_buffered_acceptable_preference_wme_changes@plt>
xor    %eax,%eax
call   1030 <do_buffered_link_changes@plt>
xor    %eax,%eax
call   1050 <do_buffered_wm_changes@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <remove_garbage_slots@plt>

LLVM IR (-O0):
define void @do_buffered_wm_and_ownership_changes() {
%1 = call i32 (...) @do_buffered_acceptable_preference_wme_changes()
%2 = call i32 (...) @do_buffered_link_changes()
%3 = call i32 (...) @do_buffered_wm_changes()
%4 = call i32 (...) @remove_garbage_slots()
ret void
}

LLVM IR (-O2):
define void @do_buffered_wm_and_ownership_changes() {
%1 = tail call i32 (...) @do_buffered_acceptable_preference_wme_changes()
%2 = tail call i32 (...) @do_buffered_link_changes()
%3 = tail call i32 (...) @do_buffered_wm_changes()
%4 = tail call i32 (...) @remove_garbage_slots()
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int clear_dobldobl_Laurent_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(772, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_dobldobl_Laurent_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x304,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_dobldobl_Laurent_data>:
mov    $0x304,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @clear_dobldobl_Laurent_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 772, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_dobldobl_Laurent_data() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 772, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ integer_in_range_display_error(unsigned long long const,
                                                  unsigned long long const,
                                                  unsigned long long const);
void _assert_in_range(const unsigned long long value,
                      const unsigned long long minimum,
                      const unsigned long long maximum, const char *const file,
                      const int line) {
  if (!integer_in_range_display_error(value, minimum, maximum)) {
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <integer_in_range_display_error@plt>
cmp    $0x0,%eax
jne    1162 <_assert_in_range+0x42>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_in_range>:
push   %rbp
push   %rbx
push   %rax
mov    %r8d,%ebp
mov    %rcx,%rbx
call   1040 <integer_in_range_display_error@plt>
test   %eax,%eax
je     1139 <_assert_in_range+0x19>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_fail@plt>

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

LLVM IR (-O2):
define void @_assert_in_range(i64 %0, i64 %1, i64 %2, i8* %3, i32 %4) {
%6 = tail call i32 @integer_in_range_display_error(i64 %0, i64 %1, i64 %2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @_fail(i8* %3, i32 %4)
br label %10
10: ; preds = %8, %5
ret void
}
extern char *textcat_Version() {
  return "TextCat "
         "2.2"
         " ("
         "out of place"
         ")";
}


x86 assembly (clang, -O0):
<textcat_Version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<textcat_Version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [27 x i8] c"TextCat 2.2 (out of place)\00"
define i8* @textcat_Version() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [27 x i8] c"TextCat 2.2 (out of place)\00"
define i8* @textcat_Version() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}
void kol_event_mask(unsigned e) { asm volatile("int $0x40" ::"a"(40), "b"(e)); }


x86 assembly (clang, -O0):
<kol_event_mask>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0x28,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_event_mask>:
push   %rbx
mov    %edi,%ebx
mov    $0x28,%eax
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_event_mask(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 40, i32 %0)
ret void
}
void XcmsSetCCCOfColormap() {}


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

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

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

LLVM IR (-O2):
define void @XcmsSetCCCOfColormap() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef enum sizecheck { ____Placeholder_sizecheck } sizecheck;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ xdr_int(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ xdr_long(int /*<<< orphan*/ *, long *);
int /*<<< orphan*/ xdr_short(int /*<<< orphan*/ *, short *);
bool_t xdr_enum(XDR *xdrs, int32_t *ep) {
  enum sizecheck { SIZEVAL };
  if (sizeof(enum sizecheck) == sizeof(long)) {
    return (xdr_long(xdrs, (long *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(int)) {
    return (xdr_int(xdrs, (int *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(short)) {
    return (xdr_short(xdrs, (short *)ep));
  } else {
    return (0);
  }
}


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

x86 assembly (clang, -O2):
<xdr_enum>:
jmp    1030 <xdr_int@plt>

LLVM IR (-O0):
define i32 @xdr_enum(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 @xdr_int(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @xdr_enum(i32* %0, i32* %1) {
%3 = tail call i32 @xdr_int(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ raise(int);
void uninivar_raise(void) {
  int i;
  (void)raise(i);
}


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

x86 assembly (clang, -O2):
<uninivar_raise>:
jmp    1030 <raise@plt>

LLVM IR (-O0):
define void @uninivar_raise() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @raise(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninivar_raise() {
%1 = tail call i32 @raise(i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ output_statistics();
int /*<<< orphan*/ printf(char *);
void signal_handler(int signal) {
  output_statistics();
  printf("Terminating...");
  exit(0);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <output_statistics@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
xor    %eax,%eax
call   1030 <output_statistics@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Terminating...\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @output_statistics()
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"Terminating...\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 (...) @output_statistics()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
void module_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @module_exit() {
ret void
}
adrreg0regx1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((p0[10000000]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl 0x1312d00(%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzwl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114a <adrreg0regx1+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <adrreg0regx1+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0regx1>:
movzwl 0x1312d00(%r8),%edx
01
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @adrreg0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i16, i16* %5, i64 %9
%11 = load i16, i16* %10
%12 = icmp ule i16 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
void VPX_DestroyTables(void) {}


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

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

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

LLVM IR (-O2):
define void @VPX_DestroyTables() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ builtins_destroy();
int destroy_tests(void) {
  builtins_destroy();
  return 0;
}


x86 assembly (clang, -O0):
<destroy_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <builtins_destroy@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @destroy_tests() {
%1 = call i32 (...) @builtins_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @destroy_tests() {
%1 = tail call i32 (...) @builtins_destroy()
ret i32 0
}
void Msp430TimerCapComP__6__Timer__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__6__Timer__overflow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EnableInterrupts();
int /*<<< orphan*/ InitPortsIO();
int /*<<< orphan*/ InitSystemClock();
int /*<<< orphan*/ InitTimers();
void main() {
  InitSystemClock();
  InitPortsIO();
  InitTimers();
  EnableInterrupts();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <InitSystemClock@plt>
mov    $0x0,%al
call   1030 <InitPortsIO@plt>
mov    $0x0,%al
call   1060 <InitTimers@plt>
mov    $0x0,%al
call   1040 <EnableInterrupts@plt>
jmp    1160 <main+0x20>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <InitSystemClock@plt>
xor    %eax,%eax
call   1030 <InitPortsIO@plt>
xor    %eax,%eax
call   1060 <InitTimers@plt>
xor    %eax,%eax
call   1040 <EnableInterrupts@plt>
nopl   (%rax)
jmp    1160 <main+0x20>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @InitSystemClock()
%2 = call i32 (...) @InitPortsIO()
%3 = call i32 (...) @InitTimers()
%4 = call i32 (...) @EnableInterrupts()
br label %5
5: ; preds = %0, %5
br label %5
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @InitSystemClock()
%2 = tail call i32 (...) @InitPortsIO()
%3 = tail call i32 (...) @InitTimers()
%4 = tail call i32 (...) @EnableInterrupts()
br label %5
5: ; preds = %0, %5
br label %5
}
int base11() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @base11() {
ret i32 0
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *str) {
  size_t len = strlen(str) + 1;
  char *res = malloc(len);
  if (res)
    memcpy(res, str, len);
  return res;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1177 <strdup+0x47>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <strdup+0x31>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
/* Type definitions */
struct ptlrpc_cli_ctx {
  int dummy;
};

/* Variables and functions */
scalar_t__ cli_ctx_status(struct ptlrpc_cli_ctx *);
int cli_ctx_is_refreshed(struct ptlrpc_cli_ctx *ctx) {
  return (cli_ctx_status(ctx) != 0);
}


x86 assembly (clang, -O0):
<cli_ctx_is_refreshed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cli_ctx_status@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ptlrpc_cli_ctx = type { i32 }
define i32 @cli_ctx_is_refreshed(%struct.ptlrpc_cli_ctx* %0) {
%2 = alloca %struct.ptlrpc_cli_ctx*
store %struct.ptlrpc_cli_ctx* %0, %struct.ptlrpc_cli_ctx** %2
%3 = load %struct.ptlrpc_cli_ctx*, %struct.ptlrpc_cli_ctx** %2
%4 = call i64 @cli_ctx_status(%struct.ptlrpc_cli_ctx* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ptlrpc_cli_ctx = type { i32 }
define i32 @cli_ctx_is_refreshed(%struct.ptlrpc_cli_ctx* %0) {
%2 = tail call i64 @cli_ctx_status(%struct.ptlrpc_cli_ctx* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) { printf("EOF=%d\n", EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"EOF=%d\0A\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EOF
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"EOF=%d\0A\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EOF
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t HibernateLowBatGet(void) {
  return ((*((volatile unsigned long *)(0x400FC010))) &
          (0x00006000 | 0x000000A0));
}


x86 assembly (clang, -O0):
<HibernateLowBatGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rax
and    $0x60a0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateLowBatGet>:
mov    0x400fc010,%rax
40
and    $0x60a0,%eax
ret

LLVM IR (-O0):
define i64 @HibernateLowBatGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, 24736
ret i64 %2
}

LLVM IR (-O2):
define i64 @HibernateLowBatGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, 24736
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char const *);
int /*<<< orphan*/ ft_putstr_from(char const *, int);
void recurse_put_path(const char *path) {
  if (path[0] == '/')
    ft_putstr(path);
  else
    ft_putstr_from(path, 2);
  ft_putstr(":\n");
}


x86 assembly (clang, -O0):
<recurse_put_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    114a <recurse_put_path+0x2a>
mov    -0x8(%rbp),%rdi
call   1040 <ft_putstr@plt>
jmp    1158 <recurse_put_path+0x38>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <ft_putstr_from@plt>
lea    0xea1(%rip),%rdi
call   1040 <ft_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse_put_path>:
push   %rax
cmpb   $0x2f,(%rdi)
jne    112d <recurse_put_path+0xd>
call   1040 <ft_putstr@plt>
jmp    1137 <recurse_put_path+0x17>
mov    $0x2,%esi
call   1030 <ft_putstr_from@plt>
lea    0xec2(%rip),%rdi
pop    %rax
jmp    1040 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [3 x i8] c":\0A\00"
define void @recurse_put_path(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @ft_putstr(i8* %9)
br label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @ft_putstr_from(i8* %12, i32 2)
br label %14
14: ; preds = %11, %8
%15 = call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c":\0A\00"
define void @recurse_put_path(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @ft_putstr(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @ft_putstr_from(i8* %0, i32 2)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  int i;
  for (i = 0; i < 10; i++)
    if (!i)
      continue;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    113e <main+0x3e>
cmpl   $0x0,-0x8(%rbp)
jne    112b <main+0x2b>
jmp    1130 <main+0x30>
jmp    1130 <main+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_A2int64_lowword_reg(long long val) {
  return ((val) & (0xA2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_A2int64_lowword_reg>:
test   $0xa2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A2int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 162
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_window_stick() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_stick() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_y(void *_p, int _v) {
  ((XLeaveWindowEvent *)_p)->y = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XLeaveWindowEvent_y(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_y(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _print_horiz(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void print_xbm_horiz(void) {
  printf("#define vh_width 8"
         "\n"
         "#define vh_height 1024"
         "\n"
         "static unsigned char vh_bits[] = {"
         "\n");
  _print_horiz(0);
  printf("};"
         "\n");
}


x86 assembly (clang, -O0):
<print_xbm_horiz>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <_print_horiz@plt>
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_xbm_horiz>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <_print_horiz@plt>
lea    0xf12(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"#define vh_width 8\0A#define vh_height 1024\0Astatic unsigned char vh_bits[] = {\0A\00"
@.str.1 = [4 x i8] c"};\0A\00"
define void @print_xbm_horiz() {
%1 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @_print_horiz(i32 0)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [77 x i8] c"#define vh_width 8\0A#define vh_height 1024\0Astatic unsigned char vh_bits[] = {\00"
@str.2 = [3 x i8] c"};\00"
define void @print_xbm_horiz() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @_print_horiz(i32 0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage:\n");
  printf("\n");
  printf("  pigeonhole n\n");
  printf("\n");
  printf("where n>0 is the number of holes (the number of pigeons is n+1).\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb2(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [16 x i8] c" pigeonhole n\0A\00"
@.str.3 = [66 x i8] c"where n>0 is the number of holes (the number of pigeons is n+1).\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.4 = [15 x i8] c" pigeonhole n\00"
@str.5 = [65 x i8] c"where n>0 is the number of holes (the number of pigeons is n+1).\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int read(int /*<<< orphan*/, char *, int);
int ft_readchar(char *c) { return (read(STDIN_FILENO, c, 1)); }


x86 assembly (clang, -O0):
<ft_readchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_readchar>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%edx
jmp    1030 <read@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define i32 @ft_readchar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDIN_FILENO
%4 = load i8*, i8** %2
%5 = call i32 @read(i32 %3, i8* %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define i32 @ft_readchar(i8* nocapture %0) {
%2 = load i32, i32* @STDIN_FILENO
%3 = tail call i32 @read(i32 %2, i8* %0, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ M3_profile(int /*<<< orphan*/, char const *,
                              int /*<<< orphan*/);
void M3_ProfileInit(const char *titleString) {
#pragma omp master
  {
    static int firstCall = 1;
    if (firstCall) {
      M3_profile(0, titleString, 0);
      firstCall = 0;
    }
  }
}


x86 assembly (clang, -O0):
<M3_ProfileInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpl   $0x0,0x2f05(%rip)
je     1140 <M3_ProfileInit+0x30>
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
mov    %edx,%edi
call   1030 <M3_profile@plt>
movl   $0x0,0x2ee8(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M3_ProfileInit>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    112d <M3_ProfileInit+0x1d>
mov    %rdi,%rsi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <M3_profile@plt>
movb   $0x1,0x2eff(%rip)
pop    %rax
ret

LLVM IR (-O0):
@M3_ProfileInit.firstCall = internal global i32 1
define void @M3_ProfileInit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @M3_ProfileInit.firstCall
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @M3_profile(i32 0, i8* %6, i32 0)
store i32 0, i32* @M3_ProfileInit.firstCall
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@M3_ProfileInit.firstCall = internal unnamed_addr global i1 false
define void @M3_ProfileInit(i8* %0) {
%2 = load i1, i1* @M3_ProfileInit.firstCall
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @M3_profile(i32 0, i8* %0, i32 0)
store i1 true, i1* @M3_ProfileInit.firstCall
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_HAVEGE_C not defined.\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"MBEDTLS_HAVEGE_C not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"MBEDTLS_HAVEGE_C not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printz(char *str) { printf("%s\n", str); }


x86 assembly (clang, -O0):
<printz>:
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):
<printz>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printz(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printDessert();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello Git!\n");
  printf("It's a hit!\n");
  printDessert();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <printDessert@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello Git!\0A\00"
@.str.1 = [13 x i8] c"It's a hit!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @printDessert()
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Hello Git!\00"
@str.2 = [12 x i8] c"It's a hit!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @printDessert()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord4dv(int /*<<< orphan*/ *);
void TexCoord4dv(GLdouble v[4]) { glTexCoord4dv(v); }


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

x86 assembly (clang, -O2):
<TexCoord4dv>:
jmp    1030 <glTexCoord4dv@plt>

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

LLVM IR (-O2):
define void @TexCoord4dv(i32* %0) {
%2 = tail call i32 @glTexCoord4dv(i32* %0)
ret void
}
int fib(int n) {
  if (n == 0)
    return 0;
  else if (n == 1 || n == 2)
    return 1;
  else
    return (fib(n - 1) + fib(n - 2));
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <fib+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1174 <fib+0x64>
cmpl   $0x1,-0x8(%rbp)
je     1145 <fib+0x35>
cmpl   $0x2,-0x8(%rbp)
jne    1151 <fib+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1174 <fib+0x64>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
je     1146 <fib+0x36>
mov    %edi,%ebp
add    $0xffffffff,%ebp
mov    $0x1,%ebx
cmp    $0x2,%ebp
jb     1148 <fib+0x38>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <fib@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
cmp    $0x1,%ebp
ja     1130 <fib+0x20>
add    $0x1,%ebx
jmp    1148 <fib+0x38>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = icmp ult i32 %4, 2
br i1 %5, label %17, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %13, %6 ], [ %4, %3 ]
%8 = phi i32 [ %12, %6 ], [ 0, %3 ]
%9 = phi i32 [ %11, %6 ], [ %0, %3 ]
%10 = tail call i32 @fib(i32 %7)
%11 = add nsw i32 %9, -2
%12 = add nsw i32 %10, %8
%13 = add i32 %9, -3
%14 = icmp ult i32 %13, 2
br i1 %14, label %15, label %6
15: ; preds = %6
%16 = add i32 %12, 1
br label %17
17: ; preds = %3, %15, %1
%18 = phi i32 [ 0, %1 ], [ %16, %15 ], [ 1, %3 ]
ret i32 %18
}
/* Variables and functions */
double fabs(scalar_t__);
scalar_t__ log(double);
int main(int argc, char const *argv[]) {
  if (fabs(log(2.0) - 0.693147181) < 0.00001) {
    return 0;
  }
  return 1;
}


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)
movsd  0xed2(%rip),%xmm0
call   1040 <log@plt>
cvtsi2sd %rax,%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117f <main+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    1186 <main+0x66>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xeca(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <fabs@plt>
movsd  0xec0(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
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 i64 @log(double 2.000000e+00)
%7 = sitofp i64 %6 to double
%8 = fsub double %7, 0x3FE62E42FF36B4FB
%9 = fptosi double %8 to i64
%10 = call double @fabs(i64 %9)
%11 = fcmp olt double %10, 1.000000e-05
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %14
13: ; preds = %2
store i32 1, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @log(double 2.000000e+00)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, 0xBFE62E42FF36B4FB
%6 = fptosi double %5 to i64
%7 = tail call double @fabs(i64 %6)
%8 = fcmp uge double %7, 1.000000e-05
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
void strncat(char *s, char *t, int n) {
  void strncpy(char *s, char *t, int n);
  int strlen(char *s);
  strncpy(s + strlen(s), t, n);
}


x86 assembly (clang, -O0):
<strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncat>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
movslq %eax,%rdi
add    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <strncpy@plt>

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

LLVM IR (-O2):
define void @strncat(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
tail call void @strncpy(i8* %6, i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int getpgrp();
int getpid();
int /*<<< orphan*/ printf(char *, int, int);
void print() {
  pid_t pid = getpid();
  pid_t grp = getpgrp();
  printf("pid = %u, grp = %u\n", pid, grp);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getpgrp@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getpgrp@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"pid = %u, grp = %u\0A\00"
define void @print() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getpid()
store i32 %3, i32* %1
%4 = call i32 (...) @getpgrp()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"pid = %u, grp = %u\0A\00"
define void @print() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 (...) @getpgrp()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
bool alg_can_repeat(char alg) {
  return !(alg == 'V' || alg == 'L' || alg == 'D');
}


x86 assembly (clang, -O0):
<alg_can_repeat>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x56,%ecx
mov    %al,-0x2(%rbp)
je     113b <alg_can_repeat+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x4c,%ecx
mov    %al,-0x2(%rbp)
je     113b <alg_can_repeat+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x44,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alg_can_repeat>:
xor    %eax,%eax
cmp    $0x4c,%dil
je     110e <alg_can_repeat+0xe>
cmp    $0x56,%dil
jne    110f <alg_can_repeat+0xf>
ret
xor    %eax,%eax
cmp    $0x44,%dil
setne  %al
ret

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

LLVM IR (-O2):
define i32 @alg_can_repeat(i8 signext %0) {
switch i8 %0, label %2 [
i8 86, label %5
i8 76, label %5
]
2: ; preds = %1
%3 = icmp ne i8 %0, 68
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 0, %1 ], [ %4, %2 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a, b, c, undefined;
  int *pointer;
  a = 1;
  b = 10;
  if (undefined) {
    pointer = &a;
  } else {
    pointer = &b;
  }
  c = *pointer;
  assert(c >= 1 && c <= 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1144 <main+0x34>
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114c <main+0x3c>
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x10(%rbp)
mov    %al,-0x21(%rbp)
jl     116e <main+0x5e>
cmpl   $0xa,-0x10(%rbp)
setle  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}