xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmotion_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xmotion.send_event = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xmotion_send_event>:
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_XEvent_xmotion_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xmotion_send_event(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_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xmotion_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int t3(unsigned short a) {
  if (a & 1)
    return 1;
  else if (a)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<t3>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1127 <t3+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1145 <t3+0x45>
cmpw   $0x0,-0x6(%rbp)
je     113e <t3+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <t3+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t3>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @t3(i16 zeroext %0) {
%2 = alloca i32
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %14
9: ; preds = %1
%10 = load i16, i16* %3
%11 = icmp ne i16 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %2
br label %14
13: ; preds = %9
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @t3(i16 zeroext %0) {
%2 = icmp ne i16 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
uint bits_wi(uint n) {
  uint b = 0;
  while (n) {
    b++;
    n >>= 1;
  }
  return b;
}


x86 assembly (clang, -O0):
<bits_wi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <bits_wi+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bits_wi+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_wi>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bits_wi+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bits_wi+0x10>
ret

LLVM IR (-O0):
define i32 @bits_wi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = ashr i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @bits_wi(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
struct skin_element *get_child(struct skin_element **children, int child) {
  struct skin_element **kids = children;
  return kids[child];
}


x86 assembly (clang, -O0):
<get_child>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_child>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
ret

LLVM IR (-O0):
%struct.skin_element = type opaque
define %struct.skin_element* @get_child(%struct.skin_element** %0, i32 %1) {
%3 = alloca %struct.skin_element**
%4 = alloca i32
%5 = alloca %struct.skin_element**
store %struct.skin_element** %0, %struct.skin_element*** %3
store i32 %1, i32* %4
%6 = load %struct.skin_element**, %struct.skin_element*** %3
store %struct.skin_element** %6, %struct.skin_element*** %5
%7 = load %struct.skin_element**, %struct.skin_element*** %5
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.skin_element*, %struct.skin_element** %7, i64 %9
%11 = load %struct.skin_element*, %struct.skin_element** %10
ret %struct.skin_element* %11
}

LLVM IR (-O2):
%struct.skin_element = type opaque
define %struct.skin_element* @get_child(%struct.skin_element** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds %struct.skin_element*, %struct.skin_element** %0, i64 %3
%5 = load %struct.skin_element*, %struct.skin_element** %4
ret %struct.skin_element* %5
}
/* Variables and functions */
int prac1(int, int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {2, 3, 15, 15, 13, 12, 11, 9, 0, -1, 2, -3, 5};
  printf("%d\n", prac1(13, arr));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rsi
mov    $0xd,%edi
call   1050 <prac1@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0xd,%edi
call   1040 <prac1@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [13 x i32] [i32 2, i32 3, i32 15, i32 15, i32 13, i32 12, i32 11, i32 9, i32 0, i32 -1, i32 2, i32 -3, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i32]
store i32 0, i32* %1
%3 = bitcast [13 x i32]* %2 to i8*
%4 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%5 = call i32 @prac1(i32 13, i32* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [13 x i32] [i32 2, i32 3, i32 15, i32 15, i32 13, i32 12, i32 11, i32 9, i32 0, i32 -1, i32 2, i32 -3, i32 5]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [13 x i32]
%2 = bitcast [13 x i32]* %1 to i8*
%3 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%4 = call i32 @prac1(i32 13, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int main(int argc, char *argv[], char *env[]) { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%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, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *utmp_ptsid(char *line, char *tag) {
  static char buf[5];
  strncpy(buf, tag, 2);
  strncpy(buf + 2, line + strlen(line) - 2, 2);
  return (buf);
}


x86 assembly (clang, -O0):
<utmp_ptsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0x2ef6(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
cltq
add    %rax,%rsi
add    $0xfffffffffffffffe,%rsi
lea    0x2ec7(%rip),%rdi
add    $0x2,%rdi
mov    $0x2,%edx
call   1030 <strncpy@plt>
lea    0x2eb2(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utmp_ptsid>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x2f03(%rip),%r14
mov    %r14,%rdi
mov    $0x2,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
lea    (%rbx,%rax,1),%rsi
add    $0xfffffffffffffffe,%rsi
lea    0x2edf(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@utmp_ptsid.buf = internal global [5 x i8] zeroinitializer
define i8* @utmp_ptsid(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @strncpy(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 0), i8* %5, i32 2)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = getelementptr inbounds i8, i8* %11, i64 -2
%13 = call i32 @strncpy(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 2), i8* %12, i32 2)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@utmp_ptsid.buf = internal global [5 x i8] zeroinitializer
define i8* @utmp_ptsid(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 0), i8* %1, i32 2)
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -2
%8 = tail call i32 @strncpy(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 2), i8* %7, i32 2)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @utmp_ptsid.buf, i64 0, i64 0)
}
__attribute__((no, noclone)) double ceil(double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @ceil(double returned %0) {
ret double %0
}
unsigned int calc_slider_size(unsigned int real_size, unsigned int view_size,
                              unsigned int slid_bg_size) {
  unsigned int result;
  if (real_size == 0)
    return 0;
  result = (view_size * slid_bg_size) / real_size;
  if (result < slid_bg_size)
    return result;
  return slid_bg_size;
}


x86 assembly (clang, -O0):
<calc_slider_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1123 <calc_slider_size+0x23>
movl   $0x0,-0x4(%rbp)
jmp    114f <calc_slider_size+0x4f>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1149 <calc_slider_size+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <calc_slider_size+0x4f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_slider_size>:
test   %edi,%edi
je     1117 <calc_slider_size+0x17>
mov    %edx,%ecx
imul   %edx,%esi
mov    %esi,%eax
xor    %edx,%edx
div    %edi
cmp    %ecx,%eax
cmovb  %eax,%ecx
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_slider_size(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = mul i32 %2, %1
%7 = udiv i32 %6, %0
%8 = icmp ult i32 %7, %2
%9 = select i1 %8, i32 %7, i32 %2
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ 0, %3 ], [ %9, %5 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct string_t {
  int dummy;
};

/* Variables and functions */
void string_cat_uint64(struct string_t *string, uint64_t val) {}


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

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

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

LLVM IR (-O2):
%struct.string_t = type { i32 }
define void @string_cat_uint64(%struct.string_t* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_53(int /*<<< orphan*/);
int gen_53() {
  handle_53(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_53>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_53@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_53() {
%1 = call i32 @handle_53(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_53() {
%1 = tail call i32 @handle_53(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
void strcatbf(char *s1, const char *s2, const char *s3) {
  char tmp[1024];
  strcpy(tmp, s1);
  strcpy(s1, s2);
  strcat(s1, s3);
  strcat(s1, tmp);
}


x86 assembly (clang, -O0):
<strcatbf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcatbf>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcat@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @strcatbf(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %4
%15 = load i8*, i8** %6
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = load i8*, i8** %4
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%19 = call i32 @strcat(i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @strcatbf(i8* %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* %0)
%7 = call i32 @strcpy(i8* %0, i8* %1)
%8 = call i32 @strcat(i8* %0, i8* %2)
%9 = call i32 @strcat(i8* %0, i8* %5)
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int logger_size_get(char *logfile) {
  struct stat filestate;
  if (stat(logfile, &filestate)) {
    return -1;
  }
  return filestate.st_size;
}


x86 assembly (clang, -O0):
<logger_size_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <logger_size_get+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <logger_size_get+0x35>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_size_get>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
neg    %rax
sbb    %eax,%eax
or     (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @logger_size_get(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @logger_size_get(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ main();
int /*<<< orphan*/ malloc_init();
void __lios_startup(void) {
  if (!malloc_init())
    exit(EXIT_FAILURE);
  exit(main());
}


x86 assembly (clang, -O0):
<__lios_startup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <malloc_init@plt>
cmp    $0x0,%eax
jne    1152 <__lios_startup+0x22>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1040 <main@plt>
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<__lios_startup>:
push   %rax
xor    %eax,%eax
call   1030 <malloc_init@plt>
test   %eax,%eax
jne    114a <__lios_startup+0x1a>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1040 <main@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @__lios_startup() {
%1 = call i32 (...) @malloc_init()
%2 = icmp ne i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = call i32 (...) @main()
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @__lios_startup() {
%1 = tail call i32 (...) @malloc_init()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = tail call i32 (...) @main()
%8 = tail call i32 @exit(i32 %7)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ BGBBTJ_PNG_WriteInt32LE(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
void BGBBTJ_AVI_UpdateSize(FILE *fd, int o) {
  int i;
  i = ftell(fd);
  fseek(fd, o, 0);
  BGBBTJ_PNG_WriteInt32LE(fd, i - o - 4);
  fseek(fd, i, 0);
}


x86 assembly (clang, -O0):
<BGBBTJ_AVI_UpdateSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
sub    $0x4,%esi
call   1030 <BGBBTJ_PNG_WriteInt32LE@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
xor    %edx,%edx
call   1050 <fseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BGBBTJ_AVI_UpdateSize>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ftell@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1050 <fseek@plt>
mov    %r14d,%esi
sub    %ebp,%esi
add    $0xfffffffc,%esi
mov    %rbx,%rdi
call   1030 <BGBBTJ_PNG_WriteInt32LE@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %edx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fseek@plt>

LLVM IR (-O0):
define void @BGBBTJ_AVI_UpdateSize(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 = call i32 @ftell(i32* %6)
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @fseek(i32* %8, i32 %9, i32 0)
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = sub nsw i32 %12, %13
%15 = sub nsw i32 %14, 4
%16 = call i32 @BGBBTJ_PNG_WriteInt32LE(i32* %11, i32 %15)
%17 = load i32*, i32** %3
%18 = load i32, i32* %5
%19 = call i32 @fseek(i32* %17, i32 %18, i32 0)
ret void
}

LLVM IR (-O2):
define void @BGBBTJ_AVI_UpdateSize(i32* %0, i32 %1) {
%3 = tail call i32 @ftell(i32* %0)
%4 = tail call i32 @fseek(i32* %0, i32 %1, i32 0)
%5 = sub i32 -4, %1
%6 = add i32 %5, %3
%7 = tail call i32 @BGBBTJ_PNG_WriteInt32LE(i32* %0, i32 %6)
%8 = tail call i32 @fseek(i32* %0, i32 %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str[1024];
  memset(str, 67, 10);
  printf("%s", str);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 67, i32 10)
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\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 @memset(i8* %2, i32 67, i32 10)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
unsigned int strcmp(void const *, void const *);
unsigned int equal_func(const void *a, const void *b) {
  if (!a) {
    return 0;
  }
  if (!b) {
    return 0;
  }
  return strcmp(a, b);
}


x86 assembly (clang, -O0):
<equal_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <equal_func+0x27>
movl   $0x0,-0x4(%rbp)
jmp    115e <equal_func+0x4e>
cmpq   $0x0,-0x18(%rbp)
jne    114e <equal_func+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    115e <equal_func+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_func>:
test   %rdi,%rdi
je     111f <equal_func+0xf>
test   %rsi,%rsi
je     111f <equal_func+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @equal_func(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 0, i32* %3
br label %17
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %9
store i32 0, i32* %3
br label %17
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* %14, i8* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %12, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @equal_func(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Type definitions */
struct Person {
  int dummy;
};

/* Variables and functions */
int Person_write_delimited_to(struct Person *, void *, int);
int write_raw_varint32(int, void *, int);
int Person_write_with_tag(struct Person *_Person, void *_buffer, int offset,
                          int tag) {
  offset = write_raw_varint32((tag << 3) + 2, _buffer, offset);
  offset = Person_write_delimited_to(_Person, _buffer, offset);
  return offset;
}


x86 assembly (clang, -O0):
<Person_write_with_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
shl    $0x3,%edi
add    $0x2,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <write_raw_varint32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <Person_write_delimited_to@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Person_write_with_tag>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x2(,%rcx,8),%edi
call   1040 <write_raw_varint32@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <Person_write_delimited_to@plt>

LLVM IR (-O0):
%struct.Person = type { i32 }
define i32 @Person_write_with_tag(%struct.Person* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.Person*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.Person* %0, %struct.Person** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = shl i32 %9, 3
%11 = add nsw i32 %10, 2
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @write_raw_varint32(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %7
%15 = load %struct.Person*, %struct.Person** %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @Person_write_delimited_to(%struct.Person* %15, i8* %16, i32 %17)
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.Person = type { i32 }
define i32 @Person_write_with_tag(%struct.Person* %0, i8* %1, i32 %2, i32 %3) {
%5 = shl i32 %3, 3
%6 = or i32 %5, 2
%7 = tail call i32 @write_raw_varint32(i32 %6, i8* %1, i32 %2)
%8 = tail call i32 @Person_write_delimited_to(%struct.Person* %0, i8* %1, i32 %7)
ret i32 %8
}
void sae_clear_retransmit_timer(struct hostapd_data *hapd,
                                struct sta_info *sta) {}


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

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

LLVM IR (-O0):
%struct.hostapd_data = type opaque
%struct.sta_info = type opaque
define void @sae_clear_retransmit_timer(%struct.hostapd_data* %0, %struct.sta_info* %1) {
%3 = alloca %struct.hostapd_data*
%4 = alloca %struct.sta_info*
store %struct.hostapd_data* %0, %struct.hostapd_data** %3
store %struct.sta_info* %1, %struct.sta_info** %4
ret void
}

LLVM IR (-O2):
%struct.hostapd_data = type opaque
%struct.sta_info = type opaque
define void @sae_clear_retransmit_timer(%struct.hostapd_data* nocapture %0, %struct.sta_info* nocapture %1) {
ret void
}
int cmp_double_lt(const void *a, const void *b) {
  double a_ = *(double *)a;
  double b_ = *(double *)b;
  if (a_ < b_)
    return -1;
  if (a_ > b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_double_lt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <cmp_double_lt+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <cmp_double_lt+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <cmp_double_lt+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <cmp_double_lt+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_double_lt>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cmp_double_lt(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @cmp_double_lt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void bglpth_setup_bmem() {}


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

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

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

LLVM IR (-O2):
define void @bglpth_setup_bmem() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_PRIO(int /*<<< orphan*/);
int gen_PRIO() { handle_PRIO(0); }


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

x86 assembly (clang, -O2):
<gen_PRIO>:
xor    %edi,%edi
jmp    1030 <handle_PRIO@plt>

LLVM IR (-O0):
define i32 @gen_PRIO() {
%1 = alloca i32
%2 = call i32 @handle_PRIO(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_PRIO() {
%1 = tail call i32 @handle_PRIO(i32 0)
ret i32 undef
}
void test14(int x) {
  switch (x) {
  case 42:
    test14(97);
  case 11:
    break;
  default:
    test14(42);
    break;
  }
}


x86 assembly (clang, -O0):
<test14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xb,%eax
je     114a <test14+0x3a>
jmp    112f <test14+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2a,%eax
jne    114f <test14+0x3f>
jmp    1140 <test14+0x30>
mov    $0x61,%edi
call   1030 <test14@plt>
jmp    1159 <test14+0x49>
mov    $0x2a,%edi
call   1030 <test14@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test14>:
mov    %edi,%eax
mov    $0x61,%edi
cmp    $0x2a,%eax
je     1100 <test14>
cmp    $0xb,%eax
je     1118 <test14+0x18>
mov    $0x2a,%edi
jmp    1100 <test14>
ret

LLVM IR (-O0):
define void @test14(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 42, label %4
i32 11, label %5
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @test14(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i32 [ %0, %1 ], [ %6, %5 ]
switch i32 %3, label %4 [
i32 42, label %5
i32 11, label %7
]
4: ; preds = %2
br label %5
5: ; preds = %4, %2
%6 = phi i32 [ 42, %4 ], [ 97, %2 ]
br label %2
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
void check_empty(const unsigned char *lptr) {
  while (*lptr <= ' ' && *lptr != '\0')
    lptr++;
  if (*lptr != '\0')
    error(38);
}


x86 assembly (clang, -O0):
<check_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
jg     1141 <check_empty+0x31>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1151 <check_empty+0x41>
jmp    1162 <check_empty+0x52>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <check_empty+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     117c <check_empty+0x6c>
mov    $0x26,%edi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_empty>:
movzbl (%rdi),%eax
lea    -0x21(%rax),%ecx
add    $0x1,%rdi
cmp    $0xdf,%cl
ja     1110 <check_empty>
test   %al,%al
je     112d <check_empty+0x1d>
mov    $0x26,%edi
jmp    1030 <error@plt>
ret

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

LLVM IR (-O2):
define void @check_empty(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = add i8 %4, -33
%6 = icmp ult i8 %5, -32
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = icmp eq i8 %4, 0
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @error(i32 38)
br label %12
12: ; preds = %10, %8
ret void
}
char *nexttoken(char *c) {
  while (*c == ' ' || *c == '\t')
    c++;
  return c;
}


x86 assembly (clang, -O0):
<nexttoken>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <nexttoken+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <nexttoken+0x3d>
jmp    114e <nexttoken+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <nexttoken+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nexttoken>:
mov    %rdi,%rax
jmp    1114 <nexttoken+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <nexttoken+0x10>
cmp    $0x9,%cl
je     1110 <nexttoken+0x10>
ret

LLVM IR (-O0):
define i8* @nexttoken(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @nexttoken(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 %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
void test_requires_ensures_loop() {
  int i = 0;
  while (i < 5) {
    int x = 0;
    int *ptr = &x;
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<test_requires_ensures_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1132 <test_requires_ensures_loop+0x32>
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_requires_ensures_loop+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_requires_ensures_loop() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %10
7: ; preds = %4
store i32 0, i32* %2
store i32* %2, i32** %3
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %4
10: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @test_requires_ensures_loop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Higashi Hiroshima\nHiroshima, Japan\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [36 x i8] c"Higashi Hiroshima\0AHiroshima, Japan\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"Higashi Hiroshima\0AHiroshima, Japan\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FUTEX_WAIT_PRIVATE;
int /*<<< orphan*/ SYS_futex;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int syscall(int /*<<< orphan*/, int *, int /*<<< orphan*/, int /*<<< orphan*/,
            struct timespec *);
void mysleep(struct timespec *timeout) {
  int rc;
  int futex_var = 0;
  rc = syscall(SYS_futex, &futex_var, FUTEX_WAIT_PRIVATE, 0, timeout);
  printf("rc=%d, errno='%m' (%d)\n", rc, errno);
}


x86 assembly (clang, -O0):
<mysleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%r8
lea    -0x10(%rbp),%rsi
xor    %ecx,%ecx
call   1040 <syscall@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    0x2e77(%rip),%rax
mov    (%rax),%edx
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysleep>:
push   %rax
mov    %rdi,%r8
movl   $0x0,0x4(%rsp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rsi
xor    %ecx,%ecx
call   1040 <syscall@plt>
mov    0x2e87(%rip),%rcx
mov    (%rcx),%edx
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
@FUTEX_WAIT_PRIVATE = global i32 0
@.str = [24 x i8] c"rc=%d, errno='%m' (%d)\0A\00"
@errno = global i32 0
define void @mysleep(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i32
%4 = alloca i32
store %struct.timespec* %0, %struct.timespec** %2
store i32 0, i32* %4
%5 = load i32, i32* @SYS_futex
%6 = load i32, i32* @FUTEX_WAIT_PRIVATE
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = call i32 @syscall(i32 %5, i32* %4, i32 %6, i32 0, %struct.timespec* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* @errno
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
@FUTEX_WAIT_PRIVATE = global i32 0
@.str = [24 x i8] c"rc=%d, errno='%m' (%d)\0A\00"
@errno = global i32 0
define void @mysleep(%struct.timespec* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = load i32, i32* @SYS_futex
%5 = load i32, i32* @FUTEX_WAIT_PRIVATE
%6 = call i32 @syscall(i32 %4, i32* %2, i32 %5, i32 0, %struct.timespec* %0)
%7 = load i32, i32* @errno
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret void
}
void init_GPIO(void) {}


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

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

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

LLVM IR (-O2):
define void @init_GPIO() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Memrel(char *);
void string_free(char *s) { _Memrel((s)); }


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

x86 assembly (clang, -O2):
<string_free>:
jmp    1030 <_Memrel@plt>

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

LLVM IR (-O2):
define void @string_free(i8* %0) {
%2 = tail call i32 @_Memrel(i8* %0)
ret void
}
int security_sethostname(char *hostname) { return 0; }


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

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

LLVM IR (-O0):
define i32 @security_sethostname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @security_sethostname(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *helpReadLine(int /*<<< orphan*/);
char *readLine(void) { return helpReadLine(0); }


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

x86 assembly (clang, -O2):
<readLine>:
xor    %edi,%edi
jmp    1030 <helpReadLine@plt>

LLVM IR (-O0):
define i8* @readLine() {
%1 = call i8* @helpReadLine(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @readLine() {
%1 = tail call i8* @helpReadLine(i32 0)
ret i8* %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ major_code;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
int get_XGraphicsExposeEvent_major_code(void *_p) {
  return (int)((XGraphicsExposeEvent *)_p)->major_code;
}


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

x86 assembly (clang, -O2):
<get_XGraphicsExposeEvent_major_code>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XGraphicsExposeEvent_major_code(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
double twister_genrand64_real3();
double random_double(void) { return twister_genrand64_real3(); }


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

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

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

LLVM IR (-O2):
define double @random_double() {
%1 = tail call double (...) @twister_genrand64_real3()
ret double %1
}
void add_session_to_jumplist(const char *const sessionname) {}


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

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

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

LLVM IR (-O2):
define void @add_session_to_jumplist(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *g_DUMMY_popup_get_label(int cont_id, int item_id) {
  cont_id = cont_id;
  item_id = item_id;
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @g_DUMMY_popup_get_label(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
store i32 %5, i32* %3
%6 = load i32, i32* %4
store i32 %6, i32* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @g_DUMMY_popup_get_label(i32 %0, i32 %1) {
ret i8* null
}