xunge/DecIR huggingface dataset:
long double _Complex div_long_double_rr(long double a, long double b) {
  return a / b;
}


x86 assembly (clang, -O0):
<div_long_double_rr>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fdivrp %st,%st(1)
fstpt  -0x20(%rbp)
fldz
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_long_double_rr>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fdivp  %st,%st(1)
fldz
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @div_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %5
%8 = fdiv x86_fp80 %6, %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%10 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %8, x86_fp80* %9
store x86_fp80 0xK00000000000000000000, x86_fp80* %10
%11 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %11
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @div_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = fdiv x86_fp80 %0, %1
%4 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %3, 0
%5 = insertvalue { x86_fp80, x86_fp80 } %4, x86_fp80 0xK00000000000000000000, 1
ret { x86_fp80, x86_fp80 } %5
}
void DBG_ENTER(const char *const func_name) {}


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

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

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

LLVM IR (-O2):
define void @DBG_ENTER(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          1470);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x00000044))) = ulIntFlags;
}


x86 assembly (clang, -O0):
<UARTIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    1153 <UARTIntClear+0x33>
lea    0xeb7(%rip),%rdi
mov    $0x5be,%esi
call   1030 <AssertFailure@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x44(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    1144 <UARTIntClear+0x24>
lea    0xec6(%rip),%rdi
mov    $0x5be,%esi
call   1030 <AssertFailure@plt>
mov    %r14,0x44(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @UARTBaseValid(i64 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1470)
br label %10
10: ; preds = %8, %2
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = add i64 %12, 68
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = tail call i32 @UARTBaseValid(i64 %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 1470)
br label %7
7: ; preds = %5, %2
%8 = add i64 %0, 68
%9 = inttoptr i64 %8 to i64*
store volatile i64 %1, i64* %9
ret void
}
void delete_event(struct state *st) {}


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

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

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

LLVM IR (-O2):
%struct.state = type opaque
define void @delete_event(%struct.state* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
void buf_release(void *buf) { (void)munmap(buf, 256 * 1024 * 1024); }


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

x86 assembly (clang, -O2):
<buf_release>:
mov    $0x10000000,%esi
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define void @buf_release(i8* %0) {
%2 = tail call i32 @munmap(i8* %0, i32 268435456)
ret void
}
/* Variables and functions */
unsigned short inw(int);
int /*<<< orphan*/ slow_down_io();
__attribute__((always_)) unsigned short inw_p(int port) {
  unsigned short value = inw(port);
  slow_down_io();
  return value;
}


x86 assembly (clang, -O0):
<inw_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <inw@plt>
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1040 <slow_down_io@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw_p>:
push   %rbx
call   1030 <inw@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <slow_down_io@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @inw_p(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call zeroext i16 @inw(i32 %4)
store i16 %5, i16* %3
%6 = call i32 (...) @slow_down_io()
%7 = load i16, i16* %3
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @inw_p(i32 %0) {
%2 = tail call zeroext i16 @inw(i32 %0)
%3 = tail call i32 (...) @slow_down_io()
ret i16 %2
}
int ffsll(long long x) { return __builtin_ffsll(x); }


x86 assembly (clang, -O0):
<ffsll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
bsf    %rdx,%rax
add    $0x1,%rax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffsll>:
bsf    %rdi,%rcx
add    $0x1,%ecx
xor    %eax,%eax
test   %rdi,%rdi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ffsll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.cttz.i64(i64 %3, i1 true)
%5 = add i64 %4, 1
%6 = icmp eq i64 %3, 0
%7 = select i1 %6, i64 0, i64 %5
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ffsll(i64 %0) {
%2 = tail call i64 @llvm.cttz.i64(i64 %0, i1 true)
%3 = icmp eq i64 %0, 0
%4 = trunc i64 %2 to i32
%5 = add nuw nsw i32 %4, 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
scalar_t__ nlz(int /*<<< orphan*/);
int8_t log2(uint64_t u) { return (int8_t)(63 - nlz(u)); }


x86 assembly (clang, -O0):
<log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nlz@plt>
mov    %rax,%rcx
mov    $0x3f,%eax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2>:
push   %rax
call   1030 <nlz@plt>
mov    $0x3f,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @log2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @nlz(i32 %3)
%5 = sub nsw i64 63, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @log2(i32 %0) {
%2 = tail call i64 @nlz(i32 %0)
%3 = trunc i64 %2 to i32
%4 = sub i32 63, %3
ret i32 %4
}
/* Variables and functions */
unsigned char msg_send3(int, unsigned char, unsigned char, unsigned char);
unsigned char ANT_AssignChannel(unsigned char chan, unsigned char chtype,
                                unsigned char net) {
  return msg_send3(0x42, chan, chtype, net);
}


x86 assembly (clang, -O0):
<ANT_AssignChannel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
mov    $0x42,%edi
movzbl %cl,%esi
movzbl %al,%edx
movzbl -0x3(%rbp),%ecx
call   1030 <msg_send3@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANT_AssignChannel>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x42,%edi
jmp    1030 <msg_send3@plt>

LLVM IR (-O0):
define zeroext i8 @ANT_AssignChannel(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = load i8, i8* %6
%10 = call zeroext i8 @msg_send3(i32 66, i8 zeroext %7, i8 zeroext %8, i8 zeroext %9)
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @ANT_AssignChannel(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call zeroext i8 @msg_send3(i32 66, i8 zeroext %0, i8 zeroext %1, i8 zeroext %2)
ret i8 %4
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *string) {
  if (string == NULL)
    return NULL;
  char *new_string = malloc(strlen(string) + 1);
  if (new_string)
    strcpy(new_string, string);
  return new_string;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118d <strdup+0x5d>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1185 <strdup+0x55>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <strdup+0x2f>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <strdup+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1161 <strdup+0x31>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %21
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %16, i8* %17)
br label %19
19: ; preds = %15, %8
%20 = load i8*, i8** %4
store i8* %20, i8** %2
br label %21
21: ; preds = %19, %7
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %3, %8, %1
%11 = phi i8* [ null, %1 ], [ %6, %8 ], [ null, %3 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ enprintf(int, char *);
void *realloc(void *, size_t);
void *enrealloc(int status, void *p, size_t size) {
  p = realloc(p, size);
  if (!p)
    enprintf(status, "realloc: out of memory\n");
  return p;
}


x86 assembly (clang, -O0):
<enrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115e <enrealloc+0x3e>
mov    -0x4(%rbp),%edi
lea    0xea7(%rip),%rsi
call   1040 <enprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enrealloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <enrealloc+0x26>
lea    0xec1(%rip),%rsi
mov    %ebp,%edi
call   1040 <enprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"realloc: out of memory\0A\00"
define i8* @enrealloc(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = call i8* @realloc(i8* %7, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i32, i32* %4
%14 = call i32 @enprintf(i32 %13, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %12, %3
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [24 x i8] c"realloc: out of memory\0A\00"
define noalias i8* @enrealloc(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %1, i64 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @enprintf(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
int MAXPATHLEN;
char *filter(char *);
int /*<<< orphan*/ getwd(char *);
int /*<<< orphan*/ printf(char *, char *);
void dopwd() {
  char wd[MAXPATHLEN];
  getwd(wd);
  printf("%s\n", filter(wd));
}


x86 assembly (clang, -O0):
<dopwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x18(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x10(%rbp)
call   1050 <getwd@plt>
mov    -0x18(%rbp),%rdi
call   1040 <filter@plt>
mov    %rax,%rsi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dopwd>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1050 <getwd@plt>
mov    %rbx,%rdi
call   1040 <filter@plt>
lea    0xe99(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@MAXPATHLEN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @dopwd() {
%1 = alloca i8*
%2 = alloca i64
%3 = load i32, i32* @MAXPATHLEN
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i8, i64 %4
store i64 %4, i64* %2
%7 = call i32 @getwd(i8* %6)
%8 = call i8* @filter(i8* %6)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@MAXPATHLEN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @dopwd() {
%1 = load i32, i32* @MAXPATHLEN
%2 = zext i32 %1 to i64
%3 = alloca i8, i64 %2
%4 = call i32 @getwd(i8* %3)
%5 = call i8* @filter(i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
int test_imm_C6int16_mem(short *val) {
  return ((*val) & (0xC6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C6int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 198
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int StrPosIdent(char *str) {
  char *s;
  int sum;
  sum = 0;
  for (s = str; *s; s++)
    sum += *s;
  return (int)sum % 617;
}


x86 assembly (clang, -O0):
<StrPosIdent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <StrPosIdent+0x42>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <StrPosIdent+0x17>
mov    -0x14(%rbp),%eax
mov    $0x269,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrPosIdent>:
mov    (%rdi),%al
test   %al,%al
je     1143 <StrPosIdent+0x43>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <StrPosIdent+0x10>
movslq %ecx,%rax
imul   $0xffffffffd46f3235,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x9,%ecx
add    %edx,%ecx
imul   $0x269,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @StrPosIdent(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add nsw i32 %6, %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = srem i32 %9, 617
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
unsigned int basic_hash(char *str) {
  int c;
  unsigned int hash;
  hash = 5381;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return (hash);
}


x86 assembly (clang, -O0):
<basic_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <basic_hash+0x41>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    110f <basic_hash+0xf>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <basic_hash+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <basic_hash+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @basic_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
int emac1_aalignmenterrors_set(unsigned int dev_id,
                               union emac1_aalignmenterrors_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac1_aalignmenterrors_u = type opaque
define i32 @emac1_aalignmenterrors_set(i32 %0, %union.emac1_aalignmenterrors_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_aalignmenterrors_u*
store i32 %0, i32* %3
store %union.emac1_aalignmenterrors_u* %1, %union.emac1_aalignmenterrors_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_aalignmenterrors_u = type opaque
define i32 @emac1_aalignmenterrors_set(i32 %0, %union.emac1_aalignmenterrors_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
void conditional_last_instruction() {
  int *p = malloc(sizeof(int));
  if (0) {
    free(p);
  }
}


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

x86 assembly (clang, -O2):
<conditional_last_instruction>:
mov    $0x4,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @conditional_last_instruction() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 4)
store i32* %2, i32** %1
ret void
}

LLVM IR (-O2):
define void @conditional_last_instruction() {
%1 = tail call i32* @malloc(i32 4)
ret void
}
void USL_HandleError(int error) {}


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

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

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

LLVM IR (-O2):
define void @USL_HandleError(i32 %0) {
ret void
}
/* Type definitions */
struct SwsContextArmJit {
  int dummy;
};

/* Variables and functions */
struct SwsContextArmJit *sws_arm_jit_create_scaler_internal(int, int, int, int,
                                                            int, int);
struct SwsContextArmJit *sws_arm_jit_create_omapfb_yuv420_scaler(
    int source_w, int source_h, int target_w, int target_h, int quality) {
  return sws_arm_jit_create_scaler_internal(source_w, source_h, target_w,
                                            target_h, quality, 2);
}


x86 assembly (clang, -O0):
<sws_arm_jit_create_omapfb_yuv420_scaler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x2,%r9d
call   1030 <sws_arm_jit_create_scaler_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sws_arm_jit_create_omapfb_yuv420_scaler>:
mov    $0x2,%r9d
jmp    1030 <sws_arm_jit_create_scaler_internal@plt>

LLVM IR (-O0):
%struct.SwsContextArmJit = type { i32 }
define %struct.SwsContextArmJit* @sws_arm_jit_create_omapfb_yuv420_scaler(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call %struct.SwsContextArmJit* @sws_arm_jit_create_scaler_internal(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 2)
ret %struct.SwsContextArmJit* %16
}

LLVM IR (-O2):
%struct.SwsContextArmJit = type { i32 }
define %struct.SwsContextArmJit* @sws_arm_jit_create_omapfb_yuv420_scaler(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call %struct.SwsContextArmJit* @sws_arm_jit_create_scaler_internal(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 2)
ret %struct.SwsContextArmJit* %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void memory_free(void *ptr, const char *file, int line) {
  if (NULL != ptr)
    free(ptr);
}


x86 assembly (clang, -O0):
<memory_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1138 <memory_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_free>:
test   %rdi,%rdi
je     111a <memory_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @memory_free(i8* %0, i8* nocapture readnone %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
int test_imm_86int16_mem(short *val) {
  return ((*val) & (-0x86 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_86int16_mem>:
movzwl (%rdi),%eax
test   $0xff7a,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_86int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -134
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned long RGB2HSI95(unsigned long);
unsigned long rgb2hsi(unsigned long rgb) { return RGB2HSI95(rgb); }


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

x86 assembly (clang, -O2):
<rgb2hsi>:
jmp    1030 <RGB2HSI95@plt>

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

LLVM IR (-O2):
define i64 @rgb2hsi(i64 %0) {
%2 = tail call i64 @RGB2HSI95(i64 %0)
ret i64 %2
}
/* Variables and functions */
float powf(float, float);
float gs_srgb_nonlinear_to_linear(float u) {
  return (u <= 0.04045f) ? (u / 12.92f) : powf((u + 0.055f) / 1.055f, 2.4f);
}


x86 assembly (clang, -O0):
<gs_srgb_nonlinear_to_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     114a <gs_srgb_nonlinear_to_linear+0x3a>
movss  -0x4(%rbp),%xmm0
movss  0xed4(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1175 <gs_srgb_nonlinear_to_linear+0x65>
movss  0xeba(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  0xea9(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe99(%rip),%xmm1
call   1030 <powf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gs_srgb_nonlinear_to_linear>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    113a <gs_srgb_nonlinear_to_linear+0x2a>
addss  0xee3(%rip),%xmm0
divss  0xedf(%rip),%xmm0
movss  0xedb(%rip),%xmm1
jmp    1030 <powf@plt>
divss  0xec2(%rip),%xmm0
ret

LLVM IR (-O0):
define float @gs_srgb_nonlinear_to_linear(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ole float %3, 0x3FA4B5DCC0000000
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fdiv float %6, 0x4029D70A40000000
br label %13
8: ; preds = %1
%9 = load float, float* %2
%10 = fadd float %9, 0x3FAC28F5C0000000
%11 = fdiv float %10, 0x3FF0E147A0000000
%12 = call float @powf(float %11, float 0x4003333340000000)
br label %13
13: ; preds = %8, %5
%14 = phi float [ %7, %5 ], [ %12, %8 ]
ret float %14
}

LLVM IR (-O2):
define float @gs_srgb_nonlinear_to_linear(float %0) {
%2 = fcmp ugt float %0, 0x3FA4B5DCC0000000
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv float %0, 0x4029D70A40000000
br label %9
5: ; preds = %1
%6 = fadd float %0, 0x3FAC28F5C0000000
%7 = fdiv float %6, 0x3FF0E147A0000000
%8 = tail call float @powf(float %7, float 0x4003333340000000)
br label %9
9: ; preds = %5, %3
%10 = phi float [ %4, %3 ], [ %8, %5 ]
ret float %10
}
double svg_it_op(double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @svg_it_op(double returned %0) {
ret double %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ndm_endian_letoh16(int /*<<< orphan*/ const);
uint16_t ndm_endian_htole16(const uint16_t x) { return ndm_endian_letoh16(x); }


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

x86 assembly (clang, -O2):
<ndm_endian_htole16>:
jmp    1030 <ndm_endian_letoh16@plt>

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

LLVM IR (-O2):
define i32 @ndm_endian_htole16(i32 %0) {
%2 = tail call i32 @ndm_endian_letoh16(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SedTransCoarse();
int /*<<< orphan*/ SedTransFine();
void DoIterationDummy() {
  SedTransFine();
  SedTransCoarse();
}


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

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

LLVM IR (-O0):
define void @DoIterationDummy() {
%1 = call i32 (...) @SedTransFine()
%2 = call i32 (...) @SedTransCoarse()
ret void
}

LLVM IR (-O2):
define void @DoIterationDummy() {
%1 = tail call i32 (...) @SedTransFine()
%2 = tail call i32 (...) @SedTransCoarse()
ret void
}
const char *Creator_createCasterMethod(struct Creator *self) {
  const char *method =
      "void* cast_object( void* theId , void* theObject )\n"
      "{\n"
      "\tvoid**components=(((struct Instance*)theObject)->_components);\n"
      "\twhile(*components!=NULL)\n"
      "\t{\n"
      "\t\tif (((struct Instance*)*components)->_class->classId==theId) "
      "return((void*)*components);\n"
      "\t\tcomponents += 1;\n"
      "\t}\n"
      "\t#ifdef DEBUG\n"
      "\tcomponents=(((struct Instance*)theObject)->_components);\n"
      "\tprintf(\"\\nClassId : %lx Not Found in ClassInstance : %s\" , (long) "
      "theObject , ((struct Instance*)*components)->_class->className );\n\n"
      "\t#endif\n"
      "\treturn NULL;\n"
      "}\n";
  return method;
}


x86 assembly (clang, -O0):
<Creator_createCasterMethod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Creator_createCasterMethod>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.Creator = type opaque
@.str = [490 x i8] c"void* cast_object( void* theId , void* theObject )\0A{\0A\09void**components=(((struct Instance*)theObject)->_components);\0A\09while(*components!=NULL)\0A\09{\0A\09\09if (((struct Instance*)*components)->_class->classId==theId) return((void*)*components);\0A\09\09components += 1;\0A\09}\0A\09#ifdef DEBUG\0A\09components=(((struct Instance*)theObject)->_components);\0A\09printf(\22\\nClassId : %lx Not Found in ClassInstance : %s\22 , (long) theObject , ((struct Instance*)*components)->_class->className );\0A\0A\09#endif\0A\09return NULL;\0A}\0A\00"
define i8* @Creator_createCasterMethod(%struct.Creator* %0) {
%2 = alloca %struct.Creator*
%3 = alloca i8*
store %struct.Creator* %0, %struct.Creator** %2
store i8* getelementptr inbounds ([490 x i8], [490 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
ret i8* %4
}

LLVM IR (-O2):
%struct.Creator = type opaque
@.str = [490 x i8] c"void* cast_object( void* theId , void* theObject )\0A{\0A\09void**components=(((struct Instance*)theObject)->_components);\0A\09while(*components!=NULL)\0A\09{\0A\09\09if (((struct Instance*)*components)->_class->classId==theId) return((void*)*components);\0A\09\09components += 1;\0A\09}\0A\09#ifdef DEBUG\0A\09components=(((struct Instance*)theObject)->_components);\0A\09printf(\22\\nClassId : %lx Not Found in ClassInstance : %s\22 , (long) theObject , ((struct Instance*)*components)->_class->className );\0A\0A\09#endif\0A\09return NULL;\0A}\0A\00"
define i8* @Creator_createCasterMethod(%struct.Creator* nocapture readnone %0) {
ret i8* getelementptr inbounds ([490 x i8], [490 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, unsigned long);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p == NULL)
    fatal("malloc %lu", (unsigned long)size);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xmalloc+0x34>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xmalloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"malloc %lu\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void av_sscanf() {}


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

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

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

LLVM IR (-O2):
define void @av_sscanf() {
ret void
}
/* Variables and functions */
scalar_t__ calloc(scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char const *const);
scalar_t__ strlen(char const *const);
char *AllocString(const char *const string_constant) {
  char *tmp;
  tmp = (char *)calloc(strlen(string_constant) + 1, sizeof(char));
  strcpy(tmp, string_constant);
  return (tmp);
}


x86 assembly (clang, -O0):
<AllocString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AllocString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @AllocString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @calloc(i64 %6, i32 1)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @AllocString(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
void ath79_nfc_set_parts(struct mtd_partition *parts, int nr_parts) {}


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

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

LLVM IR (-O0):
%struct.mtd_partition = type opaque
define void @ath79_nfc_set_parts(%struct.mtd_partition* %0, i32 %1) {
%3 = alloca %struct.mtd_partition*
%4 = alloca i32
store %struct.mtd_partition* %0, %struct.mtd_partition** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.mtd_partition = type opaque
define void @ath79_nfc_set_parts(%struct.mtd_partition* nocapture %0, i32 %1) {
ret void
}
yyErr(n, l) { yyAbort(n, "bnf", l); }


x86 assembly (clang, -O0):
<yyErr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <yyAbort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyErr>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
xor    %eax,%eax
jmp    1030 <yyAbort@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"bnf\00"
define i32 @yyErr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @yyAbort to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"bnf\00"
define i32 @yyErr(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @yyAbort to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ __writeUARTChar(char);
void __writeString(char *s) {
  while (*s) {
    __writeUARTChar(*s);
    ++s;
  }
}


x86 assembly (clang, -O0):
<__writeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <__writeString+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <__writeUARTChar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <__writeString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__writeString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <__writeString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <__writeUARTChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <__writeString+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @__writeString(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 i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @__writeUARTChar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void mailimf_atom_free(char *atom) { free(atom); }


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

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

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

LLVM IR (-O2):
define void @mailimf_atom_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct vec2i {
  int dummy;
};
struct mat2 {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_multiply_mat2(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *, float *);
__attribute__((always_)) struct vec2i *
psvec2i_multiply_mat2(struct vec2i *result, struct vec2i *a, struct mat2 *m) {
  vec2i_multiply_mat2((int32_t *)result, (int32_t *)a, (float *)m);
  return result;
}


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

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

LLVM IR (-O0):
%struct.vec2i = type { i32 }
%struct.mat2 = type { i32 }
define %struct.vec2i* @psvec2i_multiply_mat2(%struct.vec2i* %0, %struct.vec2i* %1, %struct.mat2* %2) {
%4 = alloca %struct.vec2i*
%5 = alloca %struct.vec2i*
%6 = alloca %struct.mat2*
store %struct.vec2i* %0, %struct.vec2i** %4
store %struct.vec2i* %1, %struct.vec2i** %5
store %struct.mat2* %2, %struct.mat2** %6
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = load %struct.vec2i*, %struct.vec2i** %5
%10 = bitcast %struct.vec2i* %9 to i32*
%11 = load %struct.mat2*, %struct.mat2** %6
%12 = bitcast %struct.mat2* %11 to float*
%13 = call i32 @vec2i_multiply_mat2(i32* %8, i32* %10, float* %12)
%14 = load %struct.vec2i*, %struct.vec2i** %4
ret %struct.vec2i* %14
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
%struct.mat2 = type { i32 }
define %struct.vec2i* @psvec2i_multiply_mat2(%struct.vec2i* returned %0, %struct.vec2i* %1, %struct.mat2* %2) {
%4 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%6 = bitcast %struct.mat2* %2 to float*
%7 = tail call i32 @vec2i_multiply_mat2(i32* %4, i32* %5, float* %6)
ret %struct.vec2i* %0
}
/* Type definitions */
typedef int clockid_t;

/* Variables and functions */
int CLOCK_BOOTTIME;
#define CLOCK_BOOTTIME_ALARM 129
int CLOCK_REALTIME;
#define CLOCK_REALTIME_ALARM 128
clockid_t map_clock_id(clockid_t c) {
  switch (c) {
  case CLOCK_BOOTTIME_ALARM:
    return CLOCK_BOOTTIME;
  case CLOCK_REALTIME_ALARM:
    return CLOCK_REALTIME;
  default:
    return c;
  }
}


x86 assembly (clang, -O0):
<map_clock_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80,%eax
je     1141 <map_clock_id+0x41>
jmp    111d <map_clock_id+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
jne    1152 <map_clock_id+0x52>
jmp    1130 <map_clock_id+0x30>
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <map_clock_id+0x58>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <map_clock_id+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_clock_id>:
cmp    $0x80,%edi
je     111b <map_clock_id+0x1b>
mov    %edi,%eax
cmp    $0x81,%edi
jne    1124 <map_clock_id+0x24>
mov    0x2ecf(%rip),%rax
jmp    1122 <map_clock_id+0x22>
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@CLOCK_BOOTTIME = global i32 0
@CLOCK_REALTIME = global i32 0
define i32 @map_clock_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 129, label %5
i32 128, label %7
]
5: ; preds = %1
%6 = load i32, i32* @CLOCK_BOOTTIME
store i32 %6, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* @CLOCK_REALTIME
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %7, %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@CLOCK_BOOTTIME = global i32 0
@CLOCK_REALTIME = global i32 0
define i32 @map_clock_id(i32 %0) {
switch i32 %0, label %6 [
i32 129, label %2
i32 128, label %4
]
2: ; preds = %1
%3 = load i32, i32* @CLOCK_BOOTTIME
br label %6
4: ; preds = %1
%5 = load i32, i32* @CLOCK_REALTIME
br label %6
6: ; preds = %1, %4, %2
%7 = phi i32 [ %5, %4 ], [ %3, %2 ], [ %0, %1 ]
ret i32 %7
}