xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strcpy(char *dest, const char *src) {
  size_t i = 0;
  while (*src)
    dest[i++] = *src++;
  dest[i] = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <strcpy+0x4d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x18(%rbp)
mov    %dl,(%rax,%rcx,1)
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1128 <strcpy+0x28>
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
lea    0x1(%rdi),%rdx
mov    %cl,(%rax,%rdi,1)
movzbl 0x1(%rsi,%rdi,1),%ecx
mov    %rdx,%rdi
test   %cl,%cl
jne    1110 <strcpy+0x10>
movb   $0x0,(%rax,%rdx,1)
ret
xor    %edx,%edx
movb   $0x0,(%rax,%rdx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i64 [ %10, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = add i64 %7, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %11
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i64 [ 0, %2 ], [ %10, %5 ]
%16 = getelementptr inbounds i8, i8* %0, i64 %15
store i8 0, i8* %16
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ insert_sort(int *, int);
int main(int argc, char **argv) {
  int array[] = {1, 4, 8, 3, 6, -1, 10, 0, -11, 11, -8, -5, 9};
  int len = sizeof(array) / sizeof(array[0]);
  insert_sort(array, len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x34,%edx
call   1030 <memcpy@plt>
movl   $0xd,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1040 <insert_sort@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf16(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xd,%esi
call   1030 <insert_sort@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [13 x i32] [i32 1, i32 4, i32 8, i32 3, i32 6, i32 -1, i32 10, i32 0, i32 -11, i32 11, i32 -8, i32 -5, i32 9]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [13 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [13 x i32]* %6 to i8*
store i32 13, i32* %7
%9 = getelementptr inbounds [13 x i32], [13 x i32]* %6, i64 0, i64 0
%10 = load i32, i32* %7
%11 = call i32 @insert_sort(i32* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [13 x i32] [i32 1, i32 4, i32 8, i32 3, i32 6, i32 -1, i32 10, i32 0, i32 -11, i32 11, i32 -8, i32 -5, i32 9]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x i32]
%4 = bitcast [13 x i32]* %3 to i8*
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 0
%6 = call i32 @insert_sort(i32* %5, i32 13)
ret i32 0
}
int PyMPELog_NewEvent(int commID, const char name[], const char color[],
                      const char format[], int eventID[1]) {
  int ierr = 0;
  return ierr;
}


x86 assembly (clang, -O0):
<PyMPELog_NewEvent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @PyMPELog_NewEvent(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i32* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
scalar_t__ _is_eof_char(char);
unsigned char _is_newline_char(char c) {
  return (c == '\r') || (c == '\n') || _is_eof_char(c);
}


x86 assembly (clang, -O0):
<_is_newline_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1155 <_is_newline_char+0x45>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1155 <_is_newline_char+0x45>
movsbl -0x1(%rbp),%edi
call   1030 <_is_eof_char@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_newline_char>:
mov    $0x1,%al
cmp    $0xa,%dil
je     111e <_is_newline_char+0xe>
cmp    $0xd,%dil
jne    111f <_is_newline_char+0xf>
ret
push   %rax
movsbl %dil,%edi
call   1030 <_is_eof_char@plt>
test   %rax,%rax
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define zeroext i8 @_is_newline_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 13
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call i64 @_is_eof_char(i8 signext %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @_is_newline_char(i8 signext %0) {
switch i8 %0, label %2 [
i8 13, label %6
i8 10, label %6
]
2: ; preds = %1
%3 = tail call i64 @_is_eof_char(i8 signext %0)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i8
br label %6
6: ; preds = %1, %1, %2
%7 = phi i8 [ 1, %1 ], [ %5, %2 ], [ 1, %1 ]
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dumpAddr(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ fun2(int /*<<< orphan*/ *);
void fun1(FILE *p) {
  int f1;
  dumpAddr(p, "&f1", &f1);
  fun2(p);
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <dumpAddr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fun2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xed1(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1040 <dumpAddr@plt>
mov    %rbx,%rdi
call   1030 <fun2@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"&f1\00"
define void @fun1(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @dumpAddr(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32*, i32** %2
%7 = call i32 @fun2(i32* %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"&f1\00"
define void @fun1(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @dumpAddr(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 @fun2(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
void print_bits(unsigned long n) {
  int i;
  for (i = 64 - 1; i >= 0; i--) {
    printf("%lu", (n >> i) & 1);
  }
}


x86 assembly (clang, -O0):
<print_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3f,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1157 <print_bits+0x47>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
shr    %cl,%rsi
and    $0x1,%rsi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_bits+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bits>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0x3f,%ebx
lea    0xedc(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rsi
mov    %ebx,%ecx
shr    %cl,%rsi
and    $0x1,%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
jb     1130 <print_bits+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
define void @print_bits(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 63, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i64, i64* %2
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = lshr i64 %8, %10
%12 = and i64 %11, 1
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define void @print_bits(i64 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 63, %1 ], [ %7, %2 ]
%4 = lshr i64 %0, %3
%5 = and i64 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = add nsw i64 %3, -1
%8 = icmp eq i64 %3, 0
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void mtime_s(struct timeval *tvs) { gettimeofday(&*tvs, NULL); }


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

x86 assembly (clang, -O2):
<mtime_s>:
xor    %esi,%esi
jmp    1030 <gettimeofday@plt>

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

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @mtime_s(%struct.timeval* nocapture %0) {
%2 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, i, k;
  scanf("%d", &a);
  k = a;
  for (i = 0; i < 2; i++) {
    a = a * k;
    printf("%d\n", a);
  }
  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
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    117d <main+0x5d>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <main+0x2c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
mov    %esi,0x4(%rsp)
lea    0xeba(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
imul   0x4(%rsp),%ebx
mov    %ebx,0x4(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
store i32 %6, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %16, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %4
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %7
19: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
store i32 %5, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %4
store i32 %8, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ intercambia(int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 5;
  int b = 0;
  printf("Antes del cambio %d\n", a);
  intercambia(&a, &b);
  printf("Despues del cambio %d\n", a);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <intercambia@plt>
mov    -0x8(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,(%rsp)
movl   $0x0,0x4(%rsp)
lea    0xeb9(%rip),%rdi
mov    $0x5,%esi
call   1040 <printf@plt>
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
call   1030 <intercambia@plt>
mov    (%rsp),%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Antes del cambio %d\0A\00"
@.str.1 = [23 x i8] c"Despues del cambio %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @intercambia(i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"Antes del cambio %d\0A\00"
@.str.1 = [23 x i8] c"Despues del cambio %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = call i32 @intercambia(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @exit(i32 0)
unreachable
}
int _isblank(int ch) { return ch == ' ' || ch == '\t'; }


x86 assembly (clang, -O0):
<_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <_isblank+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @_isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_set_prop_int_array() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_set_prop_int_array"
         "\n");
}


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

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

LLVM IR (-O2):
@str = [50 x i8] c"NOT IMPLEMENTED:pa_format_info_set_prop_int_array\00"
define i32 @pa_format_info_set_prop_int_array() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ strtod(char *, char **);
char *getflt(char *ch, float *val) {
  char *pos;
  *val = (float)strtod(ch, &pos);
  if (pos == ch) {
    return NULL;
  } else {
    return pos;
  }
}


x86 assembly (clang, -O0):
<getflt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1155 <getflt+0x45>
movq   $0x0,-0x8(%rbp)
jmp    115d <getflt+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getflt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%r14)
mov    (%rsp),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @getflt(i8* %0, float* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float*
%6 = alloca i8*
store i8* %0, i8** %4
store float* %1, float** %5
%7 = load i8*, i8** %4
%8 = call i64 @strtod(i8* %7, i8** %6)
%9 = sitofp i64 %8 to float
%10 = load float*, float** %5
store float %9, float* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %4
%13 = icmp eq i8* %11, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store i8* null, i8** %3
br label %17
15: ; preds = %2
%16 = load i8*, i8** %6
store i8* %16, i8** %3
br label %17
17: ; preds = %15, %14
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @getflt(i8* %0, float* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @strtod(i8* %0, i8** %3)
%6 = sitofp i64 %5 to float
store float %6, float* %1
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = select i1 %8, i8* null, i8* %7
ret i8* %9
}
int f() { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @f() {
ret i32 ptrtoint ([1 x i8]* @.str to i32)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @f() {
ret i32 ptrtoint ([1 x i8]* @.str to i32)
}
__attribute__((no, noclone)) short foo12(short arg) {
  short ret = 1;
  if (arg + 1 < ((!0) ? -(1L << (sizeof(char) * 8 - 1)) : 0) ||
      arg + 1 > ((!0) ? ((1L << (sizeof(char) * 8 - 1)) - 1)
                      : ((1L << (sizeof(char) * 8)) - 1)))
    return ret;
  arg = arg + 1;
  ret = (unsigned char)arg;
  return arg;
}


x86 assembly (clang, -O0):
<foo12>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cltq
cmp    $0xffffffffffffff80,%rax
jl     1137 <foo12+0x37>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
cltq
cmp    $0x7f,%rax
jle    1144 <foo12+0x44>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1162 <foo12+0x62>
movswl -0x4(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movzbl %al,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo12>:
lea    0x1(%rdi),%ecx
add    $0xffffff81,%edi
movzwl %di,%eax
cmp    $0xff00,%eax
mov    $0x1,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i16 @foo12(i16 signext %0) {
%2 = add i16 %0, 1
%3 = add i16 %0, -127
%4 = icmp ult i16 %3, -256
%5 = select i1 %4, i16 1, i16 %2
ret i16 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
FILE *open_file2() {
  FILE *out = NULL;
  out = fopen("epsg_inlined_extra.c", "wb");
  if (out == NULL) {
    fprintf(stderr,
            "ERROR: unable to open the \"epsg_inlined_extra.c\" output file\n");
    return NULL;
  }
  return out;
}


x86 assembly (clang, -O0):
<open_file2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
lea    0xec9(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1174 <open_file2+0x54>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    117c <open_file2+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file2>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <open_file2+0x31>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"epsg_inlined_extra.c\00"
@.str.1 = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.2 = [62 x i8] c"ERROR: unable to open the \22epsg_inlined_extra.c\22 output file\0A\00"
define i32* @open_file2() {
%1 = alloca i32*
%2 = alloca i32*
store i32* null, i32** %2
%3 = call i32* @fopen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
store i32* null, i32** %1
br label %11
9: ; preds = %0
%10 = load i32*, i32** %2
store i32* %10, i32** %1
br label %11
11: ; preds = %9, %6
%12 = load i32*, i32** %1
ret i32* %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"epsg_inlined_extra.c\00"
@.str.1 = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.2 = [62 x i8] c"ERROR: unable to open the \22epsg_inlined_extra.c\22 output file\0A\00"
define noalias i32* @open_file2() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %0, %3
ret i32* %1
}
void *drop(void *_set, const void *_element) {
  int *element = find(_set, _element);
  if (element) {
    *element = 10;
  }
  return element;
}


x86 assembly (clang, -O0):
<drop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <find@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <drop+0x3a>
mov    -0x18(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop>:
push   %rax
xor    %eax,%eax
call   1030 <find@plt>
cltq
test   %eax,%eax
je     1124 <drop+0x14>
movl   $0xa,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @drop(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @find to i32 (i8*, i8*, ...)*)(i8* %6, i8* %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32*, i32** %5
store i32 10, i32* %14
br label %15
15: ; preds = %13, %2
%16 = load i32*, i32** %5
%17 = bitcast i32* %16 to i8*
ret i8* %17
}

LLVM IR (-O2):
define i8* @drop(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @find to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = icmp eq i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = inttoptr i64 %4 to i32*
store i32 10, i32* %7
br label %8
8: ; preds = %6, %2
%9 = inttoptr i64 %4 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int main(int argc, char *argv[]) {
  pause();
  return 0;
}


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    $0x0,%al
call   1030 <pause@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pause()
ret i32 0
}
/* Variables and functions */
char *itoa(int);
int /*<<< orphan*/ output(char const *);
void klogInt(const char *description, unsigned int intval) {
  output(description);
  output(itoa((int)intval));
  output("\r\n");
}


x86 assembly (clang, -O0):
<klogInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <output@plt>
mov    -0xc(%rbp),%edi
call   1040 <itoa@plt>
mov    %rax,%rdi
call   1030 <output@plt>
lea    0xeb1(%rip),%rdi
call   1030 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<klogInt>:
push   %rbx
mov    %esi,%ebx
call   1030 <output@plt>
mov    %ebx,%edi
call   1040 <itoa@plt>
mov    %rax,%rdi
call   1030 <output@plt>
lea    0xec2(%rip),%rdi
pop    %rbx
jmp    1030 <output@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @klogInt(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 = call i32 @output(i8* %5)
%7 = load i32, i32* %4
%8 = call i8* @itoa(i32 %7)
%9 = call i32 @output(i8* %8)
%10 = call i32 @output(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @klogInt(i8* %0, i32 %1) {
%3 = tail call i32 @output(i8* %0)
%4 = tail call i8* @itoa(i32 %1)
%5 = tail call i32 @output(i8* %4)
%6 = tail call i32 @output(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
const char *sqlassieCopyright() { return "Copyright (C) 2011 Brandon Skari"; }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"Copyright (C) 2011 Brandon Skari\00"
define i8* @sqlassieCopyright() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [33 x i8] c"Copyright (C) 2011 Brandon Skari\00"
define i8* @sqlassieCopyright() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *program) {
  fprintf(stderr, "Usage: %s [-f] [-p port] [-P pidfile] devicename\n",
          program);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"Usage: %s [-f] [-p port] [-P pidfile] devicename\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *mapDelim(char *path) {
  char *s;
  for (s = path; *s; s++) {
    if (*s == '\\') {
      *s = '/';
    }
  }
  return path;
}


x86 assembly (clang, -O0):
<mapDelim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <mapDelim+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1134 <mapDelim+0x34>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
jmp    1139 <mapDelim+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <mapDelim+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapDelim>:
mov    %rdi,%rax
mov    %rdi,%rcx
jmp    1117 <mapDelim+0x17>
nopl   0x0(%rax,%rax,1)
movb   $0x2f,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x5c,%dl
je     1110 <mapDelim+0x10>
test   %dl,%dl
jne    1113 <mapDelim+0x13>
ret

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

LLVM IR (-O2):
define i8* @mapDelim(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 92, label %5
]
5: ; preds = %2
store i8 47, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret i8* %0
}
void psocWriteMemoryBarrier() { __asm__ __volatile__("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @psocWriteMemoryBarrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
long lrint(double x) {
  long r;
  __asm__("cvtsd2si %1, %0" : "=r"(r) : "x"(x));
  return r;
}


x86 assembly (clang, -O0):
<lrint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsd2si %xmm0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrint>:
cvtsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 asm "cvtsd2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(double %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = tail call i64 asm "cvtsd2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(double %0)
ret i64 %2
}
void regerror(msg) char *msg;
{ eprintf("regexp error: %s", msg); }


x86 assembly (clang, -O0):
<regerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <eprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regerror>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <eprintf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"regexp error: %s\00"
define void @regerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @eprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"regexp error: %s\00"
define void @regerror(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @eprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float log(int);
float cakma_log(int a, int b) { return log(b) / log(a); }


x86 assembly (clang, -O0):
<cakma_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <log@plt>
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cakma_log>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <log@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1030 <log@plt>
movss  0xc(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define float @cakma_log(i32 %0, i32 %1) {
%3 = tail call float @log(i32 %1)
%4 = tail call float @log(i32 %0)
%5 = fdiv float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void UnlockDeviceConfig(void) {
  SendChar((0XEE) & 0xFF);
  SendChar((0x08) & 0xFF);
  SendChar((0xA5) & 0xFF);
  SendChar((0x5A) & 0xFF);
  SendChar((0x5F) & 0xFF);
  SendChar((0xF5) & 0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<UnlockDeviceConfig>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x8,%edi
call   1030 <SendChar@plt>
mov    $0xa5,%edi
call   1030 <SendChar@plt>
mov    $0x5a,%edi
call   1030 <SendChar@plt>
mov    $0x5f,%edi
call   1030 <SendChar@plt>
mov    $0xf5,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnlockDeviceConfig>:
push   %rax
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x8,%edi
call   1030 <SendChar@plt>
mov    $0xa5,%edi
call   1030 <SendChar@plt>
mov    $0x5a,%edi
call   1030 <SendChar@plt>
mov    $0x5f,%edi
call   1030 <SendChar@plt>
mov    $0xf5,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @UnlockDeviceConfig() {
%1 = call i32 @SendChar(i32 238)
%2 = call i32 @SendChar(i32 8)
%3 = call i32 @SendChar(i32 165)
%4 = call i32 @SendChar(i32 90)
%5 = call i32 @SendChar(i32 95)
%6 = call i32 @SendChar(i32 245)
%7 = call i32 @SendChar(i32 255)
%8 = call i32 @SendChar(i32 252)
%9 = call i32 @SendChar(i32 255)
%10 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @UnlockDeviceConfig() {
%1 = tail call i32 @SendChar(i32 238)
%2 = tail call i32 @SendChar(i32 8)
%3 = tail call i32 @SendChar(i32 165)
%4 = tail call i32 @SendChar(i32 90)
%5 = tail call i32 @SendChar(i32 95)
%6 = tail call i32 @SendChar(i32 245)
%7 = tail call i32 @SendChar(i32 255)
%8 = tail call i32 @SendChar(i32 252)
%9 = tail call i32 @SendChar(i32 255)
%10 = tail call i32 @SendChar(i32 255)
ret void
}
void ext2fs_fast_set_bit(unsigned int nr, void *addr) {
  unsigned char *ADDR = (unsigned char *)addr;
  ADDR += nr >> 3;
  *ADDR |= (1 << (nr & 0x07));
}


x86 assembly (clang, -O0):
<ext2fs_fast_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x3,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_fast_set_bit>:
mov    %edi,%ecx
mov    %edi,%eax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
shr    $0x3,%rax
or     %dl,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @ext2fs_fast_set_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
%7 = load i32, i32* %3
%8 = lshr i32 %7, 3
%9 = load i8*, i8** %5
%10 = zext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %5
%12 = load i32, i32* %3
%13 = and i32 %12, 7
%14 = shl i32 1, %13
%15 = load i8*, i8** %5
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %17, %14
%19 = trunc i32 %18 to i8
store i8 %19, i8* %15
ret void
}

LLVM IR (-O2):
define void @ext2fs_fast_set_bit(i32 %0, i8* nocapture %1) {
%3 = lshr i32 %0, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = and i32 %0, 7
%7 = shl nuw nsw i32 1, %6
%8 = load i8, i8* %5
%9 = trunc i32 %7 to i8
%10 = or i8 %8, %9
store i8 %10, i8* %5
ret void
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
  scalar_t__ sa_flags;
  int /*<<< orphan*/ sa_mask;
};

/* Variables and functions */
int sigaction(int, struct sigaction *, struct sigaction *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void main_signal_set(int signo, void (*func)(int)) {
  int ret;
  struct sigaction sig;
  struct sigaction osig;
  sig.sa_handler = func;
  sigemptyset(&sig.sa_mask);
  sig.sa_flags = 0;
  ret = sigaction(signo, &sig, &osig);
}


x86 assembly (clang, -O0):
<main_signal_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
add    $0x10,%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1030 <sigaction@plt>
mov    %eax,-0x14(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_signal_set>:
push   %rbx
sub    $0x30,%rsp
mov    %edi,%ebx
mov    %rsi,(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,0x8(%rsp)
mov    %rsp,%rsi
lea    0x18(%rsp),%rdx
mov    %ebx,%edi
call   1030 <sigaction@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)*, i64, i32 }
define void @main_signal_set(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca i32
%6 = alloca %struct.sigaction
%7 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%8 = load void (i32)*, void (i32)** %4
%9 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %6, i32 0, i32 0
store void (i32)* %8, void (i32)** %9
%10 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %6, i32 0, i32 2
%11 = call i32 @sigemptyset(i32* %10)
%12 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %6, i32 0, i32 1
store i64 0, i64* %12
%13 = load i32, i32* %3
%14 = call i32 @sigaction(i32 %13, %struct.sigaction* %6, %struct.sigaction* %7)
store i32 %14, i32* %5
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)*, i64, i32 }
define void @main_signal_set(i32 %0, void (i32)* %1) {
%3 = alloca %struct.sigaction
%4 = alloca %struct.sigaction
%5 = bitcast %struct.sigaction* %3 to i8*
%6 = bitcast %struct.sigaction* %4 to i8*
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (i32)* %1, void (i32)** %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 2
%9 = call i32 @sigemptyset(i32* %8)
%10 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
store i64 0, i64* %10
%11 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, %struct.sigaction* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmove_bca_2a3t_b();
int /*<<< orphan*/ gmove_bca_2a3t_b2_subcomm();
int /*<<< orphan*/ gmove_bca_3a3t_b();
int /*<<< orphan*/ gmove_bca_3a3t_b2();
int /*<<< orphan*/ gmove_bca_3a3t_b_s();
int /*<<< orphan*/ gmove_bca_3a4t_b();
int main() {
  gmove_bca_2a3t_b2_subcomm();
  gmove_bca_2a3t_b();
  gmove_bca_3a3t_b2();
  gmove_bca_3a3t_b();
  gmove_bca_3a3t_b_s();
  gmove_bca_3a4t_b();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <gmove_bca_2a3t_b2_subcomm@plt>
mov    $0x0,%al
call   1030 <gmove_bca_2a3t_b@plt>
mov    $0x0,%al
call   1080 <gmove_bca_3a3t_b2@plt>
mov    $0x0,%al
call   1050 <gmove_bca_3a3t_b@plt>
mov    $0x0,%al
call   1040 <gmove_bca_3a3t_b_s@plt>
mov    $0x0,%al
call   1070 <gmove_bca_3a4t_b@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <gmove_bca_2a3t_b2_subcomm@plt>
xor    %eax,%eax
call   1030 <gmove_bca_2a3t_b@plt>
xor    %eax,%eax
call   1080 <gmove_bca_3a3t_b2@plt>
xor    %eax,%eax
call   1050 <gmove_bca_3a3t_b@plt>
xor    %eax,%eax
call   1040 <gmove_bca_3a3t_b_s@plt>
xor    %eax,%eax
call   1070 <gmove_bca_3a4t_b@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @gmove_bca_2a3t_b2_subcomm()
%3 = call i32 (...) @gmove_bca_2a3t_b()
%4 = call i32 (...) @gmove_bca_3a3t_b2()
%5 = call i32 (...) @gmove_bca_3a3t_b()
%6 = call i32 (...) @gmove_bca_3a3t_b_s()
%7 = call i32 (...) @gmove_bca_3a4t_b()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @gmove_bca_2a3t_b2_subcomm()
%2 = tail call i32 (...) @gmove_bca_2a3t_b()
%3 = tail call i32 (...) @gmove_bca_3a3t_b2()
%4 = tail call i32 (...) @gmove_bca_3a3t_b()
%5 = tail call i32 (...) @gmove_bca_3a3t_b_s()
%6 = tail call i32 (...) @gmove_bca_3a4t_b()
ret i32 0
}
int change_drive(int drive) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @change_drive(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
__attribute__((always_, unused)) uint64_t ya_byteswap_u64(uint64_t v) {
  v = (v >> 32) | (v << 32);
  v = ((v & 0xFFFF0000FFFF0000LL) >> 16) | ((v & 0x0000FFFF0000FFFFLL) << 16);
  return ((v & 0xFF00FF00FF00FF00LL) >> 8) | ((v & 0x00FF00FF00FF00FFLL) << 8);
}


x86 assembly (clang, -O0):
<ya_byteswap_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffff0000ffff0000,%rcx
and    %rcx,%rax
shr    $0x10,%rax
movslq -0x4(%rbp),%rcx
movabs $0xffff0000ffff,%rdx
and    %rdx,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff00ff00ff00ff00,%rcx
and    %rcx,%rax
shr    $0x8,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00ff00ff00ff,%rdx
and    %rdx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ya_byteswap_u64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 32
%5 = load i32, i32* %2
%6 = shl i32 %5, 32
%7 = or i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = and i64 %9, -281470681808896
%11 = lshr i64 %10, 16
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = and i64 %13, 281470681808895
%15 = shl i64 %14, 16
%16 = or i64 %11, %15
%17 = trunc i64 %16 to i32
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = and i64 %19, -71777214294589696
%21 = lshr i64 %20, 8
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = and i64 %23, 71777214294589695
%25 = shl i64 %24, 8
%26 = or i64 %21, %25
%27 = trunc i64 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @ya_byteswap_u64(i32 %0) {
ret i32 poison
}