xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned int bar(unsigned int const **, unsigned int);
unsigned int foo(const unsigned int x[32][40][2]) {
  int i;
  unsigned int sum;
  sum = 0.0f;
  for (i = 0; i < 32; i++)
    sum = bar(x[i], sum);
  return sum;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    115f <foo+0x4f>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
imul   $0x140,%rax,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%esi
call   1030 <bar@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <foo+0x1a>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
lea    (%r14,%rbx,1),%rdi
mov    %eax,%esi
call   1030 <bar@plt>
add    $0x140,%rbx
cmp    $0x2800,%rbx
jne    1120 <foo+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @foo([40 x [2 x i32]]* %0) {
%2 = alloca [40 x [2 x i32]]*
%3 = alloca i32
%4 = alloca i32
store [40 x [2 x i32]]* %0, [40 x [2 x i32]]** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 32
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load [40 x [2 x i32]]*, [40 x [2 x i32]]** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [40 x [2 x i32]], [40 x [2 x i32]]* %9, i64 %11
%13 = getelementptr inbounds [40 x [2 x i32]], [40 x [2 x i32]]* %12, i64 0, i64 0
%14 = bitcast [2 x i32]* %13 to i32**
%15 = load i32, i32* %4
%16 = call i32 @bar(i32** %14, i32 %15)
store i32 %16, i32* %4
br label %17
17: ; preds = %8
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %5
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @foo([40 x [2 x i32]]* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %8, %2 ]
%4 = phi i32 [ 0, %1 ], [ %7, %2 ]
%5 = getelementptr inbounds [40 x [2 x i32]], [40 x [2 x i32]]* %0, i64 %3, i64 0
%6 = bitcast [2 x i32]* %5 to i32**
%7 = tail call i32 @bar(i32** %6, i32 %4)
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 32
br i1 %9, label %10, label %2
10: ; preds = %2
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_once_t;

/* Variables and functions */
int kthread_once(int /*<<< orphan*/ *, void (*)());
int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) {
  return kthread_once(once_control, init_routine);
}


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

x86 assembly (clang, -O2):
<pthread_once>:
jmp    1030 <kthread_once@plt>

LLVM IR (-O0):
define i32 @pthread_once(i32* %0, void ()* %1) {
%3 = alloca i32*
%4 = alloca void ()*
store i32* %0, i32** %3
store void ()* %1, void ()** %4
%5 = load i32*, i32** %3
%6 = load void ()*, void ()** %4
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @kthread_once(i32* %5, void (...)* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @pthread_once(i32* %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @kthread_once(i32* %0, void (...)* %3)
ret i32 %4
}
void __set_bit(int nr, volatile unsigned long *addr) {
  unsigned long mask = (1UL << ((nr) % (8 * 8)));
  unsigned long *p = ((unsigned long *)addr) + ((nr) / (8 * 8));
  *p |= mask;
}


x86 assembly (clang, -O0):
<__set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%rax
or     (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_bit>:
mov    %edi,%ecx
lea    0x3f(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %eax,%edx
and    $0xffffffc0,%edx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
sar    $0x6,%eax
cltq
or     %rdx,(%rsi,%rax,8)
ret

LLVM IR (-O0):
define void @__set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%7 = load i32, i32* %3
%8 = srem i32 %7, 64
%9 = zext i32 %8 to i64
%10 = shl i64 1, %9
store i64 %10, i64* %5
%11 = load i64*, i64** %4
%12 = load i32, i32* %3
%13 = sdiv i32 %12, 64
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %11, i64 %14
store i64* %15, i64** %6
%16 = load i64, i64* %5
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
%19 = or i64 %18, %16
store i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @__set_bit(i32 %0, i64* nocapture %1) {
%3 = srem i32 %0, 64
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = sdiv i32 %0, 64
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = or i64 %9, %5
store i64 %10, i64* %8
ret void
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ stderr;
int eachResult(char *out, struct sockaddr_in *addr) {
  fprintf(stderr, "er : %d\n", *out);
  return *out;
}


x86 assembly (clang, -O0):
<eachResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
lea    0xecc(%rip),%rsi
movsbl (%rax),%edx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eachResult>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
movsbl (%rbx),%edx
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
movsbl (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
@stderr = global i32 0
@.str = [9 x i8] c"er : %d\0A\00"
define i32 @eachResult(i8* %0, %struct.sockaddr_in* %1) {
%3 = alloca i8*
%4 = alloca %struct.sockaddr_in*
store i8* %0, i8** %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
@stderr = global i32 0
@.str = [9 x i8] c"er : %d\0A\00"
define i32 @eachResult(i8* nocapture %0, %struct.sockaddr_in* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = load i8, i8* %0
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = load i8, i8* %0
%7 = sext i8 %6 to i32
ret i32 %7
}
/* Variables and functions */
int _private_foo();
int foo() { return _private_foo(); }


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

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

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @_private_foo()
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @_private_foo()
ret i32 %1
}
int numeric(char *ns) {
  register char *s = ns;
  while (*s)
    if (*s < '0' || *s > '9')
      return (0);
    else
      s++;
  return (1);
}


x86 assembly (clang, -O0):
<numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <numeric+0x5a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     113d <numeric+0x3d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1149 <numeric+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1161 <numeric+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <numeric+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numeric>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <numeric+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <numeric+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <numeric+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_set_prop_int() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_set_prop_int"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_format_info_set_prop_int\00"
define i32 @pa_format_info_set_prop_int() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ compare();
int main() {
  compare();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <compare@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @compare()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int int32_t;

/* Variables and functions */
int encode_signed24(uint8_t *apdu, int32_t value) {
  apdu[0] = (uint8_t)((value & 0xff0000) >> 16);
  apdu[1] = (uint8_t)((value & 0x00ff00) >> 8);
  apdu[2] = (uint8_t)(value & 0x0000ff);
  return 3;
}


x86 assembly (clang, -O0):
<encode_signed24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_signed24>:
mov    %esi,%eax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
mov    %rax,(%rdi)
mov    %rcx,0x8(%rdi)
mov    %rdx,0x10(%rdi)
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @encode_signed24(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 16711680
%7 = ashr i32 %6, 16
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 0
store i64 %8, i64* %10
%11 = load i32, i32* %4
%12 = and i32 %11, 65280
%13 = ashr i32 %12, 8
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %3
%16 = getelementptr inbounds i64, i64* %15, i64 1
store i64 %14, i64* %16
%17 = load i32, i32* %4
%18 = and i32 %17, 255
%19 = sext i32 %18 to i64
%20 = load i64*, i64** %3
%21 = getelementptr inbounds i64, i64* %20, i64 2
store i64 %19, i64* %21
ret i32 3
}

LLVM IR (-O2):
define i32 @encode_signed24(i64* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = and i32 %3, 255
%5 = zext i32 %4 to i64
store i64 %5, i64* %0
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %8, i64* %9
%10 = and i32 %1, 255
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %11, i64* %12
ret i32 3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ Change_RGB_LED(int /*<<< orphan*/ *);
int /*<<< orphan*/ Set_CCR_Color(int /*<<< orphan*/, int /*<<< orphan*/ *);
void Set_RGB_LED_Color(uint32_t color) {
  uint16_t ccr[3];
  Set_CCR_Color(color, ccr);
  Change_RGB_LED(ccr);
}


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

x86 assembly (clang, -O2):
<Set_RGB_LED_Color>:
push   %rbx
sub    $0x10,%rsp
lea    0x4(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <Set_CCR_Color@plt>
mov    %rbx,%rdi
call   1030 <Change_RGB_LED@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @Set_RGB_LED_Color(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%6 = call i32 @Set_CCR_Color(i32 %4, i32* %5)
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%8 = call i32 @Change_RGB_LED(i32* %7)
ret void
}

LLVM IR (-O2):
define void @Set_RGB_LED_Color(i32 %0) {
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = call i32 @Set_CCR_Color(i32 %0, i32* %4)
%6 = call i32 @Change_RGB_LED(i32* %4)
ret void
}
__attribute__((no, noclone)) unsigned __int128 t103_3sub(unsigned short y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((signed char)(5), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t103_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %di,%ax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%r9d
mov    $0x5,%edx
sub    %rax,%rdx
mov    %r9,%rcx
sbb    %rcx,%rcx
mov    %r9,%r8
sbb    %r8,%r8
sbb    %r9,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
or     %rsi,%rax
setne  %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    1174 <t103_3sub+0x64>
jmp    117b <t103_3sub+0x6b>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t103_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
xor    %r14d,%r14d
mov    $0x5,%ebx
sub    %rax,%rbx
sbb    %r14,%r14
cmp    $0x6,%di
jb     1131 <t103_3sub+0x21>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t103_3sub(i16 zeroext %0) {
%2 = alloca i128
%3 = alloca i16
%4 = alloca i128
store i16 %0, i16* %3
%5 = load i16, i16* %3
%6 = zext i16 %5 to i129
%7 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 5, i129 %6)
%8 = extractvalue { i129, i1 } %7, 1
%9 = extractvalue { i129, i1 } %7, 0
%10 = trunc i129 %9 to i128
%11 = zext i128 %10 to i129
%12 = icmp ne i129 %9, %11
%13 = or i1 %8, %12
store i128 %10, i128* %4
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 (...) @bar()
br label %16
16: ; preds = %14, %1
%17 = load i128, i128* %4
store i128 %17, i128* %2
%18 = bitcast i128* %2 to { i64, i64 }*
%19 = load { i64, i64 }, { i64, i64 }* %18
ret { i64, i64 } %19
}

LLVM IR (-O2):
define { i64, i64 } @t103_3sub(i16 zeroext %0) {
%2 = zext i16 %0 to i129
%3 = sub nsw i129 5, %2
%4 = icmp ugt i16 %0, 5
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
%8 = trunc i129 %3 to i64
%9 = lshr i129 %3, 64
%10 = trunc i129 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
double douMax(double i, double j) { return i > j ? i : j; }


x86 assembly (clang, -O0):
<douMax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <douMax+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <douMax+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<douMax>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @douMax(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @douMax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ mem_stop();
void minictk_stop() { mem_stop(); }


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

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

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

LLVM IR (-O2):
define void @minictk_stop() {
%1 = tail call i32 (...) @mem_stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Pie175(long, long, long, long, double, double,
                          unsigned long);
void pie(long x, long y, long rx, long ry, double sa, double ea,
         unsigned long c) {
  Pie175(x, y, rx, ry, sa, ea, c);
}


x86 assembly (clang, -O0):
<pie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x38(%rbp),%r8
call   1030 <Pie175@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pie>:
jmp    1030 <Pie175@plt>

LLVM IR (-O0):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6) {
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca double
%13 = alloca double
%14 = alloca i64
store i64 %0, i64* %8
store i64 %1, i64* %9
store i64 %2, i64* %10
store i64 %3, i64* %11
store double %4, double* %12
store double %5, double* %13
store i64 %6, i64* %14
%15 = load i64, i64* %8
%16 = load i64, i64* %9
%17 = load i64, i64* %10
%18 = load i64, i64* %11
%19 = load double, double* %12
%20 = load double, double* %13
%21 = load i64, i64* %14
%22 = call i32 @Pie175(i64 %15, i64 %16, i64 %17, i64 %18, double %19, double %20, i64 %21)
ret void
}

LLVM IR (-O2):
define void @pie(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6) {
%8 = tail call i32 @Pie175(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t new_int32_t(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @new_int32_t() {
ret i32 0
}
/* Type definitions */
struct winsize {
  int ws_col;
  int ws_row;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
void get_window_size(int *width, int *height) {
  struct winsize w;
  ioctl(0, TIOCGWINSZ, &w);
  *width = w.ws_col;
  *height = w.ws_row;
}


x86 assembly (clang, -O0):
<get_window_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x18(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_window_size>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <ioctl@plt>
mov    (%rsp),%eax
mov    %eax,(%rbx)
mov    0x4(%rsp),%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.winsize = type { i32, i32 }
@TIOCGWINSZ = global i32 0
define void @get_window_size(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca %struct.winsize
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32, i32* @TIOCGWINSZ
%7 = call i32 @ioctl(i32 0, i32 %6, %struct.winsize* %5)
%8 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = getelementptr inbounds %struct.winsize, %struct.winsize* %5, i32 0, i32 1
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
%struct.winsize = type { i32, i32 }
@TIOCGWINSZ = global i32 0
define void @get_window_size(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = alloca %struct.winsize
%4 = bitcast %struct.winsize* %3 to i8*
%5 = load i32, i32* @TIOCGWINSZ
%6 = call i32 @ioctl(i32 0, i32 %5, %struct.winsize* %3)
%7 = getelementptr inbounds %struct.winsize, %struct.winsize* %3, i64 0, i32 0
%8 = load i32, i32* %7
store i32 %8, i32* %0
%9 = getelementptr inbounds %struct.winsize, %struct.winsize* %3, i64 0, i32 1
%10 = load i32, i32* %9
store i32 %10, i32* %1
ret void
}
void avcodec_is_open() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_is_open() {
ret void
}
void __pmp_scheduler_sample(int sched) {}


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

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

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

LLVM IR (-O2):
define void @__pmp_scheduler_sample(i32 %0) {
ret void
}
/* Variables and functions */
unsigned int sys_call(int, int, unsigned int, int /*<<< orphan*/,
                      int /*<<< orphan*/);
unsigned int gcd_get_status(unsigned int *val) {
  return sys_call(0x07, 3, (unsigned int)val, 0, 0);
}


x86 assembly (clang, -O0):
<gcd_get_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edx
mov    $0x7,%edi
mov    $0x3,%esi
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <sys_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_get_status>:
mov    %rdi,%rdx
mov    $0x7,%edi
mov    $0x3,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <sys_call@plt>

LLVM IR (-O0):
define i32 @gcd_get_status(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i32
%5 = call i32 @sys_call(i32 7, i32 3, i32 %4, i32 0, i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @gcd_get_status(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @sys_call(i32 7, i32 3, i32 %3, i32 0, i32 0)
ret i32 %4
}
/* Variables and functions */
size_t __ctype_get_mb_cur_max();
__attribute__((__weak__, __always___)) size_t
softboundcets___ctype_get_mb_cur_max(void) {
  return __ctype_get_mb_cur_max();
}


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

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

LLVM IR (-O0):
define weak i64 @softboundcets___ctype_get_mb_cur_max() {
%1 = call i64 (...) @__ctype_get_mb_cur_max()
ret i64 %1
}

LLVM IR (-O2):
define weak i64 @softboundcets___ctype_get_mb_cur_max() {
%1 = tail call i64 (...) @__ctype_get_mb_cur_max()
ret i64 %1
}
int fun420() { return 420; }


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

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

LLVM IR (-O0):
define i32 @fun420() {
ret i32 420
}

LLVM IR (-O2):
define i32 @fun420() {
ret i32 420
}
float asinf(float x) {
  float res;
  asm("fld	%%st\n\t"
      "fmul	%%st(0)\n\t"
      "fld1\n\t"
      "fsubp\n\t"
      "fsqrt\n\t"
      "fpatan"
      : "=t"(res)
      : "0"(x)
      : "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<asinf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
flds   -0xc(%rbp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fpatan
fstps  -0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinf>:
movss  %xmm0,-0x4(%rsp)
flds   -0x4(%rsp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fpatan
fstps  -0x8(%rsp)
movss  -0x8(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @asinf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = tail call float asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: \n");
  printf("    mugd port\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"usage: \0A\00"
@.str.1 = [15 x i8] c" mugd port\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"usage: \00"
@str.2 = [14 x i8] c" mugd port\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void pll_init(void) {
  (*(volatile unsigned long *)(0xE01FC000 + 0x084)) = 0x23;
  (*(volatile unsigned long *)(0xE01FC000 + 0x080)) = 0x03;
}


x86 assembly (clang, -O0):
<pll_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe01fc084,%eax
movq   $0x23,(%rax)
mov    $0xe01fc080,%eax
movq   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pll_init>:
mov    $0xe01fc080,%eax
movq   $0x23,0x4(%rax)
movq   $0x3,(%rax)
ret

LLVM IR (-O0):
define void @pll_init() {
store volatile i64 35, i64* inttoptr (i64 3760177284 to i64*)
store volatile i64 3, i64* inttoptr (i64 3760177280 to i64*)
ret void
}

LLVM IR (-O2):
define void @pll_init() {
store volatile i64 35, i64* inttoptr (i64 3760177284 to i64*)
store volatile i64 3, i64* inttoptr (i64 3760177280 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
long _sysconf(int name) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<_sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_sysconf>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i64 @_sysconf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i64 @_sysconf(i32 %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
int isTriplet(int a, int b, int c) {
  if (a * a + b * b == c * c) {
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<isTriplet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <isTriplet+0x38>
movl   $0x0,-0x4(%rbp)
jmp    113f <isTriplet+0x3f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTriplet>:
imul   %edi,%edi
imul   %esi,%esi
add    %edi,%esi
imul   %edx,%edx
xor    %eax,%eax
cmp    %edx,%esi
setne  %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @isTriplet(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, %0
%5 = mul nsw i32 %1, %1
%6 = add nuw nsw i32 %5, %4
%7 = mul nsw i32 %2, %2
%8 = icmp ne i32 %6, %7
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ hea_set_u64_bits(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void hea_cq_aer_length_align_err_reset(__u64 *aer) {
  *aer = hea_set_u64_bits(*aer, 0, 10, 35);
}


x86 assembly (clang, -O0):
<hea_cq_aer_length_align_err_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0x23,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_cq_aer_length_align_err_reset>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
xor    %esi,%esi
mov    $0xa,%edx
mov    $0x23,%ecx
call   1030 <hea_set_u64_bits@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @hea_cq_aer_length_align_err_reset(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @hea_set_u64_bits(i32 %2, i32 0, i32 10, i32 35)
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int atoi(char *);
int main(int argc, char *argv[]) {
  int index = atoi(argv[1]);
  char **ptr = argv + index;
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int swap1(int a, int b) {
  if (a >= b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<swap1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1121 <swap1+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <swap1+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap1>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @swap1(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 = load i32, i32* %5
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @swap1(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ findPrime(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("%lld\n", findPrime(10001));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2711,%edi
call   1040 <findPrime@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i32 @findPrime(i32 10001)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t dll_fwrite(void const *, size_t, size_t, int /*<<< orphan*/ *);
size_t __wrap_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) {
  return dll_fwrite(ptr, size, nmemb, stream);
}


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

x86 assembly (clang, -O2):
<__wrap_fwrite>:
jmp    1030 <dll_fwrite@plt>

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

LLVM IR (-O2):
define i64 @__wrap_fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i64 @dll_fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
void xref_macros() {}


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

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

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

LLVM IR (-O2):
define void @xref_macros() {
ret void
}
/* Type definitions */
struct loop_func {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mw_process();
void idle_cb(struct loop_func *f) {
  (void)f;
  mw_process();
}


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

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

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

LLVM IR (-O2):
%struct.loop_func = type { i32 }
define void @idle_cb(%struct.loop_func* nocapture readnone %0) {
%2 = tail call i32 (...) @mw_process()
ret void
}
void lgtd_proto_set_label(struct lgtd_client *client,
                          const struct lgtd_proto_target_list *targets,
                          const char *label) {
  (void)client;
  (void)targets;
  (void)label;
}


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

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

LLVM IR (-O0):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_set_label(%struct.lgtd_client* %0, %struct.lgtd_proto_target_list* %1, i8* %2) {
%4 = alloca %struct.lgtd_client*
%5 = alloca %struct.lgtd_proto_target_list*
%6 = alloca i8*
store %struct.lgtd_client* %0, %struct.lgtd_client** %4
store %struct.lgtd_proto_target_list* %1, %struct.lgtd_proto_target_list** %5
store i8* %2, i8** %6
%7 = load %struct.lgtd_client*, %struct.lgtd_client** %4
%8 = load %struct.lgtd_proto_target_list*, %struct.lgtd_proto_target_list** %5
%9 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_set_label(%struct.lgtd_client* nocapture %0, %struct.lgtd_proto_target_list* nocapture %1, i8* nocapture %2) {
ret void
}
void RTAvlULGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlULGet() {
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_has_a4(__le16 fc) {
  __le16 tmp = __cpu_to_le16(0x0100 | 0x0200);
  return (fc & tmp) == tmp;
}


x86 assembly (clang, -O0):
<ieee80211_has_a4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x300,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_has_a4>:
push   %rbx
mov    %edi,%ebx
mov    $0x300,%edi
call   1030 <__cpu_to_le16@plt>
not    %ebx
xor    %ecx,%ecx
test   %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee80211_has_a4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @__cpu_to_le16(i32 768)
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = and i32 %5, %6
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ieee80211_has_a4(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 768)
%3 = and i32 %2, %0
%4 = icmp eq i32 %3, %2
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_46int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x46 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_46int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 70
%7 = icmp ne i64 %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_46int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4587520
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
float Q_fabs(float f) {
  int tmp = (*(int *)&f) & 0x7FFFFFFF;
  return *(float *)&tmp;
}


x86 assembly (clang, -O0):
<Q_fabs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_fabs>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Q_fabs(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast float* %2 to i32*
%5 = load i32, i32* %4
%6 = and i32 %5, 2147483647
store i32 %6, i32* %3
%7 = bitcast i32* %3 to float*
%8 = load float, float* %7
ret float %8
}

LLVM IR (-O2):
define float @Q_fabs(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2147483647
%4 = bitcast i32 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: touch [-c] file...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"usage: touch [-c] file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"usage: touch [-c] file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void terminate(const char *message) {
  printf("%s\n", message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<terminate>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @terminate(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}