xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printProcessing(void) { printf("Processing . . .\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Processing . . .\0A\00"
define void @printProcessing() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Processing . . .\00"
define void @printProcessing() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
char *safe_strdup(const char *s) {
  char *ret;
  if ((ret = strdup(s)) == NULL) {
    (void)fprintf(stderr, "out of memory\n");
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<safe_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1176 <safe_strdup+0x46>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xe9d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <safe_strdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @safe_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ doSth();
scalar_t__ noerror();
int main(int argc, const char *argv[]) {
  while (noerror()) {
    doSth();
  }
}


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 <noerror@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
mov    $0x0,%al
call   1040 <doSth@plt>
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <noerror@plt>
test   %rax,%rax
je     1145 <main+0x25>
xor    %eax,%eax
call   1040 <doSth@plt>
jmp    1130 <main+0x10>
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
br label %6
6: ; preds = %9, %2
%7 = call i64 (...) @noerror()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @doSth()
br label %6
11: ; preds = %6
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @noerror()
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @doSth()
%7 = tail call i64 (...) @noerror()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %2
ret i32 0
}
void copy(char to[], char from[]) {
  int i;
  i = 0;
  while ((to[i] = from[i]) != '\n')
    ++i;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     1143 <copy+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <copy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
cmp    $0xa,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 10
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int func3b(int);
__attribute__((gnu_)) __attribute__((always_)) int func3a(int x) {
  return func3b(x * 23);
}


x86 assembly (clang, -O0):
<func3a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x17,-0x4(%rbp),%edi
call   1030 <func3b@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3a>:
lea    (%rdi,%rdi,2),%eax
shl    $0x3,%eax
sub    %edi,%eax
mov    %eax,%edi
jmp    1030 <func3b@plt>

LLVM IR (-O0):
define i32 @func3a(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 23
%5 = call i32 @func3b(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @func3a(i32 %0) {
%2 = mul nsw i32 %0, 23
%3 = tail call i32 @func3b(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void html_table_close(void) { printf("</table>\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"</table>\0A\00"
define void @html_table_close() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"</table>\00"
define void @html_table_close() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
unsigned long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void removefile(char *filename) {
  FILE *fp;
  unsigned long int i, filesize;
  puts("A funcao de remover esta implementada porem desabilitada!");
  exit(EXIT_SUCCESS);
  fp = fopen(filename, "r+");
  fseek(fp, 0, SEEK_END);
  filesize = ftell(fp);
  rewind(fp);
  for (i = 0; i < filesize; i++)
    fprintf(fp, " ");
  remove(filename);
}


x86 assembly (clang, -O0):
<removefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<removefile>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"A funcao de remover esta implementada porem desabilitada!\00"
@EXIT_SUCCESS = global i32 0
@SEEK_END = global i32 0
define void @removefile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %2
%6 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [58 x i8] c"A funcao de remover esta implementada porem desabilitada!\00"
@EXIT_SUCCESS = global i32 0
@SEEK_END = global i32 0
define void @removefile(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int BootConfigRead(void) {
  int rc;
  rc = 0;
  return rc;
}


x86 assembly (clang, -O0):
<BootConfigRead>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @BootConfigRead() {
ret i32 0
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ g_time3();
int /*<<< orphan*/ g_write(char *, int /*<<< orphan*/);
int /*<<< orphan*/ g_writeln(char *);
int process_message_channel_data_response(struct stream *s) {
  {
    if (10 < 5) {
      g_write("xrdp-chansrv [%10.10u]: ", g_time3());
      g_writeln("process_message_channel_data_response:");
    }
  };
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @process_message_channel_data_response(%struct.stream* nocapture readnone %0) {
ret i32 0
}
void test_array_reverse() {}


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

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

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

LLVM IR (-O2):
define void @test_array_reverse() {
ret void
}
void RTAvlrUIntPtrGetRight(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrUIntPtrGetRight() {
ret void
}
/* Variables and functions */
void crash() {
  int *die_sweetie_die = NULL;
  *die_sweetie_die = 0xdead;
}


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xdead,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @crash() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 57005, i32* %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ WriteSpiCommand(int);
int /*<<< orphan*/ WriteSpiData(int);
void lcdSetContrast(unsigned char contrast) {
  WriteSpiCommand(0x81);
  WriteSpiData(32 + contrast);
  WriteSpiData(3);
}


x86 assembly (clang, -O0):
<lcdSetContrast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x81,%edi
call   1030 <WriteSpiCommand@plt>
movzbl -0x1(%rbp),%edi
add    $0x20,%edi
call   1040 <WriteSpiData@plt>
mov    $0x3,%edi
call   1040 <WriteSpiData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdSetContrast>:
push   %rbx
mov    %edi,%ebx
mov    $0x81,%edi
call   1030 <WriteSpiCommand@plt>
add    $0x20,%ebx
mov    %ebx,%edi
call   1040 <WriteSpiData@plt>
mov    $0x3,%edi
pop    %rbx
jmp    1040 <WriteSpiData@plt>

LLVM IR (-O0):
define void @lcdSetContrast(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @WriteSpiCommand(i32 129)
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = add nsw i32 32, %5
%7 = call i32 @WriteSpiData(i32 %6)
%8 = call i32 @WriteSpiData(i32 3)
ret void
}

LLVM IR (-O2):
define void @lcdSetContrast(i8 zeroext %0) {
%2 = tail call i32 @WriteSpiCommand(i32 129)
%3 = zext i8 %0 to i32
%4 = add nuw nsw i32 %3, 32
%5 = tail call i32 @WriteSpiData(i32 %4)
%6 = tail call i32 @WriteSpiData(i32 3)
ret void
}
/* Variables and functions */
int udiv(int, int, int /*<<< orphan*/);
signed int idiv(signed int num, signed int den) {
  signed int minus = 0;
  signed int v;
  if (num < 0) {
    num = -num;
    minus = 1;
  }
  if (den < 0) {
    den = -den;
    minus ^= 1;
  }
  v = udiv(num, den, 0);
  if (minus)
    v = -v;
  return v;
}


x86 assembly (clang, -O0):
<idiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    113e <idiv+0x2e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1159 <idiv+0x49>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <udiv@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     117b <idiv+0x6b>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idiv>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
neg    %edi
cmovs  %ebx,%edi
mov    %esi,%ebp
neg    %esi
cmovs  %ebp,%esi
xor    %edx,%edx
call   1030 <udiv@plt>
mov    %eax,%ecx
neg    %ecx
xor    %ebx,%ebp
cmovs  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @idiv(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
store i32 %11, i32* %3
store i32 1, i32* %5
br label %12
12: ; preds = %9, %2
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %4
%17 = sub nsw i32 0, %16
store i32 %17, i32* %4
%18 = load i32, i32* %5
%19 = xor i32 %18, 1
store i32 %19, i32* %5
br label %20
20: ; preds = %15, %12
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @udiv(i32 %21, i32 %22, i32 0)
store i32 %23, i32* %6
%24 = load i32, i32* %5
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %20
%27 = load i32, i32* %6
%28 = sub nsw i32 0, %27
store i32 %28, i32* %6
br label %29
29: ; preds = %26, %20
%30 = load i32, i32* %6
ret i32 %30
}

LLVM IR (-O2):
define i32 @idiv(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%5 = xor i32 %1, %0
%6 = tail call i32 @udiv(i32 %3, i32 %4, i32 0)
%7 = icmp sgt i32 %5, -1
%8 = sub nsw i32 0, %6
%9 = select i1 %7, i32 %6, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Circle_print() { printf("Circle\n"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"Circle\0A\00"
define void @Circle_print() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Circle\00"
define void @Circle_print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_3Cuint8_reg(unsigned char val) {
  return ((val) & (0x3C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Cuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x3c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Cuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 60
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void OOC_Codec_TwofishC_open() {}


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

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

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

LLVM IR (-O2):
define void @OOC_Codec_TwofishC_open() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quick_sort_ric(int *, int /*<<< orphan*/, int);
void quick_sort(int v[], int n) { quick_sort_ric(v, 0, n - 1); }


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

x86 assembly (clang, -O2):
<quick_sort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <quick_sort_ric@plt>

LLVM IR (-O0):
define void @quick_sort(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 = sub nsw i32 %6, 1
%8 = call i32 @quick_sort_ric(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @quick_sort_ric(i32* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR5C_get(void) { return U_WMRCORENONE_get("U_WMR5C"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR5C\00"
define i32 @U_WMR5C_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ atmel_atmega328_PD0_clear__E();
int /*<<< orphan*/ atmel_atmega328_PD0_makeOutput__E();
void test23_Blink4_pollen__reset__E() {
  atmel_atmega328_PD0_clear__E();
  atmel_atmega328_PD0_makeOutput__E();
}


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

x86 assembly (clang, -O2):
<test23_Blink4_pollen__reset__E>:
push   %rax
xor    %eax,%eax
call   1040 <atmel_atmega328_PD0_clear__E@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <atmel_atmega328_PD0_makeOutput__E@plt>

LLVM IR (-O0):
define void @test23_Blink4_pollen__reset__E() {
%1 = call i32 (...) @atmel_atmega328_PD0_clear__E()
%2 = call i32 (...) @atmel_atmega328_PD0_makeOutput__E()
ret void
}

LLVM IR (-O2):
define void @test23_Blink4_pollen__reset__E() {
%1 = tail call i32 (...) @atmel_atmega328_PD0_clear__E()
%2 = tail call i32 (...) @atmel_atmega328_PD0_makeOutput__E()
ret void
}
int wrenPowerOf2Ceil(int n) {
  n--;
  n |= n >> 1;
  n |= n >> 2;
  n |= n >> 4;
  n |= n >> 8;
  n |= n >> 16;
  n++;
  return n;
}


x86 assembly (clang, -O0):
<wrenPowerOf2Ceil>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrenPowerOf2Ceil>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @wrenPowerOf2Ceil(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @wrenPowerOf2Ceil(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ write(unsigned int, char *, int);
void fputc(unsigned int channel, char c) { write(channel, &c, 1); }


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @fputc(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_quaddobl_one_homogenization(int lintype) {
  int fail;
  int *b;
  double *c;
  fail = _ada_use_c2phc4c(893, &lintype, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_quaddobl_one_homogenization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x37d,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_quaddobl_one_homogenization>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x37d,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_quaddobl_one_homogenization(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 893, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_quaddobl_one_homogenization(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 893, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
FNIEMOP_DEF(iemOp_Grp7_xsetbv) {
  AssertFailed();
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOP_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <AssertFailed@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNIEMOP_DEF>:
push   %rax
xor    %eax,%eax
call   1040 <AssertFailed@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IEMOP_RAISE_INVALID_OPCODE@plt>

LLVM IR (-O0):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @AssertFailed()
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = tail call i32 (...) @AssertFailed()
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
/* Variables and functions */
void set_perf_event_pending(void) {}


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

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

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

LLVM IR (-O2):
define void @set_perf_event_pending() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  void *p = 0;
  int cnt = 0;
  while ((p = malloc(100 * 1024 * 1024))) {
    cnt++;
  }
  printf("分配了%d00MB的空间\n", cnt);
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x6400000,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     117b <main+0x4b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <main+0x25>
mov    -0x1c(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [26 x i8] c"\E5\88\86\E9\85\8D\E4\BA\86%d00MB\E7\9A\84\E7\A9\BA\E9\97\B4\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i32 0, i32* %7
br label %8
8: ; preds = %11, %2
%9 = call i8* @malloc(i32 104857600)
store i8* %9, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %7
%13 = add nsw i32 %12, 1
store i32 %13, i32* %7
br label %8
14: ; preds = %8
%15 = load i32, i32* %7
%16 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i8*, i8** %6
%18 = call i32 @free(i8* %17)
ret i32 0
}

LLVM IR (-O2):
void dfoo(long double *ldb1, double *db1) { *ldb1 = *db1; }


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

x86 assembly (clang, -O2):
<dfoo>:
fldl   (%rsi)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define void @dfoo(x86_fp80* %0, double* %1) {
%3 = alloca x86_fp80*
%4 = alloca double*
store x86_fp80* %0, x86_fp80** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = load double, double* %5
%7 = fpext double %6 to x86_fp80
%8 = load x86_fp80*, x86_fp80** %3
store x86_fp80 %7, x86_fp80* %8
ret void
}

LLVM IR (-O2):
define void @dfoo(x86_fp80* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fpext double %3 to x86_fp80
store x86_fp80 %4, x86_fp80* %0
ret void
}
int cairo_code_draw_casRLabel_get_width() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casRLabel_get_width() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casRLabel_get_width() {
ret i32 7
}
void drop_caches_sysctl_string(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<drop_caches_sysctl_string>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_caches_sysctl_string>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.drop_caches_sysctl_string = [26 x i8] c"drop_caches_sysctl_string\00"
define void @drop_caches_sysctl_string() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.drop_caches_sysctl_string, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.drop_caches_sysctl_string = [26 x i8] c"drop_caches_sysctl_string\00"
define void @drop_caches_sysctl_string() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @__func__.drop_caches_sysctl_string, i64 0, i64 0))
ret void
}
void Alloc_Fault(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Alloc_Fault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Alloc_Fault+0x9>
jmp    1109 <Alloc_Fault+0x9>

x86 assembly (clang, -O2):
<Alloc_Fault>:
jmp    1100 <Alloc_Fault>

LLVM IR (-O0):
define void @Alloc_Fault() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Alloc_Fault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
bool is_aligned_n(unsigned int x, unsigned int n) {
  return ((x & (n - 1)) == 0);
}


x86 assembly (clang, -O0):
<is_aligned_n>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_aligned_n>:
add    $0xffffffff,%esi
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_aligned_n(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 = sub i32 %6, 1
%8 = and i32 %5, %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_aligned_n(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void MUSIC_SetVolume(int volume) {
  volume = ((0) > (volume) ? (0) : (volume));
  volume = ((volume) < (255) ? (volume) : (255));
}


x86 assembly (clang, -O0):
<MUSIC_SetVolume>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jle    111c <MUSIC_SetVolume+0x1c>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <MUSIC_SetVolume+0x22>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jge    1140 <MUSIC_SetVolume+0x40>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114d <MUSIC_SetVolume+0x4d>
mov    $0xff,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <MUSIC_SetVolume+0x4d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @MUSIC_SetVolume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 0, %3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i32, i32* %2
br label %8
8: ; preds = %6, %5
%9 = phi i32 [ 0, %5 ], [ %7, %6 ]
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 255
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i32, i32* %2
br label %15
14: ; preds = %8
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 255, %14 ]
store i32 %16, i32* %2
ret void
}

LLVM IR (-O2):
define void @MUSIC_SetVolume(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
void print_shader_limits(GLenum target) {
  struct token_name {
    GLenum token;
    const char *name;
  };
  GLint max[1];
  int i;
}


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

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

LLVM IR (-O0):
define void @print_shader_limits(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
%4 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @print_shader_limits(i32 %0) {
ret void
}
int alpha(char c) {
  if (c <= 'z' && c >= 'a')
    return (1);
  if (c <= 'Z' && c >= 'A')
    return (1);
  if (c == '_')
    return (1);
  if (c == '.')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <alpha+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <alpha+0x30>
movl   $0x1,-0x4(%rbp)
jmp    118f <alpha+0x8f>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1156 <alpha+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <alpha+0x56>
movl   $0x1,-0x4(%rbp)
jmp    118f <alpha+0x8f>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    116f <alpha+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    118f <alpha+0x8f>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
jne    1188 <alpha+0x88>
movl   $0x1,-0x4(%rbp)
jmp    118f <alpha+0x8f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
cmp    $0x2e,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @alpha(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
%6 = icmp sle i32 %5, 122
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %32
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 90
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %32
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 95
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %2
br label %32
26: ; preds = %21
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 46
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 1, i32* %2
br label %32
31: ; preds = %26
store i32 0, i32* %2
br label %32
32: ; preds = %31, %30, %25, %20, %11
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @alpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = icmp eq i8 %0, 95
%6 = icmp eq i8 %0, 46
%7 = or i1 %5, %6
%8 = or i1 %7, %4
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void do_help() {
  printf("Usage : miniunz [-exvlo] file.zip [file_to_extract]\n\n");
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"Usage : miniunz [-exvlo] file.zip [file_to_extract]\0A\0A\00"
define void @do_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"Usage : miniunz [-exvlo] file.zip [file_to_extract]\0A\00"
define void @do_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int replace_string(char **, char const *);
int update_string(char **str, const char to[]) {
  if (to == NULL) {
    free(*str);
    *str = NULL;
    return 0;
  }
  return replace_string(str, to);
}


x86 assembly (clang, -O0):
<update_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115e <update_string+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    116e <update_string+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <replace_string@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_string>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1132 <update_string+0x12>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <replace_string@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @update_string(i8** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
%12 = load i8**, i8*** %4
store i8* null, i8** %12
store i32 0, i32* %3
br label %17
13: ; preds = %2
%14 = load i8**, i8*** %4
%15 = load i8*, i8** %5
%16 = call i32 @replace_string(i8** %14, i8* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @update_string(i8** %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = tail call i32 @free(i8* %5)
store i8* null, i8** %0
br label %9
7: ; preds = %2
%8 = tail call i32 @replace_string(i8** %0, i8* %1)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ 0, %4 ], [ %8, %7 ]
ret i32 %10
}
void f(void) {
  int a[100], b[100];
#pragma hlt distribute
  for (int i = 0; i < 100; i++) {
    {
      a[i] = i * 1;
      b[i] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2b0,%rsp
movl   $0x0,-0x324(%rbp)
cmpl   $0x64,-0x324(%rbp)
jge    115f <f+0x5f>
mov    -0x324(%rbp),%ecx
shl    $0x0,%ecx
movslq -0x324(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
movslq -0x324(%rbp),%rax
movl   $0x0,-0x320(%rbp,%rax,4)
mov    -0x324(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x324(%rbp)
jmp    1115 <f+0x15>
add    $0x2b0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca [100 x i32]
%2 = alloca [100 x i32]
%3 = alloca i32
store i32 0, i32* %3
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %11
store i32 %9, i32* %12
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %14
store i32 0, i32* %15
br label %16
16: ; preds = %7
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int f32_to_uf10(float const);
int f32_to_uf11(float const);
unsigned float3_to_r11g11b10f(const float rgb[3]) {
  return (f32_to_uf11(rgb[0]) & 0x7ff) | ((f32_to_uf11(rgb[1]) & 0x7ff) << 11) |
         ((f32_to_uf10(rgb[2]) & 0x3ff) << 22);
}


x86 assembly (clang, -O0):
<float3_to_r11g11b10f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <f32_to_uf11@plt>
and    $0x7ff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1030 <f32_to_uf11@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
and    $0x7ff,%ecx
shl    $0xb,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1040 <f32_to_uf10@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    $0x3ff,%ecx
shl    $0x16,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float3_to_r11g11b10f>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
movss  (%rdi),%xmm0
call   1030 <f32_to_uf11@plt>
mov    %eax,%ebp
and    $0x7ff,%ebp
movss  0x4(%r14),%xmm0
call   1030 <f32_to_uf11@plt>
mov    %eax,%ebx
shl    $0xb,%ebx
and    $0x3ff800,%ebx
or     %ebp,%ebx
movss  0x8(%r14),%xmm0
call   1040 <f32_to_uf10@plt>
shl    $0x16,%eax
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @float3_to_r11g11b10f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = call i32 @f32_to_uf11(float %5)
%7 = and i32 %6, 2047
%8 = load float*, float** %2
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = load float, float* %9
%11 = call i32 @f32_to_uf11(float %10)
%12 = and i32 %11, 2047
%13 = shl i32 %12, 11
%14 = or i32 %7, %13
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = call i32 @f32_to_uf10(float %17)
%19 = and i32 %18, 1023
%20 = shl i32 %19, 22
%21 = or i32 %14, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @float3_to_r11g11b10f(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @f32_to_uf11(float %2)
%4 = and i32 %3, 2047
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = tail call i32 @f32_to_uf11(float %6)
%8 = shl i32 %7, 11
%9 = and i32 %8, 4192256
%10 = or i32 %4, %9
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = tail call i32 @f32_to_uf10(float %12)
%14 = shl i32 %13, 22
%15 = or i32 %10, %14
ret i32 %15
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int __get_CPSR();
__attribute__((always_)) uint32_t __get_mode(void) {
  return (__get_CPSR() & 0x1FU);
}


x86 assembly (clang, -O0):
<__get_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <__get_CPSR@plt>
and    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_mode>:
push   %rax
xor    %eax,%eax
call   1030 <__get_CPSR@plt>
and    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__get_mode() {
%1 = call i32 (...) @__get_CPSR()
%2 = and i32 %1, 31
ret i32 %2
}

LLVM IR (-O2):
define i32 @__get_mode() {
%1 = tail call i32 (...) @__get_CPSR()
%2 = and i32 %1, 31
ret i32 %2
}
void RTFileCopyByHandles(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileCopyByHandles() {
ret void
}
/* Variables and functions */
scalar_t__ find(int /*<<< orphan*/ *, int /*<<< orphan*/);
int test_empty_array() { return 0 == find(NULL, 0); }


x86 assembly (clang, -O0):
<test_empty_array>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <find@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_empty_array>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <find@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_empty_array() {
%1 = call i64 @find(i32* null, i32 0)
%2 = icmp eq i64 0, %1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @test_empty_array() {
%1 = tail call i64 @find(i32* null, i32 0)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void f_object(void) {
  printf("%s(%d)\n", __func__, 31);
  ;
}


x86 assembly (clang, -O0):
<f_object>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x1f,%edx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_object>:
lea    0xee9(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x1f,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s(%d)\0A\00"
@__func__.f_object = [9 x i8] c"f_object\00"
define void @f_object() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.f_object, i64 0, i64 0), i32 31)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s(%d)\0A\00"
@__func__.f_object = [9 x i8] c"f_object\00"
define void @f_object() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.f_object, i64 0, i64 0), i32 31)
ret void
}