xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *,
                          char *);
int main() {
  char s[] = "abcdef";
  printf("%10s%-10s\n%-10s%-10s\n%10s%10s", s, s, s, s, s, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xb(%rbp),%rsi
lea    -0xb(%rbp),%rdx
lea    -0xb(%rbp),%rcx
lea    -0xb(%rbp),%r8
lea    -0xb(%rbp),%r9
lea    -0xb(%rbp),%rax
lea    0xeac(%rip),%rdi
mov    %rax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x666564,0x13(%rsp)
movl   $0x64636261,0x10(%rsp)
64
lea    0x10(%rsp),%rcx
mov    %rcx,(%rsp)
lea    0xed3(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.s = [7 x i8] c"abcdef\00"
@.str = [30 x i8] c"%10s%-10s\0A%-10s%-10s\0A%10s%10s\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %2, i8* %2, i8* %2, i8* %2, i8* %2)
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
int dirExists(char *path) {
  struct stat stat_p;
  stat(path, &stat_p);
  return S_ISDIR(stat_p.st_mode);
}


x86 assembly (clang, -O0):
<dirExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirExists>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @dirExists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISDIR(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @dirExists(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISDIR(i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *xcalloc(size_t, int);
char *xstrndup(const char *str, size_t len) {
  size_t actual_len = strlen(str);
  char *ptr;
  if (actual_len < len) {
    len = actual_len;
  }
  ptr = xcalloc(len + 1, sizeof(char));
  memcpy(ptr, str, len);
  ptr[len] = '\0';
  return ptr;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1163 <xstrndup+0x33>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <xcalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
cmp    %rbx,%rax
cmovb  %rax,%rbx
lea    0x1(%rbx),%rdi
mov    $0x1,%esi
call   1050 <xcalloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%r15,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp ult i64 %3, %1
%5 = select i1 %4, i64 %3, i64 %1
%6 = add i64 %5, 1
%7 = tail call i8* @xcalloc(i64 %6, i32 1)
%8 = tail call i32 @memcpy(i8* %7, i8* %0, i64 %5)
%9 = getelementptr inbounds i8, i8* %7, i64 %5
store i8 0, i8* %9
ret i8* %7
}
void omap_push_sram_idle(void) {}


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

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

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

LLVM IR (-O2):
define void @omap_push_sram_idle() {
ret void
}
int test_imm_FEint64_midword_reg(long long val) {
  return ((val >> 16) & (0xFE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FEint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xfe,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FEint64_midword_reg>:
test   $0xfe0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FEint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 254
%6 = icmp ne i64 %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_FEint64_midword_reg(i64 %0) {
%2 = and i64 %0, 16646144
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ARGBToAR30Row_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToAR30Row_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ numberFive();
void foo() { numberFive(); }


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

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

LLVM IR (-O0):
define void @foo() {
%1 = call i32 (...) @numberFive()
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @numberFive()
ret void
}
/* Variables and functions */
char LowerCase(char);
char ToLower(char a) { return LowerCase(a); }


x86 assembly (clang, -O0):
<ToLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <LowerCase@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToLower>:
jmp    1030 <LowerCase@plt>

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

LLVM IR (-O2):
define signext i8 @ToLower(i8 signext %0) {
%2 = tail call signext i8 @LowerCase(i8 signext %0)
ret i8 %2
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ isatty(int);
int dialogPresent() {
  static int lDialogPresent = -1;
  if (lDialogPresent < 0) {
    lDialogPresent = detectPresence("dialog");
  }
  return lDialogPresent && isatty(1);
}


x86 assembly (clang, -O0):
<dialogPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <dialogPresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116d <dialogPresent+0x4d>
mov    $0x1,%edi
call   1030 <isatty@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dialogPresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1146 <dialogPresent+0x26>
test   %eax,%eax
je     115c <dialogPresent+0x3c>
mov    $0x1,%edi
call   1030 <isatty@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb3(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ed8(%rip)
test   %eax,%eax
jne    112f <dialogPresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@dialogPresent.lDialogPresent = internal global i32 -1
@.str = [7 x i8] c"dialog\00"
define i32 @dialogPresent() {
%1 = load i32, i32* @dialogPresent.lDialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @dialogPresent.lDialogPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @dialogPresent.lDialogPresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 @isatty(i32 1)
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@dialogPresent.lDialogPresent = internal unnamed_addr global i32 -1
@.str = [7 x i8] c"dialog\00"
define i32 @dialogPresent() {
%1 = load i32, i32* @dialogPresent.lDialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @dialogPresent.lDialogPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 @isatty(i32 1)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
void GPMCPrefetchEngineStop(unsigned int baseAddr) {
  (*((volatile unsigned int *)(baseAddr + (0x1EC)))) = (0x0u);
}


x86 assembly (clang, -O0):
<GPMCPrefetchEngineStop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1ec,%eax
mov    %eax,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCPrefetchEngineStop>:
add    $0x1ec,%edi
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @GPMCPrefetchEngineStop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 492
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
store volatile i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @GPMCPrefetchEngineStop(i32 %0) {
%2 = add i32 %0, 492
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
store volatile i32 0, i32* %4
ret void
}
int maximo(int RGB[], int *color) {
  int max = RGB[0];
  *color = 0;
  if (RGB[1] > max) {
    max = RGB[1];
    *color = 1;
  }
  if (RGB[2] > max) {
    max = RGB[2];
    *color = 2;
  }
  return max;
}


x86 assembly (clang, -O0):
<maximo>:
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
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
cmp    -0x14(%rbp),%eax
jle    1143 <maximo+0x43>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
cmp    -0x14(%rbp),%eax
jle    1167 <maximo+0x67>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximo>:
mov    (%rdi),%eax
movl   $0x0,(%rsi)
mov    0x4(%rdi),%ecx
xor    %edx,%edx
cmp    %eax,%ecx
setg   %dl
mov    %edx,(%rsi)
cmovg  %ecx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
mov    $0x2,%edi
cmovle %edx,%edi
mov    %edi,(%rsi)
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @maximo(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 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32*, i32** %4
store i32 0, i32* %9
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = load i32, i32* %5
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %2
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
store i32 %18, i32* %5
%19 = load i32*, i32** %4
store i32 1, i32* %19
br label %20
20: ; preds = %15, %2
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 2
%23 = load i32, i32* %22
%24 = load i32, i32* %5
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = load i32*, i32** %3
%28 = getelementptr inbounds i32, i32* %27, i64 2
%29 = load i32, i32* %28
store i32 %29, i32* %5
%30 = load i32*, i32** %4
store i32 2, i32* %30
br label %31
31: ; preds = %26, %20
%32 = load i32, i32* %5
ret i32 %32
}

LLVM IR (-O2):
define i32 @maximo(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
store i32 0, i32* %1
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, %3
%7 = zext i1 %6 to i32
store i32 %7, i32* %1
%8 = select i1 %6, i32 %5, i32 %3
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp sgt i32 %10, %8
%12 = select i1 %11, i32 2, i32 %7
store i32 %12, i32* %1
%13 = select i1 %11, i32 %10, i32 %8
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __unlink(const char *name) {
  if (name == NULL) {
    __set_errno(EINVAL);
    return -1;
  }
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1141 <__unlink+0x31>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <__unlink+0x46>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__unlink>:
push   %rax
test   %rdi,%rdi
jne    111f <__unlink+0xf>
mov    0x2ebb(%rip),%rax
jmp    1126 <__unlink+0x16>
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
@ENOSYS = global i32 0
define i32 @__unlink(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = load i32, i32* @EINVAL
%4 = load i32, i32* @ENOSYS
%5 = select i1 %2, i32 %3, i32 %4
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int a = 4, b = 3;
  a <<= b;
  print("a 32");
  printid(a);
  a >>= b;
  print("a 4");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
lea    0xeb1(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x8(%rbp)
lea    0xe97(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0x20,%edi
call   1040 <printid@plt>
lea    0xec7(%rip),%rdi
call   1030 <print@plt>
mov    $0x4,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"a 32\00"
@.str.1 = [4 x i8] c"a 4\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = shl i32 %5, %4
store i32 %6, i32* %2
%7 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 @printid(i32 %8)
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = ashr i32 %11, %10
store i32 %12, i32* %2
%13 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = call i32 @printid(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"a 32\00"
@.str.1 = [4 x i8] c"a 4\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 32)
%3 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printid(i32 4)
ret i32 0
}
int z_time_yearsToMonths(int Years) { return Years * 12; }


x86 assembly (clang, -O0):
<z_time_yearsToMonths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xc,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<z_time_yearsToMonths>:
shl    $0x2,%edi
lea    (%rdi,%rdi,2),%eax
ret

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

LLVM IR (-O2):
define i32 @z_time_yearsToMonths(i32 %0) {
%2 = mul nsw i32 %0, 12
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fun1(int *, int);
int /*<<< orphan*/ fun2(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ wypisz_tab(int *, int);
int main() {
  int tab[5] = {1, 2, 3, 4, 5};
  printf("Tabela:\n");
  wypisz_tab(tab, 5);
  fun1(tab, 3);
  fun2(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1050 <wypisz_tab@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1060 <fun1@plt>
mov    $0x5,%edi
call   1030 <fun2@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xec5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeb3(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <wypisz_tab@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1060 <fun1@plt>
mov    $0x5,%edi
call   1030 <fun2@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.tab = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [9 x i8] c"Tabela:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = bitcast [5 x i32]* %2 to i8*
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call i32 @wypisz_tab(i32* %5, i32 5)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%8 = call i32 @fun1(i32* %7, i32 3)
%9 = call i32 @fun2(i32 5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.tab = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@str = [8 x i8] c"Tabela:\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 @wypisz_tab(i32* %4, i32 5)
%6 = call i32 @fun1(i32* %4, i32 3)
%7 = call i32 @fun2(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void FAPI_function0(void) {
  printf(">> [FAPI] "
         "calling a sample fake API 0 call.\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c">> [FAPI] calling a sample fake API 0 call.\0A\00"
define void @FAPI_function0() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c">> [FAPI] calling a sample fake API 0 call.\00"
define void @FAPI_function0() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int get(int, int, int);
int /*<<< orphan*/ printfI(int);
int Main() {
  int I = get(1, 2, 3);
  printfI(I);
  return I;
}


x86 assembly (clang, -O0):
<Main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <printfI@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <get@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <printfI@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Main() {
%1 = alloca i32
%2 = call i32 @get(i32 1, i32 2, i32 3)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printfI(i32 %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @Main() {
%1 = tail call i32 @get(i32 1, i32 2, i32 3)
%2 = tail call i32 @printfI(i32 %1)
ret i32 %1
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_edge(struct graph *, int, int);
scalar_t__ mget(struct graph *, int, int);
int /*<<< orphan*/ remove_edge(struct graph *, int, int);
void toggle_edge(struct graph *g, int a, int b) {
  if (mget(g, a, b))
    remove_edge(g, a, b);
  else
    add_edge(g, a, b);
}


x86 assembly (clang, -O0):
<toggle_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <mget@plt>
cmp    $0x0,%rax
je     116f <toggle_edge+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <remove_edge@plt>
jmp    117e <toggle_edge+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <add_edge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle_edge>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <mget@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
test   %rax,%rax
je     1157 <toggle_edge+0x27>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <remove_edge@plt>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <add_edge@plt>

LLVM IR (-O0):
%struct.graph = type { i32 }
define void @toggle_edge(%struct.graph* %0, i32 %1, i32 %2) {
%4 = alloca %struct.graph*
%5 = alloca i32
%6 = alloca i32
store %struct.graph* %0, %struct.graph** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.graph*, %struct.graph** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @mget(%struct.graph* %7, i32 %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load %struct.graph*, %struct.graph** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @remove_edge(%struct.graph* %13, i32 %14, i32 %15)
br label %22
17: ; preds = %3
%18 = load %struct.graph*, %struct.graph** %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = call i32 @add_edge(%struct.graph* %18, i32 %19, i32 %20)
br label %22
22: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define void @toggle_edge(%struct.graph* %0, i32 %1, i32 %2) {
%4 = tail call i64 @mget(%struct.graph* %0, i32 %1, i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @remove_edge(%struct.graph* %0, i32 %1, i32 %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @add_edge(%struct.graph* %0, i32 %1, i32 %2)
br label %10
10: ; preds = %8, %6
ret void
}
float mlMax(float a, float b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<mlMax>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <mlMax+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <mlMax+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlMax>:
maxss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @mlMax(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ srand(unsigned int);
unsigned int time(int /*<<< orphan*/ *);
void seedit(const char *flag) {
  FILE *fopen(), *pfseed;
  unsigned int seed2;
  if (flag[0] == 's') {
    srand(seed2 = time(NULL));
    printf("\n%d\n", seed2);
  }
}


x86 assembly (clang, -O0):
<seedit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x73,%eax
jne    116e <seedit+0x3e>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
mov    %edi,-0x14(%rbp)
call   1040 <srand@plt>
mov    -0x14(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seedit>:
push   %rbx
cmpb   $0x73,(%rdi)
jne    1155 <seedit+0x25>
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <srand@plt>
lea    0xeb3(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%d\0A\00"
define void @seedit(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 115
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = call i32 @time(i32* null)
store i32 %11, i32* %4
%12 = call i32 @srand(i32 %11)
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%d\0A\00"
define void @seedit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 115
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @time(i32* null)
%6 = tail call i32 @srand(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %8
8: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swift_inv_insn_tag(unsigned long);
void swift_flush_icache(void) {
  unsigned long addr;
  for (addr = 0; addr < 0x4000; addr += 0x20) {
    swift_inv_insn_tag(addr);
  }
}


x86 assembly (clang, -O0):
<swift_flush_icache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
cmpq   $0x4000,-0x8(%rbp)
jae    1148 <swift_flush_icache+0x38>
mov    -0x8(%rbp),%rdi
call   1030 <swift_inv_insn_tag@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <swift_flush_icache+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swift_flush_icache>:
push   %rbx
mov    $0xffffffffffffffe0,%rbx
nopl   0x0(%rax,%rax,1)
add    $0x20,%rbx
mov    %rbx,%rdi
call   1030 <swift_inv_insn_tag@plt>
cmp    $0x3fe0,%rbx
jb     1120 <swift_flush_icache+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @swift_flush_icache() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %8, %0
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 16384
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i64, i64* %1
%7 = call i32 @swift_inv_insn_tag(i64 %6)
br label %8
8: ; preds = %5
%9 = load i64, i64* %1
%10 = add i64 %9, 32
store i64 %10, i64* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @swift_flush_icache() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @swift_inv_insn_tag(i64 %2)
%4 = add nuw nsw i64 %2, 32
%5 = icmp ult i64 %2, 16352
br i1 %5, label %1, label %6
6: ; preds = %1
ret void
}
/* Variables and functions */
unsigned int sqrt(unsigned int const);
unsigned int isSquare(const unsigned int number) {
  unsigned int temp = sqrt(number);
  if (temp * temp == number)
    return temp;
  return 0;
}


x86 assembly (clang, -O0):
<isSquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <isSquare+0x31>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <isSquare+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSquare>:
push   %rbx
mov    %edi,%ebx
call   1030 <sqrt@plt>
mov    %eax,%ecx
imul   %eax,%ecx
xor    %edx,%edx
cmp    %ebx,%ecx
cmovne %edx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isSquare(i32 %0) {
%2 = tail call i32 @sqrt(i32 %0)
%3 = mul i32 %2, %2
%4 = icmp eq i32 %3, %0
%5 = select i1 %4, i32 %2, i32 0
ret i32 %5
}
void set_HasGDS(unsigned char *pds) { pds[7] |= 128; }


x86 assembly (clang, -O0):
<set_HasGDS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x7(%rax),%ecx
or     $0x80,%ecx
mov    %cl,0x7(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_HasGDS>:
orb    $0x80,0x7(%rdi)
ret

LLVM IR (-O0):
define void @set_HasGDS(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 7
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 128
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @set_HasGDS(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = or i8 %3, -128
store i8 %4, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float ang_graus;
  printf("Angulo em Grau: ");
  scanf("%f", &ang_graus);
  printf("Radiano: %.2f", ang_graus * 3.14 / 180);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaa(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
divsd  0xeae(%rip),%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Angulo em Grau: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [14 x i8] c"Radiano: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fmul double %6, 3.140000e+00
%8 = fdiv double %7, 1.800000e+02
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Angulo em Grau: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [14 x i8] c"Radiano: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 3.140000e+00
%8 = fdiv double %7, 1.800000e+02
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}
int nmcces(struct vars *v) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.vars = type opaque
define i32 @nmcces(%struct.vars* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void tetromino_yyfree(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<tetromino_yyfree>:
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):
<tetromino_yyfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @tetromino_yyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strrchr(char *, char);
void print_version(void) {
  printf("ldd "
         "2.0"
         "\n"
         "Print shared library dependencies\n"
         "Copyright (C) 2009 - %s Chris Faylor\n"
         "This is free software; see the source for copying conditions.  There "
         "is NO\n"
         "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
         "PURPOSE.\n",
         strrchr("Mar 16 2022", ' ') + 1);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xfbc(%rip),%rdi
mov    $0x20,%esi
call   1040 <strrchr@plt>
mov    %rax,%rsi
add    $0x1,%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
lea    0xfd0(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [231 x i8] c"ldd 2.0\0APrint shared library dependencies\0ACopyright (C) 2009 - %s Chris Faylor\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
@.str.1 = [12 x i8] c"Mar 16 2022\00"
define void @print_version() {
%1 = call i8* @strrchr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext 32)
%2 = getelementptr inbounds i8, i8* %1, i64 1
%3 = call i32 @printf(i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [231 x i8] c"ldd 2.0\0APrint shared library dependencies\0ACopyright (C) 2009 - %s Chris Faylor\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
@.str.1 = [12 x i8] c"Mar 16 2022\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 7))
ret void
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ u_strlcpy(char *, char const *, size_t);
char *max_strncat(char *dest, const char *src, size_t n) {
  size_t len1 = strlen(dest);
  if (len1 < (n - 1))
    u_strlcpy(dest + len1, src, (n - 1) - len1);
  return dest;
}


x86 assembly (clang, -O0):
<max_strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    1173 <max_strncat+0x53>
mov    -0x8(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
sub    -0x20(%rbp),%rdx
call   1040 <u_strlcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_strncat>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0xffffffffffffffff,%rbx
sub    %rax,%rbx
jbe    114d <max_strncat+0x2d>
add    %r14,%rax
mov    %rax,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <u_strlcpy@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @max_strncat(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add i64 %2, -1
%6 = icmp ugt i64 %5, %4
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 %4
%9 = sub i64 %5, %4
%10 = tail call i32 @u_strlcpy(i8* %8, i8* %1, i64 %9)
br label %11
11: ; preds = %7, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void superlu_abort_and_exit(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<superlu_abort_and_exit>:
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    $0xffffffff,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @superlu_abort_and_exit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_ENCRYPT;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ENCRYPT_it;
PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void) {
  return (PKCS7_ENCRYPT *)ASN1_item_new(&PKCS7_ENCRYPT_it);
}


x86 assembly (clang, -O0):
<PKCS7_ENCRYPT_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_ENCRYPT_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_ENCRYPT_it = global i32 0
define i32* @PKCS7_ENCRYPT_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_ENCRYPT_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_ENCRYPT_it = global i32 0
define i32* @PKCS7_ENCRYPT_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_ENCRYPT_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
long double _f_rintl(long double);
long double rintl(long double x) { return _f_rintl(x); }


x86 assembly (clang, -O0):
<rintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <_f_rintl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rintl>:
jmp    1030 <_f_rintl@plt>

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

LLVM IR (-O2):
define x86_fp80 @rintl(x86_fp80 %0) {
%2 = tail call x86_fp80 @_f_rintl(x86_fp80 %0)
ret x86_fp80 %2
}
void gtk_target_list_remove() {}


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

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

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

LLVM IR (-O2):
define void @gtk_target_list_remove() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rotozoomSurfaceSizeTrig(int, int, double, double, int *,
                                           int *, double *, double *);
void rotozoomSurfaceSize(int width, int height, double angle, double zoom,
                         int *dstwidth, int *dstheight) {
  double dummy_sanglezoom, dummy_canglezoom;
  rotozoomSurfaceSizeTrig(width, height, angle, zoom, dstwidth, dstheight,
                          &dummy_sanglezoom, &dummy_canglezoom);
}


x86 assembly (clang, -O0):
<rotozoomSurfaceSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    -0x38(%rbp),%r9
call   1030 <rotozoomSurfaceSizeTrig@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotozoomSurfaceSize>:
sub    $0x18,%rsp
lea    0x10(%rsp),%r8
lea    0x8(%rsp),%r9
call   1030 <rotozoomSurfaceSizeTrig@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @rotozoomSurfaceSize(i32 %0, i32 %1, double %2, double %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca double
%14 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store double %2, double* %9
store double %3, double* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = load double, double* %9
%18 = load double, double* %10
%19 = load i32*, i32** %11
%20 = load i32*, i32** %12
%21 = call i32 @rotozoomSurfaceSizeTrig(i32 %15, i32 %16, double %17, double %18, i32* %19, i32* %20, double* %13, double* %14)
ret void
}

LLVM IR (-O2):
define void @rotozoomSurfaceSize(i32 %0, i32 %1, double %2, double %3, i32* %4, i32* %5) {
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %7 to i8*
%10 = bitcast double* %8 to i8*
%11 = call i32 @rotozoomSurfaceSizeTrig(i32 %0, i32 %1, double %2, double %3, i32* %4, i32* %5, double* %7, double* %8)
ret void
}