xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void handler_fils(int sig) {
  printf("Fils : signal recu ! Suicide !\n");
  exit(0);
}


x86 assembly (clang, -O0):
<handler_fils>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handler_fils>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Fils : signal recu ! Suicide !\0A\00"
define void @handler_fils(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [31 x i8] c"Fils : signal recu ! Suicide !\00"
define void @handler_fils(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int udpsocket(void) { return socket(AF_INET, SOCK_DGRAM, 0); }


x86 assembly (clang, -O0):
<udpsocket>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<udpsocket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @udpsocket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @udpsocket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
unsigned Minu(unsigned a, unsigned b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<Minu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1121 <Minu+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <Minu+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Minu>:
mov    %esi,%eax
cmp    %esi,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @Minu(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 = icmp ult i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @Minu(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void smp_ol_main_0_unpacked(int *const red2) {
  {
    { (*red2) = 0; }
  }
}


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

x86 assembly (clang, -O2):
<smp_ol_main_0_unpacked>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @smp_ol_main_0_unpacked(i32* nocapture writeonly %0) {
store i32 0, i32* %0
ret void
}
unsigned char f48(unsigned char x, long int y) {
  return (x >> y) | (x << ((-y) & (8 * sizeof(unsigned char) - 1)));
}


x86 assembly (clang, -O0):
<f48>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x7,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f48>:
mov    %rsi,%rcx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
and    $0x7,%cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f48(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = ashr i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub nsw i64 0, %12
%14 = and i64 %13, 7
%15 = trunc i64 %14 to i32
%16 = shl i32 %11, %15
%17 = or i32 %9, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f48(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = lshr i32 %3, %4
%6 = sub i32 0, %4
%7 = and i32 %6, 7
%8 = shl nuw nsw i32 %3, %7
%9 = or i32 %8, %5
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
void *realloc(void *, size_t);
void *must_realloc(void *orig, size_t sz) {
  void *ret;
  do {
    ret = realloc(orig, sz);
  } while (!ret);
  return ret;
}


x86 assembly (clang, -O0):
<must_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1120 <must_realloc+0x10>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<must_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <realloc@plt>
test   %rax,%rax
je     1120 <must_realloc+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @must_realloc(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i8* @realloc(i8* %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %3, label %6
6: ; preds = %3
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ RAND_METHOD;

/* Variables and functions */
RAND_METHOD *RAND_SSLeay(void) { return NULL; }


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

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

LLVM IR (-O0):
define i32* @RAND_SSLeay() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @RAND_SSLeay() {
ret i32* null
}
/* Variables and functions */
double drand();
double rand_srp() {
  double r = drand();
  if (r < 0.166666667)
    return -1;
  else if (r >= 0.833333333)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<rand_srp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <drand@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xed4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1149 <rand_srp+0x39>
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <rand_srp+0x6a>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1172 <rand_srp+0x62>
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <rand_srp+0x6a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_srp>:
push   %rax
xor    %eax,%eax
call   1030 <drand@plt>
movsd  0xee0(%rip),%xmm1
cmpnlesd %xmm0,%xmm1
movsd  0xedb(%rip),%xmm2
andnpd %xmm2,%xmm1
cmpltsd 0xed6(%rip),%xmm0
movsd  0xed6(%rip),%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rand_srp() {
%1 = alloca double
%2 = alloca double
%3 = call double (...) @drand()
store double %3, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 0x3FC55555560C95D4
br i1 %5, label %6, label %7
6: ; preds = %0
store double -1.000000e+00, double* %1
br label %12
7: ; preds = %0
%8 = load double, double* %2
%9 = fcmp oge double %8, 0x3FEAAAAAAA7CDA8B
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e+00, double* %1
br label %12
11: ; preds = %7
store double 0.000000e+00, double* %1
br label %12
12: ; preds = %11, %10, %6
%13 = load double, double* %1
ret double %13
}

LLVM IR (-O2):
define double @rand_srp() {
%1 = tail call double (...) @drand()
%2 = fcmp olt double %1, 0x3FC55555560C95D4
%3 = fcmp ult double %1, 0x3FEAAAAAAA7CDA8B
%4 = select i1 %3, double 0.000000e+00, double 1.000000e+00
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ vmoff(int);
void power_off() {
  int id;
  scanf("%d", &id);
  if (vmoff(id)) {
    printf("ok\n");
  } else {
    printf("error\n");
  }
}


x86 assembly (clang, -O0):
<power_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <vmoff@plt>
cmp    $0x0,%rax
je     116b <power_off+0x3b>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
jmp    1177 <power_off+0x47>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_off>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <vmoff@plt>
test   %rax,%rax
lea    0xeae(%rip),%rax
lea    0xead(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"ok\0A\00"
@.str.2 = [7 x i8] c"error\0A\00"
define void @power_off() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i64 @vmoff(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"error\00"
@str.3 = [3 x i8] c"ok\00"
define void @power_off() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @vmoff(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.3, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret void
}
void gtk_tree_store_swap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_swap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void cli_classic_abort_usage(void) {
  printf("Please run \"flashrom --help\" for usage info.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<cli_classic_abort_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cli_classic_abort_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Please run \22flashrom --help\22 for usage info.\0A\00"
define void @cli_classic_abort_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [45 x i8] c"Please run \22flashrom --help\22 for usage info.\00"
define void @cli_classic_abort_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
unsigned int swap_long(void *l) {
  unsigned char *b = (unsigned char *)l;
  return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}


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

x86 assembly (clang, -O2):
<swap_long>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @swap_long(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void invalid_arg(const char *option, const char *value) {
  do {
    fprintf(stderr,
            "csv"
            ": "
            "invalid argument for option %s: %s\n",
            option, value);
    exit(1);
  } while (0);
}


x86 assembly (clang, -O0):
<invalid_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<invalid_arg>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"csv: invalid argument for option %s: %s\0A\00"
define void @invalid_arg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; No predecessors!
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"csv: invalid argument for option %s: %s\0A\00"
define void @invalid_arg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ displaywidth();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basDisplayWidth() { pushNumber(displaywidth()); }


x86 assembly (clang, -O0):
<basDisplayWidth>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <displaywidth@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basDisplayWidth>:
push   %rax
xor    %eax,%eax
call   1030 <displaywidth@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basDisplayWidth() {
%1 = call i32 (...) @displaywidth()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basDisplayWidth() {
%1 = tail call i32 (...) @displaywidth()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
int pwait(int a, int *b, int c) { return (0); }


x86 assembly (clang, -O0):
<pwait>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pwait(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
ret i32 0
}

LLVM IR (-O2):
define i32 @pwait(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Type definitions */
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ examples_destroy(char const *);
void examples_destroy_NCC_EMPTY(const char *name, struct module **mod) {
  examples_destroy(name);
}


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

x86 assembly (clang, -O2):
<examples_destroy_NCC_EMPTY>:
jmp    1030 <examples_destroy@plt>

LLVM IR (-O0):
%struct.module = type { i32 }
define void @examples_destroy_NCC_EMPTY(i8* %0, %struct.module** %1) {
%3 = alloca i8*
%4 = alloca %struct.module**
store i8* %0, i8** %3
store %struct.module** %1, %struct.module*** %4
%5 = load i8*, i8** %3
%6 = call i32 @examples_destroy(i8* %5)
ret void
}

LLVM IR (-O2):
%struct.module = type { i32 }
define void @examples_destroy_NCC_EMPTY(i8* %0, %struct.module** nocapture readnone %1) {
%3 = tail call i32 @examples_destroy(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGWINCH;
int /*<<< orphan*/ progress_winch_updater(int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/,
                          int /*<<< orphan*/ (*)(int /*<<< orphan*/));
int progress_init(void) {
  progress_winch_updater(SIGWINCH);
  signal(SIGWINCH, progress_winch_updater);
  return 0;
}


x86 assembly (clang, -O0):
<progress_init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1040 <progress_winch_updater@plt>
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    0x2ea6(%rip),%rsi
call   1030 <signal@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress_init>:
push   %rbx
mov    0x2ed0(%rip),%rbx
mov    (%rbx),%edi
call   1040 <progress_winch_updater@plt>
mov    0x2eb2(%rip),%rsi
mov    (%rbx),%edi
call   1030 <signal@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SIGWINCH = global i32 0
define i32 @progress_init() {
%1 = load i32, i32* @SIGWINCH
%2 = call i32 @progress_winch_updater(i32 %1)
%3 = load i32, i32* @SIGWINCH
%4 = call i32 @signal(i32 %3, i32 (i32)* @progress_winch_updater)
ret i32 0
}

LLVM IR (-O2):
@SIGWINCH = global i32 0
define i32 @progress_init() {
%1 = load i32, i32* @SIGWINCH
%2 = tail call i32 @progress_winch_updater(i32 %1)
%3 = load i32, i32* @SIGWINCH
%4 = tail call i32 @signal(i32 %3, i32 (i32)* @progress_winch_updater)
ret i32 0
}
void ls_cost_nm7_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @ls_cost_nm7_incref() {
ret void
}
/* Type definitions */
struct pollfd {
  int revents;
};

/* Variables and functions */
int sock_revents(void *arg, struct pollfd *pfd) { return pfd->revents; }


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

x86 assembly (clang, -O2):
<sock_revents>:
mov    (%rsi),%eax
ret

LLVM IR (-O0):
%struct.pollfd = type { i32 }
define i32 @sock_revents(i8* %0, %struct.pollfd* %1) {
%3 = alloca i8*
%4 = alloca %struct.pollfd*
store i8* %0, i8** %3
store %struct.pollfd* %1, %struct.pollfd** %4
%5 = load %struct.pollfd*, %struct.pollfd** %4
%6 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %5, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
define i32 @sock_revents(i8* nocapture readnone %0, %struct.pollfd* nocapture %1) {
%3 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %1, i64 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  printf("Hola a todos\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hola a todos\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
float iszero(float x) { return x * x < 1e-6; }


x86 assembly (clang, -O0):
<iszero>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee1(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iszero>:
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef0(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     111a <iszero+0x1a>
xorps  %xmm0,%xmm0
ret
movss  0xee6(%rip),%xmm0
ret

LLVM IR (-O0):
define float @iszero(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = fpext float %5 to double
%7 = fcmp olt double %6, 0x3EB0C6F7A0B5ED8D
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to float
ret float %9
}

LLVM IR (-O2):
define float @iszero(float %0) {
%2 = fmul float %0, %0
%3 = fpext float %2 to double
%4 = fcmp olt double %3, 0x3EB0C6F7A0B5ED8D
%5 = uitofp i1 %4 to float
ret float %5
}
int cairo_code_draw_casNLabel_get_width() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casNLabel_get_width() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casNLabel_get_width() {
ret i32 7
}
unsigned char gnulliver() {
  unsigned char result;
  union {
    double d;
    unsigned char ch[8];
  } bytes;
  int i;
  bytes.d = (16.0 + (1.0 / 8.0 + 1.0 / 4096.0));
  result = 0;
  if (bytes.ch[0] == 0) {
    if (bytes.ch[4] == 0x10)
      result = (1 | 2 | 4 | 8);
    else
      result = (2 | 4 | 8);
  } else
    result = 0;
  return (result);
}


x86 assembly (clang, -O0):
<gnulliver>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movb   $0x0,-0x1(%rbp)
movzbl -0x10(%rbp),%eax
cmp    $0x0,%eax
jne    1141 <gnulliver+0x41>
movzbl -0xc(%rbp),%eax
cmp    $0x10,%eax
jne    1138 <gnulliver+0x38>
movb   $0xf,-0x1(%rbp)
jmp    113c <gnulliver+0x3c>
movb   $0xe,-0x1(%rbp)
jmp    1145 <gnulliver+0x45>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnulliver>:
mov    $0xf,%al
ret

LLVM IR (-O0):
%union.anon = type { double }
define zeroext i8 @gnulliver() {
%1 = alloca i8
%2 = alloca %union.anon
%3 = alloca i32
%4 = bitcast %union.anon* %2 to double*
store double 0x4030201000000000, double* %4
store i8 0, i8* %1
%5 = bitcast %union.anon* %2 to [8 x i8]*
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %0
%11 = bitcast %union.anon* %2 to [8 x i8]*
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 16
br i1 %15, label %16, label %17
16: ; preds = %10
store i8 15, i8* %1
br label %18
17: ; preds = %10
store i8 14, i8* %1
br label %18
18: ; preds = %17, %16
br label %20
19: ; preds = %0
store i8 0, i8* %1
br label %20
20: ; preds = %19, %18
%21 = load i8, i8* %1
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @gnulliver() {
ret i8 15
}
/* Type definitions */
struct _cgatsAlloc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cgatsAllocStd_free(struct _cgatsAlloc *pp, void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<cgatsAllocStd_free>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._cgatsAlloc = type { i32 }
define void @cgatsAllocStd_free(%struct._cgatsAlloc* %0, i8* %1) {
%3 = alloca %struct._cgatsAlloc*
%4 = alloca i8*
store %struct._cgatsAlloc* %0, %struct._cgatsAlloc** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
%struct._cgatsAlloc = type { i32 }
define void @cgatsAllocStd_free(%struct._cgatsAlloc* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, World!\n");
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *);
int main() {
  int test;
  test = 23;
  bar(&test);
  return test;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 23, i32* %1
%3 = call i32 @bar(i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ parse_err(char *, unsigned int);
void unknown_entry(unsigned line) { parse_err("Unknown entry", line); }


x86 assembly (clang, -O0):
<unknown_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <parse_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unknown_entry>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <parse_err@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Unknown entry\00"
define void @unknown_entry(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @parse_err(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Unknown entry\00"
define void @unknown_entry(i32 %0) {
%2 = tail call i32 @parse_err(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void fbcon_get_requirement(struct fb_info *info, struct fb_blit_caps *caps) {}


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

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

LLVM IR (-O0):
%struct.fb_info = type opaque
%struct.fb_blit_caps = type opaque
define void @fbcon_get_requirement(%struct.fb_info* %0, %struct.fb_blit_caps* %1) {
%3 = alloca %struct.fb_info*
%4 = alloca %struct.fb_blit_caps*
store %struct.fb_info* %0, %struct.fb_info** %3
store %struct.fb_blit_caps* %1, %struct.fb_blit_caps** %4
ret void
}

LLVM IR (-O2):
%struct.fb_info = type opaque
%struct.fb_blit_caps = type opaque
define void @fbcon_get_requirement(%struct.fb_info* nocapture %0, %struct.fb_blit_caps* nocapture %1) {
ret void
}
void basic_qsort(table, i, j, compare) int table[];
int i, j;
int (*compare)();
{ qsort(&(table[i]), j - i + 1, sizeof(int), compare); }


x86 assembly (clang, -O0):
<basic_qsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%rcx
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <qsort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_qsort>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
sub    %eax,%edx
lea    0x1(%rdx),%esi
mov    $0x4,%edx
xor    %eax,%eax
jmp    1030 <qsort@plt>

LLVM IR (-O0):
define void @basic_qsort(i32* %0, i32 %1, i32 %2, i32 (...)* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32 (...)*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 (...)* %3, i32 (...)** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
%16 = add nsw i32 %15, 1
%17 = load i32 (...)*, i32 (...)** %8
%18 = call i32 (i32*, i32, i64, i32 (...)*, ...) bitcast (i32 (...)* @qsort to i32 (i32*, i32, i64, i32 (...)*, ...)*)(i32* %12, i32 %16, i64 4, i32 (...)* %17)
ret void
}

LLVM IR (-O2):
define void @basic_qsort(i32* %0, i32 %1, i32 %2, i32 (...)* %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = sub i32 1, %1
%8 = add i32 %7, %2
%9 = tail call i32 (i32*, i32, i64, i32 (...)*, ...) bitcast (i32 (...)* @qsort to i32 (i32*, i32, i64, i32 (...)*, ...)*)(i32* %6, i32 %8, i64 4, i32 (...)* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ st_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
int ft_print(const char *str, int fd, int ret) {
  write(fd, str, st_strlen(str));
  return (ret);
}


x86 assembly (clang, -O0):
<ft_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <st_strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <st_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_print(i8* %0, i32 %1, i32 returned %2) {
%4 = tail call i32 @st_strlen(i8* %0)
%5 = tail call i32 @write(i32 %1, i8* %0, i32 %4)
ret i32 %2
}
/* Variables and functions */
int querycns(int, int, int, int, char *);
int setcns(int oid, int len, char *payload) {
  return querycns((1 << 1), oid, 0x03, len, payload);
}


x86 assembly (clang, -O0):
<setcns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    $0x2,%edi
mov    $0x3,%edx
call   1030 <querycns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcns>:
mov    %rdx,%r8
mov    %esi,%ecx
mov    %edi,%esi
mov    $0x2,%edi
mov    $0x3,%edx
jmp    1030 <querycns@plt>

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

LLVM IR (-O2):
define i32 @setcns(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @querycns(i32 2, i32 %0, i32 3, i32 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
size_t parentIndex(size_t i) {
  if (i % 2)
    ++i;
  return i / 2 - 1;
}


x86 assembly (clang, -O0):
<parentIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1126 <parentIndex+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parentIndex>:
mov    %edi,%eax
and    $0x1,%eax
add    %rdi,%rax
shr    %rax
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @parentIndex(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = urem i64 %3, 2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = add i64 %7, 1
store i64 %8, i64* %2
br label %9
9: ; preds = %6, %1
%10 = load i64, i64* %2
%11 = udiv i64 %10, 2
%12 = sub i64 %11, 1
ret i64 %12
}

LLVM IR (-O2):
define i64 @parentIndex(i64 %0) {
%2 = and i64 %0, 1
%3 = add i64 %2, %0
%4 = lshr i64 %3, 1
%5 = add nsw i64 %4, -1
ret i64 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int main(void) {
  uint8_t foo, bar, tor, res;
  foo = 3;
  bar = 27;
  tor = 99;
  res = 3 + 4;
  res = tor * bar;
  res = bar / tor;
  res = bar & foo;
  res = bar % foo;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1b,-0xc(%rbp)
movl   $0x63,-0x10(%rbp)
movl   $0x7,-0x14(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
_Complex char dfn_rcc(void) {
  return ({
    _Complex char x;
    __real__(x) = (1), __imag__(x) == (2);
    x;
  });
}


x86 assembly (clang, -O0):
<dfn_rcc>:
push   %rbp
mov    %rsp,%rbp
movb   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%cl
mov    -0xf(%rbp),%al
mov    %cl,-0x18(%rbp)
mov    %al,-0x17(%rbp)
mov    -0x18(%rbp),%cl
mov    -0x17(%rbp),%al
mov    %cl,-0x8(%rbp)
mov    %al,-0x7(%rbp)
mov    -0x8(%rbp),%ax
pop    %rbp
ret

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

LLVM IR (-O0):
define i16 @dfn_rcc() {
%1 = alloca { i8, i8 }
%2 = alloca { i8, i8 }
%3 = alloca { i8, i8 }
%4 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %2, i32 0, i32 0
store i8 1, i8* %4
%5 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %2, i32 0, i32 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 2
%9 = zext i1 %8 to i32
%10 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %2, i32 0, i32 0
%11 = load i8, i8* %10
%12 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %2, i32 0, i32 1
%13 = load i8, i8* %12
%14 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 0
%15 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 1
store i8 %11, i8* %14
store i8 %13, i8* %15
%16 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 0
%17 = load i8, i8* %16
%18 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %3, i32 0, i32 1
%19 = load i8, i8* %18
%20 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %1, i32 0, i32 0
%21 = getelementptr inbounds { i8, i8 }, { i8, i8 }* %1, i32 0, i32 1
store i8 %17, i8* %20
store i8 %19, i8* %21
%22 = bitcast { i8, i8 }* %1 to i16*
%23 = load i16, i16* %22
ret i16 %23
}

LLVM IR (-O2):
define i16 @dfn_rcc() {
ret i16 1
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutSetWindowTitle(char *);
void glutSetWindowTitle(char *title) { fn_glutSetWindowTitle(title); }


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

x86 assembly (clang, -O2):
<glutSetWindowTitle>:
jmp    1030 <fn_glutSetWindowTitle@plt>

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

LLVM IR (-O2):
define void @glutSetWindowTitle(i8* %0) {
%2 = tail call i32 @fn_glutSetWindowTitle(i8* %0)
ret void
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
void *list_remove(struct list *, void *, int (*)(void const *, void const *));
int list_remove_destroy(struct list *list, void *value,
                        int (*cmp)(const void *, const void *),
                        void (*free_func)(void *)) {
  void *result;
  result = list_remove(list, value, cmp);
  if (!(result)) {
    goto error;
  };
  free_func(result);
  return 0;
error:
  return -1;
}


x86 assembly (clang, -O0):
<list_remove_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <list_remove@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    114d <list_remove_destroy+0x3d>
jmp    1163 <list_remove_destroy+0x53>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rdi
call   *%rax
movl   $0x0,-0x4(%rbp)
jmp    116a <list_remove_destroy+0x5a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_remove_destroy>:
push   %rbx
mov    %rcx,%rbx
call   1030 <list_remove@plt>
test   %rax,%rax
je     1127 <list_remove_destroy+0x17>
mov    %rax,%rdi
call   *%rbx
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define i32 @list_remove_destroy(%struct.list* %0, i8* %1, i32 (i8*, i8*)* %2, void (i8*)* %3) {
%5 = alloca i32
%6 = alloca %struct.list*
%7 = alloca i8*
%8 = alloca i32 (i8*, i8*)*
%9 = alloca void (i8*)*
%10 = alloca i8*
store %struct.list* %0, %struct.list** %6
store i8* %1, i8** %7
store i32 (i8*, i8*)* %2, i32 (i8*, i8*)** %8
store void (i8*)* %3, void (i8*)** %9
%11 = load %struct.list*, %struct.list** %6
%12 = load i8*, i8** %7
%13 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%14 = call i8* @list_remove(%struct.list* %11, i8* %12, i32 (i8*, i8*)* %13)
store i8* %14, i8** %10
%15 = load i8*, i8** %10
%16 = icmp ne i8* %15, null
br i1 %16, label %18, label %17
17: ; preds = %4
br label %21
18: ; preds = %4
%19 = load void (i8*)*, void (i8*)** %9
%20 = load i8*, i8** %10
store i32 0, i32* %5
br label %22
21: ; preds = %17
store i32 -1, i32* %5
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
%struct.list = type { i32 }
define i32 @list_remove_destroy(%struct.list* %0, i8* %1, i32 (i8*, i8*)* %2, void (i8*)* nocapture %3) {
%5 = tail call i8* @list_remove(%struct.list* %0, i8* %1, i32 (i8*, i8*)* %2)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void %3(i8* %5)
br label %8
8: ; preds = %4, %7
%9 = phi i32 [ 0, %7 ], [ -1, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("linux\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 = [7 x i8] c"linux\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 ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"linux\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int cairo_code_draw_casTitleLabel_get_height() { return 83; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casTitleLabel_get_height() {
ret i32 83
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casTitleLabel_get_height() {
ret i32 83
}
/* Variables and functions */
int /*<<< orphan*/ text_buffer_addf(char *, char const *);
void text_buffer_add(const char msg[]) { text_buffer_addf("%s", msg); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @text_buffer_add(i8* %0) {
%2 = tail call i32 @text_buffer_addf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gtk_tree_model_get_column_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_get_column_type() {
ret void
}
int kgsl_process_init_debugfs(struct kgsl_process_private *device) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kgsl_process_private = type opaque
define i32 @kgsl_process_init_debugfs(%struct.kgsl_process_private* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char rgetchar();
void wait_for_ack(void) {
  while (rgetchar() != ' ')
    ;
}


x86 assembly (clang, -O0):
<wait_for_ack>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <wait_for_ack+0x9>
mov    $0x0,%al
call   1030 <rgetchar@plt>
movsbl %al,%eax
cmp    $0x20,%eax
je     1131 <wait_for_ack+0x21>
jmp    1119 <wait_for_ack+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_ack>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rgetchar@plt>
cmp    $0x20,%al
jne    1120 <wait_for_ack+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @wait_for_ack() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @rgetchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 32
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @wait_for_ack() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @rgetchar()
%3 = icmp eq i8 %2, 32
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
void f0_3137() { int g0_3137(void); }


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

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

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

LLVM IR (-O2):
define void @f0_3137() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __mmask8;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_epi32_mask(int /*<<< orphan*/, int /*<<< orphan*/);
__mmask8 __attribute__((__target__("avx512vl")))
mm_cmpeq_epi32_mask_wrap(__m128i a, __m128i b) {
  return _mm_cmpeq_epi32_mask(a, b);
}


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

x86 assembly (clang, -O2):
<mm_cmpeq_epi32_mask_wrap>:
jmp    1030 <_mm_cmpeq_epi32_mask@plt>

LLVM IR (-O0):
define i32 @mm_cmpeq_epi32_mask_wrap(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 = call i32 @_mm_cmpeq_epi32_mask(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mm_cmpeq_epi32_mask_wrap(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpeq_epi32_mask(i32 %0, i32 %1)
ret i32 %3
}