xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("date");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"date\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int is_builtin(char *cmd) {
  if (strcmp(cmd, "cd") == 0) {
    return 1;
  } else if (strcmp(cmd, "myuid") == 0) {
    return 1;
  } else {
    return 0;
  }
}


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

x86 assembly (clang, -O2):
<is_builtin>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <is_builtin+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"cd\00"
@.str.1 = [6 x i8] c"myuid\00"
define i32 @is_builtin(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq 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
}
int test_imm_25int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x25 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_25int64_midword_mem>:
testb  $0x25,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_25int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2424832
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int answer(void) { return 6 * 9; }


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

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

LLVM IR (-O0):
define i32 @answer() {
ret i32 54
}

LLVM IR (-O2):
define i32 @answer() {
ret i32 54
}
void free_ivector(v, nl, nh) int *v;
long nh, nl;
{ free((char *)(v + nl - 1)); }


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

x86 assembly (clang, -O2):
<free_ivector>:
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i32, i32* %7, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 -1
%11 = bitcast i32* %10 to i8*
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = bitcast i32* %5 to i8*
tail call void @free(i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
scalar_t__ index(char *, char);
int ignore_line(FILE *fp, char *buf, int bufsiz) {
  do {
    if (index(buf, '\n'))
      return 1;
  } while (fgets(buf, bufsiz, fp) != NULL);
  return 0;
}


x86 assembly (clang, -O0):
<ignore_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xa,%esi
call   1030 <index@plt>
cmp    $0x0,%rax
je     1157 <ignore_line+0x37>
movl   $0x1,-0x4(%rbp)
jmp    117d <ignore_line+0x5d>
jmp    115c <ignore_line+0x3c>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1133 <ignore_line+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_line>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
nopl   (%rax)
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <index@plt>
test   %rax,%rax
jne    1159 <ignore_line+0x39>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
jne    1130 <ignore_line+0x10>
xor    %eax,%eax
jmp    115e <ignore_line+0x3e>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ignore_line(i32* nocapture %0, i8* %1, i32 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i64 @index(i8* %1, i8 signext 10)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32* @fgets(i8* %1, i32 %2, i32* %0)
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %4
10: ; preds = %7, %4
%11 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
int /*<<< orphan*/ outint(int);
int /*<<< orphan*/ outstrg(char const *);
scalar_t__ strlen(char const *);
void outname(const char *name) {
  if (name == NULL)
    errx(1, "internal error: outname() 1");
  outint((int)strlen(name));
  outstrg(name);
}


x86 assembly (clang, -O0):
<outname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1168 <outname+0x28>
mov    $0x1,%edi
lea    0xe9d(%rip),%rsi
call   1040 <errx@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
call   1050 <outint@plt>
mov    -0x8(%rbp),%rdi
call   1060 <outstrg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outname>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    115a <outname+0x1a>
lea    0xeb0(%rip),%rsi
mov    $0x1,%edi
call   1040 <errx@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
call   1050 <outint@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <outstrg@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"internal error: outname() 1\00"
define void @outname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @errx(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @outint(i32 %10)
%12 = load i8*, i8** %2
%13 = call i32 @outstrg(i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"internal error: outname() 1\00"
define void @outname(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = trunc i64 %6 to i32
%8 = tail call i32 @outint(i32 %7)
%9 = tail call i32 @outstrg(i8* %0)
ret void
}
int do_663() { return 663; }


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

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

LLVM IR (-O0):
define i32 @do_663() {
ret i32 663
}

LLVM IR (-O2):
define i32 @do_663() {
ret i32 663
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern long shmem_long_swap(long *target, long value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_long_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define i64 @shmem_long_swap(i64* %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i32
store i64* %0, i64** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define i64 @shmem_long_swap(i64* nocapture readnone %0, i64 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i64 undef
}
int test_imm_CBuint32_mem(unsigned int *val) {
  return ((*val) & (0xCB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CBuint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xcb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CBuint32_mem>:
testb  $0xcb,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CBuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 203
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
void fgetc_256_good(FILE *f) {
  int arr[256];
  int c = fgetc(f);
  if (c >= 0) {
    arr[c] = 42;
  }
}


x86 assembly (clang, -O0):
<fgetc_256_good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x414(%rbp)
cmpl   $0x0,-0x414(%rbp)
jl     114d <fgetc_256_good+0x3d>
movslq -0x414(%rbp),%rax
movl   $0x2a,-0x410(%rbp,%rax,4)
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetc_256_good>:
jmp    1030 <fgetc@plt>

LLVM IR (-O0):
define void @fgetc_256_good(i32* %0) {
%2 = alloca i32*
%3 = alloca [256 x i32]
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 %11
store i32 42, i32* %12
br label %13
13: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @fgetc_256_good(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_svg_point();
void Reset_SVG_Point() { reset_svg_point(); }


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

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

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

LLVM IR (-O2):
define void @Reset_SVG_Point() {
%1 = tail call i32 (...) @reset_svg_point()
ret void
}
void freeThreeDigits(int *value) {}


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

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

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

LLVM IR (-O2):
define void @freeThreeDigits(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, const char *argv[]) {
  fprintf(stdout, "stdout - Output\n");
  fprintf(stderr, "stderr - Error\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"stdout - Output\0A\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"stderr - Error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"stdout - Output\0A\00"
@stderr = global i32 0
@.str.1 = [16 x i8] c"stderr - Error\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct utimbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_utime;
int syscall(int /*<<< orphan*/, char const *, struct utimbuf const *);
int utime(const char *filename, const struct utimbuf *times) {
  return syscall(SYS_utime, filename, times);
}


x86 assembly (clang, -O0):
<utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utime>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.utimbuf = type { i32 }
@SYS_utime = global i32 0
define i32 @utime(i8* %0, %struct.utimbuf* %1) {
%3 = alloca i8*
%4 = alloca %struct.utimbuf*
store i8* %0, i8** %3
store %struct.utimbuf* %1, %struct.utimbuf** %4
%5 = load i32, i32* @SYS_utime
%6 = load i8*, i8** %3
%7 = load %struct.utimbuf*, %struct.utimbuf** %4
%8 = call i32 @syscall(i32 %5, i8* %6, %struct.utimbuf* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.utimbuf = type { i32 }
@SYS_utime = global i32 0
define i32 @utime(i8* %0, %struct.utimbuf* %1) {
%3 = load i32, i32* @SYS_utime
%4 = tail call i32 @syscall(i32 %3, i8* %0, %struct.utimbuf* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int ph_http_destroy(void *handler) {
  free(handler);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ph_http_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ LOCK_EX;
scalar_t__ errno;
int flock(int, int /*<<< orphan*/);
int zflock_exclusive(int fd) {
  int ret;
  do {
    ret = flock(fd, LOCK_EX);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zflock_exclusive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <flock@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1158 <zflock_exclusive+0x48>
mov    0x2e93(%rip),%rax
mov    (%rax),%rax
mov    0x2e81(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    111b <zflock_exclusive+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zflock_exclusive>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ec7(%rip),%r14
mov    0x2eb0(%rip),%r15
mov    0x2ea1(%rip),%r12
nop
mov    (%r14),%esi
mov    %ebx,%edi
call   1030 <flock@plt>
test   %eax,%eax
jns    1147 <zflock_exclusive+0x37>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <zflock_exclusive+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LOCK_EX = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @zflock_exclusive(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %15, %1
%5 = load i32, i32* %2
%6 = load i32, i32* @LOCK_EX
%7 = call i32 @flock(i32 %5, i32 %6)
store i32 %7, i32* %3
br label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i64, i64* @errno
%13 = load i64, i64* @EINTR
%14 = icmp eq i64 %12, %13
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ false, %8 ], [ %14, %11 ]
br i1 %16, label %4, label %17
17: ; preds = %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@LOCK_EX = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @zflock_exclusive(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @LOCK_EX
%4 = tail call i32 @flock(i32 %0, i32 %3)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %2, label %10
10: ; preds = %2
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ RAND_MAX;

/* Variables and functions */
float f_max(int, float);
float floor(float);
scalar_t__ rand();
float f_random(float x) {
  return floor(((float)rand() / ((float)(RAND_MAX) + (float)(1))) *
               (floor(f_max(1, x))));
}


x86 assembly (clang, -O0):
<f_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
cvtsi2ss %rax,%xmm0
movss  0xeaf(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <f_max@plt>
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_random>:
push   %rax
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x4(%rsp)
mov    $0x1,%edi
movss  (%rsp),%xmm0
call   1040 <f_max@plt>
call   1030 <floorf@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define float @f_random(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = fdiv float %4, 1.000000e+00
%6 = load float, float* %2
%7 = call float @f_max(i32 1, float %6)
%8 = call float @floor(float %7)
%9 = fmul float %5, %8
%10 = call float @floor(float %9)
ret float %10
}

LLVM IR (-O2):
define float @f_random(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = tail call float @f_max(i32 1, float %0)
%5 = tail call float @llvm.floor.f32(float %4)
%6 = fmul float %5, %3
%7 = tail call float @llvm.floor.f32(float %6)
ret float %7
}
void xenbus_backend_suspend(int (*fn)(struct device *, void *)) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define void @xenbus_backend_suspend(i32 (%struct.device*, i8*)* %0) {
%2 = alloca i32 (%struct.device*, i8*)*
store i32 (%struct.device*, i8*)* %0, i32 (%struct.device*, i8*)** %2
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
define void @xenbus_backend_suspend(i32 (%struct.device*, i8*)* nocapture %0) {
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
unsigned long getticks();
uint32_t fast_rand() { return ((getticks() & 4294967295UL) >> 4); }


x86 assembly (clang, -O0):
<fast_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getticks@plt>
movabs $0xffffffff,%rcx
and    %rcx,%rax
shr    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_rand>:
push   %rax
xor    %eax,%eax
call   1030 <getticks@plt>
shr    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @fast_rand() {
%1 = call i64 (...) @getticks()
%2 = and i64 %1, 4294967295
%3 = lshr i64 %2, 4
ret i64 %3
}

LLVM IR (-O2):
define i64 @fast_rand() {
%1 = tail call i64 (...) @getticks()
%2 = lshr i64 %1, 4
%3 = and i64 %2, 268435455
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ MENU;
typedef int /*<<< orphan*/ ITEM;

/* Variables and functions */
int /*<<< orphan*/ *new_menu(int /*<<< orphan*/ **);
int /*<<< orphan*/ set_menu_format(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ set_menu_mark(int /*<<< orphan*/ *, char *);
MENU *add_menu(ITEM **items) {
  MENU *local_menu;
  local_menu = new_menu((ITEM **)items);
  set_menu_format(local_menu, 5, 1);
  set_menu_mark(local_menu, " * ");
  return local_menu;
}


x86 assembly (clang, -O0):
<add_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <new_menu@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
call   1050 <set_menu_format@plt>
mov    -0x10(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <set_menu_mark@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_menu>:
push   %rbx
call   1040 <new_menu@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x5,%esi
mov    $0x1,%edx
call   1050 <set_menu_format@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
call   1030 <set_menu_mark@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" * \00"
define i32* @add_menu(i32** %0) {
%2 = alloca i32**
%3 = alloca i32*
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = call i32* @new_menu(i32** %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @set_menu_format(i32* %6, i32 5, i32 1)
%8 = load i32*, i32** %3
%9 = call i32 @set_menu_mark(i32* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
@.str = [4 x i8] c" * \00"
define i32* @add_menu(i32** %0) {
%2 = tail call i32* @new_menu(i32** %0)
%3 = tail call i32 @set_menu_format(i32* %2, i32 5, i32 1)
%4 = tail call i32 @set_menu_mark(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ nl_sentence_dispose(void *);
void nl_sentence_disposer_(void *in_context, void *in_item) {
  nl_sentence_dispose(in_item);
}


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

x86 assembly (clang, -O2):
<nl_sentence_disposer_>:
mov    %rsi,%rdi
jmp    1030 <nl_sentence_dispose@plt>

LLVM IR (-O0):
define void @nl_sentence_disposer_(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 @nl_sentence_dispose(i8* %5)
ret void
}

LLVM IR (-O2):
define void @nl_sentence_disposer_(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @nl_sentence_dispose(i8* %1)
ret void
}
/* Variables and functions */
int max(int, int);
int min(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d %d", max(a, b), min(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1060 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <max@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <min@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <max@plt>
mov    %eax,%ebp
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <min@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @max(i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @min(i32 %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ intToHex(unsigned char, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
void addValueU8(char *dst, char *str, unsigned char value) {
  char v[16];
  strcat(dst, str);
  intToHex(value, v, 2);
  strcat(dst, v);
}


x86 assembly (clang, -O0):
<addValueU8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x11(%rbp),%al
lea    -0x30(%rbp),%rsi
mov    $0x2,%edx
movzbl %al,%edi
call   1030 <intToHex@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addValueU8>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %rdi,%rbx
call   1040 <strcat@plt>
mov    %rsp,%r14
mov    %ebp,%edi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <intToHex@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @addValueU8(i8* %0, i8* %1, i8 zeroext %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = tail call i32 @strcat(i8* %0, i8* %1)
%7 = call i32 @intToHex(i8 zeroext %2, i8* %5, i32 2)
%8 = call i32 @strcat(i8* %0, i8* %5)
ret void
}
/* Variables and functions */
char **ft_strsplit(char const *, char);
char **ft_splitwhitespaces(const char *str) { return (ft_strsplit(str, ' ')); }


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

x86 assembly (clang, -O2):
<ft_splitwhitespaces>:
mov    $0x20,%esi
jmp    1030 <ft_strsplit@plt>

LLVM IR (-O0):
define i8** @ft_splitwhitespaces(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8** @ft_strsplit(i8* %3, i8 signext 32)
ret i8** %4
}

LLVM IR (-O2):
define i8** @ft_splitwhitespaces(i8* %0) {
%2 = tail call i8** @ft_strsplit(i8* %0, i8 signext 32)
ret i8** %2
}
int compFn(const void *a, const void *b) {
  return (*(int **)a)[1] - (*(int **)b)[1];
}


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

x86 assembly (clang, -O2):
<compFn>:
mov    (%rdi),%rax
mov    0x4(%rax),%eax
mov    (%rsi),%rcx
sub    0x4(%rcx),%eax
ret

LLVM IR (-O0):
define i32 @compFn(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 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32**
%12 = load i32*, i32** %11
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = sub nsw i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32**
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* %5
%7 = bitcast i8* %1 to i32**
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = sub nsw i32 %6, %10
ret i32 %11
}
/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_char(char const k1, char const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_char>:
xor    %eax,%eax
cmp    %sil,%dil
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_char(i8 signext %0, i8 signext %1) {
%3 = icmp slt i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void deinit() {}


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

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

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

LLVM IR (-O2):
define void @deinit() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void print_buf(uint8_t *buf, size_t len) {
  for (int i = 0; i < len; ++i) {
    printf("%02X ", (unsigned)buf[i]);
  }
}


x86 assembly (clang, -O0):
<print_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115d <print_buf+0x4d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_buf+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_buf>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1145 <print_buf+0x35>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_buf+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%02X \00"
define void @print_buf(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i32
store i64* %0, i64** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %6
%12 = load i64*, i64** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %12, i64 %14
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02X \00"
define void @print_buf(i64* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %4, label %5
}
int test03(int a, int b, int c, int d) {
  int x = a != b;
  int y = c != d;
  return x == y;
}


x86 assembly (clang, -O0):
<test03>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03>:
cmp    %esi,%edi
sete   %al
cmp    %ecx,%edx
setne  %cl
xor    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test03(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp ne i32 %11, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %9
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = icmp ne i32 %15, %16
%18 = zext i1 %17 to i32
store i32 %18, i32* %10
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = icmp eq i32 %19, %20
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @test03(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %1
%6 = icmp ne i32 %2, %3
%7 = xor i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
bool nrf52_errata_38(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_38() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xe0() {
  Assert_real((islower(224) == 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_islower.c",
              1125, ("islower should be 0 for 0xe0"));
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ sched_setaffinity(int /*<<< orphan*/, int,
                                     int /*<<< orphan*/ *);
void run_on(int cpu) {
  cpu_set_t mask;
  CPU_ZERO(&mask);
  CPU_SET(cpu, &mask);
  sched_setaffinity(0, sizeof(mask), &mask);
}


x86 assembly (clang, -O0):
<run_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_on>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @run_on(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %3)
ret void
}

LLVM IR (-O2):
define void @run_on(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %2)
ret void
}
__typeof__(isupper("")) test_isupper_62(void) { return isupper(""); }


x86 assembly (clang, -O0):
<test_isupper_62>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rax
mov    %eax,%edi
call   1030 <isupper@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_isupper_62() {
%1 = call i32 @isupper(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_isupper_62() {
%1 = tail call i32 @isupper(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int d[40000];
  d[0] = 0;
  exit(0);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [40000 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [40000 x i32], [40000 x i32]* %2, i64 0, i64 0
store i32 0, i32* %3
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR79_set(void) { return U_WMRCORENONE_set("U_WMR79"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR79\00"
define i8* @U_WMR79_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR79\00"
define i8* @U_WMR79_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ memcpy(char *, char *, size_t);
wchar_t *wmemcpy(wchar_t *s1, const wchar_t *s2, size_t n) {
  return (wchar_t *)memcpy((char *)s1, (char *)s2, n);
}


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

x86 assembly (clang, -O2):
<wmemcpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %5
%10 = bitcast i32* %9 to i8*
%11 = load i64, i64* %6
%12 = call i64 @memcpy(i8* %8, i8* %10, i64 %11)
%13 = inttoptr i64 %12 to i32*
ret i32* %13
}

LLVM IR (-O2):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = bitcast i32* %0 to i8*
%5 = bitcast i32* %1 to i8*
%6 = tail call i64 @memcpy(i8* %4, i8* %5, i64 %2)
%7 = inttoptr i64 %6 to i32*
ret i32* %7
}