xunge/DecIR huggingface dataset:
void test_four(int x, int y) {
#pragma omp target simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
void XcmsConvertColors() {}


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

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

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

LLVM IR (-O2):
define void @XcmsConvertColors() {
ret void
}
/* Variables and functions */
int bma250_write_reg(unsigned char, unsigned char *, int);
int bma250_write_reg_byte(unsigned char adr, unsigned char val) {
  return bma250_write_reg(adr, &val, 1);
}


x86 assembly (clang, -O0):
<bma250_write_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x1(%rbp),%edi
call   1030 <bma250_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bma250_write_reg_byte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <bma250_write_reg@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @bma250_write_reg_byte(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @bma250_write_reg(i8 zeroext %0, i8* %3, i32 1)
ret i32 %4
}
int isVowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isVowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     1158 <isVowel+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
je     1158 <isVowel+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
je     1158 <isVowel+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
je     1158 <isVowel+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
je     1158 <isVowel+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    1164 <isVowel+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <isVowel+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isVowel>:
add    $0x9f,%dil
ror    %dil
xor    %eax,%eax
cmp    $0xc,%dil
ja     111d <isVowel+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @isVowel(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 97
br i1 %6, label %27, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 101
br i1 %10, label %27, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 105
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 111
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 117
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 121
br i1 %26, label %27, label %28
27: ; preds = %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %29
28: ; preds = %23
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
@switch.table.isVowel = [13 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @isVowel(i8 signext %0) {
%2 = add i8 %0, -97
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 13
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [13 x i32], [13 x i32]* @switch.table.isVowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int musbgm_getlen(int);
int mus_bgm_getlength(int no) { return musbgm_getlen(no); }


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

x86 assembly (clang, -O2):
<mus_bgm_getlength>:
jmp    1030 <musbgm_getlen@plt>

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

LLVM IR (-O2):
define i32 @mus_bgm_getlength(i32 %0) {
%2 = tail call i32 @musbgm_getlen(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int fputc(int ch, FILE *fp) {
  char c = (char)ch;
  return fwrite(&c, 1, 1, fp);
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x11(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rax
mov    %rsi,%rcx
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fputc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i8
store i8 %7, i8* %5
%8 = load i32*, i32** %4
%9 = call i32 @fwrite(i8* %5, i32 1, i32 1, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @fputc(i32 %0, i32* nocapture %1) {
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = call i32 @fwrite(i8* %3, i32 1, i32 1, i32* %1)
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t hex_convert(uint8_t c) { return (c & 0xf) + (c >> 6) * 9; }


x86 assembly (clang, -O0):
<hex_convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
imul   $0x9,%ecx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_convert>:
mov    %edi,%ecx
and    $0xf,%ecx
sar    $0x6,%edi
lea    (%rdi,%rdi,8),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hex_convert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = load i32, i32* %2
%6 = ashr i32 %5, 6
%7 = mul nsw i32 %6, 9
%8 = add nsw i32 %4, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hex_convert(i32 %0) {
%2 = and i32 %0, 15
%3 = ashr i32 %0, 6
%4 = mul nsw i32 %3, 9
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
bool file_exist(char *fname) {
  if (access(fname, F_OK) != -1)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<file_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <file_exist+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <file_exist+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exist>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @file_exist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @F_OK
%6 = call i32 @access(i8* %4, i32 %5)
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @file_exist(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void NULL_DrawBackground(const char *flatname, int n) {}


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

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

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

LLVM IR (-O2):
define void @NULL_DrawBackground(i8* nocapture %0, i32 %1) {
ret void
}
EnHash(id) char *id;
{
  register unsigned hash_val = 0;
  while (*id) {
    hash_val = 31 * hash_val + *id++;
  }
  return hash_val % (unsigned)257;
}


x86 assembly (clang, -O0):
<EnHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <EnHash+0x3c>
imul   $0x1f,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <EnHash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x101,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1140 <EnHash+0x40>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <EnHash+0x10>
mov    %eax,%ecx
mov    $0xff00ff01,%edx
imul   %rcx,%rdx
shr    $0x28,%rdx
mov    %edx,%ecx
shl    $0x8,%ecx
add    %edx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @EnHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 31
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 257
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ SOCK_DGRAM;
int get_fd(int /*<<< orphan*/, int);
int get_udp_socket(int port) { return get_fd(SOCK_DGRAM, port); }


x86 assembly (clang, -O0):
<get_udp_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <get_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_udp_socket>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <get_fd@plt>

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

LLVM IR (-O2):
@SOCK_DGRAM = global i32 0
define i32 @get_udp_socket(i32 %0) {
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @get_fd(i32 %2, i32 %0)
ret i32 %3
}
void ptrace_sandbox_permit_socket(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_socket(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Variables and functions */
char *StrAlloc(int);
int /*<<< orphan*/ StrFree(char *);
int StrLen(char *);
int StrSize(char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *StrCpy(char *d, char *s) {
  if (StrLen(s) > StrSize(d) - 1) {
    StrFree(d);
    d = StrAlloc(StrLen(s) + 1);
  }
  strcpy(d, s);
  return d;
}


x86 assembly (clang, -O0):
<StrCpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <StrLen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <StrSize@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jle    11a5 <StrCpy+0x55>
mov    -0x8(%rbp),%rdi
call   1040 <StrFree@plt>
mov    -0x10(%rbp),%rdi
call   1050 <StrLen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1070 <StrAlloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrCpy>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <StrLen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <StrSize@plt>
cmp    %eax,%ebp
jl     118b <StrCpy+0x3b>
mov    %rbx,%rdi
call   1040 <StrFree@plt>
mov    %r14,%rdi
call   1050 <StrLen@plt>
lea    0x1(%rax),%edi
call   1070 <StrAlloc@plt>
mov    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @StrCpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @StrLen(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @StrSize(i8* %7)
%9 = sub nsw i32 %8, 1
%10 = icmp sgt i32 %6, %9
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @StrFree(i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @StrLen(i8* %14)
%16 = add nsw i32 %15, 1
%17 = call i8* @StrAlloc(i32 %16)
store i8* %17, i8** %3
br label %18
18: ; preds = %11, %2
%19 = load i8*, i8** %3
%20 = load i8*, i8** %4
%21 = call i32 @strcpy(i8* %19, i8* %20)
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @StrCpy(i8* %0, i8* %1) {
%3 = tail call i32 @StrLen(i8* %1)
%4 = tail call i32 @StrSize(i8* %0)
%5 = icmp slt i32 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = tail call i32 @StrFree(i8* %0)
%8 = tail call i32 @StrLen(i8* %1)
%9 = add nsw i32 %8, 1
%10 = tail call i8* @StrAlloc(i32 %9)
br label %11
11: ; preds = %6, %2
%12 = phi i8* [ %10, %6 ], [ %0, %2 ]
%13 = tail call i32 @strcpy(i8* %12, i8* %1)
ret i8* %12
}
int test_imm_4Fint64_highword_reg(long long val) {
  return ((val >> 32) & (0x4F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Fint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x4f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Fint64_highword_reg>:
movabs $0x4f00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Fint64_highword_reg(i64 %0) {
%2 = and i64 %0, 339302416384
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void puts(char *msg) {
  while (*msg) {
    putchar(*msg++);
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FCEU_QSimpleCommand(int);
void FCEUI_VSUniCoin(void) { FCEU_QSimpleCommand(0x07); }


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

x86 assembly (clang, -O2):
<FCEUI_VSUniCoin>:
mov    $0x7,%edi
jmp    1030 <FCEU_QSimpleCommand@plt>

LLVM IR (-O0):
define void @FCEUI_VSUniCoin() {
%1 = call i32 @FCEU_QSimpleCommand(i32 7)
ret void
}

LLVM IR (-O2):
define void @FCEUI_VSUniCoin() {
%1 = tail call i32 @FCEU_QSimpleCommand(i32 7)
ret void
}
/* Type definitions */
struct comm {
  int dummy;
};

/* Variables and functions */
void comm_send(const struct comm *c, void *p, size_t n, unsigned int dst,
               int tag) {}


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

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

LLVM IR (-O0):
%struct.comm = type { i32 }
define void @comm_send(%struct.comm* %0, i8* %1, i64 %2, i32 %3, i32 %4) {
%6 = alloca %struct.comm*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
store %struct.comm* %0, %struct.comm** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.comm = type { i32 }
define void @comm_send(%struct.comm* nocapture %0, i8* nocapture %1, i64 %2, i32 %3, i32 %4) {
ret void
}
void Client_Drop(void) {}


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

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

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

LLVM IR (-O2):
define void @Client_Drop() {
ret void
}
int jac_chain_nm7_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @jac_chain_nm7_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @jac_chain_nm7_n_in() {
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ diminuto_reaper_reap_generic(int, int *, int /*<<< orphan*/);
pid_t diminuto_reaper_reap(int *statusp) {
  return diminuto_reaper_reap_generic(-1, statusp, WNOHANG);
}


x86 assembly (clang, -O0):
<diminuto_reaper_reap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
call   1030 <diminuto_reaper_reap_generic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_reaper_reap>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
jmp    1030 <diminuto_reaper_reap_generic@plt>

LLVM IR (-O0):
@WNOHANG = global i32 0
define i32 @diminuto_reaper_reap(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @WNOHANG
%5 = call i32 @diminuto_reaper_reap_generic(i32 -1, i32* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define i32 @diminuto_reaper_reap(i32* %0) {
%2 = load i32, i32* @WNOHANG
%3 = tail call i32 @diminuto_reaper_reap_generic(i32 -1, i32* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
unsigned int w5100_readSn_byte(unsigned int, int);
unsigned w5100_readSnTX_RD(unsigned sock) {
  unsigned res = w5100_readSn_byte(sock, 0x0022);
  res = (res << 8) + w5100_readSn_byte(sock, 0x0022 + 1);
  return res;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x23,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x22,%esi
call   1030 <w5100_readSn_byte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %ebx,%edi
mov    $0x23,%esi
call   1030 <w5100_readSn_byte@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @w5100_readSnTX_RD(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @w5100_readSn_byte(i32 %4, i32 34)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 8
%8 = load i32, i32* %2
%9 = call i32 @w5100_readSn_byte(i32 %8, i32 35)
%10 = add i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @w5100_readSnTX_RD(i32 %0) {
%2 = tail call i32 @w5100_readSn_byte(i32 %0, i32 34)
%3 = shl i32 %2, 8
%4 = tail call i32 @w5100_readSn_byte(i32 %0, i32 35)
%5 = add i32 %3, %4
ret i32 %5
}
void print_para(char **para) {
  int i;
  for (i = 0; *(para + i) != '\0'; i++) {
    print_line(*(para + i));
  }
}


x86 assembly (clang, -O0):
<print_para>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1157 <print_para+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <print_line@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_para+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_para>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1133 <print_para+0x23>
add    $0x8,%rbx
xor    %eax,%eax
call   1030 <print_line@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <print_para+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_para(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print_line to i32 (i8*, ...)*)(i8* %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void I2CSlaveDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000004))) = 0;
  (*((volatile unsigned long *)(ulBase - 0x40020800 + 0x40020000 +
                                0x00000020))) &= ~(0x00000020);
}


x86 assembly (clang, -O0):
<I2CSlaveDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
sub    $0x40020800,%rax
mov    0x40020020(%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    %rcx,0x40020020(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveDisable>:
movq   $0x0,0x4(%rdi)
andq   $0xffffffffffffffdf,-0x7e0(%rdi)
df
ret

LLVM IR (-O0):
define void @I2CSlaveDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 4
%5 = inttoptr i64 %4 to i64*
store volatile i64 0, i64* %5
%6 = load i64, i64* %2
%7 = sub i64 %6, 1073874944
%8 = add i64 %7, 1073872896
%9 = add i64 %8, 32
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, -33
store volatile i64 %12, i64* %10
ret void
}

LLVM IR (-O2):
define void @I2CSlaveDisable(i64 %0) {
%2 = add i64 %0, 4
%3 = inttoptr i64 %2 to i64*
store volatile i64 0, i64* %3
%4 = add i64 %0, -2016
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -33
store volatile i64 %7, i64* %5
ret void
}
/* Type definitions */
struct DataMap {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int DataMapWrite(int /*<<< orphan*/, struct DataMap *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int DataMapFwrite(FILE *fp, struct DataMap *ptr) {
  return DataMapWrite(fileno(fp), ptr);
}


x86 assembly (clang, -O0):
<DataMapFwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fileno@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <DataMapWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DataMapFwrite>:
push   %rbx
mov    %rsi,%rbx
call   1030 <fileno@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <DataMapWrite@plt>

LLVM IR (-O0):
%struct.DataMap = type { i32 }
define i32 @DataMapFwrite(i32* %0, %struct.DataMap* %1) {
%3 = alloca i32*
%4 = alloca %struct.DataMap*
store i32* %0, i32** %3
store %struct.DataMap* %1, %struct.DataMap** %4
%5 = load i32*, i32** %3
%6 = call i32 @fileno(i32* %5)
%7 = load %struct.DataMap*, %struct.DataMap** %4
%8 = call i32 @DataMapWrite(i32 %6, %struct.DataMap* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.DataMap = type { i32 }
define i32 @DataMapFwrite(i32* nocapture %0, %struct.DataMap* %1) {
%3 = tail call i32 @fileno(i32* %0)
%4 = tail call i32 @DataMapWrite(i32 %3, %struct.DataMap* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_time(char *time) { write("csv-task.csv", "%s,", time); }


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

x86 assembly (clang, -O2):
<function_time>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_time(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
code_asm(s, l) char *s;
int l;
{ error("\"asm\" instruction not implemented"); }


x86 assembly (clang, -O0):
<code_asm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"\22asm\22 instruction not implemented\00"
define i32 @code_asm(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@.str = [34 x i8] c"\22asm\22 instruction not implemented\00"
define i32 @code_asm(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int color;
  int /*<<< orphan*/ cmd;
};
typedef TYPE_1__ osd_cmd_t;

/* Variables and functions */
int /*<<< orphan*/ OSD_Fill;
int /*<<< orphan*/ OSD_SEND_CMD;
int ioctl(int, int /*<<< orphan*/, TYPE_1__ *);
int OSDFill(int dev, int color) {
  osd_cmd_t dc;
  dc.cmd = OSD_Fill;
  dc.color = color;
  return ioctl(dev, OSD_SEND_CMD, &dc);
}


x86 assembly (clang, -O0):
<OSDFill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSDFill>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    %esi,(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
@OSD_Fill = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDFill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.TYPE_3__
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* @OSD_Fill
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* %4
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %3
%11 = load i32, i32* @OSD_SEND_CMD
%12 = call i32 @ioctl(i32 %10, i32 %11, %struct.TYPE_3__* %5)
ret i32 %12
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
@OSD_Fill = global i32 0
@OSD_SEND_CMD = global i32 0
define i32 @OSDFill(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = bitcast %struct.TYPE_3__* %3 to i8*
%5 = load i32, i32* @OSD_Fill
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i64 0, i32 1
store i32 %5, i32* %6
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i64 0, i32 0
store i32 %1, i32* %7
%8 = load i32, i32* @OSD_SEND_CMD
%9 = call i32 @ioctl(i32 %0, i32 %8, %struct.TYPE_3__* %3)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int cpu_bind(const unsigned short cpu) {
  cpu_set_t mask;
  int ret;
  CPU_ZERO(&mask);
  CPU_SET((int)cpu, &mask);
  ret = sched_setaffinity(0, sizeof mask, &mask);
  return ret;
}


x86 assembly (clang, -O0):
<cpu_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
movzwl -0x2(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_bind>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @cpu_bind(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
%4 = alloca i32
store i16 %0, i16* %2
%5 = call i32 @CPU_ZERO(i32* %3)
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = call i32 @CPU_SET(i32 %7, i32* %3)
%9 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %3)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @cpu_bind(i16 zeroext %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = zext i16 %0 to i32
%6 = call i32 @CPU_SET(i32 %5, i32* %2)
%7 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %2)
ret i32 %7
}
int test() {
  if (1) {
  }
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @test() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ execvpe(char *, char **, char **);
void execWithoutEnv(char *cmd, char **argv) {
  char *path =
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
  char *env[] = {path, NULL};
  execvpe(cmd, argv, env);
}


x86 assembly (clang, -O0):
<execWithoutEnv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <execvpe@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execWithoutEnv>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdx
call   1030 <execvpe@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [66 x i8] c"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\00"
define void @execWithoutEnv(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca [2 x i8*]
store i8* %0, i8** %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8** %5
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %6, i64 0, i64 0
%8 = load i8*, i8** %5
store i8* %8, i8** %7
%9 = getelementptr inbounds i8*, i8** %7, i64 1
store i8* null, i8** %9
%10 = load i8*, i8** %3
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %6, i64 0, i64 0
%13 = call i32 @execvpe(i8* %10, i8** %11, i8** %12)
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\00"
define void @execWithoutEnv(i8* %0, i8** %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* null, i8** %6
%7 = call i32 @execvpe(i8* %0, i8** %1, i8** %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void display_info() {
  fprintf(stderr, "\nMANEXT 1.03 Copyright (C) 1991-1996 Mark Hessling\n"
                  "All rights reserved.\n"
                  "MANEXT is distributed under the terms of the GNU\n"
                  "General Public License and comes with NO WARRANTY.\n"
                  "See the file COPYING for details.\n"
                  "\nUsage: manext sourcefile [...]\n\n");
}


x86 assembly (clang, -O0):
<display_info>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_info>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [240 x i8] c"\0AMANEXT 1.03 Copyright (C) 1991-1996 Mark Hessling\0AAll rights reserved.\0AMANEXT is distributed under the terms of the GNU\0AGeneral Public License and comes with NO WARRANTY.\0ASee the file COPYING for details.\0A\0AUsage: manext sourcefile [...]\0A\0A\00"
define void @display_info() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [240 x i8] c"\0AMANEXT 1.03 Copyright (C) 1991-1996 Mark Hessling\0AAll rights reserved.\0AMANEXT is distributed under the terms of the GNU\0AGeneral Public License and comes with NO WARRANTY.\0ASee the file COPYING for details.\0A\0AUsage: manext sourcefile [...]\0A\0A\00"
define void @display_info() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([240 x i8], [240 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((always_)) int pci_enable_msi(struct pci_dev *dev) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @pci_enable_msi(%struct.pci_dev* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t bcd_to_byte(uint8_t bcd) { return bcd - (6 * (bcd >> 4)); }


x86 assembly (clang, -O0):
<bcd_to_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
imul   $0x6,%ecx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd_to_byte>:
mov    %edi,%eax
mov    %edi,%ecx
sar    $0x4,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bcd_to_byte(i32 %0) {
%2 = ashr i32 %0, 4
%3 = mul nsw i32 %2, -6
%4 = add i32 %3, %0
ret i32 %4
}
/* Variables and functions */
void *malloc(size_t);
void *ALequalizerState_New(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<ALequalizerState_New>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @ALequalizerState_New(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @ALequalizerState_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ mulmp(float *, float const *, float *);
void transform(float *src, int num, const float *from) {
  int i;
  for (i = num; i > 0; i--) {
    mulmp(src, from, src);
    src += 3;
  }
}


x86 assembly (clang, -O0):
<transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    115e <transform+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1030 <mulmp@plt>
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1129 <transform+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <transform+0x3a>
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <mulmp@plt>
add    $0xc,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <transform+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @transform(float* %0, i32 %1, float* %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %1, %3 ]
%7 = phi float* [ %9, %5 ], [ %0, %3 ]
%8 = tail call i32 @mulmp(float* %7, float* %2, float* %7)
%9 = getelementptr inbounds float, float* %7, i64 3
%10 = add nsw i32 %6, -1
%11 = icmp ugt i32 %6, 1
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
int test(int t[2]) {
  t[1] = 12;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc,0x4(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movl   $0xc,0x4(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 12, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @test(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
store i32 12, i32* %2
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Alert: \a\n"
         "Form feed. \f\n"
         "This escape, \r, cursor go to start of the current line\n"
         "Vertical tab \v strange behaviour\n");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [111 x i8] c"Alert: \07\0AForm feed. \0C\0AThis escape, \0D, cursor go to start of the current line\0AVertical tab \0B strange behaviour\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [110 x i8] c"Alert: \07\0AForm feed. \0C\0AThis escape, \0D, cursor go to start of the current line\0AVertical tab \0B strange behaviour\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ separateString(char *);
int main(void) {
  char arr[100] = "HelloMyWord";
  separateString(arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x64,%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1040 <separateString@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1030 <separateString@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [100 x i8] c"HelloMyWord\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = bitcast [100 x i8]* %2 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @separateString(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [100 x i8] c"HelloMyWord\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @separateString(i8* %2)
ret i32 0
}