xunge/DecIR huggingface dataset:
/* Variables and functions */
int get_socket_priv(int);
int get_socket_unpriv(int);
int get_socket(int type, int priv) {
  if (priv)
    return (get_socket_priv(type));
  else
    return (get_socket_unpriv(type));
}


x86 assembly (clang, -O0):
<get_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1148 <get_socket+0x28>
mov    -0x8(%rbp),%edi
call   1030 <get_socket_priv@plt>
mov    %eax,-0x4(%rbp)
jmp    1153 <get_socket+0x33>
mov    -0x8(%rbp),%edi
call   1040 <get_socket_unpriv@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_socket>:
test   %esi,%esi
je     1129 <get_socket+0x9>
jmp    1030 <get_socket_priv@plt>
jmp    1040 <get_socket_unpriv@plt>

LLVM IR (-O0):
define i32 @get_socket(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* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @get_socket_priv(i32 %9)
store i32 %10, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 @get_socket_unpriv(i32 %12)
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_socket(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @get_socket_priv(i32 %0)
br label %8
6: ; preds = %2
%7 = tail call i32 @get_socket_unpriv(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Type definitions */
typedef int u_short;
typedef int u_char;

/* Variables and functions */
u_short _getshort(u_char *msgp) {
  u_char *p = (u_char *)msgp;
  u_short u;
  u = *p++ << 8;
  return ((u_short)(u | *p));
}


x86 assembly (clang, -O0):
<_getshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getshort>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @_getshort(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %0
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = or i32 %4, %5
ret i32 %6
}
void border_sw_ext_corner_special_sand_short_hori(unsigned char *pic,
                                                  unsigned char *mirr) {
  *pic = 0x2B;
  *mirr = 0x01;
}


x86 assembly (clang, -O0):
<border_sw_ext_corner_special_sand_short_hori>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2b,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_sw_ext_corner_special_sand_short_hori>:
movb   $0x2b,(%rdi)
movb   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @border_sw_ext_corner_special_sand_short_hori(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 43, i8* %5
%6 = load i8*, i8** %4
store i8 1, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_sw_ext_corner_special_sand_short_hori(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 43, i8* %0
store i8 1, i8* %1
ret void
}
void acpi_madt_oem_check(char *oem_id, char *oem_table_id) {}


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

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

LLVM IR (-O0):
define void @acpi_madt_oem_check(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @acpi_madt_oem_check(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int STC3115_ReadByte(int);
int STC3115_WriteByte(int, int);
int STC3115_AlarmStop(void) {
  int res;
  res = STC3115_ReadByte(0x00);
  res = STC3115_WriteByte(0x00, (res & ~0x08));
  if (res != 0)
    return (res);
  return (0);
}


x86 assembly (clang, -O0):
<STC3115_AlarmStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <STC3115_ReadByte@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
and    $0xfffffff7,%esi
xor    %edi,%edi
call   1030 <STC3115_WriteByte@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <STC3115_AlarmStop+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <STC3115_AlarmStop+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STC3115_AlarmStop>:
push   %rax
xor    %edi,%edi
call   1040 <STC3115_ReadByte@plt>
and    $0xfffffff7,%eax
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <STC3115_WriteByte@plt>

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

LLVM IR (-O2):
define i32 @STC3115_AlarmStop() {
%1 = tail call i32 @STC3115_ReadByte(i32 0)
%2 = and i32 %1, -9
%3 = tail call i32 @STC3115_WriteByte(i32 0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;
typedef int /*<<< orphan*/ mpfr_srcptr;
typedef int /*<<< orphan*/ mpfr_rnd_t;
typedef int /*<<< orphan*/ mpfr_ptr;

/* Variables and functions */
int /*<<< orphan*/ mpfr_atan;
int mpfr_atrig(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int mpfr_atan_npi(mpfr_ptr rop, mpfr_srcptr op, mpz_t npi, mpfr_rnd_t rnd) {
  return mpfr_atrig(rop, op, mpfr_atan, 0, npi, rnd);
}


x86 assembly (clang, -O0):
<mpfr_atan_npi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
xor    %ecx,%ecx
call   1030 <mpfr_atrig@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpfr_atan_npi>:
mov    %ecx,%r9d
mov    %edx,%r8d
mov    0x2ecb(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
jmp    1030 <mpfr_atrig@plt>

LLVM IR (-O0):
@mpfr_atan = global i32 0
define i32 @mpfr_atan_npi(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 = load i32, i32* @mpfr_atan
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @mpfr_atrig(i32 %9, i32 %10, i32 %11, i32 0, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@mpfr_atan = global i32 0
define i32 @mpfr_atan_npi(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* @mpfr_atan
%6 = tail call i32 @mpfr_atrig(i32 %0, i32 %1, i32 %5, i32 0, i32 %2, i32 %3)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
scalar_t__ snprintf(char *, int, char *, char const *);
int /*<<< orphan*/ write(int, char *, scalar_t__);
void tx_error(const char *err) {
  char buf[512];
  write(1, buf, snprintf(buf, sizeof(buf), "E%s", err) + 1);
}


x86 assembly (clang, -O0):
<tx_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x218(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x200,%esi
lea    0xeac(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x218(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_error>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1040 <snprintf@plt>
lea    0x1(%rax),%rdx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <write@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"E%s\00"
define void @tx_error(i8* %0) {
%2 = alloca i8*
%3 = alloca [512 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i64 @snprintf(i8* %5, i32 512, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = add nsw i64 %7, 1
%9 = call i32 @write(i32 1, i8* %4, i64 %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"E%s\00"
define void @tx_error(i8* %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i64 @snprintf(i8* %3, i32 512, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = add nsw i64 %4, 1
%6 = call i32 @write(i32 1, i8* %3, i64 %5)
ret void
}
int __compareDoubles(const void *a, const void *b) {
  double arg1 = *(const double *)a;
  double arg2 = *(const double *)b;
  if (arg1 < arg2) {
    return -1;
  }
  if (arg1 > arg2) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<__compareDoubles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <__compareDoubles+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <__compareDoubles+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <__compareDoubles+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <__compareDoubles+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__compareDoubles>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__compareDoubles(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @__compareDoubles(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
struct darr {
  int dummy;
};

/* Variables and functions */
void *darr_element(struct darr *, size_t);
void *darr_address(struct darr *d, size_t i) { return darr_element(d, i); }


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

x86 assembly (clang, -O2):
<darr_address>:
jmp    1030 <darr_element@plt>

LLVM IR (-O0):
%struct.darr = type { i32 }
define i8* @darr_address(%struct.darr* %0, i64 %1) {
%3 = alloca %struct.darr*
%4 = alloca i64
store %struct.darr* %0, %struct.darr** %3
store i64 %1, i64* %4
%5 = load %struct.darr*, %struct.darr** %3
%6 = load i64, i64* %4
%7 = call i8* @darr_element(%struct.darr* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.darr = type { i32 }
define i8* @darr_address(%struct.darr* %0, i64 %1) {
%3 = tail call i8* @darr_element(%struct.darr* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal16array(void *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 16));
}


x86 assembly (clang, -O0):
<popreal16array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popreal16array>:
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popreal16array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 16
%8 = call i32 @popNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @popreal16array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 4
%4 = tail call i32 @popNarray(i8* %0, i32 %3)
ret void
}
void skip_whitespace(char *p) {
  while (*p && *p <= ' ')
    p++;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <skip_whitespace+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skip_whitespace+0x3d>
jmp    114e <skip_whitespace+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_whitespace+0x8>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @skip_whitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 32
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @skip_whitespace(i8* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XCirculateEvent;

/* Variables and functions */
unsigned long get_XCirculateEvent_window(void *_p) {
  return (unsigned long)((XCirculateEvent *)_p)->window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XCirculateEvent_window(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_XCirculateEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void StartupValidate(int argc, char **argv) {
  if (argc != 5) {
    puts("usage>makefont [source.txt] [font.bin] [bitmap name] [bitmap size]");
    exit(-1);
  }
  return;
}


x86 assembly (clang, -O0):
<StartupValidate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x4(%rbp)
je     114f <StartupValidate+0x2f>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartupValidate>:
cmp    $0x5,%edi
jne    1126 <StartupValidate+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"usage>makefont [source.txt] [font.bin] [bitmap name] [bitmap size]\00"
define void @StartupValidate(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @puts(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"usage>makefont [source.txt] [font.bin] [bitmap name] [bitmap size]\00"
define void @StartupValidate(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 5
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sF() {
  dot();
  dot();
  dash();
  dot();
  cBreak();
}


x86 assembly (clang, -O0):
<sF>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sF>:
push   %rax
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sF() {
%1 = call i32 (...) @dot()
%2 = call i32 (...) @dot()
%3 = call i32 (...) @dash()
%4 = call i32 (...) @dot()
%5 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sF() {
%1 = tail call i32 (...) @dot()
%2 = tail call i32 (...) @dot()
%3 = tail call i32 (...) @dash()
%4 = tail call i32 (...) @dot()
%5 = tail call i32 (...) @cBreak()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t should_print(uint8_t pass) {
  if (!pass)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<should_print>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <should_print+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <should_print+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @should_print(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int f();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d", f());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int got_interrupt() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @got_interrupt() {
ret i32 0
}
/* Type definitions */
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int prepend_generic_katcp(struct katcp_dispatch *, int /*<<< orphan*/);
int prepend_inform_katcp(struct katcp_dispatch *d) {
  return prepend_generic_katcp(d, 0);
}


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

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

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
define i32 @prepend_inform_katcp(%struct.katcp_dispatch* %0) {
%2 = alloca %struct.katcp_dispatch*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %2
%3 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %2
%4 = call i32 @prepend_generic_katcp(%struct.katcp_dispatch* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
define i32 @prepend_inform_katcp(%struct.katcp_dispatch* %0) {
%2 = tail call i32 @prepend_generic_katcp(%struct.katcp_dispatch* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) __m256i add_256(__m256i a, __m256i b) {
  return _mm256_add_epi32(a, b);
}


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

x86 assembly (clang, -O2):
<add_256>:
jmp    1030 <_mm256_add_epi32@plt>

LLVM IR (-O0):
define i32 @add_256(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 @_mm256_add_epi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @add_256(i32 %0, i32 %1) {
%3 = tail call i32 @_mm256_add_epi32(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_shell_surface {
  int dummy;
};
struct wl_seat {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, struct wl_seat *,
                                    int /*<<< orphan*/);
void wl_shell_surface_move(struct wl_shell_surface *wl_shell_surface,
                           struct wl_seat *seat, uint32_t serial) {
  wl_proxy_marshal((struct wl_proxy *)wl_shell_surface, 1, seat, serial);
}


x86 assembly (clang, -O0):
<wl_shell_surface_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_shell_surface_move>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_shell_surface = type { i32 }
%struct.wl_seat = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_move(%struct.wl_shell_surface* %0, %struct.wl_seat* %1, i32 %2) {
%4 = alloca %struct.wl_shell_surface*
%5 = alloca %struct.wl_seat*
%6 = alloca i32
store %struct.wl_shell_surface* %0, %struct.wl_shell_surface** %4
store %struct.wl_seat* %1, %struct.wl_seat** %5
store i32 %2, i32* %6
%7 = load %struct.wl_shell_surface*, %struct.wl_shell_surface** %4
%8 = bitcast %struct.wl_shell_surface* %7 to %struct.wl_proxy*
%9 = load %struct.wl_seat*, %struct.wl_seat** %5
%10 = load i32, i32* %6
%11 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %8, i32 1, %struct.wl_seat* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.wl_shell_surface = type { i32 }
%struct.wl_seat = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_move(%struct.wl_shell_surface* %0, %struct.wl_seat* %1, i32 %2) {
%4 = bitcast %struct.wl_shell_surface* %0 to %struct.wl_proxy*
%5 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 1, %struct.wl_seat* %1, i32 %2)
ret void
}
int my_str_isupper(char *str) {
  int i;
  for (i = 0; str[i]; i++) {
    if (str[i] >= 'A' && str[i] <= 'Z')
      ;
    else
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116f <my_str_isupper+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x41,%eax
jl     1150 <my_str_isupper+0x50>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jg     1150 <my_str_isupper+0x50>
jmp    115c <my_str_isupper+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1176 <my_str_isupper+0x76>
jmp    1161 <my_str_isupper+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_isupper+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_isupper>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_isupper+0x23>
add    $0x1,%rdi
nop
add    $0xbf,%cl
cmp    $0x1a,%cl
jae    1124 <my_str_isupper+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_isupper+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_str_isupper(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %31, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %34
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %29
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 90
br i1 %27, label %28, label %29
28: ; preds = %20
br label %30
29: ; preds = %20, %12
store i32 0, i32* %2
br label %35
30: ; preds = %28
br label %31
31: ; preds = %30
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %5
34: ; preds = %5
store i32 1, i32* %2
br label %35
35: ; preds = %34, %29
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @my_str_isupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -65
%12 = icmp ult i8 %11, 26
%13 = add nuw i64 %9, 1
br i1 %12, label %4, label %14
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
unsigned int i_limits(unsigned int n, unsigned int m, unsigned int *up,
                      unsigned int *down, unsigned int max_gap) {
  (*up) = ((int)m - (int)max_gap < 0) ? 0 : m - max_gap;
  (*down) = (m + max_gap > n) ? n : m + max_gap;
  return (0);
}


x86 assembly (clang, -O0):
<i_limits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x1c(%rbp),%eax
cmp    $0x0,%eax
jge    112f <i_limits+0x2f>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    1138 <i_limits+0x38>
mov    -0x8(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jbe    115b <i_limits+0x5b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1164 <i_limits+0x64>
mov    -0x8(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_limits>:
xor    %r9d,%r9d
mov    %esi,%eax
sub    %r8d,%eax
cmovs  %r9d,%eax
add    %esi,%r8d
cmp    %edi,%r8d
cmova  %edi,%r8d
mov    %eax,(%rdx)
mov    %r8d,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @i_limits(i32 %0, i32 %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32, i32* %7
%12 = load i32, i32* %10
%13 = sub nsw i32 %11, %12
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %5
br label %20
16: ; preds = %5
%17 = load i32, i32* %7
%18 = load i32, i32* %10
%19 = sub i32 %17, %18
br label %20
20: ; preds = %16, %15
%21 = phi i32 [ 0, %15 ], [ %19, %16 ]
%22 = load i32*, i32** %8
store i32 %21, i32* %22
%23 = load i32, i32* %7
%24 = load i32, i32* %10
%25 = add i32 %23, %24
%26 = load i32, i32* %6
%27 = icmp ugt i32 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %20
%29 = load i32, i32* %6
br label %34
30: ; preds = %20
%31 = load i32, i32* %7
%32 = load i32, i32* %10
%33 = add i32 %31, %32
br label %34
34: ; preds = %30, %28
%35 = phi i32 [ %29, %28 ], [ %33, %30 ]
%36 = load i32*, i32** %9
store i32 %35, i32* %36
ret i32 0
}

LLVM IR (-O2):
define i32 @i_limits(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32 %4) {
%6 = sub i32 %1, %4
%7 = icmp sgt i32 %6, 0
%8 = select i1 %7, i32 %6, i32 0
store i32 %8, i32* %2
%9 = add i32 %4, %1
%10 = icmp ugt i32 %9, %0
%11 = select i1 %10, i32 %0, i32 %9
store i32 %11, i32* %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void exit_fun2(void) { printf("I am in exit_fun2\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"I am in exit_fun2\00"
define void @exit_fun2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ccc(char *);
void bbb(char *x) { ccc(x); }


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

x86 assembly (clang, -O2):
<bbb>:
jmp    1030 <ccc@plt>

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

LLVM IR (-O2):
define void @bbb(i8* %0) {
%2 = tail call i32 @ccc(i8* %0)
ret void
}
unsigned long UARTModemStatusGet(unsigned long ulBase) {
  ;
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000018))) &
          (0x00000100 | 0x00000004 | 0x00000001 | 0x00000002));
}


x86 assembly (clang, -O0):
<UARTModemStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x107,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemStatusGet>:
mov    0x18(%rdi),%rax
and    $0x107,%eax
ret

LLVM IR (-O0):
define i64 @UARTModemStatusGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 24
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 263
ret i64 %7
}

LLVM IR (-O2):
define i64 @UARTModemStatusGet(i64 %0) {
%2 = add i64 %0, 24
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 263
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_stc2l(int, int, void *);
void stc2l(void *i) { __builtin_arm_stc2l(1, 2, i); }


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

x86 assembly (clang, -O2):
<stc2l>:
mov    %rdi,%rdx
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <__builtin_arm_stc2l@plt>

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

LLVM IR (-O2):
define void @stc2l(i8* %0) {
%2 = tail call i32 @__builtin_arm_stc2l(i32 1, i32 2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int **);
int main(int argc, char *argv[]) {
  int a0[2] = {0, 1};
  int a1[2] = {2, 3};
  int *a[2] = {a0, a1};
  g(a);
#pragma omp taskwait
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <g@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x100000000,%rax
mov    %rax,0x8(%rsp)
movabs $0x300000002,%rax
mov    %rax,(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    %rsp,%rax
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <g@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a0 = [2 x i32] [i32 0, i32 1]
@__const.main.a1 = [2 x i32] [i32 2, i32 3]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca [2 x i32]
%8 = alloca [2 x i32*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [2 x i32]* %6 to i8*
%10 = bitcast [2 x i32]* %7 to i8*
%11 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 0
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32* %12, i32** %11
%13 = getelementptr inbounds i32*, i32** %11, i64 1
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32* %14, i32** %13
%15 = getelementptr inbounds [2 x i32*], [2 x i32*]* %8, i64 0, i64 0
%16 = call i32 @g(i32** %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca [2 x i32*]
%6 = bitcast i64* %3 to i8*
store i64 4294967296, i64* %3
%7 = bitcast i64* %4 to i8*
store i64 12884901890, i64* %4
%8 = bitcast [2 x i32*]* %5 to i8*
%9 = getelementptr inbounds [2 x i32*], [2 x i32*]* %5, i64 0, i64 0
%10 = bitcast [2 x i32*]* %5 to i64**
store i64* %3, i64** %10
%11 = getelementptr inbounds [2 x i32*], [2 x i32*]* %5, i64 0, i64 1
%12 = bitcast i32** %11 to i64**
store i64* %4, i64** %12
%13 = call i32 @g(i32** %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("tamanho de um inteiro: %d\n", (int)sizeof(int));
  if ((int)sizeof(int) > -1)
    printf("4 é maior que -1");
  else
    printf("-1 é maior que 4");
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"tamanho de um inteiro: %d\0A\00"
@.str.1 = [18 x i8] c"4 \C3\A9 maior que -1\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"tamanho de um inteiro: %d\0A\00"
@.str.1 = [18 x i8] c"4 \C3\A9 maior que -1\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void DisplayUsage(void) {
  {
    fprintf(stderr, "%s\n",
            "usage: ll2xy [-v] mppfile <ll.txt >llxy.txt\n"
            "\n"
            " input : mppfile - grid parameters definition file\n"
            "         ll.txt - (from stdin) ascii text containing lat and lon "
            "values\n"
            "\n"
            " output: llxy.txt - (to stdout) ascii text containing lat, lon, "
            "x, y, and\n"
            "                    status values\n"
            "\n"
            " options:v - verbose\n"
            "\n");
    exit(EXIT_FAILURE);
  };
}


x86 assembly (clang, -O0):
<DisplayUsage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xec9(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<DisplayUsage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecc(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [301 x i8] c"usage: ll2xy [-v] mppfile <ll.txt >llxy.txt\0A\0A input : mppfile - grid parameters definition file\0A ll.txt - (from stdin) ascii text containing lat and lon values\0A\0A output: llxy.txt - (to stdout) ascii text containing lat, lon, x, y, and\0A status values\0A\0A options:v - verbose\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @DisplayUsage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([301 x i8], [301 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [301 x i8] c"usage: ll2xy [-v] mppfile <ll.txt >llxy.txt\0A\0A input : mppfile - grid parameters definition file\0A ll.txt - (from stdin) ascii text containing lat and lon values\0A\0A output: llxy.txt - (to stdout) ascii text containing lat, lon, x, y, and\0A status values\0A\0A options:v - verbose\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @DisplayUsage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([301 x i8], [301 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int iabs(int a) { return (a >= 0) ? a : -a; }


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

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

LLVM IR (-O0):
define i32 @iabs(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 @iabs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
unsigned shiftb(unsigned a, unsigned b) { return b >> a; }


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

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

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

LLVM IR (-O2):
define i32 @shiftb(i32 %0, i32 %1) {
%3 = lshr i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ writev_test(char *);
int main(void) {
  writev_test("/cluster2/test/newfile");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"/cluster2/test/newfile\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @writev_test(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"/cluster2/test/newfile\00"
define i32 @main() {
%1 = tail call i32 @writev_test(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void initialize_random_generator(unsigned int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<initialize_random_generator>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @initialize_random_generator(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ executeSQLCommand(int /*<<< orphan*/ *, char *);
char *sqlite3_mprintf(char *, char *, char *);
void changePassword(sqlite3 *db, char *username, char *password) {
  char *sql = sqlite3_mprintf(
      "Update Database set Password = '%q' where Username = '%q';", password,
      username);
  executeSQLCommand(db, sql);
}


x86 assembly (clang, -O0):
<changePassword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <executeSQLCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changePassword>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1040 <sqlite3_mprintf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <executeSQLCommand@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Update Database set Password = '%q' where Username = '%q';\00"
define void @changePassword(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = load i8*, i8** %5
%10 = call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
store i8* %10, i8** %7
%11 = load i32*, i32** %4
%12 = load i8*, i8** %7
%13 = call i32 @executeSQLCommand(i32* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Update Database set Password = '%q' where Username = '%q';\00"
define void @changePassword(i32* %0, i8* %1, i8* %2) {
%4 = tail call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %1)
%5 = tail call i32 @executeSQLCommand(i32* %0, i8* %4)
ret void
}
double gsl_min(double a, double b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<gsl_min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <gsl_min+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <gsl_min+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsl_min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @gsl_min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @gsl_min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}