xunge/DecIR huggingface dataset:
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = input[0UL] ^ 700325083U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local2 = 0UL;
      while (local2 < input[1UL]) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] << 1U) | 396342719U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
xor    $0x29be1cdb,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    1166 <RandomFunc+0x66>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    1157 <RandomFunc+0x57>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    1138 <RandomFunc+0x38>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1121 <RandomFunc+0x21>
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
or     $0x179fb5bf,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
add    %eax,%eax
or     $0x179fb5bf,%eax
xor    $0x40600800,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = xor i32 %10, 700325083
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %11, i32* %12
store i32 0, i32* %7
br label %13
13: ; preds = %31, %2
%14 = load i32, i32* %7
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = icmp ult i32 %14, %17
br i1 %18, label %19, label %36
19: ; preds = %13
store i32 0, i32* %6
br label %20
20: ; preds = %26, %19
%21 = load i32, i32* %6
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = icmp ult i32 %21, %24
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = load i32, i32* %6
%28 = zext i32 %27 to i64
%29 = add i64 %28, 2
%30 = trunc i64 %29 to i32
store i32 %30, i32* %6
br label %20
31: ; preds = %20
%32 = load i32, i32* %7
%33 = zext i32 %32 to i64
%34 = add i64 %33, 2
%35 = trunc i64 %34 to i32
store i32 %35, i32* %7
br label %13
36: ; preds = %13
%37 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%38 = load i32, i32* %37
%39 = shl i32 %38, 1
%40 = or i32 %39, 396342719
%41 = load i32*, i32** %4
%42 = getelementptr inbounds i32, i32* %41, i64 0
store i32 %40, i32* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 1
%5 = or i32 %4, 396342719
%6 = xor i32 %5, 1080035328
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int suspend_close(int handle) {
  if (handle >= 0)
    close(handle);
}


x86 assembly (clang, -O0):
<suspend_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112d <suspend_close+0x1d>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suspend_close>:
test   %edi,%edi
js     111e <suspend_close+0xe>
push   %rax
call   1030 <close@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @suspend_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @close(i32 %7)
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @suspend_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret i32 undef
}
double sseb_evapfr(double lst_h, double lst_c, double lst) {
  return ((lst_h - lst) / (lst_h - lst_c));
}


x86 assembly (clang, -O0):
<sseb_evapfr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sseb_evapfr>:
movapd %xmm0,%xmm3
subsd  %xmm2,%xmm3
subsd  %xmm1,%xmm0
divsd  %xmm0,%xmm3
movapd %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @sseb_evapfr(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fsub double %7, %8
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fsub double %10, %11
%13 = fdiv double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @sseb_evapfr(double %0, double %1, double %2) {
%4 = fsub double %0, %2
%5 = fsub double %0, %1
%6 = fdiv double %4, %5
ret double %6
}
/* Type definitions */
typedef int __v8di;
typedef scalar_t__ __m512i;

/* Variables and functions */
__m512i test_mm512_mullo_epi64(__m512i __A, __m512i __B) {
  return (__m512i)((__v8di)__A * (__v8di)__B);
}


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

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

LLVM IR (-O0):
define i64 @test_mm512_mullo_epi64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @test_mm512_mullo_epi64(i64 %0, i64 %1) {
%3 = shl i64 %0, 32
%4 = mul i64 %3, %1
%5 = ashr exact i64 %4, 32
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int printd(int x) { printf("%d", x); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @printd(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
int SIGINT;
int SIGTSTP;
int /*<<< orphan*/ printf(char *);
void handler(int signo) {
  if (signo == SIGINT)
    printf("Señal SIGINT\n");
  else if (signo == SIGTSTP)
    printf("Señal SIGTSTP\n");
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    113e <handler+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <handler+0x51>
mov    -0x4(%rbp),%eax
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
jne    115c <handler+0x4c>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <handler+0x51>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1127 <handler+0x17>
lea    0xeed(%rip),%rdi
jmp    1030 <puts@plt>
mov    0x2eb2(%rip),%rax
cmp    %edi,(%rax)
jne    113e <handler+0x2e>
lea    0xec7(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [15 x i8] c"Se\C3\B1al SIGINT\0A\00"
@SIGTSTP = global i32 0
@.str.1 = [16 x i8] c"Se\C3\B1al SIGTSTP\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %15
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* @SIGTSTP
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
br label %15
15: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGTSTP = global i32 0
@str = [15 x i8] c"Se\C3\B1al SIGTSTP\00"
@str.2 = [14 x i8] c"Se\C3\B1al SIGINT\00"
define void @handler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @SIGTSTP
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0), %1 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0), %4 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned int);
int main(int argc, char *argv[]) {
  int i = -1;
  unsigned u = -1;
  printf("%d %d\n", i, u);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 -1, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void printUsage(void) {
  fprintf(stdout, "Usage: seq -m <rows> -n <cols> -p <processor-count> -i "
                  "<input-file> -o <output-file>\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [86 x i8] c"Usage: seq -m <rows> -n <cols> -p <processor-count> -i <input-file> -o <output-file>\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [86 x i8] c"Usage: seq -m <rows> -n <cols> -p <processor-count> -i <input-file> -o <output-file>\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_lflag;
};

/* Variables and functions */
int /*<<< orphan*/ ECHO;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ TCSAFLUSH;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void enableRawMode() {
  struct termios raw;
  tcgetattr(STDIN_FILENO, &raw);
  raw.c_lflag &= ~(ECHO);
  tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}


x86 assembly (clang, -O0):
<enableRawMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enableRawMode>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,(%rsp)
mov    (%rbx),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdx
call   1040 <tcsetattr@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@STDIN_FILENO = global i32 0
@ECHO = global i32 0
@TCSAFLUSH = global i32 0
define void @enableRawMode() {
%1 = alloca %struct.termios
%2 = load i32, i32* @STDIN_FILENO
%3 = call i32 @tcgetattr(i32 %2, %struct.termios* %1)
%4 = load i32, i32* @ECHO
%5 = xor i32 %4, -1
%6 = getelementptr inbounds %struct.termios, %struct.termios* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, %5
store i32 %8, i32* %6
%9 = load i32, i32* @STDIN_FILENO
%10 = load i32, i32* @TCSAFLUSH
%11 = call i32 @tcsetattr(i32 %9, i32 %10, %struct.termios* %1)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@STDIN_FILENO = global i32 0
@ECHO = global i32 0
@TCSAFLUSH = global i32 0
define void @enableRawMode() {
%1 = alloca %struct.termios
%2 = bitcast %struct.termios* %1 to i8*
%3 = load i32, i32* @STDIN_FILENO
%4 = call i32 @tcgetattr(i32 %3, %struct.termios* %1)
%5 = load i32, i32* @ECHO
%6 = xor i32 %5, -1
%7 = getelementptr inbounds %struct.termios, %struct.termios* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, %6
store i32 %9, i32* %7
%10 = load i32, i32* @STDIN_FILENO
%11 = load i32, i32* @TCSAFLUSH
%12 = call i32 @tcsetattr(i32 %10, i32 %11, %struct.termios* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
char *strerror(int /*<<< orphan*/);
char *get_socket_error() { return strerror(errno); }


x86 assembly (clang, -O0):
<get_socket_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <strerror@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_socket_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <strerror@plt>

LLVM IR (-O0):
@errno = global i32 0
define i8* @get_socket_error() {
%1 = load i32, i32* @errno
%2 = call i8* @strerror(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@errno = global i32 0
define i8* @get_socket_error() {
%1 = load i32, i32* @errno
%2 = tail call i8* @strerror(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ stdscr;
void initcrss() {
  initscr();
  cbreak();
  noecho();
  nonl();
  intrflush(stdscr, FALSE);
  nodelay(stdscr, TRUE);
}


x86 assembly (clang, -O0):
<initcrss>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1080 <noecho@plt>
mov    $0x0,%al
call   1060 <nonl@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
mov    0x2e40(%rip),%rax
mov    (%rax),%esi
call   1050 <intrflush@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
call   1070 <nodelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initcrss>:
push   %rbx
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1080 <noecho@plt>
xor    %eax,%eax
call   1060 <nonl@plt>
mov    0x2e64(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
call   1050 <intrflush@plt>
mov    (%rbx),%edi
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
pop    %rbx
jmp    1070 <nodelay@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define void @initcrss() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = call i32 @intrflush(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = call i32 @nodelay(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define void @initcrss() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = tail call i32 @intrflush(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = tail call i32 @nodelay(i32 %8, i32 %9)
ret void
}
unsigned long long int
unsignedlonglongint_ignoring_unsignedshort(unsigned long long int x,
                                           unsigned short y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedlonglongint_ignoring_unsignedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedlonglongint_ignoring_unsignedshort>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlonglongint_ignoring_unsignedshort(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_unsignedshort(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
int main() {
  int a;
  a = 5;
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
char tolow(char car) {
  if ((car <= 'Z') && (car >= 'A'))
    return (car + 0x20);
  else
    return (car);
}


x86 assembly (clang, -O0):
<tolow>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <tolow+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <tolow+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <tolow+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolow>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @tolow(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 90
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @tolow(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void check_f(float res, float expected) {
  if (res >= expected - 0.001f && res <= expected + 0.001f)
    return;
  abort();
}


x86 assembly (clang, -O0):
<check_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xecc(%rip),%xmm2
subss  %xmm2,%xmm1
ucomiss %xmm1,%xmm0
jb     1162 <check_f+0x52>
movss  -0x4(%rbp),%xmm1
movss  0xeb2(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1162 <check_f+0x52>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<check_f>:
push   %rax
movss  0xee7(%rip),%xmm2
addss  %xmm1,%xmm2
ucomiss %xmm2,%xmm0
jb     1131 <check_f+0x21>
addss  0xeda(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1131 <check_f+0x21>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check_f(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 = fsub float %6, 0x3F50624DE0000000
%8 = fcmp oge float %5, %7
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = fadd float %11, 0x3F50624DE0000000
%13 = fcmp ole float %10, %12
br i1 %13, label %14, label %15
14: ; preds = %9
ret void
15: ; preds = %9, %2
%16 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @check_f(float %0, float %1) {
%3 = fadd float %1, 0xBF50624DE0000000
%4 = fcmp ugt float %3, %0
%5 = fadd float %1, 0x3F50624DE0000000
%6 = fcmp ult float %5, %0
%7 = or i1 %4, %6
br i1 %7, label %9, label %8
8: ; preds = %2
ret void
9: ; preds = %2
%10 = tail call i32 (...) @abort()
unreachable
}
void print_comp_data(design) struct Design *design;
{
  void fprint_data();
  int i;
  i = 0;
  while (++i <= 5)
    fprint_data(design, i);
}


x86 assembly (clang, -O0):
<print_comp_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x5,%eax
jg     1148 <print_comp_data+0x38>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <fprint_data@plt>
jmp    1123 <print_comp_data+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_comp_data>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <fprint_data@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprint_data@plt>

LLVM IR (-O0):
%struct.Design = type opaque
define void @print_comp_data(%struct.Design* %0) {
%2 = alloca %struct.Design*
%3 = alloca i32
store %struct.Design* %0, %struct.Design** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load %struct.Design*, %struct.Design** %2
%10 = load i32, i32* %3
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.Design = type opaque
define void @print_comp_data(%struct.Design* %0) {
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 1)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 2)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 3)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 4)
tail call void (%struct.Design*, i32, ...) bitcast (void (...)* @fprint_data to void (%struct.Design*, i32, ...)*)(%struct.Design* %0, i32 5)
ret void
}
/* Variables and functions */
void *__coverity_alloc__(int);
int /*<<< orphan*/ __coverity_mark_as_afm_allocated__(void *, char *);
void *H5Dcreate2(void *loc_id, const char *name, void *dtype_id, void *space_id,
                 void *lcpl_id, void *dcpl_id, void *dapl_id) {
  void *id = __coverity_alloc__(10);
  __coverity_mark_as_afm_allocated__(id, "H5Dclose");
  return id;
}


x86 assembly (clang, -O0):
<H5Dcreate2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H5Dcreate2>:
push   %rbx
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"H5Dclose\00"
define i8* @H5Dcreate2(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%16 = call i8* @__coverity_alloc__(i32 10)
store i8* %16, i8** %15
%17 = load i8*, i8** %15
%18 = call i32 @__coverity_mark_as_afm_allocated__(i8* %17, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %15
ret i8* %19
}

LLVM IR (-O2):
@.str = [9 x i8] c"H5Dclose\00"
define i8* @H5Dcreate2(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8* nocapture readnone %6) {
%8 = tail call i8* @__coverity_alloc__(i32 10)
%9 = tail call i32 @__coverity_mark_as_afm_allocated__(i8* %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ xor_encode(unsigned char *, unsigned char const *, size_t,
                              unsigned char const *, size_t);
void xor_decode(unsigned char *dec, const unsigned char *enc, size_t len,
                const unsigned char *key, size_t keylen) {
  xor_encode(dec, enc, len, key, keylen);
}


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

x86 assembly (clang, -O2):
<xor_decode>:
jmp    1030 <xor_encode@plt>

LLVM IR (-O0):
define void @xor_decode(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i32 @xor_encode(i8* %11, i8* %12, i64 %13, i8* %14, i64 %15)
ret void
}

LLVM IR (-O2):
define void @xor_decode(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i32 @xor_encode(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret void
}
char ft_toupper(char c) {
  c = c - 32;
  return (c);
}


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
lea    -0x20(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @ft_toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 32
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @ft_toupper(i8 signext %0) {
%2 = add i8 %0, -32
ret i8 %2
}
int security_task_prctl(int option, unsigned long arg2, unsigned long arg3,
                        unsigned long arg4, unsigned long arg5) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @security_task_prctl(i32 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
ret i32 0
}
int __attribute__((target("fpmath=387"))) koala(int a) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @koala(i32 %0) {
ret i32 4
}
const char *skip_slash(const char *p) {
  while (*p == '/')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skip_slash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1129 <skip_slash+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_slash+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_slash>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x2f,0x1(%rax)
lea    0x1(%rax),%rax
je     1110 <skip_slash+0x10>
ret

LLVM IR (-O0):
define i8* @skip_slash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @skip_slash(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 47
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
int any(char *stream, long offset, int (*test)(char *, long)) {
  int i;
  for (i = offset; stream[i]; ++i)
    if (!test(stream, i))
      return i;
  return i;
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1162 <any+0x62>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rdi
movslq -0x24(%rbp),%rsi
call   *%rax
cmp    $0x0,%eax
jne    114f <any+0x4f>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <any+0x68>
jmp    1154 <any+0x54>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <any+0x1b>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rax
movslq %eax,%rbx
cmpb   $0x0,(%rdi,%rbx,1)
je     1141 <any+0x41>
mov    %rdx,%r14
mov    %rdi,%r15
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   *%r14
test   %eax,%eax
je     113e <any+0x3e>
lea    0x1(%rbx),%rax
cmpb   $0x0,0x1(%r15,%rbx,1)
mov    %rax,%rbx
jne    1120 <any+0x20>
jmp    1141 <any+0x41>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @any(i8* %0, i64 %1, i32 (i8*, i64)* nocapture %2) {
%4 = shl i64 %1, 32
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %3, %13
%10 = phi i64 [ %14, %13 ], [ %5, %3 ]
%11 = tail call i32 %2(i8* %0, i64 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %9
%14 = add i64 %10, 1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %13, %3
%19 = phi i64 [ %1, %3 ], [ %14, %13 ], [ %10, %9 ]
%20 = trunc i64 %19 to i32
ret i32 %20
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XGravityEvent;

/* Variables and functions */
unsigned long get_XGravityEvent_window(void *_p) {
  return (unsigned long)((XGravityEvent *)_p)->window;
}


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

x86 assembly (clang, -O2):
<get_XGravityEvent_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XGravityEvent_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XGravityEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void func4(int *a) {
  if (a) {
    *a = 400;
  }
}


x86 assembly (clang, -O0):
<func4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111d <func4+0x1d>
mov    -0x8(%rbp),%rax
movl   $0x190,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func4>:
test   %rdi,%rdi
je     110b <func4+0xb>
movl   $0x190,(%rdi)
ret

LLVM IR (-O0):
define void @func4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32*, i32** %2
store i32 400, i32* %6
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @func4(i32* writeonly %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
store i32 400, i32* %0
br label %4
4: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test2() { printf("Je n'ai pas d'imagination"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Je n'ai pas d'imagination\00"
define i32 @test2() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [26 x i8] c"Je n'ai pas d'imagination\00"
define i32 @test2() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ease8InOutQuad(int /*<<< orphan*/);
int /*<<< orphan*/ triwave8(int /*<<< orphan*/);
uint8_t quadwave8(uint8_t in) { return ease8InOutQuad(triwave8(in)); }


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

x86 assembly (clang, -O2):
<quadwave8>:
push   %rax
call   1040 <triwave8@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ease8InOutQuad@plt>

LLVM IR (-O0):
define i32 @quadwave8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @triwave8(i32 %3)
%5 = call i32 @ease8InOutQuad(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @quadwave8(i32 %0) {
%2 = tail call i32 @triwave8(i32 %0)
%3 = tail call i32 @ease8InOutQuad(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ addscore(int, int);
void scoreemerald(int n) { addscore(n, 25); }


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

x86 assembly (clang, -O2):
<scoreemerald>:
mov    $0x19,%esi
jmp    1030 <addscore@plt>

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

LLVM IR (-O2):
define void @scoreemerald(i32 %0) {
%2 = tail call i32 @addscore(i32 %0, i32 25)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void fmtst1chk(char *fmt) {
  (void)fputs(fmt, stdout);
  (void)printf(":\t`");
  (void)printf(fmt, 4, 0x12);
  (void)printf("'\n");
}


x86 assembly (clang, -O0):
<fmtst1chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x12,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmtst1chk>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
call   1050 <fputs@plt>
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x12,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c":\09`\00"
@.str.1 = [3 x i8] c"'\0A\00"
define void @fmtst1chk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* %7, i32 4, i32 18)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c":\09`\00"
@str = [2 x i8] c"'\00"
define void @fmtst1chk(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i32 4, i32 18)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct mspack_system {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
void *msp_alloc(struct mspack_system *this, size_t bytes) {
  return malloc(bytes);
}


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

x86 assembly (clang, -O2):
<msp_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
%struct.mspack_system = type { i32 }
define noalias i8* @msp_alloc(%struct.mspack_system* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int atoi(char *);
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int a = atoi(argv[1]);
  int b = atoi(argv[2]);
  int g = gcd(a, b);
  printf("gcd: %d\n", g);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <gcd@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <gcd@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"gcd: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 @gcd(i32 %17, i32 %18)
store i32 %19, i32* %8
%20 = load i32, i32* %8
%21 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"gcd: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @gcd(i32 %5, i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
unsigned int REG_SPI_BASE(unsigned int);
__attribute__((always_)) __attribute__((flatten)) unsigned int
SPI_CMD(unsigned int i) {
  return (REG_SPI_BASE(i) + 0x00);
}


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

x86 assembly (clang, -O2):
<SPI_CMD>:
jmp    1030 <REG_SPI_BASE@plt>

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

LLVM IR (-O2):
define i32 @SPI_CMD(i32 %0) {
%2 = tail call i32 @REG_SPI_BASE(i32 %0)
ret i32 %2
}
double atan2(double y, double x) { return 0; }


x86 assembly (clang, -O0):
<atan2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @atan2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @atan2(double %0, double %1) {
ret double 0.000000e+00
}
void nseel_asm_if_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_if_end() {
ret void
}
/* Variables and functions */
float asinf(float);
float __glsl_asin(float x) { return asinf(x); }


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

x86 assembly (clang, -O2):
<__glsl_asin>:
jmp    1030 <asinf@plt>

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

LLVM IR (-O2):
define float @__glsl_asin(float %0) {
%2 = tail call float @asinf(float %0)
ret float %2
}