xunge/DecIR huggingface dataset:
int clone_thin_subvol(struct mosaic *m, struct volume *from, const char *name,
                      int clone_flags) {
  return -1;
}


x86 assembly (clang, -O0):
<clone_thin_subvol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mosaic = type opaque
%struct.volume = type opaque
define i32 @clone_thin_subvol(%struct.mosaic* %0, %struct.volume* %1, i8* %2, i32 %3) {
%5 = alloca %struct.mosaic*
%6 = alloca %struct.volume*
%7 = alloca i8*
%8 = alloca i32
store %struct.mosaic* %0, %struct.mosaic** %5
store %struct.volume* %1, %struct.volume** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
%struct.mosaic = type opaque
%struct.volume = type opaque
define i32 @clone_thin_subvol(%struct.mosaic* nocapture readnone %0, %struct.volume* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 -1
}
void g_io_channel_get_close_on_unref() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_get_close_on_unref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__29__IO__makeOutput();
void Msp430GpioC__9__HplGeneralIO__makeOutput(void) {
  HplMsp430GeneralIOP__29__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__9__HplGeneralIO__makeOutput() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__29__IO__makeOutput()
ret void
}
void do_sync() {}


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

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

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

LLVM IR (-O2):
define void @do_sync() {
ret void
}
int test_imm_9Aint8_mem(signed char *val) {
  return ((*val) & (-0x9A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Aint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff66,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Aint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -154
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int vmcoreinfo_item_ulong(unsigned long *, char *, char const *, int);
int dfi_vmcoreinfo_length(unsigned long *len, const char *sym) {
  return vmcoreinfo_item_ulong(len, "LENGTH", sym, 10);
}


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

x86 assembly (clang, -O2):
<dfi_vmcoreinfo_length>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
mov    $0xa,%ecx
jmp    1030 <vmcoreinfo_item_ulong@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"LENGTH\00"
define i32 @dfi_vmcoreinfo_length(i64* %0, i8* %1) {
%3 = tail call i32 @vmcoreinfo_item_ulong(i64* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32 10)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ c_plbop();
int /*<<< orphan*/ c_pleop();
int /*<<< orphan*/ c_plssub(int, int);
int /*<<< orphan*/ draw_windows(int, int /*<<< orphan*/);
void demo1() {
  c_plbop();
  c_plssub(4, 4);
  draw_windows(16, 0);
  c_pleop();
}


x86 assembly (clang, -O0):
<demo1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <c_plbop@plt>
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <c_plssub@plt>
mov    $0x10,%edi
xor    %esi,%esi
call   1050 <draw_windows@plt>
mov    $0x0,%al
call   1060 <c_pleop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<demo1>:
push   %rax
xor    %eax,%eax
call   1040 <c_plbop@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <c_plssub@plt>
mov    $0x10,%edi
xor    %esi,%esi
call   1050 <draw_windows@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <c_pleop@plt>

LLVM IR (-O0):
define void @demo1() {
%1 = call i32 (...) @c_plbop()
%2 = call i32 @c_plssub(i32 4, i32 4)
%3 = call i32 @draw_windows(i32 16, i32 0)
%4 = call i32 (...) @c_pleop()
ret void
}

LLVM IR (-O2):
define void @demo1() {
%1 = tail call i32 (...) @c_plbop()
%2 = tail call i32 @c_plssub(i32 4, i32 4)
%3 = tail call i32 @draw_windows(i32 16, i32 0)
%4 = tail call i32 (...) @c_pleop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kill_split();
void qsplit_action() { kill_split(); }


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

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

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

LLVM IR (-O2):
define void @qsplit_action() {
%1 = tail call i32 (...) @kill_split()
ret void
}
unsigned genetare10n(int n) { return ~((1 << n) - 1); }


x86 assembly (clang, -O0):
<genetare10n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<genetare10n>:
mov    %edi,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @genetare10n(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 1, %3
%5 = sub nsw i32 %4, 1
%6 = xor i32 %5, -1
ret i32 %6
}

LLVM IR (-O2):
define i32 @genetare10n(i32 %0) {
%2 = shl nsw i32 -1, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void regerror(char *s) { fprintf(stderr, "regexp(3): %s\n", s); }


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

x86 assembly (clang, -O2):
<regerror>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"regexp(3): %s\0A\00"
define void @regerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"regexp(3): %s\0A\00"
define void @regerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void XESetBeforeFlush() {}


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

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

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

LLVM IR (-O2):
define void @XESetBeforeFlush() {
ret void
}
/* Variables and functions */
void *malloc(unsigned long);
void *tcc_malloc(unsigned long size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<tcc_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @tcc_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int strlen(char *);
char toupper(char);
void strtoupper(char *str) {
  int n = strlen(str);
  for (int i = 0; i < n; i++)
    str[i] = toupper(str[i]);
}


x86 assembly (clang, -O0):
<strtoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <strtoupper+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113f <strtoupper+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoupper>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    1157 <strtoupper+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <strtoupper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @strtoupper(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %7
6: ; preds = %7, %1
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call signext i8 @toupper(i8 signext %10)
store i8 %11, i8* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
void strip_newline_from_dir(char *str, int size) {
  int i;
  for (i = 0; i < size; ++i) {
    if (str[i] == '\n') {
      str[i] = '\0';
      return;
    }
  }
}


x86 assembly (clang, -O0):
<strip_newline_from_dir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <strip_newline_from_dir+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1144 <strip_newline_from_dir+0x44>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1157 <strip_newline_from_dir+0x57>
jmp    1149 <strip_newline_from_dir+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <strip_newline_from_dir+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_newline_from_dir>:
test   %esi,%esi
jle    111f <strip_newline_from_dir+0x1f>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpb   $0xa,(%rdi,%rcx,1)
je     1120 <strip_newline_from_dir+0x20>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <strip_newline_from_dir+0x10>
ret
movb   $0x0,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define void @strip_newline_from_dir(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %14
%7 = phi i64 [ 0, %4 ], [ %15, %14 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = and i64 %7, 4294967295
%13 = getelementptr inbounds i8, i8* %0, i64 %12
store i8 0, i8* %13
br label %17
14: ; preds = %6
%15 = add nuw nsw i64 %7, 1
%16 = icmp eq i64 %15, %5
br i1 %16, label %17, label %6
17: ; preds = %14, %2, %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: recterm [-h] [-m min_delay] [-r rows] [-c cols] [-a width] "
         "[output]\n"
         "\t-h          : show this help                                       "
         "   \n"
         "\t-m min_delay: minimum delay (1/100 sec) of animation gif (default: "
         "5) \n"
         "\t-r rows     : column size of internal termios (default: 80)        "
         "   \n"
         "\t-c cols     : row size of internal termios (default: 24)           "
         "   \n"
         "\t-a width    : wide or half for ambiguous width (default: wide)     "
         "   \n"
         "\toutput      : output filename (default: recterm.gif)               "
         "   \n");
}


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

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

LLVM IR (-O0):
@.str = [508 x i8] c"usage: recterm [-h] [-m min_delay] [-r rows] [-c cols] [-a width] [output]\0A\09-h : show this help \0A\09-m min_delay: minimum delay (1/100 sec) of animation gif (default: 5) \0A\09-r rows : column size of internal termios (default: 80) \0A\09-c cols : row size of internal termios (default: 24) \0A\09-a width : wide or half for ambiguous width (default: wide) \0A\09output : output filename (default: recterm.gif) \0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [507 x i8] c"usage: recterm [-h] [-m min_delay] [-r rows] [-c cols] [-a width] [output]\0A\09-h : show this help \0A\09-m min_delay: minimum delay (1/100 sec) of animation gif (default: 5) \0A\09-r rows : column size of internal termios (default: 80) \0A\09-c cols : row size of internal termios (default: 24) \0A\09-a width : wide or half for ambiguous width (default: wide) \0A\09output : output filename (default: recterm.gif) \00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([507 x i8], [507 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct wl_shell {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_shell_set_user_data(struct wl_shell *wl_shell, void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_shell, user_data);
}


x86 assembly (clang, -O0):
<wl_shell_set_user_data>:
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 <wl_proxy_set_user_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_shell_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_shell = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_set_user_data(%struct.wl_shell* %0, i8* %1) {
%3 = alloca %struct.wl_shell*
%4 = alloca i8*
store %struct.wl_shell* %0, %struct.wl_shell** %3
store i8* %1, i8** %4
%5 = load %struct.wl_shell*, %struct.wl_shell** %3
%6 = bitcast %struct.wl_shell* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_shell = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_set_user_data(%struct.wl_shell* %0, i8* %1) {
%3 = bitcast %struct.wl_shell* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ overflow();
int main(int argc, char *argv[]) { overflow(); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @overflow()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @overflow()
ret i32 0
}
void mul_s(float *source1, float *source2, float *target) {
  *target = (*source1) * (*source2);
}


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

x86 assembly (clang, -O2):
<mul_s>:
movss  (%rdi),%xmm0
mulss  (%rsi),%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @mul_s(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = load float*, float** %5
%10 = load float, float* %9
%11 = fmul float %8, %10
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @mul_s(float* nocapture %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = fmul float %4, %5
store float %6, float* %2
ret void
}
/* Variables and functions */
unsigned LittleUnsigned(unsigned l) { return l; }


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

x86 assembly (clang, -O2):
<LittleUnsigned>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @LittleUnsigned(i32 returned %0) {
ret i32 %0
}
unsigned long f() {
  const char c[] = "hola";
  return sizeof(c);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xef1(%rip),%al
mov    %al,-0x1(%rbp)
mov    $0x5,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.f.c = [5 x i8] c"hola\00"
define i64 @f() {
%1 = alloca [5 x i8]
%2 = bitcast [5 x i8]* %1 to i8*
ret i64 5
}

LLVM IR (-O2):
define i64 @f() {
ret i64 5
}
int isLeftAssociative(char c) {
  switch (c) {
  case '+':
  case '-':
  case '*':
  case '/':
  case '%':
    return 1;
  case '~':
  case '_':
  case '$':
  case '!':
  case '^':
    return 0;
  }
}


x86 assembly (clang, -O0):
<isLeftAssociative>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5d,%eax
ja     1147 <isLeftAssociative+0x47>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1147 <isLeftAssociative+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLeftAssociative>:
lea    -0x21(%rdi),%eax
cmp    $0x3e,%eax
ja     1118 <isLeftAssociative+0x18>
movabs $0x6000000000000009,%rcx
bt     %rax,%rcx
jb     1122 <isLeftAssociative+0x22>
mov    $0x1,%eax
cmp    $0x7e,%edi
jne    1124 <isLeftAssociative+0x24>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isLeftAssociative(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 47, label %6
i32 37, label %6
i32 126, label %7
i32 95, label %7
i32 36, label %7
i32 33, label %7
i32 94, label %7
]
6: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1, %1, %1, %1, %1
store i32 0, i32* %2
br label %8
8: ; preds = %6, %7, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isLeftAssociative(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 94, label %3
i32 33, label %3
i32 36, label %3
i32 95, label %3
i32 126, label %3
]
3: ; preds = %1, %1, %1, %1, %1
br label %4
4: ; preds = %3, %1
%5 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %5
}
void init_real_constants() {}


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

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

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

LLVM IR (-O2):
define void @init_real_constants() {
ret void
}
int pl_on_lib_exit(void) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pl_on_lib_exit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ asyncaddrinfo_cleanup();
void resolve_cleanup() { asyncaddrinfo_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @resolve_cleanup() {
%1 = tail call i32 (...) @asyncaddrinfo_cleanup()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ key_vector;
};
typedef TYPE_1__ XKeymapEvent;

/* Variables and functions */
void *get_XKeymapEvent_key_vector(void *_p) {
  return (void *)(((XKeymapEvent *)_p)->key_vector);
}


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

x86 assembly (clang, -O2):
<get_XKeymapEvent_key_vector>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XKeymapEvent_key_vector(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XKeymapEvent_key_vector(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(double **);
void dmatrix_zeiger_free(double **m) {
  free(m);
  return;
}


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

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

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

LLVM IR (-O2):
define void @dmatrix_zeiger_free(double** nocapture %0) {
%2 = tail call i32 @free(double** %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIST_POINT;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ DIST_POINT_it;
int i2d_DIST_POINT(DIST_POINT *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &DIST_POINT_it);
}


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

x86 assembly (clang, -O2):
<i2d_DIST_POINT>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@DIST_POINT_it = global i32 0
define i32 @i2d_DIST_POINT(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 i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @DIST_POINT_it)
ret i32 %7
}

LLVM IR (-O2):
@DIST_POINT_it = global i32 0
define i32 @i2d_DIST_POINT(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @DIST_POINT_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  unsigned a, b;
  short s;
  a = 0xf000;
  b = (short)a;
  if (b != 0xfffff000)
    abort();
  a = 0xf0f0;
  b = (char)a;
  if (b != 0xfffffff0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
mov    %eax,-0xc(%rbp)
cmpl   $0xfffff000,-0xc(%rbp)
je     1141 <main+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0xf0f0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xfffffff0,-0xc(%rbp)
je     1162 <main+0x52>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
store i32 0, i32* %1
store i32 61440, i32* %2
%5 = load i32, i32* %2
%6 = trunc i32 %5 to i16
%7 = sext i16 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, -4096
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
store i32 61680, i32* %2
%13 = load i32, i32* %2
%14 = trunc i32 %13 to i8
%15 = sext i8 %14 to i32
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, -16
br i1 %17, label %18, label %20
18: ; preds = %12
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int ft_islower(unsigned char c) {
  if (c >= 'a' && c <= 'z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <ft_islower+0x30>
movzbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <ft_islower+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <ft_islower+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_islower(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @ft_islower(i8 zeroext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Display(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char c[50];
  printf("Enter string: ");
  gets(c);
  Display(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x40(%rbp),%rdi
call   1050 <Display@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <Display@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter string: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = call i32 @Display(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter string: \00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @Display(i8* %2)
ret i32 0
}
/* Type definitions */
struct wordsplit {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int wordsplit_len(char const *, int /*<<< orphan*/, struct wordsplit *,
                  unsigned int);
int wordsplit(const char *command, struct wordsplit *ws, unsigned flags) {
  return wordsplit_len(command, command ? strlen(command) : 0, ws, flags);
}


x86 assembly (clang, -O0):
<wordsplit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1157 <wordsplit+0x37>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
jmp    1161 <wordsplit+0x41>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1161 <wordsplit+0x41>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <wordsplit_len@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordsplit>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
test   %rdi,%rdi
je     113e <wordsplit+0x1e>
mov    %rbp,%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
jmp    1140 <wordsplit+0x20>
xor    %esi,%esi
mov    %rbp,%rdi
mov    %rbx,%rdx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <wordsplit_len@plt>

LLVM IR (-O0):
%struct.wordsplit = type { i32 }
define i32 @wordsplit(i8* %0, %struct.wordsplit* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.wordsplit*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.wordsplit* %1, %struct.wordsplit** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
br label %14
13: ; preds = %3
br label %14
14: ; preds = %13, %10
%15 = phi i32 [ %12, %10 ], [ 0, %13 ]
%16 = load %struct.wordsplit*, %struct.wordsplit** %5
%17 = load i32, i32* %6
%18 = call i32 @wordsplit_len(i8* %7, i32 %15, %struct.wordsplit* %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
%struct.wordsplit = type { i32 }
define i32 @wordsplit(i8* %0, %struct.wordsplit* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @strlen(i8* %0)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 0, %3 ]
%9 = tail call i32 @wordsplit_len(i8* %0, i32 %8, %struct.wordsplit* %1, i32 %2)
ret i32 %9
}
void driver_dummy(void) {}


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

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

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

LLVM IR (-O2):
define void @driver_dummy() {
ret void
}
void tr_onString(char *name, char *value) { ; }


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

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

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

LLVM IR (-O2):
define void @tr_onString(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void map_assert(int value) {
  if (!value)
    abort();
}


x86 assembly (clang, -O0):
<map_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <map_assert+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_assert>:
test   %edi,%edi
je     1115 <map_assert+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @map_assert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @map_assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
scalar_t__ toupper(int);
char util_toupper(char c) { return (char)toupper((int)c); }


x86 assembly (clang, -O0):
<util_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_toupper>:
push   %rax
call   1030 <toupper@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @util_toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i64 @toupper(i32 %4)
%6 = trunc i64 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @util_toupper(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i64 @toupper(i32 %2)
%4 = trunc i64 %3 to i8
ret i8 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlPeripheralEnable(uint32_t ui32Peripheral) {
  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe600,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe600,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralEnable>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movq   $0x1,0x43fcc000(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074783744, %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, 4026531840
%9 = or i64 %8, 33554432
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = add nsw i32 1074783744, %12
%14 = sext i32 %13 to i64
%15 = and i64 %14, 1048575
%16 = shl i64 %15, 5
%17 = or i64 %9, %16
%18 = load i32, i32* %2
%19 = and i32 %18, 255
%20 = shl i32 %19, 2
%21 = sext i32 %20 to i64
%22 = or i64 %17, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 1, i64* %23
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralEnable(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140637696
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
store volatile i64 1, i64* %9
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
void conf_default_message_callback(const char *fmt, va_list ap) {
  printf("#\n# ");
  vprintf(fmt, ap);
  printf("\n#\n");
}


x86 assembly (clang, -O0):
<conf_default_message_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <vprintf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_default_message_callback>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <vprintf@plt>
lea    0xeb0(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"#\0A# \00"
@str = [3 x i8] c"\0A#\00"
define void @conf_default_message_callback(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @vprintf(i8* %0, i32 %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void wrz_16(uint32_t addr, uint16_t data) { *((uint16_t *)addr) = data; }


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

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

LLVM IR (-O0):
define void @wrz_16(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i32*
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @wrz_16(i64 %0, i32 %1) {
%3 = inttoptr i64 %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
float inToM(int);
float ftToM(float ft) { return inToM(12 * ft); }


x86 assembly (clang, -O0):
<ftToM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <inToM@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftToM>:
mulss  0xee8(%rip),%xmm0
cvttss2si %xmm0,%edi
jmp    1030 <inToM@plt>

LLVM IR (-O0):
define float @ftToM(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 1.200000e+01, %3
%5 = fptosi float %4 to i32
%6 = call float @inToM(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @ftToM(float %0) {
%2 = fmul float %0, 1.200000e+01
%3 = fptosi float %2 to i32
%4 = tail call float @inToM(i32 %3)
ret float %4
}
int test_imm_63int32_reg(int val) { return ((val) & (0x63 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_63int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x63,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_63int32_reg>:
test   $0x63,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_63int32_reg(i32 %0) {
%2 = and i32 %0, 99
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ h();
int main(int argc, char *argv[]) {
  h();
  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    $0x0,%al
call   1030 <h@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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 (...) @h()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @h()
ret i32 0
}
unsigned Kit_CubeRemLit(unsigned uCube, int i) {
  return uCube & ~(unsigned)(1 << i);
}


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

x86 assembly (clang, -O2):
<Kit_CubeRemLit>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @Kit_CubeRemLit(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 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @Kit_CubeRemLit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
void void_foo(int i) {}


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

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

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

LLVM IR (-O2):
define void @void_foo(i32 %0) {
ret void
}
void heapsort(long *array, int length) {}


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

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

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

LLVM IR (-O2):
define void @heapsort(i64* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
void clearStdinBuf() {
  int c;
  while ((c = getchar()) != '\n' && c != EOF)
    ;
}


x86 assembly (clang, -O0):
<clearStdinBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5(%rbp)
je     1144 <clearStdinBuf+0x34>
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1154 <clearStdinBuf+0x44>
jmp    1159 <clearStdinBuf+0x49>
jmp    1118 <clearStdinBuf+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearStdinBuf>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1130 <clearStdinBuf+0x20>
cmp    (%rbx),%eax
jne    1120 <clearStdinBuf+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @clearStdinBuf() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br label %9
9: ; preds = %5, %2
%10 = phi i1 [ false, %2 ], [ %8, %5 ]
br i1 %10, label %11, label %12
11: ; preds = %9
br label %2
12: ; preds = %9
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @clearStdinBuf() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
void mumps_save_restore_return_c() {}


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

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

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

LLVM IR (-O2):
define void @mumps_save_restore_return_c() {
ret void
}
/* Type definitions */
struct text_tag_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_copy(struct genlist *);
struct text_tag_list *text_tag_list_copy(const struct text_tag_list *plist) {
  return ((struct text_tag_list *)(genlist_copy(((struct genlist *)(plist)))));
}


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

x86 assembly (clang, -O2):
<text_tag_list_copy>:
jmp    1030 <genlist_copy@plt>

LLVM IR (-O0):
%struct.text_tag_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.text_tag_list* @text_tag_list_copy(%struct.text_tag_list* %0) {
%2 = alloca %struct.text_tag_list*
store %struct.text_tag_list* %0, %struct.text_tag_list** %2
%3 = load %struct.text_tag_list*, %struct.text_tag_list** %2
%4 = bitcast %struct.text_tag_list* %3 to %struct.genlist*
%5 = call i64 @genlist_copy(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %struct.text_tag_list*
ret %struct.text_tag_list* %6
}

LLVM IR (-O2):
%struct.text_tag_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.text_tag_list* @text_tag_list_copy(%struct.text_tag_list* %0) {
%2 = bitcast %struct.text_tag_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_copy(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %struct.text_tag_list*
ret %struct.text_tag_list* %4
}