xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
scalar_t__ malloc(int);
char *strcpy(char *, char const *);
int strlen(char const *);
char *mystrdup(const char *str) {
  char *new;
  assert(str);
  if ((new = (char *)malloc(sizeof(char) * strlen(str))) == NULL)
    return NULL;
  return strcpy(new, str);
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1186 <mystrdup+0x46>
movq   $0x0,-0x8(%rbp)
jmp    1197 <mystrdup+0x57>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <assert@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1170 <mystrdup+0x30>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1172 <mystrdup+0x32>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %1
store i8* null, i8** %2
br label %20
16: ; preds = %1
%17 = load i8*, i8** %4
%18 = load i8*, i8** %3
%19 = call i8* @strcpy(i8* %17, i8* %18)
store i8* %19, i8** %2
br label %20
20: ; preds = %16, %15
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @mystrdup(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i64 @malloc(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = inttoptr i64 %4 to i8*
%8 = tail call i8* @strcpy(i8* %7, i8* dereferenceable(1) %0)
br label %9
9: ; preds = %1, %6
%10 = phi i8* [ %7, %6 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ svnPropList();
int /*<<< orphan*/ system(char *);
int main() {
  svnPropList();
  system("pause");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <svnPropList@plt>
lea    0xed1(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 (...) @svnPropList()
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int system_disk_usage() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @system_disk_usage() {
ret i32 0
}
void delay(int time) {
  int i;
  for (i = 0; i < time * 1000;)
    i++;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3e8,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    112e <delay+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <delay+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a_fetch_add(int volatile *, int);
void a_inc(volatile int *p) { a_fetch_add(p, 1); }


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

x86 assembly (clang, -O2):
<a_inc>:
mov    $0x1,%esi
jmp    1030 <a_fetch_add@plt>

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

LLVM IR (-O2):
define void @a_inc(i32* %0) {
%2 = tail call i32 @a_fetch_add(i32* %0, i32 1)
ret void
}
int ata_acpi_exec_tfs(struct ata_port *ap) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ata_port = type opaque
define i32 @ata_acpi_exec_tfs(%struct.ata_port* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
void mem_set(void *mem, int val, size_t size) { memset(mem, val, size); }


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

x86 assembly (clang, -O2):
<mem_set>:
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @mem_set(i8* %0, i32 %1, i64 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %1, i64 %2)
ret void
}
int exp1(int a, int b) {
  int retval = 1;
  if (b < 0) {
    return 0;
  }
  while (b != 0) {
    if ((b & 1) != 0) {
      retval *= a;
    }
    b >>= 1;
    a *= a;
  }
  return retval;
}


x86 assembly (clang, -O0):
<exp1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1127 <exp1+0x27>
movl   $0x0,-0x4(%rbp)
jmp    116d <exp1+0x6d>
jmp    112c <exp1+0x2c>
cmpl   $0x0,-0xc(%rbp)
je     1167 <exp1+0x67>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     114f <exp1+0x4f>
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    112c <exp1+0x2c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp1>:
test   %esi,%esi
js     113a <exp1+0x3a>
je     113d <exp1+0x3d>
mov    $0x1,%r8d
mov    $0x1,%eax
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   $0x1,%sil
mov    %edi,%ecx
cmove  %r8d,%ecx
imul   %ecx,%eax
sar    %edx
imul   %edi,%edi
cmp    $0x1,%esi
mov    %edx,%esi
ja     1120 <exp1+0x20>
ret
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @exp1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 1, i32* %6
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %30
10: ; preds = %2
br label %11
11: ; preds = %22, %10
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %28
14: ; preds = %11
%15 = load i32, i32* %5
%16 = and i32 %15, 1
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = mul nsw i32 %20, %19
store i32 %21, i32* %6
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %5
%24 = ashr i32 %23, 1
store i32 %24, i32* %5
%25 = load i32, i32* %4
%26 = load i32, i32* %4
%27 = mul nsw i32 %26, %25
store i32 %27, i32* %4
br label %11
28: ; preds = %11
%29 = load i32, i32* %6
store i32 %29, i32* %3
br label %30
30: ; preds = %28, %9
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @exp1(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %17, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %13, %6 ], [ 1, %4 ]
%8 = phi i32 [ %14, %6 ], [ %1, %4 ]
%9 = phi i32 [ %15, %6 ], [ %0, %4 ]
%10 = and i32 %8, 1
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 1, i32 %9
%13 = mul nsw i32 %12, %7
%14 = ashr i32 %8, 1
%15 = mul nsw i32 %9, %9
%16 = icmp ult i32 %8, 2
br i1 %16, label %17, label %6
17: ; preds = %6, %4, %2
%18 = phi i32 [ 0, %2 ], [ 1, %4 ], [ %13, %6 ]
ret i32 %18
}
int test_imm_1Eint8_mem(signed char *val) {
  return ((*val) & (-0x1E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Eint8_mem(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 = and i32 %5, -30
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_1Eint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -30
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int do_081() { return 81; }


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

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

LLVM IR (-O0):
define i32 @do_081() {
ret i32 81
}

LLVM IR (-O2):
define i32 @do_081() {
ret i32 81
}
float t1(float a, float b) { return a / b; }


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
divss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @t1(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%i\n", (int)(sizeof(void *))); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
void *realloc(void *, size_t);
void *comdRealloc(void *ptr, size_t iSize) { return realloc(ptr, iSize); }


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

x86 assembly (clang, -O2):
<comdRealloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @comdRealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int do_echo(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; ++i) {
    printf("argv[%d] = %s\n", i, argv[i]);
  }
  return i;
}


x86 assembly (clang, -O0):
<do_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <do_echo+0x4b>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <do_echo+0x16>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_echo>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
jle    1149 <do_echo+0x39>
mov    %rsi,%r12
mov    %edi,%r14d
mov    %edi,%ebx
xor    %ebp,%ebp
lea    0xed3(%rip),%r15
nopl   (%rax)
mov    (%r12,%rbp,8),%rdx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <do_echo+0x20>
jmp    114c <do_echo+0x3c>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d] = %s\0A\00"
define i32 @do_echo(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ 0, %2 ], [ %0, %6 ]
ret i32 %15
}
int noiflower(int c) { return c >= 'A' && c <= 'Z' ? c + 'a' - 'A' : c; }


x86 assembly (clang, -O0):
<noiflower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     112c <noiflower+0x2c>
cmpl   $0x5a,-0x4(%rbp)
jg     112c <noiflower+0x2c>
mov    -0x4(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <noiflower+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<noiflower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @noiflower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 97
%11 = sub nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @noiflower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
int /*<<< orphan*/ m68ki_pull_16();
int /*<<< orphan*/ m68ki_pull_32();
int /*<<< orphan*/ m68ki_set_ccr(int /*<<< orphan*/);
void m68k_op_rtr_32(void) {
  ;
  m68ki_set_ccr(m68ki_pull_16());
  m68ki_jump(m68ki_pull_32());
}


x86 assembly (clang, -O0):
<m68k_op_rtr_32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <m68ki_pull_16@plt>
mov    %eax,%edi
call   1050 <m68ki_set_ccr@plt>
mov    $0x0,%al
call   1040 <m68ki_pull_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_rtr_32>:
push   %rax
xor    %eax,%eax
call   1060 <m68ki_pull_16@plt>
mov    %eax,%edi
call   1050 <m68ki_set_ccr@plt>
xor    %eax,%eax
call   1040 <m68ki_pull_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_rtr_32() {
%1 = call i32 (...) @m68ki_pull_16()
%2 = call i32 @m68ki_set_ccr(i32 %1)
%3 = call i32 (...) @m68ki_pull_32()
%4 = call i32 @m68ki_jump(i32 %3)
ret void
}

LLVM IR (-O2):
define void @m68k_op_rtr_32() {
%1 = tail call i32 (...) @m68ki_pull_16()
%2 = tail call i32 @m68ki_set_ccr(i32 %1)
%3 = tail call i32 (...) @m68ki_pull_32()
%4 = tail call i32 @m68ki_jump(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SPI_Out(int);
int /*<<< orphan*/ waitmillisec(int);
void lock(int byte) {
  int mask = 0xff & ~byte;
  SPI_Out(0xAC);
  SPI_Out(mask | 0x07);
  SPI_Out(0);
  waitmillisec(9);
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
mov    $0xac,%edi
call   1030 <SPI_Out@plt>
mov    -0x8(%rbp),%edi
or     $0x7,%edi
call   1030 <SPI_Out@plt>
xor    %edi,%edi
call   1030 <SPI_Out@plt>
mov    $0x9,%edi
call   1040 <waitmillisec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
push   %rbx
mov    %edi,%ebx
and    $0xf8,%ebx
mov    $0xac,%edi
call   1030 <SPI_Out@plt>
xor    $0xff,%ebx
mov    %ebx,%edi
call   1030 <SPI_Out@plt>
xor    %edi,%edi
call   1030 <SPI_Out@plt>
mov    $0x9,%edi
pop    %rbx
jmp    1040 <waitmillisec@plt>

LLVM IR (-O0):
define void @lock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = xor i32 %4, -1
%6 = and i32 255, %5
store i32 %6, i32* %3
%7 = call i32 @SPI_Out(i32 172)
%8 = load i32, i32* %3
%9 = or i32 %8, 7
%10 = call i32 @SPI_Out(i32 %9)
%11 = call i32 @SPI_Out(i32 0)
%12 = call i32 @waitmillisec(i32 9)
ret void
}

LLVM IR (-O2):
define void @lock(i32 %0) {
%2 = and i32 %0, 248
%3 = tail call i32 @SPI_Out(i32 172)
%4 = xor i32 %2, 255
%5 = tail call i32 @SPI_Out(i32 %4)
%6 = tail call i32 @SPI_Out(i32 0)
%7 = tail call i32 @waitmillisec(i32 9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("\nusage: mkdir (/path/to/NEW/DIR)\n\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"\0Ausage: mkdir (/path/to/NEW/DIR)\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"\0Ausage: mkdir (/path/to/NEW/DIR)\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
int compare(void *val1, void *val2) { return ((int)val2) - ((int)val1); }


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    %rsi,%rax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i32
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i32
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @compare(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %0 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Y();
int /*<<< orphan*/ clear();
C() {
  clear();
  Y();
}


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <clear@plt>
mov    $0x0,%al
call   1030 <Y@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C>:
push   %rax
xor    %eax,%eax
call   1040 <clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Y@plt>

LLVM IR (-O0):
define i32 @C() {
%1 = alloca i32
%2 = call i32 (...) @clear()
%3 = call i32 (...) @Y()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @C() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 (...) @Y()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int __detect_PLATFORM_ENV_TOOLCHAIN_VER_DETAIL() {
  int v = (9 << 16) | (4 << 8) | 0;
  printf("0x%x", v);
  return 0;
}


x86 assembly (clang, -O0):
<__detect_PLATFORM_ENV_TOOLCHAIN_VER_DETAIL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x90400,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"0x%x\00"
define i32 @__detect_PLATFORM_ENV_TOOLCHAIN_VER_DETAIL() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 590848)
ret i32 0
}
int test_imm_BFuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xBF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_BFuint64_midword_reg>:
test   $0xbf0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BFuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 12517376
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ liquid(int, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num1, gallons, quarts, pints, cups;
  printf("Enter the number of cups:");
  scanf("%2d", &num1);
  liquid(num1, &gallons, &quarts, &pints, &cups);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1040 <liquid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <liquid@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter the number of cups:\00"
@.str.1 = [4 x i8] c"%2d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = call i32 @liquid(i32 %9, i32* %3, i32* %4, i32* %5, i32* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Enter the number of cups:\00"
@.str.1 = [4 x i8] c"%2d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
%14 = call i32 @liquid(i32 %13, i32* %2, i32* %3, i32* %4, i32* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printf_trangle(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("input trangle lengh\n");
  scanf("%d", &n);
  printf_trangle(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <printf_trangle@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <printf_trangle@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"input trangle lengh\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @printf_trangle(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [20 x i8] c"input trangle lengh\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @printf_trangle(i32 %5)
ret i32 0
}
int disjunctionValue(int x, int y) { return x | y; }


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

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

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

LLVM IR (-O2):
define i32 @disjunctionValue(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
int regulator_bulk_get(struct device *dev, int num_consumers,
                       struct regulator_bulk_data *consumers) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.regulator_bulk_data = type opaque
define i32 @regulator_bulk_get(%struct.device* %0, i32 %1, %struct.regulator_bulk_data* %2) {
%4 = alloca %struct.device*
%5 = alloca i32
%6 = alloca %struct.regulator_bulk_data*
store %struct.device* %0, %struct.device** %4
store i32 %1, i32* %5
store %struct.regulator_bulk_data* %2, %struct.regulator_bulk_data** %6
ret i32 0
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.regulator_bulk_data = type opaque
define i32 @regulator_bulk_get(%struct.device* nocapture readnone %0, i32 %1, %struct.regulator_bulk_data* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int celsius;
  for (int fahr = 0; fahr <= 300; fahr = fahr + 20) {
    celsius = 5 * (fahr - 32) / 9;
    printf("%d\t%d\n", fahr, celsius);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12c,-0xc(%rbp)
jg     1167 <main+0x57>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xffffffec,%ebx
mov    $0xff60,%r15w
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
add    $0x14,%ebx
movswl %r15w,%eax
imul   $0x1c72,%eax,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x10,%eax
add    %ecx,%eax
movswl %ax,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x64,%r15d
cmp    $0x119,%ebx
jb     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 300
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 32
%10 = mul nsw i32 5, %9
%11 = sdiv i32 %10, 9
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13)
br label %15
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 20
store i32 %17, i32* %3
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %10, %2 ]
%4 = trunc i32 %3 to i16
%5 = mul nuw nsw i16 %4, 5
%6 = add nsw i16 %5, -160
%7 = sdiv i16 %6, 9
%8 = sext i16 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %8)
%10 = add nuw nsw i32 %3, 20
%11 = icmp ult i32 %3, 281
br i1 %11, label %2, label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wfd_peristent_group_usage(void) {
  printf("\nUsage : wfd_cfg_persistent_group_record [index]             <role> "
         "<bssid> <groupdevid> <ssid> <psk>>             [<peermac1> "
         "<peermac2> ]\n");
  printf("\nIssue set or get request using appropriate parameters.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [141 x i8] c"\0AUsage : wfd_cfg_persistent_group_record [index] <role> <bssid> <groupdevid> <ssid> <psk>> [<peermac1> <peermac2> ]\0A\00"
@.str.1 = [57 x i8] c"\0AIssue set or get request using appropriate parameters.\0A\00"
define void @print_wfd_peristent_group_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [140 x i8] c"\0AUsage : wfd_cfg_persistent_group_record [index] <role> <bssid> <groupdevid> <ssid> <psk>> [<peermac1> <peermac2> ]\00"
@str.2 = [56 x i8] c"\0AIssue set or get request using appropriate parameters.\00"
define void @print_wfd_peristent_group_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([140 x i8], [140 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimeVetor(int x[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%i\n", x[i]);
  }
}


x86 assembly (clang, -O0):
<imprimeVetor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <imprimeVetor+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <imprimeVetor+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeVetor>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <imprimeVetor+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <imprimeVetor+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @imprimeVetor(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
struct mat4 {
  int dummy;
};

/* Variables and functions */
float mat4_determinant(float *);
__attribute__((always_)) float psmat4_determinant(struct mat4 *m) {
  return mat4_determinant((float *)m);
}


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

x86 assembly (clang, -O2):
<psmat4_determinant>:
jmp    1030 <mat4_determinant@plt>

LLVM IR (-O0):
%struct.mat4 = type { i32 }
define float @psmat4_determinant(%struct.mat4* %0) {
%2 = alloca %struct.mat4*
store %struct.mat4* %0, %struct.mat4** %2
%3 = load %struct.mat4*, %struct.mat4** %2
%4 = bitcast %struct.mat4* %3 to float*
%5 = call float @mat4_determinant(float* %4)
ret float %5
}

LLVM IR (-O2):
%struct.mat4 = type { i32 }
define float @psmat4_determinant(%struct.mat4* %0) {
%2 = bitcast %struct.mat4* %0 to float*
%3 = tail call float @mat4_determinant(float* %2)
ret float %3
}
int find(int belongs[], int vertexno) { return (belongs[vertexno]); }


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @find(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ main();
int /*<<< orphan*/ startup_init_datasegment();
void reset_interrupt(void) {
  startup_init_datasegment();
  main();
  while (1) {
  }
}


x86 assembly (clang, -O0):
<reset_interrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <startup_init_datasegment@plt>
mov    $0x0,%al
call   1040 <main@plt>
jmp    1132 <reset_interrupt+0x12>

x86 assembly (clang, -O2):
<reset_interrupt>:
push   %rax
xor    %eax,%eax
call   1030 <startup_init_datasegment@plt>
xor    %eax,%eax
call   1040 <main@plt>
nop
jmp    1130 <reset_interrupt+0x10>

LLVM IR (-O0):
define void @reset_interrupt() {
%1 = call i32 (...) @startup_init_datasegment()
%2 = call i32 (...) @main()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define void @reset_interrupt() {
%1 = tail call i32 (...) @startup_init_datasegment()
%2 = tail call i32 (...) @main()
br label %3
3: ; preds = %0, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memexport_new() {
  printf("NOT IMPLEMENTED:"
         "pa_memexport_new"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_memexport_new\0A\00"
define i32 @pa_memexport_new() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_memexport_new\00"
define i32 @pa_memexport_new() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
int32_t mdbm_gettid() { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<mdbm_gettid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdbm_gettid>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @mdbm_gettid() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @mdbm_gettid() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ handleError(int /*<<< orphan*/, char *);
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
void lock(pthread_mutex_t *mutex) {
  handleError(pthread_mutex_lock(mutex),
              "Error occured during locking mutex.\n");
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_lock@plt>
mov    %eax,%edi
lea    0xec2(%rip),%rsi
call   1030 <handleError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
push   %rax
call   1040 <pthread_mutex_lock@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <handleError@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Error occured during locking mutex.\0A\00"
define void @lock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @pthread_mutex_lock(i32* %3)
%5 = call i32 @handleError(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Error occured during locking mutex.\0A\00"
define void @lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
%3 = tail call i32 @handleError(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  signed char sc;
  unsigned char uc;
  int i;
  unsigned int ui;
  float f;
  double d;
  int *pi;
  -sc;
  +sc;
  !sc;
  -uc;
  +uc;
  !uc;
  uc << sc;
  uc >> sc;
  i + i;
  uc - i;
  i + f;
  f + d;
  pi - sc;
  i + pi;
  i + ui;
  sc &uc;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca double
%7 = alloca i32*
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = sub nsw i32 0, %9
%11 = load i8, i8* %1
%12 = sext i8 %11 to i32
%13 = load i8, i8* %1
%14 = icmp ne i8 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = sub nsw i32 0, %18
%20 = load i8, i8* %2
%21 = zext i8 %20 to i32
%22 = load i8, i8* %2
%23 = icmp ne i8 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = load i8, i8* %2
%27 = zext i8 %26 to i32
%28 = load i8, i8* %1
%29 = sext i8 %28 to i32
%30 = shl i32 %27, %29
%31 = load i8, i8* %2
%32 = zext i8 %31 to i32
%33 = load i8, i8* %1
%34 = sext i8 %33 to i32
%35 = ashr i32 %32, %34
%36 = load i32, i32* %3
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
%39 = load i8, i8* %2
%40 = zext i8 %39 to i32
%41 = load i32, i32* %3
%42 = sub nsw i32 %40, %41
%43 = load i32, i32* %3
%44 = sitofp i32 %43 to float
%45 = load float, float* %5
%46 = fadd float %44, %45
%47 = load float, float* %5
%48 = fpext float %47 to double
%49 = load double, double* %6
%50 = fadd double %48, %49
%51 = load i32*, i32** %7
%52 = load i8, i8* %1
%53 = sext i8 %52 to i32
%54 = sext i32 %53 to i64
%55 = sub i64 0, %54
%56 = getelementptr inbounds i32, i32* %51, i64 %55
%57 = load i32, i32* %3
%58 = load i32*, i32** %7
%59 = sext i32 %57 to i64
%60 = getelementptr inbounds i32, i32* %58, i64 %59
%61 = load i32, i32* %3
%62 = load i32, i32* %4
%63 = add i32 %61, %62
%64 = load i8, i8* %1
%65 = sext i8 %64 to i32
%66 = load i8, i8* %2
%67 = zext i8 %66 to i32
%68 = and i32 %65, %67
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ myexit(int);
int /*<<< orphan*/ printf(char *, char *);
void fatal(char *c) {
  printf("%s\n", c);
  myexit(1);
}


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

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <myexit@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @fatal(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @myexit(i32 1)
ret void
}
/* Variables and functions */
int unlinkat(int, char const *, int);
__attribute__((__weak__, __always___)) int
softboundcets_unlinkat(int dirfd, const char *pathname, int flags) {
  return unlinkat(dirfd, pathname, flags);
}


x86 assembly (clang, -O0):
<softboundcets_unlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <unlinkat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_unlinkat>:
jmp    1030 <unlinkat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_unlinkat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @unlinkat(i32 %0, i8* %1, i32 %2)
ret i32 %4
}