xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ detab(char *, int);
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0) {
    detab(line, len);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1186 <main+0x56>
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <detab@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <detab@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getline(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @detab(i8* %9, i32 %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @detab(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @getline(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_dart_comments() {
  test_parser_verify_parse(test_parser_sourcefile("dart", " //comment"), "dart",
                           "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_dart_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec8(%rip),%rdx
lea    0xeb8(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dart_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xed1(%rip),%rdx
lea    0xec1(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"dart\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_dart_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"dart\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_dart_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
struct stat {
  int st_dev;
  int st_rdev;
};

/* Variables and functions */
void __stat_fix(long p) {
  struct stat *st = (struct stat *)p;
  st->st_dev >>= 32;
  st->st_rdev >>= 32;
}


x86 assembly (clang, -O0):
<__stat_fix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    %edx,%ecx
mov    %ecx,0x4(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type { i32, i32 }
define void @__stat_fix(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.stat*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to %struct.stat*
store %struct.stat* %5, %struct.stat** %3
%6 = load %struct.stat*, %struct.stat** %3
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = ashr i32 %8, 32
store i32 %9, i32* %7
%10 = load %struct.stat*, %struct.stat** %3
%11 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 1
%12 = load i32, i32* %11
%13 = ashr i32 %12, 32
store i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @__stat_fix(i64 %0) {
ret void
}
void crc32(void) {}


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

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

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

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

/* Variables and functions */
int nlmsg_trim(struct sk_buff *, struct nlattr *);
int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) {
  return nlmsg_trim(skb, start);
}


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

x86 assembly (clang, -O2):
<nla_nest_cancel>:
jmp    1030 <nlmsg_trim@plt>

LLVM IR (-O0):
%struct.sk_buff = type { i32 }
%struct.nlattr = type { i32 }
define i32 @nla_nest_cancel(%struct.sk_buff* %0, %struct.nlattr* %1) {
%3 = alloca %struct.sk_buff*
%4 = alloca %struct.nlattr*
store %struct.sk_buff* %0, %struct.sk_buff** %3
store %struct.nlattr* %1, %struct.nlattr** %4
%5 = load %struct.sk_buff*, %struct.sk_buff** %3
%6 = load %struct.nlattr*, %struct.nlattr** %4
%7 = call i32 @nlmsg_trim(%struct.sk_buff* %5, %struct.nlattr* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.sk_buff = type { i32 }
%struct.nlattr = type { i32 }
define i32 @nla_nest_cancel(%struct.sk_buff* %0, %struct.nlattr* %1) {
%3 = tail call i32 @nlmsg_trim(%struct.sk_buff* %0, %struct.nlattr* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Load(char *, int);
int main() {
  Load("libone.so", 1);
  Load("libtwo.so", 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <Load@plt>
lea    0xee1(%rip),%rdi
mov    $0x2,%esi
call   1030 <Load@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"libone.so\00"
@.str.1 = [10 x i8] c"libtwo.so\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @Load(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @Load(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"libone.so\00"
@.str.1 = [10 x i8] c"libtwo.so\00"
define i32 @main() {
%1 = tail call i32 @Load(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @Load(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ glutFullScreen();
int /*<<< orphan*/ glutPositionWindow(int, int);
int /*<<< orphan*/ glutReshapeWindow(int, int);
void Teclado(unsigned char key, int x, int y) {
  if (key == 27)
    exit(0);
  if (key == 97)
    glutFullScreen();
  if (key == 65) {
    glutReshapeWindow(500, 400);
    glutPositionWindow(100, 100);
  }
}


x86 assembly (clang, -O0):
<Teclado>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    1168 <Teclado+0x28>
xor    %edi,%edi
call   1060 <exit@plt>
movzbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jne    117c <Teclado+0x3c>
mov    $0x0,%al
call   1050 <glutFullScreen@plt>
movzbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jne    11a4 <Teclado+0x64>
mov    $0x1f4,%edi
mov    $0x190,%esi
call   1030 <glutReshapeWindow@plt>
mov    $0x64,%esi
mov    %esi,%edi
call   1040 <glutPositionWindow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Teclado>:
push   %rax
cmp    $0x41,%dil
je     1155 <Teclado+0x15>
cmp    $0x61,%dil
je     1174 <Teclado+0x34>
cmp    $0x1b,%dil
je     117c <Teclado+0x3c>
pop    %rax
ret
mov    $0x1f4,%edi
mov    $0x190,%esi
call   1030 <glutReshapeWindow@plt>
mov    $0x64,%edi
mov    $0x64,%esi
pop    %rax
jmp    1040 <glutPositionWindow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutFullScreen@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @Teclado(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 27
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %3
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 97
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @glutFullScreen()
br label %18
18: ; preds = %16, %12
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = icmp eq i32 %20, 65
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = call i32 @glutReshapeWindow(i32 500, i32 400)
%24 = call i32 @glutPositionWindow(i32 100, i32 100)
br label %25
25: ; preds = %22, %18
ret void
}

LLVM IR (-O2):
define void @Teclado(i8 zeroext %0, i32 %1, i32 %2) {
switch i8 %0, label %11 [
i8 27, label %4
i8 97, label %6
i8 65, label %8
]
4: ; preds = %3
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %3
%7 = tail call i32 (...) @glutFullScreen()
br label %11
8: ; preds = %3
%9 = tail call i32 @glutReshapeWindow(i32 500, i32 400)
%10 = tail call i32 @glutPositionWindow(i32 100, i32 100)
br label %11
11: ; preds = %6, %3, %8
ret void
}
unsigned int convertIntEndian(unsigned int a) {
  unsigned int b0, b1, b2, b3;
  b0 = (a & 0x000000ff) << 24u;
  b1 = (a & 0x0000ff00) << 8u;
  b2 = (a & 0x00ff0000) >> 8u;
  b3 = (a & 0xff000000) >> 24u;
  return (b0 | b1 | b2 | b3);
}


x86 assembly (clang, -O0):
<convertIntEndian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff0000,%eax
shr    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertIntEndian>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @convertIntEndian(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = and i32 %7, 255
%9 = shl i32 %8, 24
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = shl i32 %11, 8
store i32 %12, i32* %4
%13 = load i32, i32* %2
%14 = and i32 %13, 16711680
%15 = lshr i32 %14, 8
store i32 %15, i32* %5
%16 = load i32, i32* %2
%17 = and i32 %16, -16777216
%18 = lshr i32 %17, 24
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = or i32 %19, %20
%22 = load i32, i32* %5
%23 = or i32 %21, %22
%24 = load i32, i32* %6
%25 = or i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @convertIntEndian(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
__attribute__((always_)) void vmk_AtomicPrologue(void) {}


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

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

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

LLVM IR (-O2):
define void @vmk_AtomicPrologue() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mumble_textmessage_callback(uint32_t actor, uint32_t n_session,
                                 uint32_t *session, uint32_t n_channel_id,
                                 uint32_t *channel_id, uint32_t n_tree_id,
                                 uint32_t *tree_id, char *message,
                                 void *user_data) {
  printf("textmessage_callback\n");
}


x86 assembly (clang, -O0):
<mumble_textmessage_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"textmessage_callback\0A\00"
define void @mumble_textmessage_callback(i32 %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5, i32* %6, i8* %7, i8* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i8*
%18 = alloca i8*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32* %2, i32** %12
store i32 %3, i32* %13
store i32* %4, i32** %14
store i32 %5, i32* %15
store i32* %6, i32** %16
store i8* %7, i8** %17
store i8* %8, i8** %18
%19 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"textmessage_callback\00"
define void @mumble_textmessage_callback(i32 %0, i32 %1, i32* nocapture readnone %2, i32 %3, i32* nocapture readnone %4, i32 %5, i32* nocapture readnone %6, i8* nocapture readnone %7, i8* nocapture readnone %8) {
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int machdep_sys_wait4(int, int *, int, int /*<<< orphan*/ *);
machdep_sys_waitpid(int a, int *b, int c) {
  return (machdep_sys_wait4(a, b, c, NULL));
}


x86 assembly (clang, -O0):
<machdep_sys_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <machdep_sys_wait4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machdep_sys_waitpid>:
xor    %ecx,%ecx
jmp    1030 <machdep_sys_wait4@plt>

LLVM IR (-O0):
define i32 @machdep_sys_waitpid(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 = load i32, i32* %6
%10 = call i32 @machdep_sys_wait4(i32 %7, i32* %8, i32 %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
define i32 @machdep_sys_waitpid(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @machdep_sys_wait4(i32 %0, i32* %1, i32 %2, i32* null)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int somatorio(int);
int main() {
  int x = 5;
  printf("Somatorio: %d", somatorio(x));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Somatorio: %d\00"
define i32 @main() {
%1 = tail call i32 @somatorio(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
void SetUnbufferedOutput() { setbuf(stdout, NULL); }


x86 assembly (clang, -O0):
<SetUnbufferedOutput>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetUnbufferedOutput>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <setbuf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @SetUnbufferedOutput() {
%1 = load i32, i32* @stdout
%2 = call i32 @setbuf(i32 %1, i32* null)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @SetUnbufferedOutput() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
ret void
}
long long gcd(long long a, long long b) {
  while ((a %= b) && (b %= a))
    ;
  return a + b;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
cqto
idiv   %rcx
mov    %rdx,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%rdx
mov    %al,-0x11(%rbp)
je     1147 <gcd+0x47>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
cmp    $0x0,%rdx
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1157 <gcd+0x57>
jmp    115c <gcd+0x5c>
jmp    110c <gcd+0xc>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
jmp    1120 <gcd+0x20>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,%rax
cqto
idiv   %rdi
mov    %rdx,%rsi
test   %rsi,%rsi
je     1166 <gcd+0x66>
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1140 <gcd+0x40>
mov    %rdi,%rax
cqto
idiv   %rsi
mov    %rdx,%rdi
test   %rdi,%rdi
jne    114d <gcd+0x4d>
jmp    1168 <gcd+0x68>
xchg   %ax,%ax
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%edi
test   %rdi,%rdi
je     1168 <gcd+0x68>
mov    %rsi,%rax
or     %rdi,%rax
shr    $0x20,%rax
jne    1110 <gcd+0x10>
mov    %esi,%eax
xor    %edx,%edx
div    %edi
mov    %edx,%esi
test   %rsi,%rsi
jne    1120 <gcd+0x20>
xor    %esi,%esi
add    %rdi,%rsi
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @gcd(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %5
5: ; preds = %17, %2
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = srem i64 %7, %6
store i64 %8, i64* %3
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = srem i64 %12, %11
store i64 %13, i64* %4
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %18
17: ; preds = %15
br label %5
18: ; preds = %15
%19 = load i64, i64* %3
%20 = load i64, i64* %4
%21 = add nsw i64 %19, %20
ret i64 %21
}

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i64 [ %0, %2 ], [ %6, %8 ]
%5 = phi i64 [ %1, %2 ], [ %9, %8 ]
%6 = srem i64 %4, %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = srem i64 %5, %6
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %8
%12 = phi i64 [ %5, %3 ], [ 0, %8 ]
%13 = add nsw i64 %12, %6
ret i64 %13
}
int a_twist_d_on_corner(corner)
int corner;
{
  int temp_arr[8];
  a_corner_unpack(corner, temp_arr);
  four_cycle(temp_arr, 5, 6, 7, 4);
  return a_corner_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_d_on_corner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1030 <a_corner_unpack@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
mov    $0x6,%edx
mov    $0x7,%ecx
mov    $0x4,%r8d
mov    $0x0,%al
call   1040 <four_cycle@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1050 <a_corner_pack@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_d_on_corner>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <a_corner_unpack@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x6,%edx
mov    $0x7,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1040 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <a_corner_pack@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_d_on_corner(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 5, i32 6, i32 7, i32 4)
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @a_twist_d_on_corner(i32 %0) {
%2 = alloca [8 x i32]
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_corner_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 5, i32 6, i32 7, i32 4)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @a_corner_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
void init(struct dhcphead *hpr) { return; }


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

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

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

LLVM IR (-O2):
%struct.dhcphead = type opaque
define void @init(%struct.dhcphead* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chmod(char *, int);
int strtol(char *, int /*<<< orphan*/, int);
void setperms(char *fname, char *mode) {
  int i;
  i = strtol(mode, 0, 8);
  chmod(fname, i);
}


x86 assembly (clang, -O0):
<setperms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <chmod@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setperms>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <strtol@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <chmod@plt>

LLVM IR (-O0):
define void @setperms(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strtol(i8* %6, i32 0, i32 8)
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = call i32 @chmod(i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @setperms(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @strtol(i8* %1, i32 0, i32 8)
%4 = tail call i32 @chmod(i8* %0, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int feof(int /*<<< orphan*/ *);
int stbi__stdio_eof(void *user) { return feof((FILE *)user); }


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

x86 assembly (clang, -O2):
<stbi__stdio_eof>:
jmp    1030 <feof@plt>

LLVM IR (-O0):
define i32 @stbi__stdio_eof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @feof(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @stbi__stdio_eof(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @feof(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void common(void) {
  printf("hello from common.c\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"hello from common.c\0A\00"
define void @common() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"hello from common.c\00"
define void @common() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct wgetfile {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int wget_close_verbose(struct wgetfile *, int /*<<< orphan*/ *, int);
int wget_close(struct wgetfile *finfo, FILE *f) {
  return wget_close_verbose(finfo, f, 1);
}


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

x86 assembly (clang, -O2):
<wget_close>:
mov    $0x1,%edx
jmp    1030 <wget_close_verbose@plt>

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

LLVM IR (-O2):
%struct.wgetfile = type { i32 }
define i32 @wget_close(%struct.wgetfile* %0, i32* %1) {
%3 = tail call i32 @wget_close_verbose(%struct.wgetfile* %0, i32* %1, i32 1)
ret i32 %3
}
int fun1197() { return 1197; }


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

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

LLVM IR (-O0):
define i32 @fun1197() {
ret i32 1197
}

LLVM IR (-O2):
define i32 @fun1197() {
ret i32 1197
}
unsigned int diff_num(unsigned int idx) { return idx; }


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

x86 assembly (clang, -O2):
<diff_num>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @diff_num(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *envp[]) {
  int local0;
  local0 = 0;
  while (local0 <= 9) {
    local0++;
  }
  printf("%i\n", local0);
  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    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x9,-0x1c(%rbp)
jg     1149 <main+0x39>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1131 <main+0x21>
mov    -0x1c(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i32 0, i32* %8
br label %9
9: ; preds = %12, %3
%10 = load i32, i32* %8
%11 = icmp sle i32 %10, 9
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %8
%14 = add nsw i32 %13, 1
store i32 %14, i32* %8
br label %9
15: ; preds = %9
%16 = load i32, i32* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void PR15623(int n) {
  if ((n == 0) != 0) {
    clang_analyzer_eval(n == 0);
  }
}


x86 assembly (clang, -O0):
<PR15623>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1141 <PR15623+0x31>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PR15623>:
test   %edi,%edi
je     1115 <PR15623+0x5>
ret
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

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

LLVM IR (-O2):
define void @PR15623(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @clang_analyzer_eval(i32 1)
br label %5
5: ; preds = %3, %1
ret void
}
int _pow1(int N, int M) {
  int P = M >> 1, Q = M - P;
  if (1 == M)
    return N;
  return _pow1(N, P) * _pow1(N, Q);
}


x86 assembly (clang, -O0):
<_pow1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
jne    1149 <_pow1+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <_pow1+0x5d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <_pow1@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <_pow1@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pow1>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x1,%ebp
cmp    $0x1,%esi
je     1146 <_pow1+0x36>
mov    %esi,%ebx
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebx,%esi
sar    %esi
sub    %esi,%ebx
mov    %r14d,%edi
call   1030 <_pow1@plt>
imul   %eax,%ebp
cmp    $0x1,%ebx
jne    1130 <_pow1+0x20>
imul   %r14d,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_pow1(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %10, %4 ], [ 1, %2 ]
%7 = ashr i32 %5, 1
%8 = sub nsw i32 %5, %7
%9 = tail call i32 @_pow1(i32 %0, i32 %7)
%10 = mul nsw i32 %9, %6
%11 = icmp eq i32 %8, 1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi i32 [ 1, %2 ], [ %10, %4 ]
%14 = mul nsw i32 %13, %0
ret i32 %14
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR5B_set(void) { return U_WMRCORENONE_set("U_WMR5B"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR5B\00"
define i8* @U_WMR5B_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
float Sleef_erff_u10(float x) { return __builtin_erff(x); }


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

x86 assembly (clang, -O2):
<Sleef_erff_u10>:
jmp    1030 <erff@plt>

LLVM IR (-O0):
define float @Sleef_erff_u10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @erff(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_erff_u10(float %0) {
%2 = tail call float @erff(float %0)
ret float %2
}
void rb_fast_mark_table_add_filename(char *filename) { filename[-1] = 1; }


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

x86 assembly (clang, -O2):
<rb_fast_mark_table_add_filename>:
movb   $0x1,-0x1(%rdi)
ret

LLVM IR (-O0):
define void @rb_fast_mark_table_add_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8 1, i8* %4
ret void
}

LLVM IR (-O2):
define void @rb_fast_mark_table_add_filename(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
store i8 1, i8* %2
ret void
}
unsigned xrop3_117_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_117_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_117_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
mov    %esi,%eax
xor    $0xff,%eax
or     %ecx,%eax
or     %edx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_117_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %7
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = load i32, i32* %6
%42 = and i32 %40, %41
%43 = or i32 %39, %42
%44 = load i32, i32* %5
%45 = load i32, i32* %7
%46 = and i32 %44, %45
%47 = or i32 %43, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @xrop3_117_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %5, 255
%8 = or i32 %7, %4
%9 = or i32 %8, %6
%10 = xor i32 %9, -1
%11 = or i8 %1, %0
%12 = zext i8 %11 to i32
%13 = or i32 %12, %10
ret i32 %13
}
void trim_new(char *str, char *target) {
  for (; *str == '0'; str++)
    ;
  for (; *str != '\0'; str++) {
    *target = *str;
    target++;
  }
  *target = '\0';
}


x86 assembly (clang, -O0):
<trim_new>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1132 <trim_new+0x32>
jmp    1121 <trim_new+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <trim_new+0xc>
jmp    1137 <trim_new+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1170 <trim_new+0x70>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1137 <trim_new+0x37>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_new>:
movzbl (%rdi),%eax
add    $0x1,%rdi
cmp    $0x30,%al
je     1100 <trim_new>
test   %al,%al
je     1132 <trim_new+0x32>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsi,%rcx,1)
movzbl (%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1120 <trim_new+0x20>
add    %rcx,%rsi
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @trim_new(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %4, i64 1
switch i8 %5, label %7 [
i8 48, label %3
i8 0, label %15
]
7: ; preds = %3, %7
%8 = phi i8* [ %11, %7 ], [ %1, %3 ]
%9 = phi i8* [ %12, %7 ], [ %4, %3 ]
%10 = phi i8 [ %13, %7 ], [ %5, %3 ]
store i8 %10, i8* %8
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %3, %7
%16 = phi i8* [ %11, %7 ], [ %1, %3 ]
store i8 0, i8* %16
ret void
}
void out_long(char *c, long l) {
  *c++ = l >> 24;
  *c++ = (l >> 16) & 0xff;
  *c++ = (l >> 8) & 0xff;
  *c = l & 0xff;
}


x86 assembly (clang, -O0):
<out_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @out_long(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = ashr i64 %5, 24
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
store i8 %7, i8* %8
%10 = load i64, i64* %4
%11 = ashr i64 %10, 16
%12 = and i64 %11, 255
%13 = trunc i64 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
store i8 %13, i8* %14
%16 = load i64, i64* %4
%17 = ashr i64 %16, 8
%18 = and i64 %17, 255
%19 = trunc i64 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
store i8 %19, i8* %20
%22 = load i64, i64* %4
%23 = and i64 %22, 255
%24 = trunc i64 %23 to i8
%25 = load i8*, i8** %3
store i8 %24, i8* %25
ret void
}

LLVM IR (-O2):
define void @out_long(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i64 %1, 8
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i64 %1 to i8
store i8 %12, i8* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_19() {
  Assert_real((isqrt(19) == 4),
              "/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",
              100, ("Integer square root of 19 should be 4"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_19>:
push   %rax
mov    $0x13,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x64,%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 = [38 x i8] c"Integer square root of 19 should be 4\00"
define void @t_sqrt_19() {
%1 = call i32 @isqrt(i32 19)
%2 = icmp eq i32 %1, 4
%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 100, i8* getelementptr inbounds ([38 x i8], [38 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 = [38 x i8] c"Integer square root of 19 should be 4\00"
define void @t_sqrt_19() {
%1 = tail call i32 @isqrt(i32 19)
%2 = icmp eq i32 %1, 4
%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 100, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void mtd_write_bootloader(char *filename, int offset, int len) {}


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

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

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

LLVM IR (-O2):
define void @mtd_write_bootloader(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
void rsn_preauth_iface_deinit(struct hostapd_data *hapd) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define void @rsn_preauth_iface_deinit(%struct.hostapd_data* nocapture %0) {
ret void
}