xunge/DecIR huggingface dataset:
int main() {
  char *a = "DCBA";
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"DCBA\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *afio_get_EXTICR1() {
  return mem_get_reg32(0x40010000 + 0x08);
}


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

x86 assembly (clang, -O2):
<afio_get_EXTICR1>:
mov    $0x40010008,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @afio_get_EXTICR1() {
%1 = call i32* @mem_get_reg32(i32 1073807368)
ret i32* %1
}

LLVM IR (-O2):
define i32* @afio_get_EXTICR1() {
%1 = tail call i32* @mem_get_reg32(i32 1073807368)
ret i32* %1
}
/* Variables and functions */
float __ocml_acos_f32(float);
float acosf(float x) { return __ocml_acos_f32(x); }


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

x86 assembly (clang, -O2):
<acosf>:
jmp    1030 <__ocml_acos_f32@plt>

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

LLVM IR (-O2):
define float @acosf(float %0) {
%2 = tail call float @__ocml_acos_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr,
                "usage: sendudp [-i <string>] <address>:<port> [<file>*]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"usage: sendudp [-i <string>] <address>:<port> [<file>*]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"usage: sendudp [-i <string>] <address>:<port> [<file>*]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
int show_version(void) {
  const char *version_info =
      "Unusable LZ77 Compressor -- "
      "0.0.2"
      "\n"
      "For demonstrating libulz77 (Unusable LZ77 Library)\n"
      "Copyright(C) 2013-2014 Cheryl Natsu\n";
  puts(version_info);
  return 0;
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [122 x i8] c"Unusable LZ77 Compressor -- 0.0.2\0AFor demonstrating libulz77 (Unusable LZ77 Library)\0ACopyright(C) 2013-2014 Cheryl Natsu\0A\00"
define i32 @show_version() {
%1 = alloca i8*
store i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @puts(i8* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [122 x i8] c"Unusable LZ77 Compressor -- 0.0.2\0AFor demonstrating libulz77 (Unusable LZ77 Library)\0ACopyright(C) 2013-2014 Cheryl Natsu\0A\00"
define i32 @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([122 x i8], [122 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int verif_word(char caract) {
  if (caract == ' ' || caract == '\t')
    return (-1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<verif_word>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1124 <verif_word+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    1130 <verif_word+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1137 <verif_word+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<verif_word>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @verif_word(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, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 -1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @verif_word(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct TrieNode {
  int dummy;
};
struct Trie {
  int dummy;
};
struct LinkedList {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TrieParSearch_Aux(struct Trie *, struct LinkedList *,
                                     struct TrieNode *);
struct TrieNode *TrieSearchNode(struct Trie *, char const *);
void TrieParSearch(struct Trie *_Trie, struct LinkedList *_List,
                   const char *_Str) {
  struct TrieNode *_Node = TrieSearchNode(_Trie, _Str);
  TrieParSearch_Aux(_Trie, _List, _Node);
}


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

x86 assembly (clang, -O2):
<TrieParSearch>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rsi
call   1040 <TrieSearchNode@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <TrieParSearch_Aux@plt>

LLVM IR (-O0):
%struct.Trie = type { i32 }
%struct.LinkedList = type { i32 }
%struct.TrieNode = type { i32 }
define void @TrieParSearch(%struct.Trie* %0, %struct.LinkedList* %1, i8* %2) {
%4 = alloca %struct.Trie*
%5 = alloca %struct.LinkedList*
%6 = alloca i8*
%7 = alloca %struct.TrieNode*
store %struct.Trie* %0, %struct.Trie** %4
store %struct.LinkedList* %1, %struct.LinkedList** %5
store i8* %2, i8** %6
%8 = load %struct.Trie*, %struct.Trie** %4
%9 = load i8*, i8** %6
%10 = call %struct.TrieNode* @TrieSearchNode(%struct.Trie* %8, i8* %9)
store %struct.TrieNode* %10, %struct.TrieNode** %7
%11 = load %struct.Trie*, %struct.Trie** %4
%12 = load %struct.LinkedList*, %struct.LinkedList** %5
%13 = load %struct.TrieNode*, %struct.TrieNode** %7
%14 = call i32 @TrieParSearch_Aux(%struct.Trie* %11, %struct.LinkedList* %12, %struct.TrieNode* %13)
ret void
}

LLVM IR (-O2):
%struct.Trie = type { i32 }
%struct.LinkedList = type { i32 }
%struct.TrieNode = type { i32 }
define void @TrieParSearch(%struct.Trie* %0, %struct.LinkedList* %1, i8* %2) {
%4 = tail call %struct.TrieNode* @TrieSearchNode(%struct.Trie* %0, i8* %2)
%5 = tail call i32 @TrieParSearch_Aux(%struct.Trie* %0, %struct.LinkedList* %1, %struct.TrieNode* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aciTxSendPacket(int, unsigned short *, int);
void aciGetParamFromDevice(unsigned short id) { aciTxSendPacket(0x89, &id, 2); }


x86 assembly (clang, -O0):
<aciGetParamFromDevice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x89,%edi
lea    -0x2(%rbp),%rsi
mov    $0x2,%edx
call   1030 <aciTxSendPacket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aciGetParamFromDevice>:
push   %rax
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x89,%edi
mov    $0x2,%edx
call   1030 <aciTxSendPacket@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @aciGetParamFromDevice(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @aciTxSendPacket(i32 137, i16* %2, i32 2)
ret void
}

LLVM IR (-O2):
define void @aciGetParamFromDevice(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @aciTxSendPacket(i32 137, i16* %2, i32 2)
ret void
}
int abs(int i) { return ((i < 0) ? -i : i); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ p;

/* Variables and functions */
uint32_t be32dec(const void *pp) {
  const uint8_t *p = (uint8_t const *)pp;
  return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
          ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
}


x86 assembly (clang, -O0):
<be32dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec>:
mov    0x10(%rdi),%ecx
shl    $0x8,%ecx
add    0x18(%rdi),%ecx
mov    (%rdi),%eax
mov    0x8(%rdi),%edx
shl    $0x10,%edx
add    %ecx,%edx
shl    $0x18,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @be32dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 24
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds i8, i8* %0, i64 16
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %11, %6
%13 = getelementptr inbounds i8, i8* %0, i64 8
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
%19 = load i64, i64* %2
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 24
%22 = add nsw i32 %18, %21
ret i32 %22
}
unsigned int DoubleBGR2RGB(unsigned int BGR) {
  unsigned int ebx, eax, edx;
  ebx = (BGR & 0x000000ff) << 1;
  if (ebx & 0x00000100)
    ebx = 0x000000ff;
  eax = (BGR & 0x0000ff00) << 1;
  if (eax & 0x00010000)
    eax = 0x0000ff00;
  edx = (BGR & 0x00ff0000) << 1;
  if (edx & 0x01000000)
    edx = 0x00ff0000;
  return (ebx | eax | edx);
}


x86 assembly (clang, -O0):
<DoubleBGR2RGB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     112d <DoubleBGR2RGB+0x2d>
movl   $0xff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x10000,%eax
cmp    $0x0,%eax
je     1153 <DoubleBGR2RGB+0x53>
movl   $0xff00,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff0000,%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1000000,%eax
cmp    $0x0,%eax
je     1179 <DoubleBGR2RGB+0x79>
movl   $0xff0000,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoubleBGR2RGB>:
lea    (%rdi,%rdi,1),%ecx
mov    %ecx,%eax
and    $0x1fe,%eax
test   $0x80,%dil
mov    $0xff,%edx
cmove  %eax,%edx
mov    %ecx,%esi
and    $0x1fe00,%esi
test   $0x8000,%edi
mov    $0xff00,%eax
cmove  %esi,%eax
and    $0x1fe0000,%ecx
test   $0x800000,%edi
mov    $0xff0000,%esi
cmove  %ecx,%esi
or     %edx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @DoubleBGR2RGB(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, 256
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 255, i32* %3
br label %13
13: ; preds = %12, %1
%14 = load i32, i32* %2
%15 = and i32 %14, 65280
%16 = shl i32 %15, 1
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = and i32 %17, 65536
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %13
store i32 65280, i32* %4
br label %21
21: ; preds = %20, %13
%22 = load i32, i32* %2
%23 = and i32 %22, 16711680
%24 = shl i32 %23, 1
store i32 %24, i32* %5
%25 = load i32, i32* %5
%26 = and i32 %25, 16777216
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %21
store i32 16711680, i32* %5
br label %29
29: ; preds = %28, %21
%30 = load i32, i32* %3
%31 = load i32, i32* %4
%32 = or i32 %30, %31
%33 = load i32, i32* %5
%34 = or i32 %32, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @DoubleBGR2RGB(i32 %0) {
%2 = shl i32 %0, 1
%3 = and i32 %2, 510
%4 = and i32 %0, 128
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 %3, i32 255
%7 = and i32 %2, 130560
%8 = and i32 %0, 32768
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 %7, i32 65280
%11 = and i32 %2, 33423360
%12 = and i32 %0, 8388608
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i32 %11, i32 16711680
%15 = or i32 %6, %10
%16 = or i32 %15, %14
ret i32 %16
}
int always_one_2(int a) {
  if (a / 100 < -999999999)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<always_one_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0xc4653601,%eax
jge    1129 <always_one_2+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1130 <always_one_2+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @always_one_2(i32 %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int EVP_EncryptFinal_ex(int /*<<< orphan*/ *, unsigned char *, int *);
int EVP_EncryptInit_ex(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) {
  int i;
  i = EVP_EncryptFinal_ex(ctx, out, outl);
  if (i)
    i = EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, NULL);
  return i;
}


x86 assembly (clang, -O0):
<EVP_SealFinal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <EVP_EncryptFinal_ex@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     116c <EVP_SealFinal+0x4c>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rsi
mov    %r8,%rdx
mov    %r8,%rcx
call   1040 <EVP_EncryptInit_ex@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_SealFinal>:
push   %rbx
mov    %rdi,%rbx
call   1030 <EVP_EncryptFinal_ex@plt>
test   %eax,%eax
je     113f <EVP_SealFinal+0x1f>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <EVP_EncryptInit_ex@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @EVP_SealFinal(i32* %0, i8* %1, i32* %2) {
%4 = tail call i32 @EVP_EncryptFinal_ex(i32* %0, i8* %1, i32* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @EVP_EncryptInit_ex(i32* %0, i32* null, i32* null, i32* null, i32* null)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ %7, %6 ], [ 0, %3 ]
ret i32 %9
}
int f(_Bool x) { return (x == 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    $0x1,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @f(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = zext i1 %5 to i32
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i1 zeroext %0) {
%2 = xor i1 %0, true
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ post();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *thread2(void *arg) {
  sleep(3);
  printf("Hello from thread2\n");
  post();
  post();
  post();
  return NULL;
}


x86 assembly (clang, -O0):
<thread2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
call   1050 <sleep@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <post@plt>
mov    $0x0,%al
call   1040 <post@plt>
mov    $0x0,%al
call   1040 <post@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread2>:
push   %rax
mov    $0x3,%edi
call   1050 <sleep@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <post@plt>
xor    %eax,%eax
call   1040 <post@plt>
xor    %eax,%eax
call   1040 <post@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Hello from thread2\0A\00"
define i8* @thread2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 3)
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @post()
%6 = call i32 (...) @post()
%7 = call i32 (...) @post()
ret i8* null
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello from thread2\00"
define noalias i8* @thread2(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 3)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @post()
%5 = tail call i32 (...) @post()
%6 = tail call i32 (...) @post()
ret i8* null
}
void AddIndexWord(unsigned int Key, int Posi) {}


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

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

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

LLVM IR (-O2):
define void @AddIndexWord(i32 %0, i32 %1) {
ret void
}
int spl_debug_clear_buffer(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @spl_debug_clear_buffer() {
ret i32 0
}

LLVM IR (-O2):
define i32 @spl_debug_clear_buffer() {
ret i32 0
}
int isOddNumber(int n) { return (n & 1) == 1; }


x86 assembly (clang, -O0):
<isOddNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isOddNumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isOddNumber(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void QEIDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) &= ~(0x00000001);
}


x86 assembly (clang, -O0):
<QEIDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIDisable>:
andq   $0xfffffffffffffffe,(%rdi)
ret

LLVM IR (-O0):
define void @QEIDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 0
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @QEIDisable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, -2
store volatile i64 %4, i64* %2
ret void
}
int istempname(char *s) { return *s == '_'; }


x86 assembly (clang, -O0):
<istempname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<istempname>:
xor    %eax,%eax
cmpb   $0x5f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @istempname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 95
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @istempname(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long PDC_get_input_fd() { return 0L; }


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

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

LLVM IR (-O0):
define i64 @PDC_get_input_fd() {
ret i64 0
}

LLVM IR (-O2):
define i64 @PDC_get_input_fd() {
ret i64 0
}
void gtk_hbutton_box_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hbutton_box_new() {
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ fatal(char const *);
void fatalx(const char *emsg) {
  errno = 0;
  fatal(emsg);
}


x86 assembly (clang, -O0):
<fatalx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatalx>:
mov    0x2ec9(%rip),%rax
movq   $0x0,(%rax)
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@errno = global i64 0
define void @fatalx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i64 0, i64* @errno
%3 = load i8*, i8** %2
%4 = call i32 @fatal(i8* %3)
ret void
}

LLVM IR (-O2):
@errno = global i64 0
define void @fatalx(i8* %0) {
store i64 0, i64* @errno
%2 = tail call i32 @fatal(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ string_all_permutation(char *);
void main() {
  char s[] = "abc";
  string_all_permutation(s);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x636261,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <string_all_permutation@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6513249, i32* %1
%3 = call i32 @string_all_permutation(i8* %2)
ret void
}
/* Variables and functions */
char char_toLower(char);
int strlen(char *);
void str_toLower(char *str) {
  int len = strlen(str);
  for (int i = 0; i < len; i++)
    str[i] = char_toLower(str[i]);
}


x86 assembly (clang, -O0):
<str_toLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <str_toLower+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <char_toLower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113f <str_toLower+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_toLower>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %eax,%eax
jle    1157 <str_toLower+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <char_toLower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <str_toLower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @str_toLower(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %7
6: ; preds = %7, %1
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call signext i8 @char_toLower(i8 signext %10)
store i8 %11, i8* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
void Reserved_Handler15(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler15>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler15+0x9>
jmp    1109 <Reserved_Handler15+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler15>:
jmp    1100 <Reserved_Handler15>

LLVM IR (-O0):
define void @Reserved_Handler15() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler15() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void int_imm8(unsigned char imm8) {
  put8(0xCD);
  put8(imm8);
}


x86 assembly (clang, -O0):
<int_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xcd,%edi
call   1030 <put8@plt>
movzbl -0x1(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_imm8>:
push   %rbx
mov    %edi,%ebx
mov    $0xcd,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @int_imm8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @put8(i8 zeroext -51)
%4 = load i8, i8* %2
%5 = call i32 @put8(i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @int_imm8(i8 zeroext %0) {
%2 = tail call i32 @put8(i8 zeroext -51)
%3 = tail call i32 @put8(i8 zeroext %0)
ret void
}
void malloc_set_tracefn(s, fn) char *s;
char *fn;
{}


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

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

LLVM IR (-O0):
define void @malloc_set_tracefn(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 @malloc_set_tracefn(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/);
void wl_keyboard_send_key(struct wl_resource *resource_, uint32_t serial,
                          uint32_t time, uint32_t key, uint32_t state) {
  wl_resource_post_event(resource_, 3, serial, time, key, state);
}


x86 assembly (clang, -O0):
<wl_keyboard_send_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    $0x3,%esi
call   1030 <wl_resource_post_event@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_keyboard_send_key>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3,%esi
jmp    1030 <wl_resource_post_event@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
define void @wl_keyboard_send_key(%struct.wl_resource* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.wl_resource*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.wl_resource* %0, %struct.wl_resource** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.wl_resource*, %struct.wl_resource** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @wl_resource_post_event(%struct.wl_resource* %11, i32 3, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_keyboard_send_key(%struct.wl_resource* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 3, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void push(void) { printf("\tpush\t%%eax\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"\09push\09%%eax\0A\00"
define void @push() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09push\09%%eax\0A\00"
define void @push() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *const, void const *const, int);
size_t store_deserialize_int64(int64_t *const to, const void *const from) {
  memcpy(to, from, sizeof(*to));
  return sizeof(*to);
}


x86 assembly (clang, -O0):
<store_deserialize_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_deserialize_int64>:
push   %rax
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    $0x4,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @store_deserialize_int64(i32* %0, i8* %1) {
%3 = tail call i32 @memcpy(i32* %0, i8* %1, i32 4)
ret i64 4
}
int checklinks() { return 0x0; }


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

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

LLVM IR (-O0):
define i32 @checklinks() {
ret i32 0
}

LLVM IR (-O2):
define i32 @checklinks() {
ret i32 0
}
/* Variables and functions */
int lower(int);
int /*<<< orphan*/ printf(char *, char, int);
int main() { printf("%c == %c\n", 'C', lower(140)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8c,%edi
call   1040 <lower@plt>
mov    %eax,%edx
lea    0xec9(%rip),%rdi
mov    $0x43,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8c,%edi
call   1040 <lower@plt>
lea    0xece(%rip),%rdi
mov    $0x43,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%c == %c\0A\00"
define i32 @main() {
%1 = call i32 @lower(i32 140)
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 67, i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c == %c\0A\00"
define i32 @main() {
%1 = tail call i32 @lower(i32 140)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 67, i32 %1)
ret i32 0
}
double min(double a, double b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <min+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void gtk_accel_label_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_label_get_type() {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(scalar_t__ *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
scalar_t__ time(int /*<<< orphan*/ *);
void display_time(time_t t, char *ts, size_t len) {
  struct tm *tp;
  if (!t)
    t = time(NULL);
  tp = localtime(&t);
  strftime(ts, len, "%F %T", tp);
}


x86 assembly (clang, -O0):
<display_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115c <display_time+0x2c>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xe84(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_time>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,(%rsp)
test   %rdi,%rdi
jne    114e <display_time+0x1e>
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <localtime@plt>
lea    0xea3(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [6 x i8] c"%F %T\00"
define void @display_time(i64 %0, i8* %1, i64 %2) {
%4 = alloca i64
store i64 %0, i64* %4
%5 = icmp eq i64 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i64 @time(i32* null)
store i64 %7, i64* %4
br label %8
8: ; preds = %6, %3
%9 = call %struct.tm* @localtime(i64* %4)
%10 = call i32 @strftime(i8* %1, i64 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void setRandomNumberSeed(unsigned int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<setRandomNumberSeed>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @setRandomNumberSeed(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
void part6() {
  int a[10];
  int marr[10][10];
  int(*ptr2arr[10])[10];
  int *arr2ptr[10][10];
  int i, *iptr;
  for (i = 0; i < 10; i++)
    ptr2arr[i] = &marr[i];
  iptr = (int *)ptr2arr[0];
}


x86 assembly (clang, -O0):
<part6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4c0,%rsp
movl   $0x0,-0x534(%rbp)
cmpl   $0xa,-0x534(%rbp)
jge    115a <part6+0x5a>
movslq -0x534(%rbp),%rax
lea    -0x1c0(%rbp),%rcx
imul   $0x28,%rax,%rax
add    %rax,%rcx
movslq -0x534(%rbp),%rax
mov    %rcx,-0x210(%rbp,%rax,8)
ff
mov    -0x534(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x534(%rbp)
jmp    1115 <part6+0x15>
mov    -0x210(%rbp),%rax
mov    %rax,-0x540(%rbp)
add    $0x4c0,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @part6() {
ret void
}
int main() {
  int a = 4 + 4;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p256_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_p256_add(uint32_t out1[8], const uint32_t arg1[8],
                   const uint32_t arg2[8]) {
  internal_fiat_p256_add((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_p256_add>:
jmp    1030 <internal_fiat_p256_add@plt>

LLVM IR (-O0):
define void @fiat_p256_add(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i32*, i32** %6
%12 = ptrtoint i32* %11 to i64
%13 = call i32 @internal_fiat_p256_add(i64 %8, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @fiat_p256_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_p256_add(i64 %4, i64 %5, i64 %6)
ret void
}
unsigned int EDMAVersionGet(void) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @EDMAVersionGet() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ writeseq(int /*<<< orphan*/);
void op_writeseq() { writeseq(0); }


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

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

LLVM IR (-O0):
define void @op_writeseq() {
%1 = call i32 @writeseq(i32 0)
ret void
}

LLVM IR (-O2):
define void @op_writeseq() {
%1 = tail call i32 @writeseq(i32 0)
ret void
}
unsigned long long get_nucl_value(char nucl) {
  static unsigned long long bit1 = 1 << 2;
  static unsigned long long bit2 = 3 << 1;
  if (nucl & bit1) {
    return ((nucl >> 4) | 2) & 3;
  }
  return (nucl & bit2) >> 1;
}


x86 assembly (clang, -O0):
<get_nucl_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbq -0x9(%rbp),%rax
and    0x2f0a(%rip),%rax
cmp    $0x0,%rax
je     1138 <get_nucl_value+0x38>
movsbl -0x9(%rbp),%eax
sar    $0x4,%eax
or     $0x2,%eax
and    $0x3,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    114c <get_nucl_value+0x4c>
movsbq -0x9(%rbp),%rax
and    0x2ee4(%rip),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nucl_value>:
test   $0x4,%dil
jne    1110 <get_nucl_value+0x10>
movzbl %dil,%eax
shr    %eax
and    $0x3,%eax
ret
shr    $0x4,%dil
and    $0x1,%dil
or     $0x2,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
@get_nucl_value.bit1 = internal global i64 4
@get_nucl_value.bit2 = internal global i64 6
define i64 @get_nucl_value(i8 signext %0) {
%2 = alloca i64
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i64
%6 = load i64, i64* @get_nucl_value.bit1
%7 = and i64 %5, %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = ashr i32 %11, 4
%13 = or i32 %12, 2
%14 = and i32 %13, 3
%15 = sext i32 %14 to i64
store i64 %15, i64* %2
br label %22
16: ; preds = %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i64
%19 = load i64, i64* @get_nucl_value.bit2
%20 = and i64 %18, %19
%21 = lshr i64 %20, 1
store i64 %21, i64* %2
br label %22
22: ; preds = %16, %9
%23 = load i64, i64* %2
ret i64 %23
}

LLVM IR (-O2):
define i64 @get_nucl_value(i8 signext %0) {
%2 = zext i8 %0 to i64
%3 = and i64 %2, 4
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = lshr i8 %0, 4
%7 = and i8 %6, 1
%8 = or i8 %7, 2
%9 = zext i8 %8 to i64
br label %13
10: ; preds = %1
%11 = lshr i64 %2, 1
%12 = and i64 %11, 3
br label %13
13: ; preds = %10, %5
%14 = phi i64 [ %9, %5 ], [ %12, %10 ]
ret i64 %14
}