xunge/DecIR huggingface dataset:
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *realloc(void *ptr, size_t size) {
  void *p = malloc(size);
  if (ptr)
    memcpy(p, ptr, size);
  return p;
}


x86 assembly (clang, -O0):
<realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1159 <realloc+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %r15,%r15
je     1149 <realloc+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @realloc(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int f0(volatile int *a) {
  int b = a[0];
  int c = a[1];
  int d = a[2];
  int e = a[3];
  return b + c + d + e;
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
mov    (%rdi),%eax
add    0x4(%rdi),%eax
add    0x8(%rdi),%eax
add    0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f0(i32* %0) {
%2 = load volatile i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load volatile i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load volatile i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load volatile i32, i32* %7
%9 = add nsw i32 %4, %2
%10 = add nsw i32 %9, %6
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef size_t uint16_t;

/* Variables and functions */
void mem_write8(uint8_t *mem, uint16_t addr, uint8_t value) {
  mem[addr] = value;
}


x86 assembly (clang, -O0):
<mem_write8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_write8>:
mov    %edx,(%rdi,%rsi,4)
ret

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

LLVM IR (-O2):
define void @mem_write8(i32* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 %2, i32* %4
ret void
}
/* Variables and functions */
unsigned int mcfioC_InfoNumStream(int *, unsigned int);
unsigned int mcfio_infonumstream_(int *istreams, int *nmax) {
  return mcfioC_InfoNumStream(istreams, (unsigned int)*nmax);
}


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

x86 assembly (clang, -O2):
<mcfio_infonumstream_>:
mov    (%rsi),%esi
jmp    1030 <mcfioC_InfoNumStream@plt>

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

LLVM IR (-O2):
define i32 @mcfio_infonumstream_(i32* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @mcfioC_InfoNumStream(i32* %0, i32 %3)
ret i32 %4
}
double convert_to_fahrenheit(double degrees) { return degrees * 9 / 5 + 32; }


x86 assembly (clang, -O0):
<convert_to_fahrenheit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeff(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_to_fahrenheit>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @convert_to_fahrenheit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 9.000000e+00
%5 = fdiv double %4, 5.000000e+00
%6 = fadd double %5, 3.200000e+01
ret double %6
}

LLVM IR (-O2):
define double @convert_to_fahrenheit(double %0) {
%2 = fmul double %0, 9.000000e+00
%3 = fdiv double %2, 5.000000e+00
%4 = fadd double %3, 3.200000e+01
ret double %4
}
int iso_week_days(int yday, int wday) {
  int big_enough_multiple_of_7 = (-(-366) / 7 + 2) * 7;
  return (yday - (yday - wday + 4 + big_enough_multiple_of_7) % 7 + 4 - 1);
}


x86 assembly (clang, -O0):
<iso_week_days>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x17a,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x4,%eax
add    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
sub    %edx,%eax
add    $0x4,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_week_days>:
mov    %edi,%eax
sub    %esi,%eax
mov    %eax,%ecx
add    $0x17e,%ecx
movslq %ecx,%rcx
imul   $0xffffffff92492493,%rcx,%rdx
shr    $0x20,%rdx
add    %edx,%eax
add    $0x17e,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %eax,%edx
sub    %ecx,%edx
lea    (%rdi,%rdx,1),%eax
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @iso_week_days(i32 %0, i32 %1) {
%3 = add i32 %0, 382
%4 = sub i32 %3, %1
%5 = srem i32 %4, 7
%6 = add i32 %0, 3
%7 = sub i32 %6, %5
ret i32 %7
}
const char *get_link_direction(int x) {
  switch (x) {
  case 1:
    return "Forward";
  case 2:
    return "Reverse";
  case (1 | 2):
    return "Both ways";
  default:
    return "Unknown";
  }
}


x86 assembly (clang, -O0):
<get_link_direction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     113d <get_link_direction+0x3d>
jmp    111b <get_link_direction+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     114d <get_link_direction+0x4d>
jmp    112c <get_link_direction+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     115d <get_link_direction+0x5d>
jmp    116d <get_link_direction+0x6d>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <get_link_direction+0x78>
lea    0xeb4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <get_link_direction+0x78>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <get_link_direction+0x78>
lea    0xea6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_link_direction>:
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     111a <get_link_direction+0x1a>
movslq %edi,%rax
lea    0xf12(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Forward\00"
@.str.1 = [8 x i8] c"Reverse\00"
@.str.2 = [10 x i8] c"Both ways\00"
@.str.3 = [8 x i8] c"Unknown\00"
define i8* @get_link_direction(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"Forward\00"
@.str.1 = [8 x i8] c"Reverse\00"
@.str.2 = [10 x i8] c"Both ways\00"
@.str.3 = [8 x i8] c"Unknown\00"
@reltable.get_link_direction = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.get_link_direction to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.get_link_direction to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.get_link_direction to i64)) to i32)]
define i8* @get_link_direction(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.get_link_direction to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %9
}
/* Variables and functions */
int foo();
int bar(int x) {
  if (x < 0)
    return foo() + 8;
  else if (x > 0)
    return 2 * foo();
  else
    return foo();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1137 <bar+0x27>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    115d <bar+0x4d>
cmpl   $0x0,-0x8(%rbp)
jle    1153 <bar+0x43>
mov    $0x0,%al
call   1030 <foo@plt>
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115d <bar+0x4d>
mov    $0x0,%al
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbx
test   %edi,%edi
js     1125 <bar+0x15>
setne  %bl
xor    %eax,%eax
call   1030 <foo@plt>
mov    %ebx,%ecx
shl    %cl,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <foo@plt>
add    $0x8,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 (...) @foo()
%8 = add nsw i32 %7, 8
store i32 %8, i32* %2
br label %17
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = call i32 (...) @foo()
%14 = mul nsw i32 2, %13
store i32 %14, i32* %2
br label %17
15: ; preds = %9
%16 = call i32 (...) @foo()
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %12, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @foo()
%5 = add nsw i32 %4, 8
br label %11
6: ; preds = %1
%7 = icmp ne i32 %0, 0
%8 = tail call i32 (...) @foo()
%9 = zext i1 %7 to i32
%10 = shl nsw i32 %8, %9
br label %11
11: ; preds = %6, %3
%12 = phi i32 [ %5, %3 ], [ %10, %6 ]
ret i32 %12
}
/* Type definitions */
struct crk5_obj_stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct crk5_obj_stream *);
void crk5_obj_stream_delete(struct crk5_obj_stream *obj) {
  if (!obj)
    return;
  free(obj);
}


x86 assembly (clang, -O0):
<crk5_obj_stream_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <crk5_obj_stream_delete+0x1c>
jmp    1135 <crk5_obj_stream_delete+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crk5_obj_stream_delete>:
test   %rdi,%rdi
je     111a <crk5_obj_stream_delete+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.crk5_obj_stream = type { i32 }
define void @crk5_obj_stream_delete(%struct.crk5_obj_stream* %0) {
%2 = alloca %struct.crk5_obj_stream*
store %struct.crk5_obj_stream* %0, %struct.crk5_obj_stream** %2
%3 = load %struct.crk5_obj_stream*, %struct.crk5_obj_stream** %2
%4 = icmp ne %struct.crk5_obj_stream* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.crk5_obj_stream*, %struct.crk5_obj_stream** %2
%8 = call i32 @free(%struct.crk5_obj_stream* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.crk5_obj_stream = type { i32 }
define void @crk5_obj_stream_delete(%struct.crk5_obj_stream* %0) {
%2 = icmp eq %struct.crk5_obj_stream* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.crk5_obj_stream* %0)
br label %5
5: ; preds = %1, %3
ret void
}
void resistance(char **band_colors, int n_bands, double *nominal_R,
                double *minimum_R, double *maximum_R) {}


x86 assembly (clang, -O0):
<resistance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @resistance(i8** %0, i32 %1, double* %2, double* %3, double* %4) {
%6 = alloca i8**
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
store i8** %0, i8*** %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
ret void
}

LLVM IR (-O2):
define void @resistance(i8** nocapture %0, i32 %1, double* nocapture %2, double* nocapture %3, double* nocapture %4) {
ret void
}
void reader_loop() {}


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

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

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

LLVM IR (-O2):
define void @reader_loop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void __prfcnt_shut(int msr_fd) { close(msr_fd); }


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

x86 assembly (clang, -O2):
<__prfcnt_shut>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @__prfcnt_shut(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ const INT16_MAX;
scalar_t__ const INT16_MIN;
int32_t __stdfix_sat_r(const int32_t x) {
  if (x > INT16_MAX)
    return (INT16_MAX);
  if (x < INT16_MIN)
    return (INT16_MIN);
  return (x);
}


x86 assembly (clang, -O0):
<__stdfix_sat_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%rax
jle    112f <__stdfix_sat_r+0x2f>
mov    0x2ebd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <__stdfix_sat_r+0x5e>
mov    -0x10(%rbp),%rax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
jge    1156 <__stdfix_sat_r+0x56>
mov    0x2e8e(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <__stdfix_sat_r+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@INT16_MAX = constant i64 0
@INT16_MIN = constant i64 0
define i64 @__stdfix_sat_r(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @INT16_MAX
%6 = icmp sgt i64 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i64, i64* @INT16_MAX
store i64 %8, i64* %2
br label %17
9: ; preds = %1
%10 = load i64, i64* %3
%11 = load i64, i64* @INT16_MIN
%12 = icmp slt i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load i64, i64* @INT16_MIN
store i64 %14, i64* %2
br label %17
15: ; preds = %9
%16 = load i64, i64* %3
store i64 %16, i64* %2
br label %17
17: ; preds = %15, %13, %7
%18 = load i64, i64* %2
ret i64 %18
}

LLVM IR (-O2):
@INT16_MAX = constant i64 0
@INT16_MIN = constant i64 0
define i64 @__stdfix_sat_r(i64 %0) {
ret i64 0
}
void yy_1_TemplateTailPart(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TemplateTailPart(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_SET_BIT(int, int);
void xburst_cgm_gate_aic1() { MIPS_SET_BIT((0xB0000000 + 0x28), 6); }


x86 assembly (clang, -O0):
<xburst_cgm_gate_aic1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0x6,%esi
call   1030 <MIPS_SET_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_gate_aic1>:
mov    $0xb0000028,%edi
mov    $0x6,%esi
jmp    1030 <MIPS_SET_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_gate_aic1() {
%1 = call i32 @MIPS_SET_BIT(i32 -1342177240, i32 6)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_gate_aic1() {
%1 = tail call i32 @MIPS_SET_BIT(i32 -1342177240, i32 6)
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buflist_config_free_signals_refresh();
int /*<<< orphan*/ buflist_config_hook_signals_refresh();
void buflist_config_change_signals_refresh(const void *pointer, void *data,
                                           struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  buflist_config_free_signals_refresh();
  buflist_config_hook_signals_refresh();
}


x86 assembly (clang, -O0):
<buflist_config_change_signals_refresh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <buflist_config_free_signals_refresh@plt>
mov    $0x0,%al
call   1030 <buflist_config_hook_signals_refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @buflist_config_change_signals_refresh(i8* %0, i8* %1, %struct.t_config_option* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.t_config_option* %2, %struct.t_config_option** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = call i32 (...) @buflist_config_free_signals_refresh()
%11 = call i32 (...) @buflist_config_hook_signals_refresh()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @buflist_config_change_signals_refresh(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 (...) @buflist_config_free_signals_refresh()
%5 = tail call i32 (...) @buflist_config_hook_signals_refresh()
ret void
}
/* Variables and functions */
int _lex_bad_char();
bool lex_bad_char(char **name) {
  *name = "lex_bad_char";
  return _lex_bad_char();
}


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

x86 assembly (clang, -O2):
<lex_bad_char>:
lea    0xee9(%rip),%rax
mov    %rax,(%rdi)
xor    %eax,%eax
jmp    1030 <_lex_bad_char@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"lex_bad_char\00"
define i32 @lex_bad_char(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %0
%2 = tail call i32 (...) @_lex_bad_char()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *str_nz_cpy(char *dst, const char *src, int len) {
  strncpy(dst, src, len);
  dst[len] = '\0';
  return dst;
}


x86 assembly (clang, -O0):
<str_nz_cpy>:
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),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_nz_cpy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @str_nz_cpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @str_nz_cpy(i8* returned %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret i8* %0
}
void *baz(void *s, unsigned long c, unsigned int count) {
  int d0, d1;
  __asm__ __volatile__(""
                       : "=&c"(d0), "=&D"(d1)
                       : "a"(c), "q"(count), "0"(count / 4), "1"((long)s)
                       : "memory");
  return s;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%ecx
shr    $0x2,%ecx
mov    -0x8(%rbp),%rdi
mov    %ecx,-0x18(%rbp)
mov    %edi,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
mov    %rsi,%rax
mov    %rdi,%rsi
mov    %edx,%ecx
shr    $0x2,%ecx
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @baz(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %6
%12 = udiv i32 %11, 4
%13 = load i8*, i8** %4
%14 = ptrtoint i8* %13 to i64
%15 = call { i32, i64 } asm sideeffect "", "=&{cx},=&{di},{ax},q,0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %9, i32 %10, i32 %12, i64 %14)
%16 = extractvalue { i32, i64 } %15, 0
%17 = extractvalue { i32, i64 } %15, 1
store i32 %16, i32* %7
%18 = trunc i64 %17 to i32
store i32 %18, i32* %8
%19 = load i8*, i8** %4
ret i8* %19
}

LLVM IR (-O2):
define i8* @baz(i8* returned %0, i64 %1, i32 %2) {
%4 = lshr i32 %2, 2
%5 = ptrtoint i8* %0 to i64
%6 = tail call { i32, i64 } asm sideeffect "", "=&{cx},=&{di},{ax},q,0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %1, i32 %2, i32 %4, i64 %5)
ret i8* %0
}
int tgetent(bp, name)
char *bp;
char *name;
{ return 1; }


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

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

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

LLVM IR (-O2):
define i32 @tgetent(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ GL_TRIANGLES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor4f(double, double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(double, double, double);
void drawRightTriangle(void) {
  glBegin(GL_TRIANGLES);
  glColor4f(0.0, 1.0, 1.0, 0.75);
  glVertex3f(0.9, 0.9, 0.0);
  glVertex3f(0.3, 0.5, 0.0);
  glVertex3f(0.9, 0.1, 0.0);
  glEnd();
}


x86 assembly (clang, -O0):
<drawRightTriangle>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  0xec3(%rip),%xmm2
movsd  0xec3(%rip),%xmm3
movaps %xmm2,%xmm1
call   1030 <glColor4f@plt>
movsd  0xe8b(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
movsd  0xe88(%rip),%xmm0
movsd  0xe88(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movsd  0xe60(%rip),%xmm0
movsd  0xe60(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawRightTriangle>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
movsd  0xea9(%rip),%xmm1
movsd  0xea9(%rip),%xmm3
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
call   1030 <glColor4f@plt>
movsd  0xe9e(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
movsd  0xe93(%rip),%xmm0
movsd  0xe93(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movsd  0xe8b(%rip),%xmm1
xorps  %xmm2,%xmm2
movsd  0xe68(%rip),%xmm0
call   1040 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glEnd@plt>

LLVM IR (-O0):
@GL_TRIANGLES = global i32 0
define void @drawRightTriangle() {
%1 = load i32, i32* @GL_TRIANGLES
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glColor4f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00, double 7.500000e-01)
%4 = call i32 @glVertex3f(double 9.000000e-01, double 9.000000e-01, double 0.000000e+00)
%5 = call i32 @glVertex3f(double 3.000000e-01, double 5.000000e-01, double 0.000000e+00)
%6 = call i32 @glVertex3f(double 9.000000e-01, double 1.000000e-01, double 0.000000e+00)
%7 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_TRIANGLES = global i32 0
define void @drawRightTriangle() {
%1 = load i32, i32* @GL_TRIANGLES
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glColor4f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00, double 7.500000e-01)
%4 = tail call i32 @glVertex3f(double 9.000000e-01, double 9.000000e-01, double 0.000000e+00)
%5 = tail call i32 @glVertex3f(double 3.000000e-01, double 5.000000e-01, double 0.000000e+00)
%6 = tail call i32 @glVertex3f(double 9.000000e-01, double 1.000000e-01, double 0.000000e+00)
%7 = tail call i32 (...) @glEnd()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: mkfile <size>[gmk] <file>\n"
         "(Example sizes, all 50 meg: 52428800, 51200k, 50m)\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [85 x i8] c"Usage: mkfile <size>[gmk] <file>\0A(Example sizes, all 50 meg: 52428800, 51200k, 50m)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [84 x i8] c"Usage: mkfile <size>[gmk] <file>\0A(Example sizes, all 50 meg: 52428800, 51200k, 50m)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ *stdout;
int main(void) {
  FILE *my_stdout = stdout;
  if (fputs("Hello, World!\n", my_stdout) == EOF) {
    printf("Fputs failed\n");
    exit(0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e84(%rip),%rcx
cmp    (%rcx),%rax
jne    1180 <main+0x50>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%rsi
lea    0xebe(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
je     1157 <main+0x27>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32* null
@.str = [15 x i8] c"Hello, World!\0A\00"
@EOF = global i64 0
@.str.1 = [14 x i8] c"Fputs failed\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = load i32*, i32** @stdout
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i64 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32* null
@.str = [15 x i8] c"Hello, World!\0A\00"
@EOF = global i64 0
@str = [13 x i8] c"Fputs failed\00"
define i32 @main() {
%1 = load i32*, i32** @stdout
%2 = tail call i64 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("invalid_address_64\n");
  char *ptr = (char *)0x1111111111111111;
  ptr[0] = 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movabs $0x1111111111111111,%rax
11 11 11
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [19 x i8] c"invalid_address_64\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
store i8 0, i8* inttoptr (i64 1229782938247303441 to i8*)
ret i32 0
}
int installuserfont(char *name) { return 0; }


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

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

LLVM IR (-O0):
define i32 @installuserfont(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @installuserfont(i8* nocapture readnone %0) {
ret i32 0
}
void GPMCMaskAddrSet(unsigned int baseAddr, unsigned int csNum,
                     unsigned int addrMask) {
  (*((volatile unsigned int *)(baseAddr + (0x78 + (csNum * (0x30)))))) &=
      (~(0x00000F00u));
  (*((volatile unsigned int *)(baseAddr + (0x78 + (csNum * (0x30)))))) |=
      ((addrMask << (0x00000008u)) & (0x00000F00u));
}


x86 assembly (clang, -O0):
<GPMCMaskAddrSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x30,-0x8(%rbp),%ecx
add    $0x78,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffff0ff,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edx
shl    $0x8,%edx
and    $0xf00,%edx
mov    -0x4(%rbp),%eax
imul   $0x30,-0x8(%rbp),%ecx
add    $0x78,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCMaskAddrSet>:
lea    (%rsi,%rsi,2),%eax
shl    $0x4,%eax
add    %edi,%eax
add    $0x78,%eax
andl   $0xfffff0ff,(%rax)
and    $0xf,%edx
shl    $0x8,%edx
or     %edx,(%rax)
ret

LLVM IR (-O0):
define void @GPMCMaskAddrSet(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul i32 %8, 48
%10 = add i32 120, %9
%11 = add i32 %7, %10
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = and i32 %14, -3841
store volatile i32 %15, i32* %13
%16 = load i32, i32* %6
%17 = shl i32 %16, 8
%18 = and i32 %17, 3840
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = mul i32 %20, 48
%22 = add i32 120, %21
%23 = add i32 %19, %22
%24 = zext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = load volatile i32, i32* %25
%27 = or i32 %26, %18
store volatile i32 %27, i32* %25
ret void
}

LLVM IR (-O2):
define void @GPMCMaskAddrSet(i32 %0, i32 %1, i32 %2) {
%4 = mul i32 %1, 48
%5 = add i32 %0, 120
%6 = add i32 %5, %4
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -3841
store volatile i32 %10, i32* %8
%11 = shl i32 %2, 8
%12 = and i32 %11, 3840
%13 = load volatile i32, i32* %8
%14 = or i32 %13, %12
store volatile i32 %14, i32* %8
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ bitmap;
};
struct TYPE_4__ {
  TYPE_1__ data;
};
typedef TYPE_2__ XIMStatusDrawCallbackStruct;

/* Variables and functions */
unsigned long get_XIMStatusDrawCallbackStruct_data_bitmap(void *_p) {
  return (unsigned long)((XIMStatusDrawCallbackStruct *)_p)->data.bitmap;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XIMStatusDrawCallbackStruct_data_bitmap(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
void main(int argc, char *argv[]) {
  if (argc != 2) {
    exit(0);
  }
  char buffer[64];
  strcpy(buffer, argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1140 <main+0x20>
xor    %edi,%edi
call   1040 <exit@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
cmp    $0x2,%edi
jne    113a <main+0x1a>
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
add    $0x48,%rsp
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [64 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @strcpy(i8* %11, i8* %14)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca [64 x i8]
%4 = icmp eq i32 %0, 2
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @strcpy(i8* %8, i8* %10)
ret void
}
struct blspec_entry *blspec_entry_default(struct blspec *l) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.blspec_entry = type opaque
%struct.blspec = type opaque
define %struct.blspec_entry* @blspec_entry_default(%struct.blspec* %0) {
%2 = alloca %struct.blspec*
store %struct.blspec* %0, %struct.blspec** %2
ret %struct.blspec_entry* null
}

LLVM IR (-O2):
%struct.blspec_entry = type opaque
%struct.blspec = type opaque
define noalias %struct.blspec_entry* @blspec_entry_default(%struct.blspec* nocapture readnone %0) {
ret %struct.blspec_entry* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_locale_to_utf8() {
  printf("NOT IMPLEMENTED:"
         "pa_locale_to_utf8"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_locale_to_utf8\00"
define i32 @pa_locale_to_utf8() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int deepening(int);
int /*<<< orphan*/ printf(char *, int);
void test_depening() { printf("%d\n", deepening(60)); }


x86 assembly (clang, -O0):
<test_depening>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c,%edi
call   1040 <deepening@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_depening>:
push   %rax
mov    $0x3c,%edi
call   1040 <deepening@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @test_depening() {
%1 = tail call i32 @deepening(i32 60)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void TimerOC3NPolarityConfigure(unsigned long ulBase,
                                unsigned long ulPolarity) {
  unsigned long ulTempccer = 0;

  ;

  ;
  ulTempccer = (*((volatile unsigned long *)(ulBase + 0x00000020)));
  ulTempccer &= ~0x00000800;
  ulTempccer |= (ulPolarity << 8);
  (*((volatile unsigned long *)(ulBase + 0x00000020))) = ulTempccer;
}


x86 assembly (clang, -O0):
<TimerOC3NPolarityConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffff7ff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerOC3NPolarityConfigure>:
mov    $0xfffffffffffff7ff,%rax
and    0x20(%rdi),%rax
shl    $0x8,%rsi
or     %rax,%rsi
mov    %rsi,0x20(%rdi)
ret

LLVM IR (-O0):
define void @TimerOC3NPolarityConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
%6 = load i64, i64* %3
%7 = add i64 %6, 32
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -2049
store i64 %11, i64* %5
%12 = load i64, i64* %4
%13 = shl i64 %12, 8
%14 = load i64, i64* %5
%15 = or i64 %14, %13
store i64 %15, i64* %5
%16 = load i64, i64* %5
%17 = load i64, i64* %3
%18 = add i64 %17, 32
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
ret void
}

LLVM IR (-O2):
define void @TimerOC3NPolarityConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 32
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -2049
%7 = shl i64 %1, 8
%8 = or i64 %6, %7
store volatile i64 %8, i64* %4
ret void
}
void f18_b() {
  int x = 0;
  if (1)
    x = 10;
}


x86 assembly (clang, -O0):
<f18_b>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f18_b() {
%1 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %1
ret void
}

LLVM IR (-O2):
define void @f18_b() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *);
int /*<<< orphan*/ exit(int);
void Fatal(char *msg) {
  Error(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<Fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Fatal>:
push   %rax
call   1030 <Error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Error(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Fatal(i8* %0) {
%2 = tail call i32 @Error(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ e_izpx();
int /*<<< orphan*/ e_ora();
void e_ora_izpx() {
  e_izpx();
  e_ora();
}


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

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

LLVM IR (-O0):
define void @e_ora_izpx() {
%1 = call i32 (...) @e_izpx()
%2 = call i32 (...) @e_ora()
ret void
}

LLVM IR (-O2):
define void @e_ora_izpx() {
%1 = tail call i32 (...) @e_izpx()
%2 = tail call i32 (...) @e_ora()
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ qcount_read(char const *);
int qcount_save(char const *, scalar_t__);
int64_t qcount_update(const char *filepath, int64_t number) {
  int64_t counter = qcount_read(filepath);
  counter += number;
  if (qcount_save(filepath, counter) == true) {
    return counter;
  }
  return 0;
}


x86 assembly (clang, -O0):
<qcount_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <qcount_read@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <qcount_save@plt>
cmp    $0x1,%eax
jne    116c <qcount_update+0x4c>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <qcount_update+0x54>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcount_update>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <qcount_read@plt>
mov    %rax,%rbx
add    %r14,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <qcount_save@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @qcount_update(i8* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = call i64 @qcount_read(i8* %7)
store i64 %8, i64* %6
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = add nsw i64 %10, %9
store i64 %11, i64* %6
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = call i32 @qcount_save(i8* %12, i64 %13)
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = load i64, i64* %6
store i64 %17, i64* %3
br label %19
18: ; preds = %2
store i64 0, i64* %3
br label %19
19: ; preds = %18, %16
%20 = load i64, i64* %3
ret i64 %20
}

LLVM IR (-O2):
define i64 @qcount_update(i8* %0, i64 %1) {
%3 = tail call i64 @qcount_read(i8* %0)
%4 = add nsw i64 %3, %1
%5 = tail call i32 @qcount_save(i8* %0, i64 %4)
%6 = icmp eq i32 %5, 1
%7 = select i1 %6, i64 %4, i64 0
ret i64 %7
}