xunge/DecIR huggingface dataset:
/* Type definitions */
struct sigevent {
  int dummy;
};
struct aiocb64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int lio_listio64(int mode, struct aiocb64 *const list[], int nent,
                 struct sigevent *sig) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<lio_listio64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ecf(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lio_listio64>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.aiocb64 = type { i32 }
%struct.sigevent = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @lio_listio64(i32 %0, %struct.aiocb64** %1, i32 %2, %struct.sigevent* %3) {
%5 = alloca i32
%6 = alloca %struct.aiocb64**
%7 = alloca i32
%8 = alloca %struct.sigevent*
store i32 %0, i32* %5
store %struct.aiocb64** %1, %struct.aiocb64*** %6
store i32 %2, i32* %7
store %struct.sigevent* %3, %struct.sigevent** %8
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.aiocb64 = type { i32 }
%struct.sigevent = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @lio_listio64(i32 %0, %struct.aiocb64** nocapture readnone %1, i32 %2, %struct.sigevent* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ must_fail(char *, int);
void *must_calloc(int nmemb, int size) {
  void *mem = calloc(nmemb, size);
  if (!mem)
    must_fail("calloc", size * nmemb);
  return mem;
}


x86 assembly (clang, -O0):
<must_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <must_calloc+0x3b>
mov    -0x8(%rbp),%esi
imul   -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <must_fail@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<must_calloc>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%r14d
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <must_calloc+0x28>
imul   %r14d,%ebp
lea    0xebf(%rip),%rdi
mov    %ebp,%esi
call   1030 <must_fail@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define noalias i8* @must_calloc(i32 %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = mul nsw i32 %1, %0
%7 = tail call i32 @must_fail(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
void call3b(unsigned char *ucp, unsigned short *usp, unsigned int *uip,
            unsigned long *ulp) {
  ucp = 0;
  usp = 0;
  uip = 0;
  ulp = 0;
}


x86 assembly (clang, -O0):
<call3b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call3b(i8* %0, i16* %1, i32* %2, i64* %3) {
%5 = alloca i8*
%6 = alloca i16*
%7 = alloca i32*
%8 = alloca i64*
store i8* %0, i8** %5
store i16* %1, i16** %6
store i32* %2, i32** %7
store i64* %3, i64** %8
store i8* null, i8** %5
store i16* null, i16** %6
store i32* null, i32** %7
store i64* null, i64** %8
ret void
}

LLVM IR (-O2):
define void @call3b(i8* nocapture %0, i16* nocapture %1, i32* nocapture %2, i64* nocapture %3) {
ret void
}
void mcal_cpu_init() {}


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

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

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

LLVM IR (-O2):
define void @mcal_cpu_init() {
ret void
}
/* Variables and functions */
void free(void *);
void _FAT_mem_free(void *mem) { return free(mem); }


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

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

LLVM IR (-O2):
define void @_FAT_mem_free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
float rt(float val) { return (val * val); }


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

x86 assembly (clang, -O2):
<rt>:
mulss  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define float @rt(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int chdir(const char *patch) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<chdir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chdir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chdir(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int write(int, char const *, int /*<<< orphan*/);
int puts(const char *s) { return write(1, s, strlen(s)); }


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 1, i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @puts(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int application(int);
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int param = atoi(argv[1]);
  printf("perf: %d \n", application(param));
  return 1;
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <application@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1040 <application@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"perf: %d \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @application(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ PATH_MAX;
char *getcwd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ malloc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int pwd(int argc, char **argv) {
  printf("%s\n", getcwd(malloc(PATH_MAX), PATH_MAX));
  return 0;
}


x86 assembly (clang, -O0):
<pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1050 <malloc@plt>
mov    %eax,%edi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
call   1040 <getcwd@plt>
mov    %rax,%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwd>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
call   1050 <malloc@plt>
mov    (%rbx),%esi
mov    %eax,%edi
call   1040 <getcwd@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@PATH_MAX = global i32 0
define i32 @pwd(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @PATH_MAX
%6 = call i32 @malloc(i32 %5)
%7 = load i32, i32* @PATH_MAX
%8 = call i8* @getcwd(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@PATH_MAX = global i32 0
define i32 @pwd(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @PATH_MAX
%4 = tail call i32 @malloc(i32 %3)
%5 = load i32, i32* @PATH_MAX
%6 = tail call i8* @getcwd(i32 %4, i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main() {
  int a = 3;
  float b = 4.5;
  double c = 5.25;
  float sum;
  sum = a + b + c;
  printf("The sum of a, b, and c is %f.", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"The sum of a, b, and c is %f.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = alloca float
store i32 0, i32* %1
store i32 3, i32* %2
store float 4.500000e+00, float* %3
store double 5.250000e+00, double* %4
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to float
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = fpext float %9 to double
%11 = load double, double* %4
%12 = fadd double %10, %11
%13 = fptrunc double %12 to float
store float %13, float* %5
%14 = load float, float* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"The sum of a, b, and c is %f.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), float 1.275000e+01)
ret i32 0
}
/* Variables and functions */
int LOG_DEBUG;
#define LOG_INFO 129
#define LOG_NOTICE 128
int nm_utils_syslog_coerce_from_nm(int syslog_level) {
  switch (syslog_level) {
  case LOG_INFO:
    return LOG_DEBUG;
  case LOG_NOTICE:
    return LOG_INFO;
  default:
    return syslog_level;
  }
}


x86 assembly (clang, -O0):
<nm_utils_syslog_coerce_from_nm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80,%eax
je     1141 <nm_utils_syslog_coerce_from_nm+0x41>
jmp    111d <nm_utils_syslog_coerce_from_nm+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
jne    114d <nm_utils_syslog_coerce_from_nm+0x4d>
jmp    1130 <nm_utils_syslog_coerce_from_nm+0x30>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <nm_utils_syslog_coerce_from_nm+0x53>
movl   $0x81,-0x4(%rbp)
jmp    1153 <nm_utils_syslog_coerce_from_nm+0x53>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nm_utils_syslog_coerce_from_nm>:
cmp    $0x80,%edi
je     111c <nm_utils_syslog_coerce_from_nm+0x1c>
mov    %edi,%eax
cmp    $0x81,%edi
jne    111b <nm_utils_syslog_coerce_from_nm+0x1b>
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
ret
mov    $0x81,%eax
ret

LLVM IR (-O0):
@LOG_DEBUG = global i32 0
define i32 @nm_utils_syslog_coerce_from_nm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 129, label %5
i32 128, label %7
]
5: ; preds = %1
%6 = load i32, i32* @LOG_DEBUG
store i32 %6, i32* %2
br label %10
7: ; preds = %1
store i32 129, i32* %2
br label %10
8: ; preds = %1
%9 = load i32, i32* %3
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %7, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@LOG_DEBUG = global i32 0
define i32 @nm_utils_syslog_coerce_from_nm(i32 %0) {
switch i32 %0, label %4 [
i32 129, label %2
i32 128, label %5
]
2: ; preds = %1
%3 = load i32, i32* @LOG_DEBUG
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %2
%6 = phi i32 [ %0, %4 ], [ %3, %2 ], [ 129, %1 ]
ret i32 %6
}
void comm_bcast_double(double *p_double, int count) {}


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

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

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

LLVM IR (-O2):
define void @comm_bcast_double(double* nocapture %0, i32 %1) {
ret void
}
int __make_request(struct request_queue *q, struct bio *bio) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.bio = type opaque
define i32 @__make_request(%struct.request_queue* %0, %struct.bio* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.bio*
%5 = alloca i32
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.bio* %1, %struct.bio** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.bio = type opaque
define i32 @__make_request(%struct.request_queue* nocapture readnone %0, %struct.bio* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_waddnwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_waddnwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_waddnwstr+0x2a>
jmp    1170 <cmd_waddnwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_waddnwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_waddnwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_waddnwstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_waddnwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
long long and_ll(long long *, long long *);
long long intr_wrap_515(long long p1, long long p2) { return and_ll(&p1, &p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_515>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <and_ll@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @intr_wrap_515(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @and_ll(i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @intr_wrap_515(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @and_ll(i64* %3, i64* %4)
ret i64 %5
}
int ti_sqrt_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_sqrt_start(double* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M575_f(char *s) {
  debug("M575_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M575_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M575_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M575_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M575_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M575_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M575_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void InitModules() {
  typedef void(InitFunc)(void);
  extern InitFunc *UnitIniList[];
  for (InitFunc **p = UnitIniList; *p; p++) {
    (*p)();
  }
}


x86 assembly (clang, -O0):
<InitModules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed9(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1138 <InitModules+0x38>
mov    -0x8(%rbp),%rax
call   *(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <InitModules+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitModules>:
push   %rbx
mov    0x2ee0(%rip),%rbx
mov    (%rbx),%rax
test   %rax,%rax
je     112e <InitModules+0x2e>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   *%rax
mov    (%rbx),%rax
add    $0x8,%rbx
test   %rax,%rax
jne    1120 <InitModules+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@UnitIniList = external global [0 x void ()*]
define void @InitModules() {
%1 = alloca void ()**
store void ()** getelementptr inbounds ([0 x void ()*], [0 x void ()*]* @UnitIniList, i64 0, i64 0), void ()*** %1
br label %2
2: ; preds = %9, %0
%3 = load void ()**, void ()*** %1
%4 = load void ()*, void ()** %3
%5 = icmp ne void ()* %4, null
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load void ()**, void ()*** %1
%8 = load void ()*, void ()** %7
br label %9
9: ; preds = %6
%10 = load void ()**, void ()*** %1
%11 = getelementptr inbounds void ()*, void ()** %10, i32 1
store void ()** %11, void ()*** %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@UnitIniList = external global [0 x void ()*]
define void @InitModules() {
%1 = load void ()*, void ()** getelementptr inbounds ([0 x void ()*], [0 x void ()*]* @UnitIniList, i64 0, i64 0)
%2 = icmp eq void ()* %1, null
br i1 %2, label %3, label %4
3: ; preds = %4, %0
ret void
4: ; preds = %0, %4
%5 = phi void ()* [ %8, %4 ], [ %1, %0 ]
%6 = phi void ()** [ %7, %4 ], [ getelementptr inbounds ([0 x void ()*], [0 x void ()*]* @UnitIniList, i64 0, i64 0), %0 ]
tail call void %5()
%7 = getelementptr inbounds void ()*, void ()** %6, i64 1
%8 = load void ()*, void ()** %7
%9 = icmp eq void ()* %8, null
br i1 %9, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ open(char const *, int /*<<< orphan*/);
int tb_init_fd(int /*<<< orphan*/);
int tb_init_file(const char *name) { return tb_init_fd(open(name, O_RDWR)); }


x86 assembly (clang, -O0):
<tb_init_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%edi
call   1030 <tb_init_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tb_init_file>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tb_init_fd@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
define i32 @tb_init_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* %3, i32 %4)
%6 = call i32 @tb_init_fd(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@O_RDWR = global i32 0
define i32 @tb_init_file(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = tail call i32 @tb_init_fd(i32 %3)
ret i32 %4
}
void g_spaced_primes_closest() {}


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

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

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

LLVM IR (-O2):
define void @g_spaced_primes_closest() {
ret void
}
/* Variables and functions */
void __bsd_iconvlist(int (*)(unsigned int, char const *const *, void *),
                     void *);
void iconvlist_compat(int (*a)(unsigned int, const char *const *, void *),
                      void *b) {
  return __bsd_iconvlist(a, b);
}


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

x86 assembly (clang, -O2):
<iconvlist_compat>:
jmp    1030 <__bsd_iconvlist@plt>

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

LLVM IR (-O2):
define void @iconvlist_compat(i32 (i32, i8**, i8*)* %0, i8* %1) {
tail call void @__bsd_iconvlist(i32 (i32, i8**, i8*)* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
bool file_exists(const char *path) {
  int fd = open(path, 0, O_RDONLY);
  if (fd == -1)
    return false;
  close(fd);
  return true;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1159 <file_exists+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1168 <file_exists+0x48>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
xor    %ebx,%ebx
xor    %esi,%esi
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     1144 <file_exists+0x24>
mov    %eax,%edi
call   1030 <close@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDONLY
%7 = call i32 @open(i8* %5, i32 0, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @close(i32 %12)
store i32 1, i32* %2
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @file_exists(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @close(i32 %3)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 1, %5 ], [ 0, %1 ]
ret i32 %8
}
void *cmpxchg_atomicptr(void **pval, void *oldval, void *newval) {
  return __sync_val_compare_and_swap(pval, oldval, newval);
}


x86 assembly (clang, -O0):
<cmpxchg_atomicptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
sete   %cl
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpxchg_atomicptr>:
mov    %rsi,%rax
lock cmpxchg %rdx,(%rdi)
ret

LLVM IR (-O0):
define i8* @cmpxchg_atomicptr(i8** %0, i8* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8**, i8*** %4
%8 = bitcast i8** %7 to i64*
%9 = load i8*, i8** %5
%10 = ptrtoint i8* %9 to i64
%11 = load i8*, i8** %6
%12 = ptrtoint i8* %11 to i64
%13 = cmpxchg i64* %8, i64 %10, i64 %12 seq_cst seq_cst
%14 = extractvalue { i64, i1 } %13, 0
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @cmpxchg_atomicptr(i8** nocapture %0, i8* %1, i8* %2) {
%4 = bitcast i8** %0 to i64*
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %2 to i64
%7 = cmpxchg i64* %4, i64 %5, i64 %6 seq_cst seq_cst
%8 = extractvalue { i64, i1 } %7, 0
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}
int kv_matrix_new_size(int old_size) {
  int size = 0;
  if (old_size == 1)
    size = 4;
  else if (old_size < 10)
    size = old_size * 2;
  else
    size = (int)(old_size * 1.25) + 1;
  return size;
}


x86 assembly (clang, -O0):
<kv_matrix_new_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1124 <kv_matrix_new_size+0x24>
movl   $0x4,-0x8(%rbp)
jmp    115c <kv_matrix_new_size+0x5c>
cmpl   $0xa,-0x4(%rbp)
jge    113c <kv_matrix_new_size+0x3c>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <kv_matrix_new_size+0x57>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115c <kv_matrix_new_size+0x5c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kv_matrix_new_size>:
mov    $0x4,%eax
cmp    $0x1,%edi
je     1127 <kv_matrix_new_size+0x27>
cmp    $0x9,%edi
jg     1114 <kv_matrix_new_size+0x14>
add    %edi,%edi
mov    %edi,%eax
ret
cvtsi2sd %edi,%xmm0
mulsd  0xee0(%rip),%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @kv_matrix_new_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 4, i32* %3
br label %20
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, 2
store i32 %12, i32* %3
br label %19
13: ; preds = %7
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to double
%16 = fmul double %15, 1.250000e+00
%17 = fptosi double %16 to i32
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %13, %10
br label %20
20: ; preds = %19, %6
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @kv_matrix_new_size(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 10
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = shl nsw i32 %0, 1
br label %12
7: ; preds = %3
%8 = sitofp i32 %0 to double
%9 = fmul double %8, 1.250000e+00
%10 = fptosi double %9 to i32
%11 = add nsw i32 %10, 1
br label %12
12: ; preds = %1, %5, %7
%13 = phi i32 [ %6, %5 ], [ %11, %7 ], [ 4, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void manage_timeout(void) {
  (void)fprintf(stdout, "spedito su seriale: 0x11 0x22 0x33 0x44\n");
}


x86 assembly (clang, -O0):
<manage_timeout>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<manage_timeout>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [41 x i8] c"spedito su seriale: 0x11 0x22 0x33 0x44\0A\00"
define void @manage_timeout() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [41 x i8] c"spedito su seriale: 0x11 0x22 0x33 0x44\0A\00"
define void @manage_timeout() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
int cmpint(const void *p1, const void *p2) {
  return *(int const *)p1 > *(int const *)p2;
}


x86 assembly (clang, -O0):
<cmpint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpint>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @cmpint(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp sgt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @cmpint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ CL_Vid_Restart_f();
int /*<<< orphan*/ S_Init();
int /*<<< orphan*/ S_Shutdown();
void CL_Snd_Restart_f(void) {
  S_Shutdown();
  S_Init();
  CL_Vid_Restart_f();
}


x86 assembly (clang, -O0):
<CL_Snd_Restart_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <S_Shutdown@plt>
mov    $0x0,%al
call   1040 <S_Init@plt>
mov    $0x0,%al
call   1050 <CL_Vid_Restart_f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_Snd_Restart_f>:
push   %rax
xor    %eax,%eax
call   1030 <S_Shutdown@plt>
xor    %eax,%eax
call   1040 <S_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <CL_Vid_Restart_f@plt>

LLVM IR (-O0):
define void @CL_Snd_Restart_f() {
%1 = call i32 (...) @S_Shutdown()
%2 = call i32 (...) @S_Init()
%3 = call i32 (...) @CL_Vid_Restart_f()
ret void
}

LLVM IR (-O2):
define void @CL_Snd_Restart_f() {
%1 = tail call i32 (...) @S_Shutdown()
%2 = tail call i32 (...) @S_Init()
%3 = tail call i32 (...) @CL_Vid_Restart_f()
ret void
}
int kstrlen(char *str) {
  int i = 0;
  while (str[i] != 0) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<kstrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <kstrlen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <kstrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <kstrlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @kstrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x6c() {
  Assert_real((isgraph(108)),
              "/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_isgraph.c",
              545, ("isgraph should be 1 for l"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x6c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6c,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x221,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x6c>:
push   %rax
mov    $0x6c,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x221,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for l\00"
define void @t_isgraph_0x6c() {
%1 = call i32 @isgraph(i32 108)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for l\00"
define void @t_isgraph_0x6c() {
%1 = tail call i32 @isgraph(i32 108)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int bit_gravity;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
void set_XWindowAttributes_bit_gravity(void *_p, int _v) {
  ((XWindowAttributes *)_p)->bit_gravity = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XWindowAttributes_bit_gravity>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XWindowAttributes_bit_gravity(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %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 i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XWindowAttributes_bit_gravity(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
void assign_paren_bad() {
  bool *b = (bool *)malloc(sizeof(bool));
  int x = 42, y = 42;
  if (b) {
    *b = false;
    *b = (x == y);
    if (*b) {
      int *p = 0;
      *p = 5;
    }
    free(b);
  }
}


x86 assembly (clang, -O0):
<assign_paren_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x2a,-0xc(%rbp)
movl   $0x2a,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1195 <assign_paren_bad+0x75>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     118c <assign_paren_bad+0x6c>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_paren_bad>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @assign_paren_bad() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %1
store i32 42, i32* %2
store i32 42, i32* %3
%7 = load i32*, i32** %1
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %24
9: ; preds = %0
%10 = load i32*, i32** %1
store i32 0, i32* %10
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i32
%15 = load i32*, i32** %1
store i32 %14, i32* %15
%16 = load i32*, i32** %1
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %9
store i32* null, i32** %4
%20 = load i32*, i32** %4
store i32 5, i32* %20
br label %21
21: ; preds = %19, %9
%22 = load i32*, i32** %1
%23 = call i32 @free(i32* %22)
br label %24
24: ; preds = %21, %0
ret void
}

LLVM IR (-O2):
define void @assign_paren_bad() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
tail call void @llvm.assume(i1 %2)
ret void
}
int bearer_cap_is_audio(int cap) {
  switch (cap) {
  case 0x00:
  case 0x03:
  case 0x04:
    return 1;
  default:
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bearer_cap_is_audio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     112e <bearer_cap_is_audio+0x2e>
jmp    111a <bearer_cap_is_audio+0x1a>
mov    -0xc(%rbp),%eax
add    $0xfffffffd,%eax
sub    $0x1,%eax
ja     113a <bearer_cap_is_audio+0x3a>
jmp    112e <bearer_cap_is_audio+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1141 <bearer_cap_is_audio+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bearer_cap_is_audio>:
xor    %eax,%eax
cmp    $0x4,%edi
ja     1114 <bearer_cap_is_audio+0x14>
movslq %edi,%rax
lea    0xeef(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @bearer_cap_is_audio(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
i32 3, label %5
i32 4, label %5
]
5: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.bearer_cap_is_audio = [5 x i32] [i32 1, i32 0, i32 0, i32 1, i32 1]
define i32 @bearer_cap_is_audio(i32 %0) {
%2 = icmp ult i32 %0, 5
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [5 x i32], [5 x i32]* @switch.table.bearer_cap_is_audio, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timespec {
  long member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void utl_thread_msleep(unsigned long slp) {
  struct timespec req = {(time_t)(slp / 1000), (long)(slp % 1000 * 1000000UL)};
  nanosleep(&req, NULL);
}


x86 assembly (clang, -O0):
<utl_thread_msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
imul   $0xf4240,%rdx,%rax
mov    %eax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utl_thread_msleep>:
sub    $0x18,%rsp
mov    %rdi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
shr    $0x4,%rdx
movslq %edx,%rax
mov    %rax,0x8(%rsp)
imul   $0x3e8,%eax,%eax
sub    %eax,%edi
imul   $0xf4240,%edi,%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i32 }
define void @utl_thread_msleep(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timespec
store i64 %0, i64* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %2
%6 = udiv i64 %5, 1000
%7 = trunc i64 %6 to i32
%8 = sext i32 %7 to i64
store i64 %8, i64* %4
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%10 = load i64, i64* %2
%11 = urem i64 %10, 1000
%12 = mul i64 %11, 1000000
%13 = trunc i64 %12 to i32
store i32 %13, i32* %9
%14 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i64, i32 }
define void @utl_thread_msleep(i64 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%5 = udiv i64 %0, 1000
%6 = shl i64 %5, 32
%7 = ashr exact i64 %6, 32
store i64 %7, i64* %4
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%9 = urem i64 %0, 1000
%10 = trunc i64 %9 to i32
%11 = mul nuw nsw i32 %10, 1000000
store i32 %11, i32* %8
%12 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int uint16_t;
typedef int int32_t;

/* Variables and functions */
void GrOffScreen8BPPPixelDraw(void *pvDisplayData, int32_t i32X, int32_t i32Y,
                              uint32_t ui32Value) {
  uint8_t *pui8Data;
  ;
  pui8Data = (uint8_t *)pvDisplayData;
  pui8Data += (*(uint16_t *)(pui8Data + 1) * i32Y) + i32X + 6 + (256 * 3);
  *pui8Data = ui32Value;
}


x86 assembly (clang, -O0):
<GrOffScreen8BPPPixelDraw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%ecx
imul   -0x10(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    $0x6,%ecx
add    $0x300,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrOffScreen8BPPPixelDraw>:
imul   0x4(%rdi),%edx
lea    (%rsi,%rdx,1),%eax
add    $0x306,%eax
cltq
mov    %ecx,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @GrOffScreen8BPPPixelDraw(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = bitcast i8* %0 to i32*
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, %2
%10 = add i32 %1, 774
%11 = add i32 %10, %9
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %5, i64 %12
store i32 %3, i32* %13
ret void
}