xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t strlen(char *);
void trim_end_lf(char str[]) {
  size_t len;
  len = strlen(str);
  if (str[len - 1] == '\n') {
    str[len - 1] = '\0';
  }
}


x86 assembly (clang, -O0):
<trim_end_lf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1152 <trim_end_lf+0x42>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_end_lf>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1125 <trim_end_lf+0x15>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @trim_end_lf(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i8*, i8** %2
%7 = load i64, i64* %3
%8 = sub i64 %7, 1
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 10
br i1 %12, label %13, label %18
13: ; preds = %1
%14 = load i8*, i8** %2
%15 = load i64, i64* %3
%16 = sub i64 %15, 1
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
br label %18
18: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @trim_end_lf(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, -1
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 10
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 0, i8* %4
br label %8
8: ; preds = %7, %1
ret void
}
unsigned short SwapWord21(unsigned short r) {
  return (unsigned short)(((r & 0xff00) >> 8) | ((r & 0x00ff) << 8));
}


x86 assembly (clang, -O0):
<SwapWord21>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movzwl -0x2(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapWord21>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @SwapWord21(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 65280
%6 = ashr i32 %5, 8
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @SwapWord21(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
unsigned int LCGStep(unsigned int *z, unsigned int a, unsigned int c) {
  return *z = (a * *z + c);
}


x86 assembly (clang, -O0):
<LCGStep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
imul   (%rcx),%eax
add    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCGStep>:
imul   (%rdi),%esi
lea    (%rsi,%rdx,1),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @LCGStep(i32* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* %0
%5 = mul i32 %4, %1
%6 = add i32 %5, %2
store i32 %6, i32* %0
ret i32 %6
}
short int shortint_ignoring_unsignedlonglongint(short int x,
                                                unsigned long long int y) {
  return x;
}


x86 assembly (clang, -O0):
<shortint_ignoring_unsignedlonglongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shortint_ignoring_unsignedlonglongint>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define signext i16 @shortint_ignoring_unsignedlonglongint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int writec(int fd, char c) { write(fd, &c, 1); }


x86 assembly (clang, -O0):
<writec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writec>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @writec(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
ret i32 undef
}
float __min_float(float x, float y) { return ((x) > (y) ? (y) : (x)); }


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

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

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

LLVM IR (-O2):
define float @__min_float(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %1, float %0
ret float %4
}
/* Type definitions */
typedef unsigned char uint32_t;

/* Variables and functions */
uint32_t get32le(void *arg) {
  unsigned char *p = arg;
  return (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24));
}


x86 assembly (clang, -O0):
<get32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get32le>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @get32le(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %8, %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 16
%20 = or i32 %14, %19
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 24
%26 = or i32 %20, %25
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @get32le(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "%s\n",
          "usage: lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U "
          "user]\n"
          "\t[-Z daemon-options] [-i[numcols]] [-i[numcols]] [-1234 font]\n"
          "\t[-L locale] [-wnum] [-cdfghlnmprstv] [name ...]");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [183 x i8] c"usage: lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U user]\0A\09[-Z daemon-options] [-i[numcols]] [-i[numcols]] [-1234 font]\0A\09[-L locale] [-wnum] [-cdfghlnmprstv] [name ...]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [183 x i8] c"usage: lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U user]\0A\09[-Z daemon-options] [-i[numcols]] [-i[numcols]] [-1234 font]\0A\09[-L locale] [-wnum] [-cdfghlnmprstv] [name ...]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int posix_spawnattr_getpgroup(const posix_spawnattr_t *attr, pid_t *pgroup) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<posix_spawnattr_getpgroup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_getpgroup>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_getpgroup(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_getpgroup(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int findPalindrome(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("Locating Largest Palindrome in two 3-digit numbers\n");
  printf("Using the bruteforce method\n");
  int largestPalindrome = findPalindrome(3);
  printf("The largest palindrome in 3 digits is %d\n", largestPalindrome);
  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)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <findPalindrome@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1050 <findPalindrome@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Locating Largest Palindrome in two 3-digit numbers\0A\00"
@.str.1 = [29 x i8] c"Using the bruteforce method\0A\00"
@.str.2 = [42 x i8] c"The largest palindrome in 3 digits is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @findPalindrome(i32 3)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [42 x i8] c"The largest palindrome in 3 digits is %d\0A\00"
@str = [51 x i8] c"Locating Largest Palindrome in two 3-digit numbers\00"
@str.3 = [28 x i8] c"Using the bruteforce method\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @findPalindrome(i32 3)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_DIGEST;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_DIGEST_it;
void PKCS7_DIGEST_free(PKCS7_DIGEST *a) {
  ASN1_item_free((ASN1_VALUE *)a, &PKCS7_DIGEST_it);
}


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

x86 assembly (clang, -O2):
<PKCS7_DIGEST_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@PKCS7_DIGEST_it = global i32 0
define void @PKCS7_DIGEST_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @PKCS7_DIGEST_it)
ret void
}

LLVM IR (-O2):
@PKCS7_DIGEST_it = global i32 0
define void @PKCS7_DIGEST_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS7_DIGEST_it)
ret void
}
/* Variables and functions */
#define EOF 128
int getchar();
void rm() {
  int ch, c = 0;
  while (c != -1) {
    ch = getchar();
    switch (ch) {
    case '(':
      c++;
      break;
    case ')':
    case '\n':
    case EOF:
      c--;
    }
  }
}


x86 assembly (clang, -O0):
<rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     1198 <rm+0x88>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xa,%eax
je     118a <rm+0x7a>
jmp    1147 <rm+0x37>
mov    -0xc(%rbp),%eax
sub    $0x28,%eax
je     117c <rm+0x6c>
jmp    1158 <rm+0x48>
mov    -0xc(%rbp),%eax
sub    $0x29,%eax
je     118a <rm+0x7a>
jmp    1169 <rm+0x59>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
je     118a <rm+0x7a>
jmp    1193 <rm+0x83>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1193 <rm+0x83>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <rm+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rm>:
push   %rbx
xor    %ebx,%ebx
jmp    1128 <rm+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xffffffff,%ebx
cmp    $0xffffffff,%ebx
je     115e <rm+0x4e>
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x28,%eax
jg     1150 <rm+0x40>
cmp    $0xa,%eax
je     1120 <rm+0x10>
cmp    $0x28,%eax
jne    1123 <rm+0x13>
add    $0x1,%ebx
jmp    1123 <rm+0x13>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x29,%eax
je     1120 <rm+0x10>
cmp    $0x80,%eax
je     1120 <rm+0x10>
jmp    1123 <rm+0x13>
pop    %rbx
ret

LLVM IR (-O0):
define void @rm() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = call i32 (...) @getchar()
store i32 %7, i32* %1
%8 = load i32, i32* %1
switch i32 %8, label %15 [
i32 40, label %9
i32 41, label %12
i32 10, label %12
i32 128, label %12
]
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %15
12: ; preds = %6, %6, %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, -1
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %6, %9
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @rm() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
%3 = tail call i32 (...) @getchar()
switch i32 %3, label %8 [
i32 40, label %4
i32 41, label %6
i32 10, label %6
i32 128, label %6
]
4: ; preds = %1
%5 = add nuw nsw i32 %2, 1
br label %8
6: ; preds = %1, %1, %1
%7 = add nsw i32 %2, -1
br label %8
8: ; preds = %6, %1, %4
%9 = phi i32 [ %2, %1 ], [ %7, %6 ], [ %5, %4 ]
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %1
11: ; preds = %8
ret void
}
int *hop(int *elem) { return (*elem + elem); }


x86 assembly (clang, -O0):
<hop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hop>:
movslq (%rdi),%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define i32* @hop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds i32, i32* %5, i64 %6
ret i32* %7
}

LLVM IR (-O2):
define i32* @hop(i32* %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ bfalgo(char *, int, int, int, int, int, int);
void unequals2(int x, int y) { bfalgo("$[$-$-]$[[-]$+$]", x, y, x, y, x, y); }


x86 assembly (clang, -O0):
<unequals2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x4(%rbp),%r9d
mov    -0x8(%rbp),%eax
lea    0xec7(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <bfalgo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unequals2>:
push   %rax
mov    %esi,%edx
mov    %edi,%ecx
mov    %esi,(%rsp)
lea    0xee1(%rip),%rdi
mov    %ecx,%esi
mov    %edx,%r8d
mov    %ecx,%r9d
call   1030 <bfalgo@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"$[$-$-]$[[-]$+$]\00"
define void @unequals2(i32 %0, i32 %1) {
%3 = tail call i32 @bfalgo(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %0, i32 %1, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
size_t __GetStructureFieldsNumber(const char *name) {
  (void)name;
  return 1;
}


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

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

LLVM IR (-O0):
define i64 @__GetStructureFieldsNumber(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i64 1
}

LLVM IR (-O2):
define i64 @__GetStructureFieldsNumber(i8* nocapture readnone %0) {
ret i64 1
}
/* Type definitions */
typedef int /*<<< orphan*/ GLshort;

/* Variables and functions */
int /*<<< orphan*/ glRects(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/);
void Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) {
  glRects(x1, y1, x2, y2);
}


x86 assembly (clang, -O0):
<Rects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <glRects@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rects>:
jmp    1030 <glRects@plt>

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

LLVM IR (-O2):
define void @Rects(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glRects(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap64(int /*<<< orphan*/);
void set64(char *addr, uint64_t val, bool swap) {
  if (swap)
    val = bswap64(val);
  *(uint64_t *)addr = val;
}


x86 assembly (clang, -O0):
<set64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1137 <set64+0x27>
mov    -0xc(%rbp),%edi
call   1030 <bswap64@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set64>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1121 <set64+0x11>
mov    %esi,%edi
call   1030 <bswap64@plt>
mov    %eax,%esi
mov    %esi,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set64(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @bswap64(i32 %1)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %6, %5 ], [ %1, %3 ]
%9 = bitcast i8* %0 to i32*
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_clear_dobldobl_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(337, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_clear_dobldobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x151,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_clear_dobldobl_system>:
mov    $0x151,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @syscon_clear_dobldobl_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 337, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_clear_dobldobl_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 337, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint8_t an_flsB(uint32_t x) {
  assert(x > 0);
  uint8_t bit;
  for (bit = 0; x != 1; bit++)
    x = x >> 1;
  return bit;
}


x86 assembly (clang, -O0):
<an_flsB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movq   $0x0,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1158 <an_flsB+0x48>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <an_flsB+0x24>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<an_flsB>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
call   1030 <assert@plt>
xor    %eax,%eax
cmp    $0x1,%ebx
je     113b <an_flsB+0x2b>
nopw   0x0(%rax,%rax,1)
sar    %ebx
add    $0x1,%rax
cmp    $0x1,%ebx
jne    1130 <an_flsB+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define i64 @an_flsB(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
store i64 0, i64* %3
br label %8
8: ; preds = %14, %1
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %2
%13 = ashr i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %11
%15 = load i64, i64* %3
%16 = add nsw i64 %15, 1
store i64 %16, i64* %3
br label %8
17: ; preds = %8
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @an_flsB(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i32 %0, 1
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %10, %6 ], [ 0, %1 ]
%8 = phi i32 [ %9, %6 ], [ %0, %1 ]
%9 = ashr i32 %8, 1
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i32 %9, 1
br i1 %11, label %12, label %6
12: ; preds = %6, %1
%13 = phi i64 [ 0, %1 ], [ %10, %6 ]
ret i64 %13
}
__attribute__((always_)) void
alternatives_smp_module_add(struct module *mod, char *name, void *locks,
                            void *locks_end, void *text, void *text_end) {}


x86 assembly (clang, -O0):
<alternatives_smp_module_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.module = type opaque
define void @alternatives_smp_module_add(%struct.module* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca %struct.module*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store %struct.module* %0, %struct.module** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
ret void
}

LLVM IR (-O2):
%struct.module = type opaque
define void @alternatives_smp_module_add(%struct.module* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3, i8* nocapture %4, i8* nocapture %5) {
ret void
}
/* Variables and functions */
void *clad_gar_free(void *);
void *clad_par_free(void *arr) { return clad_gar_free(arr); }


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

x86 assembly (clang, -O2):
<clad_par_free>:
jmp    1030 <clad_gar_free@plt>

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

LLVM IR (-O2):
define i8* @clad_par_free(i8* %0) {
%2 = tail call i8* @clad_gar_free(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ check(void *, int, char *, char const *);
void __is_false(void *context, const char *desc, const void *subject) {
  check(context, !!subject, "%s is not false", desc);
}


x86 assembly (clang, -O0):
<__is_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
mov    -0x10(%rbp),%rcx
lea    0xebc(%rip),%rdx
call   1030 <check@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__is_false>:
mov    %rsi,%rcx
xor    %esi,%esi
test   %rdx,%rdx
setne  %sil
lea    0xedd(%rip),%rdx
jmp    1030 <check@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s is not false\00"
define void @__is_false(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %6
%9 = icmp ne i8* %8, null
%10 = xor i1 %9, true
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = load i8*, i8** %5
%14 = call i32 @check(i8* %7, i32 %12, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s is not false\00"
define void @__is_false(i8* %0, i8* %1, i8* readnone %2) {
%4 = icmp ne i8* %2, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @check(i8* %0, i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_allhard(void) {
  char *args[2];
  args[0] = "allhard";
  args[1] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_allhard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_allhard>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"allhard\00"
define i32 @audit_warn_allhard() {
%1 = alloca [2 x i8*]
%2 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%5 = call i32 @auditwarnlog(i8** %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"allhard\00"
define i32 @audit_warn_allhard() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %4
%5 = call i32 @auditwarnlog(i8** %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, char const *);
int /*<<< orphan*/ stderr;
int fail(const char *err, const char *par) {
  fprintf(stderr, err, par);
  return 1;
}


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

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
define i32 @fail(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* %0, i8* %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ serror(char *);
argerr() { serror("illegal operand"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"illegal operand\00"
define i32 @argerr() {
%1 = alloca i32
%2 = call i32 @serror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"illegal operand\00"
define i32 @argerr() {
%1 = tail call i32 @serror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
double opDivide(double lhs, double rhs) { return lhs / rhs; }


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

x86 assembly (clang, -O2):
<opDivide>:
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @opDivide(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @opDivide(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
/* Variables and functions */
bool is_graph(char ch) { return ch >= '!' && ch <= '~'; }


x86 assembly (clang, -O0):
<is_graph>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <is_graph+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_graph>:
add    $0xdf,%dil
xor    %eax,%eax
cmp    $0x5e,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_graph(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 33
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_graph(i8 signext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ init_gdtidt();
int /*<<< orphan*/ init_palette();
int /*<<< orphan*/ init_pic();
int /*<<< orphan*/ init_pit();
int init_hw(void) {
  init_pic();
  init_palette();
  init_gdtidt();
  init_pit();
  return 0;
}


x86 assembly (clang, -O0):
<init_hw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_pic@plt>
mov    $0x0,%al
call   1060 <init_palette@plt>
mov    $0x0,%al
call   1030 <init_gdtidt@plt>
mov    $0x0,%al
call   1050 <init_pit@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_hw>:
push   %rax
xor    %eax,%eax
call   1040 <init_pic@plt>
xor    %eax,%eax
call   1060 <init_palette@plt>
xor    %eax,%eax
call   1030 <init_gdtidt@plt>
xor    %eax,%eax
call   1050 <init_pit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @init_hw() {
%1 = call i32 (...) @init_pic()
%2 = call i32 (...) @init_palette()
%3 = call i32 (...) @init_gdtidt()
%4 = call i32 (...) @init_pit()
ret i32 0
}

LLVM IR (-O2):
define i32 @init_hw() {
%1 = tail call i32 (...) @init_pic()
%2 = tail call i32 (...) @init_palette()
%3 = tail call i32 (...) @init_gdtidt()
%4 = tail call i32 (...) @init_pit()
ret i32 0
}
short f2(void) { return 0; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
cwtl
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @f2() {
ret i16 0
}

LLVM IR (-O2):
define signext i16 @f2() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ asmMicoFlushInstrCache();
void MicoFlushInstrCache(void) { asmMicoFlushInstrCache(); }


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

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

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

LLVM IR (-O2):
define void @MicoFlushInstrCache() {
%1 = tail call i32 (...) @asmMicoFlushInstrCache()
ret void
}
int hexc1(int x) { return x + 48 + (((9 - x) >> 4) & 7); }


x86 assembly (clang, -O0):
<hexc1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    $0x9,%ecx
sub    -0x4(%rbp),%ecx
sar    $0x4,%ecx
and    $0x7,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexc1>:
mov    $0x9,%eax
sub    %edi,%eax
shr    $0x4,%eax
and    $0x7,%eax
add    %edi,%eax
add    $0x30,%eax
ret

LLVM IR (-O0):
define i32 @hexc1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 48
%5 = load i32, i32* %2
%6 = sub nsw i32 9, %5
%7 = ashr i32 %6, 4
%8 = and i32 %7, 7
%9 = add nsw i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @hexc1(i32 %0) {
%2 = add nsw i32 %0, 48
%3 = sub nsw i32 9, %0
%4 = lshr i32 %3, 4
%5 = and i32 %4, 7
%6 = add nsw i32 %2, %5
ret i32 %6
}
void test_four(int x, int y) {
#pragma omp target teams distribute collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
void handle_42(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_42(i32 %0) {
ret void
}
double *inverse(double *p, double *s) {
  int i;
  for (i = 0; i < 2; i++) {
    s[i] = 1.0 / p[i];
  }
  return s;
}


x86 assembly (clang, -O0):
<inverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    114d <inverse+0x4d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xed3(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <inverse+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse>:
mov    %rsi,%rax
movsd  0xef5(%rip),%xmm0
movapd %xmm0,%xmm1
divsd  (%rdi),%xmm1
movsd  %xmm1,(%rsi)
divsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define double* @inverse(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load double*, double** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %10, i64 %12
%14 = load double, double* %13
%15 = fdiv double 1.000000e+00, %14
%16 = load double*, double** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
store double %15, double* %19
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
%24 = load double*, double** %4
ret double* %24
}

LLVM IR (-O2):
define double* @inverse(double* nocapture %0, double* returned writeonly %1) {
%3 = load double, double* %0
%4 = fdiv double 1.000000e+00, %3
store double %4, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = fdiv double 1.000000e+00, %6
%8 = getelementptr inbounds double, double* %1, i64 1
store double %7, double* %8
ret double* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void stack_underflow(void) { printf("error, stack underflow\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"error, stack underflow\0A\00"
define void @stack_underflow() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"error, stack underflow\00"
define void @stack_underflow() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ output_byte(int);
void emit_fdiv(int r) {
  assem_debug("fdiv st%d\n", r);
  output_byte(0xd8);
  output_byte(0xf0 + r);
}


x86 assembly (clang, -O0):
<emit_fdiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
mov    -0x4(%rbp),%edi
add    $0xf0,%edi
call   1040 <output_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fdiv>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0xd8,%edi
call   1040 <output_byte@plt>
add    $0xf0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_byte@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"fdiv st%d\0A\00"
define void @emit_fdiv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 216)
%6 = load i32, i32* %2
%7 = add nsw i32 240, %6
%8 = call i32 @output_byte(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"fdiv st%d\0A\00"
define void @emit_fdiv(i32 %0) {
%2 = tail call i32 @assem_debug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 216)
%4 = add nsw i32 %0, 240
%5 = tail call i32 @output_byte(i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ strchr(char *, int /*<<< orphan*/);
int isglob(const char *s, int l) {
  while (l--) {
    if (strchr("*?[", *s++))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isglob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     116c <isglob+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1167 <isglob+0x57>
movl   $0x1,-0x4(%rbp)
jmp    1173 <isglob+0x63>
jmp    111f <isglob+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isglob>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r12
mov    %esi,%r13d
xor    %r14d,%r14d
lea    0xed7(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
cmp    %ebx,%r13d
je     1151 <isglob+0x41>
movsbl (%r12,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <strchr@plt>
add    $0x1,%rbx
test   %rax,%rax
je     1130 <isglob+0x20>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"*?[\00"
define i32 @isglob(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = add nsw i32 %7, -1
store i32 %8, i32* %5
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %4
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %10
store i32 1, i32* %3
br label %20
18: ; preds = %10
br label %6
19: ; preds = %6
store i32 0, i32* %3
br label %20
20: ; preds = %19, %17
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"*?[\00"
define i32 @isglob(i8* nocapture %0, i32 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %9, %7 ]
%5 = phi i32 [ %1, %2 ], [ %8, %7 ]
%6 = icmp eq i32 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %3
%8 = add nsw i32 %5, -1
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = tail call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %3, label %14
14: ; preds = %3, %7
%15 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %15
}
int test_imm_B4uint16_reg(unsigned short val) {
  return ((val) & (-0xB4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B4uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -180
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double exp(double x) { return 0; }


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

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

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

LLVM IR (-O2):
define double @exp(double %0) {
ret double 0.000000e+00
}