xunge/DecIR huggingface dataset:
void blk_pm_runtime_init(struct request_queue *q, struct device *dev) {}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.device = type opaque
define void @blk_pm_runtime_init(%struct.request_queue* %0, %struct.device* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.device*
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.device* %1, %struct.device** %4
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.device = type opaque
define void @blk_pm_runtime_init(%struct.request_queue* nocapture %0, %struct.device* nocapture %1) {
ret void
}
void logCall(void *self) { xlogf("%s(self = %p)\n", __func__, self); }


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

x86 assembly (clang, -O2):
<logCall>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.logCall = [8 x i8] c"logCall\00"
define void @logCall(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.logCall, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.logCall = [8 x i8] c"logCall\00"
define void @logCall(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.logCall, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_critbit(size_t const);
int main(void) {
  static const size_t N = 128 * 1024;
  test_critbit(N);
  return 0;
}


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

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

LLVM IR (-O0):
@main.N = internal constant i64 131072
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test_critbit(i64 131072)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_critbit(i64 131072)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t cvtInt32ToZigZag(const int32_t value) {
  return ((uint32_t)value << 1) ^ (uint32_t)(value >> 31);
}


x86 assembly (clang, -O0):
<cvtInt32ToZigZag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvtInt32ToZigZag>:
lea    (%rdi,%rdi,1),%eax
sar    $0x1f,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @cvtInt32ToZigZag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 31
%7 = xor i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @cvtInt32ToZigZag(i32 %0) {
%2 = shl i32 %0, 1
%3 = ashr i32 %0, 31
%4 = xor i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int GET32(int);
unsigned int uart_check(void) {
  if (GET32(0x20215054) & 0x01)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<uart_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20215054,%edi
call   1030 <GET32@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     113a <uart_check+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <uart_check+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_check>:
push   %rax
mov    $0x20215054,%edi
call   1030 <GET32@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_check() {
%1 = alloca i32
%2 = call i32 @GET32(i32 539054164)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @uart_check() {
%1 = tail call i32 @GET32(i32 539054164)
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int unlink(char const *);
__attribute__((__weak__, __always___)) int
softboundcets_unlink(const char *pathname) {
  return unlink(pathname);
}


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

x86 assembly (clang, -O2):
<softboundcets_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_unlink(i8* %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ isdigit(char);
int as_int(char *str) {
  int acc;
  for (acc = 0; isdigit(*str); str++) {
    acc = acc * 10 + (*str - '0');
  }
  return acc;
}


x86 assembly (clang, -O0):
<as_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115d <as_int+0x4d>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <as_int+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<as_int>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1153 <as_int+0x43>
add    $0x1,%rbx
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
lea    (%r14,%r14,4),%eax
movsbl -0x1(%rbx),%ecx
lea    (%rcx,%rax,2),%r14d
add    $0xffffffd0,%r14d
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <as_int+0x20>
jmp    1156 <as_int+0x46>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @as_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %12, %5 ], [ 0, %1 ]
%7 = phi i8* [ %13, %5 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 10
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = add i32 %8, -48
%12 = add i32 %11, %10
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %13
%15 = tail call i64 @isdigit(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/lexing.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/lexing.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/lexing.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
char _Locale_mon_decimal_point(struct _Locale_monetary *lmon
                               __attribute__((__unused__))) {
  return '.';
}


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

x86 assembly (clang, -O2):
<_Locale_mon_decimal_point>:
mov    $0x2e,%al
ret

LLVM IR (-O0):
%struct._Locale_monetary = type opaque
define signext i8 @_Locale_mon_decimal_point(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i8 46
}

LLVM IR (-O2):
%struct._Locale_monetary = type opaque
define signext i8 @_Locale_mon_decimal_point(%struct._Locale_monetary* nocapture readnone %0) {
ret i8 46
}
__attribute__((weak)) void __callAtexitHandlers(void) {}


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

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

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

LLVM IR (-O2):
define weak void @__callAtexitHandlers() {
ret void
}
int Operand_simm8_decode(unsigned int *valp) {
  unsigned simm8_0, imm8_0;
  imm8_0 = *valp & 0xff;
  simm8_0 = ((int)imm8_0 << 24) >> 24;
  *valp = simm8_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_simm8_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x18,%eax
sar    $0x18,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_simm8_decode>:
movsbl (%rdi),%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_simm8_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 255
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = shl i32 %8, 24
%10 = ashr i32 %9, 24
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_simm8_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = ashr exact i32 %3, 24
store i32 %4, i32* %0
ret i32 0
}
unsigned int SLABS_NUM() {
  unsigned int num = 4, result = 0;
  while (num <= (1024 * 1024 * 16)) {
    result++;
    num *= 2;
  }
  return result;
}


x86 assembly (clang, -O0):
<SLABS_NUM>:
push   %rbp
mov    %rsp,%rbp
movl   $0x4,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1000000,-0x4(%rbp)
ja     1136 <SLABS_NUM+0x36>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <SLABS_NUM+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @SLABS_NUM() {
ret i32 23
}
int getopt_long(argc, argv, options, long_options, opt_index)
int argc;
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
{ return _getopt_internal(argc, argv, options, long_options, opt_index, 0); }


x86 assembly (clang, -O0):
<getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
mov    $0x0,%al
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long>:
xor    %r9d,%r9d
xor    %eax,%eax
jmp    1030 <_getopt_internal@plt>

LLVM IR (-O0):
%struct.option = type opaque
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...) bitcast (i32 (...)* @_getopt_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...)*)(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type opaque
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...) bitcast (i32 (...)* @_getopt_internal to i32 (i32, i8**, i8*, %struct.option*, i32*, i32, ...)*)(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 0)
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(15, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<write_start_solutions>:
mov    $0xf,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_start_solutions() {
%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_c2phc(i32 15, 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 @write_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 15, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void __DELETE_java_lang_String(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_String(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int test_imm_E6uint32_mem(unsigned int *val) {
  return ((*val) & (0xE6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E6uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 230
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
signed char f11(unsigned char a, unsigned char b) {
  short c;
  return __builtin_mul_overflow(a, b, &c);
}


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
movzbl %cl,%ecx
movzbl %al,%eax
imul   %ax,%cx
seto   %al
mov    %cx,-0x4(%rbp)
and    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f11>:
imul   %di,%si
seto   %al
ret

LLVM IR (-O0):
define signext i8 @f11(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = load i8, i8* %4
%8 = zext i8 %6 to i16
%9 = zext i8 %7 to i16
%10 = call { i16, i1 } @llvm.smul.with.overflow.i16(i16 %8, i16 %9)
%11 = extractvalue { i16, i1 } %10, 1
%12 = extractvalue { i16, i1 } %10, 0
store i16 %12, i16* %5
%13 = zext i1 %11 to i8
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @f11(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i16
%4 = zext i8 %1 to i16
%5 = tail call { i16, i1 } @llvm.smul.with.overflow.i16(i16 %3, i16 %4)
%6 = extractvalue { i16, i1 } %5, 1
%7 = zext i1 %6 to i8
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA256_CTX;

/* Variables and functions */
int /*<<< orphan*/ SHA256_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Update(int /*<<< orphan*/ *, unsigned char const *,
                                 size_t);
void sha256(const unsigned char *data, size_t data_len, unsigned char *digest) {
  SHA256_CTX ctx;
  SHA256_Init(&ctx);
  SHA256_Update(&ctx, data, data_len);
  SHA256_Final(digest, &ctx);
}


x86 assembly (clang, -O0):
<sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <SHA256_Init@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x1c(%rbp),%rdi
call   1050 <SHA256_Update@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <SHA256_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha256>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x4(%rsp),%r12
mov    %r12,%rdi
call   1030 <SHA256_Init@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <SHA256_Update@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <SHA256_Final@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sha256(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = call i32 @SHA256_Init(i32* %7)
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i32 @SHA256_Update(i32* %7, i8* %9, i64 %10)
%12 = load i8*, i8** %6
%13 = call i32 @SHA256_Final(i8* %12, i32* %7)
ret void
}

LLVM IR (-O2):
define void @sha256(i8* %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @SHA256_Init(i32* %4)
%7 = call i32 @SHA256_Update(i32* %4, i8* %0, i64 %1)
%8 = call i32 @SHA256_Final(i8* %2, i32* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int errno;
int sigtimedwait(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/ *);
int sigwait(const sigset_t *set, int *sig) {
  int status;
  status = sigtimedwait(set, NULL, NULL);
  if (status != -1) {
    if (sig)
      *sig = status;
    return 0;
  }
  return errno;
}


x86 assembly (clang, -O0):
<sigwait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <sigtimedwait@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
je     115d <sigwait+0x4d>
cmpq   $0x0,-0x18(%rbp)
je     1151 <sigwait+0x41>
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1169 <sigwait+0x59>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigwait>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <sigtimedwait@plt>
cmp    $0xffffffff,%eax
je     1131 <sigwait+0x21>
test   %r14,%r14
je     113a <sigwait+0x2a>
mov    %eax,(%r14)
jmp    113a <sigwait+0x2a>
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @sigwait(i32* %0, i32* writeonly %1) {
%3 = tail call i32 @sigtimedwait(i32* %0, i32* null, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = icmp eq i32* %1, null
br i1 %6, label %10, label %7
7: ; preds = %5
store i32 %3, i32* %1
br label %10
8: ; preds = %2
%9 = load i32, i32* @errno
br label %10
10: ; preds = %5, %7, %8
%11 = phi i32 [ %9, %8 ], [ 0, %7 ], [ 0, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ pie_execl_marker();
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  setbuf(stdout, NULL);
  pie_execl_marker();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
xor    %eax,%eax
call   1030 <pie_execl_marker@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @setbuf(i32 %6, i32* null)
%8 = call i32 (...) @pie_execl_marker()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @setbuf(i32 %3, i32* null)
%5 = tail call i32 (...) @pie_execl_marker()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __run_test_malloc_and_free__();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void run_test_malloc_and_free(void) {
  fprintf(stderr, "Running %s...", "run_test_malloc_and_free");
  __run_test_malloc_and_free__();
  fprintf(stderr, "OK\n");
}


x86 assembly (clang, -O0):
<run_test_malloc_and_free>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xed3(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <__run_test_malloc_and_free__@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_test_malloc_and_free>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
lea    0xed6(%rip),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <__run_test_malloc_and_free__@plt>
mov    (%rbx),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Running %s...\00"
@.str.1 = [25 x i8] c"run_test_malloc_and_free\00"
@.str.2 = [4 x i8] c"OK\0A\00"
define void @run_test_malloc_and_free() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @__run_test_malloc_and_free__()
%4 = load i32, i32* @stderr
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Running %s...\00"
@.str.1 = [25 x i8] c"run_test_malloc_and_free\00"
@.str.2 = [4 x i8] c"OK\0A\00"
define void @run_test_malloc_and_free() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @__run_test_malloc_and_free__()
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t range_get_last(uint64_t offset, uint64_t len) {
  return offset + len - 1;
}


x86 assembly (clang, -O0):
<range_get_last>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_get_last>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @range_get_last(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = sub nsw i64 %7, 1
ret i64 %8
}

LLVM IR (-O2):
define i64 @range_get_last(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ sig_catch(int /*<<< orphan*/, int /*<<< orphan*/);
void sig_pipeignore() { sig_catch(SIGPIPE, SIG_IGN); }


x86 assembly (clang, -O0):
<sig_pipeignore>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
call   1030 <sig_catch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_pipeignore>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sig_catch@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @sig_pipeignore() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @sig_catch(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @sig_pipeignore() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @sig_catch(i32 %1, i32 %2)
ret void
}
void w14(void *x, double y) { *(double *)(x + 32754) = y; }


x86 assembly (clang, -O0):
<w14>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ff2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w14>:
movsd  %xmm0,0x7ff2(%rdi)
ret

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

LLVM IR (-O2):
define void @w14(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32754
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_putchr(char c) { write(1, &c, 1); }


x86 assembly (clang, -O0):
<ft_putchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchr>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @ft_putchr(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
int sdioplatform_bus_match(struct device *dev, struct device_driver *drv) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.device_driver = type opaque
define i32 @sdioplatform_bus_match(%struct.device* %0, %struct.device_driver* %1) {
%3 = alloca %struct.device*
%4 = alloca %struct.device_driver*
store %struct.device* %0, %struct.device** %3
store %struct.device_driver* %1, %struct.device_driver** %4
ret i32 1
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.device_driver = type opaque
define i32 @sdioplatform_bus_match(%struct.device* nocapture readnone %0, %struct.device_driver* nocapture readnone %1) {
ret i32 1
}
int main(int input) {
  int z;
  int i = 0, j = 0;
  while (i < 10) {
    i++;
    if (input)
      j = 2 * i;
  }
  z = i + j;
  return z;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1147 <main+0x47>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1142 <main+0x42>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <main+0x1c>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
mov    $0xa,%ecx
mov    $0x1e,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 10, i32 30
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int make_socket(int);
int /*<<< orphan*/ send_file(int);
int main(int argc, char **argv) {
  int client_socket = make_socket(12000);
  send_file(client_socket);
  close(client_socket);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2ee0,%edi
call   1040 <make_socket@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <send_file@plt>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2ee0,%edi
call   1040 <make_socket@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <send_file@plt>
mov    %ebx,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @make_socket(i32 12000)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @send_file(i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @close(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @make_socket(i32 12000)
%4 = tail call i32 @send_file(i32 %3)
%5 = tail call i32 @close(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void ft_strdel(char **as) {
  if (!as)
    return;
  free(*as);
  *as = NULL;
  return;
}


x86 assembly (clang, -O0):
<ft_strdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <ft_strdel+0x1c>
jmp    1143 <ft_strdel+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strdel>:
test   %rdi,%rdi
je     1129 <ft_strdel+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_strdel(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %1, %3
ret void
}
/* Type definitions */
struct knote {
  int dummy;
};
struct filter {
  int dummy;
};

/* Variables and functions */
int evfilt_user_knote_delete(struct filter *, struct knote *);
int evfilt_user_knote_disable(struct filter *filt, struct knote *kn) {
  return evfilt_user_knote_delete(filt, kn);
}


x86 assembly (clang, -O0):
<evfilt_user_knote_disable>:
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 <evfilt_user_knote_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evfilt_user_knote_disable>:
jmp    1030 <evfilt_user_knote_delete@plt>

LLVM IR (-O0):
%struct.filter = type { i32 }
%struct.knote = type { i32 }
define i32 @evfilt_user_knote_disable(%struct.filter* %0, %struct.knote* %1) {
%3 = alloca %struct.filter*
%4 = alloca %struct.knote*
store %struct.filter* %0, %struct.filter** %3
store %struct.knote* %1, %struct.knote** %4
%5 = load %struct.filter*, %struct.filter** %3
%6 = load %struct.knote*, %struct.knote** %4
%7 = call i32 @evfilt_user_knote_delete(%struct.filter* %5, %struct.knote* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.filter = type { i32 }
%struct.knote = type { i32 }
define i32 @evfilt_user_knote_disable(%struct.filter* %0, %struct.knote* %1) {
%3 = tail call i32 @evfilt_user_knote_delete(%struct.filter* %0, %struct.knote* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void os_closesocket(int sock) { close(sock); }


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

x86 assembly (clang, -O2):
<os_closesocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @os_closesocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int bbm_bulk_read(void *, int, unsigned char *, unsigned char);
signed int fci_hpi_read(void *handle, unsigned char chip, unsigned char addr,
                        unsigned char alen, unsigned char *data,
                        unsigned char len) {
  return bbm_bulk_read(handle, 0x0f00 | addr, data, len);
}


x86 assembly (clang, -O0):
<fci_hpi_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r9b,%al
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %dl,-0xa(%rbp)
mov    %cl,-0xb(%rbp)
mov    %r8,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0xa(%rbp),%esi
or     $0xf00,%esi
mov    -0x18(%rbp),%rdx
movzbl -0x19(%rbp),%ecx
call   1030 <bbm_bulk_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fci_hpi_read>:
mov    %r9d,%ecx
lea    0xf00(%rdx),%esi
mov    %r8,%rdx
jmp    1030 <bbm_bulk_read@plt>

LLVM IR (-O0):
define i32 @fci_hpi_read(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i8 zeroext %5) {
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8*
%12 = alloca i8
store i8* %0, i8** %7
store i8 %1, i8* %8
store i8 %2, i8* %9
store i8 %3, i8* %10
store i8* %4, i8** %11
store i8 %5, i8* %12
%13 = load i8*, i8** %7
%14 = load i8, i8* %9
%15 = zext i8 %14 to i32
%16 = or i32 3840, %15
%17 = load i8*, i8** %11
%18 = load i8, i8* %12
%19 = call i32 @bbm_bulk_read(i8* %13, i32 %16, i8* %17, i8 zeroext %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @fci_hpi_read(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i8 zeroext %5) {
%7 = zext i8 %2 to i32
%8 = or i32 %7, 3840
%9 = tail call i32 @bbm_bulk_read(i8* %0, i32 %8, i8* %4, i8 zeroext %5)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ IOoutput(int, int /*<<< orphan*/);
void ClearAllIO(void) {
  int chip_no;
  for (chip_no = 0; chip_no <= 7; chip_no++)
    IOoutput(chip_no, 0);
}


x86 assembly (clang, -O0):
<ClearAllIO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jg     1141 <ClearAllIO+0x31>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <ClearAllIO+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearAllIO>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <IOoutput@plt>
mov    $0x7,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <IOoutput@plt>

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

LLVM IR (-O2):
define void @ClearAllIO() {
%1 = tail call i32 @IOoutput(i32 0, i32 0)
%2 = tail call i32 @IOoutput(i32 1, i32 0)
%3 = tail call i32 @IOoutput(i32 2, i32 0)
%4 = tail call i32 @IOoutput(i32 3, i32 0)
%5 = tail call i32 @IOoutput(i32 4, i32 0)
%6 = tail call i32 @IOoutput(i32 5, i32 0)
%7 = tail call i32 @IOoutput(i32 6, i32 0)
%8 = tail call i32 @IOoutput(i32 7, i32 0)
ret void
}
reg0adrreg1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ r0 = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<reg0adrreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10f444(%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 277777
%16 = load i32, i32* %15
store i32 %16, i32* %8
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @reg0adrreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int answer = 0;
  int x, y;
  if (0 == 0) {
    printf("Change the SHOW_ANSWERS to 1 in the code to see the answers.\n");
    return 0;
  }
  answer = 15 + 30 - 30 * 2;
  if (0)
    printf("The answer equals %d\n\n", answer);
  answer = (10 + (5 + 5) * (20 / 2) - (50 - (50 / 2)));
  if (0)
    printf("The answer equals %d\n\n", answer);
  answer = 60 / 15 / 2 * 2;
  if (0)
    printf("The answer equals %d\n\n", answer);
  answer = 5 * 5 + 5 / 5 - 5;
  if (0)
    printf("The answer equals %d\n\n", answer);
  answer = 5 - 5 * 5 / 5 + 5;
  if (0)
    printf("The answer equals %d\n\n", answer);
  x = 45;
  answer = x + 2 / (++x + 2);
  if (0)
    printf("The answer equals %d\n\n", answer);
  x = 10;
  y = 10;
  answer = (x + y) + (++y + ++x) / 2;
  if (0)
    printf("The answer equals %d\n\n", answer);
  x = 20;
  answer = x + (x + x--) + (x + x++);
  if (0)
    printf("The answer equals %d\n\n", answer);
  x = 2;
  answer = (--x + 2) + (x-- + 2) * (x + 2) - (x + 2);
  if (0)
    printf("The answer equals %d\n\n", answer);
  y = 20;
  answer = (y + 5 - 15 / 3 * 5) / 2 * --y;
  if (0)
    printf("The answer equals %d\n\n", answer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
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 = [62 x i8] c"Change the SHOW_ANSWERS to 1 in the code to see the answers.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [61 x i8] c"Change the SHOW_ANSWERS to 1 in the code to see the answers.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_diff_length_5() {
  char *x = "abcde";
  char *y = "aBd";
  clang_analyzer_eval(strncasecmp(x, y, 3) < 0);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_5>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_5() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 3)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_5() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}