xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _vWrite(char const);
signed int write(unsigned int fd, const char *buf, int count) {
  signed int bytes = 0;
  if (fd == 1) {
    while (count) {
      _vWrite(buf[bytes]);
      bytes++;
      count--;
    }
  }
  return bytes;
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    116f <write+0x5f>
jmp    1138 <write+0x28>
cmpl   $0x0,-0x14(%rbp)
je     116a <write+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <_vWrite@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1138 <write+0x28>
jmp    116f <write+0x5f>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
cmp    $0x1,%edi
jne    1143 <write+0x33>
test   %edx,%edx
je     1143 <write+0x33>
mov    %rsi,%r14
mov    %edx,%r15d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <_vWrite@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <write+0x20>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = icmp eq i32 %0, 1
%5 = icmp ne i32 %2, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %18
7: ; preds = %3, %7
%8 = phi i64 [ %13, %7 ], [ 0, %3 ]
%9 = phi i32 [ %14, %7 ], [ %2, %3 ]
%10 = getelementptr inbounds i8, i8* %1, i64 %8
%11 = load i8, i8* %10
%12 = tail call i32 @_vWrite(i8 signext %11)
%13 = add nuw nsw i64 %8, 1
%14 = add nsw i32 %9, -1
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7
%17 = trunc i64 %13 to i32
br label %18
18: ; preds = %16, %3
%19 = phi i32 [ 0, %3 ], [ %17, %16 ]
ret i32 %19
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t *generate_arm_cmd_ldrb_r_r_offs(uint32_t *cmdbuffer, int dstreg,
                                         int basereg, int offset) {
  *cmdbuffer++ = 0xE5D00000 | (basereg << 16) | (dstreg << 12) | (offset);
  return cmdbuffer;
}


x86 assembly (clang, -O0):
<generate_arm_cmd_ldrb_r_r_offs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
or     $0xe5d00000,%ecx
mov    -0xc(%rbp),%eax
shl    $0xc,%eax
or     %eax,%ecx
or     -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_arm_cmd_ldrb_r_r_offs>:
shl    $0x10,%edx
shl    $0xc,%esi
or     %edx,%esi
or     %ecx,%esi
or     $0xe5d00000,%esi
mov    %esi,(%rdi)
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @generate_arm_cmd_ldrb_r_r_offs(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* %7
%10 = shl i32 %9, 16
%11 = or i32 -439353344, %10
%12 = load i32, i32* %6
%13 = shl i32 %12, 12
%14 = or i32 %11, %13
%15 = load i32, i32* %8
%16 = or i32 %14, %15
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %5
store i32 %16, i32* %17
%19 = load i32*, i32** %5
ret i32* %19
}

LLVM IR (-O2):
define i32* @generate_arm_cmd_ldrb_r_r_offs(i32* writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %2, 16
%6 = shl i32 %1, 12
%7 = or i32 %6, %5
%8 = or i32 %7, %3
%9 = or i32 %8, -439353344
%10 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %9, i32* %0
ret i32* %10
}
/* Type definitions */
struct timespec {
  double tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double what_time_is_it_now() {
  struct timespec now;
  clock_gettime(CLOCK_REALTIME, &now);
  return now.tv_sec + now.tv_nsec * 1e-9;
}


x86 assembly (clang, -O0):
<what_time_is_it_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<what_time_is_it_now>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xecb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
@CLOCK_REALTIME = global i32 0
define double @what_time_is_it_now() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 1.000000e-09, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
@CLOCK_REALTIME = global i32 0
define double @what_time_is_it_now() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void CloseFieldSet(void) { printf("</table></fieldset>\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"</table></fieldset>\0A\00"
define void @CloseFieldSet() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"</table></fieldset>\00"
define void @CloseFieldSet() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getDate(int *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int day, month, year;
  getDate(&day, &month, &year);
  printf("Day = %d\n", day);
  printf("Month = %d\n", month);
  printf("Year = %d\n", year);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <getDate@plt>
mov    0x14(%rsp),%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Day = %d\0A\00"
@.str.1 = [12 x i8] c"Month = %d\0A\00"
@.str.2 = [11 x i8] c"Year = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @getDate(i32* %6, i32* %7, i32* %8)
%10 = load i32, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %7
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Day = %d\0A\00"
@.str.1 = [12 x i8] c"Month = %d\0A\00"
@.str.2 = [11 x i8] c"Year = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @getDate(i32* %3, i32* %4, i32* %5)
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Variables and functions */
double errorSum(double, double);
double *uncertainSub(double A, double errorA, double B, double errorB) {
  static double retorno[2];
  retorno[0] = A - B;
  retorno[1] = errorSum(errorA, errorB);
  return retorno;
}


x86 assembly (clang, -O0):
<uncertainSub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,0x2f02(%rip)
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <errorSum@plt>
movsd  %xmm0,0x2ef3(%rip)
lea    0x2ee4(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uncertainSub>:
push   %rbx
subsd  %xmm2,%xmm0
movsd  %xmm0,0x2f23(%rip)
lea    0x2f1c(%rip),%rbx
movaps %xmm1,%xmm0
movaps %xmm3,%xmm1
call   1030 <errorSum@plt>
movsd  %xmm0,0x2f11(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@uncertainSub.retorno = internal global [2 x double] zeroinitializer
define double* @uncertainSub(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fsub double %9, %10
store double %11, double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 0)
%12 = load double, double* %6
%13 = load double, double* %8
%14 = call double @errorSum(double %12, double %13)
store double %14, double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 1)
ret double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 0)
}

LLVM IR (-O2):
@uncertainSub.retorno = internal global [2 x double] zeroinitializer
define double* @uncertainSub(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
store double %5, double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 0)
%6 = tail call double @errorSum(double %1, double %3)
store double %6, double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 1)
ret double* getelementptr inbounds ([2 x double], [2 x double]* @uncertainSub.retorno, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Test();
int /*<<< orphan*/ printf(char *);
int main() {
  Test();
  printf("\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Test()
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
void AUTHORITY_KEYID_free(void) {}


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

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

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

LLVM IR (-O2):
define void @AUTHORITY_KEYID_free() {
ret void
}
/* Variables and functions */
int bitadd(int, int);
int bitsub(int a, int b) { return bitadd(a, (bitadd(~(b), 1))); }


x86 assembly (clang, -O0):
<bitsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
xor    $0xffffffff,%edi
mov    $0x1,%esi
call   1030 <bitadd@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <bitadd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitsub>:
push   %rbx
mov    %edi,%ebx
not    %esi
mov    %esi,%edi
mov    $0x1,%esi
call   1030 <bitadd@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <bitadd@plt>

LLVM IR (-O0):
define i32 @bitsub(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 = xor i32 %6, -1
%8 = call i32 @bitadd(i32 %7, i32 1)
%9 = call i32 @bitadd(i32 %5, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @bitsub(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = tail call i32 @bitadd(i32 %3, i32 1)
%5 = tail call i32 @bitadd(i32 %0, i32 %4)
ret i32 %5
}
void RTTermDeregisterCallback(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTermDeregisterCallback() {
ret void
}
void htable_test(void) {}


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

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

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

LLVM IR (-O2):
define void @htable_test() {
ret void
}
unsigned char PLY_GiveHealth(unsigned char ucHealth) { return 0; }


x86 assembly (clang, -O0):
<PLY_GiveHealth>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @PLY_GiveHealth(i8 zeroext %0) {
ret i8 0
}
/* Variables and functions */
long double fmax(long double, long double);
long double fmaxl(long double a1, long double a2) { return fmax(a1, a2); }


x86 assembly (clang, -O0):
<fmaxl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fmax@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxl>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <fmaxl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @fmaxl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @fmax(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @fmaxl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ REG_UART_BASE(scalar_t__);
__attribute__((always_)) __attribute__((flatten)) uint32_t
UART_CONF0(uint32_t i) {
  return (REG_UART_BASE(i) + 0x20);
}


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

x86 assembly (clang, -O2):
<UART_CONF0>:
push   %rax
call   1030 <REG_UART_BASE@plt>
add    $0x20,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @UART_CONF0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @REG_UART_BASE(i64 %3)
%5 = add nsw i64 %4, 32
ret i64 %5
}

LLVM IR (-O2):
define i64 @UART_CONF0(i64 %0) {
%2 = tail call i64 @REG_UART_BASE(i64 %0)
%3 = add nsw i64 %2, 32
ret i64 %3
}
int fileget(int stream) { return -1; }


x86 assembly (clang, -O0):
<fileget>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fileget(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int SIGPIPE;
int /*<<< orphan*/ exit(int);
void broken_pipe(int sig) {
  if (sig == SIGPIPE)
    exit(3);
}


x86 assembly (clang, -O0):
<broken_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    1137 <broken_pipe+0x27>
mov    $0x3,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<broken_pipe>:
push   %rax
mov    0x2ec8(%rip),%rax
cmp    %edi,(%rax)
je     111e <broken_pipe+0xe>
pop    %rax
ret
mov    $0x3,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
define void @broken_pipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGPIPE
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @exit(i32 3)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
define void @broken_pipe(i32 %0) {
%2 = load i32, i32* @SIGPIPE
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 3)
unreachable
6: ; preds = %1
ret void
}
int test_imm_1Eint64_midword_reg(long long val) {
  return ((val >> 16) & (0x1E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Eint64_midword_reg(i64 %0) {
%2 = and i64 %0, 1966080
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ cl_program;
typedef int /*<<< orphan*/ cl_int;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clReleaseProgram(cl_program program) {
  unsigned int sys_args[1];
  sys_args[0] = (unsigned int)program;
  return (cl_int)syscall(325, 1031, sys_args);
}


x86 assembly (clang, -O0):
<clReleaseProgram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdx
mov    $0x145,%edi
mov    $0x407,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clReleaseProgram>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x145,%edi
mov    $0x407,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clReleaseProgram(i64 %0) {
%2 = alloca i64
%3 = alloca [1 x i32]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%8 = call i32 @syscall(i32 325, i32 1031, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @clReleaseProgram(i64 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = trunc i64 %0 to i32
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 %4, i32* %5
%6 = call i32 @syscall(i32 325, i32 1031, i32* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr,
                "usage: locate.code common_bigrams < list > squozen_list\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"usage: locate.code common_bigrams < list > squozen_list\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"usage: locate.code common_bigrams < list > squozen_list\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
void *array_remove(struct array *, int /*<<< orphan*/);
void *queue_pop(struct array *q) { return array_remove(q, 0); }


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

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

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

LLVM IR (-O2):
%struct.array = type { i32 }
define i8* @queue_pop(%struct.array* %0) {
%2 = tail call i8* @array_remove(%struct.array* %0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int uint16_t;
struct p4_action_parameter {
  int dummy;
};

/* Variables and functions */
struct p4_action_parameter *unpack_p4_action_parameter(char *buffer,
                                                       uint16_t offset) {
  return (struct p4_action_parameter *)(buffer + offset);
}


x86 assembly (clang, -O0):
<unpack_p4_action_parameter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_p4_action_parameter>:
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
%struct.p4_action_parameter = type { i32 }
define %struct.p4_action_parameter* @unpack_p4_action_parameter(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = bitcast i8* %8 to %struct.p4_action_parameter*
ret %struct.p4_action_parameter* %9
}

LLVM IR (-O2):
%struct.p4_action_parameter = type { i32 }
define %struct.p4_action_parameter* @unpack_p4_action_parameter(i8* readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to %struct.p4_action_parameter*
ret %struct.p4_action_parameter* %5
}
/* Variables and functions */
bool nrf51_errata_15(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_15() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Sys_Exit(int /*<<< orphan*/);
void Sys_Quit(void) { Sys_Exit(0); }


x86 assembly (clang, -O0):
<Sys_Quit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Sys_Exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_Quit>:
xor    %edi,%edi
jmp    1030 <Sys_Exit@plt>

LLVM IR (-O0):
define void @Sys_Quit() {
%1 = call i32 @Sys_Exit(i32 0)
ret void
}

LLVM IR (-O2):
define void @Sys_Quit() {
%1 = tail call i32 @Sys_Exit(i32 0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello, World!\n");
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
char __readUARTChar();
int /*<<< orphan*/ __writeString(char *);
int /*<<< orphan*/ __writeUARTChar(char);
void EchoTest() {
  char c = 0;
  __writeString("Press '.' to finish\n");
  do {
    c = __readUARTChar();
    __writeUARTChar(c);
  } while (c != '.');
}


x86 assembly (clang, -O0):
<EchoTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <__writeString@plt>
mov    $0x0,%al
call   1040 <__readUARTChar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1050 <__writeUARTChar@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
jne    1148 <EchoTest+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EchoTest>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <__writeString@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <__readUARTChar@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1050 <__writeUARTChar@plt>
cmp    $0x2e,%bl
jne    1140 <EchoTest+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Press '.' to finish\0A\00"
define void @EchoTest() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 @__writeString(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %7, %0
%4 = call signext i8 (...) @__readUARTChar()
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = call i32 @__writeUARTChar(i8 signext %5)
br label %7
7: ; preds = %3
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 46
br i1 %10, label %3, label %11
11: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Press '.' to finish\0A\00"
define void @EchoTest() {
%1 = tail call i32 @__writeString(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @__readUARTChar()
%4 = tail call i32 @__writeUARTChar(i8 signext %3)
%5 = icmp eq i8 %3, 46
br i1 %5, label %6, label %2
6: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ ximo(int);
int main() {
  int x;
  printf("cuanto gay es ximo?");
  scanf("%d", &x);
  ximo(x);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <ximo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"cuanto gay es ximo?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @ximo(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"cuanto gay es ximo?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @ximo(i32 %5)
ret i32 0
}
/* Variables and functions */
int xs2qsp();
int xs2qsp_() { return xs2qsp(); }


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

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

LLVM IR (-O0):
define i32 @xs2qsp_() {
%1 = call i32 (...) @xs2qsp()
ret i32 %1
}

LLVM IR (-O2):
define i32 @xs2qsp_() {
%1 = tail call i32 (...) @xs2qsp()
ret i32 %1
}
/* Variables and functions */
int dup2(int, int);
int /*<<< orphan*/ xerror(char *);
void xdup2(int oldfd, int newfd) {
  if (dup2(oldfd, newfd) != newfd)
    xerror("dup2");
}


x86 assembly (clang, -O0):
<xdup2>:
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 <dup2@plt>
cmp    -0x8(%rbp),%eax
je     114e <xdup2+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <xerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdup2>:
push   %rbx
mov    %esi,%ebx
call   1030 <dup2@plt>
cmp    %ebx,%eax
jne    112e <xdup2+0xe>
pop    %rbx
ret
lea    0xecb(%rip),%rdi
pop    %rbx
jmp    1040 <xerror@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"dup2\00"
define void @xdup2(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 @dup2(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @xerror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"dup2\00"
define void @xdup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp eq i32 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @xerror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *cmd) { printf("%s  child_script parent_script\n", cmd); }


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

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

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

LLVM IR (-O2):
@.str = [32 x i8] c"%s child_script parent_script\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int ft_isalpha(int c) {
  if (c <= 'z' && c >= 'a')
    return (1);
  else if (c <= 'Z' && c >= 'A')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_isalpha+0x27>
cmpl   $0x61,-0x8(%rbp)
jl     1127 <ft_isalpha+0x27>
movl   $0x1,-0x4(%rbp)
jmp    114e <ft_isalpha+0x4e>
cmpl   $0x5a,-0x8(%rbp)
jg     1147 <ft_isalpha+0x47>
cmpl   $0x41,-0x8(%rbp)
jl     1147 <ft_isalpha+0x47>
movl   $0x1,-0x4(%rbp)
jmp    114e <ft_isalpha+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 122
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %18
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 90
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %2
br label %18
17: ; preds = %13, %10
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void picosat_add_ado_lit(int external_lit) {
  (void)external_lit;
  do {
    fputs("*** picosat: "
          "compiled without all different constraint support"
          "\n",
          stderr);
    abort();
  } while (0);
}


x86 assembly (clang, -O0):
<picosat_add_ado_lit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<picosat_add_ado_lit>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"*** picosat: compiled without all different constraint support\0A\00"
@stderr = global i32 0
define void @picosat_add_ado_lit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
br label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @abort()
unreachable
8: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"*** picosat: compiled without all different constraint support\0A\00"
@stderr = global i32 0
define void @picosat_add_ado_lit(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @abort()
unreachable
}
void ide_activate() {
  register unsigned long p, x;
  *((volatile unsigned long *)0xa05f74e4) = 0x1fffff;
  for (p = 0; p < 0x200000 / 4; p++)
    x = ((volatile unsigned long *)0xa0000000)[p];
}


x86 assembly (clang, -O0):
<ide_activate>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa05f74e4,%eax
movq   $0x1fffff,(%rax)
movq   $0x0,-0x8(%rbp)
cmpq   $0x80000,-0x8(%rbp)
jae    1148 <ide_activate+0x48>
mov    -0x8(%rbp),%rcx
mov    $0xa0000000,%eax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <ide_activate+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ide_activate>:
mov    $0xa0000038,%eax
movq   $0x1fffff,0x5f74ac(%rax)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x38(%rax,%rcx,8),%rdx
mov    -0x30(%rax,%rcx,8),%rdx
mov    -0x28(%rax,%rcx,8),%rdx
mov    -0x20(%rax,%rcx,8),%rdx
mov    -0x18(%rax,%rcx,8),%rdx
mov    -0x10(%rax,%rcx,8),%rdx
mov    -0x8(%rax,%rcx,8),%rdx
mov    (%rax,%rcx,8),%rdx
add    $0x8,%rcx
cmp    $0x80000,%rcx
jne    1120 <ide_activate+0x20>
ret

LLVM IR (-O0):
define void @ide_activate() {
%1 = alloca i64
%2 = alloca i64
store volatile i64 2097151, i64* inttoptr (i64 2690610404 to i64*)
store i64 0, i64* %1
br label %3
3: ; preds = %10, %0
%4 = load i64, i64* %1
%5 = icmp ult i64 %4, 524288
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i64, i64* %1
%8 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %7
%9 = load volatile i64, i64* %8
store i64 %9, i64* %2
br label %10
10: ; preds = %6
%11 = load i64, i64* %1
%12 = add i64 %11, 1
store i64 %12, i64* %1
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ide_activate() {
store volatile i64 2097151, i64* inttoptr (i64 2690610404 to i64*)
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %26, %1 ]
%3 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %2
%4 = load volatile i64, i64* %3
%5 = or i64 %2, 1
%6 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %5
%7 = load volatile i64, i64* %6
%8 = or i64 %2, 2
%9 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %8
%10 = load volatile i64, i64* %9
%11 = or i64 %2, 3
%12 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %11
%13 = load volatile i64, i64* %12
%14 = or i64 %2, 4
%15 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %14
%16 = load volatile i64, i64* %15
%17 = or i64 %2, 5
%18 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %17
%19 = load volatile i64, i64* %18
%20 = or i64 %2, 6
%21 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %20
%22 = load volatile i64, i64* %21
%23 = or i64 %2, 7
%24 = getelementptr inbounds i64, i64* inttoptr (i64 2684354560 to i64*), i64 %23
%25 = load volatile i64, i64* %24
%26 = add nuw nsw i64 %2, 8
%27 = icmp eq i64 %26, 524288
br i1 %27, label %28, label %1
28: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alloc_may_be_big2_Silenced(int);
void call_to_alloc_may_be_big2_is_big_Bad() {
  alloc_may_be_big2_Silenced(100 * 1000 * 1000);
}


x86 assembly (clang, -O0):
<call_to_alloc_may_be_big2_is_big_Bad>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5f5e100,%edi
call   1030 <alloc_may_be_big2_Silenced@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_to_alloc_may_be_big2_is_big_Bad>:
mov    $0x5f5e100,%edi
jmp    1030 <alloc_may_be_big2_Silenced@plt>

LLVM IR (-O0):
define void @call_to_alloc_may_be_big2_is_big_Bad() {
%1 = call i32 @alloc_may_be_big2_Silenced(i32 100000000)
ret void
}

LLVM IR (-O2):
define void @call_to_alloc_may_be_big2_is_big_Bad() {
%1 = tail call i32 @alloc_may_be_big2_Silenced(i32 100000000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ codeln(char *);
int /*<<< orphan*/ commentln(char *);
int /*<<< orphan*/ popIndent();
int /*<<< orphan*/ pushIndent();
int /*<<< orphan*/ vspace(int);
void legacySwell() {
  vspace(3);
  commentln("Legacy function");
  codeln("void setSwell (double d) {");
  pushIndent();
  popIndent();
  codeln("}");
}


x86 assembly (clang, -O0):
<legacySwell>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1060 <vspace@plt>
lea    0xe9b(%rip),%rdi
call   1050 <commentln@plt>
lea    0xe9f(%rip),%rdi
call   1040 <codeln@plt>
mov    $0x0,%al
call   1030 <pushIndent@plt>
mov    $0x0,%al
call   1070 <popIndent@plt>
lea    0xea0(%rip),%rdi
call   1040 <codeln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<legacySwell>:
push   %rax
mov    $0x3,%edi
call   1060 <vspace@plt>
lea    0xe9e(%rip),%rdi
call   1050 <commentln@plt>
lea    0xea2(%rip),%rdi
call   1040 <codeln@plt>
xor    %eax,%eax
call   1030 <pushIndent@plt>
xor    %eax,%eax
call   1070 <popIndent@plt>
lea    0xea3(%rip),%rdi
pop    %rax
jmp    1040 <codeln@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Legacy function\00"
@.str.1 = [27 x i8] c"void setSwell (double d) {\00"
@.str.2 = [2 x i8] c"}\00"
define void @legacySwell() {
%1 = call i32 @vspace(i32 3)
%2 = call i32 @commentln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @codeln(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @pushIndent()
%5 = call i32 (...) @popIndent()
%6 = call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Legacy function\00"
@.str.1 = [27 x i8] c"void setSwell (double d) {\00"
@.str.2 = [2 x i8] c"}\00"
define void @legacySwell() {
%1 = tail call i32 @vspace(i32 3)
%2 = tail call i32 @commentln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @codeln(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @pushIndent()
%5 = tail call i32 (...) @popIndent()
%6 = tail call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void nseel_asm_assign_fast_fromfp(void) {
  __asm__("movl %edi, %eax\n"
          "fstpl (%edi)\n");
}


x86 assembly (clang, -O0):
<nseel_asm_assign_fast_fromfp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%eax
fstpl  (%edi)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_assign_fast_fromfp>:
mov    %edi,%eax
fstpl  (%edi)
ret

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

LLVM IR (-O2):
define void @nseel_asm_assign_fast_fromfp() {
tail call void asm sideeffect "movl %edi, %eax\0Afstpl (%edi)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x87() {
  Assert_real((isspace(135) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              680, ("isspace should be 0 for 0x87"));
}


x86 assembly (clang, -O0):
<t_isspace_0x87>:
push   %rbp
mov    %rsp,%rbp
mov    $0x87,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2a8,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x87>:
push   %rax
mov    $0x87,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a8,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x87\00"
define void @t_isspace_0x87() {
%1 = call i64 @isspace(i32 135)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 680, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x87\00"
define void @t_isspace_0x87() {
%1 = tail call i64 @isspace(i32 135)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 680, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ sys_puts(char *);
int main(void) {
  char *kernel = (char *)0xFFFFFFF800000000;
  char buffer[10];
  sys_puts("before read\n");
  memcpy(buffer, kernel, sizeof(buffer));
  sys_puts("after read");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0xfffffff800000000,%rax
ff ff ff
mov    %rax,-0x10(%rbp)
lea    0xebc(%rip),%rdi
call   1040 <sys_puts@plt>
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1030 <memcpy@plt>
lea    0xeab(%rip),%rdi
call   1040 <sys_puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
call   1040 <sys_puts@plt>
lea    0xe(%rsp),%rdi
movabs $0xfffffff800000000,%rsi
ff ff ff
mov    $0xa,%edx
call   1030 <memcpy@plt>
lea    0xebd(%rip),%rdi
call   1040 <sys_puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"before read\0A\00"
@.str.1 = [11 x i8] c"after read\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [10 x i8]
store i32 0, i32* %1
store i8* inttoptr (i64 -34359738368 to i8*), i8** %2
%4 = call i32 @sys_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 10)
%8 = call i32 @sys_puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"before read\0A\00"
@.str.1 = [11 x i8] c"after read\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @sys_puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @memcpy(i8* %2, i8* inttoptr (i64 -34359738368 to i8*), i32 10)
%5 = call i32 @sys_puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}