xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, size_t);
size_t string_sink(const void *buf, size_t len, void *stream) {
  uint8_t **ptr = (uint8_t **)stream;
  memcpy(*ptr, buf, len);
  *ptr += len;
  return len;
}


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

x86 assembly (clang, -O2):
<string_sink>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rdx),%rdi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
lea    0x0(,%rbx,4),%rax
add    %rax,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @string_sink(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32**
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32**
store i32** %9, i32*** %7
%10 = load i32**, i32*** %7
%11 = load i32*, i32** %10
%12 = load i8*, i8** %4
%13 = load i64, i64* %5
%14 = call i32 @memcpy(i32* %11, i8* %12, i64 %13)
%15 = load i64, i64* %5
%16 = load i32**, i32*** %7
%17 = load i32*, i32** %16
%18 = getelementptr inbounds i32, i32* %17, i64 %15
store i32* %18, i32** %16
%19 = load i64, i64* %5
ret i64 %19
}

LLVM IR (-O2):
define i64 @string_sink(i8* %0, i64 returned %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i32**
%5 = load i32*, i32** %4
%6 = tail call i32 @memcpy(i32* %5, i8* %0, i64 %1)
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 %1
store i32* %8, i32** %4
ret i64 %1
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzBuiltinVariable_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int, int);
void BrzBuiltinVariable_reqdown(struct comp *comp, int port) {
  struct BrzBuiltinVariable_ *c = (struct BrzBuiltinVariable_ *)comp;
  SEND_ACKDOWN_DELAYED(port, 0);
  if (port >= 1) {
    SEND_DATAOFF_DELAYED(port, 1);
  }
}


x86 assembly (clang, -O0):
<BrzBuiltinVariable_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
cmpl   $0x1,-0xc(%rbp)
jl     1158 <BrzBuiltinVariable_reqdown+0x38>
mov    -0xc(%rbp),%edi
mov    $0x1,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzBuiltinVariable_reqdown>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
xor    %esi,%esi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
test   %ebx,%ebx
jle    113d <BrzBuiltinVariable_reqdown+0x1d>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <SEND_DATAOFF_DELAYED@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzBuiltinVariable_ = type { i32 }
define void @BrzBuiltinVariable_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzBuiltinVariable_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzBuiltinVariable_*
store %struct.BrzBuiltinVariable_* %7, %struct.BrzBuiltinVariable_** %5
%8 = load i32, i32* %4
%9 = call i32 @SEND_ACKDOWN_DELAYED(i32 %8, i32 0)
%10 = load i32, i32* %4
%11 = icmp sge i32 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i32 @SEND_DATAOFF_DELAYED(i32 %13, i32 1)
br label %15
15: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzBuiltinVariable_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 %1, i32 0)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @SEND_DATAOFF_DELAYED(i32 %1, i32 1)
br label %7
7: ; preds = %5, %2
ret void
}
int setup8812Wlan(char *ifname) {
  int i = 0;
  int status = 0;
  unsigned char value[196];
  char parm[1024];
  int intVal;
  char mode = 0;
  return status;
}


x86 assembly (clang, -O0):
<setup8812Wlan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movb   $0x0,-0x4e5(%rbp)
mov    -0x10(%rbp),%eax
add    $0x470,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @setup8812Wlan(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [196 x i8]
%6 = alloca [1024 x i8]
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i8 0, i8* %8
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @setup8812Wlan(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_sta_authmode(int);
int /*<<< orphan*/ set_sta_default_keyid(int);
int /*<<< orphan*/ set_sta_encryp_type(int);
int /*<<< orphan*/ set_sta_wep_key(int);
int /*<<< orphan*/ set_sta_wpa_psk(int);
int set_sta_security(int radio) {
  set_sta_authmode(radio);
  set_sta_encryp_type(radio);
  set_sta_wpa_psk(radio);
  set_sta_default_keyid(radio);
  set_sta_wep_key(radio);
  return 0;
}


x86 assembly (clang, -O0):
<set_sta_security>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <set_sta_authmode@plt>
mov    -0x4(%rbp),%edi
call   1060 <set_sta_encryp_type@plt>
mov    -0x4(%rbp),%edi
call   1070 <set_sta_wpa_psk@plt>
mov    -0x4(%rbp),%edi
call   1030 <set_sta_default_keyid@plt>
mov    -0x4(%rbp),%edi
call   1040 <set_sta_wep_key@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sta_security>:
push   %rbx
mov    %edi,%ebx
call   1050 <set_sta_authmode@plt>
mov    %ebx,%edi
call   1060 <set_sta_encryp_type@plt>
mov    %ebx,%edi
call   1070 <set_sta_wpa_psk@plt>
mov    %ebx,%edi
call   1030 <set_sta_default_keyid@plt>
mov    %ebx,%edi
call   1040 <set_sta_wep_key@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @set_sta_security(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @set_sta_authmode(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @set_sta_encryp_type(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @set_sta_wpa_psk(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @set_sta_default_keyid(i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @set_sta_wep_key(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @set_sta_security(i32 %0) {
%2 = tail call i32 @set_sta_authmode(i32 %0)
%3 = tail call i32 @set_sta_encryp_type(i32 %0)
%4 = tail call i32 @set_sta_wpa_psk(i32 %0)
%5 = tail call i32 @set_sta_default_keyid(i32 %0)
%6 = tail call i32 @set_sta_wep_key(i32 %0)
ret i32 0
}
void foo2(short *w) {
  int i;
  short *ww = __builtin_assume_aligned(w, 8);
  for (i = 0; i < 16; i++)
    ww[i] = ww[i] / 2;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1152 <foo2+0x52>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,%dx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <foo2+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
movdqu (%rdi),%xmm0
movdqu 0x10(%rdi),%xmm1
movdqa %xmm0,%xmm2
psrlw  $0xf,%xmm2
paddw  %xmm0,%xmm2
psraw  $0x1,%xmm2
movdqu %xmm2,(%rdi)
movdqa %xmm1,%xmm0
psrlw  $0xf,%xmm0
paddw  %xmm1,%xmm0
psraw  $0x1,%xmm0
movdqu %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @foo2(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
%4 = alloca i16*
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = bitcast i16* %5 to i8*
%7 = bitcast i8* %6 to i16*
store i16* %7, i16** %4
store i32 0, i32* %3
br label %8
8: ; preds = %24, %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 16
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load i16*, i16** %4
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i16, i16* %12, i64 %14
%16 = load i16, i16* %15
%17 = sext i16 %16 to i32
%18 = sdiv i32 %17, 2
%19 = trunc i32 %18 to i16
%20 = load i16*, i16** %4
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i16, i16* %20, i64 %22
store i16 %19, i16* %23
br label %24
24: ; preds = %11
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %8
27: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @foo2(i16* %0) {
%2 = bitcast i16* %0 to i8*
%3 = bitcast i16* %0 to <8 x i16>*
%4 = load <8 x i16>, <8 x i16>* %3
%5 = sdiv <8 x i16> %4, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
%6 = bitcast i16* %0 to <8 x i16>*
store <8 x i16> %5, <8 x i16>* %6
%7 = getelementptr inbounds i16, i16* %0, i64 8
%8 = bitcast i16* %7 to <8 x i16>*
%9 = load <8 x i16>, <8 x i16>* %8
%10 = sdiv <8 x i16> %9, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
%11 = bitcast i16* %7 to <8 x i16>*
store <8 x i16> %10, <8 x i16>* %11
ret void
}
void mpi_finalize() {}


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

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

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

LLVM IR (-O2):
define void @mpi_finalize() {
ret void
}
/* Variables and functions */
unsigned char *chreke_server_init(unsigned char *, unsigned char *,
                                  unsigned char const *, unsigned char const *);
unsigned char *ke_chreke_server_init(unsigned char *server_session,
                                     unsigned char *server_context,
                                     const unsigned char *client_session,
                                     const unsigned char *pwhash) {
  return chreke_server_init(server_session, server_context, client_session,
                            pwhash);
}


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

x86 assembly (clang, -O2):
<ke_chreke_server_init>:
jmp    1030 <chreke_server_init@plt>

LLVM IR (-O0):
define i8* @ke_chreke_server_init(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i8* @chreke_server_init(i8* %9, i8* %10, i8* %11, i8* %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @ke_chreke_server_init(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @chreke_server_init(i8* %0, i8* %1, i8* %2, i8* %3)
ret i8* %5
}
void _Locale_collate_destroy(struct _Locale_collate *lcol
                             __attribute__((__unused__))) {}


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

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

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

LLVM IR (-O2):
%struct._Locale_collate = type opaque
define void @_Locale_collate_destroy(%struct._Locale_collate* nocapture %0) {
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t ret;
  for (ret = 0;; ret++) {
    if (str[ret] == '\0') {
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    112a <strlen+0x2a>
jmp    1140 <strlen+0x40>
jmp    112f <strlen+0x2f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
unsigned long bss_start(void) {
  extern char __bss_start[];
  return (unsigned long)&__bss_start;
}


x86 assembly (clang, -O0):
<bss_start>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bss_start>:
mov    0x2ee1(%rip),%rax
ret

LLVM IR (-O0):
@__bss_start = external global [0 x i8]
define i64 @bss_start() {
ret i64 ptrtoint ([0 x i8]* @__bss_start to i64)
}

LLVM IR (-O2):
@__bss_start = external global [0 x i8]
define i64 @bss_start() {
ret i64 ptrtoint ([0 x i8]* @__bss_start to i64)
}
int fun725() { return 725; }


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

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

LLVM IR (-O0):
define i32 @fun725() {
ret i32 725
}

LLVM IR (-O2):
define i32 @fun725() {
ret i32 725
}
void gtk_tree_view_column_set_min_width() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_min_width() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_table(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("#ifdef USE_LUT\n");
  printf("#include <stdint.h>\n");
  gen_table(64);
  printf("\n");
  gen_table(128);
  printf("#endif //USE_LUT\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    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x40,%edi
call   1040 <gen_table@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x80,%edi
call   1040 <gen_table@plt>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xecb(%rip),%rdi
call   1040 <puts@plt>
mov    $0x40,%edi
call   1050 <gen_table@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x80,%edi
call   1050 <gen_table@plt>
lea    0xeb5(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"#ifdef USE_LUT\0A\00"
@.str.1 = [21 x i8] c"#include <stdint.h>\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [18 x i8] c"#endif //USE_LUT\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 ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @gen_table(i32 64)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @gen_table(i32 128)
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"#ifdef USE_LUT\00"
@str.4 = [20 x i8] c"#include <stdint.h>\00"
@str.5 = [17 x i8] c"#endif //USE_LUT\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @gen_table(i32 64)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @gen_table(i32 128)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
int __start_late() {}


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

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

LLVM IR (-O0):
define i32 @__start_late() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @__start_late() {
ret i32 undef
}
/* Type definitions */
struct Cyc___cycFILE {
  int dummy;
};
struct Cyc_Interface_I {
  int dummy;
};

/* Variables and functions */
struct Cyc_Interface_I *Cyc_Interface_parse(struct Cyc___cycFILE *);
struct Cyc_Interface_I *Cyc_Interface_load(struct Cyc___cycFILE *f) {
  struct Cyc_Interface_I *_T0;
  _T0 = Cyc_Interface_parse(f);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_Interface_load>:
jmp    1030 <Cyc_Interface_parse@plt>

LLVM IR (-O0):
%struct.Cyc_Interface_I = type { i32 }
%struct.Cyc___cycFILE = type { i32 }
define %struct.Cyc_Interface_I* @Cyc_Interface_load(%struct.Cyc___cycFILE* %0) {
%2 = alloca %struct.Cyc___cycFILE*
%3 = alloca %struct.Cyc_Interface_I*
store %struct.Cyc___cycFILE* %0, %struct.Cyc___cycFILE** %2
%4 = load %struct.Cyc___cycFILE*, %struct.Cyc___cycFILE** %2
%5 = call %struct.Cyc_Interface_I* @Cyc_Interface_parse(%struct.Cyc___cycFILE* %4)
store %struct.Cyc_Interface_I* %5, %struct.Cyc_Interface_I** %3
%6 = load %struct.Cyc_Interface_I*, %struct.Cyc_Interface_I** %3
ret %struct.Cyc_Interface_I* %6
}

LLVM IR (-O2):
%struct.Cyc_Interface_I = type { i32 }
%struct.Cyc___cycFILE = type { i32 }
define %struct.Cyc_Interface_I* @Cyc_Interface_load(%struct.Cyc___cycFILE* %0) {
%2 = tail call %struct.Cyc_Interface_I* @Cyc_Interface_parse(%struct.Cyc___cycFILE* %0)
ret %struct.Cyc_Interface_I* %2
}
/* Variables and functions */
int f158(int *);
int f159(int *p) { return f158(p); }


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

x86 assembly (clang, -O2):
<f159>:
jmp    1030 <f158@plt>

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

LLVM IR (-O2):
define i32 @f159(i32* %0) {
%2 = tail call i32 @f158(i32* %0)
ret i32 %2
}
int odd_ones(unsigned x) {
  x ^= x >> 16;
  x ^= x >> 8;
  x ^= x >> 4;
  x ^= x >> 2;
  x ^= x >> 1;
  return x & 1;
}


x86 assembly (clang, -O0):
<odd_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd_ones>:
mov    %edi,%eax
shr    $0x10,%eax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    %eax
xor    %ecx,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @odd_ones(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 8
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 2
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 1
%21 = load i32, i32* %2
%22 = xor i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = and i32 %23, 1
ret i32 %24
}

LLVM IR (-O2):
define i32 @odd_ones(i32 %0) {
%2 = lshr i32 %0, 16
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 8
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 4
%7 = xor i32 %6, %5
%8 = lshr i32 %7, 2
%9 = xor i32 %8, %7
%10 = lshr i32 %9, 1
%11 = xor i32 %10, %9
%12 = and i32 %11, 1
ret i32 %12
}
void fz_gettimeofday_dummy() {}


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

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

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

LLVM IR (-O2):
define void @fz_gettimeofday_dummy() {
ret void
}
/* Variables and functions */
int read_uart(int, int /*<<< orphan*/);
int /*<<< orphan*/ write_uart(int, char, int /*<<< orphan*/);
void pl011_uart_putc(char c) {
  while (read_uart(0x18, 0) & 0x20)
    ;
  write_uart(0x00, c, 0);
}


x86 assembly (clang, -O0):
<pl011_uart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x18,%edi
xor    %esi,%esi
call   1030 <read_uart@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     114b <pl011_uart_putc+0x2b>
jmp    112e <pl011_uart_putc+0xe>
xor    %edx,%edx
mov    %edx,%edi
movsbl -0x1(%rbp),%esi
call   1040 <write_uart@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl011_uart_putc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x18,%edi
xor    %esi,%esi
call   1030 <read_uart@plt>
test   $0x20,%al
jne    1130 <pl011_uart_putc+0x10>
movsbl %bl,%esi
xor    %edi,%edi
xor    %edx,%edx
pop    %rbx
jmp    1040 <write_uart@plt>

LLVM IR (-O0):
define void @pl011_uart_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @read_uart(i32 24, i32 0)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call i32 @write_uart(i32 0, i8 signext %9, i32 0)
ret void
}

LLVM IR (-O2):
define void @pl011_uart_putc(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @read_uart(i32 24, i32 0)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 @write_uart(i32 0, i8 signext %0, i32 0)
ret void
}
void gpio_i2c_active(int i2c_num) {}


x86 assembly (clang, -O0):
<gpio_i2c_active>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @gpio_i2c_active(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_harris_buffers();
int /*<<< orphan*/ opencl_loader_close();
int /*<<< orphan*/ opencl_program_close();
void harris_hessian_freak_close() {
  free_harris_buffers();
  opencl_program_close();
  opencl_loader_close();
}


x86 assembly (clang, -O0):
<harris_hessian_freak_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <free_harris_buffers@plt>
mov    $0x0,%al
call   1030 <opencl_program_close@plt>
mov    $0x0,%al
call   1050 <opencl_loader_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<harris_hessian_freak_close>:
push   %rax
xor    %eax,%eax
call   1040 <free_harris_buffers@plt>
xor    %eax,%eax
call   1030 <opencl_program_close@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <opencl_loader_close@plt>

LLVM IR (-O0):
define void @harris_hessian_freak_close() {
%1 = call i32 (...) @free_harris_buffers()
%2 = call i32 (...) @opencl_program_close()
%3 = call i32 (...) @opencl_loader_close()
ret void
}

LLVM IR (-O2):
define void @harris_hessian_freak_close() {
%1 = tail call i32 (...) @free_harris_buffers()
%2 = tail call i32 (...) @opencl_program_close()
%3 = tail call i32 (...) @opencl_loader_close()
ret void
}
int fun636() { return 636; }


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

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

LLVM IR (-O0):
define i32 @fun636() {
ret i32 636
}

LLVM IR (-O2):
define i32 @fun636() {
ret i32 636
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void childdied(int i) { wait(NULL); }


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

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

LLVM IR (-O0):
define void @childdied(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wait(i32* null)
ret void
}

LLVM IR (-O2):
define void @childdied(i32 %0) {
%2 = tail call i32 @wait(i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void foo(const char **args) { printf("%s %s", args[0], args[1]); }


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

x86 assembly (clang, -O2):
<foo>:
mov    (%rdi),%rsi
mov    0x8(%rdi),%rdx
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
define void @foo(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8*, i8** %0, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void badloop() { error(" no active fors, switches or whiles"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c" no active fors, switches or whiles\00"
define void @badloop() {
%1 = call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c" no active fors, switches or whiles\00"
define void @badloop() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __v4si;
typedef scalar_t__ __m128i;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_cvtdq2ps(int /*<<< orphan*/);
__m128 __attribute__((__always___, __nodebug__)) _mm_cvtepi32_ps(__m128i a) {
  return __builtin_ia32_cvtdq2ps((__v4si)a);
}


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

x86 assembly (clang, -O2):
<_mm_cvtepi32_ps>:
jmp    1030 <__builtin_ia32_cvtdq2ps@plt>

LLVM IR (-O0):
define i32 @_mm_cvtepi32_ps(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i32 @__builtin_ia32_cvtdq2ps(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @_mm_cvtepi32_ps(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @__builtin_ia32_cvtdq2ps(i32 %2)
ret i32 %3
}
/* Variables and functions */
scalar_t__ __builtin_lroundl(long double);
int /*<<< orphan*/ link_failure_builtin_lroundl();
void test_builtin_lroundl(long double ld) {
  if (__builtin_lroundl(ld) != __builtin_lroundl(ld))
    link_failure_builtin_lroundl();
}


x86 assembly (clang, -O0):
<test_builtin_lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <lroundl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <lroundl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_builtin_lroundl+0x43>
mov    $0x0,%al
call   1030 <link_failure_builtin_lroundl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_lroundl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <lroundl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <lroundl@plt>
cmp    %rax,%rbx
jne    1151 <test_builtin_lroundl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_builtin_lroundl@plt>

LLVM IR (-O0):
define void @test_builtin_lroundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @lroundl(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @lroundl(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_builtin_lroundl()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_lroundl(x86_fp80 %0) {
%2 = tail call i64 @lroundl(x86_fp80 %0)
%3 = tail call i64 @lroundl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_lroundl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int hputc(char *, char const *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int hputl(char *hstring, const char *keyword, const const int lval) {
  char value[8];
  if (lval) {
    strcpy(value, "T");
  } else {
    strcpy(value, "F");
  }
  return (hputc(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1152 <hputl+0x32>
lea    -0x1c(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1162 <hputl+0x42>
lea    -0x1c(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <hputc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputl>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
test   %edx,%edx
lea    0xeca(%rip),%rax
lea    0xec1(%rip),%rsi
cmove  %rax,%rsi
lea    0x8(%rsp),%r15
mov    %r15,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <hputc@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"T\00"
@.str.1 = [2 x i8] c"F\00"
define i32 @hputl(i8* %0, i8* %1, i32 %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = icmp eq i32 %2, 0
%7 = select i1 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%8 = call i32 @strcpy(i8* %5, i8* %7)
%9 = call i32 @hputc(i8* %0, i8* %1, i8* %5)
ret i32 %9
}
void finish_iconv(void) {}


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

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

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

LLVM IR (-O2):
define void @finish_iconv() {
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  printf("MV_VARIANT = '%s'\n", getenv("MV_VARIANT"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeeb(%rip),%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"MV_VARIANT = '%s'\0A\00"
@.str.1 = [11 x i8] c"MV_VARIANT\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
int getdtablesize() { return 1024; }


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

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

LLVM IR (-O0):
define i32 @getdtablesize() {
ret i32 1024
}

LLVM IR (-O2):
define i32 @getdtablesize() {
ret i32 1024
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XKeymapEvent;

/* Variables and functions */
unsigned long get_XKeymapEvent_window(void *_p) {
  return (unsigned long)((XKeymapEvent *)_p)->window;
}


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

x86 assembly (clang, -O2):
<get_XKeymapEvent_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XKeymapEvent_window(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
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XKeymapEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int matmul_unit();
int main(void) {
  int status;
  status = matmul_unit();
  return status;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @matmul_unit()
ret i32 %1
}
int func(int a, int b, int c, int d) {
  if (a > 1) {
    return a * b - 3;
  } else {
    return d * (c - 2) - 3;
  }
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    112c <func+0x2c>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    113e <func+0x3e>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x2,%ecx
imul   %ecx,%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
imul   %edi,%esi
lea    -0x2(%rdx),%eax
imul   %ecx,%eax
cmp    $0x2,%edi
cmovge %esi,%eax
add    $0xfffffffd,%eax
ret

LLVM IR (-O0):
define i32 @func(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 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %4
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = mul nsw i32 %13, %14
%16 = sub nsw i32 %15, 3
store i32 %16, i32* %5
br label %23
17: ; preds = %4
%18 = load i32, i32* %9
%19 = load i32, i32* %8
%20 = sub nsw i32 %19, 2
%21 = mul nsw i32 %18, %20
%22 = sub nsw i32 %21, 3
store i32 %22, i32* %5
br label %23
23: ; preds = %17, %12
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, 1
%6 = mul nsw i32 %1, %0
%7 = add nsw i32 %2, -2
%8 = mul nsw i32 %7, %3
%9 = select i1 %5, i32 %6, i32 %8
%10 = add nsw i32 %9, -3
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ native_halt();
void arch_halt(void) { native_halt(); }


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

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

LLVM IR (-O0):
define void @arch_halt() {
%1 = call i32 (...) @native_halt()
ret void
}

LLVM IR (-O2):
define void @arch_halt() {
%1 = tail call i32 (...) @native_halt()
ret void
}
unsigned rot_r(int x, unsigned count) {
  return (unsigned)x >> count | x << (8 * sizeof(int) - count);
}


x86 assembly (clang, -O0):
<rot_r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x20,%ecx
sub    %rsi,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot_r>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rot_r(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 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = sub i64 32, %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %8, %12
%14 = or i32 %7, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @rot_r(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void PICXXXX_CDC(void) { return; }


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

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

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

LLVM IR (-O2):
define void @PICXXXX_CDC() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
int strlen(char *);
char *strrol(char *pszStr) {
  int wLength = strlen(pszStr);
  if (wLength > 1) {
    char chC = pszStr[0];
    memmove(pszStr - 1, pszStr, wLength + 1);
    *(pszStr + wLength - 1) = chC;
  }
  return pszStr;
}


x86 assembly (clang, -O0):
<strrol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1171 <strrol+0x51>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rdi
add    $0xffffffffffffffff,%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
call   1040 <memmove@plt>
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,-0x1(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrol>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     114f <strrol+0x2f>
mov    %eax,%r14d
mov    (%rbx),%bpl
lea    -0x1(%rbx),%rdi
lea    0x1(%r14),%edx
mov    %rbx,%rsi
call   1040 <memmove@plt>
mov    %r14d,%eax
mov    %bpl,-0x1(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strrol(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %25
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
store i8 %12, i8* %4
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 -1
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
%18 = call i32 @memmove(i8* %14, i8* %15, i32 %17)
%19 = load i8, i8* %4
%20 = load i8*, i8** %2
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = getelementptr inbounds i8, i8* %23, i64 -1
store i8 %19, i8* %24
br label %25
25: ; preds = %9, %1
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
define i8* @strrol(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = load i8, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 -1
%7 = add nuw nsw i32 %2, 1
%8 = tail call i32 @memmove(i8* %6, i8* %0, i32 %7)
%9 = zext i32 %2 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 -1
store i8 %5, i8* %11
br label %12
12: ; preds = %4, %1
ret i8* %0
}
void TestSwitch(int i) {
  switch (i) {
  case 0:
    break;
  case 1:
  case 2:
    break;
  default:
    break;
  case 3 ... 5:
    break;
  }
}


x86 assembly (clang, -O0):
<TestSwitch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1142 <TestSwitch+0x42>
jmp    111a <TestSwitch+0x1a>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     1147 <TestSwitch+0x47>
jmp    112e <TestSwitch+0x2e>
mov    -0x8(%rbp),%eax
add    $0xfffffffd,%eax
sub    $0x3,%eax
jb     1151 <TestSwitch+0x51>
jmp    114c <TestSwitch+0x4c>
jmp    1156 <TestSwitch+0x56>
jmp    1156 <TestSwitch+0x56>
jmp    1156 <TestSwitch+0x56>
jmp    1156 <TestSwitch+0x56>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @TestSwitch(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mdfour(unsigned char *, unsigned char *, int);
void Com_BlockFullChecksum(void *buffer, int len, unsigned char *outbuf) {
  mdfour(outbuf, (unsigned char *)buffer, len);
}


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

x86 assembly (clang, -O2):
<Com_BlockFullChecksum>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <mdfour@plt>

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

LLVM IR (-O2):
define void @Com_BlockFullChecksum(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @mdfour(i8* %2, i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
struct Cyc_List_List *Cyc_Lower_anormalize(struct Cyc_List_List *);
struct Cyc_List_List *Cyc_Lower_lower(struct Cyc_List_List *ds) {
  struct Cyc_List_List *_T0;
  ds = Cyc_Lower_anormalize(ds);
  _T0 = ds;
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_Lower_lower>:
jmp    1030 <Cyc_Lower_anormalize@plt>

LLVM IR (-O0):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_Lower_lower(%struct.Cyc_List_List* %0) {
%2 = alloca %struct.Cyc_List_List*
%3 = alloca %struct.Cyc_List_List*
store %struct.Cyc_List_List* %0, %struct.Cyc_List_List** %2
%4 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %2
%5 = call %struct.Cyc_List_List* @Cyc_Lower_anormalize(%struct.Cyc_List_List* %4)
store %struct.Cyc_List_List* %5, %struct.Cyc_List_List** %2
%6 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %2
store %struct.Cyc_List_List* %6, %struct.Cyc_List_List** %3
%7 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %3
ret %struct.Cyc_List_List* %7
}

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_Lower_lower(%struct.Cyc_List_List* %0) {
%2 = tail call %struct.Cyc_List_List* @Cyc_Lower_anormalize(%struct.Cyc_List_List* %0)
ret %struct.Cyc_List_List* %2
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int const);
void nhr_thread_sleep(const unsigned int millisec) { usleep(millisec * 1000); }


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

x86 assembly (clang, -O2):
<nhr_thread_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @nhr_thread_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @nhr_thread_sleep(i32 %0) {
%2 = mul i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}