xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_wall_time() {
  struct timeval time;
  if (gettimeofday(&time, NULL)) {
    return 0;
  }
  return (double)time.tv_sec + (double)time.tv_usec * .000001;
}


x86 assembly (clang, -O0):
<get_wall_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113c <get_wall_time+0x2c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115d <get_wall_time+0x4d>
cvtsi2sdq -0x10(%rbp),%xmm1
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_wall_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
je     112d <get_wall_time+0x1d>
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xebd(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @get_wall_time() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store double 0.000000e+00, double* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 0x3EB0C6F7A0B5ED8D, double %9)
store double %13, double* %1
br label %14
14: ; preds = %6, %5
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @get_wall_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
br label %13
13: ; preds = %0, %5
%14 = phi double [ %12, %5 ], [ 0.000000e+00, %0 ]
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ debugPrintStr(char *, char *);
void contactNumberRecvd(char *line) {
  debugPrintStr("command parser: contact number recieved: ", line);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"command parser: contact number recieved: \00"
define void @contactNumberRecvd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @debugPrintStr(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"command parser: contact number recieved: \00"
define void @contactNumberRecvd(i8* %0) {
%2 = tail call i32 @debugPrintStr(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gtk_cell_editable_editing_done() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_editable_editing_done() {
ret void
}
void gdk_window_get_user_data() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_get_user_data() {
ret void
}
/* Variables and functions */
int CPUcpsie();
bool IntMasterEnable(void) { return (CPUcpsie()); }


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

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

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

LLVM IR (-O2):
define i32 @IntMasterEnable() {
%1 = tail call i32 (...) @CPUcpsie()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ UrlMatch();
int main(int argc, char *argv[]) {
  UrlMatch();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <UrlMatch@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @UrlMatch()
ret i32 0
}
char *scale_get_type(struct scale *s) { return "Scale"; }


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

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

LLVM IR (-O0):
%struct.scale = type opaque
@.str = [6 x i8] c"Scale\00"
define i8* @scale_get_type(%struct.scale* %0) {
%2 = alloca %struct.scale*
store %struct.scale* %0, %struct.scale** %2
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.scale = type opaque
@.str = [6 x i8] c"Scale\00"
define i8* @scale_get_type(%struct.scale* nocapture readnone %0) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ const int32_t;

/* Variables and functions */
__attribute__((always_)) const int32_t floatToRawIntBits(float d) {
  union {
    float f;
    int32_t i;
  } tmp;
  tmp.f = d;
  return tmp.i;
}


x86 assembly (clang, -O0):
<floatToRawIntBits>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatToRawIntBits>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @floatToRawIntBits(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @floatToRawIntBits(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
unsigned Cyc_Position_loc_to_seg(unsigned loc) {
  unsigned _T0;
  _T0 = loc;
  return _T0;
}


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

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

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

LLVM IR (-O2):
define i32 @Cyc_Position_loc_to_seg(i32 returned %0) {
ret i32 %0
}
void McASPTxHFClkPolaritySet(unsigned int baseAddr, unsigned int polarity) {
  (*((volatile unsigned int *)(baseAddr + (0xB4)))) &= ~(0x00004000u);
  (*((volatile unsigned int *)(baseAddr + (0xB4)))) |= polarity;
}


x86 assembly (clang, -O0):
<McASPTxHFClkPolaritySet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb4,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffbfff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0xb4,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPTxHFClkPolaritySet>:
add    $0xb4,%edi
andl   $0xffffbfff,(%rdi)
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @McASPTxHFClkPolaritySet(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 = add i32 %5, 180
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -16385
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add i32 %12, 180
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %11
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @McASPTxHFClkPolaritySet(i32 %0, i32 %1) {
%3 = add i32 %0, 180
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -16385
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = or i32 %8, %1
store volatile i32 %9, i32* %5
ret void
}
/* Variables and functions */
int f196(int *);
int f197(int *p) { return f196(p); }


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

x86 assembly (clang, -O2):
<f197>:
jmp    1030 <f196@plt>

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

LLVM IR (-O2):
define i32 @f197(i32* %0) {
%2 = tail call i32 @f196(i32* %0)
ret i32 %2
}
/* Type definitions */
struct product {
  int dummy;
};
struct factory {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
struct product *factory_ops_create(struct factory *factory) {
  printf("factory::create()\n");
  return 0;
}


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

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

LLVM IR (-O0):
%struct.product = type { i32 }
%struct.factory = type { i32 }
@.str = [19 x i8] c"factory::create()\0A\00"
define %struct.product* @factory_ops_create(%struct.factory* %0) {
%2 = alloca %struct.factory*
store %struct.factory* %0, %struct.factory** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret %struct.product* null
}

LLVM IR (-O2):
%struct.product = type { i32 }
%struct.factory = type { i32 }
@str = [18 x i8] c"factory::create()\00"
define noalias %struct.product* @factory_ops_create(%struct.factory* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret %struct.product* null
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_pcrew(struct ship *ship, long a) { Write(15, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_pcrew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xf,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_pcrew>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xf,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_pcrew(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 15, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_pcrew(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 15, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
int highest(int num1, int num2, int num3) {
  if (num1 > num2)
    if (num1 > num3)
      return (num1);
    else
      return (num3);
  else if (num2 > num3)
    return (num2);
  else
    return (num3);
}


x86 assembly (clang, -O0):
<highest>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113b <highest+0x3b>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1130 <highest+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <highest+0x58>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <highest+0x58>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1152 <highest+0x52>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <highest+0x58>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @highest(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = icmp sgt i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %5
store i32 %16, i32* %4
br label %27
17: ; preds = %11
%18 = load i32, i32* %7
store i32 %18, i32* %4
br label %27
19: ; preds = %3
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = icmp sgt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32, i32* %6
store i32 %24, i32* %4
br label %27
25: ; preds = %19
%26 = load i32, i32* %7
store i32 %26, i32* %4
br label %27
27: ; preds = %25, %23, %17, %15
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @highest(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %2
%5 = select i1 %4, i32 %0, i32 %2
%6 = icmp sgt i32 %5, %1
%7 = select i1 %6, i32 %5, i32 %1
ret i32 %7
}
void __attribute__((
    __warning__("curl_easy_setopt expects a 'struct curl_httppost *' "
                "argument for this option"))) __attribute__((__unused__))
__attribute__((__no__)) _curl_easy_setopt_err_curl_httpost(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_curl_httpost() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_bcc();
int /*<<< orphan*/ e_branch();
void e_bcc_branch() {
  e_branch();
  e_bcc();
}


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

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

LLVM IR (-O0):
define void @e_bcc_branch() {
%1 = call i32 (...) @e_branch()
%2 = call i32 (...) @e_bcc()
ret void
}

LLVM IR (-O2):
define void @e_bcc_branch() {
%1 = tail call i32 (...) @e_branch()
%2 = tail call i32 (...) @e_bcc()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int isFileExists(char *filePath) {
  FILE *f = fopen(filePath, "rb");
  if (!f)
    return 0;
  fclose(f);
  return 1;
}


x86 assembly (clang, -O0):
<isFileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <isFileExists+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <isFileExists+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFileExists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <isFileExists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @isFileExists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
store i32 1, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @isFileExists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int wait(int *status) {}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @wait(i32* nocapture readnone %0) {
ret i32 undef
}
void gtk_window_set_transient_for() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_transient_for() {
ret void
}
void *f3(int a, void *b) { return a + b; }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
movslq %edi,%rax
add    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @f3(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = sext i32 %5 to i64
%8 = getelementptr i8, i8* %6, i64 %7
ret i8* %8
}

LLVM IR (-O2):
define i8* @f3(i32 %0, i8* readnone %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr i8, i8* %1, i64 %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ erase_line(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ putchar(char);
void console_puts(const char *msg) {
  printf("%s", msg);
  erase_line(0);
  putchar('\n');
}


x86 assembly (clang, -O0):
<console_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <erase_line@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_puts>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <erase_line@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @console_puts(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @erase_line(i32 0)
%4 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int sancus_get_frll(long long, long long, long long, double *);
scalar_t__ sancus_get_lls(char const *, long long *);
bool sancus_get_frlls(const char *s, long long a, long long b, double *out) {
  long long v;
  bool ret = false;
  if (sancus_get_lls(s, &v))
    ret = sancus_get_frll(v, a, b, out);
  return ret;
}


x86 assembly (clang, -O0):
<sancus_get_frlls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <sancus_get_lls@plt>
cmp    $0x0,%rax
je     116e <sancus_get_frlls+0x4e>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <sancus_get_frll@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_get_frlls>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <sancus_get_lls@plt>
test   %rax,%rax
je     1156 <sancus_get_frlls+0x36>
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <sancus_get_frll@plt>
jmp    1158 <sancus_get_frlls+0x38>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @sancus_get_frlls(i8* %0, i64 %1, i64 %2, double* %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = call i64 @sancus_get_lls(i8* %0, i64* %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i64, i64* %5
%11 = call i32 @sancus_get_frll(i64 %10, i64 %1, i64 %2, double* %3)
br label %12
12: ; preds = %9, %4
%13 = phi i32 [ %11, %9 ], [ 0, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ _assert_string_not_equal(char *, int, char *, char *);
void case_different_strings_should_not_match() {
  _assert_string_not_equal(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/master/cgreen/"
      "tests/assertion_tests.c",
      26, "Hello", "hello");
}


x86 assembly (clang, -O0):
<case_different_strings_should_not_match>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1a,%esi
lea    0xf74(%rip),%rdx
lea    0xf73(%rip),%rcx
call   1030 <_assert_string_not_equal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<case_different_strings_should_not_match>:
lea    0xee9(%rip),%rdi
lea    0xf7d(%rip),%rdx
lea    0xf7c(%rip),%rcx
mov    $0x1a,%esi
jmp    1030 <_assert_string_not_equal@plt>

LLVM IR (-O0):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/master/cgreen/tests/assertion_tests.c\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"hello\00"
define void @case_different_strings_should_not_match() {
%1 = call i32 @_assert_string_not_equal(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [155 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/master/cgreen/tests/assertion_tests.c\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"hello\00"
define void @case_different_strings_should_not_match() {
%1 = tail call i32 @_assert_string_not_equal(i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void log_print(const char *string) {}


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

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

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

LLVM IR (-O2):
define void @log_print(i8* nocapture %0) {
ret void
}
/* Variables and functions */
unsigned short bswap_16(unsigned short);
unsigned short wimaxll_swap_16(unsigned short x) { return bswap_16(x); }


x86 assembly (clang, -O0):
<wimaxll_swap_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <bswap_16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wimaxll_swap_16>:
jmp    1030 <bswap_16@plt>

LLVM IR (-O0):
define zeroext i16 @wimaxll_swap_16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @bswap_16(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @wimaxll_swap_16(i16 zeroext %0) {
%2 = tail call zeroext i16 @bswap_16(i16 zeroext %0)
ret i16 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void print_line_uint8_t(uint32_t i, uint32_t j, uint8_t v, int magma) {
  if (magma)
    printf("A[%u,%u]:=%d;\n", i, j, v);
  else
    printf("%u %u %d\n", i, j, v);
}


x86 assembly (clang, -O0):
<print_line_uint8_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1148 <print_line_uint8_t+0x38>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <print_line_uint8_t+0x4d>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line_uint8_t>:
mov    %edx,%eax
mov    %esi,%edx
mov    %edi,%esi
test   %ecx,%ecx
lea    0xef0(%rip),%rcx
lea    0xeda(%rip),%rdi
cmove  %rcx,%rdi
mov    %eax,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"A[%u,%u]:=%d;\0A\00"
@.str.1 = [10 x i8] c"%u %u %d\0A\00"
define void @print_line_uint8_t(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* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
br label %21
16: ; preds = %4
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"A[%u,%u]:=%d;\0A\00"
@.str.1 = [10 x i8] c"%u %u %d\0A\00"
define void @print_line_uint8_t(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @printf(i8* %6, i32 %0, i32 %1, i32 %2)
ret void
}
unsigned short from32to16(unsigned a) {
  unsigned short b = a >> 16;
  asm("addw %w2,%w0\n\t"
      "adcw $0,%w0\n"
      : "=r"(b)
      : "0"(b), "r"(a));
  return b;
}


x86 assembly (clang, -O0):
<from32to16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
mov    %ax,-0x6(%rbp)
mov    -0x6(%rbp),%ax
mov    -0x4(%rbp),%ecx
add    %cx,%ax
adc    $0x0,%ax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<from32to16>:
mov    %edi,%eax
shr    $0x10,%eax
add    %di,%ax
adc    $0x0,%ax
ret

LLVM IR (-O0):
define zeroext i16 @from32to16(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 16
%6 = trunc i32 %5 to i16
store i16 %6, i16* %3
%7 = load i16, i16* %3
%8 = load i32, i32* %2
%9 = call i16 asm "addw ${2:w},${0:w}\0A\09adcw $$0,${0:w}\0A", "=r,0,r,~{dirflag},~{fpsr},~{flags}"(i16 %7, i32 %8)
store i16 %9, i16* %3
%10 = load i16, i16* %3
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @from32to16(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i16
%4 = tail call i16 asm "addw ${2:w},${0:w}\0A\09adcw $$0,${0:w}\0A", "=r,0,r,~{dirflag},~{fpsr},~{flags}"(i16 %3, i32 %0)
ret i16 %4
}
int edflib_version(void) { return (117); }


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

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

LLVM IR (-O0):
define i32 @edflib_version() {
ret i32 117
}

LLVM IR (-O2):
define i32 @edflib_version() {
ret i32 117
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int fget2l(FILE *stream) {
  int b1;
  int b2;
  b1 = fgetc(stream);
  b2 = fgetc(stream);
  if ((b1 != EOF) && (b2 != EOF)) {
    return b1 | (b2 * 0x0100);
  }
  return EOF;
}


x86 assembly (clang, -O0):
<fget2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eaa(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2l+0x5b>
mov    -0x18(%rbp),%eax
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2l+0x5b>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <fget2l+0x67>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget2l>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    0x2ebc(%rip),%rcx
mov    (%rcx),%edx
mov    %eax,%ecx
shl    $0x8,%ecx
or     %ebp,%ecx
cmp    %edx,%eax
cmove  %edx,%ecx
cmp    %edx,%ebp
cmove  %edx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fget2l(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %4
%8 = load i32*, i32** %3
%9 = call i32 @fgetc(i32* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* @EOF
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %1
%14 = load i32, i32* %5
%15 = load i32, i32* @EOF
%16 = icmp ne i32 %14, %15
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = mul nsw i32 %19, 256
%21 = or i32 %18, %20
store i32 %21, i32* %2
br label %24
22: ; preds = %13, %1
%23 = load i32, i32* @EOF
store i32 %23, i32* %2
br label %24
24: ; preds = %22, %17
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fget2l(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %2, %4
%6 = icmp eq i32 %3, %4
%7 = or i1 %5, %6
%8 = shl nsw i32 %3, 8
%9 = or i32 %8, %2
%10 = select i1 %7, i32 %4, i32 %9
ret i32 %10
}
/* Variables and functions */
long INT_MAX;
long INT_MIN;
long double scalbnl(long double, long);
long double scalblnl(long double x, long n) {
  if (n > INT_MAX)
    n = INT_MAX;
  else if (n < INT_MIN)
    n = INT_MIN;
  return scalbnl(x, n);
}


x86 assembly (clang, -O0):
<scalblnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%rax
jle    1149 <scalblnl+0x39>
mov    0x2eab(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1170 <scalblnl+0x60>
mov    -0x18(%rbp),%rax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
jge    116b <scalblnl+0x5b>
mov    0x2e7c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1170 <scalblnl+0x60>
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <scalbnl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalblnl>:
mov    0x2ed1(%rip),%rcx
mov    0x2ec2(%rip),%rax
mov    (%rax),%rax
cmp    %rdi,%rax
cmovle %rdi,%rax
mov    (%rcx),%rcx
cmp    %rdi,%rcx
cmovl  %rcx,%rax
mov    %rax,%rdi
jmp    1030 <scalbnl@plt>

LLVM IR (-O0):
@INT_MAX = global i64 0
@INT_MIN = global i64 0
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* @INT_MAX
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* @INT_MAX
store i64 %9, i64* %4
br label %17
10: ; preds = %2
%11 = load i64, i64* %4
%12 = load i64, i64* @INT_MIN
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = load i64, i64* @INT_MIN
store i64 %15, i64* %4
br label %16
16: ; preds = %14, %10
br label %17
17: ; preds = %16, %8
%18 = load x86_fp80, x86_fp80* %3
%19 = load i64, i64* %4
%20 = call x86_fp80 @scalbnl(x86_fp80 %18, i64 %19)
ret x86_fp80 %20
}

LLVM IR (-O2):
@INT_MAX = global i64 0
@INT_MIN = global i64 0
define x86_fp80 @scalblnl(x86_fp80 %0, i64 %1) {
%3 = load i64, i64* @INT_MAX
%4 = icmp slt i64 %3, %1
%5 = load i64, i64* @INT_MIN
%6 = icmp sgt i64 %5, %1
%7 = select i1 %6, i64 %5, i64 %1
%8 = select i1 %4, i64 %3, i64 %7
%9 = tail call x86_fp80 @scalbnl(x86_fp80 %0, i64 %8)
ret x86_fp80 %9
}
/* Variables and functions */
int /*<<< orphan*/ print_error(char *, char const *const, char const *const);
scalar_t__ strcmp(char const *const, char const *const);
int string_not_equal_display_error(const char *const left,
                                   const char *const right) {
  if (strcmp(left, right) != 0) {
    return 1;
  }
  print_error("\"%s\" == \"%s\"\n", left, right);
  return 0;
}


x86 assembly (clang, -O0):
<string_not_equal_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1153 <string_not_equal_display_error+0x33>
movl   $0x1,-0x4(%rbp)
jmp    116e <string_not_equal_display_error+0x4e>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe9e(%rip),%rdi
call   1030 <print_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_not_equal_display_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1150 <string_not_equal_display_error+0x30>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <print_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\22%s\22 == \22%s\22\0A\00"
define i32 @string_not_equal_display_error(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i64 @strcmp(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %15
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i8*, i8** %5
%14 = call i32 @print_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
store i32 0, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [14 x i8] c"\22%s\22 == \22%s\22\0A\00"
define i32 @string_not_equal_display_error(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @print_error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %8
}
/* Variables and functions */
int strlen(unsigned char *);
unsigned char charat(unsigned char *s, int pos) {
  if (pos < strlen(s))
    return s[pos];
  else
    return 0xFF;
}


x86 assembly (clang, -O0):
<charat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    114e <charat+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
jmp    1152 <charat+0x42>
movb   $0xff,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charat>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    $0xff,%al
cmp    %ebp,%ecx
jle    112b <charat+0x1b>
movslq %ebp,%rax
mov    (%rbx,%rax,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @charat(i8* %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %3
br label %17
16: ; preds = %2
store i8 -1, i8* %3
br label %17
17: ; preds = %16, %10
%18 = load i8, i8* %3
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @charat(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, %1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
br label %9
9: ; preds = %2, %5
%10 = phi i8 [ %8, %5 ], [ -1, %2 ]
ret i8 %10
}
void put_unaligned_uint16(void *p, unsigned short datum) {
  struct {
    unsigned short d;
  } __attribute__((packed)) *pp = p;
  pp->d = datum;
}


x86 assembly (clang, -O0):
<put_unaligned_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_unaligned_uint16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.anon = type { i16 }
define void @put_unaligned_uint16(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca %struct.anon*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.anon*
store %struct.anon* %7, %struct.anon** %5
%8 = load i16, i16* %4
%9 = load %struct.anon*, %struct.anon** %5
%10 = getelementptr inbounds %struct.anon, %struct.anon* %9, i32 0, i32 0
store i16 %8, i16* %10
ret void
}

LLVM IR (-O2):
define void @put_unaligned_uint16(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void foo() {
  int A[30], *p;
#pragma omp target data map(A [0:4])
  {
    p = &A[0];
#pragma omp target map(p [7:20]) map(A [0:4])
    {
      A[2] = 777;
      p[8] = 777;
    }
  }
  if (A[2] != 777 || A[8] != 777)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
movl   $0x309,-0x78(%rbp)
mov    -0x88(%rbp),%rax
movl   $0x309,0x20(%rax)
cmpl   $0x309,-0x78(%rbp)
jne    1155 <foo+0x45>
cmpl   $0x309,-0x60(%rbp)
je     115c <foo+0x4c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x90,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
void XSetIMValues() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _fork();
pid_t fork(void) { return _fork(); }


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

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

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

LLVM IR (-O2):
define i32 @fork() {
%1 = tail call i32 (...) @_fork()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ io_out8(int, int);
void interrupt_handler20(int *esp) { io_out8((0x0020), 0x60); }


x86 assembly (clang, -O0):
<interrupt_handler20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x20,%edi
mov    $0x60,%esi
call   1030 <io_out8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupt_handler20>:
mov    $0x20,%edi
mov    $0x60,%esi
jmp    1030 <io_out8@plt>

LLVM IR (-O0):
define void @interrupt_handler20(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @io_out8(i32 32, i32 96)
ret void
}

LLVM IR (-O2):
define void @interrupt_handler20(i32* nocapture readnone %0) {
%2 = tail call i32 @io_out8(i32 32, i32 96)
ret void
}
void kfree_rcu_scheduler_running(void) {}


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

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

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

LLVM IR (-O2):
define void @kfree_rcu_scheduler_running() {
ret void
}
/* Variables and functions */
int bbm_word_read(void *, unsigned short, unsigned short *);
int bbm_com_word_read(void *handle, unsigned short addr, unsigned short *data) {
  int res;
  res = bbm_word_read(handle, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_word_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
movzwl %ax,%esi
call   1030 <bbm_word_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_word_read>:
jmp    1030 <bbm_word_read@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_word_read(i8* %0, i16 zeroext %1, i16* %2) {
%4 = tail call i32 @bbm_word_read(i8* %0, i16 zeroext %1, i16* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd(int);
void lcd_off() { lcd_cmd(0x08); }


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

x86 assembly (clang, -O2):
<lcd_off>:
mov    $0x8,%edi
jmp    1030 <lcd_cmd@plt>

LLVM IR (-O0):
define void @lcd_off() {
%1 = call i32 @lcd_cmd(i32 8)
ret void
}

LLVM IR (-O2):
define void @lcd_off() {
%1 = tail call i32 @lcd_cmd(i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void _close_socket(int sock) { close(sock); }


x86 assembly (clang, -O0):
<_close_socket>:
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):
<_close_socket>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @_close_socket(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 @_close_socket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void test_invalid_clause() {
  int i;
#pragma omp parallel
#pragma omp master taskloop simd foo bar
  for (i = 0; i < 16; ++i)
    ;
#pragma omp master taskloop simd nogroup nogroup
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_invalid_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_invalid_clause+0x28>
jmp    111a <test_invalid_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_invalid_clause+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_invalid_clause+0x4c>
jmp    113e <test_invalid_clause+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_invalid_clause+0x2f>
pop    %rbp
ret

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

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

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