xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_ENC_CONTENT;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ENC_CONTENT_it;
PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void) {
  return (PKCS7_ENC_CONTENT *)ASN1_item_new(&PKCS7_ENC_CONTENT_it);
}


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

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

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

LLVM IR (-O2):
@PKCS7_ENC_CONTENT_it = global i32 0
define i32* @PKCS7_ENC_CONTENT_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_ENC_CONTENT_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ cortexa9_init();
void _profile_init(void) { (void)cortexa9_init(); }


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

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

LLVM IR (-O0):
define void @_profile_init() {
%1 = call i32 (...) @cortexa9_init()
ret void
}

LLVM IR (-O2):
define void @_profile_init() {
%1 = tail call i32 (...) @cortexa9_init()
ret void
}
/* Variables and functions */
char const *getenv(char *);
const char *IoTHubAccount_GetIoTHubSuffix(void) {
  return getenv("IOTHUB_SUFFIX");
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"IOTHUB_SUFFIX\00"
define i8* @IoTHubAccount_GetIoTHubSuffix() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [14 x i8] c"IOTHUB_SUFFIX\00"
define i8* @IoTHubAccount_GetIoTHubSuffix() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
struct RNAplot_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int RNAplot_cmdline_parser_required(struct RNAplot_args_info *args_info,
                                    const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
%struct.RNAplot_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAplot_cmdline_parser_required(%struct.RNAplot_args_info* %0, i8* %1) {
%3 = alloca %struct.RNAplot_args_info*
%4 = alloca i8*
store %struct.RNAplot_args_info* %0, %struct.RNAplot_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.RNAplot_args_info*, %struct.RNAplot_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.RNAplot_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAplot_cmdline_parser_required(%struct.RNAplot_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ swap_octets(int *, int *, int);
int lire_int_binaire_swap(FILE *fichier) {
  int entier, entier2;
  fread(&entier, 4, 1, fichier);
  swap_octets(&entier, &entier2, 4);
  return (entier2);
}


x86 assembly (clang, -O0):
<lire_int_binaire_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1040 <swap_octets@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lire_int_binaire_swap>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <swap_octets@plt>
mov    0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @lire_int_binaire_swap(i32* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%7 = call i32 @swap_octets(i32* %2, i32* %3, i32 4)
%8 = load i32, i32* %3
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
int sigismember(const sigset_t *set, int signum) {
  (void)set;
  (void)signum;
  StubBug("STUB:"
          "sigismember");
  return 0;
}


x86 assembly (clang, -O0):
<sigismember>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <StubBug@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"STUB:sigismember\00"
define i32 @sigismember(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 @StubBug(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"STUB:sigismember\00"
define i32 @sigismember(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @StubBug(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showARPTable();
void cmdShowArpTbl(int cmdType, struct cmd_arg *pCmdArg) { showARPTable(); }


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowArpTbl(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showARPTable()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowArpTbl(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showARPTable()
ret void
}
/* Type definitions */
typedef int __u64;
typedef int __u32;

/* Variables and functions */
__u64 cyclecounter_cyc2ns(__u64 cycles, __u64 mask, __u32 mult, __u32 shift) {
  __u64 ns = (__u64)cycles;
  ns = (ns * mult);
  return ns >> shift;
}


x86 assembly (clang, -O0):
<cyclecounter_cyc2ns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cyclecounter_cyc2ns>:
mov    %edi,%eax
imul   %edx,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @cyclecounter_cyc2ns(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
store i32 %10, i32* %9
%11 = load i32, i32* %9
%12 = load i32, i32* %7
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = ashr i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @cyclecounter_cyc2ns(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %2, %0
%6 = ashr i32 %5, %3
ret i32 %6
}
/* Variables and functions */
unsigned long strtoul(char const *, char **, int);
int capture_unsigned_int(const char *carg, void *pvar) {
  unsigned long int *pi = pvar;
  char *end;
  *pi = strtoul(carg, &end, 10);
  return end != carg ? 0 : 1;
}


x86 assembly (clang, -O0):
<capture_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rsi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_unsigned_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %rax,(%r14)
xor    %eax,%eax
cmp    %rbx,(%rsp)
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @capture_unsigned_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %3
%10 = call i64 @strtoul(i8* %9, i8** %6, i32 10)
%11 = load i64*, i64** %5
store i64 %10, i64* %11
%12 = load i8*, i8** %6
%13 = load i8*, i8** %3
%14 = icmp ne i8* %12, %13
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
ret i32 %16
}

LLVM IR (-O2):
define i32 @capture_unsigned_int(i8* %0, i8* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8* %1 to i64*
%5 = bitcast i8** %3 to i8*
%6 = call i64 @strtoul(i8* %0, i8** %3, i32 10)
store i64 %6, i64* %4
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_setr_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_setr_epi64(__m64 A, __m64 B) { return _mm_setr_epi64(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_setr_epi64>:
jmp    1030 <_mm_setr_epi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_setr_epi64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_setr_epi64(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int dlclose(void *);
int sqlite3UnixDlclose(void *pHandle) { return dlclose(pHandle); }


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

x86 assembly (clang, -O2):
<sqlite3UnixDlclose>:
jmp    1030 <dlclose@plt>

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

LLVM IR (-O2):
define i32 @sqlite3UnixDlclose(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret i32 %2
}
int throughputPlot(const int arg, const int value) {
  static int duration;
  if (!arg) {
    duration = value;
    return value;
  } else {
    return (((double)value) / ((double)duration)) * 1000000.0;
  }
}


x86 assembly (clang, -O0):
<throughputPlot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1128 <throughputPlot+0x28>
mov    -0xc(%rbp),%eax
mov    %eax,0x2f07(%rip)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <throughputPlot+0x4c>
cvtsi2sdl -0xc(%rbp),%xmm0
cvtsi2sdl 0x2eef(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xebf(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<throughputPlot>:
mov    %esi,%eax
test   %edi,%edi
je     1123 <throughputPlot+0x23>
cvtsi2sd %eax,%xmm0
cvtsi2sdl 0x2f12(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xee2(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret
mov    %eax,0x2efb(%rip)
ret

LLVM IR (-O0):
@throughputPlot.duration = internal global i32 0
define i32 @throughputPlot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* @throughputPlot.duration
%10 = load i32, i32* %5
store i32 %10, i32* %3
br label %19
11: ; preds = %2
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = load i32, i32* @throughputPlot.duration
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
%17 = fmul double %16, 1.000000e+06
%18 = fptosi double %17 to i32
store i32 %18, i32* %3
br label %19
19: ; preds = %11, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@throughputPlot.duration = internal unnamed_addr global i32 0
define i32 @throughputPlot(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %5
4: ; preds = %2
store i32 %1, i32* @throughputPlot.duration
br label %12
5: ; preds = %2
%6 = sitofp i32 %1 to double
%7 = load i32, i32* @throughputPlot.duration
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
%10 = fmul double %9, 1.000000e+06
%11 = fptosi double %10 to i32
br label %12
12: ; preds = %5, %4
%13 = phi i32 [ %11, %5 ], [ %1, %4 ]
ret i32 %13
}
int signed_overflow(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<signed_overflow>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @signed_overflow(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void opcode_ec() {}


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

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

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

LLVM IR (-O2):
define void @opcode_ec() {
ret void
}
/* Type definitions */
struct timeval {
  unsigned long long tv_sec;
  unsigned long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned long long timerlist_nano_from_epoch(void) {
  unsigned long long nano_from_epoch;
  struct timeval time_from_epoch;
  gettimeofday(&time_from_epoch, 0);
  nano_from_epoch = ((time_from_epoch.tv_sec * 1000000000ULL) +
                     (time_from_epoch.tv_usec * 1000ULL));
  return (nano_from_epoch);
}


x86 assembly (clang, -O0):
<timerlist_nano_from_epoch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,-0x18(%rbp),%rax
3b
imul   $0x3e8,-0x10(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerlist_nano_from_epoch>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3b9aca00,0x8(%rsp),%rcx
9a 3b
imul   $0x3e8,0x10(%rsp),%rax
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @timerlist_nano_from_epoch() {
%1 = alloca i64
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000
%10 = add i64 %6, %9
store i64 %10, i64* %1
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @timerlist_nano_from_epoch() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = mul i64 %8, 1000
%10 = add i64 %9, %6
ret i64 %10
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
int line_isgetheadingorfooting(char *line) {
  return (strncmp(line, "==========", 10) == 0);
}


x86 assembly (clang, -O0):
<line_isgetheadingorfooting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_isgetheadingorfooting>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"==========\00"
define i32 @line_isgetheadingorfooting(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"==========\00"
define i32 @line_isgetheadingorfooting(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void PUT_BIT(unsigned char *buf, int bit, int val) {
  unsigned char mask = 1 << (7 - (bit % 8));
  unsigned int offset = bit / 8;
  buf[offset] = (buf[offset] & ~(mask)) | (val ? mask : 0);
}


x86 assembly (clang, -O0):
<PUT_BIT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0x11(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
movzbl -0x11(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1165 <PUT_BIT+0x65>
movzbl -0x11(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    116f <PUT_BIT+0x6f>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    116f <PUT_BIT+0x6f>
mov    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
or     %ecx,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUT_BIT>:
lea    0x7(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
mov    %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%esi
mov    $0x7,%cl
sub    %sil,%cl
mov    $0x1,%esi
shl    %cl,%esi
sar    $0x3,%eax
movzbl (%rdi,%rax,1),%r8d
btr    %ecx,%r8d
test   %edx,%edx
cmove  %edx,%esi
or     %r8d,%esi
mov    %sil,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @PUT_BIT(i8* nocapture %0, i32 %1, i32 %2) {
%4 = srem i32 %1, 8
%5 = sub nsw i32 7, %4
%6 = shl nuw nsw i32 1, %5
%7 = sdiv i32 %1, 8
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = xor i32 %6, -1
%13 = and i32 %11, %12
%14 = icmp eq i32 %2, 0
%15 = select i1 %14, i32 0, i32 %6
%16 = or i32 %13, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %9
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(void const *, size_t, int, int /*<<< orphan*/ *);
size_t write_FP(FILE *fp, const void *data, size_t size) {
  return size * fwrite(data, size, 1, fp);
}


x86 assembly (clang, -O0):
<write_FP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fwrite@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
imul   %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_FP>:
push   %rbx
mov    %rdx,%rbx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    $0x1,%edx
call   1030 <fwrite@plt>
imul   %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @write_FP(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i32*, i32** %4
%11 = call i64 @fwrite(i8* %8, i64 %9, i32 1, i32* %10)
%12 = mul i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @write_FP(i32* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @fwrite(i8* %1, i64 %2, i32 1, i32* %0)
%5 = mul i64 %4, %2
ret i64 %5
}
/* Variables and functions */
int oat_hash(void *, int);
unsigned hash(void *key, int len) { return oat_hash(key, len); }


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

x86 assembly (clang, -O2):
<hash>:
jmp    1030 <oat_hash@plt>

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

LLVM IR (-O2):
define i32 @hash(i8* %0, i32 %1) {
%3 = tail call i32 @oat_hash(i8* %0, i32 %1)
ret i32 %3
}
unsigned char *Cin_OGM_GetOutput(int *outWidth, int *outHeight) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @Cin_OGM_GetOutput(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void a52_set_sync(uint8_t *p_a52) {
  p_a52[0] = 0xb;
  p_a52[1] = 0x77;
}


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

x86 assembly (clang, -O2):
<a52_set_sync>:
movabs $0x770000000b,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @a52_set_sync(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 11, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 119, i32* %6
ret void
}

LLVM IR (-O2):
define void @a52_set_sync(i32* nocapture writeonly %0) {
store i32 11, i32* %0
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 119, i32* %2
ret void
}
int test_m8192() { return -8192; }


x86 assembly (clang, -O0):
<test_m8192>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffe000,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_m8192() {
ret i32 -8192
}

LLVM IR (-O2):
define i32 @test_m8192() {
ret i32 -8192
}
int multipleBy5(int inputNum) {
  int result = inputNum % 5;
  if (result == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<multipleBy5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112b <multipleBy5+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <multipleBy5+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multipleBy5>:
imul   $0xcccccccd,%edi,%ecx
add    $0x19999999,%ecx
xor    %eax,%eax
cmp    $0x33333333,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @multipleBy5(i32 %0) {
%2 = srem i32 %0, 5
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
scalar_t__ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, scalar_t__);
int main(int argc, char **argv) {
  char data[50];
  ssize_t numread;
  do {
    numread = read(STDIN_FILENO, data, 50);
    write(STDOUT_FILENO, data, numread);
  } while (numread > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
mov    $0x32,%edx
call   1040 <read@plt>
mov    %rax,-0x58(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   1030 <write@plt>
cmpq   $0x0,-0x58(%rbp)
jg     1136 <main+0x16>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0x2ea6(%rip),%r15
mov    %rsp,%r14
mov    0x2eb4(%rip),%r12
nopl   0x0(%rax)
mov    (%r15),%edi
mov    %r14,%rsi
mov    $0x32,%edx
call   1040 <read@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <write@plt>
test   %rbx,%rbx
jg     1140 <main+0x20>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [50 x i8]
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* @STDIN_FILENO
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%11 = call i64 @read(i32 %9, i8* %10, i32 50)
store i64 %11, i64* %7
%12 = load i32, i32* @STDOUT_FILENO
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%14 = load i64, i64* %7
%15 = call i32 @write(i32 %12, i8* %13, i64 %14)
br label %16
16: ; preds = %8
%17 = load i64, i64* %7
%18 = icmp sgt i64 %17, 0
br i1 %18, label %8, label %19
19: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %5, %2
%6 = load i32, i32* @STDIN_FILENO
%7 = call i64 @read(i32 %6, i8* %4, i32 50)
%8 = load i32, i32* @STDOUT_FILENO
%9 = call i32 @write(i32 %8, i8* %4, i64 %7)
%10 = icmp sgt i64 %7, 0
br i1 %10, label %5, label %11
11: ; preds = %5
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int open(char const *, int, int /*<<< orphan*/);
int creat(const char *file, mode_t mode) {
  return open(file, O_TRUNC | O_CREAT | O_WRONLY, mode);
}


x86 assembly (clang, -O0):
<creat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
mov    0x2ec5(%rip),%rax
or     (%rax),%esi
mov    0x2e8c(%rip),%rax
or     (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creat>:
mov    0x2ed9(%rip),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %esi,%edx
mov    0x2e9d(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
define i32 @creat(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_TRUNC
%7 = load i32, i32* @O_CREAT
%8 = or i32 %6, %7
%9 = load i32, i32* @O_WRONLY
%10 = or i32 %8, %9
%11 = load i32, i32* %4
%12 = call i32 @open(i8* %5, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@O_TRUNC = global i32 0
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
define i32 @creat(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @O_TRUNC
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @O_WRONLY
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* %0, i32 %7, i32 %1)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ be32dec(unsigned char const *);
void be32dec_vect(uint32_t *dst, const unsigned char *src, size_t len) {
  size_t i;
  for (i = 0; i < len / 4; i++)
    dst[i] = be32dec(src + i * 4);
}


x86 assembly (clang, -O0):
<be32dec_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    $0x2,%rcx
cmp    %rcx,%rax
jae    1173 <be32dec_vect+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <be32dec@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <be32dec_vect+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x4,%rdx
jb     1149 <be32dec_vect+0x39>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
shr    $0x2,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    %r12,%rdi
call   1030 <be32dec@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
add    $0x4,%r12
cmp    %rbx,%r14
jne    1130 <be32dec_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @be32dec_vect(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %22, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = udiv i64 %10, 4
%12 = icmp ult i64 %9, %11
br i1 %12, label %13, label %25
13: ; preds = %8
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = mul i64 %15, 4
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = call i32 @be32dec(i8* %17)
%19 = load i32*, i32** %4
%20 = load i64, i64* %7
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %13
%23 = load i64, i64* %7
%24 = add i64 %23, 1
store i64 %24, i64* %7
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @be32dec_vect(i32* nocapture writeonly %0, i8* %1, i64 %2) {
%4 = icmp ult i64 %2, 4
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = lshr i64 %2, 2
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %13, %7 ], [ 0, %5 ]
%9 = shl i64 %8, 2
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = tail call i32 @be32dec(i8* %10)
%12 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %11, i32* %12
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Type definitions */
struct smhd_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct smhd_t *);
void smhd_exit(struct smhd_t *atom) { free(atom); }


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

x86 assembly (clang, -O2):
<smhd_exit>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.smhd_t = type { i32 }
define void @smhd_exit(%struct.smhd_t* nocapture %0) {
%2 = tail call i32 @free(%struct.smhd_t* %0)
ret void
}
void init_board(char board[][3]) {
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      board[i][j] = '-';
    }
  }
}


x86 assembly (clang, -O0):
<init_board>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1162 <init_board+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    114f <init_board+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x3,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x2d,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <init_board+0x20>
jmp    1154 <init_board+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_board+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_board>:
movabs $0x2d2d2d2d2d2d2d2d,%rax
2d 2d 2d
mov    %rax,(%rdi)
movb   $0x2d,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @init_board([3 x i8]* nocapture writeonly %0) {
%2 = getelementptr [3 x i8], [3 x i8]* %0, i64 0, i64 0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ABDAY_1;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abday_1() { return nl_langinfo(ABDAY_1); }


x86 assembly (clang, -O0):
<langinfo_abday_1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abday_1>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABDAY_1 = global i32 0
define i8* @langinfo_abday_1() {
%1 = load i32, i32* @ABDAY_1
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABDAY_1 = global i32 0
define i8* @langinfo_abday_1() {
%1 = load i32, i32* @ABDAY_1
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
double ln_get_pluto_earth_dist(double);
double ln_get_pluto_solar_dist(double);
double log10(double);
double ln_get_pluto_magnitude(double JD) {
  double delta, r;
  r = ln_get_pluto_solar_dist(JD);
  delta = ln_get_pluto_earth_dist(JD);
  return -1.0 + 5.0 * log10(r * delta);
}


x86 assembly (clang, -O0):
<ln_get_pluto_magnitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <ln_get_pluto_solar_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_pluto_earth_dist@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <log10@plt>
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_pluto_magnitude>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1050 <ln_get_pluto_solar_dist@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <ln_get_pluto_earth_dist@plt>
mulsd  0x10(%rsp),%xmm0
call   1040 <log10@plt>
mulsd  0xe9d(%rip),%xmm0
addsd  0xe9d(%rip),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @ln_get_pluto_magnitude(double %0) {
%2 = tail call double @ln_get_pluto_solar_dist(double %0)
%3 = tail call double @ln_get_pluto_earth_dist(double %0)
%4 = fmul double %2, %3
%5 = tail call double @log10(double %4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 5.000000e+00, double -1.000000e+00)
ret double %6
}
/* Type definitions */
struct v7 {
  int dummy;
};
struct prop_iter_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct prop_iter_ctx *);
int /*<<< orphan*/ v7_destruct_prop_iter_ctx(struct v7 *,
                                             struct prop_iter_ctx *);
void prop_iter_ctx_dtor(struct v7 *v7, void *ud) {
  struct prop_iter_ctx *ctx = (struct prop_iter_ctx *)ud;
  v7_destruct_prop_iter_ctx(v7, ctx);
  free(ctx);
}


x86 assembly (clang, -O0):
<prop_iter_ctx_dtor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <v7_destruct_prop_iter_ctx@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.v7 = type { i32 }
%struct.prop_iter_ctx = type { i32 }
define void @prop_iter_ctx_dtor(%struct.v7* %0, i8* %1) {
%3 = alloca %struct.v7*
%4 = alloca i8*
%5 = alloca %struct.prop_iter_ctx*
store %struct.v7* %0, %struct.v7** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.prop_iter_ctx*
store %struct.prop_iter_ctx* %7, %struct.prop_iter_ctx** %5
%8 = load %struct.v7*, %struct.v7** %3
%9 = load %struct.prop_iter_ctx*, %struct.prop_iter_ctx** %5
%10 = call i32 @v7_destruct_prop_iter_ctx(%struct.v7* %8, %struct.prop_iter_ctx* %9)
%11 = load %struct.prop_iter_ctx*, %struct.prop_iter_ctx** %5
%12 = call i32 @free(%struct.prop_iter_ctx* %11)
ret void
}

LLVM IR (-O2):
%struct.v7 = type { i32 }
%struct.prop_iter_ctx = type { i32 }
define void @prop_iter_ctx_dtor(%struct.v7* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.prop_iter_ctx*
%4 = tail call i32 @v7_destruct_prop_iter_ctx(%struct.v7* %0, %struct.prop_iter_ctx* %3)
%5 = tail call i32 @free(%struct.prop_iter_ctx* %3)
ret void
}
void ima_post_path_mknod(struct dentry *dentry) { return; }


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

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

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

LLVM IR (-O2):
%struct.dentry = type opaque
define void @ima_post_path_mknod(%struct.dentry* nocapture %0) {
ret void
}
/* Variables and functions */
char *end(char *);
char *rest(char *p) {
  p = end(p);
  p++;
  return p;
}


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

x86 assembly (clang, -O2):
<rest>:
push   %rax
call   1030 <end@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @rest(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @end(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @rest(i8* %0) {
%2 = tail call i8* @end(i8* %0)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *program_name) {
  printf("USAGE: %s <-V|-v|-n> suite1 suite2 .. suiteN\n\n"
         "  -v  Be verbose naming all test names and pass/fail\n"
         "  -n  No line-feed after non-verbos to get '.' from all suites on "
         "one line\n"
         "  -V  Invoke the test suites through valgrind\n\n",
         program_name);
}


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

LLVM IR (-O0):
@.str = [222 x i8] c"USAGE: %s <-V|-v|-n> suite1 suite2 .. suiteN\0A\0A -v Be verbose naming all test names and pass/fail\0A -n No line-feed after non-verbos to get '.' from all suites on one line\0A -V Invoke the test suites through valgrind\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [222 x i8] c"USAGE: %s <-V|-v|-n> suite1 suite2 .. suiteN\0A\0A -v Be verbose naming all test names and pass/fail\0A -n No line-feed after non-verbos to get '.' from all suites on one line\0A -V Invoke the test suites through valgrind\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
long long llabs(long long i) { return i < 0 ? -i : i; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
int main() {
  int u = 20;
  int v = 30;
  int w = u + v;
  int x = 10;
  int y = 40;
  int z = x + y;
  int a = y - x;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x1e,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x28,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
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
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
store i32 30, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
store i32 %11, i32* %4
store i32 10, i32* %5
store i32 40, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %6
%16 = load i32, i32* %5
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int test_imm_CAuint8_mem(unsigned char *val) {
  return ((*val) & (0xCA << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CAuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -54
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}