xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int put_int_sum(int a, int b) {
  if (a == 0 && b == 0)
    return 0;
  printf("%d\n", a + b);
  return a + b;
}


x86 assembly (clang, -O0):
<put_int_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113e <put_int_sum+0x2e>
cmpl   $0x0,-0xc(%rbp)
jne    113e <put_int_sum+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1159 <put_int_sum+0x49>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_int_sum>:
push   %rbx
mov    %esi,%eax
or     %edi,%eax
je     112b <put_int_sum+0x1b>
mov    %esi,%ebx
add    %edi,%ebx
lea    0xede(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    112d <put_int_sum+0x1d>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @put_int_sum(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = add nsw i32 %1, %0
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %9
}
void INT_TO_ASCII(unsigned char int_value, unsigned char *ascii_text) {
  unsigned char resto = int_value % 10;
  ascii_text[1] = resto + 0x30;
  ascii_text[0] = int_value / 10 + 0x30;
}


x86 assembly (clang, -O0):
<INT_TO_ASCII>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movzbl -0x1(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_TO_ASCII>:
imul   $0xcd,%edi,%eax
shr    $0xb,%eax
lea    (%rax,%rax,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%dil
or     $0x30,%dil
mov    %dil,0x1(%rsi)
add    $0x30,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @INT_TO_ASCII(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = srem i32 %7, 10
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = add nsw i32 %11, 48
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = sdiv i32 %17, 10
%19 = add nsw i32 %18, 48
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 0
store i8 %20, i8* %22
ret void
}

LLVM IR (-O2):
define void @INT_TO_ASCII(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = urem i8 %0, 10
%4 = or i8 %3, 48
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %5
%6 = udiv i8 %0, 10
%7 = add nuw nsw i8 %6, 48
store i8 %7, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getData();
int /*<<< orphan*/ showData();
int /*<<< orphan*/ sortData();
int main() {
  getData();
  sortData();
  showData();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getData()
%2 = tail call i32 (...) @sortData()
%3 = tail call i32 (...) @showData()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_message_2(int n) { printf("Message 2\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"Message 2\00"
define void @print_message_2(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void put2(void *b, uint16_t v) {
  assert(b != NULL);
  ((uint8_t *)b)[0] = (v >> 8) & 0xFF;
  ((uint8_t *)b)[1] = (v >> 0) & 0xFF;
}


x86 assembly (clang, -O0):
<put2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %ebp,%ecx
movzbl %ch,%eax
mov    %eax,(%rbx)
movzbl %cl,%eax
mov    %eax,0x4(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @put2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to i32*
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 %11, i32* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 0
%17 = and i32 %16, 255
%18 = load i8*, i8** %3
%19 = bitcast i8* %18 to i32*
%20 = getelementptr inbounds i32, i32* %19, i64 1
store i32 %17, i32* %20
ret void
}

LLVM IR (-O2):
define void @put2(i8* writeonly %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = bitcast i8* %0 to i32*
store i32 %7, i32* %8
%9 = and i32 %1, 255
%10 = getelementptr inbounds i8, i8* %0, i64 4
%11 = bitcast i8* %10 to i32*
store i32 %9, i32* %11
ret void
}
int Section3Second(int *number) { return *number % 1000 / 100; }


x86 assembly (clang, -O0):
<Section3Second>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section3Second>:
movslq (%rdi),%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
cwtl
imul   $0x147b,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x13,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Section3Second(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = srem i32 %4, 1000
%6 = sdiv i32 %5, 100
ret i32 %6
}

LLVM IR (-O2):
define i32 @Section3Second(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = srem i32 %2, 1000
%4 = trunc i32 %3 to i16
%5 = sdiv i16 %4, 100
%6 = sext i16 %5 to i32
ret i32 %6
}
/* Variables and functions */
void Draw_ClearWindow(void) {}


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

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

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

LLVM IR (-O2):
define void @Draw_ClearWindow() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int service_snmp_init(char *ip, int sp, unsigned char options, char *miscptr,
                      FILE *fp, int port) {
  return 0;
}


x86 assembly (clang, -O0):
<service_snmp_init>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @service_snmp_init(i8* %0, i32 %1, i8 zeroext %2, i8* %3, i32* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8 %2, i8* %9
store i8* %3, i8** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @service_snmp_init(i8* nocapture readnone %0, i32 %1, i8 zeroext %2, i8* nocapture readnone %3, i32* nocapture readnone %4, i32 %5) {
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ random();
void entropy() {
  struct timespec t;
  clock_gettime(CLOCK_REALTIME, &t);
  int n = t.tv_nsec % 25;
  while (n--)
    random();
}


x86 assembly (clang, -O0):
<entropy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%eax
mov    $0x19,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1168 <entropy+0x48>
mov    $0x0,%al
call   1040 <random@plt>
jmp    1148 <entropy+0x28>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entropy>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movslq 0x8(%rsp),%rbx
imul   $0x51eb851f,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
je     116c <entropy+0x4c>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <random@plt>
add    $0xffffffff,%ebx
jne    1160 <entropy+0x40>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @entropy() {
%1 = alloca %struct.timespec
%2 = alloca i32
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = srem i32 %6, 25
store i32 %7, i32* %2
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
%11 = icmp ne i32 %9, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @random()
br label %8
14: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @entropy() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = srem i32 %6, 25
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %0, %9
%10 = phi i32 [ %11, %9 ], [ %7, %0 ]
%11 = add nsw i32 %10, -1
%12 = call i32 (...) @random()
%13 = icmp eq i32 %11, 0
br i1 %13, label %14, label %9
14: ; preds = %9, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strobe();
void zylons() {
  while (1) {
    strobe();
  }
}


x86 assembly (clang, -O0):
<zylons>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <zylons+0x9>
mov    $0x0,%al
call   1030 <strobe@plt>
jmp    1119 <zylons+0x9>

x86 assembly (clang, -O2):
<zylons>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <strobe@plt>
jmp    1120 <zylons+0x10>

LLVM IR (-O0):
define void @zylons() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @strobe()
br label %1
}

LLVM IR (-O2):
define void @zylons() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @strobe()
br label %1
}
int set_fileattr(const char *fname, unsigned attrib) {
  int ret_flag = 0;
  return ret_flag;
}


x86 assembly (clang, -O0):
<set_fileattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @set_fileattr(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ S9xSA1SetPCBase(int /*<<< orphan*/);
int /*<<< orphan*/ SA1AbsoluteIndirectLong(int);
void OpDC(void) { S9xSA1SetPCBase(SA1AbsoluteIndirectLong(5)); }


x86 assembly (clang, -O0):
<OpDC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1040 <SA1AbsoluteIndirectLong@plt>
mov    %eax,%edi
call   1030 <S9xSA1SetPCBase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpDC>:
push   %rax
mov    $0x5,%edi
call   1040 <SA1AbsoluteIndirectLong@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <S9xSA1SetPCBase@plt>

LLVM IR (-O0):
define void @OpDC() {
%1 = call i32 @SA1AbsoluteIndirectLong(i32 5)
%2 = call i32 @S9xSA1SetPCBase(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpDC() {
%1 = tail call i32 @SA1AbsoluteIndirectLong(i32 5)
%2 = tail call i32 @S9xSA1SetPCBase(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_equal_int(int, int, char *, char *);
int pl_endswith(char *, char *);
void test_endswith_empty_postfix() {
  char the_string[] = "http://duckduckgo.com";
  int ret_val = pl_endswith(the_string, "");
  assert_equal_int(-1, ret_val, "test_endswith_empty_postfix",
                   "Error code not returned.");
}


x86 assembly (clang, -O0):
<test_endswith_empty_postfix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec6(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
lea    0xeed(%rip),%rsi
call   1030 <pl_endswith@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
mov    $0xffffffff,%edi
lea    0xea2(%rip),%rdx
lea    0xeb7(%rip),%rcx
call   1040 <assert_equal_int@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_endswith_empty_postfix>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x6d6f632e6f676b,%rax
mov    %rax,0xe(%rsp)
lea    0xf05(%rip),%rsi
mov    %rsp,%rdi
call   1030 <pl_endswith@plt>
lea    0xec2(%rip),%rdx
lea    0xed7(%rip),%rcx
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1040 <assert_equal_int@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_endswith_empty_postfix.the_string = [22 x i8] c"http://duckduckgo.com\00"
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"test_endswith_empty_postfix\00"
@.str.2 = [25 x i8] c"Error code not returned.\00"
define void @test_endswith_empty_postfix() {
%1 = alloca [22 x i8]
%2 = alloca i32
%3 = bitcast [22 x i8]* %1 to i8*
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%5 = call i32 @pl_endswith(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @assert_equal_int(i32 -1, i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.test_endswith_empty_postfix.the_string = [22 x i8] c"http://duckduckgo.com\00"
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"test_endswith_empty_postfix\00"
@.str.2 = [25 x i8] c"Error code not returned.\00"
define void @test_endswith_empty_postfix() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @pl_endswith(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @assert_equal_int(i32 -1, i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_strcpy(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char str[1024] = {};
  my_strcpy(str, "hello world!");
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
lea    -0x410(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1030 <my_strcpy@plt>
lea    -0x410(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <my_strcpy@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = bitcast [1024 x i8]* %2 to i8*
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32 @my_strcpy(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_strcpy(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @puts(i8* %2)
ret i32 0
}
int pdb_get_version_major(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pdb_get_version_major() {
ret i32 1
}
const char *rrd_memory_mode_name(int id) {
  static const char ram[] = "ram";
  static const char map[] = "map";
  static const char save[] = "save";
  switch (id) {
  case 0:
    return ram;
  case 1:
    return map;
  case 2:
  default:
    return save;
  }
  return save;
}


x86 assembly (clang, -O0):
<rrd_memory_mode_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <rrd_memory_mode_name+0x3c>
jmp    111a <rrd_memory_mode_name+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <rrd_memory_mode_name+0x4c>
jmp    112b <rrd_memory_mode_name+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <rrd_memory_mode_name+0x5c>
jmp    1161 <rrd_memory_mode_name+0x61>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <rrd_memory_mode_name+0x6c>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <rrd_memory_mode_name+0x6c>
jmp    1161 <rrd_memory_mode_name+0x61>
lea    0xea0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@rrd_memory_mode_name.ram = internal constant [4 x i8] c"ram\00"
@rrd_memory_mode_name.map = internal constant [4 x i8] c"map\00"
@rrd_memory_mode_name.save = internal constant [5 x i8] c"save\00"
define i8* @rrd_memory_mode_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @rrd_memory_mode_name.ram, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @rrd_memory_mode_name.map, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
br label %8
8: ; preds = %1, %7
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @rrd_memory_mode_name.save, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@rrd_memory_mode_name.ram = internal constant [4 x i8] c"ram\00"
@rrd_memory_mode_name.map = internal constant [4 x i8] c"map\00"
@rrd_memory_mode_name.save = internal constant [5 x i8] c"save\00"
define i8* @rrd_memory_mode_name(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @rrd_memory_mode_name.map, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @rrd_memory_mode_name.save, i64 0, i64 0)
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @rrd_memory_mode_name.ram, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
bool is_big_endian() {
  int v = 0x0D0C0B0A;
  char c = *(char *)&v;
  if (c == 0x0A)
    return false;
  return true;
}


x86 assembly (clang, -O0):
<is_big_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0xd0c0b0a,-0x8(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    112a <is_big_endian+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1131 <is_big_endian+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_big_endian() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nc_thread_done();
int /*<<< orphan*/ printf(char *);
void toggle_green_fn(void *stack) {
  (void)stack;
  printf("\n Toggle GREEN led\n");
  nc_thread_done();
}


x86 assembly (clang, -O0):
<toggle_green_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <nc_thread_done@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle_green_fn>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <nc_thread_done@plt>

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

LLVM IR (-O2):
@str = [19 x i8] c"\0A Toggle GREEN led\00"
define void @toggle_green_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @nc_thread_done()
ret void
}
void ab6cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab6cdefghijklmnopqrstuvwxzy() {
ret void
}
void *test_anti_range_92(long n) {
  extern void *alloc_anti_range_92(long) __attribute__((alloc_size(1)));
  if (0x7fffffffffffffffL - 2 <= n && n <= 0x7fffffffffffffffL - 1)
    n = 0x7fffffffffffffffL - 2 - 1;
  return alloc_anti_range_92(n);
}


x86 assembly (clang, -O0):
<test_anti_range_92>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
cmp    -0x8(%rbp),%rax
jg     1152 <test_anti_range_92+0x42>
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    %rax,-0x8(%rbp)
jg     1152 <test_anti_range_92+0x42>
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_92@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_92>:
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
lea    (%rdi,%rax,1),%rcx
add    $0x7,%rcx
cmp    $0x2,%rcx
cmovb  %rax,%rdi
jmp    1030 <alloc_anti_range_92@plt>

LLVM IR (-O0):
define i8* @test_anti_range_92(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 9223372036854775805, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 9223372036854775806
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 9223372036854775804, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_92(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_92(i64 %0) {
%2 = add i64 %0, -9223372036854775805
%3 = icmp ult i64 %2, 2
%4 = select i1 %3, i64 9223372036854775804, i64 %0
%5 = tail call i8* @alloc_anti_range_92(i64 %4)
ret i8* %5
}
/* Variables and functions */
unsigned int _bzhi_u32(unsigned int, int);
unsigned int f4(unsigned int x) { return _bzhi_u32(x, 5); }


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

x86 assembly (clang, -O2):
<f4>:
mov    $0x5,%esi
jmp    1030 <_bzhi_u32@plt>

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

LLVM IR (-O2):
define i32 @f4(i32 %0) {
%2 = tail call i32 @_bzhi_u32(i32 %0, i32 5)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_diff_length_3() {
  char *x = "123";
  char *y = "12345";
  clang_analyzer_eval(strcmp(x, y) < 0);
}


x86 assembly (clang, -O0):
<strcmp_diff_length_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_diff_length_3>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strcmp_diff_length_3() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strcmp_diff_length_3() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void imprimir_char(void *data) { printf("%c", *((char *)data)); }


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

x86 assembly (clang, -O2):
<imprimir_char>:
movsbl (%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @imprimir_char(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %2)
ret void
}
void initI8k(struct SensorModul *sm) { (void)sm; }


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

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

LLVM IR (-O0):
%struct.SensorModul = type opaque
define void @initI8k(%struct.SensorModul* %0) {
%2 = alloca %struct.SensorModul*
store %struct.SensorModul* %0, %struct.SensorModul** %2
%3 = load %struct.SensorModul*, %struct.SensorModul** %2
ret void
}

LLVM IR (-O2):
%struct.SensorModul = type opaque
define void @initI8k(%struct.SensorModul* nocapture %0) {
ret void
}
falFreeFont() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @falFreeFont() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf_verbose(char *);
void *pa_context_new(void) {
  printf_verbose("pa_context_new(...) = BLOCKED;");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"pa_context_new(...) = BLOCKED;\00"
define i8* @pa_context_new() {
%1 = call i32 @printf_verbose(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [31 x i8] c"pa_context_new(...) = BLOCKED;\00"
define noalias i8* @pa_context_new() {
%1 = tail call i32 @printf_verbose(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
struct surface {
  int dummy;
};

/* Variables and functions */
struct surface *combine_densities(struct surface *, struct surface *, double);
struct surface *add_densities(struct surface *den1, struct surface *den2) {
  struct surface *den;
  den = combine_densities(den1, den2, (double)(1.0));
  return (den);
}


x86 assembly (clang, -O0):
<add_densities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  0xed0(%rip),%xmm0
call   1030 <combine_densities@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_densities>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <combine_densities@plt>

LLVM IR (-O0):
%struct.surface = type { i32 }
define %struct.surface* @add_densities(%struct.surface* %0, %struct.surface* %1) {
%3 = alloca %struct.surface*
%4 = alloca %struct.surface*
%5 = alloca %struct.surface*
store %struct.surface* %0, %struct.surface** %3
store %struct.surface* %1, %struct.surface** %4
%6 = load %struct.surface*, %struct.surface** %3
%7 = load %struct.surface*, %struct.surface** %4
%8 = call %struct.surface* @combine_densities(%struct.surface* %6, %struct.surface* %7, double 1.000000e+00)
store %struct.surface* %8, %struct.surface** %5
%9 = load %struct.surface*, %struct.surface** %5
ret %struct.surface* %9
}

LLVM IR (-O2):
%struct.surface = type { i32 }
define %struct.surface* @add_densities(%struct.surface* %0, %struct.surface* %1) {
%3 = tail call %struct.surface* @combine_densities(%struct.surface* %0, %struct.surface* %1, double 1.000000e+00)
ret %struct.surface* %3
}
/* Variables and functions */
double PMPI_Wtick();
double MPI_Wtick(void) {
  ;
  return PMPI_Wtick();
}


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

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

LLVM IR (-O0):
define double @MPI_Wtick() {
%1 = call double (...) @PMPI_Wtick()
ret double %1
}

LLVM IR (-O2):
define double @MPI_Wtick() {
%1 = tail call double (...) @PMPI_Wtick()
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ MyUnGrabKeyboard();
int /*<<< orphan*/ StopSaveMouseMotion();
void UngrabMachine(void) {
  StopSaveMouseMotion();
  MyUnGrabKeyboard();
}


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

x86 assembly (clang, -O2):
<UngrabMachine>:
push   %rax
xor    %eax,%eax
call   1040 <StopSaveMouseMotion@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <MyUnGrabKeyboard@plt>

LLVM IR (-O0):
define void @UngrabMachine() {
%1 = call i32 (...) @StopSaveMouseMotion()
%2 = call i32 (...) @MyUnGrabKeyboard()
ret void
}

LLVM IR (-O2):
define void @UngrabMachine() {
%1 = tail call i32 (...) @StopSaveMouseMotion()
%2 = tail call i32 (...) @MyUnGrabKeyboard()
ret void
}
int main(int argc, char **argv) {
  switch (0) {
  default:
    1 + (int __attribute__((unit(m))))2;
  }
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int ctoi(unsigned char c) {
  switch (c) {
  case 48:
    return 0;
  case 49:
    return 1;
  case 50:
    return 2;
  case 51:
    return 3;
  case 52:
    return 4;
  case 53:
    return 5;
  case 54:
    return 6;
  case 55:
    return 7;
  case 56:
    return 8;
  case 57:
    return 9;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     11ac <ctoi+0xac>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x1,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x2,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x3,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x4,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x5,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x6,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x7,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x8,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0x9,-0x4(%rbp)
jmp    11b3 <ctoi+0xb3>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
add    $0xd0,%dil
cmp    $0xa,%dil
movzbl %dil,%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ctoi(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %16 [
i32 48, label %6
i32 49, label %7
i32 50, label %8
i32 51, label %9
i32 52, label %10
i32 53, label %11
i32 54, label %12
i32 55, label %13
i32 56, label %14
i32 57, label %15
]
6: ; preds = %1
store i32 0, i32* %2
br label %17
7: ; preds = %1
store i32 1, i32* %2
br label %17
8: ; preds = %1
store i32 2, i32* %2
br label %17
9: ; preds = %1
store i32 3, i32* %2
br label %17
10: ; preds = %1
store i32 4, i32* %2
br label %17
11: ; preds = %1
store i32 5, i32* %2
br label %17
12: ; preds = %1
store i32 6, i32* %2
br label %17
13: ; preds = %1
store i32 7, i32* %2
br label %17
14: ; preds = %1
store i32 8, i32* %2
br label %17
15: ; preds = %1
store i32 9, i32* %2
br label %17
16: ; preds = %1
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ctoi(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i8 %2 to i32
%5 = select i1 %3, i32 %4, i32 -1
ret i32 %5
}
/* Variables and functions */
int tolower(int);
int nat_unify_case(int a) { return tolower(a); }


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

x86 assembly (clang, -O2):
<nat_unify_case>:
jmp    1030 <tolower@plt>

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

LLVM IR (-O2):
define i32 @nat_unify_case(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int quot;
  int rem;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
div_t div(int num, int denom) {
  div_t result;
  result.quot = num / denom;
  result.rem = num % denom;
  return result;
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i64 @div(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sdiv i32 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i32 %12, i32* %13
%14 = bitcast %struct.TYPE_3__* %3 to i64*
%15 = load i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = srem i32 %0, %1
%5 = zext i32 %4 to i64
%6 = shl nuw i64 %5, 32
%7 = zext i32 %3 to i64
%8 = or i64 %6, %7
ret i64 %8
}
/* Variables and functions */
int getLowerControlPoint(int);
int getUpperControlPoint(int v) { return getLowerControlPoint(v) + 1; }


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

x86 assembly (clang, -O2):
<getUpperControlPoint>:
push   %rax
call   1030 <getLowerControlPoint@plt>
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @getUpperControlPoint(i32 %0) {
%2 = tail call i32 @getLowerControlPoint(i32 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
void rop3_44_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_44_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_44_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_44_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = xor i32 %32, -1
%34 = and i32 %30, %33
%35 = load i8, i8* %6
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = load i8, i8* %6
%50 = zext i8 %49 to i32
%51 = and i32 %48, %50
%52 = or i32 %45, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_44_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *funkcja(void *unused) { printf("Start funkcji z watku\n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Start funkcji z watku\00"
define noalias i8* @funkcja(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i8* undef
}
int div(int x, int y) {
  int r;
  r = x / y;
  return r;
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @div(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACVLANHashFilterSet(uint32_t ui32Base, uint32_t ui32Hash) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000588))) = ui32Hash;
}


x86 assembly (clang, -O0):
<EMACVLANHashFilterSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x588,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANHashFilterSet>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x400ec000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    %ebx,0x588(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @EMACVLANHashFilterSet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1074708480
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1416
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
ret void
}

LLVM IR (-O2):
define void @EMACVLANHashFilterSet(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074708480
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 1416
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %1, i32* %8
ret void
}
/* Variables and functions */
scalar_t__ swe_deltat(double);
double swe_get_ayanamsa(scalar_t__);
double swe_get_ayanamsa_ut(double tjd_ut) {
  return swe_get_ayanamsa(tjd_ut + swe_deltat(tjd_ut));
}


x86 assembly (clang, -O0):
<swe_get_ayanamsa_ut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <swe_deltat@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <swe_get_ayanamsa@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_get_ayanamsa_ut>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <swe_deltat@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1030 <swe_get_ayanamsa@plt>

LLVM IR (-O0):
define double @swe_get_ayanamsa_ut(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call i64 @swe_deltat(double %4)
%6 = sitofp i64 %5 to double
%7 = fadd double %3, %6
%8 = fptosi double %7 to i64
%9 = call double @swe_get_ayanamsa(i64 %8)
ret double %9
}

LLVM IR (-O2):
define double @swe_get_ayanamsa_ut(double %0) {
%2 = tail call i64 @swe_deltat(double %0)
%3 = sitofp i64 %2 to double
%4 = fadd double %3, %0
%5 = fptosi double %4 to i64
%6 = tail call double @swe_get_ayanamsa(i64 %5)
ret double %6
}