xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ is_transmit_empty(int);
int /*<<< orphan*/ outb(int, char);
void serial_put(int com, char c) {
  while (!is_transmit_empty(com))
    ;
  outb(com, c);
}


x86 assembly (clang, -O0):
<serial_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <is_transmit_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114e <serial_put+0x2e>
jmp    1153 <serial_put+0x33>
jmp    1131 <serial_put+0x11>
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_put>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <is_transmit_empty@plt>
test   %eax,%eax
je     1130 <serial_put+0x10>
movsbl %bpl,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_put(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
br label %5
5: ; preds = %10, %2
%6 = load i32, i32* %3
%7 = call i32 @is_transmit_empty(i32 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load i32, i32* %3
%13 = load i8, i8* %4
%14 = call i32 @outb(i32 %12, i8 signext %13)
ret void
}

LLVM IR (-O2):
define void @serial_put(i32 %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @is_transmit_empty(i32 %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3
%7 = tail call i32 @outb(i32 %0, i8 signext %1)
ret void
}
/* Type definitions */
struct ts_platform_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ enable_irq(unsigned int);
void board_enable_irq(const struct ts_platform_data *pdata, unsigned int irq) {
  enable_irq(irq);
}


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

x86 assembly (clang, -O2):
<board_enable_irq>:
mov    %esi,%edi
jmp    1030 <enable_irq@plt>

LLVM IR (-O0):
%struct.ts_platform_data = type { i32 }
define void @board_enable_irq(%struct.ts_platform_data* %0, i32 %1) {
%3 = alloca %struct.ts_platform_data*
%4 = alloca i32
store %struct.ts_platform_data* %0, %struct.ts_platform_data** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @enable_irq(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.ts_platform_data = type { i32 }
define void @board_enable_irq(%struct.ts_platform_data* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @enable_irq(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printnames(char *);
void main() { printnames("345"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"345\00"
define void @main() {
%1 = tail call i32 @printnames(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  if (argc > 1)
    for (;;)
      puts(argv[1]);
  else
    for (;;)
      puts("y");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1147 <main+0x37>
jmp    1135 <main+0x25>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <puts@plt>
jmp    1135 <main+0x25>
jmp    114c <main+0x3c>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
jmp    114c <main+0x3c>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jle    112b <main+0x1b>
mov    %rsi,%rbx
nopl   0x0(%rax)
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
jmp    1120 <main+0x10>
lea    0xece(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1140 <main+0x30>

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

LLVM IR (-O2):
@.str = [2 x i8] c"y\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
br label %6
6: ; preds = %4, %6
%7 = load i8*, i8** %5
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
br label %6
9: ; preds = %2, %9
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %9
}
char *strcpy(char *dest, const char *src) {
  const char *p;
  char *q;
  for (p = src, q = dest; *p != '\0'; p++, q++)
    *q = *p;
  *q = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <strcpy+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <strcpy+0x1c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,(%rdx)
ret

LLVM IR (-O0):
define i8* @strcpy(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** %4
store i8* %7, i8** %5
%8 = load i8*, i8** %3
store i8* %8, i8** %6
br label %9
9: ; preds = %18, %2
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %9
%15 = load i8*, i8** %5
%16 = load i8, i8* %15
%17 = load i8*, i8** %6
store i8 %16, i8* %17
br label %18
18: ; preds = %14
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %5
%21 = load i8*, i8** %6
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %6
br label %9
23: ; preds = %9
%24 = load i8*, i8** %6
store i8 0, i8* %24
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %0
}
/* Variables and functions */
unsigned short Crc16(int /*<<< orphan*/, unsigned char const *, unsigned long);
unsigned short Crc16Array(unsigned long ulWordLen,
                          const unsigned long *pulData) {
  return (Crc16(0, (const unsigned char *)pulData, ulWordLen * 4));
}


x86 assembly (clang, -O0):
<Crc16Array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
shl    $0x2,%rdx
xor    %edi,%edi
call   1030 <Crc16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Crc16Array>:
lea    0x0(,%rdi,4),%rdx
xor    %edi,%edi
jmp    1030 <Crc16@plt>

LLVM IR (-O0):
define zeroext i16 @Crc16Array(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = bitcast i64* %5 to i8*
%7 = load i64, i64* %3
%8 = mul i64 %7, 4
%9 = call zeroext i16 @Crc16(i32 0, i8* %6, i64 %8)
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @Crc16Array(i64 %0, i64* %1) {
%3 = bitcast i64* %1 to i8*
%4 = shl i64 %0, 2
%5 = tail call zeroext i16 @Crc16(i32 0, i8* %3, i64 %4)
ret i16 %5
}
int f(int f) { return f; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct bitmap_t {
  int dummy;
};

/* Variables and functions */
size_t bitmap_bit_count(struct bitmap_t *);
int /*<<< orphan*/ printf(char *, size_t const);
void print_bitmap_bit_count(struct bitmap_t *set) {
  const size_t count = bitmap_bit_count(set);
  printf("%zu", count);
}


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

x86 assembly (clang, -O2):
<print_bitmap_bit_count>:
push   %rax
call   1040 <bitmap_bit_count@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.bitmap_t = type { i32 }
@.str = [4 x i8] c"%zu\00"
define void @print_bitmap_bit_count(%struct.bitmap_t* %0) {
%2 = alloca %struct.bitmap_t*
%3 = alloca i64
store %struct.bitmap_t* %0, %struct.bitmap_t** %2
%4 = load %struct.bitmap_t*, %struct.bitmap_t** %2
%5 = call i64 @bitmap_bit_count(%struct.bitmap_t* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %6)
ret void
}

LLVM IR (-O2):
%struct.bitmap_t = type { i32 }
@.str = [4 x i8] c"%zu\00"
define void @print_bitmap_bit_count(%struct.bitmap_t* %0) {
%2 = tail call i64 @bitmap_bit_count(%struct.bitmap_t* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
char ctoi(char ch) { return (ch - 48); }


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @ctoi(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @ctoi(i8 signext %0) {
%2 = add i8 %0, -48
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ CODESET;
char *iupStrReturnStr(int /*<<< orphan*/);
int /*<<< orphan*/ nl_langinfo(int /*<<< orphan*/);
char *iupdrvLocaleInfo(void) { return iupStrReturnStr(nl_langinfo(CODESET)); }


x86 assembly (clang, -O0):
<iupdrvLocaleInfo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
mov    %eax,%edi
call   1040 <iupStrReturnStr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupdrvLocaleInfo>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <iupStrReturnStr@plt>

LLVM IR (-O0):
@CODESET = global i32 0
define i8* @iupdrvLocaleInfo() {
%1 = load i32, i32* @CODESET
%2 = call i32 @nl_langinfo(i32 %1)
%3 = call i8* @iupStrReturnStr(i32 %2)
ret i8* %3
}

LLVM IR (-O2):
@CODESET = global i32 0
define i8* @iupdrvLocaleInfo() {
%1 = load i32, i32* @CODESET
%2 = tail call i32 @nl_langinfo(i32 %1)
%3 = tail call i8* @iupStrReturnStr(i32 %2)
ret i8* %3
}
double clip01(double x) { return (x < 0) ? 0 : (x > 1) ? 1 : x; }


x86 assembly (clang, -O0):
<clip01>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1124 <clip01+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <clip01+0x61>
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <clip01+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <clip01+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip01>:
movsd  0xef8(%rip),%xmm1
minsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm2,%xmm0
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @clip01(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ 0.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @clip01(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 1.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double 0.000000e+00, double %4
ret double %5
}
attr_crc32_words_block_compare(const void *a, const void *b) {
  unsigned int i = *((unsigned int *)a), j = *((unsigned int *)b);
  if (i > j)
    return +1;
  if (i < j)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<attr_crc32_words_block_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jbe    1136 <attr_crc32_words_block_compare+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <attr_crc32_words_block_compare+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jae    114e <attr_crc32_words_block_compare+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <attr_crc32_words_block_compare+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<attr_crc32_words_block_compare>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
cmp    %ecx,%eax
sbb    %edx,%edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

LLVM IR (-O0):
define i32 @attr_crc32_words_block_compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp ugt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp ult i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @attr_crc32_words_block_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp ugt i32 %4, %6
%8 = icmp ult i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long time_us() {
  struct timeval tv;
  long long us;
  gettimeofday(&tv, NULL);
  us = ((long long)tv.tv_sec) * 1000000;
  us += tv.tv_usec;
  return us;
}


x86 assembly (clang, -O0):
<time_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_us>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @time_us() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* %2
%10 = add nsw i64 %9, %8
store i64 %10, i64* %2
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @time_us() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
/* Variables and functions */
int _assert_null_found(char *);
int _assert_ok(char *);
int assert_not_null(void *p) {
  char func[] = "assert_not_null";
  if (p)
    return _assert_ok(func);
  else
    return _assert_null_found(func);
}


x86 assembly (clang, -O0):
<assert_not_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115e <assert_not_null+0x3e>
lea    -0x20(%rbp),%rdi
call   1040 <_assert_ok@plt>
mov    %eax,-0x4(%rbp)
jmp    116a <assert_not_null+0x4a>
lea    -0x20(%rbp),%rdi
call   1030 <_assert_null_found@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_not_null>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
test   %rdi,%rdi
je     1141 <assert_not_null+0x21>
mov    %rsp,%rdi
call   1040 <_assert_ok@plt>
add    $0x18,%rsp
ret
mov    %rsp,%rdi
call   1030 <_assert_null_found@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.assert_not_null.func = [16 x i8] c"assert_not_null\00"
define i32 @assert_not_null(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [16 x i8]
store i8* %0, i8** %3
%5 = bitcast [16 x i8]* %4 to i8*
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%10 = call i32 @_assert_ok(i8* %9)
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%13 = call i32 @_assert_null_found(i8* %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@__const.assert_not_null.func = [16 x i8] c"assert_not_null\00"
define i32 @assert_not_null(i8* readnone %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @_assert_ok(i8* %3)
br label %9
7: ; preds = %1
%8 = call i32 @_assert_null_found(i8* %3)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int pathcon_nm4_f0(double const **, double **, int *, double *, int);
int pathcon_nm4(const double **arg, double **res, int *iw, double *w, int mem) {
  return pathcon_nm4_f0(arg, res, iw, w, mem);
}


x86 assembly (clang, -O0):
<pathcon_nm4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <pathcon_nm4_f0@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm4>:
jmp    1030 <pathcon_nm4_f0@plt>

LLVM IR (-O0):
define i32 @pathcon_nm4(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @pathcon_nm4_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @pathcon_nm4(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathcon_nm4_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
double abs_double(double x) {
  if (x > 0)
    return x;
  return -x;
}


x86 assembly (clang, -O0):
<abs_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <abs_double+0x2a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114b <abs_double+0x4b>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_double>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @abs_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %3
store double %7, double* %2
br label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fneg double %9
store double %10, double* %2
br label %11
11: ; preds = %8, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @abs_double(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ setclock(int);
void writebit(bool high) {
  if (high)
    (*(volatile uint8_t *)((0x500A))) |= (1 << 3);
  else
    (*(volatile uint8_t *)((0x500A))) &= ~(1 << 3);
  setclock(true);
  setclock(false);
}


x86 assembly (clang, -O0):
<writebit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113b <writebit+0x2b>
mov    $0x500a,%eax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    $0x500a,%eax
mov    %ecx,(%rax)
jmp    114c <writebit+0x3c>
mov    $0x500a,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    $0x500a,%eax
mov    %ecx,(%rax)
mov    $0x1,%edi
call   1030 <setclock@plt>
xor    %edi,%edi
call   1030 <setclock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writebit>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
setne  %al
mov    0x500a,%ecx
and    $0xfffffff7,%ecx
lea    (%rcx,%rax,8),%eax
mov    %eax,0x500a
mov    $0x1,%edi
call   1030 <setclock@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <setclock@plt>

LLVM IR (-O0):
define void @writebit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 20490 to i32*)
%7 = or i32 %6, 8
store volatile i32 %7, i32* inttoptr (i64 20490 to i32*)
br label %11
8: ; preds = %1
%9 = load volatile i32, i32* inttoptr (i64 20490 to i32*)
%10 = and i32 %9, -9
store volatile i32 %10, i32* inttoptr (i64 20490 to i32*)
br label %11
11: ; preds = %8, %5
%12 = call i32 @setclock(i32 1)
%13 = call i32 @setclock(i32 0)
ret void
}

LLVM IR (-O2):
define void @writebit(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load volatile i32, i32* inttoptr (i64 20490 to i32*)
%4 = and i32 %3, -9
%5 = select i1 %2, i32 0, i32 8
%6 = or i32 %4, %5
store volatile i32 %6, i32* inttoptr (i64 20490 to i32*)
%7 = tail call i32 @setclock(i32 1)
%8 = tail call i32 @setclock(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void terminate_process() { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<terminate_process>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<terminate_process>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @terminate_process() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @terminate_process() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ writeByte(unsigned int);
void writeWord(unsigned int value) {
  writeByte(value & 0xff);
  writeByte((value / 256) & 0xff);
}


x86 assembly (clang, -O0):
<writeWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <writeByte@plt>
mov    -0x4(%rbp),%edi
shr    $0x8,%edi
and    $0xff,%edi
call   1030 <writeByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeWord>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <writeByte@plt>
movzbl %bh,%edi
pop    %rbx
jmp    1030 <writeByte@plt>

LLVM IR (-O0):
define void @writeWord(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @writeByte(i32 %4)
%6 = load i32, i32* %2
%7 = udiv i32 %6, 256
%8 = and i32 %7, 255
%9 = call i32 @writeByte(i32 %8)
ret void
}

LLVM IR (-O2):
define void @writeWord(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @writeByte(i32 %2)
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @writeByte(i32 %5)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  int i;
  int *v;
  v = (int *)malloc(10 * sizeof(int));
  for (i = 0; i < 20; i++)
    v[i] = 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    115b <main+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movl   $0xa,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x28,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movups %xmm0,0x10(%rax)
movups %xmm0,0x20(%rax)
movups %xmm0,0x30(%rax)
movups %xmm0,0x40(%rax)
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to i32*
%3 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %2, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %2, i64 8
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %2, i64 12
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %2, i64 16
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 10, i32 10, i32 10, i32 10>, <4 x i32>* %11
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ getRandomPrime(int /*<<< orphan*/, unsigned long, int);
int /*<<< orphan*/ mpz_mul(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void getRandomKey(mpz_t key, mpz_t p, mpz_t q, unsigned long n) {
  getRandomPrime(p, n / 2, 179);
  getRandomPrime(q, n / 2, 199);
  mpz_mul(key, p, q);
}


x86 assembly (clang, -O0):
<getRandomKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
shr    $0x1,%rsi
mov    $0xb3,%edx
call   1030 <getRandomPrime@plt>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
shr    $0x1,%rsi
mov    $0xc7,%edx
call   1030 <getRandomPrime@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <mpz_mul@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomKey>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%r15d
shr    %rbx
mov    %esi,%edi
mov    %rbx,%rsi
mov    $0xb3,%edx
call   1030 <getRandomPrime@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0xc7,%edx
call   1030 <getRandomPrime@plt>
mov    %r15d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <mpz_mul@plt>

LLVM IR (-O0):
define void @getRandomKey(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32, i32* %6
%10 = load i64, i64* %8
%11 = udiv i64 %10, 2
%12 = call i32 @getRandomPrime(i32 %9, i64 %11, i32 179)
%13 = load i32, i32* %7
%14 = load i64, i64* %8
%15 = udiv i64 %14, 2
%16 = call i32 @getRandomPrime(i32 %13, i64 %15, i32 199)
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 @mpz_mul(i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @getRandomKey(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = lshr i64 %3, 1
%6 = tail call i32 @getRandomPrime(i32 %1, i64 %5, i32 179)
%7 = tail call i32 @getRandomPrime(i32 %2, i64 %5, i32 199)
%8 = tail call i32 @mpz_mul(i32 %0, i32 %1, i32 %2)
ret void
}
void set_zero(double *x, int n) {
  for (int i = 0; i < n; ++i) {
    x[i] = 0.0;
  }
}


x86 assembly (clang, -O0):
<set_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <set_zero+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <set_zero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_zero>:
test   %esi,%esi
jle    1126 <set_zero+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @set_zero(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
store double 0.000000e+00, double* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @set_zero(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
scalar_t__ rmdir(char const *);
int main(int argc, const char *argv[]) {
  if (argc < 2)
    return (64);
  return (rmdir(argv[1]) == 0 ? 0 : 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x40,-0x4(%rbp)
jmp    115d <main+0x4d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <rmdir@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x40,%eax
cmp    $0x2,%edi
jl     1133 <main+0x23>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <rmdir@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 64, i32* %3
br label %17
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @rmdir(i8* %12)
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
store i32 %16, i32* %3
br label %17
17: ; preds = %9, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @rmdir(i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 64, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void version() {
  write(2,
        "waitmax version 1.1z\n"
        "Copyright Mathias Kettner 2008\n"
        "This is free software; see the source for copying conditions.  There "
        "is NO\n"
        "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
        "PURPOSE.\n",
        strlen("waitmax version 1.1z\n"
               "Copyright Mathias Kettner 2008\n"
               "This is free software; see the source for copying conditions.  "
               "There is NO\n"
               "warranty; not even for MERCHANTABILITY or FITNESS FOR A "
               "PARTICULAR PURPOSE.\n"));
  ;
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
mov    $0x2,%edi
lea    0xeb2(%rip),%rsi
call   1030 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [204 x i8] c"waitmax version 1.1z\0ACopyright Mathias Kettner 2008\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
define void @version() {
%1 = call i32 @strlen(i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @write(i32 2, i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [204 x i8] c"waitmax version 1.1z\0ACopyright Mathias Kettner 2008\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
define void @version() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int false() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @false() {
ret i32 0
}
int one(int a) {
  if (a != 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     111d <one+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <one+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<one>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @one(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @one(i32 %0) {
%2 = icmp ne i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
void ARGBToRGB565DitherRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRGB565DitherRow_AVX2() {
ret void
}
int func(void) {
  int n = 3;
  int m = 5;
  n <<= m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
unsigned char setBit(int, unsigned char, int /*<<< orphan*/);
unsigned char cmd_resetBit(int workonbit, unsigned char workingbyte) {
  printf("Neuer Wert des Bits %d: %d\n", workonbit, 0);
  return setBit(workonbit, workingbyte, 0);
}


x86 assembly (clang, -O0):
<cmd_resetBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec5(%rip),%rdi
xor    %edx,%edx
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
xor    %edx,%edx
movzbl -0x5(%rbp),%esi
call   1040 <setBit@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_resetBit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <setBit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Neuer Wert des Bits %d: %d\0A\00"
define zeroext i8 @cmd_resetBit(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %5, i32 0)
%7 = load i32, i32* %3
%8 = load i8, i8* %4
%9 = call zeroext i8 @setBit(i32 %7, i8 zeroext %8, i32 0)
ret i8 %9
}

LLVM IR (-O2):
@.str = [28 x i8] c"Neuer Wert des Bits %d: %d\0A\00"
define zeroext i8 @cmd_resetBit(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0)
%4 = tail call zeroext i8 @setBit(i32 %0, i8 zeroext %1, i32 0)
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void rcv_xmodem() {
  fprintf(stderr, "xmodem needs to go away");
  _exit(-1);
}


x86 assembly (clang, -O0):
<rcv_xmodem>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<rcv_xmodem>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"xmodem needs to go away\00"
define void @rcv_xmodem() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"xmodem needs to go away\00"
define void @rcv_xmodem() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("%d\n", EOF);
  char c = '\0';
  printf("%d\n", --c == EOF);
  printf("%d\n", sizeof(long double));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movsbl %al,%eax
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
mov    (%r14),%esi
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %esi,%esi
cmpl   $0xffffffff,(%r14)
sete   %sil
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = alloca i8
%2 = load i32, i32* @EOF
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
store i8 0, i8* %1
%4 = load i8, i8* %1
%5 = add i8 %4, -1
store i8 %5, i8* %1
%6 = sext i8 %5 to i32
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 16)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_set_sink_input_volume() {
  printf("NOT IMPLEMENTED:"
         "pa_context_set_sink_input_volume"
         "\n");
}


x86 assembly (clang, -O0):
<pa_context_set_sink_input_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [50 x i8] c"NOT IMPLEMENTED:pa_context_set_sink_input_volume\0A\00"
define i32 @pa_context_set_sink_input_volume() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_context_set_sink_input_volume\00"
define i32 @pa_context_set_sink_input_volume() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ AUDDRV_GPIO_Stop();
void GPIO_Deinit() {
  AUDDRV_GPIO_Stop();
  return;
}


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

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

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

LLVM IR (-O2):
define void @GPIO_Deinit() {
%1 = tail call i32 (...) @AUDDRV_GPIO_Stop()
ret void
}
/* Variables and functions */
unsigned long xstrtoull_range(char const *, int, unsigned long, unsigned long);
__attribute__((always_)) unsigned long
xstrtoul_range(const char *str, int b, unsigned long l, unsigned long u) {
  return xstrtoull_range(str, b, l, u);
}


x86 assembly (clang, -O0):
<xstrtoul_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <xstrtoull_range@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoul_range>:
jmp    1030 <xstrtoull_range@plt>

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

LLVM IR (-O2):
define i64 @xstrtoul_range(i8* %0, i32 %1, i64 %2, i64 %3) {
%5 = tail call i64 @xstrtoull_range(i8* %0, i32 %1, i64 %2, i64 %3)
ret i64 %5
}