xunge/DecIR huggingface dataset:
void swap(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
  return;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *_realloc(void *ptr, size_t n) {
  if (n)
    return realloc(ptr, n);
  free(ptr);
  return NULL;
}


x86 assembly (clang, -O0):
<_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1151 <_realloc+0x31>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1162 <_realloc+0x42>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_realloc>:
test   %rsi,%rsi
je     112a <_realloc+0xa>
jmp    1040 <realloc@plt>
push   %rax
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @_realloc(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @realloc(i8* %0, i64 %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ null, %6 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ recoverableError(char *);
int /*<<< orphan*/ stderr;
void labelExhaustedError() {
  recoverableError("Maximun number of Labels reached");
  fprintf(stderr, "     The maximun number of labels are %d\n", 1000);
  exit(1);
}


x86 assembly (clang, -O0):
<labelExhaustedError>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <recoverableError@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
mov    $0x3e8,%edx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<labelExhaustedError>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <recoverableError@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x3e8,%edx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Maximun number of Labels reached\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c" The maximun number of labels are %d\0A\00"
define void @labelExhaustedError() {
%1 = call i32 @recoverableError(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 1000)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"Maximun number of Labels reached\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c" The maximun number of labels are %d\0A\00"
define void @labelExhaustedError() {
%1 = tail call i32 @recoverableError(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 1000)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned xrop3_64_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

x86 assembly (clang, -O2):
<xrop3_64_0_1>:
mov    %esi,%eax
and    %edi,%eax
shl    $0x8,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_64_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = and i8 %1, %0
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = xor i32 %3, -1
%9 = and i32 %8, %4
%10 = or i32 %7, %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ iswblank(int /*<<< orphan*/);
void uninitvar_iswblank(void) {
  wint_t i;
  (void)iswblank(i);
}


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

x86 assembly (clang, -O2):
<uninitvar_iswblank>:
jmp    1030 <iswblank@plt>

LLVM IR (-O0):
define void @uninitvar_iswblank() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @iswblank(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_iswblank() {
%1 = tail call i32 @iswblank(i32 undef)
ret void
}
/* Variables and functions */
int cw_string_is_valid(char const *);
int cw_check_string(const char *string) { return cw_string_is_valid(string); }


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

x86 assembly (clang, -O2):
<cw_check_string>:
jmp    1030 <cw_string_is_valid@plt>

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

LLVM IR (-O2):
define i32 @cw_check_string(i8* %0) {
%2 = tail call i32 @cw_string_is_valid(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ compilationEngine();
int /*<<< orphan*/ jackTokenizer();
void translateJackFile(void) {
  jackTokenizer();
  compilationEngine();
}


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

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

LLVM IR (-O0):
define void @translateJackFile() {
%1 = call i32 (...) @jackTokenizer()
%2 = call i32 (...) @compilationEngine()
ret void
}

LLVM IR (-O2):
define void @translateJackFile() {
%1 = tail call i32 (...) @jackTokenizer()
%2 = tail call i32 (...) @compilationEngine()
ret void
}
int __ocl_max_int_int(int src1, int src2) {
  return (src1 > src2) ? src1 : src2;
}


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

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

LLVM IR (-O0):
define i32 @__ocl_max_int_int(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 @__ocl_max_int_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *left_trimmed(const char *s) {
  const char *p;
  for (p = s; *p != 0 && isspace(*p); p++)
    ;
  return p;
}


x86 assembly (clang, -O0):
<left_trimmed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     114f <left_trimmed+0x3f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115f <left_trimmed+0x4f>
jmp    1175 <left_trimmed+0x65>
jmp    1164 <left_trimmed+0x54>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <left_trimmed+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<left_trimmed>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <left_trimmed+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <left_trimmed+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <left_trimmed+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @left_trimmed(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 = %18, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = call i64 @isspace(i8 signext %12)
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %21
17: ; preds = %15
br label %18
18: ; preds = %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %15
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @left_trimmed(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
const char *VigenereDecipher(const char *ciphertext, const char *key) {
  return "smth";
}


x86 assembly (clang, -O0):
<VigenereDecipher>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeed(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"smth\00"
define i8* @VigenereDecipher(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"smth\00"
define i8* @VigenereDecipher(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void print_version(void) {
  fprintf(stderr, ("sysstat version %s\n"), "8.1.5");
  fprintf(stderr, "(C) Sebastien Godard (sysstat <at> orange.fr)\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xed9(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_version>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
lea    0xedc(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"sysstat version %s\0A\00"
@.str.1 = [6 x i8] c"8.1.5\00"
@.str.2 = [47 x i8] c"(C) Sebastien Godard (sysstat <at> orange.fr)\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"sysstat version %s\0A\00"
@.str.1 = [6 x i8] c"8.1.5\00"
@.str.2 = [47 x i8] c"(C) Sebastien Godard (sysstat <at> orange.fr)\0A\00"
define void @print_version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
void ExttServerGroupGlueAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttServerGroupGlueAuxTable() {
ret void
}
float sum(float a, float b) {
  float c = a + b;
  return c;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @sum(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  fprintf(stderr, "LSD Error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"LSD Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"LSD Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int main() {
  void *p;
  p = malloc(1);
  if (p == NULL)
    return 1;
  free(p);
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <main+0x34>
movl   $0x1,-0x4(%rbp)
jmp    116d <main+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
mov    $0x1,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     114c <main+0x2c>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @free(i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
double d_cos_xx_8(double xx) {
  return 1 + xx * (-0.3084251375340424 +
                   xx * (0.01585433742711407 +
                         xx * (-0.0003259583464414167 +
                               xx * (3.539800057252972e-06))));
}


x86 assembly (clang, -O0):
<d_cos_xx_8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  0xef3(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xeef(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xecf(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb7(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_cos_xx_8>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @d_cos_xx_8(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %6, double 0x3ECDB1A9A9567BFF, double 0xBF355CAC70153DE0)
%8 = call double @llvm.fmuladd.f64(double %5, double %7, double 0x3F903C1E92FF2F42)
%9 = call double @llvm.fmuladd.f64(double %4, double %8, double 0xBFD3BD3CC9BE45DD)
%10 = call double @llvm.fmuladd.f64(double %3, double %9, double 1.000000e+00)
ret double %10
}

LLVM IR (-O2):
define double @d_cos_xx_8(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3ECDB1A9A9567BFF, double 0xBF355CAC70153DE0)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x3F903C1E92FF2F42)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0xBFD3BD3CC9BE45DD)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 1.000000e+00)
ret double %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t array_container_serialized_size_in_bytes(int32_t card) {
  return card * 2 + 2;
}


x86 assembly (clang, -O0):
<array_container_serialized_size_in_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_container_serialized_size_in_bytes>:
lea    (%rdi,%rdi,1),%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @array_container_serialized_size_in_bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = add nsw i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @array_container_serialized_size_in_bytes(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int open_rdwr(char *);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, size_t);
int execute_write() {
  int fd = open_rdwr("syscalls.txt");
  char *value = "Sample output text\n";
  size_t sizeOfValue = strlen(value) * sizeof(char);
  write(fd, value, sizeOfValue);
  return 0;
}


x86 assembly (clang, -O0):
<execute_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1050 <open_rdwr@plt>
mov    %eax,-0x4(%rbp)
lea    0xebf(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_write>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1050 <open_rdwr@plt>
mov    %eax,%ebx
lea    0xec4(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
movslq %eax,%rdx
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"syscalls.txt\00"
@.str.1 = [20 x i8] c"Sample output text\0A\00"
define i32 @execute_write() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
%4 = call i32 @open_rdwr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
store i64 %8, i64* %3
%9 = load i32, i32* %1
%10 = load i8*, i8** %2
%11 = load i64, i64* %3
%12 = call i32 @write(i32 %9, i8* %10, i64 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"syscalls.txt\00"
@.str.1 = [20 x i8] c"Sample output text\0A\00"
define i32 @execute_write() {
%1 = tail call i32 @open_rdwr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}
int test_imm_79uint16_reg(unsigned short val) {
  return ((val) & (0x79 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_79uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x79,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_79uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 121
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pinHigh(int);
int /*<<< orphan*/ pinModeIn(int);
int /*<<< orphan*/ pinModeOut(int);
int max31855_init(int sclk, int cs, int miso) {
  pinModeOut(cs);
  pinHigh(cs);
  pinModeOut(sclk);
  pinModeIn(miso);
}


x86 assembly (clang, -O0):
<max31855_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <pinModeOut@plt>
mov    -0xc(%rbp),%edi
call   1030 <pinHigh@plt>
mov    -0x8(%rbp),%edi
call   1040 <pinModeOut@plt>
mov    -0x10(%rbp),%edi
call   1050 <pinModeIn@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max31855_init>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <pinModeOut@plt>
mov    %ebp,%edi
call   1030 <pinHigh@plt>
mov    %ebx,%edi
call   1040 <pinModeOut@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <pinModeIn@plt>

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

LLVM IR (-O2):
define i32 @max31855_init(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pinModeOut(i32 %1)
%5 = tail call i32 @pinHigh(i32 %1)
%6 = tail call i32 @pinModeOut(i32 %0)
%7 = tail call i32 @pinModeIn(i32 %2)
ret i32 undef
}
/* Type definitions */
struct _2C02 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _2C02 *);
void ppu_2C02_free(struct _2C02 *ppu) { free(ppu); }


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

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

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

LLVM IR (-O2):
%struct._2C02 = type { i32 }
define void @ppu_2C02_free(%struct._2C02* nocapture %0) {
%2 = tail call i32 @free(%struct._2C02* %0)
ret void
}
/* Variables and functions */
int remove(char const *);
int dmfh_deleteFile(const char *filePath) { return remove(filePath); }


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

x86 assembly (clang, -O2):
<dmfh_deleteFile>:
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define i32 @dmfh_deleteFile(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t rotateL_fun_int16_t(int16_t x, int32_t i) {
  if ((i %= 16) == 0)
    return x;
  return (x << i) | ((0x7fff >> (15 - i)) & (x >> (16 - i)));
}


x86 assembly (clang, -O0):
<rotateL_fun_int16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateL_fun_int16_t+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <rotateL_fun_int16_t+0x5d>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    $0xf,%ecx
sub    -0xc(%rbp),%ecx
mov    $0x7fff,%edx
sar    %cl,%edx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x10,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    -0x10(%rbp),%ecx
and    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateL_fun_int16_t>:
mov    %edi,%eax
lea    0xf(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
and    $0xfffffff0,%ecx
sub    %ecx,%esi
je     112e <rotateL_fun_int16_t+0x2e>
mov    %eax,%edx
mov    %esi,%ecx
shl    %cl,%edx
mov    $0xf,%cl
sub    %sil,%cl
mov    $0x7fff,%edi
shr    %cl,%edi
mov    $0x10,%cl
sub    %sil,%cl
sar    %cl,%eax
and    %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rotateL_fun_int16_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 16
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %24
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = shl i32 %12, %13
%15 = load i32, i32* %5
%16 = sub nsw i32 15, %15
%17 = ashr i32 32767, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = sub nsw i32 16, %19
%21 = ashr i32 %18, %20
%22 = and i32 %17, %21
%23 = or i32 %14, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %11, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @rotateL_fun_int16_t(i32 %0, i32 %1) {
%3 = srem i32 %1, 16
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = shl i32 %0, %3
%7 = sub nsw i32 15, %3
%8 = lshr i32 32767, %7
%9 = sub nsw i32 16, %3
%10 = ashr i32 %0, %9
%11 = and i32 %8, %10
%12 = or i32 %11, %6
br label %13
13: ; preds = %2, %5
%14 = phi i32 [ %12, %5 ], [ %0, %2 ]
ret i32 %14
}
/* Variables and functions */
int EXIT_SUCCESS;
char *join_path(char const *, char const *);
int /*<<< orphan*/ printf(char *, char *);
int join_path_wrapper(char **av) {
  const char *base = av[2];
  const char *suffix = av[3];
  char *output;
  output = join_path(base, suffix);
  printf("%s\n", output);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<join_path_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <join_path@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_path_wrapper>:
push   %rax
mov    0x10(%rdi),%rax
mov    0x18(%rdi),%rsi
mov    %rax,%rdi
call   1040 <join_path@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @join_path_wrapper(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8** %0, i8*** %2
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 2
%8 = load i8*, i8** %7
store i8* %8, i8** %3
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 3
%11 = load i8*, i8** %10
store i8* %11, i8** %4
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i8* @join_path(i8* %12, i8* %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32, i32* @EXIT_SUCCESS
ret i32 %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @join_path_wrapper(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8*, i8** %0, i64 3
%5 = load i8*, i8** %4
%6 = tail call i8* @join_path(i8* %3, i8* %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
int function3(void) {
  static int i, state = 0;
  switch (state) {
  case 0:
    for (i = 0; i < 10; ++i) {
      state = 42 + 2;
      return i;
    case 44:;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<function3>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1e(%rip),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     112b <function3+0x2b>
jmp    111a <function3+0x1a>
mov    -0x8(%rbp),%eax
sub    $0x2c,%eax
je     115a <function3+0x5a>
jmp    1178 <function3+0x78>
movl   $0x0,0x2eef(%rip)
cmpl   $0xa,0x2ee8(%rip)
jge    1173 <function3+0x73>
movl   $0x2c,0x2edc(%rip)
mov    0x2ed2(%rip),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <function3+0x7f>
jmp    115f <function3+0x5f>
mov    0x2ebf(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eb6(%rip)
jmp    1135 <function3+0x35>
jmp    1178 <function3+0x78>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function3>:
mov    0x2f1e(%rip),%eax
add    $0x1,%eax
xor    %ecx,%ecx
cmpb   $0x0,0x2f16(%rip)
cmovne %eax,%ecx
mov    %ecx,0x2f09(%rip)
mov    $0xffffffff,%eax
cmp    $0x9,%ecx
jg     112e <function3+0x2e>
movb   $0x1,0x2efc(%rip)
mov    %ecx,%eax
ret

LLVM IR (-O0):
@function3.i = internal global i32 0
@function3.state = internal global i32 0
define i32 @function3() {
%1 = alloca i32
%2 = load i32, i32* @function3.state
switch i32 %2, label %14 [
i32 0, label %3
i32 44, label %9
]
3: ; preds = %0
store i32 0, i32* @function3.i
br label %4
4: ; preds = %10, %3
%5 = load i32, i32* @function3.i
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %4
store i32 44, i32* @function3.state
%8 = load i32, i32* @function3.i
store i32 %8, i32* %1
br label %15
9: ; preds = %0
br label %10
10: ; preds = %9
%11 = load i32, i32* @function3.i
%12 = add nsw i32 %11, 1
store i32 %12, i32* @function3.i
br label %4
13: ; preds = %4
br label %14
14: ; preds = %13, %0
store i32 -1, i32* %1
br label %15
15: ; preds = %14, %7
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@function3.i = internal unnamed_addr global i32 0
@function3.state = internal unnamed_addr global i1 false
define i32 @function3() {
%1 = load i1, i1* @function3.state
%2 = load i32, i32* @function3.i
%3 = add nsw i32 %2, 1
%4 = select i1 %1, i32 %3, i32 0
store i32 %4, i32* @function3.i
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %0
store i1 true, i1* @function3.state
br label %7
7: ; preds = %0, %6
%8 = phi i32 [ %4, %6 ], [ -1, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ panscan_calc_internal(int);
void panscan_calc_windowed(void) { panscan_calc_internal(2); }


x86 assembly (clang, -O0):
<panscan_calc_windowed>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <panscan_calc_internal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<panscan_calc_windowed>:
mov    $0x2,%edi
jmp    1030 <panscan_calc_internal@plt>

LLVM IR (-O0):
define void @panscan_calc_windowed() {
%1 = call i32 @panscan_calc_internal(i32 2)
ret void
}

LLVM IR (-O2):
define void @panscan_calc_windowed() {
%1 = tail call i32 @panscan_calc_internal(i32 2)
ret void
}
/* Variables and functions */
scalar_t__ __a_cas(int, int, int volatile *);
int a_swap(volatile int *x, int v) {
  int old;
  do
    old = *x;
  while (__a_cas(old, v, x));
  return old;
}


x86 assembly (clang, -O0):
<a_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1030 <__a_cas@plt>
cmp    $0x0,%rax
jne    111f <a_swap+0xf>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_swap>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%ebp
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rbx,%rdx
call   1030 <__a_cas@plt>
test   %rax,%rax
jne    1120 <a_swap+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @a_swap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
store i32 %8, i32* %5
br label %9
9: ; preds = %6
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = load i32*, i32** %3
%13 = call i64 @__a_cas(i32 %10, i32 %11, i32* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %6, label %15
15: ; preds = %9
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @a_swap(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i32, i32* %0
%5 = tail call i64 @__a_cas(i32 %4, i32 %1, i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ obuf;

/* Variables and functions */
int /*<<< orphan*/ gpssim_write_sentence(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, double);
void gpssim_write_spd(double knotsperhour) {
  char obuf[1024];
  snprintf(obuf, sizeof(obuf), "FRSPD,%.2f", knotsperhour);
  gpssim_write_sentence(obuf);
}


x86 assembly (clang, -O0):
<gpssim_write_spd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
mov    $0x400,%esi
lea    0xeb8(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <gpssim_write_sentence@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpssim_write_spd>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <gpssim_write_sentence@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"FRSPD,%.2f\00"
define void @gpssim_write_spd(double %0) {
%2 = alloca double
%3 = alloca [1024 x i8]
store double %0, double* %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load double, double* %2
%6 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @gpssim_write_sentence(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"FRSPD,%.2f\00"
define void @gpssim_write_spd(double %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), double %0)
%5 = call i32 @gpssim_write_sentence(i8* %3)
ret void
}
/* Variables and functions */
int abort() {}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @abort() {
unreachable
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[]) {
  (void)argc;
  fprintf(stderr,
          "Modify Subject Information Access URI(s) in a certificate.\n"
          "\n"
          "Usage: %s [options] <certificate_file>\n"
          "\n"
          "Options:\n"
          "    -d    \tDelete all existing SIA access descriptions\n"
          "    -r URI\tAdd URI w/ access method id-ad-caRepository\n"
          "    -m URI\tAdd URI w/ access method id-ad-rpkiManifest\n"
          "    -s URI\tAdd URI w/ access method id-ad-signedObject\n"
          "    -h    \tShow this help file\n",
          argv[0]);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [361 x i8] c"Modify Subject Information Access URI(s) in a certificate.\0A\0AUsage: %s [options] <certificate_file>\0A\0AOptions:\0A -d \09Delete all existing SIA access descriptions\0A -r URI\09Add URI w/ access method id-ad-caRepository\0A -m URI\09Add URI w/ access method id-ad-rpkiManifest\0A -s URI\09Add URI w/ access method id-ad-signedObject\0A -h \09Show this help file\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @stderr
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([361 x i8], [361 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [361 x i8] c"Modify Subject Information Access URI(s) in a certificate.\0A\0AUsage: %s [options] <certificate_file>\0A\0AOptions:\0A -d \09Delete all existing SIA access descriptions\0A -r URI\09Add URI w/ access method id-ad-caRepository\0A -m URI\09Add URI w/ access method id-ad-rpkiManifest\0A -s URI\09Add URI w/ access method id-ad-signedObject\0A -h \09Show this help file\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([361 x i8], [361 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ printf(char *, void *);
void my_free(void *ptr) {
  printf("Inside my_free(), ptr = %p\n", ptr);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<my_free>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Inside my_free(), ptr = %p\0A\00"
define void @my_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Inside my_free(), ptr = %p\0A\00"
define void @my_free(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void printGrn(char *str) { printf("%s%s%s", "\x1B[32m", str, "\x1B[0m"); }


x86 assembly (clang, -O0):
<printGrn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed9(%rip),%rsi
lea    0xed8(%rip),%rcx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printGrn>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee6(%rip),%rsi
lea    0xee5(%rip),%rcx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [6 x i8] c"\1B[32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @printGrn(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int main() {
  __asm__("nop");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
nop
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
void set(int *x, int i) { *x = i; }


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @set(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 = load i32*, i32** %3
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @set(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
void __xeno_user_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @__xeno_user_exit() {
ret void
}
void bar() {
#pragma omp declare reduction(foo : struct A : foo(&_out, &_in))
}


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

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

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

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