xunge/DecIR huggingface dataset:
/* Variables and functions */
int close(int);
int /*<<< orphan*/ set_error_string(char *, int, char *);
int close_spi(int fd, char *error_string_buffer, int error_string_maxlen) {
  int ret;
  ret = close(fd);
  if (ret < 0) {
    set_error_string(error_string_buffer, error_string_maxlen,
                     "can't close device");
    return -1;
  };
  ;
  return ret;
}


x86 assembly (clang, -O0):
<close_spi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1166 <close_spi+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdx
call   1040 <set_error_string@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <close_spi+0x4c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_spi>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <close@plt>
test   %eax,%eax
jns    1147 <close_spi+0x27>
lea    0xec8(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <set_error_string@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"can't close device\00"
define i32 @close_spi(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = call i32 @close(i32 %9)
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = call i32 @set_error_string(i8* %14, i32 %15, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %19
17: ; preds = %3
%18 = load i32, i32* %8
store i32 %18, i32* %4
br label %19
19: ; preds = %17, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str = [19 x i8] c"can't close device\00"
define i32 @close_spi(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @close(i32 %0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @set_error_string(i8* %1, i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ -1, %6 ], [ %4, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void example(void) {
  fprintf(stderr, "%s:%d:Hello World!\n",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/"
          "example/e/e.c",
          4);
}


x86 assembly (clang, -O0):
<example>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee9(%rip),%rdx
mov    $0x4,%ecx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<example>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xeed(%rip),%rdx
mov    $0x4,%ecx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"%s:%d:Hello World!\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/e/e.c\00"
define void @example() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"%s:%d:Hello World!\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/OrangeTide/build/refs/heads/master/example/e/e.c\00"
define void @example() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write(int, int /*<<< orphan*/ *, int);
ssize_t i2c_write_data40(int fd, uint32_t low, uint32_t high) {
  uint32_t buffer[2];
  buffer[0] = low;
  buffer[1] = high;
  return write(fd, buffer, 5);
}


x86 assembly (clang, -O0):
<i2c_write_data40>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write_data40>:
push   %rax
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i2c_write_data40(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %8, i32* %9
%10 = load i32, i32* %6
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %10, i32* %11
%12 = load i32, i32* %4
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%14 = call i32 @write(i32 %12, i32* %13, i32 5)
ret i32 %14
}

LLVM IR (-O2):
define i32 @i2c_write_data40(i32 %0, i32 %1, i32 %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %1, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %2, i32* %7
%8 = call i32 @write(i32 %0, i32* %6, i32 5)
ret i32 %8
}
/* Type definitions */
struct ctrl_command {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_error(char *);
void cmd_set_crypt_in_key(struct ctrl_command *cmd) {
  send_error("can't set decryption key - no OpenSSL support!");
}


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

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

LLVM IR (-O0):
%struct.ctrl_command = type { i32 }
@.str = [47 x i8] c"can't set decryption key - no OpenSSL support!\00"
define void @cmd_set_crypt_in_key(%struct.ctrl_command* %0) {
%2 = alloca %struct.ctrl_command*
store %struct.ctrl_command* %0, %struct.ctrl_command** %2
%3 = call i32 @send_error(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ctrl_command = type { i32 }
@.str = [47 x i8] c"can't set decryption key - no OpenSSL support!\00"
define void @cmd_set_crypt_in_key(%struct.ctrl_command* nocapture readnone %0) {
%2 = tail call i32 @send_error(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun(char *);
void main() {
  char b[10] = "abcdefg";
  fun(b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xede(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <fun@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x67666564636261,%rax
mov    %rax,0x8(%rsp)
movw   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <fun@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.b = [10 x i8] c"abcdefg\00\00\00"
define void @main() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i32 @fun(i8* %3)
ret void
}

LLVM IR (-O2):
@__const.main.b = [10 x i8] c"abcdefg\00\00\00"
define void @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @fun(i8* %2)
ret void
}
/* Variables and functions */
int errno;
int ioctl(int, unsigned long, void *);
int __sulong_posix_ioctl(int fd, unsigned long request, void *argp) {
  {
    int native_errno = errno;
    int result = ioctl(fd, request, argp);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  }
}


x86 assembly (clang, -O0):
<__sulong_posix_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jne    115c <__sulong_posix_ioctl+0x4c>
xor    %eax,%eax
mov    0x2e8b(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
mov    0x2e7a(%rip),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_ioctl>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <ioctl@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__sulong_posix_ioctl(i32 %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i64, i64* %5
%12 = load i8*, i8** %6
%13 = call i32 @ioctl(i32 %10, i64 %11, i8* %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
br label %21
21: ; preds = %16, %3
%22 = load i32, i32* %7
store i32 %22, i32* @errno
%23 = load i32, i32* %8
ret i32 %23
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__sulong_posix_ioctl(i32 %0, i64 %1, i8* %2) {
%4 = load i32, i32* @errno
%5 = tail call i32 @ioctl(i32 %0, i64 %1, i8* %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
store i32 %4, i32* @errno
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Com_Error(int, char *, char const *);
void Com_ScriptModule_Error(const char *msg) { Com_Error(1, "%s", msg); }


x86 assembly (clang, -O0):
<Com_ScriptModule_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xed4(%rip),%rsi
call   1030 <Com_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_ScriptModule_Error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <Com_Error@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @Com_ScriptModule_Error(i8* %0) {
%2 = tail call i32 @Com_Error(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  long tv_nsec;
  long tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
long __attribute__((__no_instrument_function__)) get_ns() {
  long ns;
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  ns = ts.tv_nsec + (ts.tv_sec * 1000000000l);
  return ns;
}


x86 assembly (clang, -O0):
<get_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x18(%rbp),%rax
imul   $0x3b9aca00,-0x10(%rbp),%rcx
3b
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ns>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x10(%rsp),%rax
9a 3b
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_ns() {
%1 = alloca i64
%2 = alloca %struct.timespec
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %2)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = mul nsw i64 %8, 1000000000
%10 = add nsw i64 %6, %9
store i64 %10, i64* %1
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @get_ns() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = mul nsw i64 %8, 1000000000
%10 = add nsw i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int foo();
int main(int argc, char **argv) { return foo(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @foo()
ret i32 %3
}
float check(char c, float k) {
  if (c == 'M')
    k *= 1000000;
  else if (c == 'k')
    k *= 1000;
  else
    k *= 0.001;
  return k;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movss  %xmm0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x4d,%eax
jne    1133 <check+0x33>
movss  0xee8(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    117a <check+0x7a>
movsbl -0x1(%rbp),%eax
cmp    $0x6b,%eax
jne    1157 <check+0x57>
movss  0xec0(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1175 <check+0x75>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe98(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    117a <check+0x7a>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
cmp    $0x6b,%dil
je     1115 <check+0x15>
cmp    $0x4d,%dil
jne    111e <check+0x1e>
mulss  0xef0(%rip),%xmm0
ret
mulss  0xee3(%rip),%xmm0
ret
cvtss2sd %xmm0,%xmm0
mulsd  0xede(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @check(i8 signext %0, float %1) {
%3 = alloca i8
%4 = alloca float
store i8 %0, i8* %3
store float %1, float* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 77
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load float, float* %4
%10 = fmul float %9, 1.000000e+06
store float %10, float* %4
br label %24
11: ; preds = %2
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 107
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load float, float* %4
%17 = fmul float %16, 1.000000e+03
store float %17, float* %4
br label %23
18: ; preds = %11
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = fmul double %20, 1.000000e-03
%22 = fptrunc double %21 to float
store float %22, float* %4
br label %23
23: ; preds = %18, %15
br label %24
24: ; preds = %23, %8
%25 = load float, float* %4
ret float %25
}

LLVM IR (-O2):
define float @check(i8 signext %0, float %1) {
switch i8 %0, label %7 [
i8 77, label %3
i8 107, label %5
]
3: ; preds = %2
%4 = fmul float %1, 1.000000e+06
br label %11
5: ; preds = %2
%6 = fmul float %1, 1.000000e+03
br label %11
7: ; preds = %2
%8 = fpext float %1 to double
%9 = fmul double %8, 1.000000e-03
%10 = fptrunc double %9 to float
br label %11
11: ; preds = %5, %7, %3
%12 = phi float [ %4, %3 ], [ %6, %5 ], [ %10, %7 ]
ret float %12
}
/* Variables and functions */
scalar_t__ malloc(int);
const int *get_num1() {
  int *x = (int *)malloc(sizeof(int) * 1);
  *x = 1;
  return x;
}


x86 assembly (clang, -O0):
<get_num1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num1>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x1,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @get_num1() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 1, i32* %4
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @get_num1() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 1, i32* %2
ret i32* %2
}
/* Type definitions */
struct em8051 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int disasm_jmp_indir_a_dptr(struct em8051 *aCPU, int aPosition, char *aBuffer) {
  sprintf(aBuffer, "JMP   @A+DPTR");
  return 1;
}


x86 assembly (clang, -O0):
<disasm_jmp_indir_a_dptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disasm_jmp_indir_a_dptr>:
movabs $0x525450442b4140,%rax
mov    %rax,0x6(%rdx)
movabs $0x4140202020504d4a,%rax
20 40 41
mov    %rax,(%rdx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.em8051 = type { i32 }
@.str = [14 x i8] c"JMP @A+DPTR\00"
define i32 @disasm_jmp_indir_a_dptr(%struct.em8051* %0, i32 %1, i8* %2) {
%4 = alloca %struct.em8051*
%5 = alloca i32
%6 = alloca i8*
store %struct.em8051* %0, %struct.em8051** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.em8051 = type { i32 }
@.str = [14 x i8] c"JMP @A+DPTR\00"
define i32 @disasm_jmp_indir_a_dptr(%struct.em8051* nocapture readnone %0, i32 %1, i8* nocapture writeonly %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(14) %2, i8* align 1 dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 14, i1 false)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
int warnif(int ret, const char *message) {
  if (ret != 0) {
    perror(message);
  }
  return ret;
}


x86 assembly (clang, -O0):
<warnif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <warnif+0x22>
mov    -0x10(%rbp),%rdi
call   1030 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warnif>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jne    111b <warnif+0xb>
mov    %ebx,%eax
pop    %rbx
ret
mov    %rsi,%rdi
call   1030 <perror@plt>
jmp    1117 <warnif+0x7>

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

LLVM IR (-O2):
define i32 @warnif(i32 returned %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @perror(i8* %1)
br label %6
6: ; preds = %4, %2
ret i32 %0
}
/* Variables and functions */
char *alloc_string(size_t, size_t);
int /*<<< orphan*/ memset(char *, char, size_t);
char *make_string(size_t size, size_t misalignment, size_t equal_count,
                  bool left_right) {
  char *buf = alloc_string(size, misalignment);
  memset(buf, left_right ? 'z' : 'A', size);
  memset(buf, ' ', equal_count);
  return buf;
}


x86 assembly (clang, -O0):
<make_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <alloc_string@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x41,%eax
mov    $0x7a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    -0x8(%rbp),%rdx
movsbl %al,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x20,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %rdx,%r14
mov    %rdi,%rbx
call   1040 <alloc_string@plt>
mov    %rax,%rbp
test   %r15d,%r15d
mov    $0x41,%eax
mov    $0x7a,%esi
cmove  %eax,%esi
mov    %rbp,%rdi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %rbp,%rdi
mov    $0x20,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @make_string(i64 %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i8*
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = call i8* @alloc_string(i64 %10, i64 %11)
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = load i32, i32* %8
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 122, i32 65
%18 = trunc i32 %17 to i8
%19 = load i64, i64* %5
%20 = call i32 @memset(i8* %13, i8 signext %18, i64 %19)
%21 = load i8*, i8** %9
%22 = load i64, i64* %7
%23 = call i32 @memset(i8* %21, i8 signext 32, i64 %22)
%24 = load i8*, i8** %9
ret i8* %24
}

LLVM IR (-O2):
define i8* @make_string(i64 %0, i64 %1, i64 %2, i32 %3) {
%5 = tail call i8* @alloc_string(i64 %0, i64 %1)
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i8 65, i8 122
%8 = tail call i32 @memset(i8* %5, i8 signext %7, i64 %0)
%9 = tail call i32 @memset(i8* %5, i8 signext 32, i64 %2)
ret i8* %5
}
const char *test_failure_str(int reason) {
  if (reason == 0)
    return "Unknown";
  if (reason == 1)
    return "Bus Error";
  return "Internal Error";
}


x86 assembly (clang, -O0):
<test_failure_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1121 <test_failure_str+0x21>
lea    0xee8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <test_failure_str+0x46>
cmpl   $0x1,-0xc(%rbp)
jne    113b <test_failure_str+0x3b>
lea    0xed6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <test_failure_str+0x46>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_failure_str>:
cmp    $0x1,%edi
lea    0xefe(%rip),%rax
lea    0xf01(%rip),%rcx
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee2(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Unknown\00"
@.str.1 = [10 x i8] c"Bus Error\00"
@.str.2 = [15 x i8] c"Internal Error\00"
define i8* @test_failure_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %7
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"Unknown\00"
@.str.1 = [10 x i8] c"Bus Error\00"
@.str.2 = [15 x i8] c"Internal Error\00"
define i8* @test_failure_str(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void mus_ulshort_to_char(unsigned char *j, unsigned short x) {
  unsigned char *ox;
  ox = (unsigned char *)&x;
  j[0] = ox[1];
  j[1] = ox[0];
}


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

x86 assembly (clang, -O2):
<mus_ulshort_to_char>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @mus_ulshort_to_char(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = bitcast i16* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @mus_ulshort_to_char(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int sip_content_length_to_string(int content_length, char **p_buffer) {
  if (p_buffer && *p_buffer) {
    sprintf(*p_buffer,
            "Content-Length"
            ": %d",
            content_length);
    return (int)0;
  }
  return (int)-1;
}


x86 assembly (clang, -O0):
<sip_content_length_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <sip_content_length_to_string+0x4a>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     115a <sip_content_length_to_string+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%edx
lea    0xeb7(%rip),%rsi
call   1030 <sprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1161 <sip_content_length_to_string+0x51>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sip_content_length_to_string>:
push   %rax
mov    $0xffffffff,%eax
test   %rsi,%rsi
je     1133 <sip_content_length_to_string+0x23>
mov    %edi,%edx
mov    (%rsi),%rdi
test   %rdi,%rdi
je     1133 <sip_content_length_to_string+0x23>
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Content-Length: %d\00"
define i32 @sip_content_length_to_string(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 i8**, i8*** %5
%7 = icmp ne i8** %6, null
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = load i32, i32* %4
%16 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %15)
store i32 0, i32* %3
br label %18
17: ; preds = %8, %2
store i32 -1, i32* %3
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [19 x i8] c"Content-Length: %d\00"
define i32 @sip_content_length_to_string(i32 %0, i8** %1) {
%3 = icmp eq i8** %1, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %9
9: ; preds = %2, %4, %7
%10 = phi i32 [ 0, %7 ], [ -1, %4 ], [ -1, %2 ]
ret i32 %10
}
unsigned int compute_Indlfh(unsigned int const Indfh) { return Indfh % 9; }


x86 assembly (clang, -O0):
<compute_Indlfh>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_Indlfh>:
mov    %edi,%eax
mov    %edi,%ecx
imul   $0x38e38e39,%rcx,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compute_Indlfh(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = urem i32 %3, 9
ret i32 %4
}

LLVM IR (-O2):
define i32 @compute_Indlfh(i32 %0) {
%2 = urem i32 %0, 9
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *);
int die(const char *err_msg) {
  syslog(LOG_ERR, "%s\n", err_msg);
  return 1;
}


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

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <syslog@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @die(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
double funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double *, double *);
double sin(double);
double fitAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double *x, double *par) {
  double result;
  result = funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(x, &par[0]) *
           sin(x[0] * 0.0174533);
  return result;
}


x86 assembly (clang, -O0):
<fitAngDist_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeb2(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitAngDist_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xec1(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fitAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = call double @funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double* %6, double* %8)
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fmul double %12, 1.745330e-02
%14 = call double @sin(double %13)
%15 = fmul double %9, %14
store double %15, double* %5
%16 = load double, double* %5
ret double %16
}

LLVM IR (-O2):
define double @fitAngDist_alpha1_3minus_2plus_15097_L1_L3_L5(double* %0, double* %1) {
%3 = tail call double @funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double* %0, double* %1)
%4 = load double, double* %0
%5 = fmul double %4, 1.745330e-02
%6 = tail call double @sin(double %5)
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void panic(const char *p) {
  printf("EXIT %s\n", p);
  exit(1);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"EXIT %s\0A\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"EXIT %s\0A\00"
define void @panic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_constant0() {
  clang_analyzer_eval(strncasecmp("abc", "Abc", 3) == 0);
}


x86 assembly (clang, -O0):
<strncasecmp_constant0>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_constant0>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Abc\00"
define void @strncasecmp_constant0() {
%1 = call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @clang_analyzer_eval(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Abc\00"
define void @strncasecmp_constant0() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
float stbir__saturate(float x) {
  if (x < 0)
    return 0;
  if (x > 1)
    return 1;
  return x;
}


x86 assembly (clang, -O0):
<stbir__saturate>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1123 <stbir__saturate+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <stbir__saturate+0x55>
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <stbir__saturate+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <stbir__saturate+0x55>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbir__saturate>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @stbir__saturate(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %13
7: ; preds = %1
%8 = load float, float* %3
%9 = fcmp ogt float %8, 1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store float 1.000000e+00, float* %2
br label %13
11: ; preds = %7
%12 = load float, float* %3
store float %12, float* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @stbir__saturate(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 1.000000e+00
%4 = select i1 %3, float 1.000000e+00, float %0
%5 = select i1 %2, float 0.000000e+00, float %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((destructor)) void main_term() { printf("main_term\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"main_term\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @main_term, i8* null }]
define void @main_term() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @main_term, i8* null }]
@str = [10 x i8] c"main_term\00"
define void @main_term() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Swc_main();
int main(void) {
  Swc_main();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Swc_main@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Swc_main@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Swc_main()
ret i32 0
}
long millicelsius_to_milli_kelvin(long t) { return t - -273150; }


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

x86 assembly (clang, -O2):
<millicelsius_to_milli_kelvin>:
lea    0x42afe(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @millicelsius_to_milli_kelvin(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 %3, -273150
ret i64 %4
}

LLVM IR (-O2):
define i64 @millicelsius_to_milli_kelvin(i64 %0) {
%2 = add nsw i64 %0, 273150
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char *argv[]) {
  int i1 = 100, i2 = 40;
  float f1;
  f1 = i1 / i2;
  printf("%f\n", f1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movl   $0x28,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
store i32 40, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = sdiv i32 %9, %10
%12 = sitofp i32 %11 to float
store float %12, float* %8
%13 = load float, float* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 2.000000e+00)
ret i32 0
}
/* Type definitions */
struct sched_param {
  int sched_priority;
};

/* Variables and functions */
int /*<<< orphan*/ SCHED_FIFO;
int /*<<< orphan*/ perror(char *);
int sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                       struct sched_param *);
void set_rtprio(void) {
  int ret;
  struct sched_param p = {
      .sched_priority = 10,
  };
  ret = sched_setscheduler(0, SCHED_FIFO, &p);
  if (ret)
    perror("sched_setscheduler");
}


x86 assembly (clang, -O0):
<set_rtprio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115e <set_rtprio+0x3e>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_rtprio>:
push   %rax
movl   $0xa,(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <sched_setscheduler@plt>
test   %eax,%eax
jne    1141 <set_rtprio+0x21>
pop    %rax
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@__const.set_rtprio.p = %struct.sched_param { i32 10 }
@SCHED_FIFO = global i32 0
@.str = [19 x i8] c"sched_setscheduler\00"
define void @set_rtprio() {
%1 = alloca i32
%2 = alloca %struct.sched_param
%3 = bitcast %struct.sched_param* %2 to i8*
%4 = load i32, i32* @SCHED_FIFO
%5 = call i32 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %2)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
@.str = [19 x i8] c"sched_setscheduler\00"
define void @set_rtprio() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 10, i32* %3
%4 = load i32, i32* @SCHED_FIFO
%5 = call i32 @sched_setscheduler(i32 0, i32 %4, %struct.sched_param* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret void
}
/* Variables and functions */
int p2(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int x, y, z;
  x = 1;
  y = 2;
  z = p2(x, y);
  printf("%d + %d = %d\n", x, y, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <p2@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <p2@plt>
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @p2(i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 %1)
ret i32 0
}
/* Variables and functions */
int close(int);
int sysClose(int nFd) { return close(nFd); }


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

x86 assembly (clang, -O2):
<sysClose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @sysClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void perf_counters_clear(void) {}


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

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

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

LLVM IR (-O2):
define void @perf_counters_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void shl_reg32_cl(unsigned long reg32) {
  put8(0xD3);
  put8(0xE0 + reg32);
}


x86 assembly (clang, -O0):
<shl_reg32_cl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xd3,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
add    $0xe0,%rax
mov    %eax,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shl_reg32_cl>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd3,%edi
call   1030 <put8@plt>
add    $0xe0,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @shl_reg32_cl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @put8(i32 211)
%4 = load i64, i64* %2
%5 = add i64 224, %4
%6 = trunc i64 %5 to i32
%7 = call i32 @put8(i32 %6)
ret void
}

LLVM IR (-O2):
define void @shl_reg32_cl(i64 %0) {
%2 = tail call i32 @put8(i32 211)
%3 = trunc i64 %0 to i32
%4 = add i32 %3, 224
%5 = tail call i32 @put8(i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int equal_string(void *s1, void *s2) {
  char *s1a = (char *)s1;
  char *s2a = (char *)s2;
  return (strcmp(s1a, s2a) == 0);
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}