xunge/DecIR huggingface dataset:
char LowerChar(char ch) {
  if (('A' <= ch) && (ch <= 'Z'))
    return ch + ('a' - 'A');
  return ch;
}


x86 assembly (clang, -O0):
<LowerChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1137 <LowerChar+0x37>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1137 <LowerChar+0x37>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    113d <LowerChar+0x3d>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LowerChar>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @LowerChar(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ destroy_store();
int get(int /*<<< orphan*/);
int /*<<< orphan*/ init_store();
int /*<<< orphan*/ set(int /*<<< orphan*/, int, int, int);
void test_lock() {
  init_store();
  set(0, 555, -1, 4);
  assert(get(0) == 555);
  set(0, 222, -1, 4);
  assert(get(0) == 555);
  destroy_store();
}


x86 assembly (clang, -O0):
<test_lock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <init_store@plt>
xor    %edi,%edi
mov    $0x22b,%esi
mov    $0xffffffff,%edx
mov    $0x4,%ecx
call   1070 <set@plt>
xor    %edi,%edi
call   1050 <get@plt>
cmp    $0x22b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %edi,%edi
mov    $0xde,%esi
mov    $0xffffffff,%edx
mov    $0x4,%ecx
call   1070 <set@plt>
xor    %edi,%edi
call   1050 <get@plt>
cmp    $0x22b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <destroy_store@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lock>:
push   %rax
xor    %eax,%eax
call   1060 <init_store@plt>
xor    %edi,%edi
mov    $0x22b,%esi
mov    $0xffffffff,%edx
mov    $0x4,%ecx
call   1070 <set@plt>
xor    %edi,%edi
call   1050 <get@plt>
xor    %edi,%edi
cmp    $0x22b,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
mov    $0xde,%esi
mov    $0xffffffff,%edx
mov    $0x4,%ecx
call   1070 <set@plt>
xor    %edi,%edi
call   1050 <get@plt>
xor    %edi,%edi
cmp    $0x22b,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <destroy_store@plt>

LLVM IR (-O0):
define void @test_lock() {
%1 = call i32 (...) @init_store()
%2 = call i32 @set(i32 0, i32 555, i32 -1, i32 4)
%3 = call i32 @get(i32 0)
%4 = icmp eq i32 %3, 555
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 @set(i32 0, i32 222, i32 -1, i32 4)
%8 = call i32 @get(i32 0)
%9 = icmp eq i32 %8, 555
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = call i32 (...) @destroy_store()
ret void
}

LLVM IR (-O2):
define void @test_lock() {
%1 = tail call i32 (...) @init_store()
%2 = tail call i32 @set(i32 0, i32 555, i32 -1, i32 4)
%3 = tail call i32 @get(i32 0)
%4 = icmp eq i32 %3, 555
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @set(i32 0, i32 222, i32 -1, i32 4)
%8 = tail call i32 @get(i32 0)
%9 = icmp eq i32 %8, 555
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i32 (...) @destroy_store()
ret void
}
/* Variables and functions */
scalar_t__ munmap(void *, long);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
void free_aligned(void *addr, long size) {
  if (addr != NULL)
    if (munmap(addr, size) < 0)
      perror(NULL);
}


x86 assembly (clang, -O0):
<free_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1160 <free_aligned+0x40>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <munmap@plt>
cmp    $0x0,%rax
jge    115b <free_aligned+0x3b>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <perror@plt>
jmp    1160 <free_aligned+0x40>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_aligned>:
test   %rdi,%rdi
je     1135 <free_aligned+0x15>
push   %rax
call   1030 <munmap@plt>
test   %rax,%rax
lea    0x8(%rsp),%rsp
js     1136 <free_aligned+0x16>
ret
xor    %edi,%edi
jmp    1040 <perror@plt>

LLVM IR (-O0):
define void @free_aligned(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i64 @munmap(i8* %8, i64 %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @perror(i32* null)
br label %14
14: ; preds = %12, %7
br label %15
15: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @free_aligned(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i64 @munmap(i8* %0, i64 %1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @perror(i32* null)
br label %9
9: ; preds = %4, %7, %2
ret void
}
int spi_do_not_qe_enable(struct hifmc_spi *spi) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hifmc_spi = type opaque
define i32 @spi_do_not_qe_enable(%struct.hifmc_spi* nocapture readnone %0) {
ret i32 0
}
__attribute__((always_)) void patch_NCAS_2_0_1_60_extra(void) {}


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

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

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

LLVM IR (-O2):
define void @patch_NCAS_2_0_1_60_extra() {
ret void
}
int file(int square) { return square & 7; }


x86 assembly (clang, -O0):
<file>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file>:
mov    %edi,%eax
and    $0x7,%eax
ret

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

LLVM IR (-O2):
define i32 @file(i32 %0) {
%2 = and i32 %0, 7
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int func_11(unsigned p_12, short p_13, int p_14, unsigned p_15) {
  int l_773 = 0x9F0AFEDCL;
  step_hash(458);
  return l_773;
}


x86 assembly (clang, -O0):
<func_11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x9f0afedc,-0x14(%rbp)
mov    $0x1ca,%edi
call   1030 <step_hash@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_11>:
push   %rax
mov    $0x1ca,%edi
call   1030 <step_hash@plt>
mov    $0x9f0afedc,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @func_11(i32 %0, i16 signext %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i16
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i16 %1, i16* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 -1626669348, i32* %9
%10 = call i32 @step_hash(i32 458)
%11 = load i32, i32* %9
ret i32 %11
}

LLVM IR (-O2):
define i32 @func_11(i32 %0, i16 signext %1, i32 %2, i32 %3) {
%5 = tail call i32 @step_hash(i32 458)
ret i32 -1626669348
}
/* Type definitions */
struct hda_codec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alc269_quanta_fl1_speaker_automute(struct hda_codec *);
int /*<<< orphan*/ alc_mic_automute(struct hda_codec *);
void alc269_quanta_fl1_init_hook(struct hda_codec *codec) {
  alc269_quanta_fl1_speaker_automute(codec);
  alc_mic_automute(codec);
}


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

x86 assembly (clang, -O2):
<alc269_quanta_fl1_init_hook>:
push   %rbx
mov    %rdi,%rbx
call   1040 <alc269_quanta_fl1_speaker_automute@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <alc_mic_automute@plt>

LLVM IR (-O0):
%struct.hda_codec = type { i32 }
define void @alc269_quanta_fl1_init_hook(%struct.hda_codec* %0) {
%2 = alloca %struct.hda_codec*
store %struct.hda_codec* %0, %struct.hda_codec** %2
%3 = load %struct.hda_codec*, %struct.hda_codec** %2
%4 = call i32 @alc269_quanta_fl1_speaker_automute(%struct.hda_codec* %3)
%5 = load %struct.hda_codec*, %struct.hda_codec** %2
%6 = call i32 @alc_mic_automute(%struct.hda_codec* %5)
ret void
}

LLVM IR (-O2):
%struct.hda_codec = type { i32 }
define void @alc269_quanta_fl1_init_hook(%struct.hda_codec* %0) {
%2 = tail call i32 @alc269_quanta_fl1_speaker_automute(%struct.hda_codec* %0)
%3 = tail call i32 @alc_mic_automute(%struct.hda_codec* %0)
ret void
}
/* Type definitions */
struct socket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void sock_release(struct socket *so) {
  panic("sock_release() not implemented\n");
}


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

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

LLVM IR (-O0):
%struct.socket = type { i32 }
@.str = [32 x i8] c"sock_release() not implemented\0A\00"
define void @sock_release(%struct.socket* %0) {
%2 = alloca %struct.socket*
store %struct.socket* %0, %struct.socket** %2
%3 = call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.socket = type { i32 }
@.str = [32 x i8] c"sock_release() not implemented\0A\00"
define void @sock_release(%struct.socket* nocapture readnone %0) {
%2 = tail call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo290(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo290(i32 %0) {
ret void
}
int main(void) {
  int *p;
  p = 0;
  p[2] = 3;
  return p[2];
}


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

x86 assembly (clang, -O2):
<main>:
movl   $0x3,0x8
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
store i32 3, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
store i32 3, i32* inttoptr (i64 8 to i32*)
ret i32 3
}
void PrintPNSimpleCompareFunction2(void *theEnv, const char *logicalName,
                                   void *theValue) {}


x86 assembly (clang, -O0):
<PrintPNSimpleCompareFunction2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @PrintPNSimpleCompareFunction2(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
int /*<<< orphan*/ scanf(char *, unsigned char *);
int main() {
  unsigned char byte;
  scanf("%c", &byte);
  printf("%d\n", byte);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %3)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
uint32_t udiv32(uint32_t a, uint32_t b) {
  uint32_t r;
  if (b == 0) {
    fprintf(stderr, "Should not happen\n");
    exit(EXIT_FAILURE);
  }
  r = a / b;
  return r;
}


x86 assembly (clang, -O0):
<udiv32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <udiv32+0x3b>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udiv32>:
test   %esi,%esi
je     112a <udiv32+0xa>
mov    %edi,%eax
cltd
idiv   %esi
ret
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @udiv32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = sdiv i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @udiv32(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = sdiv i32 %0, %1
ret i32 %10
}
void option_set2option_set_unit_option_set() {}


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

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

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

LLVM IR (-O2):
define void @option_set2option_set_unit_option_set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version(void) { printf("astime : AfterStep analog clock version 2.8\n"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"astime : AfterStep analog clock version 2.8\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"astime : AfterStep analog clock version 2.8\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_help(char *);
int mailreadhelp() {
  show_help("help/mailreadhelp");
  return 1;
}


x86 assembly (clang, -O0):
<mailreadhelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <show_help@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mailreadhelp>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <show_help@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"help/mailreadhelp\00"
define i32 @mailreadhelp() {
%1 = call i32 @show_help(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [18 x i8] c"help/mailreadhelp\00"
define i32 @mailreadhelp() {
%1 = tail call i32 @show_help(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
scalar_t__ pos_gt_lim(char *, char *);
int safe_pos_fw(char **pos, char *lim, const size_t size) {
  *pos += size;
  if (pos_gt_lim(*pos, lim)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<safe_pos_fw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <pos_gt_lim@plt>
cmp    $0x0,%rax
je     1158 <safe_pos_fw+0x48>
movl   $0x1,-0x4(%rbp)
jmp    115f <safe_pos_fw+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @safe_pos_fw(i8** nocapture %0, i8* %1, i64 %2) {
%4 = load i8*, i8** %0
%5 = getelementptr inbounds i8, i8* %4, i64 %2
store i8* %5, i8** %0
%6 = tail call i64 @pos_gt_lim(i8* %5, i8* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, int, int, int,
                           int);
void draw_then_edge(FILE *fp, int fx, int fy, int tx, int ty, int neg,
                    int inv) {
  fprintf(fp, "(%s) %d %d %d %d then\n", neg ? "n" : "p", fx, fy, tx, ty);
}


x86 assembly (clang, -O0):
<draw_then_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%ecx
lea    0xedb(%rip),%rdx
lea    0xed2(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xe9f(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_then_edge>:
push   %rax
mov    %ecx,%r10d
mov    %edx,%eax
mov    %esi,%ecx
test   %r9d,%r9d
lea    0xef7(%rip),%rsi
lea    0xeee(%rip),%rdx
cmove  %rsi,%rdx
mov    %r8d,(%rsp)
lea    0xec8(%rip),%rsi
mov    %eax,%r8d
mov    %r10d,%r9d
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"(%s) %d %d %d %d then\0A\00"
@.str.1 = [2 x i8] c"n\00"
@.str.2 = [2 x i8] c"p\00"
define void @draw_then_edge(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32*, i32** %8
%16 = load i32, i32* %13
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = load i32, i32* %11
%23 = load i32, i32* %12
%24 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %19, i32 %20, i32 %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"(%s) %d %d %d %d then\0A\00"
@.str.1 = [2 x i8] c"n\00"
@.str.2 = [2 x i8] c"p\00"
define void @draw_then_edge(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp eq i32 %5, 0
%9 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%10 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ status_bar_message_i(char const *, int);
void status_bar_error(const char message[]) {
  status_bar_message_i(message, 1);
}


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

x86 assembly (clang, -O2):
<status_bar_error>:
mov    $0x1,%esi
jmp    1030 <status_bar_message_i@plt>

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

LLVM IR (-O2):
define void @status_bar_error(i8* %0) {
%2 = tail call i32 @status_bar_message_i(i8* %0, i32 1)
ret void
}
unsigned xrop3_240_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  return (T & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_240_1_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
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_240_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_240_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int main() {
  char ch;
  char *mem = (char *)malloc(20 * 1024 * 1024);
  bzero(mem, 20 * 1024 * 1024);
  int i;
  for (i = 0; i < 20 * 1024 * 1024; ++i) {
    ch = mem[i];
  }
  free(mem);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1400000,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1400000,%esi
call   1050 <bzero@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x1400000,-0x14(%rbp)
jge    118b <main+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x5(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x32>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1400000,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1400000,%esi
call   1050 <bzero@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = call i64 @malloc(i32 20971520)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @bzero(i8* %7, i32 20971520)
store i32 0, i32* %4
br label %9
9: ; preds = %18, %0
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 20971520
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
store i8 %17, i8* %2
br label %18
18: ; preds = %12
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %9
21: ; preds = %9
%22 = load i8*, i8** %3
%23 = call i32 @free(i8* %22)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 20971520)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @bzero(i8* %2, i32 20971520)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ spi_write(int, int);
int pfio_init_piface(void) {
  spi_write(0x0A, 8);
  spi_write(0x12, 0x00);
  spi_write(0x00, 0);
  spi_write(0x01, 0xFF);
  spi_write(0x0D, 0xFF);
  return 0;
}


x86 assembly (clang, -O0):
<pfio_init_piface>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x8,%esi
call   1030 <spi_write@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1030 <spi_write@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <spi_write@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <spi_write@plt>
mov    $0xd,%edi
mov    $0xff,%esi
call   1030 <spi_write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfio_init_piface>:
push   %rax
mov    $0xa,%edi
mov    $0x8,%esi
call   1030 <spi_write@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1030 <spi_write@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <spi_write@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <spi_write@plt>
mov    $0xd,%edi
mov    $0xff,%esi
call   1030 <spi_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pfio_init_piface() {
%1 = call i32 @spi_write(i32 10, i32 8)
%2 = call i32 @spi_write(i32 18, i32 0)
%3 = call i32 @spi_write(i32 0, i32 0)
%4 = call i32 @spi_write(i32 1, i32 255)
%5 = call i32 @spi_write(i32 13, i32 255)
ret i32 0
}

LLVM IR (-O2):
define i32 @pfio_init_piface() {
%1 = tail call i32 @spi_write(i32 10, i32 8)
%2 = tail call i32 @spi_write(i32 18, i32 0)
%3 = tail call i32 @spi_write(i32 0, i32 0)
%4 = tail call i32 @spi_write(i32 1, i32 255)
%5 = tail call i32 @spi_write(i32 13, i32 255)
ret i32 0
}
unsigned up_to_next_power_of_two(unsigned n) {
  unsigned i;
  for (i = 1; i <= n; i *= 2) {
  }
  return i;
}


x86 assembly (clang, -O0):
<up_to_next_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
ja     112d <up_to_next_power_of_two+0x2d>
jmp    111f <up_to_next_power_of_two+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <up_to_next_power_of_two+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_to_next_power_of_two>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jbe    1110 <up_to_next_power_of_two+0x10>
ret

LLVM IR (-O0):
define i32 @up_to_next_power_of_two(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ule i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = mul i32 %10, 2
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @up_to_next_power_of_two(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp ugt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %6, label %2
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ standard_extension(char *, char *, char *);
void aout_filename(char *inname, char *outname) {
  standard_extension(inname, outname, ".o");
}


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

x86 assembly (clang, -O2):
<aout_filename>:
lea    0xee9(%rip),%rdx
jmp    1030 <standard_extension@plt>

LLVM IR (-O0):
@.str = [3 x i8] c".o\00"
define void @aout_filename(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 = call i32 @standard_extension(i8* %5, i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c".o\00"
define void @aout_filename(i8* %0, i8* %1) {
%3 = tail call i32 @standard_extension(i8* %0, i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t getR2(uint32_t instruction) {
  uint32_t mask = 0xf8000;
  uint32_t reg = mask & instruction;
  uint8_t r2 = reg >> 16;
  return r2;
}


x86 assembly (clang, -O0):
<getR2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xf8000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getR2>:
mov    %edi,%eax
shr    $0x10,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @getR2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 1015808, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = and i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @getR2(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 15
ret i32 %3
}
void cafebabe_constant_value_attribute_deinit(
    struct cafebabe_constant_value_attribute *a) {}


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

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

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

LLVM IR (-O2):
%struct.cafebabe_constant_value_attribute = type opaque
define void @cafebabe_constant_value_attribute_deinit(%struct.cafebabe_constant_value_attribute* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putchar(int);
void W(FILE *Q) {
  int i;
  while ((i = fgetc(Q)) != EOF) {
    putchar(i);
    if (i == '\n')
      break;
  }
}


x86 assembly (clang, -O0):
<W>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <W+0x43>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
cmpl   $0xa,-0xc(%rbp)
jne    115e <W+0x3e>
jmp    1163 <W+0x43>
jmp    112c <W+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<W>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eba(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <fgetc@plt>
cmp    (%r14),%eax
je     114b <W+0x2b>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <putchar@plt>
cmp    $0xa,%ebp
jne    1130 <W+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @W(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 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = load i32, i32* %3
%11 = call i32 @putchar(i32 %10)
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %9
br label %16
15: ; preds = %9
br label %4
16: ; preds = %14, %4
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @W(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @putchar(i32 %3)
%8 = icmp eq i32 %3, 10
br i1 %8, label %9, label %2
9: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_block_tests();
int /*<<< orphan*/ do_child_deletion();
int /*<<< orphan*/ do_children_tests();
int /*<<< orphan*/ do_locals_tests();
int /*<<< orphan*/ do_special_tests();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  do_locals_tests();
  do_block_tests();
  do_children_tests();
  do_special_tests();
  do_child_deletion();
  exit(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    $0x0,%al
call   1060 <do_locals_tests@plt>
mov    $0x0,%al
call   1040 <do_block_tests@plt>
mov    $0x0,%al
call   1050 <do_children_tests@plt>
mov    $0x0,%al
call   1030 <do_special_tests@plt>
mov    $0x0,%al
call   1080 <do_child_deletion@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <do_locals_tests@plt>
xor    %eax,%eax
call   1040 <do_block_tests@plt>
xor    %eax,%eax
call   1050 <do_children_tests@plt>
xor    %eax,%eax
call   1030 <do_special_tests@plt>
xor    %eax,%eax
call   1080 <do_child_deletion@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @do_locals_tests()
%7 = call i32 (...) @do_block_tests()
%8 = call i32 (...) @do_children_tests()
%9 = call i32 (...) @do_special_tests()
%10 = call i32 (...) @do_child_deletion()
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_locals_tests()
%4 = tail call i32 (...) @do_block_tests()
%5 = tail call i32 (...) @do_children_tests()
%6 = tail call i32 (...) @do_special_tests()
%7 = tail call i32 (...) @do_child_deletion()
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *CP_SkipSpace(const char *ptr) {
  while (*ptr && isspace(*ptr))
    ++ptr;
  return ptr;
}


x86 assembly (clang, -O0):
<CP_SkipSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <CP_SkipSpace+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <CP_SkipSpace+0x47>
jmp    1168 <CP_SkipSpace+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <CP_SkipSpace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CP_SkipSpace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <CP_SkipSpace+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <CP_SkipSpace+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <CP_SkipSpace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @CP_SkipSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @CP_SkipSpace(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int stack_downwards_helper(char *);
int stack_downwards_p(void) {
  char x;
  return stack_downwards_helper(&x);
}


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

x86 assembly (clang, -O2):
<stack_downwards_p>:
push   %rax
lea    0x7(%rsp),%rdi
call   1030 <stack_downwards_helper@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stack_downwards_p() {
%1 = alloca i8
%2 = call i32 @stack_downwards_helper(i8* %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @stack_downwards_p() {
%1 = alloca i8
%2 = call i32 @stack_downwards_helper(i8* %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *readline(char *);
void kshell(void) {
  while (1) {
    char *cmd = readline("K> ");
    if (cmd)
      printf("Command %s is not implemented.\n", cmd);
  }
}


x86 assembly (clang, -O0):
<kshell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <readline@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1153 <kshell+0x33>
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    1128 <kshell+0x8>

x86 assembly (clang, -O2):
<kshell>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed2(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <readline@plt>
test   %rax,%rax
je     1140 <kshell+0x20>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
jmp    1140 <kshell+0x20>

LLVM IR (-O0):
@.str = [4 x i8] c"K> \00"
@.str.1 = [32 x i8] c"Command %s is not implemented.\0A\00"
define void @kshell() {
%1 = alloca i8*
br label %2
2: ; preds = %0, %9
%3 = call i8* @readline(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %2
br label %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"K> \00"
@.str.1 = [32 x i8] c"Command %s is not implemented.\0A\00"
define void @kshell() {
br label %1
1: ; preds = %6, %0
%2 = tail call i8* @readline(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %6
6: ; preds = %4, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void yyerror() { fprintf(stderr, "erreur de syntaxe"); }


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"erreur de syntaxe\00"
define void @yyerror() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"erreur de syntaxe\00"
define void @yyerror() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
void SobelRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @SobelRow_SSE2() {
ret void
}
/* Variables and functions */
double log(int);
double rah0(double ustar0) { return (log(2 / 0.1) / (ustar0 * 0.41)); }


x86 assembly (clang, -O0):
<rah0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x14,%edi
call   1030 <log@plt>
movsd  0xed1(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rah0>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x14,%edi
call   1030 <log@plt>
movsd  (%rsp),%xmm1
mulsd  0xed3(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rah0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @log(i32 20)
%4 = load double, double* %2
%5 = fmul double %4, 4.100000e-01
%6 = fdiv double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @rah0(double %0) {
%2 = tail call double @log(i32 20)
%3 = fmul double %0, 4.100000e-01
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ MCUSendCmdSetContinueRecordTime(int);
void MCUSendCmdSetContinueRecordTimeD() { MCUSendCmdSetContinueRecordTime(20); }


x86 assembly (clang, -O0):
<MCUSendCmdSetContinueRecordTimeD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <MCUSendCmdSetContinueRecordTime@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MCUSendCmdSetContinueRecordTimeD>:
mov    $0x14,%edi
jmp    1030 <MCUSendCmdSetContinueRecordTime@plt>

LLVM IR (-O0):
define void @MCUSendCmdSetContinueRecordTimeD() {
%1 = call i32 @MCUSendCmdSetContinueRecordTime(i32 20)
ret void
}

LLVM IR (-O2):
define void @MCUSendCmdSetContinueRecordTimeD() {
%1 = tail call i32 @MCUSendCmdSetContinueRecordTime(i32 20)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void free_int64_t(int64_t _val) { return; }


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

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

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

LLVM IR (-O2):
define void @free_int64_t(i32 %0) {
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("the value of EOF is %d\n", EOF);
  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    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"the value of EOF is %d\0A\00"
@EOF = global i32 0
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* @EOF
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"the value of EOF is %d\0A\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EOF
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}