xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ iconv_t;

/* Variables and functions */
int /*<<< orphan*/ free(void *);
int iconv_close(iconv_t cd) {
  if (!((size_t)cd & 1))
    free((void *)cd);
  return 0;
}


x86 assembly (clang, -O0):
<iconv_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1137 <iconv_close+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iconv_close>:
test   $0x1,%dil
jne    1120 <iconv_close+0x10>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @iconv_close(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = inttoptr i64 %0 to i8*
%6 = tail call i32 @free(i8* %5)
br label %7
7: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
extern void _exit(int status) {
  printf("Exiting with status %d.\n", status);
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
jmp    112a <_exit+0x1a>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
nop
jmp    1120 <_exit+0x10>

LLVM IR (-O0):
@.str = [25 x i8] c"Exiting with status %d.\0A\00"
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %5
5: ; preds = %5, %1
br label %5
}

LLVM IR (-O2):
@.str = [25 x i8] c"Exiting with status %d.\0A\00"
define void @_exit(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
3: ; preds = %3, %1
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void about(void) {
  fprintf(stderr,
          "\nIn order to run DataparkSearch's test suit please set "
          "\nDPS_TEST_DBADDR environment variable with a semicolon \nseparated "
          "list of DBAddr you'd like to run tests with. \n\nYou can do it by "
          "adding a line into your ~.bashrc using this example:\n\nexport "
          "DPS_TEST_DBADDR=\"mysql://localhost/test/;pgsql://root@/root/"
          "\"\n\nNote, tests will destroy all existing data in the given "
          "databases,\nplease use temporary databases for tests purposes.\n\n");
}


x86 assembly (clang, -O0):
<about>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [429 x i8] c"\0AIn order to run DataparkSearch's test suit please set \0ADPS_TEST_DBADDR environment variable with a semicolon \0Aseparated list of DBAddr you'd like to run tests with. \0A\0AYou can do it by adding a line into your ~.bashrc using this example:\0A\0Aexport DPS_TEST_DBADDR=\22mysql://localhost/test/;pgsql://root@/root/\22\0A\0ANote, tests will destroy all existing data in the given databases,\0Aplease use temporary databases for tests purposes.\0A\0A\00"
define void @about() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([429 x i8], [429 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [429 x i8] c"\0AIn order to run DataparkSearch's test suit please set \0ADPS_TEST_DBADDR environment variable with a semicolon \0Aseparated list of DBAddr you'd like to run tests with. \0A\0AYou can do it by adding a line into your ~.bashrc using this example:\0A\0Aexport DPS_TEST_DBADDR=\22mysql://localhost/test/;pgsql://root@/root/\22\0A\0ANote, tests will destroy all existing data in the given databases,\0Aplease use temporary databases for tests purposes.\0A\0A\00"
define void @about() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([429 x i8], [429 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x1d() {
  Assert_real((isprint(29) == 0),
              "/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/ctype/test_isprint.c",
              150, ("isprint should be 0 for 0x1d"));
}


x86 assembly (clang, -O0):
<t_isprint_0x1d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x96,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x1d>:
push   %rax
mov    $0x1d,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x96,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1d\00"
define void @t_isprint_0x1d() {
%1 = call i64 @isprint(i32 29)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1d\00"
define void @t_isprint_0x1d() {
%1 = tail call i64 @isprint(i32 29)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) { printf("usage: %s [-c] INPUTFILE\n", prog); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"usage: %s [-c] INPUTFILE\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"usage: %s [-c] INPUTFILE\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void MyErr2(const char *err_string, int line) {
  fprintf(stderr, "error : line : %d ", line);
  perror(err_string);
}


x86 assembly (clang, -O0):
<MyErr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyErr2>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <perror@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"error : line : %d \00"
define void @MyErr2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @perror(i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"error : line : %d \00"
define void @MyErr2(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%5 = tail call i32 @perror(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int n;
  scanf("%d", &n);
  if (n > 0)
    printf("positive\n");
  else if (n < 0)
    printf("negative\n");
  else
    printf("zero\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1153 <main+0x33>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x5f>
cmpl   $0x0,-0x4(%rbp)
jge    116e <main+0x4e>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x5a>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x5f>
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>
cmpl   $0x0,0x4(%rsp)
lea    0xeca(%rip),%rax
lea    0xebe(%rip),%rcx
cmovs  %rax,%rcx
lea    0xec1(%rip),%rdi
cmovle %rcx,%rdi
call   1030 <puts@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [5 x i8] c"zero\00"
@str.4 = [9 x i8] c"negative\00"
@str.5 = [9 x i8] c"positive\00"
define void @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 = icmp sgt i32 %4, 0
%6 = icmp slt i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0)
%8 = select i1 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0), i8* %7
%9 = call i32 @puts(i8* dereferenceable(1) %8)
ret void
}
int test_imm_63int8_mem(signed char *val) {
  return ((*val) & (0x63 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_63int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 99
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ADC0Seq2_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<ADC0Seq2_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <ADC0Seq2_Handler+0x9>
jmp    1109 <ADC0Seq2_Handler+0x9>

x86 assembly (clang, -O2):
<ADC0Seq2_Handler>:
jmp    1100 <ADC0Seq2_Handler>

LLVM IR (-O0):
define void @ADC0Seq2_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @ADC0Seq2_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void foo_2_1_2_1_2_2_2_1_1() {}


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

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

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

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

/* Variables and functions */
uint64_t __ashrdi3(uint64_t v, int cnt) {
  int c = cnt & 31;
  uint32_t vl = (uint32_t)v;
  uint32_t vh = (uint32_t)(v >> 32);
  if (cnt & 32) {
    vl = ((int32_t)vh >> c);
    vh = (int32_t)vh >> 31;
  } else {
    vl = (vl >> c) + (vh << (32 - c));
    vh = ((int32_t)vh >> c);
  }
  return ((uint64_t)vh << 32) + vl;
}


x86 assembly (clang, -O0):
<__ashrdi3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     114e <__ashrdi3+0x4e>
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x14(%rbp)
jmp    1175 <__ashrdi3+0x75>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    -0x14(%rbp),%edx
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__ashrdi3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = and i32 %8, 31
store i32 %9, i32* %5
%10 = load i32, i32* %3
store i32 %10, i32* %6
%11 = load i32, i32* %3
%12 = ashr i32 %11, 32
store i32 %12, i32* %7
%13 = load i32, i32* %4
%14 = and i32 %13, 32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %2
%17 = load i32, i32* %7
%18 = load i32, i32* %5
%19 = ashr i32 %17, %18
store i32 %19, i32* %6
%20 = load i32, i32* %7
%21 = ashr i32 %20, 31
store i32 %21, i32* %7
br label %34
22: ; preds = %2
%23 = load i32, i32* %6
%24 = load i32, i32* %5
%25 = ashr i32 %23, %24
%26 = load i32, i32* %7
%27 = load i32, i32* %5
%28 = sub nsw i32 32, %27
%29 = shl i32 %26, %28
%30 = add nsw i32 %25, %29
store i32 %30, i32* %6
%31 = load i32, i32* %7
%32 = load i32, i32* %5
%33 = ashr i32 %31, %32
store i32 %33, i32* %7
br label %34
34: ; preds = %22, %16
%35 = load i32, i32* %7
%36 = shl i32 %35, 32
%37 = load i32, i32* %6
%38 = add nsw i32 %36, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @__ashrdi3(i32 %0, i32 %1) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double weight;
  printf("Weight: ");
  scanf("%lf", &weight);
  double weightOnMoon = (17.0 / 100) * weight;
  printf("Weight on Moon: %.3lf\n", weightOnMoon);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mulsd  0xeb5(%rip),%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Weight: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [23 x i8] c"Weight on Moon: %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fmul double 1.700000e-01, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Weight: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [23 x i8] c"Weight on Moon: %.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 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), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 1.700000e-01
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int dwarf_get_ATCF_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_ATCF_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_ATCF_name(val_in, &v);
  return ellipname(res, val_in, v, "ATCF", printonerr);
}


x86 assembly (clang, -O0):
<get_ATCF_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_ATCF_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ATCF_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_ATCF_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ATCF\00"
define i8* @get_ATCF_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_ATCF_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"ATCF\00"
define i8* @get_ATCF_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_ATCF_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Variables and functions */
int system(char *);
int do_man(void) {
  return system("help2man -N -S imscript -n \"evaluate an expression "
                "with images as variables\" plambda"
                "|man -l -");
}


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

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

LLVM IR (-O0):
@.str = [94 x i8] c"help2man -N -S imscript -n \22evaluate an expression with images as variables\22 plambda|man -l -\00"
define i32 @do_man() {
%1 = call i32 @system(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [94 x i8] c"help2man -N -S imscript -n \22evaluate an expression with images as variables\22 plambda|man -l -\00"
define i32 @do_man() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void YUY2ToARGBRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToARGBRow_SSSE3() {
ret void
}
/* Variables and functions */
int random();
unsigned short generate_ticks(void) {
  unsigned short ticks;
  ticks = 750 + random() % 750;
  return ticks;
}


x86 assembly (clang, -O0):
<generate_ticks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    $0x2ee,%ecx
cltd
idiv   %ecx
add    $0x2ee,%edx
mov    %dx,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_ticks>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
cltq
imul   $0x57619f1,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x2ee,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x2ee,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @generate_ticks() {
%1 = alloca i16
%2 = call i32 (...) @random()
%3 = srem i32 %2, 750
%4 = add nsw i32 750, %3
%5 = trunc i32 %4 to i16
store i16 %5, i16* %1
%6 = load i16, i16* %1
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @generate_ticks() {
%1 = tail call i32 (...) @random()
%2 = srem i32 %1, 750
%3 = trunc i32 %2 to i16
%4 = add nsw i16 %3, 750
ret i16 %4
}
void disj() {
  int x, y;
  x = 0;
  y = 50;
  while (x < 100) {
    if (x < 50) {
      x = x + 1;
    } else {
      x = x + 1;
      y = y + 1;
    }
  }
}


x86 assembly (clang, -O0):
<disj>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    114b <disj+0x4b>
cmpl   $0x32,-0x4(%rbp)
jge    1134 <disj+0x34>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <disj+0x46>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <disj+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @disj() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rlca();
void opcode_07() { rlca(); }


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

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

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

LLVM IR (-O2):
define void @opcode_07() {
%1 = tail call i32 (...) @rlca()
ret void
}
void ScaleRowDown38_2_Box_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown38_2_Box_SSSE3() {
ret void
}
/* Variables and functions */
void port_word_out(unsigned short port, unsigned short data) {
  __asm__("out %%ax, %%dx" : : "a"(data), "d"(port));
}


x86 assembly (clang, -O0):
<port_word_out>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
mov    -0x2(%rbp),%dx
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_word_out>:
mov    %esi,%eax
mov    %edi,%edx
out    %ax,(%dx)
ret

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

LLVM IR (-O2):
define void @port_word_out(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "out %ax, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %1, i16 %0)
ret void
}
int RAND_egd(const char *path) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @RAND_egd(i8* nocapture readnone %0) {
ret i32 -1
}
void cad(int a, int b, int c) {}


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

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

LLVM IR (-O0):
define void @cad(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
ret void
}

LLVM IR (-O2):
define void @cad(i32 %0, i32 %1, i32 %2) {
ret void
}
void myunlock(int *lock) {}


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

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

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

LLVM IR (-O2):
define void @myunlock(i32* nocapture %0) {
ret void
}
int isan(char c) {
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= 0 && c <= 9))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isan>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1124 <isan+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    1158 <isan+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     113e <isan+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1158 <isan+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jl     1164 <isan+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jg     1164 <isan+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <isan+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isan>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
cmp    $0xa,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isan(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp ult i8 %0, 10
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ jack_sysex_close();
int avr_api_close(void) { jack_sysex_close(); }


x86 assembly (clang, -O0):
<avr_api_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <jack_sysex_close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @avr_api_close() {
%1 = alloca i32
%2 = call i32 (...) @jack_sysex_close()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @avr_api_close() {
%1 = tail call i32 (...) @jack_sysex_close()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr, "usage: cat data | %s [-b <2|4|8|...|32>] [-v] <blacklist>\n",
          prog);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"usage: cat data | %s [-b <2|4|8|...|32>] [-v] <blacklist>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"usage: cat data | %s [-b <2|4|8|...|32>] [-v] <blacklist>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
int foo(int n) {
  int i = 0;
  if (n > 0)
    do {
      i++;
    } while (i < n);
  else
    i = 42;
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1137 <foo+0x37>
jmp    111d <foo+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     111d <foo+0x1d>
jmp    113e <foo+0x3e>
movl   $0x2a,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %edi,%edi
mov    $0x2a,%eax
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
br label %7
7: ; preds = %10, %6
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %7, label %14
14: ; preds = %10
br label %16
15: ; preds = %1
store i32 42, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 42
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mpack_store_double(char *, double);
int /*<<< orphan*/ mpack_store_u8(char *, int);
void mpack_encode_double(char *p, double value) {
  mpack_store_u8(p, 0xcb);
  mpack_store_double(p + 1, value);
}


x86 assembly (clang, -O0):
<mpack_encode_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xcb,%esi
call   1030 <mpack_store_u8@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <mpack_store_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpack_encode_double>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
mov    $0xcb,%esi
call   1030 <mpack_store_u8@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <mpack_store_double@plt>

LLVM IR (-O0):
define void @mpack_encode_double(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = call i32 @mpack_store_u8(i8* %5, i32 203)
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load double, double* %4
%10 = call i32 @mpack_store_double(i8* %8, double %9)
ret void
}

LLVM IR (-O2):
define void @mpack_encode_double(i8* %0, double %1) {
%3 = tail call i32 @mpack_store_u8(i8* %0, i32 203)
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = tail call i32 @mpack_store_double(i8* %4, double %1)
ret void
}
void null_distortion_destroy(void *dist) {}


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

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

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

LLVM IR (-O2):
define void @null_distortion_destroy(i8* nocapture %0) {
ret void
}
/* Variables and functions */
long evaleq();
scalar_t__ test(char *);
long evalfieldcond() {
  long val;
  for (val = evaleq(); test("&&");) {
    if (!evaleq() != 0)
      val = 0;
  }
  return (val);
}


x86 assembly (clang, -O0):
<evalfieldcond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <evaleq@plt>
mov    %rax,-0x8(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <test@plt>
cmp    $0x0,%rax
je     1174 <evalfieldcond+0x54>
mov    $0x0,%al
call   1030 <evaleq@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     116f <evalfieldcond+0x4f>
movq   $0x0,-0x8(%rbp)
jmp    1133 <evalfieldcond+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evalfieldcond>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <evaleq@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
call   1040 <test@plt>
test   %rax,%rax
je     116b <evalfieldcond+0x4b>
lea    0xeba(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <evaleq@plt>
test   %rax,%rax
cmove  %rax,%rbx
mov    %r14,%rdi
call   1040 <test@plt>
test   %rax,%rax
jne    1150 <evalfieldcond+0x30>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"&&\00"
define i64 @evalfieldcond() {
%1 = alloca i64
%2 = call i64 (...) @evaleq()
store i64 %2, i64* %1
br label %3
3: ; preds = %13, %0
%4 = call i64 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = call i64 (...) @evaleq()
%8 = icmp ne i64 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %6
store i64 0, i64* %1
br label %13
13: ; preds = %12, %6
br label %3
14: ; preds = %3
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"&&\00"
define i64 @evalfieldcond() {
%1 = tail call i64 (...) @evaleq()
%2 = tail call i64 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i64 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i64 (...) @evaleq()
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i64 0, i64 %5
%9 = tail call i64 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %0
%12 = phi i64 [ %1, %0 ], [ %8, %4 ]
ret i64 %12
}
void _STD_LOCK() { return; }


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

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

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

LLVM IR (-O2):
define void @_STD_LOCK() {
ret void
}
int rangeIntersection(int start1, int end1, int start2, int end2) {
  int s = ((start1) > (start2) ? (start1) : (start2));
  int e = ((end1) < (end2) ? (end1) : (end2));
  return e - s;
}


x86 assembly (clang, -O0):
<rangeIntersection>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1127 <rangeIntersection+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    112d <rangeIntersection+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    114a <rangeIntersection+0x4a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1150 <rangeIntersection+0x50>
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rangeIntersection>:
mov    %ecx,%eax
cmp    %edx,%edi
cmovg  %edi,%edx
cmp    %ecx,%esi
cmovl  %esi,%eax
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @rangeIntersection(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = load i32, i32* %5
br label %18
16: ; preds = %4
%17 = load i32, i32* %7
br label %18
18: ; preds = %16, %14
%19 = phi i32 [ %15, %14 ], [ %17, %16 ]
store i32 %19, i32* %9
%20 = load i32, i32* %6
%21 = load i32, i32* %8
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = load i32, i32* %6
br label %27
25: ; preds = %18
%26 = load i32, i32* %8
br label %27
27: ; preds = %25, %23
%28 = phi i32 [ %24, %23 ], [ %26, %25 ]
store i32 %28, i32* %10
%29 = load i32, i32* %10
%30 = load i32, i32* %9
%31 = sub nsw i32 %29, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @rangeIntersection(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %0, i32 %2
%7 = icmp slt i32 %1, %3
%8 = select i1 %7, i32 %1, i32 %3
%9 = sub nsw i32 %8, %6
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ IFF_PROMISC;
int set_if_flag(char *, int /*<<< orphan*/, int);
int if_promisc(char *ifname) { return set_if_flag(ifname, IFF_PROMISC, 1); }


x86 assembly (clang, -O0):
<if_promisc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <set_if_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<if_promisc>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
jmp    1030 <set_if_flag@plt>

LLVM IR (-O0):
@IFF_PROMISC = global i32 0
define i32 @if_promisc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @IFF_PROMISC
%5 = call i32 @set_if_flag(i8* %3, i32 %4, i32 1)
ret i32 %5
}

LLVM IR (-O2):
@IFF_PROMISC = global i32 0
define i32 @if_promisc(i8* %0) {
%2 = load i32, i32* @IFF_PROMISC
%3 = tail call i32 @set_if_flag(i8* %0, i32 %2, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char str[128];
  scanf("%[^\n]", str);
  printf("This is the string:%s.\n", str);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x80(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x80(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%[^\0A]\00"
@.str.1 = [24 x i8] c"This is the string:%s.\0A\00"
define void @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%[^\0A]\00"
@.str.1 = [24 x i8] c"This is the string:%s.\0A\00"
define void @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getchar()
ret void
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  while (scanf("%d %d", &a, &b) != EOF) {
    printf("%d\n", a + b);
  }
  return 0;
}


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
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     116a <main+0x4a>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2e9e(%rip),%r13
cmp    0x0(%r13),%rax
je     1194 <main+0x74>
lea    0xeaf(%rip),%r14
lea    0xea2(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %16, label %8
8: ; preds = %0, %8
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %8
16: ; preds = %8, %0
ret i32 0
}
int gca_cmp_char(const void *aa, const void *bb) {
  const char a = *(const char *)aa;
  const char b = *(const char *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movsbl -0x11(%rbp),%eax
movsbl -0x12(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
movsbl -0x12(%rbp),%ecx
movsbl -0x11(%rbp),%edx
cmp    %edx,%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp_char>:
mov    (%rdi),%cl
mov    (%rsi),%dl
xor    %eax,%eax
xor    %esi,%esi
cmp    %dl,%cl
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
store i8 %10, i8* %6
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
%13 = load i8, i8* %6
%14 = sext i8 %13 to i32
%15 = icmp sgt i32 %12, %14
%16 = zext i1 %15 to i32
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = icmp sgt i32 %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @gca_cmp_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp sgt i8 %3, %4
%6 = zext i1 %5 to i32
%7 = icmp sgt i8 %4, %3
%8 = sext i1 %7 to i32
%9 = add nsw i32 %8, %6
ret i32 %9
}