xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ AddWADFile(char *);
int /*<<< orphan*/ ST_Message(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
void ExecOptionPLAYDEMO(char **args, int tag) {
  char file[256];
  sprintf(file, "%s.lmp", args[1]);
  AddWADFile(file);
  ST_Message("Playing demo %s.lmp.\n", args[1]);
}


x86 assembly (clang, -O0):
<ExecOptionPLAYDEMO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xea8(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1040 <AddWADFile@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <ST_Message@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExecOptionPLAYDEMO>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    0x8(%rdi),%rdx
lea    0xeb8(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1040 <AddWADFile@plt>
mov    0x8(%rbx),%rsi
lea    0xea1(%rip),%rdi
call   1030 <ST_Message@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s.lmp\00"
@.str.1 = [22 x i8] c"Playing demo %s.lmp.\0A\00"
define void @ExecOptionPLAYDEMO(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca [256 x i8]
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i8**, i8*** %3
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%12 = call i32 @AddWADFile(i8* %11)
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @ST_Message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s.lmp\00"
@.str.1 = [22 x i8] c"Playing demo %s.lmp.\0A\00"
define void @ExecOptionPLAYDEMO(i8** nocapture %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %0, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @AddWADFile(i8* %4)
%9 = load i8*, i8** %5
%10 = call i32 @ST_Message(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}
/* Variables and functions */
#define SIGUSR1 129
#define SIGUSR2 128
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void driver(int sig) {
  switch (sig) {
  case SIGUSR1:
    fprintf(stderr, "driver: OK, let's go!\n\n");
    break;
  case SIGUSR2:
    fprintf(stderr, "driver: OK, I am gonna stop the bus!\n\n");
  }
}


x86 assembly (clang, -O0):
<driver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x80,%eax
je     115e <driver+0x4e>
jmp    1131 <driver+0x21>
mov    -0x8(%rbp),%eax
sub    $0x81,%eax
jne    1173 <driver+0x63>
jmp    1144 <driver+0x34>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1173 <driver+0x63>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driver>:
cmp    $0x81,%edi
je     1129 <driver+0x19>
cmp    $0x80,%edi
jne    113e <driver+0x2e>
lea    0xef1(%rip),%rsi
jmp    1130 <driver+0x20>
lea    0xed0(%rip),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintf@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"driver: OK, let's go!\0A\0A\00"
@.str.1 = [39 x i8] c"driver: OK, I am gonna stop the bus!\0A\0A\00"
define void @driver(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 129, label %4
i32 128, label %7
]
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %7, %1, %4
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"driver: OK, let's go!\0A\0A\00"
@.str.1 = [39 x i8] c"driver: OK, I am gonna stop the bus!\0A\0A\00"
define void @driver(i32 %0) {
switch i32 %0, label %7 [
i32 129, label %3
i32 128, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %1 ]
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* %4)
br label %7
7: ; preds = %3, %1
ret void
}
/* Type definitions */
struct net_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ netif_stop_queue(struct net_device *);
int snull_release(struct net_device *dev) {
  netif_stop_queue(dev);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.net_device = type { i32 }
define i32 @snull_release(%struct.net_device* %0) {
%2 = tail call i32 @netif_stop_queue(%struct.net_device* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
long pthread_cancel(int /*<<< orphan*/);
long OsCancelThread(pthread_t th) { return (pthread_cancel(th)); }


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

x86 assembly (clang, -O2):
<OsCancelThread>:
jmp    1030 <pthread_cancel@plt>

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

LLVM IR (-O2):
define i64 @OsCancelThread(i32 %0) {
%2 = tail call i64 @pthread_cancel(i32 %0)
ret i64 %2
}
/* Variables and functions */
char *strdup(char *);
char *testLeakWithinReturn(char *str) { return strdup(strdup(str)); }


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

x86 assembly (clang, -O2):
<testLeakWithinReturn>:
push   %rax
call   1030 <strdup@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @testLeakWithinReturn(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i8* @strdup(i8* %2)
ret i8* %3
}
int nonDotSize(char *s) {
  char c;
  int size = 0;
  for (;;) {
    c = *s++;
    if (c == '.' || c == 0)
      return size;
    ++size;
  }
}


x86 assembly (clang, -O0):
<nonDotSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2e,%eax
je     113d <nonDotSize+0x3d>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1142 <nonDotSize+0x42>
mov    -0x10(%rbp),%eax
pop    %rbp
ret
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    110f <nonDotSize+0xf>

x86 assembly (clang, -O2):
<nonDotSize>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
cmp    $0x2e,%cl
je     1123 <nonDotSize+0x23>
test   %cl,%cl
je     1123 <nonDotSize+0x23>
add    $0x1,%rax
jmp    1110 <nonDotSize+0x10>
ret

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

LLVM IR (-O2):
define i32 @nonDotSize(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i8* [ %0, %1 ], [ %8, %7 ]
%4 = phi i32 [ 0, %1 ], [ %9, %7 ]
%5 = load i8, i8* %3
switch i8 %5, label %7 [
i8 46, label %6
i8 0, label %6
]
6: ; preds = %2, %2
ret i32 %4
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = add nuw nsw i32 %4, 1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int _sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                 int /*<<< orphan*/ *);
int _sigsuspend(int /*<<< orphan*/ *);
int __pause() {
  sigset_t oset;
  if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1)
    return (-1);
  return (_sigsuspend(&oset));
}


x86 assembly (clang, -O0):
<__pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
lea    -0x8(%rbp),%rdx
call   1030 <_sigprocmask@plt>
cmp    $0xffffffff,%eax
jne    1153 <__pause+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <__pause+0x3f>
lea    -0x8(%rbp),%rdi
call   1040 <_sigsuspend@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pause>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rdx
xor    %esi,%esi
call   1030 <_sigprocmask@plt>
cmp    $0xffffffff,%eax
je     1147 <__pause+0x27>
lea    0x4(%rsp),%rdi
call   1040 <_sigsuspend@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
define i32 @__pause() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @SIG_BLOCK
%4 = call i32 @_sigprocmask(i32 %3, i32* null, i32* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %9
7: ; preds = %0
%8 = call i32 @_sigsuspend(i32* %2)
store i32 %8, i32* %1
br label %9
9: ; preds = %7, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
define i32 @__pause() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @SIG_BLOCK
%4 = call i32 @_sigprocmask(i32 %3, i32* null, i32* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @_sigsuspend(i32* %1)
br label %8
8: ; preds = %0, %6
%9 = phi i32 [ %7, %6 ], [ -1, %0 ]
ret i32 %9
}
/* Type definitions */
struct tempfile {
  int dummy;
};

/* Variables and functions */
struct tempfile *mks_tempfile_sm(char const *, int /*<<< orphan*/, int);
struct tempfile *mks_tempfile_m(const char *filename_template, int mode) {
  return mks_tempfile_sm(filename_template, 0, mode);
}


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

x86 assembly (clang, -O2):
<mks_tempfile_m>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <mks_tempfile_sm@plt>

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

LLVM IR (-O2):
%struct.tempfile = type { i32 }
define %struct.tempfile* @mks_tempfile_m(i8* %0, i32 %1) {
%3 = tail call %struct.tempfile* @mks_tempfile_sm(i8* %0, i32 0, i32 %1)
ret %struct.tempfile* %3
}
void foo265() {}


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

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

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

LLVM IR (-O2):
define void @foo265() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int (*)());
int main(void) {
  f(1, &main);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rsi
mov    $0x1,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 1, i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
ret i32 0
}
/* Variables and functions */
float acos(float);
scalar_t__ pow(float, int);
float sqrtf(scalar_t__);
float getAngle(float *val) {
  return acos(val[1] / sqrtf(pow(val[0], 2) + pow(val[1], 2)));
}


x86 assembly (clang, -O0):
<getAngle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
call   1030 <acos@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAngle>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
movss  %xmm1,0x4(%rsp)
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%r14
movss  0x4(%rbx),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rax,%r14
mov    %r14,%rdi
call   1040 <sqrtf@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <acos@plt>

LLVM IR (-O0):
define float @getAngle(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 1
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = call i64 @pow(float %8, i32 2)
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = call i64 @pow(float %12, i32 2)
%14 = add nsw i64 %9, %13
%15 = call float @sqrtf(i64 %14)
%16 = fdiv float %5, %15
%17 = call float @acos(float %16)
ret float %17
}

LLVM IR (-O2):
define float @getAngle(float* nocapture %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
%3 = load float, float* %2
%4 = load float, float* %0
%5 = tail call i64 @pow(float %4, i32 2)
%6 = load float, float* %2
%7 = tail call i64 @pow(float %6, i32 2)
%8 = add nsw i64 %7, %5
%9 = tail call float @sqrtf(i64 %8)
%10 = fdiv float %3, %9
%11 = tail call float @acos(float %10)
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "scmd [-c|-d] [-s] file [outfile]\n"
                  "-c compress\n"
                  "-d uncompress\n"
                  "-s print to standard output"
                  "Compress or uncompress file with snappy.\n"
                  "When no output file is specified write to file.snp\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [179 x i8] c"scmd [-c|-d] [-s] file [outfile]\0A-c compress\0A-d uncompress\0A-s print to standard outputCompress or uncompress file with snappy.\0AWhen no output file is specified write to file.snp\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [179 x i8] c"scmd [-c|-d] [-s] file [outfile]\0A-c compress\0A-d uncompress\0A-s print to standard outputCompress or uncompress file with snappy.\0AWhen no output file is specified write to file.snp\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
unsigned short __tzcnt_u16(unsigned short);
unsigned short test__tzcnt_u16(unsigned short __X) { return __tzcnt_u16(__X); }


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

x86 assembly (clang, -O2):
<test__tzcnt_u16>:
jmp    1030 <__tzcnt_u16@plt>

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

LLVM IR (-O2):
define zeroext i16 @test__tzcnt_u16(i16 zeroext %0) {
%2 = tail call zeroext i16 @__tzcnt_u16(i16 zeroext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_and_exit(char *, int);
void gl_setpalettecolor(int i, int r, int g, int b) {
  cleanup_and_exit("palette not implemented", 1);
}


x86 assembly (clang, -O0):
<gl_setpalettecolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
call   1030 <cleanup_and_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_setpalettecolor>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <cleanup_and_exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"palette not implemented\00"
define void @gl_setpalettecolor(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 = call i32 @cleanup_and_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"palette not implemented\00"
define void @gl_setpalettecolor(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @cleanup_and_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x24() {
  Assert_real((isbdigit(36) == 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_isbdigit.c",
              185, ("isbdigit should be 0 for $"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x24>:
push   %rax
mov    $0x24,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xb9,%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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for $\00"
define void @t_isbdigit_0x24() {
%1 = call i64 @isbdigit(i32 36)
%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 185, 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for $\00"
define void @t_isbdigit_0x24() {
%1 = tail call i64 @isbdigit(i32 36)
%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 185, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int char2num(int num, char c) {
  int to_num = c - '0';
  if (!(to_num <= 9 && to_num >= 0)) {
    return -1;
  }
  return num * 10 + to_num;
}


x86 assembly (clang, -O0):
<char2num>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jg     112b <char2num+0x2b>
cmpl   $0x0,-0x10(%rbp)
jge    1137 <char2num+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <char2num+0x41>
imul   $0xa,-0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char2num>:
lea    -0x30(%rsi),%eax
cmp    $0xa,%al
lea    (%rdi,%rdi,4),%eax
lea    -0x30(%rsi,%rax,2),%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @char2num(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
store i32 %0, i32* %4
store i8 %1, i8* %5
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp sle i32 %10, 9
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp sge i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %12, %2
store i32 -1, i32* %3
br label %21
16: ; preds = %12
%17 = load i32, i32* %4
%18 = mul nsw i32 %17, 10
%19 = load i32, i32* %6
%20 = add nsw i32 %18, %19
store i32 %20, i32* %3
br label %21
21: ; preds = %16, %15
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @char2num(i32 %0, i8 signext %1) {
%3 = add i8 %1, -48
%4 = icmp ult i8 %3, 10
%5 = sext i8 %1 to i32
%6 = mul nsw i32 %0, 10
%7 = add i32 %6, -48
%8 = add i32 %7, %5
%9 = select i1 %4, i32 %8, i32 -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void del(void *d) {
  free(d);
  return;
}


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

x86 assembly (clang, -O2):
<del>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @del(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_warning_footer() {
  printf("\n!!!!!!!!! W A R N I N G !!!!!!!!!\n\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"\0A!!!!!!!!! W A R N I N G !!!!!!!!!\0A\0A\00"
define void @print_warning_footer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"\0A!!!!!!!!! W A R N I N G !!!!!!!!!\0A\00"
define void @print_warning_footer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret void
}
void enable_apic_mode(void) {}


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

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

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

LLVM IR (-O2):
define void @enable_apic_mode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookreal32array(char *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 32));
}


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

x86 assembly (clang, -O2):
<lookreal32array>:
shl    $0x5,%esi
jmp    1030 <lookNarray@plt>

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

LLVM IR (-O2):
define void @lookreal32array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 5
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crypto_scalarmult_nistp256_base(unsigned char *,
                                                   unsigned char *);
int /*<<< orphan*/ randombytes(unsigned char *, int);
void crypto_box_nistp256aes256gcm_keypair(unsigned char *pk,
                                          unsigned char *sk) {
  randombytes(sk, 32);
  crypto_scalarmult_nistp256_base(pk, sk);
  return;
}


x86 assembly (clang, -O0):
<crypto_box_nistp256aes256gcm_keypair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1040 <randombytes@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <crypto_scalarmult_nistp256_base@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_box_nistp256aes256gcm_keypair>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    $0x20,%esi
call   1040 <randombytes@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <crypto_scalarmult_nistp256_base@plt>

LLVM IR (-O0):
define void @crypto_box_nistp256aes256gcm_keypair(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @randombytes(i8* %5, i32 32)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @crypto_scalarmult_nistp256_base(i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
define void @crypto_box_nistp256aes256gcm_keypair(i8* %0, i8* %1) {
%3 = tail call i32 @randombytes(i8* %1, i32 32)
%4 = tail call i32 @crypto_scalarmult_nistp256_base(i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_1_le(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_int8_le(uint8_t *dst, uint32_t offs,
                                  const int8_t *src) {
  uint8_t tmp[1] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_1_le(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_int8_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x1c(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <ivory_serialize_pack_prim_1_le@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_int8_le>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_1_le@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_int8_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [1 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [1 x i32]* %7 to i8*
%9 = bitcast [1 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 4)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_1_le(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_int8_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca [1 x i32]
%5 = bitcast [1 x i32]* %4 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
store i32 0, i32* %6
%7 = bitcast [1 x i32]* %4 to i32**
%8 = call i32 @memcpy(i32** %7, i32* %2, i32 4)
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = call i32 @ivory_serialize_pack_prim_1_le(i32* %10, i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *p) {
  printf("usage: %s -o <output base> -n <input value> [-i <input base>] "
         "[-1|-2] [-h]\n",
         p);
}


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

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

LLVM IR (-O0):
@.str = [76 x i8] c"usage: %s -o <output base> -n <input value> [-i <input base>] [-1|-2] [-h]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"usage: %s -o <output base> -n <input value> [-i <input base>] [-1|-2] [-h]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cls();
void lcd_home(void) { lcd_cls(); }


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

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

LLVM IR (-O0):
define void @lcd_home() {
%1 = call i32 (...) @lcd_cls()
ret void
}

LLVM IR (-O2):
define void @lcd_home() {
%1 = tail call i32 (...) @lcd_cls()
ret void
}
/* Type definitions */
struct dirent {
  int dummy;
};

/* Variables and functions */
scalar_t__ dir_entry_has_suffix(struct dirent *, char *);
bool source_filter(struct dirent *entry) {
  return dir_entry_has_suffix(entry, ".c") || dir_entry_has_suffix(entry, ".h");
}


x86 assembly (clang, -O0):
<source_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <dir_entry_has_suffix@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1158 <source_filter+0x48>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <dir_entry_has_suffix@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<source_filter>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <dir_entry_has_suffix@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <source_filter+0x1f>
pop    %rbx
ret
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <dir_entry_has_suffix@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [3 x i8] c".c\00"
@.str.1 = [3 x i8] c".h\00"
define i32 @source_filter(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = call i64 @dir_entry_has_suffix(%struct.dirent* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.dirent*, %struct.dirent** %2
%8 = call i64 @dir_entry_has_suffix(%struct.dirent* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [3 x i8] c".c\00"
@.str.1 = [3 x i8] c".h\00"
define i32 @source_filter(%struct.dirent* %0) {
%2 = tail call i64 @dir_entry_has_suffix(%struct.dirent* %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 %4, label %8
4: ; preds = %1
%5 = tail call i64 @dir_entry_has_suffix(%struct.dirent* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void FatalError(char *msg) {
  printf("%s", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<FatalError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @FatalError(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 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @FatalError(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 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Control_SaveConfig();
void Control_Sleep(void) { Control_SaveConfig(); }


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

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

LLVM IR (-O0):
define void @Control_Sleep() {
%1 = call i32 (...) @Control_SaveConfig()
ret void
}

LLVM IR (-O2):
define void @Control_Sleep() {
%1 = tail call i32 (...) @Control_SaveConfig()
ret void
}
void JmpN() {}


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

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

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

LLVM IR (-O2):
define void @JmpN() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_16C5X() { DeinitFields(); }


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

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

LLVM IR (-O0):
define void @SwitchFrom_16C5X() {
%1 = call i32 (...) @DeinitFields()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_16C5X() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
void __attribute__((weak)) _board_init(void) { return; }


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

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

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

LLVM IR (-O2):
define weak void @_board_init() {
ret void
}
/* Variables and functions */
int shrfunc(int);
int main(void) {
  int y;
  y = shrfunc(1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @shrfunc(i32 1)
ret i32 0
}
long double bar(long double a, long double b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    1132 <bar+0x32>
jmp    1127 <bar+0x27>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1138 <bar+0x38>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomi %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

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

LLVM IR (-O2):
define x86_fp80 @bar(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ogt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
int fn1(int x, int y) { return x & ~(x & y); }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = and i32 %6, %7
%9 = xor i32 %8, -1
%10 = and i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @fn1(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void __wleu08(uint8_t *buffer, uint8_t value) {
  buffer[0] = (uint8_t)(value >> 0) & 0xFF;
}


x86 assembly (clang, -O0):
<__wleu08>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @__wleu08(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
store i32 %3, i32* %0
ret void
}
void CL_UIModule_MM_UIReply(int action, const char *data) {}


x86 assembly (clang, -O0):
<CL_UIModule_MM_UIReply>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @CL_UIModule_MM_UIReply(i32 %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct s_console {
  int dummy;
};

/* Variables and functions */
int consoleOut(struct s_console *, char const *, int const);
int consoleMsgN(struct s_console *console, const char *msg, const int msglen) {
  return consoleOut(console, msg, msglen);
}


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

x86 assembly (clang, -O2):
<consoleMsgN>:
jmp    1030 <consoleOut@plt>

LLVM IR (-O0):
%struct.s_console = type { i32 }
define i32 @consoleMsgN(%struct.s_console* %0, i8* %1, i32 %2) {
%4 = alloca %struct.s_console*
%5 = alloca i8*
%6 = alloca i32
store %struct.s_console* %0, %struct.s_console** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.s_console*, %struct.s_console** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @consoleOut(%struct.s_console* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.s_console = type { i32 }
define i32 @consoleMsgN(%struct.s_console* %0, i8* %1, i32 %2) {
%4 = tail call i32 @consoleOut(%struct.s_console* %0, i8* %1, i32 %2)
ret i32 %4
}
void ebsa110_mask_irq(unsigned int irq) {
  *((volatile unsigned char *)0xf3000000) = 1 << irq;
}


x86 assembly (clang, -O0):
<ebsa110_mask_irq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,%cl
mov    $0xf3000000,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebsa110_mask_irq>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    $0xf3000000,%ecx
mov    %al,(%rcx)
ret

LLVM IR (-O0):
define void @ebsa110_mask_irq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = trunc i32 %4 to i8
store volatile i8 %5, i8* inttoptr (i64 4076863488 to i8*)
ret void
}

LLVM IR (-O2):
define void @ebsa110_mask_irq(i32 %0) {
%2 = shl nuw i32 1, %0
%3 = trunc i32 %2 to i8
store volatile i8 %3, i8* inttoptr (i64 4076863488 to i8*)
ret void
}
__attribute__((no, noclone)) unsigned __int128 t110_4sub(unsigned char x) {
  unsigned char y = ((unsigned char)0x7f + 4);
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t110_4sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movb   $0x83,-0x12(%rbp)
movzbl -0x11(%rbp),%eax
mov    %eax,%edx
movzbl -0x12(%rbp),%eax
xor    %ecx,%ecx
sub    %rax,%rdx
sbb    %rcx,%rcx
setb   %al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    114c <t110_4sub+0x3c>
jmp    1153 <t110_4sub+0x43>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t110_4sub>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
xor    %ebx,%ebx
sub    $0x83,%r14
sbb    %rbx,%rbx
jae    112c <t110_4sub+0x1c>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t110_4sub(i8 zeroext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i8
%5 = alloca i128
store i8 %0, i8* %3
store i8 -125, i8* %4
%6 = load i8, i8* %3
%7 = load i8, i8* %4
%8 = zext i8 %6 to i128
%9 = zext i8 %7 to i128
%10 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %8, i128 %9)
%11 = extractvalue { i128, i1 } %10, 1
%12 = extractvalue { i128, i1 } %10, 0
store i128 %12, i128* %5
br i1 %11, label %13, label %15
13: ; preds = %1
%14 = call i32 (...) @bar()
br label %15
15: ; preds = %13, %1
%16 = load i128, i128* %5
store i128 %16, i128* %2
%17 = bitcast i128* %2 to { i64, i64 }*
%18 = load { i64, i64 }, { i64, i64 }* %17
ret { i64, i64 } %18
}

LLVM IR (-O2):
define { i64, i64 } @t110_4sub(i8 zeroext %0) {
%2 = zext i8 %0 to i128
%3 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %2, i128 131)
%4 = extractvalue { i128, i1 } %3, 1
%5 = extractvalue { i128, i1 } %3, 0
br i1 %4, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @bar()
br label %8
8: ; preds = %6, %1
%9 = trunc i128 %5 to i64
%10 = lshr i128 %5, 64
%11 = trunc i128 %10 to i64
%12 = insertvalue { i64, i64 } poison, i64 %9, 0
%13 = insertvalue { i64, i64 } %12, i64 %11, 1
ret { i64, i64 } %13
}
/* Variables and functions */
int /*<<< orphan*/ WaitMouseRight275();
void waitmouseright() { WaitMouseRight275(); }


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

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

LLVM IR (-O0):
define void @waitmouseright() {
%1 = call i32 (...) @WaitMouseRight275()
ret void
}

LLVM IR (-O2):
define void @waitmouseright() {
%1 = tail call i32 (...) @WaitMouseRight275()
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t data_oid_to_ledger_oid(uint64_t oid) {
  return (UINT64_C(1) << 59) | oid;
}


x86 assembly (clang, -O0):
<data_oid_to_ledger_oid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <UINT64_C@plt>
mov    $0x3b,%ecx
shl    %cl,%eax
or     -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_oid_to_ledger_oid>:
mov    $0x1,%edi
jmp    1030 <UINT64_C@plt>

LLVM IR (-O0):
define i32 @data_oid_to_ledger_oid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @UINT64_C(i32 1)
%4 = shl i32 %3, 59
%5 = load i32, i32* %2
%6 = or i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @data_oid_to_ledger_oid(i32 %0) {
%2 = tail call i32 @UINT64_C(i32 1)
ret i32 poison
}
void closeNotify() { return; }


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

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

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

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