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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sut_run()
ret i32 0
}
int openpipe(pv)
register int *pv;
{
  register int i;
  if ((i = pipe(pv)) < 0)
    err("can't create pipe - try again");
  return (i);
}


x86 assembly (clang, -O0):
<openpipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <pipe@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1151 <openpipe+0x31>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <err@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openpipe>:
push   %rbx
xor    %eax,%eax
call   1030 <pipe@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    113c <openpipe+0x1c>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1040 <err@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"can't create pipe - try again\00"
define i32 @openpipe(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 (i32*, ...) bitcast (i32 (...)* @pipe to i32 (i32*, ...)*)(i32* %4)
store i32 %5, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [30 x i8] c"can't create pipe - try again\00"
define i32 @openpipe(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @pipe to i32 (i32*, ...)*)(i32* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
void s3c_fb_setname(char *name) {}


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

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

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

LLVM IR (-O2):
define void @s3c_fb_setname(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat2_assign(float *, float *);
__attribute__((always_)) struct mat2 *psmat2_assign(struct mat2 *result,
                                                    struct mat2 *m) {
  mat2_assign((float *)result, (float *)m);
  return result;
}


x86 assembly (clang, -O0):
<psmat2_assign>:
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 <mat2_assign@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psmat2_assign>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat2_assign@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_assign(%struct.mat2* %0, %struct.mat2* %1) {
%3 = alloca %struct.mat2*
%4 = alloca %struct.mat2*
store %struct.mat2* %0, %struct.mat2** %3
store %struct.mat2* %1, %struct.mat2** %4
%5 = load %struct.mat2*, %struct.mat2** %3
%6 = bitcast %struct.mat2* %5 to float*
%7 = load %struct.mat2*, %struct.mat2** %4
%8 = bitcast %struct.mat2* %7 to float*
%9 = call i32 @mat2_assign(float* %6, float* %8)
%10 = load %struct.mat2*, %struct.mat2** %3
ret %struct.mat2* %10
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_assign(%struct.mat2* returned %0, %struct.mat2* %1) {
%3 = bitcast %struct.mat2* %0 to float*
%4 = bitcast %struct.mat2* %1 to float*
%5 = tail call i32 @mat2_assign(float* %3, float* %4)
ret %struct.mat2* %0
}
/* Variables and functions */
int /*<<< orphan*/ bbm_word_read(void *, int, unsigned short *);
int fc8150_probe(void *hDevice) {
  unsigned short ver;
  bbm_word_read(hDevice, 0x0026, &ver);
  return (ver == 0x8150) ? 0 : 1;
}


x86 assembly (clang, -O0):
<fc8150_probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x26,%esi
lea    -0xa(%rbp),%rdx
call   1030 <bbm_word_read@plt>
movzwl -0xa(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x8150,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8150_probe>:
push   %rax
lea    0x6(%rsp),%rdx
mov    $0x26,%esi
call   1030 <bbm_word_read@plt>
movzwl 0x6(%rsp),%ecx
xor    %eax,%eax
cmp    $0x8150,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fc8150_probe(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @bbm_word_read(i8* %4, i32 38, i16* %3)
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = icmp eq i32 %7, 33104
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 1
ret i32 %10
}

LLVM IR (-O2):
define i32 @fc8150_probe(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = call i32 @bbm_word_read(i8* %0, i32 38, i16* %2)
%5 = load i16, i16* %2
%6 = icmp ne i16 %5, -32432
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int fce1(int, int);
int fce2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("fce1: %d\n", fce1(argc, argc + 2));
  printf("fce2: %d\n", fce2(argc, 2 * argc));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
add    $0x2,%esi
call   1040 <fce1@plt>
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
call   1050 <fce2@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
lea    0x2(%rbx),%esi
call   1040 <fce1@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    (%rbx,%rbx,1),%esi
mov    %ebx,%edi
call   1050 <fce2@plt>
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"fce1: %d\0A\00"
@.str.1 = [10 x i8] c"fce2: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, 2
%4 = tail call i32 @fce1(i32 %0, i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = shl nsw i32 %0, 1
%7 = tail call i32 @fce2(i32 %0, i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _system(char *, char *);
void recover_quot_sed(char *filename) {
  _system("sed -i 's/\\\\\\\\\\\"/\\\\\\\"/g' %s", filename);
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"sed -i 's/\\\\\\\\\\\22/\\\\\\\22/g' %s\00"
define void @recover_quot_sed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @_system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"sed -i 's/\\\\\\\\\\\22/\\\\\\\22/g' %s\00"
define void @recover_quot_sed(i8* %0) {
%2 = tail call i32 @_system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ runkernel();
int main() {
  runkernel();
  while (1)
    continue;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <runkernel@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <runkernel@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @runkernel()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @runkernel()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_ptr;

/* Variables and functions */
int /*<<< orphan*/ mpz_add(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
scalar_t__ mpz_sgn(int /*<<< orphan*/);
int /*<<< orphan*/ mpz_sub(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void gmp_sub(mpz_ptr out, mpz_ptr in, mpz_ptr order) {
  mpz_sub(out, out, in);
  if (mpz_sgn(out) < 0) {
    mpz_add(out, out, order);
  }
}


x86 assembly (clang, -O0):
<gmp_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <mpz_sub@plt>
mov    -0x4(%rbp),%edi
call   1050 <mpz_sgn@plt>
cmp    $0x0,%rax
jge    116f <gmp_sub+0x3f>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <mpz_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmp_sub>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%edx
mov    %edi,%ebp
mov    %edi,%esi
call   1030 <mpz_sub@plt>
mov    %ebp,%edi
call   1050 <mpz_sgn@plt>
test   %rax,%rax
js     1153 <gmp_sub+0x23>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mpz_add@plt>

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

LLVM IR (-O2):
define void @gmp_sub(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mpz_sub(i32 %0, i32 %0, i32 %1)
%5 = tail call i64 @mpz_sgn(i32 %0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @mpz_add(i32 %0, i32 %0, i32 %2)
br label %9
9: ; preds = %7, %3
ret void
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setMIDIDrawBar(struct b_tonegen *, int, unsigned char);
void setDrawbar2(void *d, unsigned char v) {
  setMIDIDrawBar((struct b_tonegen *)d, 2, v);
}


x86 assembly (clang, -O0):
<setDrawbar2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
movzbl -0x9(%rbp),%edx
call   1030 <setMIDIDrawBar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDrawbar2>:
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <setMIDIDrawBar@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar2(i8* %0, i8 zeroext %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 %struct.b_tonegen*
%7 = load i8, i8* %4
%8 = call i32 @setMIDIDrawBar(%struct.b_tonegen* %6, i32 2, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setDrawbar2(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = tail call i32 @setMIDIDrawBar(%struct.b_tonegen* %3, i32 2, i8 zeroext %1)
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime_r(struct tm *, char *);
void test(void) {
  char *buffer_pointer;
  struct tm timestruct;
  char buffer[80];
  buffer_pointer = asctime_r(&timestruct, buffer);
}


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

x86 assembly (clang, -O2):
<test>:
sub    $0x68,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <asctime_r@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @test() {
%1 = alloca i8*
%2 = alloca %struct.tm
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i8* @asctime_r(%struct.tm* %2, i8* %4)
store i8* %5, i8** %1
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @test() {
%1 = alloca %struct.tm
%2 = alloca [80 x i8]
%3 = bitcast %struct.tm* %1 to i8*
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i8* @asctime_r(%struct.tm* %1, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int smallest_digit(int);
int main() {
  int n;
  scanf("%d", &n);
  printf("smallest digit is %d :\n", smallest_digit(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <smallest_digit@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <smallest_digit@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [24 x i8] c"smallest digit is %d :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @smallest_digit(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [24 x i8] c"smallest digit is %d :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @smallest_digit(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
char *safe_malloc(s)
int s;
{
  char *temp;
  temp = malloc(s);
  if (temp == 0)
    fatal("malloc: Couldn't allocate %d bytes.", s);
  return temp;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <safe_malloc+0x34>
mov    -0x4(%rbp),%esi
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
movslq %edi,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1145 <safe_malloc+0x25>
lea    0xec4(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"malloc: Couldn't allocate %d bytes.\00"
define i8* @safe_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [36 x i8] c"malloc: Couldn't allocate %d bytes.\00"
define i8* @safe_malloc(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %5, %1
ret i8* %3
}
void yy_1_InlineTextBlock(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_InlineTextBlock(i8* nocapture %0, i32 %1) {
ret void
}
unsigned xrop3_41_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = T & S;
  stk3 = D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_41_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_41_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rdi,%rcx,1),%edx
mov    %esi,%eax
shl    $0x8,%eax
add    %eax,%esi
xor    %edx,%esi
and    %ecx,%eax
or     $0xff,%eax
xor    %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_41_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = and i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %5
%28 = load i32, i32* %11
%29 = or i32 %27, %28
store i32 %29, i32* %10
%30 = load i32, i32* %6
%31 = load i32, i32* %10
%32 = xor i32 %30, %31
store i32 %32, i32* %9
%33 = load i32, i32* %7
%34 = load i32, i32* %9
%35 = xor i32 %33, %34
store i32 %35, i32* %8
%36 = load i32, i32* %8
%37 = xor i32 %36, -1
store i32 %37, i32* %8
%38 = load i32, i32* %8
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_41_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = and i32 %7, %4
%10 = or i32 %9, 255
%11 = xor i32 %5, %8
%12 = xor i32 %11, %10
%13 = xor i32 %12, -1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led1On();
void TestSerialC__Leds__led1On(void) { LedsP__Leds__led1On(); }


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

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

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

LLVM IR (-O2):
define void @TestSerialC__Leds__led1On() {
%1 = tail call i32 (...) @LedsP__Leds__led1On()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long);
void b_debug_64(long idx, long *cells, int size) {
  printf("Index Pointer: %ld Value at Index Pointer: %ld\n", idx, cells[idx]);
}


x86 assembly (clang, -O0):
<b_debug_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_debug_64>:
mov    %rdi,%rax
mov    (%rsi,%rdi,8),%rdx
lea    0xee2(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Index Pointer: %ld Value at Index Pointer: %ld\0A\00"
define void @b_debug_64(i64 %0, i64* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i32
store i64 %0, i64* %4
store i64* %1, i64** %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i64*, i64** %5
%9 = load i64, i64* %4
%10 = getelementptr inbounds i64, i64* %8, i64 %9
%11 = load i64, i64* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %11)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Index Pointer: %ld Value at Index Pointer: %ld\0A\00"
define void @b_debug_64(i64 %0, i64* nocapture %1, i32 %2) {
%4 = getelementptr inbounds i64, i64* %1, i64 %0
%5 = load i64, i64* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %5)
ret void
}
unsigned temper(unsigned x) {
  x ^= x >> 11;
  x ^= x << 7 & 0x9D2C5680;
  x ^= x << 15 & 0xEFC60000;
  x ^= x >> 18;
  return x;
}


x86 assembly (clang, -O0):
<temper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xb,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
and    $0x9d2c5680,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xf,%eax
and    $0xefc60000,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x12,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<temper>:
mov    %edi,%eax
shr    $0xb,%eax
xor    %edi,%eax
mov    %eax,%ecx
shl    $0x7,%ecx
and    $0x9d2c5680,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shl    $0xf,%edx
and    $0xefc60000,%edx
xor    %ecx,%edx
mov    %edx,%eax
shr    $0x12,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @temper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 11
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = shl i32 %7, 7
%9 = and i32 %8, -1658038656
%10 = load i32, i32* %2
%11 = xor i32 %10, %9
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = shl i32 %12, 15
%14 = and i32 %13, -272236544
%15 = load i32, i32* %2
%16 = xor i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 18
%19 = load i32, i32* %2
%20 = xor i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @temper(i32 %0) {
%2 = lshr i32 %0, 11
%3 = xor i32 %2, %0
%4 = shl i32 %3, 7
%5 = and i32 %4, -1658038656
%6 = xor i32 %5, %3
%7 = shl i32 %6, 15
%8 = and i32 %7, -272236544
%9 = xor i32 %8, %6
%10 = lshr i32 %9, 18
%11 = xor i32 %10, %9
ret i32 %11
}
int tweakz(int parametre) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tweakz(i32 %0) {
ret i32 0
}
int modulus(int a, int b) { return a % b; }


x86 assembly (clang, -O0):
<modulus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modulus>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @modulus(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ulog_exec_helper(int, char const *const *);
void ulog_logout_pseudo(int fd) {
  char const *const args[3] = {"ulog-helper", "logout", NULL};
  ulog_exec_helper(fd, args);
}


x86 assembly (clang, -O0):
<ulog_logout_pseudo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cd8(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1030 <ulog_exec_helper@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulog_logout_pseudo>:
sub    $0x18,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <ulog_exec_helper@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ulog-helper\00"
@.str.1 = [7 x i8] c"logout\00"
@__const.ulog_logout_pseudo.args = [3 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @ulog_logout_pseudo(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8*]
store i32 %0, i32* %2
%4 = bitcast [3 x i8*]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%7 = call i32 @ulog_exec_helper(i32 %5, i8** %6)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"ulog-helper\00"
@.str.1 = [7 x i8] c"logout\00"
@__const.ulog_logout_pseudo.args = [3 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @ulog_logout_pseudo(i32 %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = call i32 @ulog_exec_helper(i32 %0, i8** %4)
ret void
}
/* Variables and functions */
float _cvtsh_ss(unsigned short);
float test_cvtsh_ss(unsigned short a) { return _cvtsh_ss(a); }


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

x86 assembly (clang, -O2):
<test_cvtsh_ss>:
jmp    1030 <_cvtsh_ss@plt>

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

LLVM IR (-O2):
define float @test_cvtsh_ss(i16 zeroext %0) {
%2 = tail call float @_cvtsh_ss(i16 zeroext %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_SERVICELOC;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_SERVICELOC_it;
OCSP_SERVICELOC *OCSP_SERVICELOC_new(void) {
  return (OCSP_SERVICELOC *)ASN1_item_new(&OCSP_SERVICELOC_it);
}


x86 assembly (clang, -O0):
<OCSP_SERVICELOC_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_SERVICELOC_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_SERVICELOC_it = global i32 0
define i32* @OCSP_SERVICELOC_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_SERVICELOC_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_SERVICELOC_it = global i32 0
define i32* @OCSP_SERVICELOC_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_SERVICELOC_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void go_right() {
  gpio_set((45), 0);
  gpio_set((23), 1);
}


x86 assembly (clang, -O0):
<go_right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x17,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_right>:
push   %rax
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
mov    $0x17,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @go_right() {
%1 = call i32 @gpio_set(i32 45, i32 0)
%2 = call i32 @gpio_set(i32 23, i32 1)
ret void
}

LLVM IR (-O2):
define void @go_right() {
%1 = tail call i32 @gpio_set(i32 45, i32 0)
%2 = tail call i32 @gpio_set(i32 23, i32 1)
ret void
}
int DThread_IsMain() { return 1; }


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

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

LLVM IR (-O0):
define i32 @DThread_IsMain() {
ret i32 1
}

LLVM IR (-O2):
define i32 @DThread_IsMain() {
ret i32 1
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cintern(char *);
int /*<<< orphan*/ setvar(int /*<<< orphan*/, int /*<<< orphan*/, struct obj *);
void init_trace_version(void) {
  setvar(cintern("*trace-version*"),
         cintern("$Id: trace.c,v 1.3 1997/05/11 11:35:47 gjc Exp $"),
         ((struct obj *)0));
}


x86 assembly (clang, -O0):
<init_trace_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1040 <cintern@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setvar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_trace_version>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,%ebx
lea    0xeda(%rip),%rdi
call   1040 <cintern@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <setvar@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*trace-version*\00"
@.str.1 = [49 x i8] c"$Id: trace.c,v 1.3 1997/05/11 11:35:47 gjc Exp $\00"
define void @init_trace_version() {
%1 = call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cintern(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*trace-version*\00"
@.str.1 = [49 x i8] c"$Id: trace.c,v 1.3 1997/05/11 11:35:47 gjc Exp $\00"
define void @init_trace_version() {
%1 = tail call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cintern(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}
_Bool cprnths_parseutil_is_wordchar(char const c) {
  return (47 < c && c < 58) || (64 < c && c < 91) || c == 95 ||
         (96 < c && c < 123);
}


x86 assembly (clang, -O0):
<cprnths_parseutil_is_wordchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
jge    112d <cprnths_parseutil_is_wordchar+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x2(%rbp)
jl     118b <cprnths_parseutil_is_wordchar+0x8b>
movsbl -0x1(%rbp),%ecx
mov    $0x40,%eax
cmp    %ecx,%eax
jge    1150 <cprnths_parseutil_is_wordchar+0x50>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
jl     118b <cprnths_parseutil_is_wordchar+0x8b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     118b <cprnths_parseutil_is_wordchar+0x8b>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x60,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jge    1185 <cprnths_parseutil_is_wordchar+0x85>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
setl   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprnths_parseutil_is_wordchar>:
lea    -0x30(%rdi),%ecx
mov    $0x1,%al
cmp    $0xa,%cl
jb     1123 <cprnths_parseutil_is_wordchar+0x23>
cmp    $0x5f,%dil
je     1123 <cprnths_parseutil_is_wordchar+0x23>
lea    -0x41(%rdi),%ecx
cmp    $0x1a,%cl
jb     1123 <cprnths_parseutil_is_wordchar+0x23>
add    $0x9f,%dil
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define zeroext i1 @cprnths_parseutil_is_wordchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 47, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %8, 58
br i1 %9, label %32, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp slt i32 64, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 91
br i1 %17, label %32, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 95
br i1 %21, label %32, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp slt i32 96, %24
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp slt i32 %28, 123
br label %30
30: ; preds = %26, %22
%31 = phi i1 [ false, %22 ], [ %29, %26 ]
br label %32
32: ; preds = %30, %18, %14, %6
%33 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %6 ], [ %31, %30 ]
ret i1 %33
}

LLVM IR (-O2):
define zeroext i1 @cprnths_parseutil_is_wordchar(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = add i8 %0, -65
%6 = icmp ult i8 %5, 26
%7 = icmp eq i8 %0, 95
%8 = or i1 %7, %6
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add i8 %0, -97
%11 = icmp ult i8 %10, 26
br label %12
12: ; preds = %4, %1, %9
%13 = phi i1 [ %11, %9 ], [ true, %1 ], [ true, %4 ]
ret i1 %13
}
/* Variables and functions */
int /*<<< orphan*/ SCL(int);
int /*<<< orphan*/ SDA(int);
void Stop(void) {
  SCL(0);
  SDA(0);
  SCL(1);
  SDA(1);
}


x86 assembly (clang, -O0):
<Stop>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <SCL@plt>
xor    %edi,%edi
call   1040 <SDA@plt>
mov    $0x1,%edi
call   1030 <SCL@plt>
mov    $0x1,%edi
call   1040 <SDA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stop>:
push   %rax
xor    %edi,%edi
call   1030 <SCL@plt>
xor    %edi,%edi
call   1040 <SDA@plt>
mov    $0x1,%edi
call   1030 <SCL@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <SDA@plt>

LLVM IR (-O0):
define void @Stop() {
%1 = call i32 @SCL(i32 0)
%2 = call i32 @SDA(i32 0)
%3 = call i32 @SCL(i32 1)
%4 = call i32 @SDA(i32 1)
ret void
}

LLVM IR (-O2):
define void @Stop() {
%1 = tail call i32 @SCL(i32 0)
%2 = tail call i32 @SDA(i32 0)
%3 = tail call i32 @SCL(i32 1)
%4 = tail call i32 @SDA(i32 1)
ret void
}
reg0adrx1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ r0 = (((short *)11111111)[x1]); }


x86 assembly (clang, -O0):
<reg0adrx1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,2),%ax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %17
%19 = load i16, i16* %18
store i16 %19, i16* %8
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @reg0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
ret i32 undef
}
void gtk_text_buffer_place_cursor() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_place_cursor() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fputs("usage: install file\n", stderr);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"usage: install file\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: install file\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int st_ptrcmp(x, y)
char *x;
char *y;
{ return ((x) != (y)); }


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

x86 assembly (clang, -O2):
<st_ptrcmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @st_ptrcmp(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 = load i8*, i8** %4
%7 = icmp ne i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @st_ptrcmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp ne i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
#pragma omp parallel
  { printf("Hello, I'm thread %d\n", omp_get_thread_num()); }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Hello, I'm thread %d\0A\00"
define i32 @main() {
%1 = call i32 (...) @omp_get_thread_num()
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Hello, I'm thread %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putc(char);
void putchar(char c) {
  if (c == '\n') {
    putchar('\r');
  }
  putc(c);
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1145 <putchar+0x25>
mov    $0xd,%edi
call   1030 <putchar@plt>
movsbl -0x1(%rbp),%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%bl
jne    1122 <putchar+0x12>
mov    $0xd,%edi
call   1030 <putc@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
%8 = load i8, i8* %2
%9 = call i32 @putc(i8 signext %8)
ret void
}

LLVM IR (-O2):
define void @putchar(i8 signext %0) {
%2 = icmp eq i8 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @putc(i8 signext 13)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @putc(i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ posix_binary_file_store(char *, char const *, size_t);
void ext_status_store(const char *buffer, size_t buffer_size) {
  posix_binary_file_store("kaa_status.bin", buffer, buffer_size);
}


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

x86 assembly (clang, -O2):
<ext_status_store>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <posix_binary_file_store@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"kaa_status.bin\00"
define void @ext_status_store(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @posix_binary_file_store(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"kaa_status.bin\00"
define void @ext_status_store(i8* %0, i64 %1) {
%3 = tail call i32 @posix_binary_file_store(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *strndup(char const *, size_t);
char *xstrndup(const char *s, size_t n) {
  if ((s = strndup(s, n)) == NULL)
    abort();
  return (char *)s;
}


x86 assembly (clang, -O0):
<xstrndup>:
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   1040 <strndup@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1152 <xstrndup+0x32>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %rax
call   1040 <strndup@plt>
test   %rax,%rax
je     112d <xstrndup+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @strndup(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @xstrndup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @strndup(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
float M_PI;
int cos(float);
float SineEaseInOut(float p) { return 0.5 * (1 - cos(p * M_PI)); }


x86 assembly (clang, -O0):
<SineEaseInOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SineEaseInOut>:
push   %rax
mov    0x2ed0(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xec9(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @SineEaseInOut(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* @M_PI
%5 = fmul float %3, %4
%6 = call i32 @cos(float %5)
%7 = sub nsw i32 1, %6
%8 = sitofp i32 %7 to double
%9 = fmul double 5.000000e-01, %8
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @SineEaseInOut(float %0) {
%2 = load float, float* @M_PI
%3 = fmul float %2, %0
%4 = tail call i32 @cos(float %3)
%5 = sub nsw i32 1, %4
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 5.000000e-01
%8 = fptrunc double %7 to float
ret float %8
}