xunge/DecIR huggingface dataset:
void fd153(int n) {
a : {
  typedef int(*b)[n];
P01A:
  goto P01A;
  {
    typedef int(*c)[n];
  P012A:
    goto P012A;
    0;
  }
P01B:
  goto P01B;
  {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
P01C:
  goto P01C;
  ;
  typedef int(*e)[n];
P014A:
  goto P014A;
  0;
};
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    p024A:
      goto p024A;
      goto a;
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd153>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd153+0x7>

x86 assembly (clang, -O2):
<fd153>:
jmp    1100 <fd153>

LLVM IR (-O0):
define void @fd153(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %6, %3
br label %6
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %10, %7
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %15, %12
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %20, %17
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd153(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int bot_fileutils_read_line_timeout_ex(int, void *, int, int, int *);
int bot_fileutils_read_line_timeout(int fd, void *buf_in, int maxlen,
                                    int msTimeout) {
  int timed_out;
  return bot_fileutils_read_line_timeout_ex(fd, buf_in, maxlen, msTimeout,
                                            &timed_out);
}


x86 assembly (clang, -O0):
<bot_fileutils_read_line_timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    -0x1c(%rbp),%r8
call   1030 <bot_fileutils_read_line_timeout_ex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_fileutils_read_line_timeout>:
push   %rax
lea    0x4(%rsp),%r8
call   1030 <bot_fileutils_read_line_timeout_ex@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bot_fileutils_read_line_timeout(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @bot_fileutils_read_line_timeout_ex(i32 %0, i8* %1, i32 %2, i32 %3, i32* %5)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ err;

/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ kill_child();
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void handle_sig(int signum) {
  (void)signum;
  char err[] = "!!! Killing wpa_supplicant and exiting !!!\n";
  write(STDERR_FILENO, err, sizeof(err));
  kill_child();
}


x86 assembly (clang, -O0):
<handle_sig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
mov    $0x2c,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <kill_child@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sig>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x2c,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1040 <kill_child@plt>

LLVM IR (-O0):
@__const.handle_sig.err = [44 x i8] c"!!! Killing wpa_supplicant and exiting !!!\0A\00"
@STDERR_FILENO = global i32 0
define void @handle_sig(i32 %0) {
%2 = alloca i32
%3 = alloca [44 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast [44 x i8]* %3 to i8*
%6 = load i32, i32* @STDERR_FILENO
%7 = getelementptr inbounds [44 x i8], [44 x i8]* %3, i64 0, i64 0
%8 = call i32 @write(i32 %6, i8* %7, i32 44)
%9 = call i32 (...) @kill_child()
ret void
}

LLVM IR (-O2):
@__const.handle_sig.err = [44 x i8] c"!!! Killing wpa_supplicant and exiting !!!\0A\00"
@STDERR_FILENO = global i32 0
define void @handle_sig(i32 %0) {
%2 = alloca [44 x i8]
%3 = getelementptr inbounds [44 x i8], [44 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @STDERR_FILENO
%5 = call i32 @write(i32 %4, i8* %3, i32 44)
%6 = tail call i32 (...) @kill_child()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_mkdir(char *);
int /*<<< orphan*/ filesystem_zeroclear();
void yrfsCreateFs() {
  filesystem_zeroclear();
  command_mkdir("/");
}


x86 assembly (clang, -O0):
<yrfsCreateFs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <filesystem_zeroclear@plt>
lea    0xece(%rip),%rdi
call   1040 <command_mkdir@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<yrfsCreateFs>:
push   %rax
xor    %eax,%eax
call   1030 <filesystem_zeroclear@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <command_mkdir@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define void @yrfsCreateFs() {
%1 = call i32 (...) @filesystem_zeroclear()
%2 = call i32 @command_mkdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @yrfsCreateFs() {
%1 = tail call i32 (...) @filesystem_zeroclear()
%2 = tail call i32 @command_mkdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
char *mactrim(s)
char *s;
{
  register char *t = macro(s);
  trim(t);
  return (t);
}


x86 assembly (clang, -O0):
<mactrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <macro@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <trim@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mactrim>:
push   %rbx
xor    %eax,%eax
call   1040 <macro@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <trim@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mactrim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @macro to i32 (i8*, ...)*)(i8* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @trim to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @mactrim(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @macro to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @trim to i32 (i8*, ...)*)(i8* %4)
ret i8* %4
}
/* Type definitions */
struct group {
  int dummy;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct group *getgrgid(gid_t gid __attribute__((unused))) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<getgrgid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.group* @getgrgid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.group* null
}

LLVM IR (-O2):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.group* @getgrgid(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret %struct.group* null
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int getlsb(int);
int poplsb(uint64_t *bb) {
  int lsb = getlsb(*bb);
  *bb &= *bb - 1;
  return lsb;
}


x86 assembly (clang, -O0):
<poplsb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <getlsb@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poplsb>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <getlsb@plt>
mov    (%rbx),%ecx
lea    -0x1(%rcx),%edx
and    %ecx,%edx
mov    %edx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @poplsb(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @getlsb(i32 %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = sub nsw i32 %8, 1
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = and i32 %11, %9
store i32 %12, i32* %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @poplsb(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @getlsb(i32 %2)
%4 = load i32, i32* %0
%5 = add nsw i32 %4, -1
%6 = and i32 %5, %4
store i32 %6, i32* %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int sum;
  sum = 25 + 37 - 19;
  printf("The answer is %i.\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2b,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"The answer is %i.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 43, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"The answer is %i.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 43)
ret i32 0
}
/* Type definitions */
struct lfn_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ copy_lfn_part(unsigned char *, struct lfn_entry *);
int uni2ascii(unsigned char *, char *, int);
int extract_lfn(void *lfn, char *asciidest) {
  static unsigned char uniname[((10 + 12 + 4) / 2) * 2];
  copy_lfn_part(uniname, (struct lfn_entry *)lfn);
  return uni2ascii(uniname, asciidest, ((10 + 12 + 4) / 2));
}


x86 assembly (clang, -O0):
<extract_lfn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f05(%rip),%rdi
call   1040 <copy_lfn_part@plt>
mov    -0x10(%rbp),%rsi
lea    0x2ef5(%rip),%rdi
mov    $0xd,%edx
call   1030 <uni2ascii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_lfn>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0x2f0f(%rip),%r14
mov    %r14,%rdi
call   1040 <copy_lfn_part@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0xd,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <uni2ascii@plt>

LLVM IR (-O0):
%struct.lfn_entry = type { i32 }
@extract_lfn.uniname = internal global [26 x i8] zeroinitializer
define i32 @extract_lfn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.lfn_entry*
%7 = call i32 @copy_lfn_part(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @extract_lfn.uniname, i64 0, i64 0), %struct.lfn_entry* %6)
%8 = load i8*, i8** %4
%9 = call i32 @uni2ascii(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @extract_lfn.uniname, i64 0, i64 0), i8* %8, i32 13)
ret i32 %9
}

LLVM IR (-O2):
%struct.lfn_entry = type { i32 }
@extract_lfn.uniname = internal global [26 x i8] zeroinitializer
define i32 @extract_lfn(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to %struct.lfn_entry*
%4 = tail call i32 @copy_lfn_part(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @extract_lfn.uniname, i64 0, i64 0), %struct.lfn_entry* %3)
%5 = tail call i32 @uni2ascii(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @extract_lfn.uniname, i64 0, i64 0), i8* %1, i32 13)
ret i32 %5
}
/* Variables and functions */
int getStopFreq(int, int);
int getSbrStopFreqRAW(int stopFreq, int QMFbands, int fs) {
  int result;
  ;
  ;
  ;
  ;
  if (stopFreq < 0 || stopFreq > 13) {
    ;
    return -1;
  };
  result = getStopFreq(fs, stopFreq);
  ;
  ;
  ;
  ;
  result = (result * fs / QMFbands + 1) >> 1;
  ;
  return (result);
}


x86 assembly (clang, -O0):
<getSbrStopFreqRAW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1135 <getSbrStopFreqRAW+0x25>
cmpl   $0xd,-0x8(%rbp)
jle    1141 <getSbrStopFreqRAW+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <getSbrStopFreqRAW+0x59>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <getStopFreq@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSbrStopFreqRAW>:
mov    $0xffffffff,%eax
cmp    $0xd,%edi
ja     113b <getSbrStopFreqRAW+0x2b>
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%esi
mov    %edx,%edi
call   1030 <getStopFreq@plt>
imul   %ebp,%eax
cltd
idiv   %ebx
add    $0x1,%eax
sar    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getSbrStopFreqRAW(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i32, i32* %5
%13 = icmp sgt i32 %12, 13
br i1 %13, label %14, label %15
14: ; preds = %11, %3
store i32 -1, i32* %4
br label %27
15: ; preds = %11
%16 = load i32, i32* %7
%17 = load i32, i32* %5
%18 = call i32 @getStopFreq(i32 %16, i32 %17)
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %7
%21 = mul nsw i32 %19, %20
%22 = load i32, i32* %6
%23 = sdiv i32 %21, %22
%24 = add nsw i32 %23, 1
%25 = ashr i32 %24, 1
store i32 %25, i32* %8
%26 = load i32, i32* %8
store i32 %26, i32* %4
br label %27
27: ; preds = %15, %14
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @getSbrStopFreqRAW(i32 %0, i32 %1, i32 %2) {
%4 = icmp ugt i32 %0, 13
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = tail call i32 @getStopFreq(i32 %2, i32 %0)
%7 = mul nsw i32 %6, %2
%8 = sdiv i32 %7, %1
%9 = add nsw i32 %8, 1
%10 = ashr i32 %9, 1
br label %11
11: ; preds = %3, %5
%12 = phi i32 [ %10, %5 ], [ -1, %3 ]
ret i32 %12
}
/* Variables and functions */
scalar_t__ mystrchr(char *, int /*<<< orphan*/);
int mystrspn(char *str1, char *str2) {
  int i = 0;
  while (mystrchr(str2, str1++))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<mystrspn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    %eax,%esi
call   1030 <mystrchr@plt>
cmp    $0x0,%rax
je     1159 <mystrspn+0x49>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <mystrspn+0x17>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrspn>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %r15d,%esi
call   1030 <mystrchr@plt>
test   %rax,%rax
je     1156 <mystrspn+0x46>
add    $0x1,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%esi
add    $0x1,%ebx
mov    %r14,%rdi
call   1030 <mystrchr@plt>
test   %rax,%rax
jne    1140 <mystrspn+0x30>
jmp    1158 <mystrspn+0x48>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @mystrspn(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i64 @mystrchr(i8* %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %11, %7 ], [ 0, %2 ]
%9 = phi i8* [ %10, %7 ], [ %0, %2 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = add nuw nsw i32 %8, 1
%12 = ptrtoint i8* %10 to i64
%13 = trunc i64 %12 to i32
%14 = tail call i64 @mystrchr(i8* %1, i32 %13)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %2
%17 = phi i32 [ 0, %2 ], [ %11, %7 ]
ret i32 %17
}
int ft_tolower(int c) { return (c > 64 && c < 91 ? c + 32 : c); }


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1129 <ft_tolower+0x29>
cmpl   $0x5b,-0x4(%rbp)
jge    1129 <ft_tolower+0x29>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <ft_tolower+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 64
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 91
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
br label %13
11: ; preds = %5, %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ %12, %11 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ glk_put_char(char);
void trm_eol() { glk_put_char('\n'); }


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

x86 assembly (clang, -O2):
<trm_eol>:
mov    $0xa,%edi
jmp    1030 <glk_put_char@plt>

LLVM IR (-O0):
define void @trm_eol() {
%1 = call i32 @glk_put_char(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @trm_eol() {
%1 = tail call i32 @glk_put_char(i8 signext 10)
ret void
}
/* Variables and functions */
long _portcmd(int, void *);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
long mon_portcmd(int cmd, void *arg) {
  long ret;
  monLock();
  ret = _portcmd(cmd, arg);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_portcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <_portcmd@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_portcmd>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <_portcmd@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @mon_portcmd(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 (...) @monLock()
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i64 @_portcmd(i32 %7, i8* %8)
store i64 %9, i64* %5
%10 = call i32 (...) @monUnlock()
%11 = load i64, i64* %5
ret i64 %11
}

LLVM IR (-O2):
define i64 @mon_portcmd(i32 %0, i8* %1) {
%3 = tail call i32 (...) @monLock()
%4 = tail call i64 @_portcmd(i32 %0, i8* %1)
%5 = tail call i32 (...) @monUnlock()
ret i64 %4
}
/* Variables and functions */
int jac_jacobi_zeros(double *, int const, double, double);
int jac_zeros_gj(double *z, const int Q, double alpha, double beta) {
  return jac_jacobi_zeros(z, Q, alpha, beta);
}


x86 assembly (clang, -O0):
<jac_zeros_gj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <jac_jacobi_zeros@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_zeros_gj>:
jmp    1030 <jac_jacobi_zeros@plt>

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

LLVM IR (-O2):
define i32 @jac_zeros_gj(double* %0, i32 %1, double %2, double %3) {
%5 = tail call i32 @jac_jacobi_zeros(double* %0, i32 %1, double %2, double %3)
ret i32 %5
}
/* Variables and functions */
void *GetClearedMemory(int);
void *Z_Malloc(int size) { return GetClearedMemory(size); }


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

x86 assembly (clang, -O2):
<Z_Malloc>:
jmp    1030 <GetClearedMemory@plt>

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

LLVM IR (-O2):
define i8* @Z_Malloc(i32 %0) {
%2 = tail call i8* @GetClearedMemory(i32 %0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ isNumericOk(char *, int, int);
int /*<<< orphan*/ setConfigTextValue(char *, char *);
int updateHistoryInterval(char *value) {
  if (isNumericOk(value, 5000, 60000)) {
    setConfigTextValue("web.history_interval", value);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<updateHistoryInterval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1388,%esi
mov    $0xea60,%edx
call   1040 <isNumericOk@plt>
cmp    $0x0,%rax
je     1165 <updateHistoryInterval+0x45>
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <setConfigTextValue@plt>
movl   $0x1,-0x4(%rbp)
jmp    116c <updateHistoryInterval+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateHistoryInterval>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1388,%esi
mov    $0xea60,%edx
call   1040 <isNumericOk@plt>
test   %rax,%rax
je     114e <updateHistoryInterval+0x2e>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <setConfigTextValue@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"web.history_interval\00"
define i32 @updateHistoryInterval(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @isNumericOk(i8* %4, i32 5000, i32 60000)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @setConfigTextValue(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [21 x i8] c"web.history_interval\00"
define i32 @updateHistoryInterval(i8* %0) {
%2 = tail call i64 @isNumericOk(i8* %0, i32 5000, i32 60000)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @setConfigTextValue(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
char *strchr(const char *p, int ch) {
  char c;
  c = ch;
  for (;; ++p) {
    if (*p == c) {
      return ((char *)p);
    }
    if (*p == '\0') {
      return (NULL);
    }
  }
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
jne    1131 <strchr+0x31>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <strchr+0x64>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    114e <strchr+0x4e>
movq   $0x0,-0x8(%rbp)
jmp    1164 <strchr+0x64>
jmp    1153 <strchr+0x53>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <strchr+0x11>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
movsbl (%rdi),%edx
cmp    %edx,%ecx
je     1120 <strchr+0x20>
xchg   %ax,%ax
test   %dl,%dl
je     1121 <strchr+0x21>
movsbl 0x1(%rax),%edx
add    $0x1,%rax
cmp    %edx,%ecx
jne    1110 <strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %17, label %8
8: ; preds = %2, %12
%9 = phi i8 [ %14, %12 ], [ %5, %2 ]
%10 = phi i8* [ %13, %12 ], [ %0, %2 ]
%11 = icmp eq i8 %9, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %4, %15
br i1 %16, label %17, label %8
17: ; preds = %12, %8, %2
%18 = phi i8* [ %0, %2 ], [ null, %8 ], [ %13, %12 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_menu(void) {
  printf("1. DMS to DD.DDD         \n2. DD.DDD to DMS         \n3. Normal "
         "gravity on GRS80 ellipsoid         \n4. Geodetic coordinates to 3D "
         "cartesian coordinates         \n5. 3D Cartesian coordinates to "
         "geodetic coordinates         \n6. UTM Scale error by easting         "
         "\n7. Exit         \n");
}


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

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

LLVM IR (-O0):
@.str = [277 x i8] c"1. DMS to DD.DDD \0A2. DD.DDD to DMS \0A3. Normal gravity on GRS80 ellipsoid \0A4. Geodetic coordinates to 3D cartesian coordinates \0A5. 3D Cartesian coordinates to geodetic coordinates \0A6. UTM Scale error by easting \0A7. Exit \0A\00"
define void @print_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([277 x i8], [277 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [276 x i8] c"1. DMS to DD.DDD \0A2. DD.DDD to DMS \0A3. Normal gravity on GRS80 ellipsoid \0A4. Geodetic coordinates to 3D cartesian coordinates \0A5. 3D Cartesian coordinates to geodetic coordinates \0A6. UTM Scale error by easting \0A7. Exit \00"
define void @print_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([276 x i8], [276 x i8]* @str, i64 0, i64 0))
ret void
}
int bc(int i) {
  if (i < 0)
    return 60 - 1;
  if (i >= 60)
    return 0;
  return i;
}


x86 assembly (clang, -O0):
<bc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <bc+0x1d>
movl   $0x3b,-0x4(%rbp)
jmp    1139 <bc+0x39>
cmpl   $0x3c,-0x8(%rbp)
jl     1133 <bc+0x33>
movl   $0x0,-0x4(%rbp)
jmp    1139 <bc+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bc>:
xor    %ecx,%ecx
cmp    $0x3c,%edi
cmovl  %edi,%ecx
test   %edi,%edi
mov    $0x3b,%eax
cmovns %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 59, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 60
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 0, i32* %2
br label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @bc(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = icmp sgt i32 %0, 59
%4 = select i1 %3, i32 0, i32 %0
%5 = select i1 %2, i32 59, i32 %4
ret i32 %5
}
int __test_and_clear_bit(int nr, volatile unsigned long *addr) {
  unsigned long mask = (1UL << ((nr) % ((int)sizeof(unsigned long) * 8)));
  unsigned long *p =
      ((unsigned long *)addr) + ((nr) / ((int)sizeof(unsigned long) * 8));
  unsigned long old = *p;
  *p = old & ~mask;
  return (old & mask) != 0;
}


x86 assembly (clang, -O0):
<__test_and_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
and    -0x18(%rbp),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__test_and_clear_bit>:
lea    0x3f(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %eax,%ecx
and    $0xffffffc0,%ecx
sub    %ecx,%edi
sar    $0x6,%eax
cltq
mov    (%rsi,%rax,8),%rcx
mov    %rcx,%rdx
btr    %rdi,%rdx
mov    %rdx,(%rsi,%rax,8)
xor    %eax,%eax
bt     %rdi,%rcx
setb   %al
ret

LLVM IR (-O0):
define i32 @__test_and_clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64
store i32 %0, i32* %3
store i64* %1, i64** %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 64
%10 = zext i32 %9 to i64
%11 = shl i64 1, %10
store i64 %11, i64* %5
%12 = load i64*, i64** %4
%13 = load i32, i32* %3
%14 = sdiv i32 %13, 64
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i64, i64* %12, i64 %15
store i64* %16, i64** %6
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
store i64 %18, i64* %7
%19 = load i64, i64* %7
%20 = load i64, i64* %5
%21 = xor i64 %20, -1
%22 = and i64 %19, %21
%23 = load i64*, i64** %6
store i64 %22, i64* %23
%24 = load i64, i64* %7
%25 = load i64, i64* %5
%26 = and i64 %24, %25
%27 = icmp ne i64 %26, 0
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @__test_and_clear_bit(i32 %0, i64* nocapture %1) {
%3 = srem i32 %0, 64
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = sdiv i32 %0, 64
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = xor i64 %5, -1
%11 = and i64 %9, %10
store i64 %11, i64* %8
%12 = and i64 %9, %5
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
double hypotf(double, double);
double math__Float__hypot_with(double self, double p0) {
  double var;
  double var1;
  var1 = hypotf(self, p0);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<math__Float__hypot_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <hypotf@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math__Float__hypot_with>:
jmp    1030 <hypotf@plt>

LLVM IR (-O0):
define double @math__Float__hypot_with(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call double @hypotf(double %7, double %8)
store double %9, double* %6
%10 = load double, double* %6
store double %10, double* %5
br label %11
11: ; preds = %2
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @math__Float__hypot_with(double %0, double %1) {
%3 = tail call double @hypotf(double %0, double %1)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ __chk_fail();
scalar_t__ __glibc_unlikely(int);
scalar_t__ __mempcpy(char *, char *, size_t);
wchar_t *__wmempcpy_chk(wchar_t *s1, const wchar_t *s2, size_t n, size_t ns1) {
  if (__glibc_unlikely(ns1 < n))
    __chk_fail();
  return (wchar_t *)__mempcpy((char *)s1, (char *)s2, n * sizeof(wchar_t));
}


x86 assembly (clang, -O0):
<__wmempcpy_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__glibc_unlikely@plt>
cmp    $0x0,%rax
je     116e <__wmempcpy_chk+0x3e>
mov    $0x0,%al
call   1040 <__chk_fail@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <__mempcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wmempcpy_chk>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
cmp    %rdx,%rcx
setb   %dil
call   1050 <__glibc_unlikely@plt>
test   %rax,%rax
je     1158 <__wmempcpy_chk+0x28>
xor    %eax,%eax
call   1040 <__chk_fail@plt>
shl    $0x2,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <__mempcpy@plt>

LLVM IR (-O0):
define i32* @__wmempcpy_chk(i32* %0, i32* %1, i64 %2, i64 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i64
store i32* %0, i32** %5
store i32* %1, i32** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = load i64, i64* %7
%11 = icmp ult i64 %9, %10
%12 = zext i1 %11 to i32
%13 = call i64 @__glibc_unlikely(i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %4
%16 = call i32 (...) @__chk_fail()
br label %17
17: ; preds = %15, %4
%18 = load i32*, i32** %5
%19 = bitcast i32* %18 to i8*
%20 = load i32*, i32** %6
%21 = bitcast i32* %20 to i8*
%22 = load i64, i64* %7
%23 = mul i64 %22, 4
%24 = call i64 @__mempcpy(i8* %19, i8* %21, i64 %23)
%25 = inttoptr i64 %24 to i32*
ret i32* %25
}

LLVM IR (-O2):
define i32* @__wmempcpy_chk(i32* %0, i32* %1, i64 %2, i64 %3) {
%5 = icmp ult i64 %3, %2
%6 = zext i1 %5 to i32
%7 = tail call i64 @__glibc_unlikely(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 (...) @__chk_fail()
br label %11
11: ; preds = %9, %4
%12 = bitcast i32* %0 to i8*
%13 = bitcast i32* %1 to i8*
%14 = shl i64 %2, 2
%15 = tail call i64 @__mempcpy(i8* %12, i8* %13, i64 %14)
%16 = inttoptr i64 %15 to i32*
ret i32* %16
}
void __asan_after_dynamic_init() {}


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

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

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

LLVM IR (-O2):
define void @__asan_after_dynamic_init() {
ret void
}
char get_shape_char(int shape) {
  switch (shape) {
  case 0:
    return 'I';
  case 1:
    return 'J';
  case 2:
    return 'L';
  case 3:
    return 'O';
  case 4:
    return 'S';
  case 5:
    return 'T';
  case 6:
    return 'Z';
  }
  return 'Q';
}


x86 assembly (clang, -O0):
<get_shape_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x6,%rax
ja     116b <get_shape_char+0x6b>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x49,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x4a,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x4c,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x4f,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x53,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x54,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x5a,-0x1(%rbp)
jmp    116f <get_shape_char+0x6f>
movb   $0x51,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shape_char>:
lea    0x0(,%rdi,8),%ecx
movabs $0x5a54534f4c4a49,%rdx
shr    %cl,%rdx
cmp    $0x7,%edi
mov    $0x51,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @get_shape_char(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
]
5: ; preds = %1
store i8 73, i8* %2
br label %13
6: ; preds = %1
store i8 74, i8* %2
br label %13
7: ; preds = %1
store i8 76, i8* %2
br label %13
8: ; preds = %1
store i8 79, i8* %2
br label %13
9: ; preds = %1
store i8 83, i8* %2
br label %13
10: ; preds = %1
store i8 84, i8* %2
br label %13
11: ; preds = %1
store i8 90, i8* %2
br label %13
12: ; preds = %1
store i8 81, i8* %2
br label %13
13: ; preds = %12, %11, %10, %9, %8, %7, %6, %5
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @get_shape_char(i32 %0) {
%2 = icmp ult i32 %0, 7
%3 = zext i32 %0 to i56
%4 = shl nuw nsw i56 %3, 3
%5 = lshr i56 25425464693377609, %4
%6 = trunc i56 %5 to i8
%7 = select i1 %2, i8 %6, i8 81
ret i8 %7
}
old(argc, argv) int argc;
char **argv;
{}


x86 assembly (clang, -O0):
<old>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @old(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int rt_mynode();
signed int rt_par_init(signed int *argc, char ***argv) {
  signed int a = 0;
  a = rt_mynode();
  return a;
}


x86 assembly (clang, -O0):
<rt_par_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rt_mynode@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rt_par_init(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = tail call i32 (...) @rt_mynode()
ret i32 %3
}
/* Type definitions */
struct pico_mqtt_serializer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_2_byte_stream(struct pico_mqtt_serializer *, int);
int create_stream(struct pico_mqtt_serializer *, int);
int serialize_pingresp(struct pico_mqtt_serializer *serializer) {
  do {
  } while (0);
  if (create_stream(serializer, 2) == -1) {
    do {
    } while (0);
    return -1;
  }
  add_2_byte_stream(serializer, 0xD000);
  return 0;
}


x86 assembly (clang, -O0):
<serialize_pingresp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
jmp    1131 <serialize_pingresp+0x11>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1030 <create_stream@plt>
cmp    $0xffffffff,%eax
jne    115e <serialize_pingresp+0x3e>
jmp    114d <serialize_pingresp+0x2d>
jmp    1152 <serialize_pingresp+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <serialize_pingresp+0x53>
mov    -0x10(%rbp),%rdi
mov    $0xd000,%esi
call   1040 <add_2_byte_stream@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_pingresp>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2,%esi
call   1030 <create_stream@plt>
cmp    $0xffffffff,%eax
je     1144 <serialize_pingresp+0x24>
mov    %rbx,%rdi
mov    $0xd000,%esi
call   1040 <add_2_byte_stream@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.pico_mqtt_serializer = type { i32 }
define i32 @serialize_pingresp(%struct.pico_mqtt_serializer* %0) {
%2 = tail call i32 @create_stream(%struct.pico_mqtt_serializer* %0, i32 2)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @add_2_byte_stream(%struct.pico_mqtt_serializer* %0, i32 53248)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: wc [-lwc] [name ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
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):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}