xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xd7() {
  Assert_real((ispunct(215) == 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_ispunct.c",
              1080, ("ispunct should be 0 for 0xd7"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x438,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd7\00"
define void @t_ispunct_0xd7() {
%1 = call i64 @ispunct(i32 215)
%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 1080, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd7\00"
define void @t_ispunct_0xd7() {
%1 = tail call i64 @ispunct(i32 215)
%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 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_98uint32_reg(unsigned int val) {
  return ((val) & (0x98 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_98uint32_reg(i32 %0) {
%2 = and i32 %0, 152
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int s_get_row_index(char);
char s_get_col_index(char i) { return (i - (s_get_row_index(i) * 9)); }


x86 assembly (clang, -O0):
<s_get_col_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <s_get_row_index@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   $0x9,%ecx,%ecx
sub    %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_get_col_index>:
push   %rbx
mov    %edi,%ebx
call   1030 <s_get_row_index@plt>
lea    (%rax,%rax,8),%eax
neg    %eax
add    %bl,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @s_get_col_index(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = call i32 @s_get_row_index(i8 signext %5)
%7 = mul nsw i32 %6, 9
%8 = sub nsw i32 %4, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @s_get_col_index(i8 signext %0) {
%2 = tail call i32 @s_get_row_index(i8 signext %0)
%3 = trunc i32 %2 to i8
%4 = mul i8 %3, -9
%5 = add i8 %4, %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int timer_sleep(double seconds) {
  if (seconds < 0.0)
    return 1;
  usleep((int)(seconds * 1e6));
  return 0;
}


x86 assembly (clang, -O0):
<timer_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1137 <timer_sleep+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1154 <timer_sleep+0x44>
movsd  0xec1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <usleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_sleep>:
mov    $0x1,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1137 <timer_sleep+0x27>
push   %rax
mulsd  0xed8(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <usleep@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @timer_sleep(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fmul double %8, 1.000000e+06
%10 = fptosi double %9 to i32
%11 = call i32 @usleep(i32 %10)
store i32 0, i32* %2
br label %12
12: ; preds = %7, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @timer_sleep(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = fmul double %0, 1.000000e+06
%5 = fptosi double %4 to i32
%6 = tail call i32 @usleep(i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
scalar_t__ isatty(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void startbinpos_() {
  if (isatty(1)) {
    fprintf(stderr, "please redirect output to file or pipe\n");
  }
  fwrite("fxyz", 4, 1, stdout);
}


x86 assembly (clang, -O0):
<startbinpos_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <isatty@plt>
cmp    $0x0,%rax
je     115d <startbinpos_+0x2d>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%ecx
lea    0xebb(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<startbinpos_>:
push   %rax
mov    $0x1,%edi
call   1030 <isatty@plt>
test   %rax,%rax
je     1155 <startbinpos_+0x25>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%ecx
lea    0xec3(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
pop    %rax
jmp    1050 <fwrite@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"please redirect output to file or pipe\0A\00"
@.str.1 = [5 x i8] c"fxyz\00"
@stdout = global i32 0
define void @startbinpos_() {
%1 = call i64 @isatty(i32 1)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
%7 = load i32, i32* @stdout
%8 = call i32 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 1, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"please redirect output to file or pipe\0A\00"
@.str.1 = [5 x i8] c"fxyz\00"
@stdout = global i32 0
define void @startbinpos_() {
%1 = tail call i64 @isatty(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
%7 = load i32, i32* @stdout
%8 = tail call i32 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 1, i32 %7)
ret void
}
void drawpixels(void *s, short a) { *((short *)(s)) = a; }


x86 assembly (clang, -O0):
<drawpixels>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawpixels>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @drawpixels(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i16*
store i16 %5, i16* %7
ret void
}

LLVM IR (-O2):
define void @drawpixels(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_i2c_grove_color(void) {
  int ret = 0;
  int addr;
  unsigned char buf[10];
  char data[8] = {
      0,
  };
  int green;
  int red;
  int blue;
  int i;
  int total;
  int fd;
  int bus;
  unsigned char val;
  double X, Y, Z, x, y;
  printf("***** Start Test I2C Color *****\n");
}


x86 assembly (clang, -O0):
<test_i2c_grove_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [33 x i8] c"***** Start Test I2C Color *****\00"
define void @test_i2c_grove_color() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *bprintf(char *, float);
int pscanf(char *, char *, long *);
const char *ram_free(void) {
  long free;
  return (pscanf("/proc/meminfo", "MemFree: %ld kB\n", &free) == 1)
             ? bprintf("%f", (float)free / 1024 / 1024)
             : NULL;
}


x86 assembly (clang, -O0):
<ram_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
lea    0xedc(%rip),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    117b <ram_free+0x5b>
cvtsi2ssq -0x8(%rbp),%xmm0
movss  0xeaa(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe9e(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xeb6(%rip),%rdi
call   1030 <bprintf@plt>
mov    %rax,-0x10(%rbp)
jmp    1186 <ram_free+0x66>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1186 <ram_free+0x66>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ram_free>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    %rsp,%rdx
call   1040 <pscanf@plt>
cmp    $0x1,%eax
jne    1160 <ram_free+0x40>
cvtsi2ssq (%rsp),%xmm0
movss  0xeb6(%rip),%xmm1
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
lea    0xeca(%rip),%rdi
call   1030 <bprintf@plt>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/meminfo\00"
@.str.1 = [17 x i8] c"MemFree: %ld kB\0A\00"
@.str.2 = [3 x i8] c"%f\00"
define i8* @ram_free() {
%1 = alloca i64
%2 = call i32 @pscanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = load i64, i64* %1
%6 = sitofp i64 %5 to float
%7 = fdiv float %6, 1.024000e+03
%8 = fdiv float %7, 1.024000e+03
%9 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float %8)
br label %11
10: ; preds = %0
br label %11
11: ; preds = %10, %4
%12 = phi i8* [ %9, %4 ], [ null, %10 ]
ret i8* %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/meminfo\00"
@.str.1 = [17 x i8] c"MemFree: %ld kB\0A\00"
@.str.2 = [3 x i8] c"%f\00"
define i8* @ram_free() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @pscanf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load i64, i64* %1
%7 = sitofp i64 %6 to float
%8 = fmul float %7, 0x3F50000000000000
%9 = fmul float %8, 0x3F50000000000000
%10 = call i8* @bprintf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float %9)
br label %11
11: ; preds = %0, %5
%12 = phi i8* [ %10, %5 ], [ null, %0 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void error(char *msg) {
  printf("Error: %s\n", msg);
  exit(EXIT_FAILURE);
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ struct_by_value_18a_x();
int main() {
  struct_by_value_18a_x();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <struct_by_value_18a_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <struct_by_value_18a_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @struct_by_value_18a_x()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @struct_by_value_18a_x()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ breakpt();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ spawn_thread();
int main() {
  alarm(10);
  spawn_thread();
  while (1) {
    sleep(1);
    breakpt();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1040 <alarm@plt>
mov    $0x0,%al
call   1050 <spawn_thread@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1030 <breakpt@plt>
jmp    1160 <main+0x20>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <alarm@plt>
xor    %eax,%eax
call   1050 <spawn_thread@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1030 <breakpt@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @alarm(i32 10)
%3 = call i32 (...) @spawn_thread()
br label %4
4: ; preds = %0, %4
%5 = call i32 @sleep(i32 1)
%6 = call i32 (...) @breakpt()
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @alarm(i32 10)
%2 = tail call i32 (...) @spawn_thread()
br label %3
3: ; preds = %0, %3
%4 = tail call i32 @sleep(i32 1)
%5 = tail call i32 (...) @breakpt()
br label %3
}
/* Variables and functions */
float sqrt(float);
float hypotf(float x, float y) { return sqrt(x * x + y * y); }


x86 assembly (clang, -O0):
<hypotf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypotf>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1129 <hypotf+0x19>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @hypotf(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* %3
%7 = load float, float* %4
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @llvm.fmuladd.f32(float %5, float %6, float %9)
%11 = call float @sqrt(float %10)
ret float %11
}

LLVM IR (-O2):
define float @hypotf(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = tail call float @sqrt(float %4)
ret float %5
}
void RTDbgModSymbolByOrdinal(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModSymbolByOrdinal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ stderr;
void opt_err_alloc(size_t n) {
  fprintf(stderr, "optparse: failed to allocate %zu bytes, aborting.\n", n);
  abort();
}


x86 assembly (clang, -O0):
<opt_err_alloc>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<opt_err_alloc>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"optparse: failed to allocate %zu bytes, aborting.\0A\00"
define void @opt_err_alloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stderr
%4 = load i64, i64* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"optparse: failed to allocate %zu bytes, aborting.\0A\00"
define void @opt_err_alloc(i64 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i64 %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void circuitdesignmarkovalgorithm(void) {
  printf("circuitdesignmarkovalgorithm\n");
}


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

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

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

LLVM IR (-O2):
@str = [29 x i8] c"circuitdesignmarkovalgorithm\00"
define void @circuitdesignmarkovalgorithm() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((no)) int divby2(int i) { return (i & 1) == 0; }


x86 assembly (clang, -O0):
<divby2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divby2>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @divby2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @divby2(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int default_char;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_default_char(void *_p, unsigned _v) {
  ((XFontStruct *)_p)->default_char = (unsigned)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XFontStruct_default_char(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void write(char *tape, unsigned long index, unsigned long count) {
  for (unsigned long i = 0; i < count; i++) {
    printf("%c", tape[index]);
  }
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1163 <write+0x53>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <write+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1143 <write+0x33>
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xed3(%rip),%r12
nopl   (%rax)
movsbl (%r15,%r14,1),%esi
mov    %r12,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <write+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @write(i8* nocapture %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %0, i64 %1
br label %8
7: ; preds = %8, %3
ret void
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %12, %8 ]
%10 = load i8, i8* %6
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = add nuw i64 %9, 1
%13 = icmp eq i64 %12, %2
br i1 %13, label %7, label %8
}
/* Variables and functions */
int /*<<< orphan*/ dump_clocks();
int /*<<< orphan*/ finalize_msr();
int /*<<< orphan*/ init_msr();
int main() {
  init_msr();
  dump_clocks();
  finalize_msr();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init_msr()
%2 = tail call i32 (...) @dump_clocks()
%3 = tail call i32 (...) @finalize_msr()
ret i32 0
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ sprintf(char *, char *, int);
char *get_audit_datafile_filename(void) {
  static char audit_datafile_filename[128];
  sprintf(audit_datafile_filename, "/tmp/csvdump_fork_audit_datafile_%d",
          getpid());
  return audit_datafile_filename;
}


x86 assembly (clang, -O0):
<get_audit_datafile_filename>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edx
lea    0x2f0c(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ef9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_audit_datafile_filename>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_audit_datafile_filename.audit_datafile_filename = internal global [128 x i8] zeroinitializer
@.str = [36 x i8] c"/tmp/csvdump_fork_audit_datafile_%d\00"
define i8* @get_audit_datafile_filename() {
%1 = call i32 (...) @getpid()
%2 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_audit_datafile_filename.audit_datafile_filename, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_audit_datafile_filename.audit_datafile_filename, i64 0, i64 0)
}

LLVM IR (-O2):
@get_audit_datafile_filename.audit_datafile_filename = internal global [128 x i8] zeroinitializer
@.str = [36 x i8] c"/tmp/csvdump_fork_audit_datafile_%d\00"
define i8* @get_audit_datafile_filename() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @get_audit_datafile_filename.audit_datafile_filename, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @get_audit_datafile_filename.audit_datafile_filename, i64 0, i64 0)
}
void unsigned_char_div_signed_char_unsigned_int(unsigned char *LHS,
                                                unsigned int RHS) {
  (*LHS) /= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_div_signed_char_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzbl (%rax),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_div_signed_char_unsigned_int>:
movzbl (%rdi),%eax
xor    %edx,%edx
div    %esi
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_div_signed_char_unsigned_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = udiv i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @unsigned_char_div_signed_char_unsigned_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = udiv i32 %4, %1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccak_absorb(int /*<<< orphan*/ *, int,
                                 unsigned char const *, unsigned int, int);
void shake128_absorb(uint64_t *s, const unsigned char *input,
                     unsigned int inputByteLen) {
  keccak_absorb(s, 168, input, inputByteLen, 0x1F);
}


x86 assembly (clang, -O0):
<shake128_absorb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0xa8,%esi
mov    $0x1f,%r8d
call   1030 <keccak_absorb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shake128_absorb>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0xa8,%esi
mov    $0x1f,%r8d
jmp    1030 <keccak_absorb@plt>

LLVM IR (-O0):
define void @shake128_absorb(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @keccak_absorb(i32* %7, i32 168, i8* %8, i32 %9, i32 31)
ret void
}

LLVM IR (-O2):
define void @shake128_absorb(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @keccak_absorb(i32* %0, i32 168, i8* %1, i32 %2, i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt00(void) {
  SendInterrupt(0x50, 0x7, 0x8000, 0x00010000);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x50,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x10000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x50,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x10000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt00() {
%1 = call i32 @SendInterrupt(i32 80, i32 7, i32 32768, i32 65536)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt00() {
%1 = tail call i32 @SendInterrupt(i32 80, i32 7, i32 32768, i32 65536)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("ps -ef");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"ps -ef\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"ps -ef\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int KAPI_GetAPIVersion_MINOR() { return 1; }


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

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

LLVM IR (-O0):
define i32 @KAPI_GetAPIVersion_MINOR() {
ret i32 1
}

LLVM IR (-O2):
define i32 @KAPI_GetAPIVersion_MINOR() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ _s2_priv_textab(float, float, float, int, int, int, int,
                                   char *);
void s2textyz(float ix, float iy, float iz, char *itext) {
  _s2_priv_textab(ix, iy, iz, 1, 2, 1., 1., itext);
}


x86 assembly (clang, -O0):
<s2textyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
mov    -0x18(%rbp),%r8
mov    $0x1,%ecx
mov    $0x2,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <_s2_priv_textab@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2textyz>:
mov    %rdi,%r8
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <_s2_priv_textab@plt>

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

LLVM IR (-O2):
define void @s2textyz(float %0, float %1, float %2, i8* %3) {
%5 = tail call i32 @_s2_priv_textab(float %0, float %1, float %2, i32 1, i32 2, i32 1, i32 1, i8* %3)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  int *r;
  r = (int *)malloc(4);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int listen(int sockfd, int backlog) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<listen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<listen>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @listen(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @listen(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
int duplicate_func(void) { return -4; }


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

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

LLVM IR (-O0):
define i32 @duplicate_func() {
ret i32 -4
}

LLVM IR (-O2):
define i32 @duplicate_func() {
ret i32 -4
}
/* Type definitions */
typedef scalar_t__ const wchar_t;

/* Variables and functions */
wchar_t *wcschr(const wchar_t *hay, wchar_t ned) {
  wchar_t *found = NULL;
  while (*hay) {
    if (*hay == ned)
      found = (wchar_t *)hay;
    hay++;
  }
  return found;
}


x86 assembly (clang, -O0):
<wcschr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114c <wcschr+0x4c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    113b <wcschr+0x3b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <wcschr+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcschr>:
mov    (%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1124 <wcschr+0x24>
nopw   0x0(%rax,%rax,1)
cmp    %rsi,%rcx
cmove  %rdi,%rax
mov    0x8(%rdi),%rcx
add    $0x8,%rdi
test   %rcx,%rcx
jne    1110 <wcschr+0x10>
ret

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

LLVM IR (-O2):
define i64* @wcschr(i64* %0, i64 %1) {
%3 = load i64, i64* %0
%4 = icmp eq i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ %3, %2 ]
%7 = phi i64* [ %10, %5 ], [ null, %2 ]
%8 = phi i64* [ %11, %5 ], [ %0, %2 ]
%9 = icmp eq i64 %6, %1
%10 = select i1 %9, i64* %8, i64* %7
%11 = getelementptr inbounds i64, i64* %8, i64 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i64* [ null, %2 ], [ %10, %5 ]
ret i64* %15
}
int pointer_eq(void *self, void *obj1, void *obj2) { return obj1 == obj2; }


x86 assembly (clang, -O0):
<pointer_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_eq>:
xor    %eax,%eax
cmp    %rdx,%rsi
sete   %al
ret

LLVM IR (-O0):
define i32 @pointer_eq(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = icmp eq i8* %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @pointer_eq(i8* nocapture readnone %0, i8* readnone %1, i8* readnone %2) {
%4 = icmp eq i8* %1, %2
%5 = zext i1 %4 to i32
ret i32 %5
}
int main() {
  int a = 0;
  int b = 0;
  b = ++a, a;
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
int /*<<< orphan*/ flags_v0();
int /*<<< orphan*/ ret_timing(int);
int /*<<< orphan*/ selftest(int);
int /*<<< orphan*/ usereg();
void i_swap(void) {
  usereg();
  emit("mov ecx,[__dreg+ebx*4]\n");
  emit("rol ecx,16\n");
  emit("mov [__dreg+ebx*4],ecx\n");
  selftest(4);
  flags_v0();
  ret_timing(4);
}


x86 assembly (clang, -O0):
<i_swap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <usereg@plt>
lea    0xe9e(%rip),%rdi
call   1060 <emit@plt>
lea    0xeaa(%rip),%rdi
call   1060 <emit@plt>
lea    0xeaa(%rip),%rdi
call   1060 <emit@plt>
mov    $0x4,%edi
call   1030 <selftest@plt>
mov    $0x0,%al
call   1040 <flags_v0@plt>
mov    $0x4,%edi
call   1070 <ret_timing@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_swap>:
push   %rax
xor    %eax,%eax
call   1050 <usereg@plt>
lea    0xea1(%rip),%rdi
call   1060 <emit@plt>
lea    0xead(%rip),%rdi
call   1060 <emit@plt>
lea    0xead(%rip),%rdi
call   1060 <emit@plt>
mov    $0x4,%edi
call   1030 <selftest@plt>
xor    %eax,%eax
call   1040 <flags_v0@plt>
mov    $0x4,%edi
pop    %rax
jmp    1070 <ret_timing@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"mov ecx,[__dreg+ebx*4]\0A\00"
@.str.1 = [12 x i8] c"rol ecx,16\0A\00"
@.str.2 = [24 x i8] c"mov [__dreg+ebx*4],ecx\0A\00"
define void @i_swap() {
%1 = call i32 (...) @usereg()
%2 = call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @emit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @selftest(i32 4)
%6 = call i32 (...) @flags_v0()
%7 = call i32 @ret_timing(i32 4)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"mov ecx,[__dreg+ebx*4]\0A\00"
@.str.1 = [12 x i8] c"rol ecx,16\0A\00"
@.str.2 = [24 x i8] c"mov [__dreg+ebx*4],ecx\0A\00"
define void @i_swap() {
%1 = tail call i32 (...) @usereg()
%2 = tail call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @emit(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @emit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @selftest(i32 4)
%6 = tail call i32 (...) @flags_v0()
%7 = tail call i32 @ret_timing(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pic_send_EOI_normal(int);
void isr_irq_9() { pic_send_EOI_normal(9); }


x86 assembly (clang, -O0):
<isr_irq_9>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
call   1030 <pic_send_EOI_normal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isr_irq_9>:
mov    $0x9,%edi
jmp    1030 <pic_send_EOI_normal@plt>

LLVM IR (-O0):
define void @isr_irq_9() {
%1 = call i32 @pic_send_EOI_normal(i32 9)
ret void
}

LLVM IR (-O2):
define void @isr_irq_9() {
%1 = tail call i32 @pic_send_EOI_normal(i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ recvInitEntry();
void recvInitTimer(int t) {
  if (t == 7)
    recvInitEntry();
}


x86 assembly (clang, -O0):
<recvInitTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jne    112c <recvInitTimer+0x1c>
mov    $0x0,%al
call   1030 <recvInitEntry@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvInitTimer>:
cmp    $0x7,%edi
jne    111c <recvInitTimer+0xc>
xor    %eax,%eax
jmp    1030 <recvInitEntry@plt>
ret

LLVM IR (-O0):
define void @recvInitTimer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 7
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @recvInitEntry()
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @recvInitTimer(i32 %0) {
%2 = icmp eq i32 %0, 7
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @recvInitEntry()
br label %5
5: ; preds = %3, %1
ret void
}
long int FloatToFixpoint(double floatingdigit) {
  return (long int)(floatingdigit * 8388608);
}


x86 assembly (clang, -O0):
<FloatToFixpoint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FloatToFixpoint>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @FloatToFixpoint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x4160000000000000
%5 = fptosi double %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @FloatToFixpoint(double %0) {
%2 = fmul double %0, 0x4160000000000000
%3 = fptosi double %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ fn5();
int main() {
  fn5();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fn5()
ret i32 0
}
void disable_the_trap() {}


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

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

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

LLVM IR (-O2):
define void @disable_the_trap() {
ret void
}
/* Type definitions */
typedef scalar_t__ *s2;
typedef int bd;

/* Variables and functions */
int fz_screen_byte(int, int);
int fz_hardlight_byte(int bd, int s) {
  int s2 = s << 1;
  if (s <= 127)
    return (((bd) * ((s2) + 1)) >> 8);
  else
    return fz_screen_byte(bd, s2);
}


x86 assembly (clang, -O0):
<fz_hardlight_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7f,-0xc(%rbp)
jg     1148 <fz_hardlight_byte+0x38>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <fz_hardlight_byte+0x46>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <fz_screen_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fz_hardlight_byte>:
lea    (%rsi,%rsi,1),%eax
cmp    $0x7f,%esi
jg     1122 <fz_hardlight_byte+0x12>
or     $0x1,%eax
imul   %edi,%eax
sar    $0x8,%eax
ret
mov    %eax,%esi
jmp    1030 <fz_screen_byte@plt>

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

LLVM IR (-O2):
define i32 @fz_hardlight_byte(i32 %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = icmp slt i32 %1, 128
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = or i32 %3, 1
%7 = mul nsw i32 %6, %0
%8 = ashr i32 %7, 8
br label %11
9: ; preds = %2
%10 = tail call i32 @fz_screen_byte(i32 %0, i32 %3)
br label %11
11: ; preds = %9, %5
%12 = phi i32 [ %8, %5 ], [ %10, %9 ]
ret i32 %12
}
void swap_ptr(void **a, void **b) {
  void *c = *a;
  *a = *b;
  *b = c;
}


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

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

LLVM IR (-O0):
define void @swap_ptr(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap_ptr(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}