xunge/DecIR huggingface dataset:
/* Type definitions */
struct vector {
  int dummy;
};
struct matrix {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat_transform_copy(struct vector *, struct matrix const *,
                                      struct vector *);
void mat_transform(struct vector *v, const struct matrix *m) {
  mat_transform_copy(v, m, v);
}


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

x86 assembly (clang, -O2):
<mat_transform>:
mov    %rdi,%rdx
jmp    1030 <mat_transform_copy@plt>

LLVM IR (-O0):
%struct.vector = type { i32 }
%struct.matrix = type { i32 }
define void @mat_transform(%struct.vector* %0, %struct.matrix* %1) {
%3 = alloca %struct.vector*
%4 = alloca %struct.matrix*
store %struct.vector* %0, %struct.vector** %3
store %struct.matrix* %1, %struct.matrix** %4
%5 = load %struct.vector*, %struct.vector** %3
%6 = load %struct.matrix*, %struct.matrix** %4
%7 = load %struct.vector*, %struct.vector** %3
%8 = call i32 @mat_transform_copy(%struct.vector* %5, %struct.matrix* %6, %struct.vector* %7)
ret void
}

LLVM IR (-O2):
%struct.vector = type { i32 }
%struct.matrix = type { i32 }
define void @mat_transform(%struct.vector* %0, %struct.matrix* %1) {
%3 = tail call i32 @mat_transform_copy(%struct.vector* %0, %struct.matrix* %1, %struct.vector* %0)
ret void
}
double mypow(x, y)
double x, y;
{
  if (x >= 0)
    return (pow(x, y));
  else {
    printf("Pow (%lf, %lf) = %lf\n", x, y, pow(x, y));
    return (pow(fabs(x), y));
  }
}


x86 assembly (clang, -O0):
<mypow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115d <mypow+0x3d>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    11ba <mypow+0x9a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movaps 0xe59(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mypow>:
sub    $0x28,%rsp
movapd %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <pow@plt>
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
movapd 0x10(%rsp),%xmm3
ucomisd %xmm0,%xmm3
jae    117c <mypow+0x5c>
lea    0xec0(%rip),%rdi
movapd %xmm3,%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
movaps 0x10(%rsp),%xmm0
andps  0xe93(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
add    $0x28,%rsp
jmp    1040 <pow@plt>
movapd %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Pow (%lf, %lf) = %lf\0A\00"
define double @mypow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = fcmp oge double %6, 0.000000e+00
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load double, double* %4
%10 = load double, double* %5
%11 = call double @pow(double %9, double %10)
store double %11, double* %3
br label %23
12: ; preds = %2
%13 = load double, double* %4
%14 = load double, double* %5
%15 = load double, double* %4
%16 = load double, double* %5
%17 = call double @pow(double %15, double %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %13, double %14, double %17)
%19 = load double, double* %4
%20 = call double @llvm.fabs.f64(double %19)
%21 = load double, double* %5
%22 = call double @pow(double %20, double %21)
store double %22, double* %3
br label %23
23: ; preds = %12, %8
%24 = load double, double* %3
ret double %24
}

LLVM IR (-O2):
@.str = [22 x i8] c"Pow (%lf, %lf) = %lf\0A\00"
define double @mypow(double %0, double %1) {
%3 = fcmp ult double %0, 0.000000e+00
%4 = tail call double @pow(double %0, double %1)
br i1 %3, label %5, label %9
5: ; preds = %2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %4)
%7 = tail call double @llvm.fabs.f64(double %0)
%8 = tail call double @pow(double %7, double %1)
br label %9
9: ; preds = %2, %5
%10 = phi double [ %8, %5 ], [ %4, %2 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ SPI_Transfer(short *, short *, int);
void LCD_Command(int command) {
  short dataBuffer = (0x000 | (0xFF & command));
  short unusedReturnBuffer[1];
  SPI_Transfer(&dataBuffer, unusedReturnBuffer, 1);
}


x86 assembly (clang, -O0):
<LCD_Command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
or     $0x0,%eax
mov    %ax,-0x6(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0x6(%rbp),%rdi
mov    $0x1,%edx
call   1030 <SPI_Transfer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Command>:
push   %rax
movzbl %dil,%eax
mov    %ax,0x4(%rsp)
lea    0x4(%rsp),%rdi
lea    0x6(%rsp),%rsi
mov    $0x1,%edx
call   1030 <SPI_Transfer@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @LCD_Command(i32 %0) {
%2 = alloca i32
%3 = alloca i16
%4 = alloca [1 x i16]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 255, %5
%7 = or i32 0, %6
%8 = trunc i32 %7 to i16
store i16 %8, i16* %3
%9 = getelementptr inbounds [1 x i16], [1 x i16]* %4, i64 0, i64 0
%10 = call i32 @SPI_Transfer(i16* %3, i16* %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @LCD_Command(i32 %0) {
%2 = alloca i16
%3 = alloca [1 x i16]
%4 = bitcast i16* %2 to i8*
%5 = trunc i32 %0 to i16
%6 = and i16 %5, 255
store i16 %6, i16* %2
%7 = bitcast [1 x i16]* %3 to i8*
%8 = getelementptr inbounds [1 x i16], [1 x i16]* %3, i64 0, i64 0
%9 = call i32 @SPI_Transfer(i16* %2, i16* %8, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ GEN_IPADD;
int do_x509_check(int /*<<< orphan*/ *, unsigned char const *, size_t,
                  unsigned int, int /*<<< orphan*/);
int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
                  unsigned int flags) {
  return do_x509_check(x, chk, chklen, flags, GEN_IPADD);
}


x86 assembly (clang, -O0):
<X509_check_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    0x2eab(%rip),%rax
mov    (%rax),%r8d
call   1030 <do_x509_check@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_check_ip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%r8d
jmp    1030 <do_x509_check@plt>

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

LLVM IR (-O2):
@GEN_IPADD = global i32 0
define i32 @X509_check_ip(i32* %0, i8* %1, i64 %2, i32 %3) {
%5 = load i32, i32* @GEN_IPADD
%6 = tail call i32 @do_x509_check(i32* %0, i8* %1, i64 %2, i32 %3, i32 %5)
ret i32 %6
}
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *createUnaryExpression(int, struct memorycontainer *);
struct memorycontainer *
createNotExpression(struct memorycontainer *expression) {
  return createUnaryExpression(0x22, expression);
}


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

x86 assembly (clang, -O2):
<createNotExpression>:
mov    %rdi,%rsi
mov    $0x22,%edi
jmp    1030 <createUnaryExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createNotExpression(%struct.memorycontainer* %0) {
%2 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %2
%3 = load %struct.memorycontainer*, %struct.memorycontainer** %2
%4 = call %struct.memorycontainer* @createUnaryExpression(i32 34, %struct.memorycontainer* %3)
ret %struct.memorycontainer* %4
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createNotExpression(%struct.memorycontainer* %0) {
%2 = tail call %struct.memorycontainer* @createUnaryExpression(i32 34, %struct.memorycontainer* %0)
ret %struct.memorycontainer* %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_is_negative(int n) {
  if (n < 0) {
    ft_putchar('N');
  } else {
    ft_putchar('P');
  }
}


x86 assembly (clang, -O0):
<ft_is_negative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1134 <ft_is_negative+0x24>
mov    $0x4e,%edi
call   1030 <ft_putchar@plt>
jmp    113e <ft_is_negative+0x2e>
mov    $0x50,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_is_negative>:
not    %edi
shr    $0x1f,%edi
add    %edi,%edi
add    $0x4e,%edi
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_is_negative(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @ft_putchar(i8 signext 78)
br label %9
7: ; preds = %1
%8 = call i32 @ft_putchar(i8 signext 80)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @ft_is_negative(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i8 78, i8 80
%4 = tail call i32 @ft_putchar(i8 signext %3)
ret void
}
int precedence(char c) {
  switch (c) {
  case '+':
  case '-':
    return 0;
  case '*':
  case '/':
  case '%':
    return 1;
  case '^':
    return 2;
  case '$':
    return 3;
  case '~':
  case '_':
    return 4;
  case '!':
    return 5;
  }
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5d,%eax
ja     1177 <precedence+0x77>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1177 <precedence+0x77>
movl   $0x1,-0x4(%rbp)
jmp    1177 <precedence+0x77>
movl   $0x2,-0x4(%rbp)
jmp    1177 <precedence+0x77>
movl   $0x3,-0x4(%rbp)
jmp    1177 <precedence+0x77>
movl   $0x4,-0x4(%rbp)
jmp    1177 <precedence+0x77>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
xor    %eax,%eax
lea    -0x21(%rdi),%ecx
cmp    $0x3e,%ecx
ja     1120 <precedence+0x20>
lea    0xeef(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x1,%eax
ret
cmp    $0x7e,%edi
jne    113c <precedence+0x3c>
mov    $0x4,%eax
ret
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret
mov    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %12 [
i32 43, label %6
i32 45, label %6
i32 42, label %7
i32 47, label %7
i32 37, label %7
i32 94, label %8
i32 36, label %9
i32 126, label %10
i32 95, label %10
i32 33, label %11
]
6: ; preds = %1, %1
store i32 0, i32* %2
br label %12
7: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %12
8: ; preds = %1
store i32 2, i32* %2
br label %12
9: ; preds = %1
store i32 3, i32* %2
br label %12
10: ; preds = %1, %1
store i32 4, i32* %2
br label %12
11: ; preds = %1
store i32 5, i32* %2
br label %12
12: ; preds = %6, %7, %8, %9, %10, %11, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @precedence(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 33, label %7
i32 95, label %6
i32 42, label %3
i32 47, label %3
i32 37, label %3
i32 94, label %4
i32 36, label %5
i32 126, label %6
]
3: ; preds = %1, %1, %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1, %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %3, %4, %5, %6, %7, %1
%9 = phi i32 [ 5, %7 ], [ 4, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %9
}
int fun129() { return 129; }


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

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

LLVM IR (-O0):
define i32 @fun129() {
ret i32 129
}

LLVM IR (-O2):
define i32 @fun129() {
ret i32 129
}
/* Variables and functions */
int *mxCallocInt(int);
void initialize_disjoint_sets(int n, int **pp) { (*pp) = mxCallocInt(n); }


x86 assembly (clang, -O0):
<initialize_disjoint_sets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mxCallocInt@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_disjoint_sets>:
push   %rbx
mov    %rsi,%rbx
call   1030 <mxCallocInt@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @initialize_disjoint_sets(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
store i32 %0, i32* %3
store i32** %1, i32*** %4
%5 = load i32, i32* %3
%6 = call i32* @mxCallocInt(i32 %5)
%7 = load i32**, i32*** %4
store i32* %6, i32** %7
ret void
}

LLVM IR (-O2):
define void @initialize_disjoint_sets(i32 %0, i32** nocapture writeonly %1) {
%3 = tail call i32* @mxCallocInt(i32 %0)
store i32* %3, i32** %1
ret void
}
int test_imm_24uint8_reg(unsigned char val) {
  return ((val) & (0x24 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_24uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x24,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_24uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 36
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int _close_r(struct _reent *r, int file) {
  (void)r;
  (void)file;
  return 0;
}


x86 assembly (clang, -O0):
<_close_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_close_r(%struct._reent* %0, i32 %1) {
%3 = alloca %struct._reent*
%4 = alloca i32
store %struct._reent* %0, %struct._reent** %3
store i32 %1, i32* %4
%5 = load %struct._reent*, %struct._reent** %3
%6 = load i32, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_close_r(%struct._reent* nocapture readnone %0, i32 %1) {
ret i32 0
}
int fun268() { return 268; }


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

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

LLVM IR (-O0):
define i32 @fun268() {
ret i32 268
}

LLVM IR (-O2):
define i32 @fun268() {
ret i32 268
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_NAME;
int /*<<< orphan*/ prctl(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void task_name1(const char *name) { prctl(PR_SET_NAME, name, 0, 0, 0); }


x86 assembly (clang, -O0):
<task_name1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <prctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_name1>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <prctl@plt>

LLVM IR (-O0):
@PR_SET_NAME = global i32 0
define void @task_name1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @PR_SET_NAME
%4 = load i8*, i8** %2
%5 = call i32 @prctl(i32 %3, i8* %4, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@PR_SET_NAME = global i32 0
define void @task_name1(i8* %0) {
%2 = load i32, i32* @PR_SET_NAME
%3 = tail call i32 @prctl(i32 %2, i8* %0, i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *us_resp(int /*<<< orphan*/ *, int, int);
char *std_us_resp(FILE *stream) { return us_resp(stream, 16, 16); }


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

x86 assembly (clang, -O2):
<std_us_resp>:
mov    $0x10,%esi
mov    $0x10,%edx
jmp    1030 <us_resp@plt>

LLVM IR (-O0):
define i8* @std_us_resp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i8* @us_resp(i32* %3, i32 16, i32 16)
ret i8* %4
}

LLVM IR (-O2):
define i8* @std_us_resp(i32* %0) {
%2 = tail call i8* @us_resp(i32* %0, i32 16, i32 16)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *sqlite3_malloc(int);
void *fts2HashMalloc(int n) {
  void *p = sqlite3_malloc(n);
  if (p) {
    memset(p, 0, n);
  }
  return p;
}


x86 assembly (clang, -O0):
<fts2HashMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sqlite3_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <fts2HashMalloc+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts2HashMalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <sqlite3_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <fts2HashMalloc+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @fts2HashMalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @sqlite3_malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i32, i32* %2
%11 = call i32 @memset(i8* %9, i32 0, i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @fts2HashMalloc(i32 %0) {
%2 = tail call i8* @sqlite3_malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int IsAscii(int enc __attribute__((unused)), int c) {
  if (c >= 0x00 && c <= 0x7f)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<IsAscii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     112a <IsAscii+0x2a>
cmpl   $0x7f,-0xc(%rbp)
jg     112a <IsAscii+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <IsAscii+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsAscii>:
xor    %eax,%eax
cmp    $0x80,%esi
setb   %al
ret

LLVM IR (-O0):
define i32 @IsAscii(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 127
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 1, i32* %3
br label %13
12: ; preds = %8, %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsAscii(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, 128
%4 = zext i1 %3 to i32
ret i32 %4
}
void gc_register_finalizer(void *obj) {}


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

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

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

LLVM IR (-O2):
define void @gc_register_finalizer(i8* nocapture %0) {
ret void
}
const char *type_name(char t) {
  if (t)
    return "CHAR";
  else
    return "char";
}


x86 assembly (clang, -O0):
<type_name>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
je     1124 <type_name+0x24>
lea    0xee5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <type_name+0x2f>
lea    0xeda(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<type_name>:
test   %dil,%dil
lea    0xefb(%rip),%rcx
lea    0xeef(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"CHAR\00"
@.str.1 = [5 x i8] c"char\00"
define i8* @type_name(i8 signext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"CHAR\00"
@.str.1 = [5 x i8] c"char\00"
define i8* @type_name(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
long double logbl(long double x) {
  long double res;
  asm("fxtract\n\t"
      "fstp	%%st"
      : "=t"(res)
      : "0"(x));
  return res;
}


x86 assembly (clang, -O0):
<logbl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fxtract
fstp   %st(0)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbl>:
fldt   0x8(%rsp)
fxtract
fstp   %st(0)
ret

LLVM IR (-O0):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fxtract\0A\09fstp\09%st", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ SSIBaseValid(unsigned long);
long SSIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData) {
  DEBUG_ASSERT(SSIBaseValid(ulBase));
  if ((*((volatile unsigned long *)(ulBase + 0x0000000C))) & 0x00000004) {
    *pulData = (*((volatile unsigned long *)(ulBase + 0x00000008)));
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<SSIDataGetNonBlocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%rax
and    $0x4,%rax
cmp    $0x0,%rax
je     1172 <SSIDataGetNonBlocking+0x52>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movq   $0x1,-0x8(%rbp)
jmp    117a <SSIDataGetNonBlocking+0x5a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDataGetNonBlocking>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
testq  $0x4,0xc(%rbx)
jne    1144 <SSIDataGetNonBlocking+0x24>
xor    %eax,%eax
jmp    1150 <SSIDataGetNonBlocking+0x30>
mov    0x8(%rbx),%rax
mov    %rax,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @SSIDataGetNonBlocking(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
store i64 %0, i64* %4
store i64* %1, i64** %5
%6 = load i64, i64* %4
%7 = call i32 @SSIBaseValid(i64 %6)
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = add i64 %9, 12
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, 4
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %2
%16 = load i64, i64* %4
%17 = add i64 %16, 8
%18 = inttoptr i64 %17 to i64*
%19 = load volatile i64, i64* %18
%20 = load i64*, i64** %5
store i64 %19, i64* %20
store i64 1, i64* %3
br label %22
21: ; preds = %2
store i64 0, i64* %3
br label %22
22: ; preds = %21, %15
%23 = load i64, i64* %3
ret i64 %23
}

LLVM IR (-O2):
define i64 @SSIDataGetNonBlocking(i64 %0, i64* nocapture writeonly %1) {
%3 = tail call i32 @SSIBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 12
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 4
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = add i64 %0, 8
%12 = inttoptr i64 %11 to i64*
%13 = load volatile i64, i64* %12
store i64 %13, i64* %1
br label %14
14: ; preds = %2, %10
%15 = phi i64 [ 1, %10 ], [ 0, %2 ]
ret i64 %15
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned short)47038;
    if ((state[0UL] >> (unsigned short)3) & (unsigned short)1) {
      state[0UL] *= state[0UL];
    }
    output[0UL] = state[0UL] ^ 736209367UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
sub    $0x30dd5ac,%rax
sub    $0xb7be,%rax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
sar    $0x3,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1145 <RandomFunc+0x45>
movzwl -0x12(%rbp),%ecx
movzwl -0x12(%rbp),%eax
imul   %ecx,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
xor    $0x2be1a9d7,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x7296,%eax
test   $0x8,%al
mov    $0x1,%ecx
cmovne %eax,%ecx
imul   %eax,%ecx
xor    $0xa9d7,%ecx
mov    %cx,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
store i16* %0, i16** %3
store i16* %1, i16** %4
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i64 0
%8 = load i16, i16* %7
%9 = zext i16 %8 to i64
%10 = sub i64 %9, 51238316
%11 = sub i64 %10, 47038
%12 = trunc i64 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%15 = load i16, i16* %14
%16 = zext i16 %15 to i32
%17 = ashr i32 %16, 3
%18 = and i32 %17, 1
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %2
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%25 = load i16, i16* %24
%26 = zext i16 %25 to i32
%27 = mul nsw i32 %26, %23
%28 = trunc i32 %27 to i16
store i16 %28, i16* %24
br label %29
29: ; preds = %20, %2
%30 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%31 = load i16, i16* %30
%32 = zext i16 %31 to i64
%33 = xor i64 %32, 736209367
%34 = trunc i64 %33 to i16
%35 = load i16*, i16** %4
%36 = getelementptr inbounds i16, i16* %35, i64 0
store i16 %34, i16* %36
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 29334
%5 = and i16 %4, 8
%6 = icmp eq i16 %5, 0
%7 = select i1 %6, i16 1, i16 %4
%8 = mul i16 %7, %4
%9 = xor i16 %8, -22057
store i16 %9, i16* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void print_long(FILE *f, long v) {
  fprintf(f, "%ld", (0x8000000000000000l ^ v));
}


x86 assembly (clang, -O0):
<print_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movabs $0x8000000000000000,%rax
xor    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_long>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define void @print_long(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = xor i64 -9223372036854775808, %6
%8 = trunc i64 %7 to i32
%9 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define void @print_long(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int _NumCPUs(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @_NumCPUs() {
ret i32 2
}

LLVM IR (-O2):
define i32 @_NumCPUs() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog_name) {
  fprintf(stderr, "Usage: %s DIRECTORY...\n", prog_name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage: %s DIRECTORY...\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *applet(const char *arg0) {
  const char *applet = strrchr(arg0, '/');
  if (!applet)
    applet = arg0;
  else
    applet++;
  return applet;
}


x86 assembly (clang, -O0):
<applet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <applet+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <applet+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<applet>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @applet(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
store i8* %9, i8** %3
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @applet(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Type definitions */
struct ndm_strmap_t {
  int dummy;
};

/* Variables and functions */
size_t ndm_strmap_nfind(struct ndm_strmap_t const *, char const *const,
                        int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *const);
size_t ndm_strmap_find(const struct ndm_strmap_t *map, const char *const key) {
  return ndm_strmap_nfind(map, key, strlen(key));
}


x86 assembly (clang, -O0):
<ndm_strmap_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <ndm_strmap_nfind@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndm_strmap_find>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ndm_strmap_nfind@plt>

LLVM IR (-O0):
%struct.ndm_strmap_t = type { i32 }
define i64 @ndm_strmap_find(%struct.ndm_strmap_t* %0, i8* %1) {
%3 = alloca %struct.ndm_strmap_t*
%4 = alloca i8*
store %struct.ndm_strmap_t* %0, %struct.ndm_strmap_t** %3
store i8* %1, i8** %4
%5 = load %struct.ndm_strmap_t*, %struct.ndm_strmap_t** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @ndm_strmap_nfind(%struct.ndm_strmap_t* %5, i8* %6, i32 %8)
ret i64 %9
}

LLVM IR (-O2):
%struct.ndm_strmap_t = type { i32 }
define i64 @ndm_strmap_find(%struct.ndm_strmap_t* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @ndm_strmap_nfind(%struct.ndm_strmap_t* %0, i8* %1, i32 %3)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ tanh(double);
int /*<<< orphan*/ tanhf(float);
int /*<<< orphan*/ tanhl(long double);
void uninitvar_tanh(void) {
  float f;
  (void)tanhf(f);
  double d;
  (void)tanh(d);
  long double ld;
  (void)tanhl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_tanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1030 <tanhf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <tanh@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <tanhl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_tanh>:
sub    $0x18,%rsp
call   1030 <tanhf@plt>
call   1050 <tanh@plt>
call   1040 <tanhl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_tanh() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @tanhf(float %4)
%6 = load double, double* %2
%7 = call i32 @tanh(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @tanhl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_tanh() {
%1 = tail call i32 @tanhf(float undef)
%2 = tail call i32 @tanh(double undef)
%3 = tail call i32 @tanhl(x86_fp80 undef)
ret void
}
void menu_gtkmainiteration() { return; }


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

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

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

LLVM IR (-O2):
define void @menu_gtkmainiteration() {
ret void
}
int do_965() { return 965; }


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

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

LLVM IR (-O0):
define i32 @do_965() {
ret i32 965
}

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

/* Variables and functions */
int /*<<< orphan*/ __cpuid(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int main(void) {
  uint32_t eax, ebx, ecx, edx;
  __cpuid(0, eax, ebx, ecx, edx);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
xor    %edi,%edi
call   1030 <__cpuid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__cpuid(i32 0, i32 undef, i32 undef, i32 undef, i32 undef)
ret i32 0
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *_malloc_r(struct _reent *ptr, size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<_malloc_r>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_malloc_r(%struct._reent* %0, i64 %1) {
%3 = alloca %struct._reent*
%4 = alloca i64
store %struct._reent* %0, %struct._reent** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define noalias i8* @_malloc_r(%struct._reent* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int r;
  srand(time(NULL));
  r = rand();
  printf("Random Number: %d", r);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Random Number: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Random Number: %d\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ strcpy_s(char *, int, char *);
void uninitvar_strcpy_s(char *strDest, ssize_t s, char *source) {
  char *strUninit1;
  char *strUninit2;
  ssize_t size;
  (void)strcpy_s(strUninit1, 1, "a");
  (void)strcpy_s(strDest, 1, strUninit2);
  (void)strcpy_s(strDest, size, "a");
  (void)strcpy_s(strDest, s, source);
}


x86 assembly (clang, -O0):
<uninitvar_strcpy_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
lea    0xecd(%rip),%rdx
call   1030 <strcpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x1,%esi
call   1030 <strcpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
lea    0xea8(%rip),%rdx
call   1030 <strcpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <strcpy_s@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_strcpy_s>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeda(%rip),%r15
mov    $0x1,%esi
mov    %r15,%rdx
call   1030 <strcpy_s@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <strcpy_s@plt>
mov    %rbx,%rdi
mov    %r15,%rdx
call   1030 <strcpy_s@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <strcpy_s@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define void @uninitvar_strcpy_s(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @strcpy_s(i8* undef, i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @strcpy_s(i8* %0, i32 1, i8* undef)
%6 = tail call i32 @strcpy_s(i8* %0, i32 undef, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @strcpy_s(i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int strlen(char *);
char *strend(char *s) { return s + strlen(s); }


x86 assembly (clang, -O0):
<strend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strend>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strend(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}
/* Variables and functions */
void *sbrk(int /*<<< orphan*/);
void *topheap() { return sbrk(0); }


x86 assembly (clang, -O0):
<topheap>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sbrk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<topheap>:
xor    %edi,%edi
jmp    1030 <sbrk@plt>

LLVM IR (-O0):
define i8* @topheap() {
%1 = call i8* @sbrk(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @topheap() {
%1 = tail call i8* @sbrk(i32 0)
ret i8* %1
}
int cmp_short_gt(const void *a, const void *b) {
  short a_ = *(short *)a;
  short b_ = *(short *)b;
  if (a_ > b_)
    return -1;
  if (a_ < b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_short_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x1a(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x1c(%rbp)
movswl -0x1a(%rbp),%eax
movswl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jle    113e <cmp_short_gt+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <cmp_short_gt+0x61>
movswl -0x1a(%rbp),%eax
movswl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    115a <cmp_short_gt+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <cmp_short_gt+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_short_gt>:
movzwl (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%ax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_short_gt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = load i16, i16* %3
%5 = bitcast i8* %1 to i16*
%6 = load i16, i16* %5
%7 = icmp sgt i16 %4, %6
%8 = icmp slt i16 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void strini(char *s, long l) {
  long i = 0;
  for (i = 0; i < l; i++)
    s[i] = '\0';
}


x86 assembly (clang, -O0):
<strini>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1147 <strini+0x47>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111c <strini+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strini>:
test   %rsi,%rsi
jle    1124 <strini+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @strini(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}