xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long, long);
void func(long b, long c) {
  long a;
  for (a = 0; a < 100; a = a + 1) {
    b = b + c;
  }
  printf("%ld %ld %ld\n", a, b, c);
  return;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x64,-0x18(%rbp)
jge    1150 <func+0x40>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <func+0x18>
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
mov    %rsi,%rcx
imul   $0x64,%rsi,%rdx
add    %rdi,%rdx
lea    0xedf(%rip),%rdi
mov    $0x64,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"%ld %ld %ld\0A\00"
define void @func(i64 %0, i64 %1) {
%3 = mul i64 %1, 100
%4 = add i64 %3, %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 100, i64 %4, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XInitExtension() {
  printf("XInitExtension called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"XInitExtension called\00"
define i32 @XInitExtension() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void foo(unsigned long r[], unsigned int d) {
  int i, n = d / 32;
  for (i = 0; i < n; ++i)
    r[i] = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x5,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1145 <foo+0x45>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <foo+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x20,%esi
jb     1129 <foo+0x19>
push   %rax
mov    %esi,%edx
shr    $0x2,%edx
and    $0xfffffff8,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @foo(i64* nocapture writeonly %0, i32 %1) {
%3 = icmp ult i32 %1, 32
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = bitcast i64* %0 to i8*
%6 = lshr i32 %1, 2
%7 = and i32 %6, 1073741816
%8 = zext i32 %7 to i64
br label %9
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_version();
int /*<<< orphan*/ puts(char *);
void print_usage() {
  print_version();
  puts("\nUsage: extcat file1 file2 file3 ...");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_version@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
xor    %eax,%eax
call   1040 <print_version@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0AUsage: extcat file1 file2 file3 ...\00"
define void @print_usage() {
%1 = call i32 (...) @print_version()
%2 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0AUsage: extcat file1 file2 file3 ...\00"
define void @print_usage() {
%1 = tail call i32 (...) @print_version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int u_int;

/* Variables and functions */
u_int frsw_dlci_hash(u_int dlci) { return ((dlci ^ (dlci >> 8)) & (256 - 1)); }


x86 assembly (clang, -O0):
<frsw_dlci_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
xor    %ecx,%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frsw_dlci_hash>:
mov    %edi,%eax
shr    $0x8,%eax
xor    %edi,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @frsw_dlci_hash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 8
%6 = xor i32 %3, %5
%7 = and i32 %6, 255
ret i32 %7
}

LLVM IR (-O2):
define i32 @frsw_dlci_hash(i32 %0) {
%2 = lshr i32 %0, 8
%3 = xor i32 %2, %0
%4 = and i32 %3, 255
ret i32 %4
}
void state_exec(void) {}


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

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

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

LLVM IR (-O2):
define void @state_exec() {
ret void
}
/* Variables and functions */
void *__libc_calloc(size_t, size_t);
int /*<<< orphan*/ log_event(int, void *, size_t);
void *calloc(size_t nmemb, size_t size) {
  void *ptr = __libc_calloc(nmemb, size);
  log_event(1, ptr, nmemb * size);
  return ptr;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__libc_calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1040 <log_event@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <__libc_calloc@plt>
mov    %rax,%r15
imul   %r14,%rbx
mov    $0x1,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1040 <log_event@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @__libc_calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = mul i64 %10, %11
%13 = call i32 @log_event(i32 1, i8* %9, i64 %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = tail call i8* @__libc_calloc(i64 %0, i64 %1)
%4 = mul i64 %1, %0
%5 = tail call i32 @log_event(i32 1, i8* %3, i64 %4)
ret i8* %3
}
foo5(char *filename, const char *modes) {}


x86 assembly (clang, -O0):
<foo5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo5(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 i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @foo5(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ vt100_EscSeq2(int, int, unsigned char *, long long);
void vt100_HVP(int n, int m) {
  vt100_EscSeq2(n, m, (unsigned char *)"f", (long long)2);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0xed5(%rip),%rdx
mov    $0x2,%ecx
call   1030 <vt100_EscSeq2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rdx
mov    $0x2,%ecx
jmp    1030 <vt100_EscSeq2@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define void @vt100_HVP(i32 %0, i32 %1) {
%3 = tail call i32 @vt100_EscSeq2(i32 %0, i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}
int test_imm_E5int64_lowword_mem(long long *val) {
  return ((*val) & (0xE5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_E5int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 229
%6 = icmp ne i64 %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_E5int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 229
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void ailog(char *stringa) {
  FILE *apri;
  apri = fopen("ailog.txt", "a");
  fprintf(apri, "%s", stringa);
  fclose(apri);
}


x86 assembly (clang, -O0):
<ailog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ailog>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ailog.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [3 x i8] c"%s\00"
define void @ailog(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"ailog.txt\00"
@.str.1 = [2 x i8] c"a\00"
define void @ailog(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fputs(i8* %0, i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
int support_fpu_trap(int flag __attribute__((unused))) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @support_fpu_trap(i32 %0) {
ret i32 1
}
int sdps_fill_jump(unsigned char *buf, unsigned header_addr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sdps_fill_jump(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
void outb(unsigned short port, unsigned char value) {
  asm volatile("outb %1, %0" : : "dN"(port), "a"(value));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0", "{dx}N,{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int _umask_usage();
int /*<<< orphan*/ strtol(char *, char **, int);
int /*<<< orphan*/ umask(int /*<<< orphan*/);
int _umask_set(char *mask) {
  mode_t mode;
  char *p;
  mode = strtol(mask, &p, 8);
  if (mask[0] == '\0' || *p != '\0')
    return _umask_usage();
  umask(mode);
  return 0;
}


x86 assembly (clang, -O0):
<_umask_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1050 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1171 <_umask_set+0x41>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1180 <_umask_set+0x50>
mov    $0x0,%al
call   1030 <_umask_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    118f <_umask_set+0x5f>
mov    -0x14(%rbp),%edi
call   1040 <umask@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_umask_set>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0x8,%edx
call   1050 <strtol@plt>
cmpb   $0x0,(%rbx)
je     1156 <_umask_set+0x26>
mov    0x8(%rsp),%rcx
cmpb   $0x0,(%rcx)
je     1162 <_umask_set+0x32>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <_umask_usage@plt>
mov    %eax,%edi
call   1040 <umask@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_umask_set(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strtol(i8* %6, i8** %5, i32 8)
store i32 %7, i32* %4
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %1
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %13, %1
%19 = call i32 (...) @_umask_usage()
store i32 %19, i32* %2
br label %23
20: ; preds = %13
%21 = load i32, i32* %4
%22 = call i32 @umask(i32 %21)
store i32 0, i32* %2
br label %23
23: ; preds = %20, %18
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @_umask_set(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtol(i8* %0, i8** %2, i32 8)
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %7, %1
%12 = tail call i32 (...) @_umask_usage()
br label %15
13: ; preds = %7
%14 = tail call i32 @umask(i32 %4)
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ 0, %13 ]
ret i32 %16
}
/* Type definitions */
struct commit {
  int dummy;
};

/* Variables and functions */
int parse_commit_gently(struct commit *, int /*<<< orphan*/);
int parse_commit(struct commit *item) { return parse_commit_gently(item, 0); }


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

x86 assembly (clang, -O2):
<parse_commit>:
xor    %esi,%esi
jmp    1030 <parse_commit_gently@plt>

LLVM IR (-O0):
%struct.commit = type { i32 }
define i32 @parse_commit(%struct.commit* %0) {
%2 = alloca %struct.commit*
store %struct.commit* %0, %struct.commit** %2
%3 = load %struct.commit*, %struct.commit** %2
%4 = call i32 @parse_commit_gently(%struct.commit* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.commit = type { i32 }
define i32 @parse_commit(%struct.commit* %0) {
%2 = tail call i32 @parse_commit_gently(%struct.commit* %0, i32 0)
ret i32 %2
}
/* Type definitions */
struct _icmAlloc {
  int dummy;
};

/* Variables and functions */
void *calloc(size_t, size_t);
void *icmAllocStd_calloc(struct _icmAlloc *pp, size_t num, size_t size) {
  return calloc(num, size);
}


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

x86 assembly (clang, -O2):
<icmAllocStd_calloc>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
%struct._icmAlloc = type { i32 }
define i8* @icmAllocStd_calloc(%struct._icmAlloc* %0, i64 %1, i64 %2) {
%4 = alloca %struct._icmAlloc*
%5 = alloca i64
%6 = alloca i64
store %struct._icmAlloc* %0, %struct._icmAlloc** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = call i8* @calloc(i64 %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct._icmAlloc = type { i32 }
define noalias i8* @icmAllocStd_calloc(%struct._icmAlloc* nocapture readnone %0, i64 %1, i64 %2) {
%4 = tail call i8* @calloc(i64 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
double const exp(double const);
double const pow(double const, double);
double HO_deriv_0(const double a, const double x) {
  double retval = -pow(a, 0.5e1 / 0.4e1) * x * exp(-a * x * x / 0.2e1) *
                  pow(0.3141592654e1, -0.1e1 / 0.4e1);
  return retval;
}


x86 assembly (clang, -O0):
<HO_deriv_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
call   1040 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe4b(%rip),%xmm0
movsd  0xe4b(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HO_deriv_0>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
movsd  0xec9(%rip),%xmm1
call   1040 <pow@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xea7(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xe9c(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HO_deriv_0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @pow(double %6, double 1.250000e+00)
%8 = fneg double %7
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = load double, double* %3
%12 = fneg double %11
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = load double, double* %4
%16 = fmul double %14, %15
%17 = fdiv double %16, 2.000000e+00
%18 = call double @exp(double %17)
%19 = fmul double %10, %18
%20 = call double @pow(double 0x400921FB54524550, double -2.500000e-01)
%21 = fmul double %19, %20
store double %21, double* %5
%22 = load double, double* %5
ret double %22
}

LLVM IR (-O2):
define double @HO_deriv_0(double %0, double %1) {
%3 = tail call double @pow(double %0, double 1.250000e+00)
%4 = fneg double %3
%5 = fmul double %4, %1
%6 = fneg double %0
%7 = fmul double %6, %1
%8 = fmul double %7, %1
%9 = fmul double %8, 5.000000e-01
%10 = tail call double @exp(double %9)
%11 = fmul double %5, %10
%12 = fmul double %11, 0x3FE809387011FA5F
ret double %12
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (*str++)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <strlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int f113(int *);
int f114(int *p) { return f113(p); }


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

x86 assembly (clang, -O2):
<f114>:
jmp    1030 <f113@plt>

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

LLVM IR (-O2):
define i32 @f114(i32* %0) {
%2 = tail call i32 @f113(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  volatile float fp = 1.61803;
  int x = fp;
  if (x != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1149 <main+0x39>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x3fcf1b9b,0x4(%rsp)
3f
cvttss2si 0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1128 <main+0x18>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
store i32 0, i32* %1
store volatile float 0x3FF9E37360000000, float* %2
%4 = load volatile float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store volatile float 0x3FF9E37360000000, float* %1
%3 = load volatile float, float* %1
%4 = fptosi float %3 to i32
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
void fftw_print_max_memory_usage(void) {}


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

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

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

LLVM IR (-O2):
define void @fftw_print_max_memory_usage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __set_BASEPRI(unsigned int);
void irq_clearmask(void) { __set_BASEPRI(0u); }


x86 assembly (clang, -O0):
<irq_clearmask>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <__set_BASEPRI@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_clearmask>:
xor    %edi,%edi
jmp    1030 <__set_BASEPRI@plt>

LLVM IR (-O0):
define void @irq_clearmask() {
%1 = call i32 @__set_BASEPRI(i32 0)
ret void
}

LLVM IR (-O2):
define void @irq_clearmask() {
%1 = tail call i32 @__set_BASEPRI(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blinkD() {
  blinkdash();
  blinkdot();
  blinkdot();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <blinkdash@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
movsd  0xeaf(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkD>:
push   %rax
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
movsd  0xeb2(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkD() {
%1 = call i32 (...) @blinkdash()
%2 = call i32 (...) @blinkdot()
%3 = call i32 (...) @blinkdot()
%4 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkD() {
%1 = tail call i32 (...) @blinkdash()
%2 = tail call i32 (...) @blinkdot()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ this_comparison_is_false();
void bla1lt(int var) {
  if (var + 10 < INT_MIN + 10)
    this_comparison_is_false();
}


x86 assembly (clang, -O0):
<bla1lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jge    113c <bla1lt+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla1lt>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jle    1122 <bla1lt+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_false@plt>
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define void @bla1lt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
%5 = load i32, i32* @INT_MIN
%6 = add nsw i32 %5, 10
%7 = icmp slt i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_false()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @bla1lt(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = icmp sgt i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_false()
br label %6
6: ; preds = %4, %1
ret void
}
int f(int x) {
  int y;
  if (x > 1) {
    y = f(x - 1);
    y = y + f(x - 1);
    return y;
  }
  return 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1159 <f+0x49>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <f+0x50>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0x1,%eax
cmp    $0x1,%edi
jle    1129 <f+0x19>
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
add    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call i32 @f(i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @f(i32 %13)
%15 = add nsw i32 %11, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %18
17: ; preds = %1
store i32 1, i32* %2
br label %18
18: ; preds = %17, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %5, label %3
3: ; preds = %1, %5
%4 = phi i32 [ %8, %5 ], [ 1, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @f(i32 %6)
%8 = shl nsw i32 %7, 1
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("hello world!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ len;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned int *, int);
void zipPrevEncodeLengthForceLarge(unsigned char *p, unsigned int len) {
  if (p == NULL)
    return;
  p[0] = 254;
  memcpy(p + 1, &len, sizeof(len));
  ;
}


x86 assembly (clang, -O0):
<zipPrevEncodeLengthForceLarge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <zipPrevEncodeLengthForceLarge+0x1f>
jmp    114c <zipPrevEncodeLengthForceLarge+0x3c>
mov    -0x8(%rbp),%rax
movb   $0xfe,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipPrevEncodeLengthForceLarge>:
push   %rax
mov    %esi,0x4(%rsp)
test   %rdi,%rdi
je     1130 <zipPrevEncodeLengthForceLarge+0x20>
movb   $0xfe,(%rdi)
add    $0x1,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @zipPrevEncodeLengthForceLarge(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %14
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 -2, i8* %10
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = call i32 @memcpy(i8* %12, i32* %4, i32 4)
br label %14
14: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @zipPrevEncodeLengthForceLarge(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %2
store i8 -2, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = call i32 @memcpy(i8* %6, i32* %3, i32 4)
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __attribute__((no, noclone)) test1(int i) {
  if (i == 12)
    return;
  if (i != 17) {
    if (i == 15)
      return;
    abort();
  }
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xc,-0x4(%rbp)
jne    112a <test1+0x1a>
jmp    114a <test1+0x3a>
cmpl   $0x11,-0x4(%rbp)
je     114a <test1+0x3a>
cmpl   $0xf,-0x4(%rbp)
jne    1143 <test1+0x33>
jmp    114a <test1+0x3a>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
cmp    $0x11,%edi
ja     1120 <test1+0x10>
mov    $0x29000,%eax
bt     %edi,%eax
jae    1120 <test1+0x10>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 12
br i1 %4, label %5, label %6
5: ; preds = %1
br label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 17
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 15
br i1 %11, label %12, label %13
12: ; preds = %9
br label %15
13: ; preds = %9
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %5, %12, %6
ret void
}

LLVM IR (-O2):
define void @test1(i32 %0) {
switch i32 %0, label %2 [
i32 17, label %4
i32 15, label %4
i32 12, label %4
]
2: ; preds = %1
%3 = tail call i32 (...) @abort()
unreachable
4: ; preds = %1, %1, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_NOTICE;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, char const *);
void log_watchtab_loaded(const char *path) {
  report(LOG_NOTICE, "Watchtab \"%s\" loaded successfully", path);
}


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

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

LLVM IR (-O0):
@LOG_NOTICE = global i32 0
@.str = [34 x i8] c"Watchtab \22%s\22 loaded successfully\00"
define void @log_watchtab_loaded(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_NOTICE
%4 = load i8*, i8** %2
%5 = call i32 @report(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@LOG_NOTICE = global i32 0
@.str = [34 x i8] c"Watchtab \22%s\22 loaded successfully\00"
define void @log_watchtab_loaded(i8* %0) {
%2 = load i32, i32* @LOG_NOTICE
%3 = tail call i32 @report(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dtrsm_(char *, char *, char *, char *, int *, int *,
                          double *, double *, int *, double *, int *);
void wcc_dtrsm_(char *SIDE, char *UPLO, char *TRANSA, char *DIAG, int *M,
                int *N, char *ALPHA, char *A, int *LDA, char *B, int *LDB) {
  dtrsm_(SIDE, UPLO, TRANSA, DIAG, M, N, (double *)ALPHA, (double *)A, LDA,
         (double *)B, LDB);
}


x86 assembly (clang, -O0):
<wcc_dtrsm_>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    0x10(%rbp),%r14
mov    0x18(%rbp),%rbx
mov    0x20(%rbp),%r11
mov    0x28(%rbp),%r10
mov    0x30(%rbp),%rax
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <dtrsm_@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dtrsm_>:
jmp    1030 <dtrsm_@plt>

LLVM IR (-O0):
define void @wcc_dtrsm_(i8* %0, i8* %1, i8* %2, i8* %3, i32* %4, i32* %5, i8* %6, i8* %7, i32* %8, i8* %9, i32* %10) {
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32*
%21 = alloca i8*
%22 = alloca i32*
store i8* %0, i8** %12
store i8* %1, i8** %13
store i8* %2, i8** %14
store i8* %3, i8** %15
store i32* %4, i32** %16
store i32* %5, i32** %17
store i8* %6, i8** %18
store i8* %7, i8** %19
store i32* %8, i32** %20
store i8* %9, i8** %21
store i32* %10, i32** %22
%23 = load i8*, i8** %12
%24 = load i8*, i8** %13
%25 = load i8*, i8** %14
%26 = load i8*, i8** %15
%27 = load i32*, i32** %16
%28 = load i32*, i32** %17
%29 = load i8*, i8** %18
%30 = bitcast i8* %29 to double*
%31 = load i8*, i8** %19
%32 = bitcast i8* %31 to double*
%33 = load i32*, i32** %20
%34 = load i8*, i8** %21
%35 = bitcast i8* %34 to double*
%36 = load i32*, i32** %22
%37 = call i32 @dtrsm_(i8* %23, i8* %24, i8* %25, i8* %26, i32* %27, i32* %28, double* %30, double* %32, i32* %33, double* %35, i32* %36)
ret void
}

LLVM IR (-O2):
define void @wcc_dtrsm_(i8* %0, i8* %1, i8* %2, i8* %3, i32* %4, i32* %5, i8* %6, i8* %7, i32* %8, i8* %9, i32* %10) {
%12 = bitcast i8* %6 to double*
%13 = bitcast i8* %7 to double*
%14 = bitcast i8* %9 to double*
%15 = tail call i32 @dtrsm_(i8* %0, i8* %1, i8* %2, i8* %3, i32* %4, i32* %5, double* %12, double* %13, i32* %8, double* %14, i32* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ warning(char *, char *);
void warn_no_longer_needed(char *name) {
  warning("%s is no longer needed", name);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"%s is no longer needed\00"
define void @warn_no_longer_needed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @warning(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s is no longer needed\00"
define void @warn_no_longer_needed(i8* %0) {
%2 = tail call i32 @warning(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void Timer_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @Timer_RestoreConfig() {
ret void
}
void test_one(int x) {
#pragma omp taskloop simd
  for (int i = 0; i < x; i++)
    ;
}


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

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

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

LLVM IR (-O2):
define void @test_one(i32 %0) {
ret void
}
__attribute__((always_)) int func4b(int x) { return x < 13 ? 1 : 2; }


x86 assembly (clang, -O0):
<func4b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0xd,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func4b>:
xor    %ecx,%ecx
cmp    $0xd,%edi
setl   %cl
mov    $0x2,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @func4b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 13
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 2
ret i32 %6
}

LLVM IR (-O2):
define i32 @func4b(i32 %0) {
%2 = icmp slt i32 %0, 13
%3 = select i1 %2, i32 1, i32 2
ret i32 %3
}
/* Variables and functions */
double pow(double, double);
double piemathPower(double a, double b) { return pow(a, b); }


x86 assembly (clang, -O0):
<piemathPower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piemathPower>:
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @piemathPower(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @pow(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @piemathPower(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
void test2(int n, int *p) { *(n ? p : (void *)0) = 1; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1122 <test2+0x22>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112d <test2+0x2d>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    112d <test2+0x2d>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
movl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @test2(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32*, i32** %4
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %7
%11 = phi i32* [ %8, %7 ], [ null, %9 ]
store i32 1, i32* %11
ret void
}

LLVM IR (-O2):
define void @test2(i32 %0, i32* nocapture writeonly %1) {
%3 = icmp ne i32 %0, 0
tail call void @llvm.assume(i1 %3)
store i32 1, i32* %1
ret void
}
const char *PDL_GetHardware(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @PDL_GetHardware() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @PDL_GetHardware() {
ret i8* null
}
unsigned long sort_odd(unsigned long w) {
  unsigned long x = w & 0xf0f0f0f0f0f0f0f0;
  unsigned long wx = w - x;
  x <<= 4;
  unsigned long wxw = (wx ^ x) & ((wx - x) >> 4);
  return wxw ^ w ^ (wxw >> 4);
}


x86 assembly (clang, -O0):
<sort_odd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xf0f0f0f0f0f0f0f0,%rax
f0 f0 f0
and    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
xor    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
shr    $0x4,%rcx
and    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
xor    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
shr    $0x4,%rcx
xor    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_odd>:
movabs $0xf0f0f0f0f0f0f00,%rcx
0f 0f 0f
lea    0xf(%rcx),%rax
and    %rdi,%rax
mov    %rdi,%rdx
shl    $0x4,%rdx
and    %rcx,%rdx
mov    %rdx,%rcx
xor    %rax,%rcx
sub    %rdx,%rax
shr    $0x4,%rax
and    %rcx,%rax
xor    %rax,%rdi
shr    $0x4,%rax
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @sort_odd(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = and i64 %6, -1085102592571150096
store i64 %7, i64* %3
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = sub i64 %8, %9
store i64 %10, i64* %4
%11 = load i64, i64* %3
%12 = shl i64 %11, 4
store i64 %12, i64* %3
%13 = load i64, i64* %4
%14 = load i64, i64* %3
%15 = xor i64 %13, %14
%16 = load i64, i64* %4
%17 = load i64, i64* %3
%18 = sub i64 %16, %17
%19 = lshr i64 %18, 4
%20 = and i64 %15, %19
store i64 %20, i64* %5
%21 = load i64, i64* %5
%22 = load i64, i64* %2
%23 = xor i64 %21, %22
%24 = load i64, i64* %5
%25 = lshr i64 %24, 4
%26 = xor i64 %23, %25
ret i64 %26
}

LLVM IR (-O2):
define i64 @sort_odd(i64 %0) {
%2 = and i64 %0, 1085102592571150095
%3 = shl i64 %0, 4
%4 = and i64 %3, 1085102592571150080
%5 = xor i64 %4, %2
%6 = sub nsw i64 %2, %4
%7 = lshr i64 %6, 4
%8 = and i64 %7, %5
%9 = xor i64 %8, %0
%10 = lshr exact i64 %8, 4
%11 = xor i64 %9, %10
ret i64 %11
}
void de_initialize_parallel_write() {}


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

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

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

LLVM IR (-O2):
define void @de_initialize_parallel_write() {
ret void
}
void __attribute__((__warning__("curl_easy_setopt expects a 'struct curl_slist "
                                "*' argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_curl_slist(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_curl_slist() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}