xunge/DecIR huggingface dataset:
short int GetDriveParam_dx(char drive) {
  if (drive == 0)
    return 0x0101;
  else
    return 1;
}


x86 assembly (clang, -O0):
<GetDriveParam_dx>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x0,%eax
jne    1122 <GetDriveParam_dx+0x22>
movw   $0x101,-0x2(%rbp)
jmp    1128 <GetDriveParam_dx+0x28>
movw   $0x1,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDriveParam_dx>:
xor    %eax,%eax
test   %dil,%dil
sete   %al
shl    $0x8,%eax
or     $0x1,%eax
ret

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

LLVM IR (-O2):
define signext i16 @GetDriveParam_dx(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i16 257, i16 1
ret i16 %3
}
char int_to_char(int x) { return '0' + x; }


x86 assembly (clang, -O0):
<int_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @int_to_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 48, %3
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @int_to_char(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 48
ret i8 %3
}
/* Variables and functions */
int String2ByteOrder(char const *);
edf_string2byteorder(const char *string) { return (String2ByteOrder(string)); }


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

x86 assembly (clang, -O2):
<edf_string2byteorder>:
jmp    1030 <String2ByteOrder@plt>

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

LLVM IR (-O2):
define i32 @edf_string2byteorder(i8* %0) {
%2 = tail call i32 @String2ByteOrder(i8* %0)
ret i32 %2
}
/* Variables and functions */
int scan_keyboard();
int get_key(void) {
  int c = 0;
  while (c == 0) {
    c = scan_keyboard();
  }
  return (c);
}


x86 assembly (clang, -O0):
<get_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1138 <get_key+0x28>
mov    $0x0,%al
call   1030 <scan_keyboard@plt>
mov    %eax,-0x4(%rbp)
jmp    111f <get_key+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_key>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <scan_keyboard@plt>
test   %eax,%eax
je     1120 <get_key+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_key() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @scan_keyboard()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int /*<<< orphan*/ setup();
int main(void) {
  setup();
  do {
    loop();
    break;
  } while (1);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @setup()
br label %3
3: ; preds = %5, %0
%4 = call i32 (...) @loop()
br label %6
5: ; No predecessors!
br i1 true, label %3, label %6
6: ; preds = %5, %3
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @loop()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char **argv) {
  char buf[64];
  strncpy(buf, argv[1], 64 - 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    $0x3f,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
mov    $0x3f,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [64 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @strncpy(i8* %6, i8* %9, i32 63)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @strncpy(i8* %4, i8* %6, i32 63)
ret i32 0
}
int gnt_socket_fini(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @gnt_socket_fini() {
ret i32 0
}

LLVM IR (-O2):
define i32 @gnt_socket_fini() {
ret i32 0
}
int test_imm_EDint32_reg(int val) { return ((val) & (0xED << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_EDint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xed,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EDint32_reg>:
test   $0xed,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EDint32_reg(i32 %0) {
%2 = and i32 %0, 237
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main() {
  int a[1][2][3][4][3][2][1], b;
  b = a[0][1][2][3];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
lea    -0x240(%rbp),%rax
add    $0x120,%rax
add    $0xc0,%rax
add    $0x48,%rax
mov    %eax,-0x244(%rbp)
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]]
%2 = alloca i32
%3 = getelementptr inbounds [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]], [1 x [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]], [2 x [3 x [4 x [3 x [2 x [1 x i32]]]]]]* %3, i64 0, i64 1
%5 = getelementptr inbounds [3 x [4 x [3 x [2 x [1 x i32]]]]], [3 x [4 x [3 x [2 x [1 x i32]]]]]* %4, i64 0, i64 2
%6 = getelementptr inbounds [4 x [3 x [2 x [1 x i32]]]], [4 x [3 x [2 x [1 x i32]]]]* %5, i64 0, i64 3
%7 = getelementptr inbounds [3 x [2 x [1 x i32]]], [3 x [2 x [1 x i32]]]* %6, i64 0, i64 0
%8 = ptrtoint [2 x [1 x i32]]* %7 to i32
store i32 %8, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
extern void Unix_ResetParallel(void) {}


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

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

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

LLVM IR (-O2):
define void @Unix_ResetParallel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
void _diag_write_char(char c, void **param) {
  if (c == '\n') {
    outbyte('\r');
  }
  outbyte(c);
}


x86 assembly (clang, -O0):
<_diag_write_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1139 <_diag_write_char+0x29>
mov    $0xd,%edi
call   1030 <outbyte@plt>
movsbl -0x1(%rbp),%edi
call   1030 <outbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_diag_write_char>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%bl
jne    1122 <_diag_write_char+0x12>
mov    $0xd,%edi
call   1030 <outbyte@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define void @_diag_write_char(i8 signext %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 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @outbyte(i8 signext 13)
br label %10
10: ; preds = %8, %2
%11 = load i8, i8* %3
%12 = call i32 @outbyte(i8 signext %11)
ret void
}

LLVM IR (-O2):
define void @_diag_write_char(i8 signext %0, i8** nocapture readnone %1) {
%3 = icmp eq i8 %0, 10
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @outbyte(i8 signext 13)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @outbyte(i8 signext %0)
ret void
}
/* Variables and functions */
int f();
int test() {
  int ret;
  ret = f();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ flatten(int /*<<< orphan*/);
int /*<<< orphan*/ help_die(char *);
int main(int argc, char **argv) {
  if (argc != 2)
    help_die(argv[0]);
  flatten(atoi(argv[1]));
}


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)
cmpl   $0x2,-0x8(%rbp)
je     115c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <help_die@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <flatten@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1141 <main+0x11>
mov    (%rbx),%rdi
call   1030 <help_die@plt>
mov    0x8(%rbx),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <flatten@plt>
xor    %eax,%eax
pop    %rbx
ret

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 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @help_die(i8* %11)
br label %13
13: ; preds = %8, %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = call i32 @flatten(i32 %17)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @help_die(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @flatten(i32 %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ rand();
void random_matrix_long(long *a, const unsigned int rows,
                        const unsigned int cols) {
  for (unsigned int i = 0; i < rows * cols; i++) {
    a[i] = (long)rand();
  }
}


x86 assembly (clang, -O0):
<random_matrix_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
jae    115e <random_matrix_long+0x4e>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <random_matrix_long+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_matrix_long>:
push   %r15
push   %r14
push   %rbx
imul   %edx,%esi
test   %esi,%esi
je     1144 <random_matrix_long+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <random_matrix_long+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @random_matrix_long(i64* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = zext i32 %4 to i64
br label %9
8: ; preds = %9, %3
ret void
9: ; preds = %6, %9
%10 = phi i64 [ 0, %6 ], [ %13, %9 ]
%11 = tail call i64 (...) @rand()
%12 = getelementptr inbounds i64, i64* %0, i64 %10
store i64 %11, i64* %12
%13 = add nuw nsw i64 %10, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %8, label %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ntpst_usage(char *name) {
  fprintf(
      stderr,
      "\nUsage: %s <get | set>\n"
      "\tget - display the contents of the NTP Sync Timestamp to 'stdout'.\n"
      "\tset - record now time to POT partition as a NTP Sync Timestamp,\n"
      "\t\tif thers is a NTP Sync Timestamp existed yet, just display\n"
      "\t\tit without any write action.\n"
      "\tclean - clean the result in POT partition.\n",
      name);
  exit(0);
}


x86 assembly (clang, -O0):
<ntpst_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [292 x i8] c"\0AUsage: %s <get | set>\0A\09get - display the contents of the NTP Sync Timestamp to 'stdout'.\0A\09set - record now time to POT partition as a NTP Sync Timestamp,\0A\09\09if thers is a NTP Sync Timestamp existed yet, just display\0A\09\09it without any write action.\0A\09clean - clean the result in POT partition.\0A\00"
define void @ntpst_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [292 x i8] c"\0AUsage: %s <get | set>\0A\09get - display the contents of the NTP Sync Timestamp to 'stdout'.\0A\09set - record now time to POT partition as a NTP Sync Timestamp,\0A\09\09if thers is a NTP Sync Timestamp existed yet, just display\0A\09\09it without any write action.\0A\09clean - clean the result in POT partition.\0A\00"
define void @ntpst_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([292 x i8], [292 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int double_to_long_long(double);
long long pNaN(double nan) {
  return 0x7ffffffffffff & double_to_long_long(nan);
}


x86 assembly (clang, -O0):
<pNaN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_long_long@plt>
cltq
movabs $0x7ffffffffffff,%rcx
and    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pNaN>:
push   %rax
call   1030 <double_to_long_long@plt>
movslq %eax,%rcx
movabs $0x7ffffffffffff,%rax
and    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @pNaN(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @double_to_long_long(double %3)
%5 = sext i32 %4 to i64
%6 = and i64 2251799813685247, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @pNaN(double %0) {
%2 = tail call i32 @double_to_long_long(double %0)
%3 = sext i32 %2 to i64
%4 = and i64 %3, 2251799813685247
ret i64 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XArc;

/* Variables and functions */
short get_XArc_y(void *_p) { return (short)((XArc *)_p)->y; }


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

x86 assembly (clang, -O2):
<get_XArc_y>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define signext i16 @get_XArc_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
int Cyc_Execinfo_bt(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @Cyc_Execinfo_bt() {
ret i32 1
}

LLVM IR (-O2):
define i32 @Cyc_Execinfo_bt() {
ret i32 1
}
int ismedium(char c) {
  if (c > 'j' && c <= 'q')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ismedium>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x6a,%eax
jle    1130 <ismedium+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jg     1130 <ismedium+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <ismedium+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ismedium>:
add    $0x95,%dil
xor    %eax,%eax
cmp    $0x7,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @ismedium(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 106
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 113
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @ismedium(i8 signext %0) {
%2 = add i8 %0, -107
%3 = icmp ult i8 %2, 7
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ message;

/* Variables and functions */
int /*<<< orphan*/ CG_Printf(char *, char *);
int /*<<< orphan*/ trap_Args(char *, int);
void CG_NSEcho_f(void) {
  char message[256];
  trap_Args(message, sizeof(message));
  CG_Printf("%s\n", message);
}


x86 assembly (clang, -O0):
<CG_NSEcho_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
mov    $0x100,%esi
call   1030 <trap_Args@plt>
lea    -0x100(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <CG_Printf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_NSEcho_f>:
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1030 <trap_Args@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <CG_Printf@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @CG_NSEcho_f() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @trap_Args(i8* %2, i32 256)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @CG_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @CG_NSEcho_f() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @trap_Args(i8* %2, i32 256)
%4 = call i32 @CG_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char **argv) {
  printf("usage: %s infile [r(emove whitespace)]\n", argv[0]);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@.str = [40 x i8] c"usage: %s infile [r(emove whitespace)]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xfe() {
  Assert_real((isgraph(254) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              1275, ("isgraph should be 0 for 0xfe"));
}


x86 assembly (clang, -O0):
<t_isgraph_0xfe>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfe,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4fb,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0xfe>:
push   %rax
mov    $0xfe,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4fb,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xfe\00"
define void @t_isgraph_0xfe() {
%1 = call i64 @isgraph(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xfe\00"
define void @t_isgraph_0xfe() {
%1 = tail call i64 @isgraph(i32 254)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1275, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void function(int a, int b, int c) {
  int x = 15;
  *(&x + 2) += 10;
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xf,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @function(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 15, i32* %7
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 10
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @function(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
double atan(double);
double c_atan(double arg0) { return atan(arg0); }


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

x86 assembly (clang, -O2):
<c_atan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define double @c_atan(double %0) {
%2 = tail call double @atan(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  int x, y = 0;
  if (x > 0)
    printf("CIAO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113c <main+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"CIAO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int bar() {
  printf("BAR VERSION: %d\n", 0);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"BAR VERSION: %d\0A\00"
define i32 @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"BAR VERSION: %d\0A\00"
define i32 @bar() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
char *str_ndup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *str_dup(const char *src) { return str_ndup(src, strlen(src)); }


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <str_ndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <str_ndup@plt>

LLVM IR (-O0):
define i8* @str_dup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @str_ndup(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @str_ndup(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printString(char *c) { printf("%s\n", c); }


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

x86 assembly (clang, -O2):
<printString>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printString(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void restore_tty(void) {}


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

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

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

LLVM IR (-O2):
define void @restore_tty() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_parith_op();
int /*<<< orphan*/ arm_parith_qdadd(int /*<<< orphan*/);
void arm_qdadd() { arm_parith_qdadd(arm_parith_op()); }


x86 assembly (clang, -O0):
<arm_qdadd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_parith_op@plt>
mov    %eax,%edi
call   1040 <arm_parith_qdadd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_qdadd>:
push   %rax
xor    %eax,%eax
call   1030 <arm_parith_op@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <arm_parith_qdadd@plt>

LLVM IR (-O0):
define void @arm_qdadd() {
%1 = call i32 (...) @arm_parith_op()
%2 = call i32 @arm_parith_qdadd(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_qdadd() {
%1 = tail call i32 (...) @arm_parith_op()
%2 = tail call i32 @arm_parith_qdadd(i32 %1)
ret void
}
/* Variables and functions */
int EVP_DigestSignUpdate(void *, unsigned char const *, size_t);
int digestsign_update_fn(void *ctx, const unsigned char *buf, size_t buflen) {
  return EVP_DigestSignUpdate(ctx, buf, buflen);
}


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

x86 assembly (clang, -O2):
<digestsign_update_fn>:
jmp    1030 <EVP_DigestSignUpdate@plt>

LLVM IR (-O0):
define i32 @digestsign_update_fn(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @EVP_DigestSignUpdate(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @digestsign_update_fn(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @EVP_DigestSignUpdate(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ g_writeln(char *, int);
void nil_signal_handler(int sig) {
  g_writeln("xrdp-sessvc: nil_signal_handler: got signal %d", sig);
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"xrdp-sessvc: nil_signal_handler: got signal %d\00"
define void @nil_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @g_writeln(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"xrdp-sessvc: nil_signal_handler: got signal %d\00"
define void @nil_signal_handler(i32 %0) {
%2 = tail call i32 @g_writeln(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int main(void) {
  long long foo = 1;
  while (1) {
    printf("%lli: HEY "
           "LINDAjseklfnsejfsfsfsfsfsfffsfsdfsfsfsdfsdfsfsdfsdfsfsdfsfsdfk\n",
           foo);
    ++foo;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [74 x i8] c"%lli: HEY LINDAjseklfnsejfsfsfsfsfsfffsfsdfsfsfsdfsdfsfsdfsdfsfsdfsfsdfk\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
br label %3
3: ; preds = %0, %3
%4 = load i64, i64* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = load i64, i64* %2
%7 = add nsw i64 %6, 1
store i64 %7, i64* %2
br label %3
}

LLVM IR (-O2):
@.str = [74 x i8] c"%lli: HEY LINDAjseklfnsejfsfsfsfsfsfffsfsdfsfsfsdfsdfsfsdfsdfsfsdfsfsdfk\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = add nuw nsw i64 %2, 1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int str_begins_with(char *str, char *begin) {
  return strncmp(str, begin, strlen(begin)) == 0;
}


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

x86 assembly (clang, -O2):
<str_begins_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @str_begins_with(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 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @str_begins_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ util_replace_chars(char *const, int /*<<< orphan*/ *);
int /*<<< orphan*/ util_replace_whitespace(char const *const, char *const,
                                           size_t);
void transfer_id_data(const char *const str, char *const to, size_t len) {
  util_replace_whitespace(str, to, len);
  util_replace_chars(to, NULL);
}


x86 assembly (clang, -O0):
<transfer_id_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <util_replace_whitespace@plt>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <util_replace_chars@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_id_data>:
push   %rbx
mov    %rsi,%rbx
call   1030 <util_replace_whitespace@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <util_replace_chars@plt>

LLVM IR (-O0):
define void @transfer_id_data(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @util_replace_whitespace(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %5
%12 = call i32 @util_replace_chars(i8* %11, i32* null)
ret void
}

LLVM IR (-O2):
define void @transfer_id_data(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @util_replace_whitespace(i8* %0, i8* %1, i64 %2)
%5 = tail call i32 @util_replace_chars(i8* %1, i32* null)
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ syssuerr(char *, char *);
int eclose(int fd) {
  int returnmode;
  if (-1 == (returnmode = close(fd)))
    syssuerr("%s: eclose: close failed",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/"
             "trip/iwave/sucore/src/syscalls.c");
  return returnmode;
}


x86 assembly (clang, -O0):
<eclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1158 <eclose+0x38>
lea    0xeb4(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1030 <syssuerr@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eclose>:
push   %rbx
call   1040 <close@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1140 <eclose+0x20>
lea    0xecc(%rip),%rdi
lea    0xede(%rip),%rsi
call   1030 <syssuerr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"%s: eclose: close failed\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/trip/iwave/sucore/src/syscalls.c\00"
define i32 @eclose(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @close(i32 %4)
store i32 %5, i32* %3
%6 = icmp eq i32 -1, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @syssuerr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s: eclose: close failed\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/TobbeTripitaka/src/refs/heads/master/trip/iwave/sucore/src/syscalls.c\00"
define i32 @eclose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @syssuerr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
double r_net_day(double bbalb, double solar, double dem) {
  double tsw;
  tsw = 0.7;
  return ((1.0 - bbalb) * solar) - (110.0 * tsw);
}


x86 assembly (clang, -O0):
<r_net_day>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xee0(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xec6(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_net_day>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xef0(%rip),%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @r_net_day(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0x3FE6666666666666, double* %7
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %5
%11 = load double, double* %7
%12 = fmul double 1.100000e+02, %11
%13 = fneg double %12
%14 = call double @llvm.fmuladd.f64(double %9, double %10, double %13)
ret double %14
}

LLVM IR (-O2):
define double @r_net_day(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %1, double -7.700000e+01)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Process complete.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [18 x i8] c"Process complete.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t __hsail_bitmask_u64(uint32_t src0, uint32_t src1) {
  uint32_t offset = src0 & (sizeof(uint64_t) * 8 - 1);
  uint32_t width = src1 & (sizeof(uint64_t) * 8 - 1);
  uint64_t mask = ((uint64_t)1 << width) - 1;
  return mask << offset;
}


x86 assembly (clang, -O0):
<__hsail_bitmask_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0xc(%rbp)
movslq -0x8(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_bitmask_u64>:
mov    %esi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
mov    %edi,%ecx
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @__hsail_bitmask_u64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = and i64 %9, 31
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = and i64 %13, 31
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = shl i32 1, %16
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = load i32, i32* %5
%21 = shl i32 %19, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @__hsail_bitmask_u64(i32 %0, i32 %1) {
%3 = and i32 %0, 31
%4 = and i32 %1, 31
%5 = shl nsw i32 -1, %4
%6 = xor i32 %5, -1
%7 = shl i32 %6, %3
ret i32 %7
}
/* Type definitions */
struct spm {
  int dummy;
};

/* Variables and functions */
int spm_send_response(struct spm *, unsigned int, unsigned int,
                      int /*<<< orphan*/ *, int /*<<< orphan*/);
int spm_send_error(struct spm *inst, unsigned int status,
                   unsigned int command) {
  return spm_send_response(inst, status, command, NULL, 0);
}


x86 assembly (clang, -O0):
<spm_send_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <spm_send_response@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spm_send_error>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <spm_send_response@plt>

LLVM IR (-O0):
%struct.spm = type { i32 }
define i32 @spm_send_error(%struct.spm* %0, i32 %1, i32 %2) {
%4 = alloca %struct.spm*
%5 = alloca i32
%6 = alloca i32
store %struct.spm* %0, %struct.spm** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.spm*, %struct.spm** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @spm_send_response(%struct.spm* %7, i32 %8, i32 %9, i32* null, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.spm = type { i32 }
define i32 @spm_send_error(%struct.spm* %0, i32 %1, i32 %2) {
%4 = tail call i32 @spm_send_response(%struct.spm* %0, i32 %1, i32 %2, i32* null, i32 0)
ret i32 %4
}