xunge/DecIR huggingface dataset:
char *optiontostr(int option, char *buffer) {
  buffer[0] = '-';
  buffer[1] = option;
  buffer[2] = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<optiontostr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x2d,(%rax)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x2(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<optiontostr>:
mov    %rsi,%rax
movb   $0x2d,(%rsi)
mov    %dil,0x1(%rsi)
movb   $0x0,0x2(%rsi)
ret

LLVM IR (-O0):
define i8* @optiontostr(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
store i8 45, i8* %6
%7 = load i32, i32* %3
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %8, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 0, i8* %12
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @optiontostr(i32 %0, i8* returned writeonly %1) {
store i8 45, i8* %1
%3 = trunc i32 %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %3, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 2
store i8 0, i8* %5
ret i8* %1
}
int max_int(int x, int y) {
  if (x > y)
    return x;
  else
    return y;
}


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

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

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

LLVM IR (-O2):
define i32 @max_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int test_imm_83int8_mem(signed char *val) {
  return ((*val) & (-0x83 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_83int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff7d,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_83int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -131
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
char *GetCapabilityHelp(char *psz_capability, int i_type) { return " "; }


x86 assembly (clang, -O0):
<GetCapabilityHelp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCapabilityHelp>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i8* @GetCapabilityHelp(i8* nocapture readnone %0, i32 %1) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  unsigned int i = 1;
  while (i > 0) {
    i++;
  }
  printf("Hello world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    113e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xebb(%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 = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int atomic_int;

/* Variables and functions */
int ATOMIC_VAR_INIT(int);
int /*<<< orphan*/ abort();
void test_and(void) {
  atomic_int i = ATOMIC_VAR_INIT(5);
  i &= 4;
  if (i != 4)
    abort();
  if ((i &= 4) != 4)
    abort();
}


x86 assembly (clang, -O0):
<test_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <ATOMIC_VAR_INIT@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
je     114f <test_and+0x2f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x4,%eax
je     1168 <test_and+0x48>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and>:
push   %rax
mov    $0x5,%edi
call   1040 <ATOMIC_VAR_INIT@plt>
test   $0x4,%al
je     1131 <test_and+0x11>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @test_and() {
%1 = tail call i32 @ATOMIC_VAR_INIT(i32 5)
%2 = and i32 %1, 4
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, long *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
extern char *ltostr(char *str, long l) {
  memset(str, 0, sizeof(long) + 1);
  memcpy(str, &l, sizeof(long));
  return str;
}


x86 assembly (clang, -O0):
<ltostr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltostr>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsi,0x8(%rsp)
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <memset@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltostr(i8* returned %0, i64 %1) {
%3 = alloca i64
store i64 %1, i64* %3
%4 = tail call i32 @memset(i8* %0, i32 0, i32 9)
%5 = call i32 @memcpy(i8* %0, i64* %3, i32 8)
ret i8* %0
}
/* Variables and functions */
bool my_isxdigit(char c) {
  return ((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'f')) ||
         ((c >= 'A') && (c <= 'F'));
}


x86 assembly (clang, -O0):
<my_isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <my_isxdigit+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <my_isxdigit+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <my_isxdigit+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    116d <my_isxdigit+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <my_isxdigit+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @my_isxdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @my_isxdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  ptr = realloc(ptr, size);
  if (ptr == NULL)
    abort();
  else
    return ptr;
}


x86 assembly (clang, -O0):
<xrealloc>:
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   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1153 <xrealloc+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     112d <xrealloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %2
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i8* %3
}
extern double bits_to_double(unsigned long long a) { return *((double *)&a); }


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

x86 assembly (clang, -O2):
<bits_to_double>:
movq   %rdi,%xmm0
ret

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

LLVM IR (-O2):
define double @bits_to_double(i64 %0) {
%2 = bitcast i64 %0 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ EMFILE;
int /*<<< orphan*/ errno;
int dup2(int oldfd, int newfd) {
  (void)oldfd;
  (void)newfd;
  errno = EMFILE;
  return -1;
}


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EMFILE = global i32 0
@errno = global i32 0
define i32 @dup2(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 = load i32, i32* @EMFILE
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EMFILE = global i32 0
@errno = global i32 0
define i32 @dup2(i32 %0, i32 %1) {
%3 = load i32, i32* @EMFILE
store i32 %3, i32* @errno
ret i32 -1
}
void ARGBAttenuate() {}


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

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

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

LLVM IR (-O2):
define void @ARGBAttenuate() {
ret void
}
void raise(void) {}


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

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

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

LLVM IR (-O2):
define void @raise() {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t nrf_drv_radio802154_cca_duration_get(void) {
  uint16_t result = 12 + 8;
  result *= 16;
  return result;
}


x86 assembly (clang, -O0):
<nrf_drv_radio802154_cca_duration_get>:
push   %rbp
mov    %rsp,%rbp
movl   $0x14,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nrf_drv_radio802154_cca_duration_get() {
%1 = alloca i32
store i32 20, i32* %1
%2 = load i32, i32* %1
%3 = mul nsw i32 %2, 16
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @nrf_drv_radio802154_cca_duration_get() {
ret i32 320
}
/* Variables and functions */
int /*<<< orphan*/ qw(char, char *);
int main(int ac, char **av) {
  int i;
  for (i = 1; i < ac; i++)
    qw(av[i][0], av[i] + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116d <main+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    (%rcx,%rdx,8),%rsi
add    $0x1,%rsi
movsbl %al,%edi
call   1030 <qw@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1149 <main+0x39>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rsi
movsbl (%rsi),%edi
add    $0x1,%rsi
call   1030 <qw@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %13, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = tail call i32 @qw(i8 signext %10, i8* %11)
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug_ol(char *);
int /*<<< orphan*/ ot(char *);
immed() {
  debug_ol("; immed");
  ot("ldd	#");
}


x86 assembly (clang, -O0):
<immed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <debug_ol@plt>
lea    0xecd(%rip),%rdi
call   1030 <ot@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<immed>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <debug_ol@plt>
lea    0xed4(%rip),%rdi
pop    %rax
jmp    1030 <ot@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"; immed\00"
@.str.1 = [6 x i8] c"ldd\09#\00"
define i32 @immed() {
%1 = alloca i32
%2 = call i32 @debug_ol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"; immed\00"
@.str.1 = [6 x i8] c"ldd\09#\00"
define i32 @immed() {
%1 = tail call i32 @debug_ol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int Bar2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int res;
  res = Bar2(6, 8);
  printf("main: res = %d\n", res);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"main: res = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @Bar2(i32 6, i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int abs2(int n) { return n >= 0 ? n : -n; }


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

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

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

LLVM IR (-O2):
define i32 @abs2(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void process(int x[], int n) { x[0] = 21; }


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

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

LLVM IR (-O0):
define void @process(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 = getelementptr inbounds i32, i32* %5, i64 0
store i32 21, i32* %6
ret void
}

LLVM IR (-O2):
define void @process(i32* nocapture writeonly %0, i32 %1) {
store i32 21, i32* %0
ret void
}
unsigned char rshift(unsigned char data, unsigned char shift) {
  return data >> shift;
}


x86 assembly (clang, -O0):
<rshift>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
sar    %cl,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rshift>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define zeroext i8 @rshift(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = ashr i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @rshift(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = lshr i32 %3, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}
void XtCvtStringToVisual() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToVisual() {
ret void
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int data_offset_from_whence(int, size_t);
off_t crc_offset_from_whence(int whence, size_t len) {
  off_t data_offset = data_offset_from_whence(whence, len);
  return (95 * 1024 * 1024) + data_offset / 512 * 4;
}


x86 assembly (clang, -O0):
<crc_offset_from_whence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <data_offset_from_whence@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x200,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
add    $0x5f00000,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc_offset_from_whence>:
push   %rax
call   1030 <data_offset_from_whence@plt>
lea    0x1ff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x9,%ecx
lea    0x5f00000(,%rcx,4),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @crc_offset_from_whence(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = call i32 @data_offset_from_whence(i32 %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sdiv i32 %9, 512
%11 = mul nsw i32 %10, 4
%12 = add nsw i32 99614720, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @crc_offset_from_whence(i32 %0, i64 %1) {
%3 = tail call i32 @data_offset_from_whence(i32 %0, i64 %1)
%4 = sdiv i32 %3, 512
%5 = shl nsw i32 %4, 2
%6 = add nsw i32 %5, 99614720
ret i32 %6
}
void gtk_action_create_icon() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_create_icon() {
ret void
}
/* Variables and functions */
int VALGRIND_PRINTF(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int x = VALGRIND_PRINTF("Yo");
  printf("%d\n", x);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"Yo\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @VALGRIND_PRINTF(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"Yo\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @VALGRIND_PRINTF(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int __original_dup(int);
int dup(int oldfd) {
  int ret = 0;
  ret = __original_dup(oldfd);
  return ret;
}


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

x86 assembly (clang, -O2):
<dup>:
jmp    1030 <__original_dup@plt>

LLVM IR (-O0):
define i32 @dup(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @__original_dup(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @__original_dup(i32 %0)
ret i32 %2
}
/* Type definitions */
struct callbacks {
  int dummy;
};

/* Variables and functions */
long long parse_rate(char const *, struct callbacks *);
void parse_max_pacing_rate(const char *arg, void *out, struct callbacks *cb) {
  *(long long *)out = parse_rate(arg, cb);
}


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

x86 assembly (clang, -O2):
<parse_max_pacing_rate>:
push   %rbx
mov    %rsi,%rbx
mov    %rdx,%rsi
call   1030 <parse_rate@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.callbacks = type { i32 }
define void @parse_max_pacing_rate(i8* %0, i8* %1, %struct.callbacks* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.callbacks*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.callbacks* %2, %struct.callbacks** %6
%7 = load i8*, i8** %4
%8 = load %struct.callbacks*, %struct.callbacks** %6
%9 = call i64 @parse_rate(i8* %7, %struct.callbacks* %8)
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64 %9, i64* %11
ret void
}

LLVM IR (-O2):
%struct.callbacks = type { i32 }
define void @parse_max_pacing_rate(i8* %0, i8* nocapture writeonly %1, %struct.callbacks* %2) {
%4 = tail call i64 @parse_rate(i8* %0, %struct.callbacks* %2)
%5 = bitcast i8* %1 to i64*
store i64 %4, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void presenta() {
  printf("\n");
  printf("test-saltos. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\n");
  printf("Medicion del tiempo de vuelo de los saltos\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<presenta>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [60 x i8] c"test-saltos. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\0A\00"
@.str.2 = [44 x i8] c"Medicion del tiempo de vuelo de los saltos\0A\00"
define void @presenta() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"test-saltos. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\00"
@str.3 = [43 x i8] c"Medicion del tiempo de vuelo de los saltos\00"
define void @presenta() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
void l4x_suspend_resume_register(void (*func)(enum l4x_suspend_resume_state),
                                 struct l4x_suspend_resume_struct *e) {}


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

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

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

LLVM IR (-O2):
%struct.l4x_suspend_resume_struct = type opaque
define void @l4x_suspend_resume_register({}* nocapture %0, %struct.l4x_suspend_resume_struct* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prime(int *);
int /*<<< orphan*/ show(int *);
int main() {
  int table[1000];
  prime(table);
  show(table);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xfa0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <prime@plt>
mov    %rbx,%rdi
call   1030 <show@plt>
xor    %eax,%eax
add    $0xfa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 0
%4 = call i32 @prime(i32* %3)
%5 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 0
%6 = call i32 @show(i32* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i32]
%2 = bitcast [1000 x i32]* %1 to i8*
%3 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 0
%4 = call i32 @prime(i32* %3)
%5 = call i32 @show(i32* %3)
ret i32 0
}
int main(void) {
  return printf("%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n",
                sizeof(42), sizeof(42l), sizeof(42L), sizeof(42u), sizeof(42U),
                sizeof(42ul), sizeof(42uLL), sizeof(42ULL), sizeof(42llU),
                sizeof(42LLu), sizeof(42LLU));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%r9d
mov    $0x8,%ecx
mov    %r9,%rsi
mov    %rcx,%rdx
mov    %r9,%r8
movq   $0x8,(%rsp)
movq   $0x8,0x8(%rsp)
movq   $0x8,0x10(%rsp)
movq   $0x8,0x18(%rsp)
movq   $0x8,0x20(%rsp)
movq   $0x8,0x28(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [55 x i8] c"%lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i64 4, i64 8, i64 8, i64 4, i64 4, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
size_t pad_to_four(size_t n) {
  size_t count = 0;
  while (n & 3) {
    fputc(0, stdout);
    n++;
    count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<pad_to_four>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
je     1163 <pad_to_four+0x53>
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <pad_to_four+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad_to_four>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
test   $0x3,%r15b
je     1162 <pad_to_four+0x52>
mov    %r15d,%r14d
and    $0x3,%r14d
neg    %r15b
mov    $0x1,%ebx
mov    0x2ea9(%rip),%r12
and    $0x3,%r15b
nopl   0x0(%rax,%rax,1)
mov    (%r12),%esi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    %ebx,%eax
and    $0x3,%al
add    $0x1,%rbx
cmp    %r15b,%al
jne    1140 <pad_to_four+0x30>
mov    $0x4,%eax
sub    %r14,%rax
jmp    1164 <pad_to_four+0x54>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
define i64 @pad_to_four(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i64, i64* %2
%6 = and i64 %5, 3
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* @stdout
%10 = call i32 @fputc(i32 0, i32 %9)
%11 = load i64, i64* %2
%12 = add i64 %11, 1
store i64 %12, i64* %2
%13 = load i64, i64* %3
%14 = add i64 %13, 1
store i64 %14, i64* %3
br label %4
15: ; preds = %4
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
@stdout = global i32 0
define i64 @pad_to_four(i64 %0) {
%2 = and i64 %0, 3
%3 = icmp eq i64 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1
%5 = trunc i64 %0 to i2
%6 = and i64 %0, 3
%7 = sub i2 0, %5
br label %8
8: ; preds = %4, %8
%9 = phi i64 [ %12, %8 ], [ 0, %4 ]
%10 = load i32, i32* @stdout
%11 = tail call i32 @fputc(i32 0, i32 %10)
%12 = add nuw nsw i64 %9, 1
%13 = trunc i64 %12 to i2
%14 = icmp eq i2 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = sub nuw nsw i64 4, %6
br label %17
17: ; preds = %15, %1
%18 = phi i64 [ 0, %1 ], [ %16, %15 ]
ret i64 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello world\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct world_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(struct world_allocator *);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *world_allocator_malloc(struct world_allocator *a, size_t size) {
  assert(a);
  void *p = malloc(size);
  if (p == NULL) {
    perror("malloc");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<world_allocator_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1184 <world_allocator_malloc+0x44>
lea    0xe88(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world_allocator_malloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1158 <world_allocator_malloc+0x18>
pop    %rbx
ret
lea    0xea1(%rip),%rdi
call   1060 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.world_allocator = type { i32 }
@.str = [7 x i8] c"malloc\00"
define i8* @world_allocator_malloc(%struct.world_allocator* %0, i64 %1) {
%3 = alloca %struct.world_allocator*
%4 = alloca i64
%5 = alloca i8*
store %struct.world_allocator* %0, %struct.world_allocator** %3
store i64 %1, i64* %4
%6 = load %struct.world_allocator*, %struct.world_allocator** %3
%7 = call i32 @assert(%struct.world_allocator* %6)
%8 = load i64, i64* %4
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
%struct.world_allocator = type { i32 }
@.str = [7 x i8] c"malloc\00"
define noalias i8* @world_allocator_malloc(%struct.world_allocator* %0, i64 %1) {
%3 = tail call i32 @assert(%struct.world_allocator* %0)
%4 = tail call i8* @malloc(i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %4
}
void ff_hevc_put_hevc_pel_pixels64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_pel_pixels64_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *mycalloc(int, int);
int main(void) { return (mycalloc(1, 1) != NULL); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <mycalloc@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32* @mycalloc(i32 1, i32 1)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @mycalloc(i32 1, i32 1)
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
int test_imm_F2int64_midword_reg(long long val) {
  return ((val >> 16) & (0xF2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F2int64_midword_reg(i64 %0) {
%2 = and i64 %0, 15859712
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ time;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
unsigned long get_XButtonPressedEvent_time(void *_p) {
  return (unsigned long)((XButtonPressedEvent *)_p)->time;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XButtonPressedEvent_time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XButtonPressedEvent_time(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ acc_device_host;
int /*<<< orphan*/ acc_device_not_host;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int main(int argc, char **argv) {
  acc_init(acc_device_host);
  acc_shutdown(acc_device_not_host);
  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)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <acc_init@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1040 <acc_init@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@acc_device_host = global i32 0
@acc_device_not_host = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @acc_device_host
%4 = tail call i32 @acc_init(i32 %3)
%5 = load i32, i32* @acc_device_not_host
%6 = tail call i32 @acc_shutdown(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FIONBIO;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, char *);
void NetNonblockingIO(int fd, int onoff) { ioctl(fd, FIONBIO, (char *)&onoff); }


x86 assembly (clang, -O0):
<NetNonblockingIO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NetNonblockingIO>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rax
ret

LLVM IR (-O0):
@FIONBIO = global i32 0
define void @NetNonblockingIO(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* @FIONBIO
%7 = bitcast i32* %4 to i8*
%8 = call i32 @ioctl(i32 %5, i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@FIONBIO = global i32 0
define void @NetNonblockingIO(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @FIONBIO
%5 = bitcast i32* %3 to i8*
%6 = call i32 @ioctl(i32 %0, i32 %4, i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_64(int /*<<< orphan*/);
uint64_t ByteSwap64(uint64_t d) { return bswap_64(d); }


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

x86 assembly (clang, -O2):
<ByteSwap64>:
jmp    1030 <bswap_64@plt>

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

LLVM IR (-O2):
define i32 @ByteSwap64(i32 %0) {
%2 = tail call i32 @bswap_64(i32 %0)
ret i32 %2
}