xunge/DecIR huggingface dataset:
/* Variables and functions */
char *exename_of_sysCx();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void show_usage() {
  fprintf(stderr, "Usage: %s [[-f] SCRIPTFILE | -- SCRIPT]\n",
          exename_of_sysCx());
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <exename_of_sysCx@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <exename_of_sysCx@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [[-f] SCRIPTFILE | -- SCRIPT]\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @exename_of_sysCx()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [[-f] SCRIPTFILE | -- SCRIPT]\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @exename_of_sysCx()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void SleeperCleanup(void *param) {
  (void)param;
  fprintf(stderr, "SleeperCleanup called\n");
}


x86 assembly (clang, -O0):
<SleeperCleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SleeperCleanup>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"SleeperCleanup called\0A\00"
define void @SleeperCleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"SleeperCleanup called\0A\00"
define void @SleeperCleanup(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int isContinue(void) {
  char c;
  printf("continue[y/n]: ");
  scanf(" %c", &c);
  if (c == 'Y' || c == 'y')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isContinue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
je     115e <isContinue+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    116a <isContinue+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1171 <isContinue+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isContinue>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x7(%rsp),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"continue[y/n]: \00"
@.str.1 = [4 x i8] c" %c\00"
define i32 @isContinue() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 89
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 121
br i1 %11, label %12, label %13
12: ; preds = %8, %0
store i32 1, i32* %1
br label %14
13: ; preds = %8
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [16 x i8] c"continue[y/n]: \00"
@.str.1 = [4 x i8] c" %c\00"
define i32 @isContinue() {
%1 = alloca i8
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = and i8 %4, -33
%6 = icmp eq i8 %5, 89
%7 = zext i1 %6 to i32
ret i32 %7
}
char *langRomTypeNationalSram() { return "National (SRAM)"; }


x86 assembly (clang, -O0):
<langRomTypeNationalSram>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeNationalSram>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"National (SRAM)\00"
define i8* @langRomTypeNationalSram() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"National (SRAM)\00"
define i8* @langRomTypeNationalSram() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void ADCDMAEnable(unsigned long ulBase, unsigned long ulChannel) {
  unsigned long ulBitMask;
  ulBitMask = (ulChannel == 0x00000000)   ? 0x01
              : (ulChannel == 0x00000008) ? 0x04
              : (ulChannel == 0x00000010) ? 0x10
                                          : 0x40;
  (*((volatile unsigned long *)(ulBase + 0x00000064))) |= ulBitMask;
}


x86 assembly (clang, -O0):
<ADCDMAEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <ADCDMAEnable+0x24>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115a <ADCDMAEnable+0x5a>
cmpq   $0x8,-0x10(%rbp)
jne    113c <ADCDMAEnable+0x3c>
mov    $0x4,%eax
mov    %eax,-0x20(%rbp)
jmp    1154 <ADCDMAEnable+0x54>
mov    -0x10(%rbp),%rdx
mov    $0x40,%eax
mov    $0x10,%ecx
cmp    $0x10,%rdx
cmove  %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x64(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCDMAEnable>:
test   %rsi,%rsi
je     1115 <ADCDMAEnable+0x15>
cmp    $0x8,%rsi
jne    111f <ADCDMAEnable+0x1f>
mov    $0x4,%eax
or     %rax,0x64(%rdi)
ret
mov    $0x1,%eax
or     %rax,0x64(%rdi)
ret
cmp    $0x10,%rsi
mov    $0x40,%eax
cmove  %rsi,%rax
or     %rax,0x64(%rdi)
ret

LLVM IR (-O0):
define void @ADCDMAEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
br label %20
9: ; preds = %2
%10 = load i64, i64* %4
%11 = icmp eq i64 %10, 8
br i1 %11, label %12, label %13
12: ; preds = %9
br label %18
13: ; preds = %9
%14 = load i64, i64* %4
%15 = icmp eq i64 %14, 16
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 16, i32 64
br label %18
18: ; preds = %13, %12
%19 = phi i32 [ 4, %12 ], [ %17, %13 ]
br label %20
20: ; preds = %18, %8
%21 = phi i32 [ 1, %8 ], [ %19, %18 ]
%22 = sext i32 %21 to i64
store i64 %22, i64* %5
%23 = load i64, i64* %5
%24 = load i64, i64* %3
%25 = add i64 %24, 100
%26 = inttoptr i64 %25 to i64*
%27 = load volatile i64, i64* %26
%28 = or i64 %27, %23
store volatile i64 %28, i64* %26
ret void
}

LLVM IR (-O2):
define void @ADCDMAEnable(i64 %0, i64 %1) {
switch i64 %1, label %3 [
i64 0, label %7
i64 8, label %6
]
3: ; preds = %2
%4 = icmp eq i64 %1, 16
%5 = select i1 %4, i64 16, i64 64
br label %7
6: ; preds = %2
br label %7
7: ; preds = %2, %6, %3
%8 = phi i64 [ 1, %2 ], [ %5, %3 ], [ 4, %6 ]
%9 = add i64 %0, 100
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = or i64 %11, %8
store volatile i64 %12, i64* %10
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int K, x;
  K = __VERIFIER_nondet_int();
  x = __VERIFIER_nondet_int();
  while (x != K) {
    if (x > K) {
      x = x - 1;
    } else {
      x = x + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1167 <main+0x57>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1159 <main+0x49>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <main+0x52>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ revNumber(int);
int main() {
  int number;
  number = 5170984;
  revNumber(number);
  number = 406567;
  revNumber(number);
  number = 368750;
  revNumber(number);
  number = 2369510;
  revNumber(number);
  number = 2183293;
  revNumber(number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4ee728,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <revNumber@plt>
movl   $0x63427,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <revNumber@plt>
movl   $0x5a06e,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <revNumber@plt>
movl   $0x2427e6,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <revNumber@plt>
movl   $0x21507d,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <revNumber@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4ee728,%edi
call   1030 <revNumber@plt>
mov    $0x63427,%edi
call   1030 <revNumber@plt>
mov    $0x5a06e,%edi
call   1030 <revNumber@plt>
mov    $0x2427e6,%edi
call   1030 <revNumber@plt>
mov    $0x21507d,%edi
call   1030 <revNumber@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5170984, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @revNumber(i32 %3)
store i32 406567, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @revNumber(i32 %5)
store i32 368750, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @revNumber(i32 %7)
store i32 2369510, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @revNumber(i32 %9)
store i32 2183293, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @revNumber(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @revNumber(i32 5170984)
%2 = tail call i32 @revNumber(i32 406567)
%3 = tail call i32 @revNumber(i32 368750)
%4 = tail call i32 @revNumber(i32 2369510)
%5 = tail call i32 @revNumber(i32 2183293)
ret i32 0
}
/* Variables and functions */
scalar_t__ realloc(void *, unsigned int);
void *space(unsigned int);
void *xrealloc(void *p, unsigned size) {
  if (p == 0)
    return space(size);
  p = (void *)realloc(p, size);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xrealloc+0x2b>
mov    -0x14(%rbp),%edi
call   1030 <space@plt>
mov    %rax,-0x8(%rbp)
jmp    1163 <xrealloc+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
test   %rdi,%rdi
je     112a <xrealloc+0xa>
jmp    1040 <realloc@plt>
mov    %esi,%edi
jmp    1030 <space@plt>

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %5
%10 = call i8* @space(i32 %9)
store i8* %10, i8** %3
br label %17
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i64 @realloc(i8* %12, i32 %13)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %4
%16 = load i8*, i8** %4
store i8* %16, i8** %3
br label %17
17: ; preds = %11, %8
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @space(i32 %1)
br label %9
6: ; preds = %2
%7 = tail call i64 @realloc(i8* %0, i32 %1)
%8 = inttoptr i64 %7 to i8*
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %5, %4 ], [ %8, %6 ]
ret i8* %10
}
void ft_reset(int *i, int *j) {
  *i = 0;
  *j = 0;
}


x86 assembly (clang, -O0):
<ft_reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_reset>:
movl   $0x0,(%rdi)
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @ft_reset(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
store i32 0, i32* %5
%6 = load i32*, i32** %4
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @ft_reset(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 0, i32* %0
store i32 0, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_exheres_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("exheres", " #comment"),
                            "comment", "#comment");
}


x86 assembly (clang, -O0):
<test_exheres_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xeca(%rip),%rsi
lea    0xec2(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_exheres_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xecf(%rip),%rsi
lea    0xec7(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"exheres\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_exheres_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"exheres\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c"#comment\00"
define void @test_exheres_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ICPrintingString() { printf("1234567890\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"1234567890\00"
define void @ICPrintingString() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
void gtk_get_event_widget() {}


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

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

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

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

/* Variables and functions */
uint32_t CH(uint32_t x, uint32_t y, uint32_t z) {
  uint32_t answ = (x & y) ^ (~x & z);
  return answ;
}


x86 assembly (clang, -O0):
<CH>:
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
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @CH(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
unsigned char f47(unsigned char x, unsigned int y) {
  return (x >> y) | (x << ((-y) & (8 * sizeof(unsigned char) - 1)));
}


x86 assembly (clang, -O0):
<f47>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0x7,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f47>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
and    $0x7,%cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f47(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i32, i32* %4
%12 = sub i32 0, %11
%13 = zext i32 %12 to i64
%14 = and i64 %13, 7
%15 = trunc i64 %14 to i32
%16 = shl i32 %10, %15
%17 = or i32 %8, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f47(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = lshr i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %5, 7
%7 = shl nuw nsw i32 %3, %6
%8 = or i32 %7, %4
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, char *, char *);
void RNDResponseSink_ContentDirectory_GetTransferProgress(
    struct UPnPService *Service, int ErrorCode, void *User,
    char *TransferStatus, char *TransferLength, char *TransferTotal) {
  printf("RND Invoke Response: "
         "ContentDirectory/GetTransferProgress[ErrorCode:%d](%s,%s,%s)\r\n",
         ErrorCode, TransferStatus, TransferLength, TransferTotal);
}


x86 assembly (clang, -O0):
<RNDResponseSink_ContentDirectory_GetTransferProgress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_ContentDirectory_GetTransferProgress>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r9,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [84 x i8] c"RND Invoke Response: ContentDirectory/GetTransferProgress[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @RNDResponseSink_ContentDirectory_GetTransferProgress(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca %struct.UPnPService*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i32, i32* %8
%14 = load i8*, i8** %10
%15 = load i8*, i8** %11
%16 = load i8*, i8** %12
%17 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [84 x i8] c"RND Invoke Response: ContentDirectory/GetTransferProgress[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @RNDResponseSink_ContentDirectory_GetTransferProgress(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int number;
  scanf("%d", &number);
  if (number % 2 == 0) {
    printf("Even");
  } else {
    printf("Odd");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1164 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xec5(%rip),%rax
lea    0xec3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"Even\00"
@.str.2 = [4 x i8] c"Odd\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
int io_in8(int);
void IDE_wait(void) {
  for (; (io_in8(0x1f7) & (8 | 128)) != 8;)
    ;
}


x86 assembly (clang, -O0):
<IDE_wait>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <IDE_wait+0x9>
mov    $0x1f7,%edi
call   1030 <io_in8@plt>
and    $0x88,%eax
cmp    $0x8,%eax
je     1136 <IDE_wait+0x26>
jmp    1119 <IDE_wait+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IDE_wait>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1f7,%edi
call   1030 <io_in8@plt>
and    $0x88,%eax
cmp    $0x8,%eax
jne    1120 <IDE_wait+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @IDE_wait() {
br label %1
1: ; preds = %5, %0
%2 = call i32 @io_in8(i32 503)
%3 = and i32 %2, 136
%4 = icmp ne i32 %3, 8
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @IDE_wait() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @io_in8(i32 503)
%3 = and i32 %2, 136
%4 = icmp eq i32 %3, 8
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_int(const unsigned int num) {
  if (num == -1U)
    printf(", -1");
  else
    printf(", %u", num);
}


x86 assembly (clang, -O0):
<print_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1138 <print_int+0x28>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1149 <print_int+0x39>
mov    -0x4(%rbp),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int>:
cmp    $0xffffffff,%edi
je     1125 <print_int+0x15>
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c", -1\00"
@.str.1 = [5 x i8] c", %u\00"
define void @print_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c", -1\00"
@.str.1 = [5 x i8] c", %u\00"
define void @print_int(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int *malloc(int);
int *reallocf(int *, int);
int *reallocfTest1() {
  int *q = malloc(12);
  q = reallocf(q, 20);
  return q;
}


x86 assembly (clang, -O0):
<reallocfTest1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
call   1040 <reallocf@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocfTest1>:
push   %rax
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,%rdi
mov    $0x14,%esi
pop    %rax
jmp    1040 <reallocf@plt>

LLVM IR (-O0):
define i32* @reallocfTest1() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32* @reallocf(i32* %3, i32 20)
store i32* %4, i32** %1
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @reallocfTest1() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32* @reallocf(i32* %1, i32 20)
ret i32* %2
}
void f() {
  float foo;
  int bar;
  float baz;
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca float
%2 = alloca i32
%3 = alloca float
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
int double_array_param(double *pdValarray) {
  pdValarray[0] = 1;
  pdValarray[1] = 2;
  pdValarray[2] = 3;
  return 1;
}


x86 assembly (clang, -O0):
<double_array_param>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xefc(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_array_param>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x4008000000000000,%rax
mov    %rax,0x10(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @double_array_param(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double 1.000000e+00, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 1
store double 2.000000e+00, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
store double 3.000000e+00, double* %8
ret i32 1
}

LLVM IR (-O2):
define i32 @double_array_param(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %2
%3 = getelementptr inbounds double, double* %0, i64 2
store double 3.000000e+00, double* %3
ret i32 1
}
void default_mpgdecoder_free(void *ctx) {}


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

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

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

LLVM IR (-O2):
define void @default_mpgdecoder_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(int *, int *, int *);
int /*<<< orphan*/ solve(int /*<<< orphan*/, int *, int *, int *, int *, int);
int main(int argc, char **argv) {
  int rowTaken[8];
  int diagonal1[8 * 2 - 1];
  int diagonal2[8 * 2 - 1];
  int solution[8];
  init(rowTaken, diagonal1, diagonal2);
  solve(0, rowTaken, diagonal1, diagonal2, solution, 8);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
call   1040 <init@plt>
lea    -0x30(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
lea    -0xd0(%rbp),%r8
xor    %edi,%edi
mov    $0x8,%r9d
call   1030 <solve@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xc0,%rsp
lea    0x20(%rsp),%rbx
lea    0x80(%rsp),%r14
lea    0x40(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <init@plt>
mov    %rsp,%r8
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x8,%r9d
call   1030 <solve@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [8 x i32]
%6 = alloca [15 x i32]
%7 = alloca [15 x i32]
%8 = alloca [8 x i32]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%10 = getelementptr inbounds [15 x i32], [15 x i32]* %6, i64 0, i64 0
%11 = getelementptr inbounds [15 x i32], [15 x i32]* %7, i64 0, i64 0
%12 = call i32 @init(i32* %9, i32* %10, i32* %11)
%13 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%14 = getelementptr inbounds [15 x i32], [15 x i32]* %6, i64 0, i64 0
%15 = getelementptr inbounds [15 x i32], [15 x i32]* %7, i64 0, i64 0
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%17 = call i32 @solve(i32 0, i32* %13, i32* %14, i32* %15, i32* %16, i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x i32]
%4 = alloca [15 x i32]
%5 = alloca [15 x i32]
%6 = alloca [8 x i32]
%7 = bitcast [8 x i32]* %3 to i8*
%8 = bitcast [15 x i32]* %4 to i8*
%9 = bitcast [15 x i32]* %5 to i8*
%10 = bitcast [8 x i32]* %6 to i8*
%11 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%12 = getelementptr inbounds [15 x i32], [15 x i32]* %4, i64 0, i64 0
%13 = getelementptr inbounds [15 x i32], [15 x i32]* %5, i64 0, i64 0
%14 = call i32 @init(i32* %11, i32* %12, i32* %13)
%15 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%16 = call i32 @solve(i32 0, i32* %11, i32* %12, i32* %13, i32* %15, i32 8)
ret i32 0
}
unsigned xrop3_32_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 = ~S;
  stk2 = T & stk3;
  stk1 = D & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_32_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    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%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_32_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_32_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* %6
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = and 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 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_32_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *_DtCmGetPrefix(char *, char);
extern char *_DtCmsTarget2Name(char *target) {
  return (_DtCmGetPrefix(target, '@'));
}


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

x86 assembly (clang, -O2):
<_DtCmsTarget2Name>:
mov    $0x40,%esi
jmp    1030 <_DtCmGetPrefix@plt>

LLVM IR (-O0):
define i8* @_DtCmsTarget2Name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @_DtCmGetPrefix(i8* %3, i8 signext 64)
ret i8* %4
}

LLVM IR (-O2):
define i8* @_DtCmsTarget2Name(i8* %0) {
%2 = tail call i8* @_DtCmGetPrefix(i8* %0, i8 signext 64)
ret i8* %2
}
int rhs(int n) {
  int prod = n * (n + 1);
  prod = prod / 2;
  return prod;
}


x86 assembly (clang, -O0):
<rhs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhs>:
lea    0x1(%rdi),%ecx
imul   %edi,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @rhs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %4, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sdiv i32 %8, 2
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @rhs(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
void gtk_curve_set_vector() {}


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

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

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

LLVM IR (-O2):
define void @gtk_curve_set_vector() {
ret void
}
void window_clear_scenery_emptysub() {}


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

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

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

LLVM IR (-O2):
define void @window_clear_scenery_emptysub() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ok(char *);
void bye() { ok("See you later"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"See you later\00"
define void @bye() {
%1 = call i32 @ok(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"See you later\00"
define void @bye() {
%1 = tail call i32 @ok(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct brw_compile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ brw_wm_projective_st(struct brw_compile *, int, int, int);
int brw_wm_sample__alpha(struct brw_compile *, int, int, int, int);
int brw_wm_projective__alpha(struct brw_compile *p, int dw, int channel,
                             int msg, int result) {
  brw_wm_projective_st(p, dw, channel, msg);
  return brw_wm_sample__alpha(p, dw, channel, msg, result);
}


x86 assembly (clang, -O0):
<brw_wm_projective__alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <brw_wm_projective_st@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1040 <brw_wm_sample__alpha@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brw_wm_projective__alpha>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <brw_wm_projective_st@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <brw_wm_sample__alpha@plt>

LLVM IR (-O0):
%struct.brw_compile = type { i32 }
define i32 @brw_wm_projective__alpha(%struct.brw_compile* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.brw_compile*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.brw_compile* %0, %struct.brw_compile** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.brw_compile*, %struct.brw_compile** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @brw_wm_projective_st(%struct.brw_compile* %11, i32 %12, i32 %13, i32 %14)
%16 = load %struct.brw_compile*, %struct.brw_compile** %6
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = call i32 @brw_wm_sample__alpha(%struct.brw_compile* %16, i32 %17, i32 %18, i32 %19, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
%struct.brw_compile = type { i32 }
define i32 @brw_wm_projective__alpha(%struct.brw_compile* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @brw_wm_projective_st(%struct.brw_compile* %0, i32 %1, i32 %2, i32 %3)
%7 = tail call i32 @brw_wm_sample__alpha(%struct.brw_compile* %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 %7
}
/* Variables and functions */
void v_htole(void *, int);
void v32_htole(void *p) { return v_htole(p, 4); }


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

x86 assembly (clang, -O2):
<v32_htole>:
mov    $0x4,%esi
jmp    1030 <v_htole@plt>

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

LLVM IR (-O2):
define void @v32_htole(i8* %0) {
tail call void @v_htole(i8* %0, i32 4)
ret void
}
int hasProgramPulse(int portnum) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hasProgramPulse(i32 %0) {
ret i32 0
}
float min(float v1, float v2) { return (v1 > v2) ? v2 : v1; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <min+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <min+0x36>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %1, float %0
ret float %4
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
wchar_t *strcpy_char_to_wchar(wchar_t *dst, const char *src) {
  wchar_t *ret = dst;
  while (*src)
    *dst++ = *src++;
  *dst = 0;
  return ret;
}


x86 assembly (clang, -O0):
<strcpy_char_to_wchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <strcpy_char_to_wchar+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbq (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x8(%rbp)
mov    %rcx,(%rax)
jmp    1114 <strcpy_char_to_wchar+0x14>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_char_to_wchar>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1136 <strcpy_char_to_wchar+0x36>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbq %cl,%rcx
mov    %rcx,(%rdx)
add    $0x8,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy_char_to_wchar+0x20>
movq   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i64* @strcpy_char_to_wchar(i64* returned writeonly %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 i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i64* [ %11, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %6 to i64
%11 = getelementptr inbounds i64, i64* %7, i64 1
store i64 %10, i64* %7
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i64* [ %0, %2 ], [ %11, %5 ]
store i64 0, i64* %15
ret i64* %0
}
int rb_fast_mark_table_contains_filename(const char *filename) {
  return filename[-1];
}


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

x86 assembly (clang, -O2):
<rb_fast_mark_table_contains_filename>:
movsbl -0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rb_fast_mark_table_contains_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 -1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @rb_fast_mark_table_contains_filename(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ e_and();
int /*<<< orphan*/ e_zpx();
void e_and_zpx() {
  e_zpx();
  e_and();
}


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

x86 assembly (clang, -O2):
<e_and_zpx>:
push   %rax
xor    %eax,%eax
call   1040 <e_zpx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_and@plt>

LLVM IR (-O0):
define void @e_and_zpx() {
%1 = call i32 (...) @e_zpx()
%2 = call i32 (...) @e_and()
ret void
}

LLVM IR (-O2):
define void @e_and_zpx() {
%1 = tail call i32 (...) @e_zpx()
%2 = tail call i32 (...) @e_and()
ret void
}