xunge/DecIR huggingface dataset:
/* Variables and functions */
float sqrtf(float);
float invsqrtf(float x) { return (1.0f / sqrtf(x)); }


x86 assembly (clang, -O0):
<invsqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invsqrtf>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <invsqrtf+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <invsqrtf+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @invsqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @invsqrtf(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
void free_cube_d(double ***array) {
  double **p1, *p2;
  p1 = (double **)array[0];
  p2 = (double *)array[0][0];
  free(p2);
  free(p1);
  free(array);
}


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

x86 assembly (clang, -O2):
<free_cube_d>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_cube_d(double*** %0) {
%2 = alloca double***
%3 = alloca double**
%4 = alloca double*
store double*** %0, double**** %2
%5 = load double***, double**** %2
%6 = getelementptr inbounds double**, double*** %5, i64 0
%7 = load double**, double*** %6
store double** %7, double*** %3
%8 = load double***, double**** %2
%9 = getelementptr inbounds double**, double*** %8, i64 0
%10 = load double**, double*** %9
%11 = getelementptr inbounds double*, double** %10, i64 0
%12 = load double*, double** %11
store double* %12, double** %4
%13 = load double*, double** %4
%14 = bitcast double* %13 to i8*
%15 = load double**, double*** %3
%16 = bitcast double** %15 to i8*
%17 = load double***, double**** %2
%18 = bitcast double*** %17 to i8*
ret void
}

LLVM IR (-O2):
define void @free_cube_d(double*** nocapture %0) {
%2 = load double**, double*** %0
%3 = bitcast double** %2 to i8**
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast double** %2 to i8*
tail call void @free(i8* %5)
%6 = bitcast double*** %0 to i8*
tail call void @free(i8* %6)
ret void
}
int mp_isdigit(char c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<mp_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <mp_isdigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_isdigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @mp_isdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @mp_isdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void test11() {
  switch (1) {
  case 1:
    break;
  case 42:;
    int x;
    x = 4;
    break;
  }
}


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

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

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

LLVM IR (-O2):
define void @test11() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void addnumbers() {
  static int x = 0;
  int y = 0;
  x++;
  y++;
  printf("In addnumbers() x=%d, y=%d\n", x, y);
}


x86 assembly (clang, -O0):
<addnumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2f07(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efe(%rip)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    0x2eef(%rip),%esi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addnumbers>:
mov    0x2f16(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f0d(%rip)
lea    0xeda(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@addnumbers.x = internal global i32 0
@.str = [28 x i8] c"In addnumbers() x=%d, y=%d\0A\00"
define void @addnumbers() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @addnumbers.x
%3 = add nsw i32 %2, 1
store i32 %3, i32* @addnumbers.x
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = load i32, i32* @addnumbers.x
%7 = load i32, i32* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@addnumbers.x = internal unnamed_addr global i32 0
@.str = [28 x i8] c"In addnumbers() x=%d, y=%d\0A\00"
define void @addnumbers() {
%1 = load i32, i32* @addnumbers.x
%2 = add nsw i32 %1, 1
store i32 %2, i32* @addnumbers.x
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mysig2str(int, char *);
int /*<<< orphan*/ printf(char *, char *);
void sig_handler(int signo) {
  char name[1024];
  mysig2str(signo, name);
  printf("caught signal %s\n", name);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
call   1040 <mysig2str@plt>
lea    -0x410(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <mysig2str@plt>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"caught signal %s\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = call i32 @mysig2str(i32 %4, i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"caught signal %s\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @mysig2str(i32 %0, i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long requestor;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
void set_XSelectionRequestEvent_requestor(void *_p, unsigned long _v) {
  ((XSelectionRequestEvent *)_p)->requestor = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XSelectionRequestEvent_requestor(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void g_date_set_year() {}


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

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

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

LLVM IR (-O2):
define void @g_date_set_year() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_dobldobl_Laurent_drop_variable_by_index(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(829, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_dobldobl_Laurent_drop_variable_by_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x33d,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_dobldobl_Laurent_drop_variable_by_index>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x33d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_dobldobl_Laurent_drop_variable_by_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 829, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_dobldobl_Laurent_drop_variable_by_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 829, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void CRCDataWrite(uint32_t ui32Base, uint32_t ui32Data) {
  ;
  (*((volatile unsigned long *)(0x44030000 + 0x00000C14))) = ui32Data;
}


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

x86 assembly (clang, -O2):
<CRCDataWrite>:
mov    %rsi,0x44030c14
44
ret

LLVM IR (-O0):
define void @CRCDataWrite(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
store volatile i64 %5, i64* inttoptr (i64 1141050388 to i64*)
ret void
}

LLVM IR (-O2):
define void @CRCDataWrite(i64 %0, i64 %1) {
store volatile i64 %1, i64* inttoptr (i64 1141050388 to i64*)
ret void
}
int main(int argc, char **argv) { return -1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%eax
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
ret i32 -1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ urlify(char *, int);
int main() {
  urlify("google shiva tw", 15);
  urlify("shiva surya tce yoyo", 20);
  urlify("mail google mam i ", 18);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xf,%esi
call   1030 <urlify@plt>
lea    0xee4(%rip),%rdi
mov    $0x14,%esi
call   1030 <urlify@plt>
lea    0xee8(%rip),%rdi
mov    $0x12,%esi
call   1030 <urlify@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xf,%esi
call   1030 <urlify@plt>
lea    0xee7(%rip),%rdi
mov    $0x14,%esi
call   1030 <urlify@plt>
lea    0xeeb(%rip),%rdi
mov    $0x12,%esi
call   1030 <urlify@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"google shiva tw\00"
@.str.1 = [21 x i8] c"shiva surya tce yoyo\00"
@.str.2 = [19 x i8] c"mail google mam i \00"
define i32 @main() {
%1 = call i32 @urlify(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%2 = call i32 @urlify(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20)
%3 = call i32 @urlify(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 18)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"google shiva tw\00"
@.str.1 = [21 x i8] c"shiva surya tce yoyo\00"
@.str.2 = [19 x i8] c"mail google mam i \00"
define i32 @main() {
%1 = tail call i32 @urlify(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%2 = tail call i32 @urlify(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20)
%3 = tail call i32 @urlify(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 18)
ret i32 0
}
void kill_pid_info(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<kill_pid_info>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill_pid_info>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.kill_pid_info = [14 x i8] c"kill_pid_info\00"
define void @kill_pid_info() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.kill_pid_info, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.kill_pid_info = [14 x i8] c"kill_pid_info\00"
define void @kill_pid_info() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.kill_pid_info, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ stderr;
int error(const char *msg) {
  fprintf(stderr, msg);
  return -1;
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
define i32 @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
ret i32 -1
}
int test_imm_90uint16_reg(unsigned short val) {
  return ((val) & (0x90 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_90uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x90,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_90uint16_reg>:
test   $0x90,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_90uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 144
%6 = icmp ne i32 %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_90uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 144
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int intif_request_partyinfo(int);
int party_request_info(int party_id) {
  return intif_request_partyinfo(party_id);
}


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

x86 assembly (clang, -O2):
<party_request_info>:
jmp    1030 <intif_request_partyinfo@plt>

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

LLVM IR (-O2):
define i32 @party_request_info(i32 %0) {
%2 = tail call i32 @intif_request_partyinfo(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int tgetnum(const char *attr) {
  if (strcmp(attr, "co") == 0) {
    return (80);
  }
  if (strcmp(attr, "li") == 0) {
    return (25);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<tgetnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <tgetnum+0x32>
movl   $0x50,-0x4(%rbp)
jmp    116f <tgetnum+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <tgetnum+0x58>
movl   $0x19,-0x4(%rbp)
jmp    116f <tgetnum+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgetnum>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     113e <tgetnum+0x2e>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
neg    %rax
sbb    %eax,%eax
or     $0x19,%eax
pop    %rbx
ret
mov    $0x50,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"co\00"
@.str.1 = [3 x i8] c"li\00"
define i32 @tgetnum(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 25, i32 -1
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 80, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int _os_strstr(char *pattern, char *str, int str_len, int size) {
  if (strstr(str, pattern) != NULL) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<_os_strstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1149 <_os_strstr+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1150 <_os_strstr+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_os_strstr>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_os_strstr(i8* nocapture %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32* @strstr(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ bputc(int);
void WriteEoi() {
  bputc(0xff);
  bputc(0xd9);
}


x86 assembly (clang, -O0):
<WriteEoi>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd9,%edi
call   1030 <bputc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteEoi>:
push   %rax
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd9,%edi
pop    %rax
jmp    1030 <bputc@plt>

LLVM IR (-O0):
define void @WriteEoi() {
%1 = call i32 @bputc(i32 255)
%2 = call i32 @bputc(i32 217)
ret void
}

LLVM IR (-O2):
define void @WriteEoi() {
%1 = tail call i32 @bputc(i32 255)
%2 = tail call i32 @bputc(i32 217)
ret void
}
int test_imm_E3uint16_reg(unsigned short val) {
  return ((val) & (0xE3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E3uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xe3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E3uint16_reg>:
test   $0xe3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E3uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 227
%6 = icmp ne i32 %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_E3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 227
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double ls_cost_nm7_sq(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<ls_cost_nm7_sq>:
mulsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @ls_cost_nm7_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
unsigned int system_atomics_increment(volatile unsigned int *value_ptr) {
  unsigned int previous_value;
  { previous_value = __sync_fetch_and_add(value_ptr, 1) + 1; }
  return previous_value;
}


x86 assembly (clang, -O0):
<system_atomics_increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%eax
lock xadd %eax,(%rcx)
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_atomics_increment>:
mov    $0x1,%eax
lock xadd %eax,(%rdi)
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @system_atomics_increment(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = atomicrmw add i32* %4, i32 1 seq_cst
%6 = add i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @system_atomics_increment(i32* nocapture %0) {
%2 = atomicrmw add i32* %0, i32 1 seq_cst
%3 = add i32 %2, 1
ret i32 %3
}
int execute_setregid32() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setregid32() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void do_exit(int i) { exit(0); }


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<do_exit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @do_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @do_exit(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
float coshf(float);
float intr_wrap_036(float p1) { return coshf(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_036>:
jmp    1030 <coshf@plt>

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

LLVM IR (-O2):
define float @intr_wrap_036(float %0) {
%2 = tail call float @coshf(float %0)
ret float %2
}
int deref04(int *p) { return *p; }


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

x86 assembly (clang, -O2):
<deref04>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @deref04(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *server_name = getenv("SERVER_NAME");
  if (server_name == NULL)
    server_name = "server.my-company.com";
  printf("accessing server %s\n", server_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <main+0x35>
lea    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xed5(%rip),%rsi
cmovne %rax,%rsi
lea    0xee0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"SERVER_NAME\00"
@.str.1 = [22 x i8] c"server.my-company.com\00"
@.str.2 = [21 x i8] c"accessing server %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %6, %0
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"SERVER_NAME\00"
@.str.1 = [22 x i8] c"server.my-company.com\00"
@.str.2 = [21 x i8] c"accessing server %s\0A\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret i32 0
}
int isnumbers(char *s) {
  while (*s != 0) {
    if (*s < '0' || *s > '9')
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isnumbers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <isnumbers+0x55>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1138 <isnumbers+0x38>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1144 <isnumbers+0x44>
movl   $0x0,-0x4(%rbp)
jmp    115c <isnumbers+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <isnumbers+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isnumbers(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %20, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %4
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp slt i32 %12, 48
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sgt i32 %17, 57
br i1 %18, label %19, label %20
19: ; preds = %14, %9
store i32 0, i32* %2
br label %24
20: ; preds = %14
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %4
23: ; preds = %4
store i32 1, i32* %2
br label %24
24: ; preds = %23, %19
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @isnumbers(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, int *, int);
int main() {
  int fd = 0;
  int src = 2015;
  fd = open("/dev/memdev0", O_RDWR);
  write(fd, &src, sizeof(int));
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x7df,-0xc(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xea3(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x7df,0xc(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
lea    0xc(%rsp),%rsi
mov    %eax,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %ebx,%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/memdev0\00"
@O_RDWR = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 2015, i32* %3
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @write(i32 %6, i32* %3, i32 4)
%8 = load i32, i32* %2
%9 = call i32 @close(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/memdev0\00"
@O_RDWR = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2015, i32* %1
%3 = load i32, i32* @O_RDWR
%4 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @write(i32 %4, i32* %1, i32 4)
%6 = tail call i32 @close(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv, char **env) {
  printf(argv[1]);
  printf("\n");
  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)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <printf@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(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i8**, i8*** %6
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* %10)
%12 = 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(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x49() {
  Assert_real((isodigit(73) == 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_isodigit.c",
              370, ("isodigit should be 0 for I"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x49>:
push   %rax
mov    $0x49,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x172,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for I\00"
define void @t_isodigit_0x49() {
%1 = call i64 @isodigit(i32 73)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for I\00"
define void @t_isodigit_0x49() {
%1 = tail call i64 @isodigit(i32 73)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ manage_setup_arrival(struct Event *);
int setup_busy_2(struct Event *ev) {
  manage_setup_arrival(ev);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.Event = type { i32 }
define i32 @setup_busy_2(%struct.Event* %0) {
%2 = tail call i32 @manage_setup_arrival(%struct.Event* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ ft_strchr(char *, char);
int /*<<< orphan*/ ft_strclr(char *);
int /*<<< orphan*/ ft_strcpy(char *, scalar_t__);
int ft_check_line(char *buff) {
  if (ft_strchr(buff, '\n')) {
    ft_strcpy(buff, ft_strchr(buff, '\n') + 1);
    return (1);
  }
  ft_strclr(buff);
  return (0);
}


x86 assembly (clang, -O0):
<ft_check_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1050 <ft_strchr@plt>
cmp    $0x0,%rax
je     1186 <ft_check_line+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1050 <ft_strchr@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1030 <ft_strcpy@plt>
movl   $0x1,-0x4(%rbp)
jmp    1196 <ft_check_line+0x66>
mov    -0x10(%rbp),%rdi
call   1040 <ft_strclr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_check_line>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%esi
call   1050 <ft_strchr@plt>
test   %rax,%rax
je     1163 <ft_check_line+0x33>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <ft_strchr@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
call   1030 <ft_strcpy@plt>
mov    $0x1,%eax
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <ft_strclr@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_check_line(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @ft_strchr(i8* %4, i8 signext 10)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i64 @ft_strchr(i8* %9, i8 signext 10)
%11 = add nsw i64 %10, 1
%12 = call i32 @ft_strcpy(i8* %8, i64 %11)
store i32 1, i32* %2
br label %16
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i32 @ft_strclr(i8* %14)
store i32 0, i32* %2
br label %16
16: ; preds = %13, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @ft_check_line(i8* %0) {
%2 = tail call i64 @ft_strchr(i8* %0, i8 signext 10)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @ft_strchr(i8* %0, i8 signext 10)
%6 = add nsw i64 %5, 1
%7 = tail call i32 @ft_strcpy(i8* %0, i64 %6)
br label %10
8: ; preds = %1
%9 = tail call i32 @ft_strclr(i8* %0)
br label %10
10: ; preds = %8, %4
%11 = phi i32 [ 1, %4 ], [ 0, %8 ]
ret i32 %11
}
/* Variables and functions */
int buffer_open(char const *, int /*<<< orphan*/);
int buffer_open_append(const char *tag) { return buffer_open(tag, 0); }


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

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

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

LLVM IR (-O2):
define i32 @buffer_open_append(i8* %0) {
%2 = tail call i32 @buffer_open(i8* %0, i32 0)
ret i32 %2
}
void Act_NotDone(void) { ; }


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

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

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

LLVM IR (-O2):
define void @Act_NotDone() {
ret void
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ abort();
int test(int);
main() {
  int x = INT_MAX;
  if (test(x) == x)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <test@plt>
cmp    -0x8(%rbp),%eax
jne    1153 <main+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1040 <test@plt>
cmp    %ebx,%eax
je     1139 <main+0x19>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @INT_MAX
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @test(i32 %4)
%6 = load i32, i32* %2
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @main() {
%1 = load i32, i32* @INT_MAX
%2 = tail call i32 @test(i32 %1)
%3 = icmp eq i32 %2, %1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}
long Pw(long x, long y) {
  long i;
  for (i = 1; y > 0; --y)
    i *= x;
  return i;
}


x86 assembly (clang, -O0):
<Pw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    113d <Pw+0x3d>
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <Pw+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pw>:
test   %rsi,%rsi
jle    111b <Pw+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <Pw+0x21>
mov    $0x1,%eax
jmp    1156 <Pw+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <Pw+0x30>
test   %rcx,%rcx
je     116a <Pw+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <Pw+0x60>
ret

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

LLVM IR (-O2):
define i64 @Pw(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 1, %8 ], [ %20, %10 ]
%12 = phi i64 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i64 %11, %0
%14 = mul nsw i64 %13, %0
%15 = mul nsw i64 %14, %0
%16 = mul nsw i64 %15, %0
%17 = mul nsw i64 %16, %0
%18 = mul nsw i64 %17, %0
%19 = mul nsw i64 %18, %0
%20 = mul nsw i64 %19, %0
%21 = add i64 %12, 8
%22 = icmp eq i64 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i64 [ undef, %4 ], [ %20, %10 ]
%25 = phi i64 [ 1, %4 ], [ %20, %10 ]
%26 = icmp eq i64 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i64 [ %30, %27 ], [ %25, %23 ]
%29 = phi i64 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i64 %28, %0
%31 = add i64 %29, 1
%32 = icmp eq i64 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i64 [ 1, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i64 %34
}
/* Variables and functions */
int /*<<< orphan*/ apenasDigitos(char *);
int strlen(char *);
int isNumNaturalValido(char *str) {
  if (!str)
    return 0;
  if (!apenasDigitos(str) || !(strlen(str) <= 4)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isNumNaturalValido>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <isNumNaturalValido+0x23>
movl   $0x0,-0x4(%rbp)
jmp    117a <isNumNaturalValido+0x5a>
mov    -0x10(%rbp),%rdi
call   1040 <apenasDigitos@plt>
cmp    $0x0,%eax
je     1167 <isNumNaturalValido+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x4,%eax
jle    1173 <isNumNaturalValido+0x53>
movl   $0x0,-0x4(%rbp)
jmp    117a <isNumNaturalValido+0x5a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumNaturalValido>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %rdi,%rdi
je     1147 <isNumNaturalValido+0x27>
mov    %rdi,%rbx
call   1040 <apenasDigitos@plt>
test   %eax,%eax
je     1147 <isNumNaturalValido+0x27>
mov    %rbx,%rdi
call   1030 <strlen@plt>
xor    %ebp,%ebp
cmp    $0x5,%eax
setl   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isNumNaturalValido(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @apenasDigitos(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %0)
%8 = icmp slt i32 %7, 5
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}