xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No FIPS CMAC support\n");
  return (0);
}


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)
lea    0xed3(%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 = [22 x i8] c"No FIPS CMAC support\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"No FIPS CMAC support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void process_simple_aim_response(struct TCP_STREAM *stream,
                                 struct NetFrame *frame,
                                 const unsigned char *px, unsigned length) {
  stream = (stream);
  frame = (frame);
  px = (px);
  length = (length);
}


x86 assembly (clang, -O0):
<process_simple_aim_response>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TCP_STREAM = type opaque
%struct.NetFrame = type opaque
define void @process_simple_aim_response(%struct.TCP_STREAM* %0, %struct.NetFrame* %1, i8* %2, i32 %3) {
%5 = alloca %struct.TCP_STREAM*
%6 = alloca %struct.NetFrame*
%7 = alloca i8*
%8 = alloca i32
store %struct.TCP_STREAM* %0, %struct.TCP_STREAM** %5
store %struct.NetFrame* %1, %struct.NetFrame** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.TCP_STREAM*, %struct.TCP_STREAM** %5
store %struct.TCP_STREAM* %9, %struct.TCP_STREAM** %5
%10 = load %struct.NetFrame*, %struct.NetFrame** %6
store %struct.NetFrame* %10, %struct.NetFrame** %6
%11 = load i8*, i8** %7
store i8* %11, i8** %7
%12 = load i32, i32* %8
store i32 %12, i32* %8
ret void
}

LLVM IR (-O2):
%struct.TCP_STREAM = type opaque
%struct.NetFrame = type opaque
define void @process_simple_aim_response(%struct.TCP_STREAM* nocapture %0, %struct.NetFrame* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
void debug_dma_assert_idle(struct page *page) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @debug_dma_assert_idle(%struct.page* nocapture %0) {
ret void
}
int uidSecure(int uid) {
  const int secureUidMin = 1005;
  const int secureUidMax = 1005;
  return secureUidMin <= uid && uid <= secureUidMax;
}


x86 assembly (clang, -O0):
<uidSecure>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x3ed,-0x8(%rbp)
movl   $0x3ed,-0xc(%rbp)
xor    %eax,%eax
mov    $0x3ed,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     1135 <uidSecure+0x35>
cmpl   $0x3ed,-0x4(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uidSecure>:
xor    %eax,%eax
cmp    $0x3ed,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @uidSecure(i32 %0) {
%2 = icmp eq i32 %0, 1005
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fn1(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
void fn2(void) { fn1(0, 0, 0); }


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <fn1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <fn1@plt>

LLVM IR (-O0):
define void @fn2() {
%1 = call i32 @fn1(i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @fn2() {
%1 = tail call i32 @fn1(i32 0, i32 0, i32 0)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void x_gettimeofday(struct timeval *tv) {
  if (gettimeofday(tv, NULL) == -1) {
    fprintf(stderr, "Unable to retrieve local time\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<x_gettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
jne    1175 <x_gettimeofday+0x45>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_gettimeofday>:
push   %rax
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
je     113f <x_gettimeofday+0xf>
pop    %rax
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"Unable to retrieve local time\0A\00"
@EXIT_FAILURE = global i32 0
define void @x_gettimeofday(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@stderr = global i32 0
@.str = [31 x i8] c"Unable to retrieve local time\0A\00"
@EXIT_FAILURE = global i32 0
define void @x_gettimeofday(%struct.timeval* nocapture %0) {
%2 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
void set_XButtonPressedEvent_y(void *_p, int _v) {
  ((XButtonPressedEvent *)_p)->y = (int)_v;
}


x86 assembly (clang, -O0):
<set_XButtonPressedEvent_y>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XButtonPressedEvent_y>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XButtonPressedEvent_y(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XButtonPressedEvent_y(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
char *strcpy(char *dest, const char *src) {
  char *oldDest = dest;
  while ((*dest = *src) != 0) {
    src++;
    dest++;
  }
  return oldDest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1149 <strcpy+0x49>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     111f <strcpy+0x1f>
mov    $0x1,%ecx
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %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
store i8* %6, i8** %5
br label %7
7: ; preds = %13, %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = sext i8 %9 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %7
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %7
18: ; preds = %7
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %0, %2 ]
%7 = phi i8* [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %8
store i8 %10, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret i8* %0
}
const char *strelend(const char *str) {
  const char *s = str;
  while (*s != 0x0 && *s != ',' && *s != ';')
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<strelend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     114a <strelend+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0x11(%rbp)
je     114a <strelend+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115a <strelend+0x5a>
jmp    116b <strelend+0x6b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strelend+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strelend>:
mov    %rdi,%rax
movabs $0x800100000000001,%rcx
jmp    1114 <strelend+0x14>
nop
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x3b,%rdx
ja     1110 <strelend+0x10>
bt     %rdx,%rcx
jae    1110 <strelend+0x10>
ret

LLVM IR (-O0):
define i8* @strelend(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %22, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 44
br i1 %14, label %15, label %20
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 59
br label %20
20: ; preds = %15, %10, %5
%21 = phi i1 [ false, %10 ], [ false, %5 ], [ %19, %15 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %3
br label %5
25: ; preds = %20
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @strelend(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 44, label %7
i8 59, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
ret i8* %3
}
/* Variables and functions */
long long PAPI_get_virt_usec();
void PAPIF_GET_VIRT_USEC(long long *time) { *time = PAPI_get_virt_usec(); }


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

x86 assembly (clang, -O2):
<PAPIF_GET_VIRT_USEC>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_get_virt_usec@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_GET_VIRT_USEC(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_virt_usec()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @PAPIF_GET_VIRT_USEC(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_virt_usec()
store i64 %2, i64* %0
ret void
}
void wx11le(errnum, errsev) int *errnum, *errsev;
{}


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

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

LLVM IR (-O0):
define void @wx11le(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
ret void
}

LLVM IR (-O2):
define void @wx11le(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void do_wrap_up(int one_times, int another_times) {
  int total;
  total = one_times + another_times;
  printf("wrap up: one thing %d, another %d, total %d\n", one_times,
         another_times, total);
}


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

x86 assembly (clang, -O2):
<do_wrap_up>:
mov    %esi,%edx
mov    %edi,%esi
lea    (%rdx,%rsi,1),%ecx
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"wrap up: one thing %d, another %d, total %d\0A\00"
define void @do_wrap_up(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 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"wrap up: one thing %d, another %d, total %d\0A\00"
define void @do_wrap_up(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %3)
ret void
}
/* Type definitions */
struct wire_client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ die(char *, char const *);
void wire_client_die(struct wire_client *wire_client, const char *message) {
  die("error in TCP connection to wire server: %s\n", message);
}


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

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

LLVM IR (-O0):
%struct.wire_client = type { i32 }
@.str = [44 x i8] c"error in TCP connection to wire server: %s\0A\00"
define void @wire_client_die(%struct.wire_client* %0, i8* %1) {
%3 = alloca %struct.wire_client*
%4 = alloca i8*
store %struct.wire_client* %0, %struct.wire_client** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @die(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
%struct.wire_client = type { i32 }
@.str = [44 x i8] c"error in TCP connection to wire server: %s\0A\00"
define void @wire_client_die(%struct.wire_client* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @die(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int a();
int main() { return a(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @a()
ret i32 %1
}
/* Type definitions */
struct ish_shell_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((noreturn)) void ish_builtin_exit(struct ish_shell_t *shell
                                                __attribute__((unused)),
                                                char **args) {
  exit(args[1] ? atoi(args[1]) : 0);
}


x86 assembly (clang, -O0):
<ish_builtin_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1154 <ish_builtin_exit+0x34>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    115e <ish_builtin_exit+0x3e>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <ish_builtin_exit+0x3e>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ish_builtin_exit>:
push   %rax
mov    0x8(%rsi),%rax
xor    %edi,%edi
test   %rax,%rax
je     1136 <ish_builtin_exit+0x16>
mov    %rax,%rdi
call   1030 <atoi@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.ish_shell_t = type { i32 }
define void @ish_builtin_exit(%struct.ish_shell_t* %0, i8** %1) {
%3 = alloca %struct.ish_shell_t*
%4 = alloca i8**
store %struct.ish_shell_t* %0, %struct.ish_shell_t** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 0, %14 ]
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
%struct.ish_shell_t = type { i32 }
define void @ish_builtin_exit(%struct.ish_shell_t* nocapture readnone %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @atoi(i8* %4)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
%10 = tail call i32 @exit(i32 %9)
unreachable
}
float fn2() { return 1.1f; }


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @fn2() {
ret float 0x3FF19999A0000000
}

LLVM IR (-O2):
define float @fn2() {
ret float 0x3FF19999A0000000
}
/* Variables and functions */
int /*<<< orphan*/ output_byte(char);
void output_label_prefix(void) { output_byte('L'); }


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

x86 assembly (clang, -O2):
<output_label_prefix>:
mov    $0x4c,%edi
jmp    1030 <output_byte@plt>

LLVM IR (-O0):
define void @output_label_prefix() {
%1 = call i32 @output_byte(i8 signext 76)
ret void
}

LLVM IR (-O2):
define void @output_label_prefix() {
%1 = tail call i32 @output_byte(i8 signext 76)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ explode(int, char **);
int /*<<< orphan*/ shutdown();
scalar_t__ startup(int);
int main(int argc, char *argv[]) {
  if (startup(argc)) {
    explode(argc, argv);
  }
  shutdown();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <startup@plt>
cmp    $0x0,%rax
je     1164 <main+0x34>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <explode@plt>
mov    $0x0,%al
call   1030 <shutdown@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <startup@plt>
test   %rax,%rax
je     114c <main+0x1c>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <explode@plt>
xor    %eax,%eax
call   1030 <shutdown@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 = call i64 @startup(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @explode(i32 %10, i8** %11)
br label %13
13: ; preds = %9, %2
%14 = call i32 (...) @shutdown()
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @startup(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @explode(i32 %0, i8** %1)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 (...) @shutdown()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
imm0adr1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (22 <= (*((unsigned int *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x16,%eax
mov    $0xa98ac7,%ecx
cmp    (%rcx),%eax
ja     1136 <imm0adr1+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <imm0adr1+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0adr1>:
xor    %eax,%eax
cmpl   $0x16,0xa98ac7
16
setae  %al
ret

LLVM IR (-O0):
define i32 @imm0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 11111111 to i32*)
%15 = icmp ule i32 22, %14
br i1 %15, label %16, label %17
16: ; preds = %6
store i32 1, i32* %7
br label %18
17: ; preds = %6
store i32 0, i32* %7
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @imm0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 11111111 to i32*)
%8 = icmp ugt i32 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
int main() {
  int a[2];
  int *p;
  unsigned x;
  int *p2 = x ? a : p;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1122 <main+0x22>
lea    -0xc(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    112a <main+0x2a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32 0, i32* %1
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
br label %12
10: ; preds = %0
%11 = load i32*, i32** %3
br label %12
12: ; preds = %10, %8
%13 = phi i32* [ %9, %8 ], [ %11, %10 ]
store i32* %13, i32** %5
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct tm {
  scalar_t__ tm_zone;
};

/* Variables and functions */
scalar_t__ strcmp(int /*<<< orphan*/, scalar_t__);
int /*<<< orphan*/ tm_utctimezone();
int tm_islocalrepresentation(struct tm date) {
  return (date.tm_zone && strcmp(tm_utctimezone(), date.tm_zone) ? 1 : 0);
}


x86 assembly (clang, -O0):
<tm_islocalrepresentation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1158 <tm_islocalrepresentation+0x38>
mov    $0x0,%al
call   1040 <tm_utctimezone@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_islocalrepresentation>:
test   %rdi,%rdi
je     1147 <tm_islocalrepresentation+0x27>
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <tm_utctimezone@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.tm = type { i64 }
define i32 @tm_islocalrepresentation(i64 %0) {
%2 = alloca %struct.tm
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
store i64 %0, i64* %3
%4 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = call i32 (...) @tm_utctimezone()
%9 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%10 = load i64, i64* %9
%11 = call i64 @strcmp(i32 %8, i64 %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ false, %1 ], [ %12, %7 ]
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
ret i32 %16
}

LLVM IR (-O2):
define i32 @tm_islocalrepresentation(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 (...) @tm_utctimezone()
%5 = tail call i64 @strcmp(i32 %4, i64 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ BN_lshift1(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int BN_nnmod(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
             int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ bn_check_top(int /*<<< orphan*/ *);
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) {
  if (!BN_lshift1(r, a))
    return 0;
  bn_check_top(r);
  return BN_nnmod(r, r, m, ctx);
}


x86 assembly (clang, -O0):
<BN_mod_lshift1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <BN_lshift1@plt>
cmp    $0x0,%eax
jne    116a <BN_mod_lshift1+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    118b <BN_mod_lshift1+0x5b>
mov    -0x10(%rbp),%rdi
call   1030 <bn_check_top@plt>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1050 <BN_nnmod@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BN_mod_lshift1>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
call   1040 <BN_lshift1@plt>
test   %eax,%eax
je     1165 <BN_mod_lshift1+0x35>
mov    %rbx,%rdi
call   1030 <bn_check_top@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <BN_nnmod@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @BN_mod_lshift1(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @BN_lshift1(i32* %0, i32* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @bn_check_top(i32* %0)
%9 = tail call i32 @BN_nnmod(i32* %0, i32* %0, i32* %2, i32* %3)
br label %10
10: ; preds = %4, %7
%11 = phi i32 [ %9, %7 ], [ 0, %4 ]
ret i32 %11
}
int multiply(int a, int b) { return (a * b); }


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

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

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

LLVM IR (-O2):
define i32 @multiply(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void kol_board_putc(char c) {
  asm volatile("int $0x40" ::"a"(63), "b"(1), "c"(c));
}


x86 assembly (clang, -O0):
<kol_board_putc>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_board_putc>:
push   %rbx
mov    %edi,%ecx
mov    $0x3f,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @kol_board_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret void
}

LLVM IR (-O2):
define void @kol_board_putc(i8 signext %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 63, i32 1, i8 %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
double float_of_stoec(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ stoec_of_float(double);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  uint64_t test = 0b00010001000100010001000100010001;
  int i;
  srand(time(NULL));
  printf("%f\n", float_of_stoec(stoec_of_float(0.5)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x11111111,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movsd  0xe82(%rip),%xmm0
call   1070 <stoec_of_float@plt>
mov    %eax,%edi
call   1040 <float_of_stoec@plt>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
movsd  0xe99(%rip),%xmm0
call   1070 <stoec_of_float@plt>
mov    %eax,%edi
call   1040 <float_of_stoec@plt>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 286331153, i32* %2
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
%6 = call i32 @stoec_of_float(double 5.000000e-01)
%7 = call double @float_of_stoec(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 @stoec_of_float(double 5.000000e-01)
%4 = tail call double @float_of_stoec(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
void GLUE_SET_PX_FROM_WTP(void *b, int wv) {
  static const unsigned int tab[3] = {
      0x7e038378,
      0x7e0e8378,
      0x7e0f8378,
  };
  *(unsigned int *)b = tab[wv];
}


x86 assembly (clang, -O0):
<GLUE_SET_PX_FROM_WTP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    0xeea(%rip),%rax
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_SET_PX_FROM_WTP>:
movslq %esi,%rax
lea    0xef6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
@GLUE_SET_PX_FROM_WTP.tab = internal constant [3 x i32] [i32 2114159480, i32 2114880376, i32 2114945912]
define void @GLUE_SET_PX_FROM_WTP(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_SET_PX_FROM_WTP.tab, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
@GLUE_SET_PX_FROM_WTP.tab = internal unnamed_addr constant [3 x i32] [i32 2114159480, i32 2114880376, i32 2114945912]
define void @GLUE_SET_PX_FROM_WTP(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_SET_PX_FROM_WTP.tab, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = bitcast i8* %0 to i32*
store i32 %5, i32* %6
ret void
}
void get_netdump_dest(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<get_netdump_dest>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_netdump_dest>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.get_netdump_dest = [17 x i8] c"get_netdump_dest\00"
define void @get_netdump_dest() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.get_netdump_dest, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.get_netdump_dest = [17 x i8] c"get_netdump_dest\00"
define void @get_netdump_dest() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.get_netdump_dest, i64 0, i64 0))
ret void
}
void buffers_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @buffers_placeholder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, char const *, long);
int /*<<< orphan*/ stderr;
void bugon_trace(const char *assertion, const char *filename, const char *func,
                 unsigned line, long val) {
  if (!val)
    return;
  fprintf(stderr, "%s:%d: %s: BUG_ON `%s` triggered, value %ld\n", filename,
          line, func, assertion, val);
  abort();
  exit(1);
}


x86 assembly (clang, -O0):
<bugon_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    114c <bugon_trace+0x2c>
add    $0x30,%rsp
pop    %rbp
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xe91(%rip),%rsi
mov    %rax,(%rsp)
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<bugon_trace>:
test   %r8,%r8
jne    1126 <bugon_trace+0x6>
ret
push   %rax
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ea9(%rip),%rsi
mov    (%rsi),%edi
mov    %r8,(%rsp)
lea    0xebc(%rip),%rsi
mov    %rax,%r8
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"%s:%d: %s: BUG_ON `%s` triggered, value %ld\0A\00"
define void @bugon_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i64, i64* %10
%12 = icmp ne i64 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %5
ret void
14: ; preds = %5
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %7
%17 = load i32, i32* %9
%18 = load i8*, i8** %8
%19 = load i8*, i8** %6
%20 = load i64, i64* %10
%21 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17, i8* %18, i8* %19, i64 %20)
%22 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"%s:%d: %s: BUG_ON `%s` triggered, value %ld\0A\00"
define void @bugon_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %5
ret void
8: ; preds = %5
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3, i8* %2, i8* %0, i64 %4)
%11 = tail call i32 (...) @abort()
unreachable
}
int petter(int N) {
  int x = 0, y = 0;
  int y2 = y * y;
  while (y < N) {
    x += y * y;
    y++;
  }
  y--;
  return x;
}


x86 assembly (clang, -O0):
<petter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <petter+0x46>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <petter+0x1f>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<petter>:
test   %edi,%edi
jle    112c <petter+0x2c>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
lea    -0x3(%rdi),%eax
imul   %rcx,%rax
shr    %rax
imul   $0x55555556,%eax,%eax
add    %edi,%eax
shr    %rcx
lea    (%rcx,%rcx,2),%ecx
add    %ecx,%eax
add    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @petter(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %21
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i33
%6 = add nsw i32 %0, -2
%7 = zext i32 %6 to i33
%8 = mul i33 %5, %7
%9 = add nsw i32 %0, -3
%10 = zext i32 %9 to i33
%11 = mul i33 %8, %10
%12 = lshr i33 %11, 1
%13 = trunc i33 %12 to i32
%14 = mul i32 %13, 1431655766
%15 = add i32 %14, %0
%16 = lshr i33 %8, 1
%17 = trunc i33 %16 to i32
%18 = mul i32 %17, 3
%19 = add i32 %15, %18
%20 = add i32 %19, -1
br label %21
21: ; preds = %3, %1
%22 = phi i32 [ 0, %1 ], [ %20, %3 ]
ret i32 %22
}
/* Variables and functions */
int __CPROVER_equal(double, double);
int /*<<< orphan*/ assert(int);
int main() {
  double a, b;
  union {
    double f;
    long long unsigned int i;
  } au, bu;
  au.f = a;
  bu.f = b;
  assert((au.i == bu.i) == __CPROVER_equal(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <__CPROVER_equal@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <__CPROVER_equal@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca %union.anon
%4 = alloca %union.anon
%5 = load double, double* %1
%6 = bitcast %union.anon* %3 to double*
store double %5, double* %6
%7 = load double, double* %2
%8 = bitcast %union.anon* %4 to double*
store double %7, double* %8
%9 = bitcast %union.anon* %3 to i64*
%10 = load i64, i64* %9
%11 = bitcast %union.anon* %4 to i64*
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
%14 = zext i1 %13 to i32
%15 = load double, double* %1
%16 = load double, double* %2
%17 = call i32 @__CPROVER_equal(double %15, double %16)
%18 = icmp eq i32 %14, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__CPROVER_equal(double undef, double undef)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  float a = 1.5;
  float b = 2.5;
  __VERIFIER_assert(a == b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 1.500000e+00, float* %2
store float 2.500000e+00, float* %3
%4 = load float, float* %2
%5 = load float, float* %3
%6 = fcmp oeq float %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
double fig3(double a, double b, double c) { return a * b + c - b; }


x86 assembly (clang, -O0):
<fig3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fig3>:
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fig3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double %7, double %8, double %9)
%11 = load double, double* %5
%12 = fsub double %10, %11
ret double %12
}

LLVM IR (-O2):
define double @fig3(double %0, double %1, double %2) {
%4 = tail call double @llvm.fmuladd.f64(double %0, double %1, double %2)
%5 = fsub double %4, %1
ret double %5
}
/* Variables and functions */
scalar_t__ isupper(unsigned char const);
int is_strlower(const unsigned char *string) {
  for (; *string != '\0'; string++)
    if (isupper(*string))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <is_strlower+0x54>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     114e <is_strlower+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    116b <is_strlower+0x5b>
jmp    1153 <is_strlower+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_strlower+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_strlower>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114c <is_strlower+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%edi
call   1030 <isupper@plt>
test   %rax,%rax
jne    114a <is_strlower+0x3a>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_strlower+0x20>
jmp    114c <is_strlower+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_strlower(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = call i64 @isupper(i8 zeroext %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 0, i32* %2
br label %20
15: ; preds = %9
br label %16
16: ; preds = %15
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
br label %4
19: ; preds = %4
store i32 1, i32* %2
br label %20
20: ; preds = %19, %14
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @is_strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i64 @isupper(i8 zeroext %8)
%11 = icmp eq i64 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}