xunge/DecIR huggingface dataset:
/* Variables and functions */
char *ttyname(int /*<<< orphan*/);
int main(void) {
  char *name = ttyname(0);
  (void)name;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @ttyname(i32 0)
ret i32 0
}
void rotate_matrix_swap(int *p1, int *p2) {
  int temp = *p1;
  *p1 = *p2;
  *p2 = temp;
}


x86 assembly (clang, -O0):
<rotate_matrix_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_matrix_swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @rotate_matrix_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
unsigned float_neg(unsigned uf) {
  unsigned result = uf ^ 0x80000000;
  unsigned tmp = uf & (0x7fffffff);
  if (tmp > 0x7f800000)
    result = uf;
  return result;
}


x86 assembly (clang, -O0):
<float_neg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0x80000000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7f800000,-0xc(%rbp)
jbe    1130 <float_neg+0x30>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_neg>:
mov    %edi,%eax
xor    $0x80000000,%eax
mov    %edi,%ecx
and    $0x7fffffff,%ecx
cmp    $0x7f800001,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @float_neg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = xor i32 %5, -2147483648
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = and i32 %7, 2147483647
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ugt i32 %9, 2139095040
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i32, i32* %2
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @float_neg(i32 %0) {
%2 = xor i32 %0, -2147483648
%3 = and i32 %0, 2147483647
%4 = icmp ugt i32 %3, 2139095040
%5 = select i1 %4, i32 %0, i32 %2
ret i32 %5
}
int wnn_Strlen(s)
register unsigned short *s;
{
  register int n;
  for (n = 0; *s++ != 0; n++)
    ;
  return n;
}


x86 assembly (clang, -O0):
<wnn_Strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movzwl (%rax),%eax
cmp    $0x0,%eax
je     113d <wnn_Strlen+0x3d>
jmp    112f <wnn_Strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <wnn_Strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wnn_Strlen>:
cmpw   $0x0,(%rdi)
je     111d <wnn_Strlen+0x1d>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpw   $0x0,0x2(%rdi,%rax,2)
lea    0x1(%rax),%rax
jne    1110 <wnn_Strlen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @wnn_Strlen(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
store i16* %0, i16** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i32 1
store i16* %6, i16** %2
%7 = load i16, i16* %5
%8 = zext i16 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %4
br label %11
11: ; preds = %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @wnn_Strlen(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i16* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i16, i16* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i16, i16* %7
%10 = icmp eq i16 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Extn_Reset();
int /*<<< orphan*/ IWM_Reset();
int /*<<< orphan*/ SCC_Reset();
int /*<<< orphan*/ SCSI_Reset();
int /*<<< orphan*/ Sony_Reset();
int /*<<< orphan*/ VIA1_Reset();
void customreset(void) {
  IWM_Reset();
  SCC_Reset();
  SCSI_Reset();
  VIA1_Reset();
  Sony_Reset();
  Extn_Reset();
}


x86 assembly (clang, -O0):
<customreset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <IWM_Reset@plt>
mov    $0x0,%al
call   1070 <SCC_Reset@plt>
mov    $0x0,%al
call   1050 <SCSI_Reset@plt>
mov    $0x0,%al
call   1040 <VIA1_Reset@plt>
mov    $0x0,%al
call   1030 <Sony_Reset@plt>
mov    $0x0,%al
call   1060 <Extn_Reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<customreset>:
push   %rax
xor    %eax,%eax
call   1080 <IWM_Reset@plt>
xor    %eax,%eax
call   1070 <SCC_Reset@plt>
xor    %eax,%eax
call   1050 <SCSI_Reset@plt>
xor    %eax,%eax
call   1040 <VIA1_Reset@plt>
xor    %eax,%eax
call   1030 <Sony_Reset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Extn_Reset@plt>

LLVM IR (-O0):
define void @customreset() {
%1 = call i32 (...) @IWM_Reset()
%2 = call i32 (...) @SCC_Reset()
%3 = call i32 (...) @SCSI_Reset()
%4 = call i32 (...) @VIA1_Reset()
%5 = call i32 (...) @Sony_Reset()
%6 = call i32 (...) @Extn_Reset()
ret void
}

LLVM IR (-O2):
define void @customreset() {
%1 = tail call i32 (...) @IWM_Reset()
%2 = tail call i32 (...) @SCC_Reset()
%3 = tail call i32 (...) @SCSI_Reset()
%4 = tail call i32 (...) @VIA1_Reset()
%5 = tail call i32 (...) @Sony_Reset()
%6 = tail call i32 (...) @Extn_Reset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putendl(char *);
int /*<<< orphan*/ ft_putnbr(int);
int /*<<< orphan*/ ft_putstr(char *);
void job_continued(int job, char *name) {
  ft_putstr("[");
  ft_putnbr(job);
  ft_putstr("]");
  ft_putstr(" + ");
  ft_putstr("continued\t\t");
  ft_putendl(name);
}


x86 assembly (clang, -O0):
<job_continued>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x4(%rbp),%edi
call   1040 <ft_putnbr@plt>
lea    0xea8(%rip),%rdi
call   1050 <ft_putstr@plt>
lea    0xe9e(%rip),%rdi
call   1050 <ft_putstr@plt>
lea    0xe96(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    -0x10(%rbp),%rdi
call   1030 <ft_putendl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<job_continued>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    %ebp,%edi
call   1040 <ft_putnbr@plt>
lea    0xeb0(%rip),%rdi
call   1050 <ft_putstr@plt>
lea    0xea6(%rip),%rdi
call   1050 <ft_putstr@plt>
lea    0xe9e(%rip),%rdi
call   1050 <ft_putstr@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putendl@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
@.str.1 = [2 x i8] c"]\00"
@.str.2 = [4 x i8] c" + \00"
@.str.3 = [12 x i8] c"continued\09\09\00"
define void @job_continued(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = call i32 @ft_putnbr(i32 %6)
%8 = call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @ft_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%11 = load i8*, i8** %4
%12 = call i32 @ft_putendl(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"[\00"
@.str.1 = [2 x i8] c"]\00"
@.str.2 = [4 x i8] c" + \00"
@.str.3 = [12 x i8] c"continued\09\09\00"
define void @job_continued(i32 %0, i8* %1) {
%3 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @ft_putnbr(i32 %0)
%5 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @ft_putendl(i8* %1)
ret void
}
float GGX(float NdotV, float a) {
  float k = a * 0.5f;
  return NdotV / (NdotV * (1.0f - k) + k);
}


x86 assembly (clang, -O0):
<GGX>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xece(%rip),%xmm3
subss  -0xc(%rbp),%xmm3
movss  -0xc(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GGX>:
mulss  0xef8(%rip),%xmm1
movss  0xef4(%rip),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @GGX(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
%7 = fmul float %6, 5.000000e-01
store float %7, float* %5
%8 = load float, float* %3
%9 = load float, float* %3
%10 = load float, float* %5
%11 = fsub float 1.000000e+00, %10
%12 = load float, float* %5
%13 = call float @llvm.fmuladd.f32(float %9, float %11, float %12)
%14 = fdiv float %8, %13
ret float %14
}

LLVM IR (-O2):
define float @GGX(float %0, float %1) {
%3 = fmul float %1, 5.000000e-01
%4 = fsub float 1.000000e+00, %3
%5 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %3)
%6 = fdiv float %0, %5
ret float %6
}
/* Variables and functions */
int strlen(const char *str) {
  int l = 0;
  while (str[l] != '\0')
    l++;
  return l;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <strlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ a1(int);
int /*<<< orphan*/ b1(int);
int /*<<< orphan*/ c1(int);
int /*<<< orphan*/ d1(int);
int /*<<< orphan*/ d2(int);
int /*<<< orphan*/ d3(int);
int /*<<< orphan*/ d4(int);
int main(void) {
  a1(400);
  a1(400);
  a1(400);
  b1(400);
  c1(400);
  d1(400);
  d2(400);
  d3(400);
  d4(400);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1090 <b1@plt>
mov    $0x190,%edi
call   1060 <c1@plt>
mov    $0x190,%edi
call   1030 <d1@plt>
mov    $0x190,%edi
call   1070 <d2@plt>
mov    $0x190,%edi
call   1040 <d3@plt>
mov    $0x190,%edi
call   1080 <d4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1050 <a1@plt>
mov    $0x190,%edi
call   1090 <b1@plt>
mov    $0x190,%edi
call   1060 <c1@plt>
mov    $0x190,%edi
call   1030 <d1@plt>
mov    $0x190,%edi
call   1070 <d2@plt>
mov    $0x190,%edi
call   1040 <d3@plt>
mov    $0x190,%edi
call   1080 <d4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @a1(i32 400)
%3 = call i32 @a1(i32 400)
%4 = call i32 @a1(i32 400)
%5 = call i32 @b1(i32 400)
%6 = call i32 @c1(i32 400)
%7 = call i32 @d1(i32 400)
%8 = call i32 @d2(i32 400)
%9 = call i32 @d3(i32 400)
%10 = call i32 @d4(i32 400)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @a1(i32 400)
%2 = tail call i32 @a1(i32 400)
%3 = tail call i32 @a1(i32 400)
%4 = tail call i32 @b1(i32 400)
%5 = tail call i32 @c1(i32 400)
%6 = tail call i32 @d1(i32 400)
%7 = tail call i32 @d2(i32 400)
%8 = tail call i32 @d3(i32 400)
%9 = tail call i32 @d4(i32 400)
ret i32 0
}
/* Type definitions */
struct S {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ foo(struct S *);
void __attribute__((no)) bar_2(struct S *p) { foo(p); }


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

x86 assembly (clang, -O2):
<bar_2>:
jmp    1030 <foo@plt>

LLVM IR (-O0):
%struct.S = type { i32 }
define void @bar_2(%struct.S* %0) {
%2 = alloca %struct.S*
store %struct.S* %0, %struct.S** %2
%3 = load %struct.S*, %struct.S** %2
%4 = call i32 @foo(%struct.S* %3)
ret void
}

LLVM IR (-O2):
%struct.S = type { i32 }
define void @bar_2(%struct.S* %0) {
%2 = tail call i32 @foo(%struct.S* %0)
ret void
}
int _isalpha(int c) {
  if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     111b <_isalpha+0x1b>
cmpl   $0x5a,-0x8(%rbp)
jle    112f <_isalpha+0x2f>
cmpl   $0x61,-0x8(%rbp)
jl     113b <_isalpha+0x3b>
cmpl   $0x7a,-0x8(%rbp)
jg     113b <_isalpha+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <_isalpha+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %15, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 122
br i1 %14, label %15, label %16
15: ; preds = %12, %6
store i32 1, i32* %2
br label %17
16: ; preds = %12, %9
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int __statfs64(char const *, int, struct statfs *);
int statfs(const char *path, struct statfs *stat) {
  return __statfs64(path, sizeof(struct statfs), stat);
}


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

x86 assembly (clang, -O2):
<statfs>:
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <__statfs64@plt>

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

LLVM IR (-O2):
%struct.statfs = type { i32 }
define i32 @statfs(i8* %0, %struct.statfs* %1) {
%3 = tail call i32 @__statfs64(i8* %0, i32 4, %struct.statfs* %1)
ret i32 %3
}
unsigned xrop3_40_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk1 = D & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_40_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_40_1_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %eax,%ecx
mov    %esi,%eax
xor    %dil,%al
movzbl %al,%eax
not    %ecx
and    %eax,%ecx
or     %dil,%sil
movzbl %sil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_40_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = xor i32 %29, -1
%31 = and i32 %28, %30
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %7
%41 = and i32 %39, %40
%42 = or i32 %38, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_40_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i8 %1, %0
%8 = zext i8 %7 to i32
%9 = or i32 %6, %4
%10 = xor i32 %9, -1
%11 = and i32 %10, %8
%12 = or i8 %1, %0
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_usec_to_bytes_round_up() {
  printf("NOT IMPLEMENTED:"
         "pa_usec_to_bytes_round_up"
         "\n");
}


x86 assembly (clang, -O0):
<pa_usec_to_bytes_round_up>:
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_usec_to_bytes_round_up>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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


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

x86 assembly (clang, -O2):
<testBlocking>:
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @testBlocking(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sleep(i32 %3)
ret void
}

LLVM IR (-O2):
define void @testBlocking(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
double ls_costN_nm9_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<ls_costN_nm9_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm9_sq>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @ls_costN_nm9_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 "
         "CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=śro, "
         "19 cze 2013, 20:21:50 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 "
         "USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 "
         "USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= "
         "MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y";
}


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

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

LLVM IR (-O0):
@.str = [475 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=\C5\9Bro, 19 cze 2013, 20:21:50 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([475 x i8], [475 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [475 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=\C5\9Bro, 19 cze 2013, 20:21:50 CEST BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([475 x i8], [475 x i8]* @.str, i64 0, i64 0)
}
void found(void) {}


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

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

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

LLVM IR (-O2):
define void @found() {
ret void
}
int plt_sockStartup() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @plt_sockStartup() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int _mm_extract_epi8(int /*<<< orphan*/, int);
int __mm_extract_epi8(__m128i A, int const I) { return _mm_extract_epi8(A, 1); }


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

x86 assembly (clang, -O2):
<__mm_extract_epi8>:
mov    $0x1,%esi
jmp    1030 <_mm_extract_epi8@plt>

LLVM IR (-O0):
define i32 @__mm_extract_epi8(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 @_mm_extract_epi8(i32 %5, i32 1)
ret i32 %6
}

LLVM IR (-O2):
define i32 @__mm_extract_epi8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_extract_epi8(i32 %0, i32 1)
ret i32 %3
}
int frag_hack2(int x, int y, int foo) {
  x += foo * 5;
  x /= 4;
  y /= 4;
  return (x ^ y);
}


x86 assembly (clang, -O0):
<frag_hack2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x5,-0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frag_hack2>:
lea    (%rdx,%rdx,4),%eax
lea    (%rdi,%rax,1),%ecx
add    $0x3,%ecx
add    %edi,%eax
cmovns %eax,%ecx
lea    0x3(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
xor    %ecx,%eax
sar    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @frag_hack2(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, 5
%5 = add nsw i32 %4, %0
%6 = sdiv i32 %5, 4
%7 = sdiv i32 %1, 4
%8 = xor i32 %6, %7
ret i32 %8
}
double f4_cb_send_two_short(double (*cb)(short, short)) {
  short r1 = -22;
  short r2 = -22;
  return cb(r1, r2) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_two_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0xffea,-0xa(%rbp)
movw   $0xffea,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
movswl %cx,%edi
movswl -0xc(%rbp),%esi
call   *%rax
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_two_short>:
push   %rax
mov    %rdi,%rax
mov    $0xffffffea,%edi
mov    $0xffffffea,%esi
call   *%rax
addsd  0xee8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_two_short(double (i16, i16)* %0) {
%2 = alloca double (i16, i16)*
%3 = alloca i16
%4 = alloca i16
store double (i16, i16)* %0, double (i16, i16)** %2
store i16 -22, i16* %3
store i16 -22, i16* %4
%5 = load double (i16, i16)*, double (i16, i16)** %2
%6 = load i16, i16* %3
%7 = load i16, i16* %4
%8 = call double %5(i16 signext %6, i16 signext %7)
%9 = fadd double %8, 1.000000e+00
ret double %9
}

LLVM IR (-O2):
define double @f4_cb_send_two_short(double (i16, i16)* nocapture %0) {
%2 = tail call double %0(i16 signext -22, i16 signext -22)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_solve_start_system(int k, int *mv) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(102, &k, mv, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_solve_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x66,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_solve_start_system>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x66,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @celcon_solve_start_system(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 102, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @celcon_solve_start_system(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 102, i32* %3, i32* %1, double* undef)
ret i32 %4
}
int mii(int (*func)(int argument), int argument) { return func(argument); }


x86 assembly (clang, -O0):
<mii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mii>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @mii(i32 (i32)* nocapture %0, i32 %1) {
%3 = tail call i32 %0(i32 %1)
ret i32 %3
}
void phyUartDebug_init() {}


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

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

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

LLVM IR (-O2):
define void @phyUartDebug_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *matriz[2][2];
  char string1[] = "Minha string";
  matriz[0][0] = string1;
  printf("%s", matriz[0][0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x2d(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xeda(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x2d(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x676e6972747320,%rax
mov    %rax,0xd(%rsp)
movabs $0x74732061686e694d,%rax
20 73 74
mov    %rax,0x8(%rsp)
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.string1 = [13 x i8] c"Minha string\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [2 x [2 x i8*]]
%2 = alloca [13 x i8]
%3 = bitcast [13 x i8]* %2 to i8*
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2 x [2 x i8*]], [2 x [2 x i8*]]* %1, i64 0, i64 0
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
store i8* %4, i8** %6
%7 = getelementptr inbounds [2 x [2 x i8*]], [2 x [2 x i8*]]* %1, i64 0, i64 0
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string1 = [13 x i8] c"Minha string\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void write_flashram_dummyh() {}


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

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

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

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

/* Variables and functions */
void TimerCcpCombineDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000FB4))) &= ~(0x00000001);
}


x86 assembly (clang, -O0):
<TimerCcpCombineDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xfb4(%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0xfb4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerCcpCombineDisable>:
andq   $0xfffffffffffffffe,0xfb4(%rdi)
fe
ret

LLVM IR (-O0):
define void @TimerCcpCombineDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 4020
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @TimerCcpCombineDisable(i64 %0) {
%2 = add nsw i64 %0, 4020
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -2
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_read(int, int, int);
int /*<<< orphan*/ i2c_write(int, int, int, int /*<<< orphan*/);
void main(void) {
  i2c_write(1, 0x68, 0x6b, 0);
  i2c_read(1, 0x68, 0x43);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x68,%esi
mov    $0x6b,%edx
xor    %ecx,%ecx
call   1040 <i2c_write@plt>
mov    $0x1,%edi
mov    $0x68,%esi
mov    $0x43,%edx
call   1030 <i2c_read@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x68,%esi
mov    $0x6b,%edx
xor    %ecx,%ecx
call   1040 <i2c_write@plt>
mov    $0x1,%edi
mov    $0x68,%esi
mov    $0x43,%edx
pop    %rax
jmp    1030 <i2c_read@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @i2c_write(i32 1, i32 104, i32 107, i32 0)
%2 = call i32 @i2c_read(i32 1, i32 104, i32 67)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @i2c_write(i32 1, i32 104, i32 107, i32 0)
%2 = tail call i32 @i2c_read(i32 1, i32 104, i32 67)
ret void
}
/* Type definitions */
struct set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct set *);
void set_free(struct set *S) { free(S); }


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

x86 assembly (clang, -O2):
<set_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.set = type { i32 }
define void @set_free(%struct.set* %0) {
%2 = alloca %struct.set*
store %struct.set* %0, %struct.set** %2
%3 = load %struct.set*, %struct.set** %2
%4 = call i32 @free(%struct.set* %3)
ret void
}

LLVM IR (-O2):
%struct.set = type { i32 }
define void @set_free(%struct.set* nocapture %0) {
%2 = tail call i32 @free(%struct.set* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ foo(int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void bar() {
  uint64_t i = 42;
  foo(&i, 1337);
  puts("bar");
  printf("%lu\n", i);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2a,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x539,%esi
call   1050 <foo@plt>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
movl   $0x2a,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x539,%esi
call   1050 <foo@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"bar\00"
@.str.1 = [5 x i8] c"%lu\0A\00"
define void @bar() {
%1 = alloca i32
store i32 42, i32* %1
%2 = call i32 @foo(i32* %1, i32 1337)
%3 = call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"bar\00"
@.str.1 = [5 x i8] c"%lu\0A\00"
define void @bar() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 @foo(i32* %1, i32 1337)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void dieIfOutOfMemory(void *pointer) {
  if (pointer == NULL) {
    printf("Error: Out of memory\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<dieIfOutOfMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114d <dieIfOutOfMemory+0x2d>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dieIfOutOfMemory>:
test   %rdi,%rdi
je     1126 <dieIfOutOfMemory+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Error: Out of memory\0A\00"
define void @dieIfOutOfMemory(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Error: Out of memory\00"
define void @dieIfOutOfMemory(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int save_ssl_certificate_at_path(char *, char *);
int main() {
  return save_ssl_certificate_at_path("ssl://test.mosquitto.org:8884",
                                      "/Users/kass/Desktop/filename.crt");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"ssl://test.mosquitto.org:8884\00"
@.str.1 = [33 x i8] c"/Users/kass/Desktop/filename.crt\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @save_ssl_certificate_at_path(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [30 x i8] c"ssl://test.mosquitto.org:8884\00"
@.str.1 = [33 x i8] c"/Users/kass/Desktop/filename.crt\00"
define i32 @main() {
%1 = tail call i32 @save_ssl_certificate_at_path(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 %1
}
char *opf_addrfrom_addr(char *buf) { return buf + 8; }


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

x86 assembly (clang, -O2):
<opf_addrfrom_addr>:
lea    0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @opf_addrfrom_addr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
ret i8* %4
}

LLVM IR (-O2):
define i8* @opf_addrfrom_addr(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
ret i8* %2
}
/* Variables and functions */
unsigned int *tls_get_buckets();
int *__tls_errno() {
  unsigned int *bucket = tls_get_buckets();
  return (int *)bucket;
}


x86 assembly (clang, -O0):
<__tls_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <tls_get_buckets@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32* @__tls_errno() {
%1 = tail call i32* (...) @tls_get_buckets()
ret i32* %1
}
OP(fd, ce) {
  illegal_1();
  op_ce();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_ce@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_ce()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_ce()
ret i32 undef
}
void handle_TSTP(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_TSTP(i32 %0) {
ret void
}
void fake_logit(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @fake_logit(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
struct rb_root {
  int dummy;
};
struct rb_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ____rb_erase_color(struct rb_node *, struct rb_root *,
                                      void (*)(struct rb_node *,
                                               struct rb_node *));
void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
                      void (*augment_rotate)(struct rb_node *old,
                                             struct rb_node *_new)) {
  ____rb_erase_color(parent, root, augment_rotate);
}


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

x86 assembly (clang, -O2):
<__rb_erase_color>:
jmp    1030 <____rb_erase_color@plt>

LLVM IR (-O0):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @__rb_erase_color(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2) {
%4 = alloca %struct.rb_node*
%5 = alloca %struct.rb_root*
%6 = alloca void (%struct.rb_node*, %struct.rb_node*)*
store %struct.rb_node* %0, %struct.rb_node** %4
store %struct.rb_root* %1, %struct.rb_root** %5
store void (%struct.rb_node*, %struct.rb_node*)* %2, void (%struct.rb_node*, %struct.rb_node*)** %6
%7 = load %struct.rb_node*, %struct.rb_node** %4
%8 = load %struct.rb_root*, %struct.rb_root** %5
%9 = load void (%struct.rb_node*, %struct.rb_node*)*, void (%struct.rb_node*, %struct.rb_node*)** %6
%10 = call i32 @____rb_erase_color(%struct.rb_node* %7, %struct.rb_root* %8, void (%struct.rb_node*, %struct.rb_node*)* %9)
ret void
}

LLVM IR (-O2):
%struct.rb_node = type { i32 }
%struct.rb_root = type { i32 }
define void @__rb_erase_color(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2) {
%4 = tail call i32 @____rb_erase_color(%struct.rb_node* %0, %struct.rb_root* %1, void (%struct.rb_node*, %struct.rb_node*)* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_complex_iteration_decrease();
int /*<<< orphan*/ test_complex_iteration_increase();
int /*<<< orphan*/ test_mute_condition();
int /*<<< orphan*/ test_simple_iteration_condition();
void execute_tests() {
  test_mute_condition();
  test_simple_iteration_condition();
  test_complex_iteration_increase();
  test_complex_iteration_decrease();
}


x86 assembly (clang, -O0):
<execute_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_mute_condition@plt>
mov    $0x0,%al
call   1060 <test_simple_iteration_condition@plt>
mov    $0x0,%al
call   1050 <test_complex_iteration_increase@plt>
mov    $0x0,%al
call   1030 <test_complex_iteration_decrease@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_tests>:
push   %rax
xor    %eax,%eax
call   1040 <test_mute_condition@plt>
xor    %eax,%eax
call   1060 <test_simple_iteration_condition@plt>
xor    %eax,%eax
call   1050 <test_complex_iteration_increase@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_complex_iteration_decrease@plt>

LLVM IR (-O0):
define void @execute_tests() {
%1 = call i32 (...) @test_mute_condition()
%2 = call i32 (...) @test_simple_iteration_condition()
%3 = call i32 (...) @test_complex_iteration_increase()
%4 = call i32 (...) @test_complex_iteration_decrease()
ret void
}

LLVM IR (-O2):
define void @execute_tests() {
%1 = tail call i32 (...) @test_mute_condition()
%2 = tail call i32 (...) @test_simple_iteration_condition()
%3 = tail call i32 (...) @test_complex_iteration_increase()
%4 = tail call i32 (...) @test_complex_iteration_decrease()
ret void
}
void RTEnvUnsetEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTEnvUnsetEx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
hidden() { printf("This function is never called!\n"); }


x86 assembly (clang, -O0):
<hidden>:
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):
<hidden>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"This function is never called!\0A\00"
define i32 @hidden() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"This function is never called!\00"
define i32 @hidden() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}