xunge/DecIR huggingface dataset:
int main(void) {
  if (\U000000c0() != 1)
    abort();
  if (\U000000c1() != 2)
    abort();
  if (\U000000c2() != 3)
    abort();
  if (wh\U000000ff() != 4)
    abort();
  if (a\U000000c4b\U00000441\U000003b4e() != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <À@plt>
cmp    $0x1,%eax
je     1184 <main+0x24>
call   1030 <abort@plt>
mov    $0x0,%al
call   1080 <Á@plt>
cmp    $0x2,%eax
je     1199 <main+0x39>
call   1030 <abort@plt>
mov    $0x0,%al
call   1050 <Â@plt>
cmp    $0x3,%eax
je     11ae <main+0x4e>
call   1030 <abort@plt>
mov    $0x0,%al
call   1070 <whÿ@plt>
cmp    $0x4,%eax
je     11c3 <main+0x63>
call   1030 <abort@plt>
mov    $0x0,%al
call   1040 <aÄbсδe@plt>
cmp    $0x5,%eax
je     11d8 <main+0x78>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <À@plt>
cmp    $0x1,%eax
jne    11a1 <main+0x41>
xor    %eax,%eax
call   1080 <Á@plt>
cmp    $0x2,%eax
jne    11a1 <main+0x41>
xor    %eax,%eax
call   1050 <Â@plt>
cmp    $0x3,%eax
jne    11a1 <main+0x41>
xor    %eax,%eax
call   1070 <whÿ@plt>
cmp    $0x4,%eax
jne    11a1 <main+0x41>
xor    %eax,%eax
call   1040 <aÄbсδe@plt>
cmp    $0x5,%eax
jne    11a1 <main+0x41>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @"\C3\80"()
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %5
4: ; preds = %0
unreachable
5: ; preds = %0
%6 = call i32 (...) @"\C3\81"()
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %5
unreachable
9: ; preds = %5
%10 = call i32 (...) @"\C3\82"()
%11 = icmp ne i32 %10, 3
br i1 %11, label %12, label %13
12: ; preds = %9
unreachable
13: ; preds = %9
%14 = call i32 (...) @"wh\C3\BF"()
%15 = icmp ne i32 %14, 4
br i1 %15, label %16, label %17
16: ; preds = %13
unreachable
17: ; preds = %13
%18 = call i32 (...) @"a\C3\84b\D1\81\CE\B4e"()
%19 = icmp ne i32 %18, 5
br i1 %19, label %20, label %21
20: ; preds = %17
unreachable
21: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @"\C3\80"()
%2 = icmp eq i32 %1, 1
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
%5 = tail call i32 (...) @"\C3\81"()
%6 = icmp eq i32 %5, 2
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void @abort()
unreachable
8: ; preds = %4
%9 = tail call i32 (...) @"\C3\82"()
%10 = icmp eq i32 %9, 3
br i1 %10, label %12, label %11
11: ; preds = %8
tail call void @abort()
unreachable
12: ; preds = %8
%13 = tail call i32 (...) @"wh\C3\BF"()
%14 = icmp eq i32 %13, 4
br i1 %14, label %16, label %15
15: ; preds = %12
tail call void @abort()
unreachable
16: ; preds = %12
%17 = tail call i32 (...) @"a\C3\84b\D1\81\CE\B4e"()
%18 = icmp eq i32 %17, 5
br i1 %18, label %20, label %19
19: ; preds = %16
tail call void @abort()
unreachable
20: ; preds = %16
ret i32 0
}
/* Type definitions */
struct list_item {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_delete_item(struct list *, struct list_item *);
struct list_item *list_find(struct list *, void *);
void list_delete(struct list *l, void *data) {
  struct list_item *item = list_find(l, data);
  if (item != NULL)
    (void)list_delete_item(l, item);
}


x86 assembly (clang, -O0):
<list_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <list_find@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <list_delete+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <list_delete_item@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_delete>:
push   %rbx
mov    %rdi,%rbx
call   1030 <list_find@plt>
test   %rax,%rax
je     113a <list_delete+0x1a>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <list_delete_item@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
%struct.list_item = type { i32 }
define void @list_delete(%struct.list* %0, i8* %1) {
%3 = alloca %struct.list*
%4 = alloca i8*
%5 = alloca %struct.list_item*
store %struct.list* %0, %struct.list** %3
store i8* %1, i8** %4
%6 = load %struct.list*, %struct.list** %3
%7 = load i8*, i8** %4
%8 = call %struct.list_item* @list_find(%struct.list* %6, i8* %7)
store %struct.list_item* %8, %struct.list_item** %5
%9 = load %struct.list_item*, %struct.list_item** %5
%10 = icmp ne %struct.list_item* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load %struct.list*, %struct.list** %3
%13 = load %struct.list_item*, %struct.list_item** %5
%14 = call i32 @list_delete_item(%struct.list* %12, %struct.list_item* %13)
br label %15
15: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
%struct.list_item = type { i32 }
define void @list_delete(%struct.list* %0, i8* %1) {
%3 = tail call %struct.list_item* @list_find(%struct.list* %0, i8* %1)
%4 = icmp eq %struct.list_item* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @list_delete_item(%struct.list* %0, %struct.list_item* %3)
br label %7
7: ; preds = %5, %2
ret void
}
void RTStrReallocTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrReallocTag() {
ret void
}
void foo169() {}


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

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

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

LLVM IR (-O2):
define void @foo169() {
ret void
}
void strip(void) {
  int c, getch(void);
  void ungetch(int);
  while ((c = getch()) == ' ' || c == '\t')
    ;
  ungetch(c);
}


x86 assembly (clang, -O0):
<strip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
call   1040 <getch@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x5(%rbp)
je     114a <strip+0x2a>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    115a <strip+0x3a>
jmp    115f <strip+0x3f>
jmp    1128 <strip+0x8>
mov    -0x4(%rbp),%edi
call   1030 <ungetch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1040 <getch@plt>
cmp    $0x9,%eax
je     1130 <strip+0x10>
cmp    $0x20,%eax
je     1130 <strip+0x10>
mov    %eax,%edi
pop    %rax
jmp    1030 <ungetch@plt>

LLVM IR (-O0):
define void @strip() {
%1 = alloca i32
br label %2
2: ; preds = %10, %0
%3 = call i32 @getch()
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %2
%9 = phi i1 [ true, %2 ], [ %7, %5 ]
br i1 %9, label %10, label %11
10: ; preds = %8
br label %2
11: ; preds = %8
%12 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
define void @strip() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 @getch()
switch i32 %2, label %4 [
i32 32, label %3
i32 9, label %3
]
3: ; preds = %1, %1
br label %1
4: ; preds = %1
tail call void @ungetch(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *, char const *);
int /*<<< orphan*/ stress_check_capability(int /*<<< orphan*/);
int stress_cyclic_supported(const char *name) {
  if (!stress_check_capability((0))) {
    pr_inf("%s stressor needs to be run with CAP_SYS_NICE "
           "set SCHED_RR, SCHED_FIFO or SCHED_DEADLINE priorities, "
           "skipping this stressor\n",
           name);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress_cyclic_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
cmp    $0x0,%eax
jne    1158 <stress_cyclic_supported+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <pr_inf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <stress_cyclic_supported+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_cyclic_supported>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
test   %eax,%eax
jne    1147 <stress_cyclic_supported+0x27>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <pr_inf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [125 x i8] c"%s stressor needs to be run with CAP_SYS_NICE set SCHED_RR, SCHED_FIFO or SCHED_DEADLINE priorities, skipping this stressor\0A\00"
define i32 @stress_cyclic_supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @stress_check_capability(i32 0)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pr_inf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [125 x i8] c"%s stressor needs to be run with CAP_SYS_NICE set SCHED_RR, SCHED_FIFO or SCHED_DEADLINE priorities, skipping this stressor\0A\00"
define i32 @stress_cyclic_supported(i8* %0) {
%2 = tail call i32 @stress_check_capability(i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pr_inf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
unsigned char unsignedchar_ignoring_signedlongint(unsigned char x,
                                                  signed long int y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedchar_ignoring_signedlongint>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @unsignedchar_ignoring_signedlongint(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @unsignedchar_ignoring_signedlongint(i8 returned zeroext %0, i64 %1) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ ft_print_alphabet();
int main(void) {
  ft_print_alphabet();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ft_print_alphabet()
ret i32 0
}
int vkToNative(int vk) { return vk; }


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

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

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

LLVM IR (-O2):
define i32 @vkToNative(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *const);
__attribute__((__unused__)) void(cheat_unwrapped_perror)(
    char const *const message) {
  perror(message);
}


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

x86 assembly (clang, -O2):
<cheat_unwrapped_perror>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define void @cheat_unwrapped_perror(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
int test_imm_2Fint32_reg(int val) { return ((val) & (0x2F << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_2Fint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Fint32_reg>:
test   $0x2f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Fint32_reg(i32 %0) {
%2 = and i32 %0, 47
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int calculoSegundoGrau(float, float, float, float *, float *, float *);
int main(int argc, char const *argv[]) {
  float a, b, c, d, x1, x2;
  int r = calculoSegundoGrau(a, b, c, &d, &x1, &x2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x24(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1030 <calculoSegundoGrau@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <calculoSegundoGrau@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = bitcast float* %5 to i8*
%9 = call i32 @calculoSegundoGrau(float undef, float undef, float undef, float* %3, float* %4, float* %5)
ret i32 0
}
void autonomous2() {}


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

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

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

LLVM IR (-O2):
define void @autonomous2() {
ret void
}
int __ffs(int x) {
  int r;
  __asm__("bsfl %1,%0\n\t"
          "cmovzl %2,%0"
          : "=r"(r)
          : "rm"(x), "r"(-1));
  return r + 1;
}


x86 assembly (clang, -O0):
<__ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xffffffff,%eax
bsf    -0xc(%rbp),%eax
cmove  %eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ffs>:
mov    %edi,-0x4(%rsp)
mov    $0xffffffff,%eax
bsf    -0x4(%rsp),%eax
cmove  %eax,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @__ffs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm "bsfl $1,$0\0A\09cmovzl $2,$0", "=r,rm,r,~{dirflag},~{fpsr},~{flags}"(i32 %4, i32 -1)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @__ffs(i32 %0) {
%2 = tail call i32 asm "bsfl $1,$0\0A\09cmovzl $2,$0", "=r,rm,r,~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 -1)
%3 = add nsw i32 %2, 1
ret i32 %3
}
void html_disp_perct(double perct) {}


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

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

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

LLVM IR (-O2):
define void @html_disp_perct(double %0) {
ret void
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 5 * 100 + 0); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10500
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10500
}
/* Variables and functions */
int /*<<< orphan*/ error();
void set(int *a) {
  if (*a == 8)
    error();
}


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x8,(%rax)
jne    1130 <set+0x20>
mov    $0x0,%al
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
cmpl   $0x8,(%rdi)
jne    111c <set+0xc>
xor    %eax,%eax
jmp    1030 <error@plt>
ret

LLVM IR (-O0):
define void @set(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 8
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @error()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @set(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 8
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @error()
br label %6
6: ; preds = %4, %1
ret void
}
int main() {
  volatile unsigned code = 0xc3;
  ((void (*)(void)) & code)();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc3,-0x8(%rbp)
lea    -0x8(%rbp),%rax
call   *%rax
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xc3,0x4(%rsp)
lea    0x4(%rsp),%rax
call   *%rax
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store volatile i32 195, i32* %2
%3 = bitcast i32* %2 to void ()*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 195, i32* %1
%3 = bitcast i32* %1 to void ()*
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr, "Usage: %s <ip> <port>\n", name);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
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>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s <ip> <port>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s <ip> <port>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
double complex(int c, double *j) { return j[c]; }


x86 assembly (clang, -O0):
<complex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<complex>:
movslq %edi,%rax
movsd  (%rsi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @complex(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds double, double* %5, i64 %7
%9 = load double, double* %8
ret double %9
}

LLVM IR (-O2):
define double @complex(i32 %0, double* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds double, double* %1, i64 %3
%5 = load double, double* %4
ret double %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void FPUStackingDisable(void) {
  (*((volatile uint32_t *)(0xE000EF34))) &= ~(0x80000000 | 0x40000000);
}


x86 assembly (clang, -O0):
<FPUStackingDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ef34,%eax
mov    (%rax),%ecx
and    $0x3fffffff,%ecx
mov    $0xe000ef34,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUStackingDisable>:
mov    $0xe000ef34,%eax
andl   $0x3fffffff,(%rax)
ret

LLVM IR (-O0):
define void @FPUStackingDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758157620 to i32*)
%2 = and i32 %1, 1073741823
store volatile i32 %2, i32* inttoptr (i64 3758157620 to i32*)
ret void
}

LLVM IR (-O2):
define void @FPUStackingDisable() {
%1 = load volatile i32, i32* inttoptr (i64 3758157620 to i32*)
%2 = and i32 %1, 1073741823
store volatile i32 %2, i32* inttoptr (i64 3758157620 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void banner_chars(char *s) {
  printf("                ******%-26s*******\n", s);
}


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

x86 assembly (clang, -O2):
<banner_chars>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c" ******%-26s*******\0A\00"
define void @banner_chars(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c" ******%-26s*******\0A\00"
define void @banner_chars(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ matvec4_c(float *, float *, float *);
void matvec4_neon(float m[16], float v[4], float d[4]) { matvec4_c(m, v, d); }


x86 assembly (clang, -O0):
<matvec4_neon>:
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 <matvec4_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matvec4_neon>:
jmp    1030 <matvec4_c@plt>

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

LLVM IR (-O2):
define void @matvec4_neon(float* %0, float* %1, float* %2) {
%4 = tail call i32 @matvec4_c(float* %0, float* %1, float* %2)
ret void
}
int exemplo4(int i) { return i > 0 ? 1 : 0; }


x86 assembly (clang, -O0):
<exemplo4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @exemplo4(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Send(int, ...);
int strlen(char *);
void SendData(int connection, char *text) {
  int nbytes;
  nbytes = strlen(text) + 1;
  Send(connection, &nbytes, sizeof(int));
  Send(connection, text, nbytes);
  return;
}


x86 assembly (clang, -O0):
<SendData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <Send@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <Send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendData>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <Send@plt>
mov    0x4(%rsp),%edx
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <Send@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @SendData(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = call i32 (i32, ...) @Send(i32 %9, i32* %5, i64 4)
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i32 (i32, ...) @Send(i32 %11, i8* %12, i32 %13)
ret void
}

LLVM IR (-O2):
define void @SendData(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @strlen(i8* %1)
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = call i32 (i32, ...) @Send(i32 %0, i32* %3, i64 4)
%8 = load i32, i32* %3
%9 = call i32 (i32, ...) @Send(i32 %0, i8* %1, i32 %8)
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ decrease_count(int);
int /*<<< orphan*/ increase_count(int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/);
double rand();
void *thread_task(void *param) {
  int random = (int)(5 * (rand() / (double)RAND_MAX) + 1);
  decrease_count(random);
  increase_count(random);
  pthread_exit(0);
}


x86 assembly (clang, -O0):
<thread_task>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    0x2e8e(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe91(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <decrease_count@plt>
mov    -0x14(%rbp),%edi
call   1040 <increase_count@plt>
xor    %edi,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_task>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
mov    0x2e99(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xea0(%rip),%xmm0
addsd  0xea0(%rip),%xmm0
cvttsd2si %xmm0,%ebx
mov    %ebx,%edi
call   1050 <decrease_count@plt>
mov    %ebx,%edi
call   1040 <increase_count@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i8* @thread_task(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call double (...) @rand()
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to double
%8 = fdiv double %5, %7
%9 = call double @llvm.fmuladd.f64(double 5.000000e+00, double %8, double 1.000000e+00)
%10 = fptosi double %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @decrease_count(i32 %11)
%13 = load i32, i32* %4
%14 = call i32 @increase_count(i32 %13)
%15 = call i32 @pthread_exit(i32 0)
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define noalias i8* @thread_task(i8* nocapture readnone %0) {
%2 = tail call double (...) @rand()
%3 = load i64, i64* @RAND_MAX
%4 = sitofp i64 %3 to double
%5 = fdiv double %2, %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double 5.000000e+00, double 1.000000e+00)
%7 = fptosi double %6 to i32
%8 = tail call i32 @decrease_count(i32 %7)
%9 = tail call i32 @increase_count(i32 %7)
%10 = tail call i32 @pthread_exit(i32 0)
ret i8* undef
}
/* Variables and functions */
int import_call_execute(int, char const **);
int main(int argc, const char *argv[]) {
  return import_call_execute(argc, argv);
}


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <import_call_execute@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @import_call_execute(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int getHours();
int getMinutes();
int /*<<< orphan*/ printf(char *, int, int);
void printTime() { printf("%d:%d\n", getHours(), getMinutes()); }


x86 assembly (clang, -O0):
<printTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getHours@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getMinutes@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTime>:
push   %rbx
xor    %eax,%eax
call   1050 <getHours@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getMinutes@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%d:%d\0A\00"
define void @printTime() {
%1 = call i32 (...) @getHours()
%2 = call i32 (...) @getMinutes()
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d:%d\0A\00"
define void @printTime() {
%1 = tail call i32 (...) @getHours()
%2 = tail call i32 (...) @getMinutes()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ factorial(unsigned int);
int /*<<< orphan*/ printf(char *, unsigned int, int /*<<< orphan*/);
int main(void) {
  unsigned int i;
  for (i = 0; i <= 21; ++i) {
    printf("%u! = %llu\n", i, factorial(i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
ja     116d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x16,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%u! = %llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp ule i32 %4, 21
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @factorial(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%u! = %llu\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @factorial(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 22
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int is_permitted_renameat(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
                          char const *);
int is_permitted_rename(const char *oldpath, const char *newpath) {
  return is_permitted_renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath);
}


x86 assembly (clang, -O0):
<is_permitted_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
call   1030 <is_permitted_renameat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_permitted_rename>:
mov    %rsi,%rcx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    %edi,%edx
jmp    1030 <is_permitted_renameat@plt>

LLVM IR (-O0):
@AT_FDCWD = global i32 0
define i32 @is_permitted_rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load i32, i32* @AT_FDCWD
%8 = load i8*, i8** %4
%9 = call i32 @is_permitted_renameat(i32 %5, i8* %6, i32 %7, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32 @is_permitted_rename(i8* %0, i8* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @is_permitted_renameat(i32 %3, i8* %0, i32 %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ intercambio(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int a = 20, b = 30;
  intercambio(&a, &b);
  printf("a es %d y b es %d\n", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x14,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <intercambio@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x14,0x4(%rsp)
movl   $0x1e,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <intercambio@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"a es %d y b es %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 20, i32* %1
store i32 30, i32* %2
%3 = call i32 @intercambio(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"a es %d y b es %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 20, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 30, i32* %2
%5 = call i32 @intercambio(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ehrpwm_write(int /*<<< orphan*/, int, int);
int ehrpwm_et_clr_int(uint8_t module) {
  ehrpwm_write(module, 0x38, (1));
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_et_clr_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x38,%esi
mov    $0x1,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_et_clr_int>:
push   %rax
mov    $0x38,%esi
mov    $0x1,%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ehrpwm_et_clr_int(i32 %0) {
%2 = tail call i32 @ehrpwm_write(i32 %0, i32 56, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_scan_channels_usage(void) {
  printf("\nUsage : sys_cfg_scan_channels [CHANNELS]\n");
  printf("\nIf CHANNELS are provided, a 'set' is performed, else a 'get' is "
         "performed.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_sys_cfg_scan_channels_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0AUsage : sys_cfg_scan_channels [CHANNELS]\0A\00"
@.str.1 = [77 x i8] c"\0AIf CHANNELS are provided, a 'set' is performed, else a 'get' is performed.\0A\00"
define void @print_sys_cfg_scan_channels_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"\0AUsage : sys_cfg_scan_channels [CHANNELS]\00"
@str.2 = [76 x i8] c"\0AIf CHANNELS are provided, a 'set' is performed, else a 'get' is performed.\00"
define void @print_sys_cfg_scan_channels_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct arg_lit {
  int dummy;
};

/* Variables and functions */
struct arg_lit *arg_litn(char const *, char const *, int, int, char const *);
struct arg_lit *arg_lit1(const char *shortopts, const char *longopts,
                         const char *glossary) {
  return arg_litn(shortopts, longopts, 1, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_lit1>:
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),%r8
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <arg_litn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_lit1>:
mov    %rdx,%r8
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <arg_litn@plt>

LLVM IR (-O0):
%struct.arg_lit = type { i32 }
define %struct.arg_lit* @arg_lit1(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call %struct.arg_lit* @arg_litn(i8* %7, i8* %8, i32 1, i32 1, i8* %9)
ret %struct.arg_lit* %10
}

LLVM IR (-O2):
%struct.arg_lit = type { i32 }
define %struct.arg_lit* @arg_lit1(i8* %0, i8* %1, i8* %2) {
%4 = tail call %struct.arg_lit* @arg_litn(i8* %0, i8* %1, i32 1, i32 1, i8* %2)
ret %struct.arg_lit* %4
}
void ff_hevc_put_hevc_bi_epel_h6_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h6_12_sse4() {
ret void
}
/* Variables and functions */
int myfunc(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int val1 = 5;
  printf("Result is %d \n", myfunc(val1, (val1 - 7) < 8));
  int val2 = 20;
  printf("Result is %d \n", myfunc(val2, (val2 - 7) < 8));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%eax
sub    $0x7,%eax
cmp    $0x8,%eax
setl   %al
and    $0x1,%al
movzbl %al,%esi
call   1040 <myfunc@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x14,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%eax
sub    $0x7,%eax
cmp    $0x8,%eax
setl   %al
and    $0x1,%al
movzbl %al,%esi
call   1040 <myfunc@plt>
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
mov    $0x1,%esi
call   1040 <myfunc@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x14,%edi
xor    %esi,%esi
call   1040 <myfunc@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Result is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = sub nsw i32 %5, 7
%7 = icmp slt i32 %6, 8
%8 = zext i1 %7 to i32
%9 = call i32 @myfunc(i32 %4, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 20, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 7
%14 = icmp slt i32 %13, 8
%15 = zext i1 %14 to i32
%16 = call i32 @myfunc(i32 %11, i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Result is %d \0A\00"
define i32 @main() {
%1 = tail call i32 @myfunc(i32 5, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @myfunc(i32 20, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
extern uint16_t util_ToFromBE16(uint16_t val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @util_ToFromBE16(i32 returned %0) {
ret i32 %0
}
void sem_down(int sem) {
  while (0 == sem)
    ;
  --sem;
}


x86 assembly (clang, -O0):
<sem_down>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jne    1117 <sem_down+0x17>
jmp    1107 <sem_down+0x7>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_down>:
test   %edi,%edi
je     1110 <sem_down+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <sem_down+0x10>

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

LLVM IR (-O2):
define void @sem_down(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
int main(void) {
  5 / 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ getoptdata(char const *, int, int *);
int get_bool_option(const char *option, int default_value) {
  return *((int *)getoptdata(option, 1, &default_value));
}


x86 assembly (clang, -O0):
<get_bool_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    -0xc(%rbp),%rdx
call   1030 <getoptdata@plt>
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bool_option>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x1,%esi
call   1030 <getoptdata@plt>
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_bool_option(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i64 @getoptdata(i8* %0, i32 1, i32* %3)
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
double strtod(unsigned char const *, int /*<<< orphan*/);
double atof(const unsigned char *__p) { return strtod(__p, 0); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

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

LLVM IR (-O2):
define double @atof(i8* %0) {
%2 = tail call double @strtod(i8* %0, i32 0)
ret double %2
}
int test_imm_6Fuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x6F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_6Fuint64_lowword_reg>:
test   $0x6f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Fuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 111
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}