xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) signed __int128 t141_2sub(unsigned __int128 y) {
  signed __int128 x =
      (((signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1)));
  signed __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t141_2sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x38(%rbp)
movq   $0xffffffffffffffff,-0x40(%rbp)
ff
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    %rcx,%r9
sar    $0x3f,%r9
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
mov    %r9,%r8
sbb    $0x0,%r8
sbb    $0x0,%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
mov    %rcx,%rdi
shr    $0x3f,%rdi
xor    %rdi,%rsi
or     %rsi,%rax
setne  %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    11ad <t141_2sub+0x9d>
jmp    11b4 <t141_2sub+0xa4>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t141_2sub>:
mov    %rdi,%rax
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    %rsi,%rdx
not    %rax
ret

LLVM IR (-O0):
define { i64, i64 } @t141_2sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 170141183460469231731687303715884105727, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = sext i128 %12 to i129
%15 = zext i128 %13 to i129
%16 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 %14, i129 %15)
%17 = extractvalue { i129, i1 } %16, 1
%18 = extractvalue { i129, i1 } %16, 0
%19 = trunc i129 %18 to i128
%20 = sext i128 %19 to i129
%21 = icmp ne i129 %18, %20
%22 = or i1 %17, %21
store i128 %19, i128* %7
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @bar()
br label %25
25: ; preds = %23, %2
%26 = load i128, i128* %7
store i128 %26, i128* %3
%27 = bitcast i128* %3 to { i64, i64 }*
%28 = load { i64, i64 }, { i64, i64 }* %27
ret { i64, i64 } %28
}

LLVM IR (-O2):
define { i64, i64 } @t141_2sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nsw i129 170141183460469231731687303715884105727, %7
%9 = trunc i129 %8 to i64
%10 = lshr i129 %8, 64
%11 = trunc i129 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
void tegra_dvfs_add_relationships(struct dvfs_relationship *rels, int n) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.dvfs_relationship = type opaque
define void @tegra_dvfs_add_relationships(%struct.dvfs_relationship* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fio_read_8(int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int fio_abs_read_8(FILE *f, long offset) {
  if (fseek(f, offset, SEEK_SET) != 0)
    return -1;
  return (fio_read_8(f));
}


x86 assembly (clang, -O0):
<fio_abs_read_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
cmp    $0x0,%rax
je     115c <fio_abs_read_8+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <fio_abs_read_8+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <fio_read_8@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_abs_read_8>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
test   %rax,%rax
je     113e <fio_abs_read_8+0x1e>
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fio_read_8@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @fio_abs_read_8(i32* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
%6 = load i32*, i32** %4
%7 = load i64, i64* %5
%8 = load i32, i32* @SEEK_SET
%9 = call i64 @fseek(i32* %6, i64 %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %15
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = call i32 @fio_read_8(i32* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @fio_abs_read_8(i32* %0, i64 %1) {
%3 = load i32, i32* @SEEK_SET
%4 = tail call i64 @fseek(i32* %0, i64 %1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @fio_read_8(i32* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar(int);
int baz(int);
int foo(int);
int main() {
  if (foo(3) != 6 || bar(2) != 8 || baz(0) != 8 || baz(1) != 6)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1060 <foo@plt>
cmp    $0x6,%eax
jne    1198 <main+0x58>
mov    $0x2,%edi
call   1050 <bar@plt>
cmp    $0x8,%eax
jne    1198 <main+0x58>
xor    %edi,%edi
call   1040 <baz@plt>
cmp    $0x8,%eax
jne    1198 <main+0x58>
mov    $0x1,%edi
call   1040 <baz@plt>
cmp    $0x6,%eax
je     119f <main+0x5f>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1060 <foo@plt>
cmp    $0x6,%eax
jne    117e <main+0x3e>
mov    $0x2,%edi
call   1050 <bar@plt>
cmp    $0x8,%eax
jne    117e <main+0x3e>
xor    %edi,%edi
call   1040 <baz@plt>
cmp    $0x8,%eax
jne    117e <main+0x3e>
mov    $0x1,%edi
call   1040 <baz@plt>
cmp    $0x6,%eax
jne    117e <main+0x3e>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 3)
%3 = icmp ne i32 %2, 6
br i1 %3, label %13, label %4
4: ; preds = %0
%5 = call i32 @bar(i32 2)
%6 = icmp ne i32 %5, 8
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = call i32 @baz(i32 0)
%9 = icmp ne i32 %8, 8
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = call i32 @baz(i32 1)
%12 = icmp ne i32 %11, 6
br i1 %12, label %13, label %15
13: ; preds = %10, %7, %4, %0
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3)
%2 = icmp eq i32 %1, 6
br i1 %2, label %3, label %12
3: ; preds = %0
%4 = tail call i32 @bar(i32 2)
%5 = icmp eq i32 %4, 8
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = tail call i32 @baz(i32 0)
%8 = icmp eq i32 %7, 8
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i32 @baz(i32 1)
%11 = icmp eq i32 %10, 6
br i1 %11, label %14, label %12
12: ; preds = %9, %6, %3, %0
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, int);
void superio_write_key(int addrreg, unsigned char *key) {
  int i;
  for (i = 1; i <= key[0]; i++)
    outb(key[i], addrreg);
}


x86 assembly (clang, -O0):
<superio_write_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
jg     115c <superio_write_key+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x4(%rbp),%esi
movzbl %al,%edi
call   1030 <outb@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <superio_write_key+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<superio_write_key>:
push   %rbp
push   %r14
push   %rbx
cmpb   $0x0,(%rsi)
je     1149 <superio_write_key+0x39>
mov    %rsi,%rbx
mov    %edi,%r14d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx,%rbp,1),%edi
mov    %r14d,%esi
call   1030 <outb@plt>
movzbl (%rbx),%eax
add    $0x1,%rbp
cmp    %rax,%rbp
jb     1130 <superio_write_key+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @superio_write_key(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 1, %2 ]
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @outb(i8 zeroext %8, i32 %0)
%10 = add nuw nsw i64 %6, 1
%11 = load i8, i8* %1
%12 = zext i8 %11 to i64
%13 = icmp ult i64 %6, %12
br i1 %13, label %5, label %14
14: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  printf("%d Hello World\n", argc);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"%d Hello World\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
void testMemory() {}


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

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

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

LLVM IR (-O2):
define void @testMemory() {
ret void
}
void SteamAPI_ISteamController_RunFrame(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamController_RunFrame>:
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):
<SteamAPI_ISteamController_RunFrame>:
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__.SteamAPI_ISteamController_RunFrame = [35 x i8] c"SteamAPI_ISteamController_RunFrame\00"
define void @SteamAPI_ISteamController_RunFrame(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 ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamController_RunFrame, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamController_RunFrame = [35 x i8] c"SteamAPI_ISteamController_RunFrame\00"
define void @SteamAPI_ISteamController_RunFrame(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 ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamController_RunFrame, i64 0, i64 0), i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ time;
};
typedef TYPE_1__ XSelectionClearEvent;

/* Variables and functions */
unsigned long get_XSelectionClearEvent_time(void *_p) {
  return (unsigned long)((XSelectionClearEvent *)_p)->time;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XSelectionClearEvent_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XSelectionClearEvent_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ dieError(char *, int);
scalar_t__ send(int, char *, int, int /*<<< orphan*/);
int strlen(char *);
void sendCommand(int sock, char *msg) {
  int msgLen = strlen(msg);
  if (send(sock, msg, msgLen, 0) <= 0)
    dieError("send() sent a different number of bytes than expected", sock);
}


x86 assembly (clang, -O0):
<sendCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0x0,%rax
jg     1175 <sendCommand+0x45>
mov    -0x4(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1050 <dieError@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendCommand>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
test   %rax,%rax
jle    115a <sendCommand+0x2a>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe9f(%rip),%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <dieError@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"send() sent a different number of bytes than expected\00"
define void @sendCommand(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i64 @send(i32 %8, i8* %9, i32 %10, i32 0)
%12 = icmp sle i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %3
%15 = call i32 @dieError(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"send() sent a different number of bytes than expected\00"
define void @sendCommand(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @send(i32 %0, i8* %1, i32 %3, i32 0)
%5 = icmp slt i64 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @dieError(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("  Sort [options]\n"
         "\n"
         "  -s             Shuffle mode\n"
         "  -o [filename]  Output to file or stdout\n"
         "  -h             Show help\n");
}


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

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

LLVM IR (-O0):
@.str = [118 x i8] c" Sort [options]\0A\0A -s Shuffle mode\0A -o [filename] Output to file or stdout\0A -h Show help\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [117 x i8] c" Sort [options]\0A\0A -s Shuffle mode\0A -o [filename] Output to file or stdout\0A -h Show help\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str, i64 0, i64 0))
ret void
}
void bcopy(s1, s2, n) char *s1, *s2;
int n;
{ (void)memcpy(s2, s1, n); }


x86 assembly (clang, -O0):
<bcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcopy>:
mov    %rdi,%rax
movslq %edx,%rdx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @bcopy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
ret void
}

LLVM IR (-O2):
define void @bcopy(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2) {
%4 = sext i32 %2 to i64
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 %0, i64 %4, i1 false)
ret void
}
int test_imm_CAuint32_reg(unsigned int val) {
  return ((val) & (0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xca,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_CAuint32_reg(i32 %0) {
%2 = and i32 %0, 202
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void BSP_PeriodicTask_Restart(void) {
  (*((volatile uint32_t *)0x4004F024)) = 0x00000001;
  (*((volatile uint32_t *)0xE000E10C)) = 1 << 8;
}


x86 assembly (clang, -O0):
<BSP_PeriodicTask_Restart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4004f024,%eax
movl   $0x1,(%rax)
mov    $0xe000e10c,%eax
movl   $0x100,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_PeriodicTask_Restart>:
movl   $0x1,0x4004f024
mov    $0xe000e10c,%eax
movl   $0x100,(%rax)
ret

LLVM IR (-O0):
define void @BSP_PeriodicTask_Restart() {
store volatile i32 1, i32* inttoptr (i64 1074065444 to i32*)
store volatile i32 256, i32* inttoptr (i64 3758153996 to i32*)
ret void
}

LLVM IR (-O2):
define void @BSP_PeriodicTask_Restart() {
store volatile i32 1, i32* inttoptr (i64 1074065444 to i32*)
store volatile i32 256, i32* inttoptr (i64 3758153996 to i32*)
ret void
}
void memory_init() {}


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

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

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

LLVM IR (-O2):
define void @memory_init() {
ret void
}
int execute_setxattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setxattr() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDevLPMDisable(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000362))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<USBDevLPMDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x362,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDevLPMDisable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xfffffffe,0x362(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBDevLPMDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 866
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -2
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBDevLPMDisable(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 866
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -2
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_136() {
  Assert_real((isqrt(136) == 11),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              685, ("Integer square root of 136 should be 11"));
}


x86 assembly (clang, -O0):
<t_sqrt_136>:
push   %rbp
mov    %rsp,%rbp
mov    $0x88,%edi
call   1030 <isqrt@plt>
cmp    $0xb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x2ad,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_136>:
push   %rax
mov    $0x88,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xb,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x2ad,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 136 should be 11\00"
define void @t_sqrt_136() {
%1 = call i32 @isqrt(i32 136)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 685, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 136 should be 11\00"
define void @t_sqrt_136() {
%1 = tail call i32 @isqrt(i32 136)
%2 = icmp eq i32 %1, 11
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 685, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void goflexnet_init(void) {}


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

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

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

LLVM IR (-O2):
define void @goflexnet_init() {
ret void
}
int test_imm_2Aint8_reg(signed char val) {
  return ((val) & (-0x2A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Aint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffd6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_2Aint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -42
%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_2Aint8_reg(i8 signext %0) {
%2 = and i8 %0, -42
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_2Eint16_mem(short *val) {
  return ((*val) & (0x2E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Eint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 46
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int exec(char *s, int wait) {
  int pid;
  asm volatile("int $0x30" : "=a"(pid) : "a"(4), "b"(s), "c"(wait));
  return pid;
}


x86 assembly (clang, -O0):
<exec>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rbx
mov    -0x14(%rbp),%ecx
mov    $0x4,%eax
int    $0x30
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec>:
push   %rbx
mov    %esi,%ecx
mov    %rdi,%rbx
mov    $0x4,%eax
int    $0x30
pop    %rbx
ret

LLVM IR (-O0):
define i32 @exec(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 asm sideeffect "int $$0x30", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 4, i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @exec(i8* %0, i32 %1) {
%3 = tail call i32 asm sideeffect "int $$0x30", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 4, i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
double limit_degrees(double);
double sun_mean_longitude(double jme) {
  return limit_degrees(
      280.4664567 +
      jme * (360007.6982779 +
             jme * (0.03032028 +
                    jme * (1 / 49931.0 +
                           jme * (-1 / 15300.0 + jme * (-1 / 2000000.0))))));
}


x86 assembly (clang, -O0):
<sun_mean_longitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm4
movsd  0xee2(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xede(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xebe(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xea6(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe8e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <limit_degrees@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_mean_longitude>:
movsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xed4(%rip),%xmm0
jmp    1030 <limit_degrees@plt>

LLVM IR (-O0):
define double @sun_mean_longitude(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double %7, double -5.000000e-07, double 0xBF11223344556678)
%9 = call double @llvm.fmuladd.f64(double %6, double %8, double 0x3EF50020D0334550)
%10 = call double @llvm.fmuladd.f64(double %5, double %9, double 0x3F9F0C478C05B247)
%11 = call double @llvm.fmuladd.f64(double %4, double %10, double 0x4115F91ECB095CA0)
%12 = call double @llvm.fmuladd.f64(double %3, double %11, double 0x407187769B4CF800)
%13 = call double @limit_degrees(double %12)
ret double %13
}

LLVM IR (-O2):
define double @sun_mean_longitude(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double -5.000000e-07, double 0xBF11223344556678)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x3EF50020D0334550)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0x3F9F0C478C05B247)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 0x4115F91ECB095CA0)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double 0x407187769B4CF800)
%7 = tail call double @limit_degrees(double %6)
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void set_16(uint16_t *p, uint16_t v) { *p = v; }


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

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

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

LLVM IR (-O2):
define void @set_16(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
char Caps(char a) {
  if (a > 96)
    return a - 32;
  else
    return a;
}


x86 assembly (clang, -O0):
<Caps>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x60,%eax
jle    1126 <Caps+0x26>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    112c <Caps+0x2c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Caps>:
lea    -0x20(%rdi),%eax
cmp    $0x61,%dil
movzbl %al,%eax
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @Caps(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 96
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 32
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %14
12: ; preds = %1
%13 = load i8, i8* %3
store i8 %13, i8* %2
br label %14
14: ; preds = %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @Caps(i8 signext %0) {
%2 = icmp sgt i8 %0, 96
%3 = add i8 %0, -32
%4 = select i1 %2, i8 %3, i8 %0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void and_reg32_imm32(int reg32, unsigned long imm32) {
  put8(0x81);
  put8(0xE0 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<and_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xe0,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_reg32_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xe0,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @and_reg32_imm32(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 129)
%6 = load i32, i32* %3
%7 = add nsw i32 224, %6
%8 = call i32 @put8(i32 %7)
%9 = load i64, i64* %4
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @and_reg32_imm32(i32 %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = add nsw i32 %0, 224
%5 = tail call i32 @put8(i32 %4)
%6 = tail call i32 @put32(i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strtok1();
int /*<<< orphan*/ strtok2();
int /*<<< orphan*/ strtok3();
int main(void) {
  strtok1();
  strtok2();
  strtok3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <strtok1@plt>
mov    $0x0,%al
call   1030 <strtok2@plt>
mov    $0x0,%al
call   1040 <strtok3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <strtok1@plt>
xor    %eax,%eax
call   1030 <strtok2@plt>
xor    %eax,%eax
call   1040 <strtok3@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @strtok1()
%2 = tail call i32 (...) @strtok2()
%3 = tail call i32 (...) @strtok3()
ret i32 0
}
/* Type definitions */
typedef size_t uint32_t;

/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(uint32_t nmemb, uint32_t size) {
  size_t total_size = nmemb * size;
  void *ptr = malloc(total_size);
  memset(ptr, 0, total_size);
  return ptr;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = load i64, i64* %5
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
%15 = load i8*, i8** %6
ret i8* %15
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int state;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
void set_XButtonPressedEvent_state(void *_p, unsigned _v) {
  ((XButtonPressedEvent *)_p)->state = (unsigned)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XButtonPressedEvent_state(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XButtonPressedEvent_state(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_usage(const char *bin) {
  printf("Usage: %s [-lh] <file_name> <version_number>\n", bin);
}


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

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

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

LLVM IR (-O2):
@.str = [46 x i8] c"Usage: %s [-lh] <file_name> <version_number>\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int Baz(void) {
  return 31;
  return 32;
  return 33;
}


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

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

LLVM IR (-O0):
define i32 @Baz() {
ret i32 31
}

LLVM IR (-O2):
define i32 @Baz() {
ret i32 31
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void usage(int exit_status) {
  puts("EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\n"
       "\n"
       "Syntax:	easylogo [options] inputfile [outputvar [outputfile]]\n"
       "\n"
       "Options:\n"
       "  -r     Output RGB instead of YUYV\n"
       "  -h     Help output\n"
       "\n"
       "Where: 'inputfile'   is the TGA image to load\n"
       "       'outputvar'   is the variable name to create\n"
       "       'outputfile'  is the output header file (default is "
       "'inputfile.h')");
  exit(exit_status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [344 x i8] c"EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\0A\0ASyntax:\09easylogo [options] inputfile [outputvar [outputfile]]\0A\0AOptions:\0A -r Output RGB instead of YUYV\0A -h Help output\0A\0AWhere: 'inputfile' is the TGA image to load\0A 'outputvar' is the variable name to create\0A 'outputfile' is the output header file (default is 'inputfile.h')\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [344 x i8] c"EasyLogo 1.0 (C) 2000 by Paolo Scaffardi\0A\0ASyntax:\09easylogo [options] inputfile [outputvar [outputfile]]\0A\0AOptions:\0A -r Output RGB instead of YUYV\0A -h Help output\0A\0AWhere: 'inputfile' is the TGA image to load\0A 'outputvar' is the variable name to create\0A 'outputfile' is the output header file (default is 'inputfile.h')\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t maj(uint32_t x, uint32_t y, uint32_t z) {
  return (x & y) ^ (x & z) ^ (y & z);
}


x86 assembly (clang, -O0):
<maj>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maj>:
mov    %edx,%eax
xor    %esi,%eax
and    %edi,%eax
and    %esi,%edx
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @maj(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = xor i32 %9, %12
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
%17 = xor i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @maj(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = xor i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_r(scalar_t__);
int32_t __stdfix_sadd_r(int32_t x, int32_t y) {
  return (__stdfix_sat_r((int32_t)x + (int32_t)y));
}


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

x86 assembly (clang, -O2):
<__stdfix_sadd_r>:
add    %rsi,%rdi
jmp    1030 <__stdfix_sat_r@plt>

LLVM IR (-O0):
define i64 @__stdfix_sadd_r(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 = call i64 @__stdfix_sat_r(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @__stdfix_sadd_r(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call i64 @__stdfix_sat_r(i64 %3)
ret i64 %4
}
void demo_art(char *cfgfile, char *weightfile, int cam_index) {}


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

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

LLVM IR (-O0):
define void @demo_art(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @demo_art(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
long double strtold(char *, char **);
long double t20(char **x) { return strtold("123.4", x); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"123.4\00"
define x86_fp80 @t20(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call x86_fp80 @strtold(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"123.4\00"
define x86_fp80 @t20(i8** nocapture %0) {
%2 = tail call x86_fp80 @strtold(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ emit_adc(int, int);
int /*<<< orphan*/ emit_cmpimm(int, int);
int /*<<< orphan*/ emit_shrimm(int, int, int);
void emit_cmppz(int s, int sr) {
  emit_shrimm(sr, 1, sr);
  emit_cmpimm(s, 0x80000000);
  emit_adc(sr, sr);
}


x86 assembly (clang, -O0):
<emit_cmppz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%esi
call   1040 <emit_shrimm@plt>
mov    -0x4(%rbp),%edi
mov    $0x80000000,%esi
call   1030 <emit_cmpimm@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <emit_adc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_cmppz>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1040 <emit_shrimm@plt>
mov    %ebp,%edi
mov    $0x80000000,%esi
call   1030 <emit_cmpimm@plt>
mov    %ebx,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <emit_adc@plt>

LLVM IR (-O0):
define void @emit_cmppz(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @emit_shrimm(i32 %5, i32 1, i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @emit_cmpimm(i32 %8, i32 -2147483648)
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @emit_adc(i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @emit_cmppz(i32 %0, i32 %1) {
%3 = tail call i32 @emit_shrimm(i32 %1, i32 1, i32 %1)
%4 = tail call i32 @emit_cmpimm(i32 %0, i32 -2147483648)
%5 = tail call i32 @emit_adc(i32 %1, i32 %1)
ret void
}
void f8(int *p, int *q) {
  if (!p)
    if (p)
      *p = 1;
  if (q)
    if (!q)
      *q = 1;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1131 <f8+0x31>
cmpq   $0x0,-0x8(%rbp)
je     112c <f8+0x2c>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
jmp    1131 <f8+0x31>
cmpq   $0x0,-0x10(%rbp)
je     1156 <f8+0x56>
cmpq   $0x0,-0x10(%rbp)
jne    1151 <f8+0x51>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1156 <f8+0x56>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f8(i32* nocapture %0, i32* nocapture %1) {
ret void
}