xunge/DecIR huggingface dataset:
/* Type definitions */
struct rocker_tlv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rocker_tlv_data(struct rocker_tlv const *);
int /*<<< orphan*/ rocker_tlv_len(struct rocker_tlv const *);
int /*<<< orphan*/ rocker_tlv_parse(struct rocker_tlv **, int,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
void rocker_tlv_parse_nested(struct rocker_tlv **tb, int maxtype,
                             const struct rocker_tlv *tlv) {
  rocker_tlv_parse(tb, maxtype, rocker_tlv_data(tlv), rocker_tlv_len(tlv));
}


x86 assembly (clang, -O0):
<rocker_tlv_parse_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <rocker_tlv_data@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <rocker_tlv_len@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
call   1030 <rocker_tlv_parse@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rocker_tlv_parse_nested>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%r15
mov    %rdx,%rdi
call   1040 <rocker_tlv_data@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <rocker_tlv_len@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <rocker_tlv_parse@plt>

LLVM IR (-O0):
%struct.rocker_tlv = type { i32 }
define void @rocker_tlv_parse_nested(%struct.rocker_tlv** %0, i32 %1, %struct.rocker_tlv* %2) {
%4 = alloca %struct.rocker_tlv**
%5 = alloca i32
%6 = alloca %struct.rocker_tlv*
store %struct.rocker_tlv** %0, %struct.rocker_tlv*** %4
store i32 %1, i32* %5
store %struct.rocker_tlv* %2, %struct.rocker_tlv** %6
%7 = load %struct.rocker_tlv**, %struct.rocker_tlv*** %4
%8 = load i32, i32* %5
%9 = load %struct.rocker_tlv*, %struct.rocker_tlv** %6
%10 = call i32 @rocker_tlv_data(%struct.rocker_tlv* %9)
%11 = load %struct.rocker_tlv*, %struct.rocker_tlv** %6
%12 = call i32 @rocker_tlv_len(%struct.rocker_tlv* %11)
%13 = call i32 @rocker_tlv_parse(%struct.rocker_tlv** %7, i32 %8, i32 %10, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.rocker_tlv = type { i32 }
define void @rocker_tlv_parse_nested(%struct.rocker_tlv** %0, i32 %1, %struct.rocker_tlv* %2) {
%4 = tail call i32 @rocker_tlv_data(%struct.rocker_tlv* %2)
%5 = tail call i32 @rocker_tlv_len(%struct.rocker_tlv* %2)
%6 = tail call i32 @rocker_tlv_parse(%struct.rocker_tlv** %0, i32 %1, i32 %4, i32 %5)
ret void
}
/* Type definitions */
struct Message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ equip_inventory(struct Message *, int /*<<< orphan*/, int,
                                   int);
void cmd_unequipall(int pindex __attribute__((unused)), struct Message *msg) {
  equip_inventory(msg, 0, 1, 1);
}


x86 assembly (clang, -O0):
<cmd_unequipall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <equip_inventory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_unequipall>:
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <equip_inventory@plt>

LLVM IR (-O0):
%struct.Message = type { i32 }
define void @cmd_unequipall(i32 %0, %struct.Message* %1) {
%3 = alloca i32
%4 = alloca %struct.Message*
store i32 %0, i32* %3
store %struct.Message* %1, %struct.Message** %4
%5 = load %struct.Message*, %struct.Message** %4
%6 = call i32 @equip_inventory(%struct.Message* %5, i32 0, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
%struct.Message = type { i32 }
define void @cmd_unequipall(i32 %0, %struct.Message* %1) {
%3 = tail call i32 @equip_inventory(%struct.Message* %1, i32 0, i32 1, i32 1)
ret void
}
__attribute__((always_)) unsigned long
bdi_stat_error(struct backing_dev_info *bdi) {
  return 1;
}


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

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

LLVM IR (-O0):
%struct.backing_dev_info = type opaque
define i64 @bdi_stat_error(%struct.backing_dev_info* %0) {
%2 = alloca %struct.backing_dev_info*
store %struct.backing_dev_info* %0, %struct.backing_dev_info** %2
ret i64 1
}

LLVM IR (-O2):
%struct.backing_dev_info = type opaque
define i64 @bdi_stat_error(%struct.backing_dev_info* nocapture readnone %0) {
ret i64 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeTimer(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeTimer>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeTimer(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 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeTimer(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
/* Variables and functions */
scalar_t__ getenv(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
char *get_keys() {
  char *keys = NULL;
  if (!keys) {
    if ((keys = (char *)getenv("NEWKEYS")) == NULL) {
      keys = (char *)malloc(5);
      strcpy(keys, "kjhl");
    }
  }
  return (keys);
}


x86 assembly (clang, -O0):
<get_keys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1188 <get_keys+0x58>
lea    0xeae(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1183 <get_keys+0x53>
mov    $0x5,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1188 <get_keys+0x58>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_keys>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1161 <get_keys+0x31>
mov    $0x5,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xeaf(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"NEWKEYS\00"
@.str.1 = [5 x i8] c"kjhl\00"
define i8* @get_keys() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = load i8*, i8** %1
%3 = icmp ne i8* %2, null
br i1 %3, label %14, label %4
4: ; preds = %0
%5 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i64 @malloc(i32 5)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %8, %4
br label %14
14: ; preds = %13, %0
%15 = load i8*, i8** %1
ret i8* %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"NEWKEYS\00"
@.str.1 = [5 x i8] c"kjhl\00"
define i8* @get_keys() {
%1 = tail call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = inttoptr i64 %1 to i8*
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i64 @malloc(i32 5)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %0, %4
%9 = phi i8* [ %6, %4 ], [ %2, %0 ]
ret i8* %9
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int array_destroy(struct array *);
int queue_destroy(struct array *q) { return array_destroy(q); }


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

x86 assembly (clang, -O2):
<queue_destroy>:
jmp    1030 <array_destroy@plt>

LLVM IR (-O0):
%struct.array = type { i32 }
define i32 @queue_destroy(%struct.array* %0) {
%2 = alloca %struct.array*
store %struct.array* %0, %struct.array** %2
%3 = load %struct.array*, %struct.array** %2
%4 = call i32 @array_destroy(%struct.array* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @queue_destroy(%struct.array* %0) {
%2 = tail call i32 @array_destroy(%struct.array* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
scalar_t__ system(char *);
void output_bad_records(char *bad_parse_file, char *bad_frequency_file,
                        char *bad_insert_file) {
  char sys_string[1024];
  sprintf(sys_string, "cat %s %s %s | html_table.e '^^Bad Records' '' ''",
          bad_parse_file, bad_frequency_file, bad_insert_file);
  if (system(sys_string)) {
  };
}


x86 assembly (clang, -O0):
<output_bad_records>:
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),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     1171 <output_bad_records+0x51>
jmp    1171 <output_bad_records+0x51>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_bad_records>:
push   %rbx
sub    $0x400,%rsp
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec8(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"cat %s %s %s | html_table.e '^^Bad Records' '' ''\00"
define void @output_bad_records(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 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = call i64 @system(i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %3
br label %17
17: ; preds = %16, %3
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"cat %s %s %s | html_table.e '^^Bad Records' '' ''\00"
define void @output_bad_records(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 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%7 = call i64 @system(i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *PEM_read_PrivateKey(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *,
                                        int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ *pkey_get_eckey(int /*<<< orphan*/ *, int /*<<< orphan*/ **);
EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb,
                              void *u) {
  EVP_PKEY *pktmp;
  pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
  return pkey_get_eckey(pktmp, eckey);
}


x86 assembly (clang, -O0):
<PEM_read_ECPrivateKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <PEM_read_PrivateKey@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <pkey_get_eckey@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_ECPrivateKey>:
push   %rbx
mov    %rsi,%rbx
xor    %esi,%esi
call   1030 <PEM_read_PrivateKey@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <pkey_get_eckey@plt>

LLVM IR (-O0):
define i32* @PEM_read_ECPrivateKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %7
%12 = load i8*, i8** %8
%13 = call i32* @PEM_read_PrivateKey(i32* %10, i32* null, i32* %11, i8* %12)
store i32* %13, i32** %9
%14 = load i32*, i32** %9
%15 = load i32**, i32*** %6
%16 = call i32* @pkey_get_eckey(i32* %14, i32** %15)
ret i32* %16
}

LLVM IR (-O2):
define i32* @PEM_read_ECPrivateKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = tail call i32* @PEM_read_PrivateKey(i32* %0, i32* null, i32* %2, i8* %3)
%6 = tail call i32* @pkey_get_eckey(i32* %5, i32** %1)
ret i32* %6
}
/* Variables and functions */
int strlen(char *);
char toupper(char);
char *StrMakeUpper(char *s) {
  int i;
  for (i = 0; i < strlen(s); i++)
    s[i] = toupper(s[i]);
  return s;
}


x86 assembly (clang, -O0):
<StrMakeUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    117b <StrMakeUpper+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <StrMakeUpper+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrMakeUpper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
jle    1161 <StrMakeUpper+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <StrMakeUpper+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @StrMakeUpper(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @toupper(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret i8* %0
}
OP(ed, d2) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void main() {
  char a;
  a = '\n';
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
store i8 10, i8* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xexit(int);
int /*<<< orphan*/ xprintf(char *);
void usage(void) {
  xprintf("usage: go tool dist [command]\n"
          "Commands are:\n"
          "\n"
          "banner         print installation banner\n"
          "bootstrap      rebuild everything\n"
          "clean          deletes all built files\n"
          "env [-p]       print environment (-p: include $PATH)\n"
          "install [dir]  install individual directory\n"
          "version        print Go version\n"
          "\n"
          "All commands take -v flags to emit extra information.\n");
  xexit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <xprintf@plt>
mov    $0x2,%edi
call   1040 <xexit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <xprintf@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <xexit@plt>

LLVM IR (-O0):
@.str = [344 x i8] c"usage: go tool dist [command]\0ACommands are:\0A\0Abanner print installation banner\0Abootstrap rebuild everything\0Aclean deletes all built files\0Aenv [-p] print environment (-p: include $PATH)\0Ainstall [dir] install individual directory\0Aversion print Go version\0A\0AAll commands take -v flags to emit extra information.\0A\00"
define void @usage() {
%1 = call i32 @xprintf(i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @xexit(i32 2)
ret void
}

LLVM IR (-O2):
@.str = [344 x i8] c"usage: go tool dist [command]\0ACommands are:\0A\0Abanner print installation banner\0Abootstrap rebuild everything\0Aclean deletes all built files\0Aenv [-p] print environment (-p: include $PATH)\0Ainstall [dir] install individual directory\0Aversion print Go version\0A\0AAll commands take -v flags to emit extra information.\0A\00"
define void @usage() {
%1 = tail call i32 @xprintf(i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @xexit(i32 2)
ret void
}
int test_imm_ADuint8_mem(unsigned char *val) {
  return ((*val) & (-0xAD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ADuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff53,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ADuint8_mem>:
testb  $0x53,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ADuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 83
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned short, int);
void serial_cfg_modem(unsigned short com) { outb((com + 4), 0x03); }


x86 assembly (clang, -O0):
<serial_cfg_modem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x4,%eax
mov    $0x3,%esi
movzwl %ax,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_cfg_modem>:
add    $0x4,%edi
movzwl %di,%edi
mov    $0x3,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_cfg_modem(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add nsw i32 %4, 4
%6 = trunc i32 %5 to i16
%7 = call i32 @outb(i16 zeroext %6, i32 3)
ret void
}

LLVM IR (-O2):
define void @serial_cfg_modem(i16 zeroext %0) {
%2 = add i16 %0, 4
%3 = tail call i32 @outb(i16 zeroext %2, i32 3)
ret void
}
void __DELETE_org_apache_harmony_luni_platform_OSNetworkSystem(
    void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_org_apache_harmony_luni_platform_OSNetworkSystem(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int SDL_GetTicks();
unsigned int mp2_920_get_mini_ticks() { return (SDL_GetTicks() * 7373); }


x86 assembly (clang, -O0):
<mp2_920_get_mini_ticks>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SDL_GetTicks@plt>
imul   $0x1ccd,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2_920_get_mini_ticks>:
push   %rax
xor    %eax,%eax
call   1030 <SDL_GetTicks@plt>
imul   $0x1ccd,%eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mp2_920_get_mini_ticks() {
%1 = call i32 (...) @SDL_GetTicks()
%2 = mul nsw i32 %1, 7373
ret i32 %2
}

LLVM IR (-O2):
define i32 @mp2_920_get_mini_ticks() {
%1 = tail call i32 (...) @SDL_GetTicks()
%2 = mul nsw i32 %1, 7373
ret i32 %2
}
float rc_version_float() { return 0.34; }


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

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

LLVM IR (-O0):
define float @rc_version_float() {
ret float 0x3FD5C28F60000000
}

LLVM IR (-O2):
define float @rc_version_float() {
ret float 0x3FD5C28F60000000
}
/* Type definitions */
struct pipeline {
  int dummy;
};

/* Variables and functions */
struct pipeline *pipelineOpen(char ***, unsigned int, char *, char *);
struct pipeline *pipelineOpen1(char **cmd, unsigned opts, char *otherEndFile,
                               char *stderrFile) {
  char **cmds[2];
  cmds[0] = cmd;
  cmds[1] = NULL;
  return pipelineOpen(cmds, opts, otherEndFile, stderrFile);
}


x86 assembly (clang, -O0):
<pipelineOpen1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <pipelineOpen@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipelineOpen1>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
call   1030 <pipelineOpen@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.pipeline = type { i32 }
define %struct.pipeline* @pipelineOpen1(i8** %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [2 x i8**]
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds [2 x i8**], [2 x i8**]* %9, i64 0, i64 0
store i8** %10, i8*** %11
%12 = getelementptr inbounds [2 x i8**], [2 x i8**]* %9, i64 0, i64 1
store i8** null, i8*** %12
%13 = getelementptr inbounds [2 x i8**], [2 x i8**]* %9, i64 0, i64 0
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = call %struct.pipeline* @pipelineOpen(i8*** %13, i32 %14, i8* %15, i8* %16)
ret %struct.pipeline* %17
}

LLVM IR (-O2):
%struct.pipeline = type { i32 }
define %struct.pipeline* @pipelineOpen1(i8** %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca [2 x i8**]
%6 = bitcast [2 x i8**]* %5 to i8*
%7 = getelementptr inbounds [2 x i8**], [2 x i8**]* %5, i64 0, i64 0
store i8** %0, i8*** %7
%8 = getelementptr inbounds [2 x i8**], [2 x i8**]* %5, i64 0, i64 1
store i8** null, i8*** %8
%9 = call %struct.pipeline* @pipelineOpen(i8*** %7, i32 %1, i8* %2, i8* %3)
ret %struct.pipeline* %9
}
void ckAsmSti(void) { __asm__ __volatile__("sti"); }


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

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

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

LLVM IR (-O2):
define void @ckAsmSti() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_exec(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<free_exec>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_exec(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int __builtin_inb(int);
void main(void) {
  int i;
  i = __builtin_inb(0x1234);
  int j;
  j = __builtin_inb(0xabcd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1234,%edi
call   1030 <__builtin_inb@plt>
mov    %eax,-0x4(%rbp)
mov    $0xabcd,%edi
call   1030 <__builtin_inb@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1234,%edi
call   1030 <__builtin_inb@plt>
mov    $0xabcd,%edi
pop    %rax
jmp    1030 <__builtin_inb@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @__builtin_inb(i32 4660)
store i32 %3, i32* %1
%4 = call i32 @__builtin_inb(i32 43981)
store i32 %4, i32* %2
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @__builtin_inb(i32 4660)
%2 = tail call i32 @__builtin_inb(i32 43981)
ret void
}
int copiar_int(void *destino, const void *origen) {
  int *d = (int *)destino;
  int *o = (int *)origen;
  *d = *o;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @copiar_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
store i32 %12, i32* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @copiar_int(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
ret i32 0
}
/* Type definitions */
struct file_header {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_dbppc_comment(char *, char *, int, char *, char,
                                       struct file_header *);
void print_db_comment(int *tab, int action, char *cur_date, char *cur_time,
                      int utc, char *comment, struct file_header *file_hdr) {
  if (action & 0x02) {
    print_dbppc_comment(cur_date, cur_time, utc, comment, ';', file_hdr);
  }
}


x86 assembly (clang, -O0):
<print_db_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1160 <print_db_comment+0x50>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r9
mov    $0x3b,%r8d
call   1030 <print_dbppc_comment@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_db_comment>:
test   $0x2,%sil
jne    1117 <print_db_comment+0x7>
ret
mov    0x8(%rsp),%rax
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r8d,%edx
mov    %r9,%rcx
mov    $0x3b,%r8d
mov    %rax,%r9
jmp    1030 <print_dbppc_comment@plt>

LLVM IR (-O0):
%struct.file_header = type { i32 }
define void @print_db_comment(i32* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, %struct.file_header* %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca %struct.file_header*
store i32* %0, i32** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store %struct.file_header* %6, %struct.file_header** %14
%15 = load i32, i32* %9
%16 = and i32 %15, 2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %7
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = load i32, i32* %12
%22 = load i8*, i8** %13
%23 = load %struct.file_header*, %struct.file_header** %14
%24 = call i32 @print_dbppc_comment(i8* %19, i8* %20, i32 %21, i8* %22, i8 signext 59, %struct.file_header* %23)
br label %25
25: ; preds = %18, %7
ret void
}

LLVM IR (-O2):
%struct.file_header = type { i32 }
define void @print_db_comment(i32* nocapture readnone %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, %struct.file_header* %6) {
%8 = and i32 %1, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @print_dbppc_comment(i8* %2, i8* %3, i32 %4, i8* %5, i8 signext 59, %struct.file_header* %6)
br label %12
12: ; preds = %10, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void nn_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<nn_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @nn_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned xrop3_47_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S | stk3;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_47_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_47_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_47_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void pse() { pause(); }


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

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

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

LLVM IR (-O2):
define void @pse() {
%1 = tail call i32 (...) @pause()
ret void
}
int test_any_MSB_zero(unsigned x) {
  int i;
  for (i = (sizeof(int) << 3) - 8; i < (sizeof(int) << 3); i++)
    if (!(x & (1 << i)))
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test_any_MSB_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x18,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x20,%rax
jae    1155 <test_any_MSB_zero+0x55>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1142 <test_any_MSB_zero+0x42>
movl   $0x1,-0x4(%rbp)
jmp    115c <test_any_MSB_zero+0x5c>
jmp    1147 <test_any_MSB_zero+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <test_any_MSB_zero+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_any_MSB_zero>:
xor    %eax,%eax
cmp    $0xff000000,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @test_any_MSB_zero(i32 %0) {
%2 = icmp ult i32 %0, -16777216
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, b, c, max;
  a = 9;
  b = 40;
  c = 5;
  if (a > b) {
    max = a;
  } else {
    max = b;
  }
  if (max < c) {
    max = c;
  }
  printf("max = %d", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0x28,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114b <main+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <main+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <main+0x53>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"max = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 40)
ret i32 0
}
void initialize_memory_checker() {}


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

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

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

LLVM IR (-O2):
define void @initialize_memory_checker() {
ret void
}
struct rvi_t *
rvi_new(char *service_prefix,
        void (*service_available_cb)(struct rvi_t *rvi, char *service_name),
        void (*service_unavailable_cb)(struct rvi_t *rvi, char *service_name)) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.rvi_t = type opaque
define %struct.rvi_t* @rvi_new(i8* %0, void (%struct.rvi_t*, i8*)* %1, void (%struct.rvi_t*, i8*)* %2) {
%4 = alloca i8*
%5 = alloca void (%struct.rvi_t*, i8*)*
%6 = alloca void (%struct.rvi_t*, i8*)*
store i8* %0, i8** %4
store void (%struct.rvi_t*, i8*)* %1, void (%struct.rvi_t*, i8*)** %5
store void (%struct.rvi_t*, i8*)* %2, void (%struct.rvi_t*, i8*)** %6
ret %struct.rvi_t* null
}

LLVM IR (-O2):
%struct.rvi_t = type opaque
define noalias %struct.rvi_t* @rvi_new(i8* nocapture readnone %0, void (%struct.rvi_t*, i8*)* nocapture readnone %1, void (%struct.rvi_t*, i8*)* nocapture readnone %2) {
ret %struct.rvi_t* null
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t __get_unaligned_be16(const uint8_t *p) { return p[0] << 8 | p[1]; }


x86 assembly (clang, -O0):
<__get_unaligned_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_unaligned_be16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__get_unaligned_be16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @__get_unaligned_be16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
void *fb_DylibSymbolByOrd(void *library, short int symbol) { return 0; }


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

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

LLVM IR (-O0):
define i8* @fb_DylibSymbolByOrd(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fb_DylibSymbolByOrd(i8* nocapture readnone %0, i16 signext %1) {
ret i8* null
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int desc(uint32_t a, uint32_t b) { return a > b; }


x86 assembly (clang, -O0):
<desc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<desc>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i32 @desc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @desc(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
float d2hms(float dd) {
  int hours;
  float mins;
  hours = (int)dd;
  mins = (dd - hours) * 0.6;
  return (hours + mins);
}


x86 assembly (clang, -O0):
<d2hms>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2hms>:
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xee9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @d2hms(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = fptosi float %5 to i32
store i32 %6, i32* %3
%7 = load float, float* %2
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to float
%10 = fsub float %7, %9
%11 = fpext float %10 to double
%12 = fmul double %11, 6.000000e-01
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to float
%16 = load float, float* %4
%17 = fadd float %15, %16
ret float %17
}

LLVM IR (-O2):
define float @d2hms(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fpext float %4 to double
%6 = fmul double %5, 6.000000e-01
%7 = fptrunc double %6 to float
%8 = fadd float %3, %7
ret float %8
}
OP(fd, db) { op_db(); }


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

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_db()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_db()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr2(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SetMemW(unsigned long, unsigned long);
void SetMemL(unsigned long address, unsigned long value) {
  SetMemW(address, (value >> 16) & 65535);
  SetMemW(address + 2, (value & 65535));
}


x86 assembly (clang, -O0):
<SetMemL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
shr    $0x10,%rsi
and    $0xffff,%rsi
call   1030 <SetMemW@plt>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
mov    -0x10(%rbp),%rsi
and    $0xffff,%rsi
call   1030 <SetMemW@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetMemL>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
shr    $0x10,%esi
call   1030 <SetMemW@plt>
add    $0x2,%rbx
movzwl %r14w,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <SetMemW@plt>

LLVM IR (-O0):
define void @SetMemL(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = lshr i64 %6, 16
%8 = and i64 %7, 65535
%9 = call i32 @SetMemW(i64 %5, i64 %8)
%10 = load i64, i64* %3
%11 = add i64 %10, 2
%12 = load i64, i64* %4
%13 = and i64 %12, 65535
%14 = call i32 @SetMemW(i64 %11, i64 %13)
ret void
}

LLVM IR (-O2):
define void @SetMemL(i64 %0, i64 %1) {
%3 = lshr i64 %1, 16
%4 = and i64 %3, 65535
%5 = tail call i32 @SetMemW(i64 %0, i64 %4)
%6 = add i64 %0, 2
%7 = and i64 %1, 65535
%8 = tail call i32 @SetMemW(i64 %6, i64 %7)
ret void
}