xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int *, int);
const char *getPascalStr(uint8_t *buf) {
  static char str[258];
  int len = buf[0];
  memcpy(str, buf + 1, len);
  str[len] = 0;
  return str;
}


x86 assembly (clang, -O0):
<getPascalStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
add    $0x4,%rsi
mov    -0xc(%rbp),%edx
lea    0x2f09(%rip),%rdi
call   1030 <memcpy@plt>
movslq -0xc(%rbp),%rcx
lea    0x2ef9(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2eee(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPascalStr>:
push   %r14
push   %rbx
push   %rax
movslq (%rdi),%rbx
lea    0x4(%rdi),%rsi
lea    0x2f1e(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@getPascalStr.str = internal global [258 x i8] zeroinitializer
define i8* @getPascalStr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %3
%10 = call i32 @memcpy(i8* getelementptr inbounds ([258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 0), i32* %8, i32 %9)
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 %12
store i8 0, i8* %13
ret i8* getelementptr inbounds ([258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 0)
}

LLVM IR (-O2):
@getPascalStr.str = internal global [258 x i8] zeroinitializer
define i8* @getPascalStr(i32* %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = tail call i32 @memcpy(i8* getelementptr inbounds ([258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 0), i32* %3, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 %5
store i8 0, i8* %6
ret i8* getelementptr inbounds ([258 x i8], [258 x i8]* @getPascalStr.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int k, a, b;
  scanf("%d %d %d", &k, &a, &b);
  printf(k % (a + b) < a ? "Barb\n" : "Alex\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%ecx
lea    0xeb2(%rip),%rdi
lea    0xea5(%rip),%rax
cmp    %ecx,%edx
cmovl  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ecx
mov    0xc(%rsp),%esi
add    %ecx,%esi
cltd
idiv   %esi
cmp    %ecx,%edx
lea    0xeb0(%rip),%rax
lea    0xeaf(%rip),%rdi
cmovl  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [6 x i8] c"Barb\0A\00"
@.str.2 = [6 x i8] c"Alex\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = srem i32 %6, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
%13 = zext i1 %12 to i64
%14 = select i1 %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%15 = call i32 @printf(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [6 x i8] c"Barb\0A\00"
@.str.2 = [6 x i8] c"Alex\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, %9
%12 = srem i32 %8, %11
%13 = icmp slt i32 %12, %9
%14 = select i1 %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%15 = call i32 @printf(i8* dereferenceable(1) %14)
ret i32 0
}
float getBuddyBoxLocalMinSample(float bufferSample, float localMinSample) {
  return (bufferSample < localMinSample) ? bufferSample : localMinSample;
}


x86 assembly (clang, -O0):
<getBuddyBoxLocalMinSample>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <getBuddyBoxLocalMinSample+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <getBuddyBoxLocalMinSample+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBuddyBoxLocalMinSample>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @getBuddyBoxLocalMinSample(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @getBuddyBoxLocalMinSample(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int commands_main(int, char **);
int main(int argc, char **argv) { return commands_main(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <commands_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @commands_main(i32 %0, i8** %1)
ret i32 %3
}
int yajl_version(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @yajl_version() {
ret i32 1
}
int d1(int m) { return 28 + (m + (m / 8)) % 2 + 2 % m + 2 * (1 / m); }


x86 assembly (clang, -O0):
<d1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1c,%edx
mov    %edx,-0xc(%rbp)
mov    $0x2,%eax
cltd
idivl  -0x4(%rbp)
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d1>:
lea    0x7(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x3,%eax
add    %edi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
lea    0x1(%rdi),%ecx
lea    (%rdi,%rdi,1),%esi
xor    %edx,%edx
cmp    $0x3,%ecx
cmovae %edx,%esi
add    %eax,%esi
mov    $0x2,%eax
xor    %edx,%edx
idiv   %edi
lea    (%rdx,%rsi,1),%eax
add    $0x1c,%eax
ret

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

LLVM IR (-O2):
define i32 @d1(i32 %0) {
%2 = sdiv i32 %0, 8
%3 = add nsw i32 %2, %0
%4 = srem i32 %3, 2
%5 = add nsw i32 %4, 28
%6 = srem i32 2, %0
%7 = add i32 %0, 1
%8 = icmp ult i32 %7, 3
%9 = shl nsw i32 %0, 1
%10 = select i1 %8, i32 %9, i32 0
%11 = add i32 %5, %10
%12 = add i32 %11, %6
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void check(char *name, int parm) {
  printf("\nSDS");
  printf(" %s", name);
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\0ASDS\00"
@.str.1 = [4 x i8] c" %s\00"
define void @check(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0ASDS\00"
@.str.1 = [4 x i8] c" %s\00"
define void @check(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
struct tm *localtime(int /*<<< orphan*/ *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *actual_time() {
  time_t rawtime;
  struct tm *info;
  char *now_time;
  time(&rawtime);
  info = localtime(&rawtime);
  now_time = asctime(info);
  now_time[strlen(now_time) - 1] = '\0';
  return now_time;
}


x86 assembly (clang, -O0):
<actual_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
call   1060 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <asctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<actual_time>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1050 <asctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @actual_time() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = alloca i8*
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %5, %struct.tm** %2
%6 = load %struct.tm*, %struct.tm** %2
%7 = call i8* @asctime(%struct.tm* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = sub nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @actual_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i8* @asctime(%struct.tm* %4)
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
store i8 0, i8* %9
ret i8* %5
}
strcmp(s1, s2) char *s1, *s2;
{
  while (*s1 == *s2++)
    if (*s1++ == '\0')
      return (0);
  return (*s1 - *--s2);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1159 <strcmp+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <strcmp+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1178 <strcmp+0x78>
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
movsbl -0x1(%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <strcmp+0x27>
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %6 to i32
%15 = sext i8 %7 to i32
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *, int);
int main(int argc, char **argv) {
  printf("%s:%d",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/jhonatancasale/learning-c/refs/heads/"
         "master/conceitos/basicos/gerais/0x04_input_output/printf/examples/"
         "printf_as_debug.c",
         19);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x13,%edx
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x13,%edx
call   1030 <printf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s:%d\00"
@.str.1 = [211 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jhonatancasale/learning-c/refs/heads/master/conceitos/basicos/gerais/0x04_input_output/printf/examples/printf_as_debug.c\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([211 x i8], [211 x i8]* @.str.1, i64 0, i64 0), i32 19)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s:%d\00"
@.str.1 = [211 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jhonatancasale/learning-c/refs/heads/master/conceitos/basicos/gerais/0x04_input_output/printf/examples/printf_as_debug.c\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([211 x i8], [211 x i8]* @.str.1, i64 0, i64 0), i32 19)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mywd(char *);
int main() {
  char *buf = (char *)1;
  int local = 2;
  mywd(buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%eax
mov    %rax,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mywd@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mywd(i8* inttoptr (i64 1 to i8*))
ret i32 0
}
/* Variables and functions */
int max(int, int);
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int a = 201, b = 200;
  int maximum = max(a, b);
  printf("Maximum is %d\n", maximum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc9,-0x4(%rbp)
movl   $0xc8,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <max@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc9,%edi
mov    $0xc8,%esi
call   1040 <max@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Maximum is %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 201, i32* %1
store i32 200, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @max(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Maximum is %d\0A\00"
define void @main() {
%1 = tail call i32 @max(i32 201, i32 200)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void playSong(void) { system("aplay actualMusic.wav &"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"aplay actualMusic.wav &\00"
define void @playSong() {
%1 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"aplay actualMusic.wav &\00"
define void @playSong() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double const, double const);
void RosenbrockPrintIndividual(const double *param) {
  printf("(x, y) = (%lf, %lf)\n", param[0], param[1]);
}


x86 assembly (clang, -O0):
<RosenbrockPrintIndividual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RosenbrockPrintIndividual>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"(x, y) = (%lf, %lf)\0A\00"
define void @RosenbrockPrintIndividual(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %5, double %8)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"(x, y) = (%lf, %lf)\0A\00"
define void @RosenbrockPrintIndividual(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %2, double %4)
ret void
}
void XtMainLoop() {}


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

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

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

LLVM IR (-O2):
define void @XtMainLoop() {
ret void
}
void mod_follow_is_GPL_compatible() {}


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

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

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

LLVM IR (-O2):
define void @mod_follow_is_GPL_compatible() {
ret void
}
void test_goto3() {
  {
    int x = 0;
    int *ptr = &x;
    goto next;
  next:
    x = 3;
  }
}


x86 assembly (clang, -O0):
<test_goto3>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x3,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_goto3() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* %1, i32** %2
br label %3
3: ; preds = %0
store i32 3, i32* %1
ret void
}

LLVM IR (-O2):
define void @test_goto3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void special(int key, int x, int y) {
  switch (key) {
  default:
    break;
  }
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
jmp    1126 <special+0x16>
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @special(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* %4
switch i32 %7, label %8 [
]
8: ; preds = %3
br label %9
9: ; preds = %8
%10 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @glutPostRedisplay()
ret void
}
/* Variables and functions */
void *ERR_PTR(int error) { return (void *)(uintptr_t)error; }


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

x86 assembly (clang, -O2):
<ERR_PTR>:
movslq %edi,%rax
ret

LLVM IR (-O0):
define i8* @ERR_PTR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @ERR_PTR(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int g(int);
int main(int argc, char **argv) { return g(42); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x2a,%edi
jmp    1030 <g@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @g(i32 42)
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @g(i32 42)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x08() {
  Assert_real((isgraph(8) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              45, ("isgraph should be 0 for 0x08"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x08\00"
define void @t_isgraph_0x08() {
%1 = call i64 @isgraph(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x08\00"
define void @t_isgraph_0x08() {
%1 = tail call i64 @isgraph(i32 8)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 45, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int vrt_group_rebuild_thread_start(struct vrt_group *group) { return 0; }


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

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

LLVM IR (-O0):
%struct.vrt_group = type opaque
define i32 @vrt_group_rebuild_thread_start(%struct.vrt_group* %0) {
%2 = alloca %struct.vrt_group*
store %struct.vrt_group* %0, %struct.vrt_group** %2
ret i32 0
}

LLVM IR (-O2):
%struct.vrt_group = type opaque
define i32 @vrt_group_rebuild_thread_start(%struct.vrt_group* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *getenv(char *);
const char *path_listsdir() {
  char *listsdir_path;
  listsdir_path = getenv("CLSYNC_LISTS_PATH");
  if (listsdir_path == NULL)
    listsdir_path = "/tmp/.lrsync";
  return listsdir_path;
}


x86 assembly (clang, -O0):
<path_listsdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <path_listsdir+0x2e>
lea    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_listsdir>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xeeb(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"CLSYNC_LISTS_PATH\00"
@.str.1 = [13 x i8] c"/tmp/.lrsync\00"
define i8* @path_listsdir() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %6
6: ; preds = %5, %0
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [18 x i8] c"CLSYNC_LISTS_PATH\00"
@.str.1 = [13 x i8] c"/tmp/.lrsync\00"
define i8* @path_listsdir() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ CmdLineCursorMoveTop();
int /*<<< orphan*/ UARTPuts(char *, int);
int CmdLineCursorMoveBottom(void) {
  CmdLineCursorMoveTop();
  UARTPuts("\e[30B", -1);
  return 0;
}


x86 assembly (clang, -O0):
<CmdLineCursorMoveBottom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <CmdLineCursorMoveTop@plt>
lea    0xece(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <UARTPuts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdLineCursorMoveBottom>:
push   %rax
xor    %eax,%eax
call   1030 <CmdLineCursorMoveTop@plt>
lea    0xed1(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <UARTPuts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[30B\00"
define i32 @CmdLineCursorMoveBottom() {
%1 = call i32 (...) @CmdLineCursorMoveTop()
%2 = call i32 @UARTPuts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[30B\00"
define i32 @CmdLineCursorMoveBottom() {
%1 = tail call i32 (...) @CmdLineCursorMoveTop()
%2 = tail call i32 @UARTPuts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ c_fstr2hecmw_connect_conv(int, int *, int *, int *);
void FSTR2HECMW_CONNECT_CONV__(int *n_elem, int elem_type[],
                               int elem_node_index[], int elem_node_item[]) {
  c_fstr2hecmw_connect_conv(*n_elem, elem_type, elem_node_index,
                            elem_node_item);
}


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

x86 assembly (clang, -O2):
<FSTR2HECMW_CONNECT_CONV__>:
mov    (%rdi),%edi
jmp    1030 <c_fstr2hecmw_connect_conv@plt>

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

LLVM IR (-O2):
define void @FSTR2HECMW_CONNECT_CONV__(i32* nocapture %0, i32* %1, i32* %2, i32* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @c_fstr2hecmw_connect_conv(i32 %5, i32* %1, i32* %2, i32* %3)
ret void
}
/* Variables and functions */
double tanh(double);
double Double_tanh(double x) { return tanh(x); }


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

x86 assembly (clang, -O2):
<Double_tanh>:
jmp    1030 <tanh@plt>

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

LLVM IR (-O2):
define double @Double_tanh(double %0) {
%2 = tail call double @tanh(double %0)
ret double %2
}
int get_max(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<get_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <get_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <get_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_max(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 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int multi() {
  int a = 5;
  int b = 3;
  int c = a * b;
  return c;
}


x86 assembly (clang, -O0):
<multi>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @multi() {
ret i32 15
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t badvpn_read_be8(const char *c_ptr) {
  const uint8_t *ptr = (const uint8_t *)c_ptr;
  return ((uint8_t)ptr[0] << 0);
}


x86 assembly (clang, -O0):
<badvpn_read_be8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x0,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @badvpn_read_be8(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = shl i32 %8, 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @badvpn_read_be8(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
int finish(void *mem, int size) {
  munmap(mem, size);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @finish(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
ret i32 0
}
void i2d_PKCS7_ISSUER_AND_SERIAL(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_ISSUER_AND_SERIAL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_prctl;
int syscall2(int /*<<< orphan*/, int, unsigned long);
int sys_prctl(int option, unsigned long arg2) {
  return syscall2(SYS_prctl, option, arg2);
}


x86 assembly (clang, -O0):
<sys_prctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <syscall2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_prctl>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall2@plt>

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

LLVM IR (-O2):
@SYS_prctl = global i32 0
define i32 @sys_prctl(i32 %0, i64 %1) {
%3 = load i32, i32* @SYS_prctl
%4 = tail call i32 @syscall2(i32 %3, i32 %0, i64 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handler(int signo) { printf("received %d\n", signo); }


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

x86 assembly (clang, -O2):
<sig_handler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"received %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_int;
typedef scalar_t__ cl_command_queue;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clRetainCommandQueue(cl_command_queue command_queue) {
  unsigned int sys_args[1];
  sys_args[0] = (unsigned int)command_queue;
  return (cl_int)syscall(325, 1010, sys_args);
}


x86 assembly (clang, -O0):
<clRetainCommandQueue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdx
mov    $0x145,%edi
mov    $0x3f2,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clRetainCommandQueue>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x145,%edi
mov    $0x3f2,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clRetainCommandQueue(i64 %0) {
%2 = alloca i64
%3 = alloca [1 x i32]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%8 = call i32 @syscall(i32 325, i32 1010, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @clRetainCommandQueue(i64 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = trunc i64 %0 to i32
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 %4, i32* %5
%6 = call i32 @syscall(i32 325, i32 1010, i32* %5)
ret i32 %6
}
/* Type definitions */
struct network_status {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ network_accept(struct network_status *);
struct network_status *network_bind(int);
struct network_status *network_bind_and_accept(int port) {
  struct network_status *stat = network_bind(port);
  network_accept(stat);
  return stat;
}


x86 assembly (clang, -O0):
<network_bind_and_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <network_bind@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <network_accept@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<network_bind_and_accept>:
push   %rbx
call   1030 <network_bind@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <network_accept@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.network_status = type { i32 }
define %struct.network_status* @network_bind_and_accept(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.network_status*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.network_status* @network_bind(i32 %4)
store %struct.network_status* %5, %struct.network_status** %3
%6 = load %struct.network_status*, %struct.network_status** %3
%7 = call i32 @network_accept(%struct.network_status* %6)
%8 = load %struct.network_status*, %struct.network_status** %3
ret %struct.network_status* %8
}

LLVM IR (-O2):
%struct.network_status = type { i32 }
define %struct.network_status* @network_bind_and_accept(i32 %0) {
%2 = tail call %struct.network_status* @network_bind(i32 %0)
%3 = tail call i32 @network_accept(%struct.network_status* %2)
ret %struct.network_status* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int *);
int main() {
  int x = 42;
  printf("&x = %p\n", &x);
  assert(x == 42);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <printf@plt>
cmpl   $0x2a,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2a,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
cmpl   $0x2a,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"&x = %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 42
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"&x = %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret i32 0
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void loop_delay(int8_t multp) {
  int i, base = 2000000 * multp;
  for (i = 0; i < base; i++) {
    double value = 10.0;
    value += 1.0;
  }
}


x86 assembly (clang, -O0):
<loop_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x1e8480,-0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <loop_delay+0x51>
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec7(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <loop_delay+0x18>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @loop_delay(i32 %0) {
ret void
}
long jas_iccpowi(int x, int n) {
  long y;
  y = 1;
  while (--n >= 0)
    y *= x;
  return y;
}


x86 assembly (clang, -O0):
<jas_iccpowi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jl     1136 <jas_iccpowi+0x36>
movslq -0x4(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1112 <jas_iccpowi+0x12>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jas_iccpowi>:
test   %esi,%esi
jle    111b <jas_iccpowi+0x1b>
movslq %edi,%rcx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1121 <jas_iccpowi+0x21>
mov    $0x1,%eax
jmp    1155 <jas_iccpowi+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <jas_iccpowi+0x30>
test   %edx,%edx
je     1169 <jas_iccpowi+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <jas_iccpowi+0x60>
ret

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

LLVM IR (-O2):
define i64 @jas_iccpowi(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %34
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul nsw i64 %12, %5
%15 = mul nsw i64 %14, %5
%16 = mul nsw i64 %15, %5
%17 = mul nsw i64 %16, %5
%18 = mul nsw i64 %17, %5
%19 = mul nsw i64 %18, %5
%20 = mul nsw i64 %19, %5
%21 = mul nsw i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul nsw i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}