xunge/DecIR huggingface dataset:
char itoc(int i) {
  if (i <= 0)
    return '?';
  else if (i <= 26)
    return 'a' + i - 1;
  else if (i <= 52)
    return 'A' + i - 27;
  else
    return '?';
}


x86 assembly (clang, -O0):
<itoc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111a <itoc+0x1a>
movb   $0x3f,-0x1(%rbp)
jmp    1154 <itoc+0x54>
cmpl   $0x1a,-0x8(%rbp)
jg     1135 <itoc+0x35>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1154 <itoc+0x54>
cmpl   $0x34,-0x8(%rbp)
jg     1150 <itoc+0x50>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0x1b,%eax
mov    %al,-0x1(%rbp)
jmp    1154 <itoc+0x54>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoc>:
mov    $0x3f,%al
test   %edi,%edi
jle    111c <itoc+0x1c>
cmp    $0x1a,%edi
ja     1111 <itoc+0x11>
add    $0x60,%dil
jmp    111a <itoc+0x1a>
cmp    $0x34,%edi
ja     111c <itoc+0x1c>
add    $0x26,%dil
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @itoc(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 63, i8* %2
br label %24
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 26
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 97, %11
%13 = sub nsw i32 %12, 1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %24
15: ; preds = %7
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 52
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %3
%20 = add nsw i32 65, %19
%21 = sub nsw i32 %20, 27
%22 = trunc i32 %21 to i8
store i8 %22, i8* %2
br label %24
23: ; preds = %15
store i8 63, i8* %2
br label %24
24: ; preds = %23, %18, %10, %6
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define signext i8 @itoc(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 27
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %0 to i8
%7 = add nuw nsw i8 %6, 96
br label %13
8: ; preds = %3
%9 = icmp ult i32 %0, 53
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = trunc i32 %0 to i8
%12 = add nuw nsw i8 %11, 38
br label %13
13: ; preds = %8, %1, %10, %5
%14 = phi i8 [ %7, %5 ], [ %12, %10 ], [ 63, %1 ], [ 63, %8 ]
ret i8 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print(char *str) { printf("%s", str); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
long double acosh(long double);
long double acoshl(long double a1) { return acosh(a1); }


x86 assembly (clang, -O0):
<acoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <acosh@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acoshl>:
jmp    1030 <acosh@plt>

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

LLVM IR (-O2):
define x86_fp80 @acoshl(x86_fp80 %0) {
%2 = tail call x86_fp80 @acosh(x86_fp80 %0)
ret x86_fp80 %2
}
int isatty(int fd) {
  do {
    if (!(0))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @isatty(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
ret i32 0
}
/* Type definitions */
struct xdg_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void xdg_surface_set_fullscreen(struct xdg_surface *xdg_surface) {
  wl_proxy_marshal((struct wl_proxy *)xdg_surface, 8);
}


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

x86 assembly (clang, -O2):
<xdg_surface_set_fullscreen>:
mov    $0x8,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_set_fullscreen(%struct.xdg_surface* %0) {
%2 = alloca %struct.xdg_surface*
store %struct.xdg_surface* %0, %struct.xdg_surface** %2
%3 = load %struct.xdg_surface*, %struct.xdg_surface** %2
%4 = bitcast %struct.xdg_surface* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 8)
ret void
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_set_fullscreen(%struct.xdg_surface* %0) {
%2 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 8)
ret void
}
int main(void) {
  const char **cpp;
  const char *p;
  const char c = 'A';
  cpp = &p;
  *cpp = &c;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x19(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    -0x19(%rbp),%rcx
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int split_string(char *, char, char ***);
int parse_fields(char *str, char ***arr) {
  return split_string(str, '\t', arr);
}


x86 assembly (clang, -O0):
<parse_fields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x9,%esi
call   1030 <split_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_fields>:
mov    %rsi,%rdx
mov    $0x9,%esi
jmp    1030 <split_string@plt>

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

LLVM IR (-O2):
define i32 @parse_fields(i8* %0, i8*** %1) {
%3 = tail call i32 @split_string(i8* %0, i8 signext 9, i8*** %1)
ret i32 %3
}
void swap(int *first, int *last) {
  int temp = *last;
  *last = *first;
  *first = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rsi),%eax
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
store i32 %4, i32* %1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_adc();
void e_adc_abs() {
  e_abs();
  e_adc();
}


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

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

LLVM IR (-O0):
define void @e_adc_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_adc()
ret void
}

LLVM IR (-O2):
define void @e_adc_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_adc()
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (x > 0) {
    x = x + y;
    y--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1154 <main+0x44>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, char, int);
void init_struct(void *generic, int size) {
  {};
  memset((void *)generic, '\0', size);
  {};
  return;
}


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

x86 assembly (clang, -O2):
<init_struct>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @init_struct(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 = load i32, i32* %4
%7 = call i32 @memset(i8* %5, i8 signext 0, i32 %6)
ret void
}

LLVM IR (-O2):
define void @init_struct(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i8 signext 0, i32 %1)
ret void
}
void rop3_199_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_199_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_199_0_0>:
mov    (%rdi),%al
or     %dl,%al
and    %sil,%al
xor    %dl,%al
not    %al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_199_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_199_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %6, %2
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Type definitions */
struct ber_element {
  int dummy;
};

/* Variables and functions */
struct ber_element *ber_add_nstring(struct ber_element *, char const *,
                                    int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
struct ber_element *ber_add_string(struct ber_element *prev,
                                   const char *string) {
  return ber_add_nstring(prev, string, strlen(string));
}


x86 assembly (clang, -O0):
<ber_add_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <ber_add_nstring@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ber_add_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ber_add_nstring@plt>

LLVM IR (-O0):
%struct.ber_element = type { i32 }
define %struct.ber_element* @ber_add_string(%struct.ber_element* %0, i8* %1) {
%3 = alloca %struct.ber_element*
%4 = alloca i8*
store %struct.ber_element* %0, %struct.ber_element** %3
store i8* %1, i8** %4
%5 = load %struct.ber_element*, %struct.ber_element** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call %struct.ber_element* @ber_add_nstring(%struct.ber_element* %5, i8* %6, i32 %8)
ret %struct.ber_element* %9
}

LLVM IR (-O2):
%struct.ber_element = type { i32 }
define %struct.ber_element* @ber_add_string(%struct.ber_element* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call %struct.ber_element* @ber_add_nstring(%struct.ber_element* %0, i8* %1, i32 %3)
ret %struct.ber_element* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_, unused)) uint32_t otfcc_byteswap_u32(uint32_t i) {
  union {
    uint8_t i1[4];
    uint32_t i4;
  } src, dst;
  src.i4 = i;
  dst.i1[0] = src.i1[3];
  dst.i1[1] = src.i1[2];
  dst.i1[2] = src.i1[1];
  dst.i1[3] = src.i1[0];
  return dst.i4;
}


x86 assembly (clang, -O0):
<otfcc_byteswap_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { [4 x i32] }
define i32 @otfcc_byteswap_u32(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca %union.anon
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to [4 x i32]*
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 3
%9 = load i32, i32* %8
%10 = bitcast %union.anon* %4 to [4 x i32]*
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0, i64 0
store i32 %9, i32* %11
%12 = bitcast %union.anon* %3 to [4 x i32]*
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 2
%14 = load i32, i32* %13
%15 = bitcast %union.anon* %4 to [4 x i32]*
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 0, i64 1
store i32 %14, i32* %16
%17 = bitcast %union.anon* %3 to [4 x i32]*
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 1
%19 = load i32, i32* %18
%20 = bitcast %union.anon* %4 to [4 x i32]*
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 2
store i32 %19, i32* %21
%22 = bitcast %union.anon* %3 to [4 x i32]*
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %22, i64 0, i64 0
%24 = load i32, i32* %23
%25 = bitcast %union.anon* %4 to [4 x i32]*
%26 = getelementptr inbounds [4 x i32], [4 x i32]* %25, i64 0, i64 3
store i32 %24, i32* %26
%27 = bitcast %union.anon* %4 to i32*
%28 = load i32, i32* %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @otfcc_byteswap_u32(i32 %0) {
ret i32 undef
}
void ignore_numeric(struct socket_info *CANTUSE_sinfo __attribute__((unused)),
                    char *CANTUSE_params __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
%struct.socket_info = type opaque
define void @ignore_numeric(%struct.socket_info* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ ft_strlen(char *);
scalar_t__ strlen(char *);
int basic_test(void) {
  if (ft_strlen("salut") == strlen("salut"))
    return (0);
  else
    return (-1);
}


x86 assembly (clang, -O0):
<basic_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <ft_strlen@plt>
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
jne    1160 <basic_test+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1167 <basic_test+0x47>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_test>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ft_strlen@plt>
xor    %ecx,%ecx
cmp    $0x5,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"salut\00"
define i32 @basic_test() {
%1 = alloca i32
%2 = call i64 @ft_strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i64 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 0, i32* %1
br label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"salut\00"
define i32 @basic_test() {
%1 = tail call i64 @ft_strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 5
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or "
         "MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO and/or "
         "MBEDTLS_CTR_DRBG_C not defined.\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
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 = [129 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO and/or MBEDTLS_CTR_DRBG_C not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [128 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_PK_PARSE_C and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_FS_IO and/or MBEDTLS_CTR_DRBG_C not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void weapon_destroyed(struct entity_t *weapon) { ; }


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

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

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

LLVM IR (-O2):
%struct.entity_t = type opaque
define void @weapon_destroyed(%struct.entity_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc15(int status, void *arg) {
  printf("Executing exitfunc15 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc15>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc15 (status=%d, arg=%d)\0A\00"
define void @exitfunc15(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc15 (status=%d, arg=%d)\0A\00"
define void @exitfunc15(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
int test_imm_90uint16_mem(unsigned short *val) {
  return ((*val) & (0x90 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_90uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 144
%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_90uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 144
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double bipolarToUnipolar(double dValue) { return 0.5 * dValue + 0.5; }


x86 assembly (clang, -O0):
<bipolarToUnipolar>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bipolarToUnipolar>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bipolarToUnipolar(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %3, double 5.000000e-01)
ret double %4
}

LLVM IR (-O2):
define double @bipolarToUnipolar(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 5.000000e-01, double 5.000000e-01)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int __syscall_sched_getscheduler(int /*<<< orphan*/);
int sched_getscheduler(pid_t pid) {
  return (__syscall_sched_getscheduler(pid));
}


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

x86 assembly (clang, -O2):
<sched_getscheduler>:
jmp    1030 <__syscall_sched_getscheduler@plt>

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

LLVM IR (-O2):
define i32 @sched_getscheduler(i32 %0) {
%2 = tail call i32 @__syscall_sched_getscheduler(i32 %0)
ret i32 %2
}
/* Variables and functions */
int make_string(char **, char **, char *);
int /*<<< orphan*/ quicksort(char **, int *, int);
int format_recs(char **ptr, char *formstring, char **formed, int linenums,
                int *recnums) {
  int i;
  int j = -1;
  int num;
  int lastrec = 0;
  int currrec = 0;
  j = make_string(ptr, formed, formstring);
  quicksort(formed, recnums, j + 1);
  return 0;
}


x86 assembly (clang, -O0):
<format_recs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0xffffffff,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <make_string@plt>
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%edx
add    $0x1,%edx
call   1030 <quicksort@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_recs>:
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rbx,%rsi
call   1040 <make_string@plt>
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <quicksort@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @format_recs(i8** %0, i8* %1, i8** %2, i32 %3, i32* %4) {
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8** %0, i8*** %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
store i32 -1, i32* %12
store i32 0, i32* %14
store i32 0, i32* %15
%16 = load i8**, i8*** %6
%17 = load i8**, i8*** %8
%18 = load i8*, i8** %7
%19 = call i32 @make_string(i8** %16, i8** %17, i8* %18)
store i32 %19, i32* %12
%20 = load i8**, i8*** %8
%21 = load i32*, i32** %10
%22 = load i32, i32* %12
%23 = add nsw i32 %22, 1
%24 = call i32 @quicksort(i8** %20, i32* %21, i32 %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @format_recs(i8** %0, i8* %1, i8** %2, i32 %3, i32* %4) {
%6 = tail call i32 @make_string(i8** %0, i8** %2, i8* %1)
%7 = add nsw i32 %6, 1
%8 = tail call i32 @quicksort(i8** %2, i32* %4, i32 %7)
ret i32 0
}
int mik_isgraph(int c) { return (c > 0x20 && c <= 0x7e); }


x86 assembly (clang, -O0):
<mik_isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <mik_isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mik_isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @mik_isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mik_isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
void rop3_134_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = *D | S;
  stk3 = T & stk4;
  stk2 = S ^ stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_134_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xe(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_134_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %10
%18 = load i8, i8* %6
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = and i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = load i8, i8* %8
%34 = zext i8 %33 to i32
%35 = xor i32 %32, %34
%36 = trunc i32 %35 to i8
store i8 %36, i8* %7
%37 = load i8, i8* %7
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8, i8* %6
%44 = zext i8 %43 to i32
%45 = xor i32 %44, -1
%46 = and i32 %42, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = load i8, i8* %5
%51 = zext i8 %50 to i32
%52 = and i32 %49, %51
%53 = or i32 %46, %52
%54 = load i8*, i8** %4
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = load i8, i8* %6
%58 = zext i8 %57 to i32
%59 = and i32 %56, %58
%60 = or i32 %53, %59
%61 = trunc i32 %60 to i8
%62 = load i8*, i8** %4
store i8 %61, i8* %62
ret void
}

LLVM IR (-O2):
define void @rop3_134_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
void g_dataset_id_get_data() {}


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

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

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

LLVM IR (-O2):
define void @g_dataset_id_get_data() {
ret void
}
unsigned normal2x_height_generic_input_fmts(void) {
  return (1 << 1) | (1 << 0);
}


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

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

LLVM IR (-O0):
define i32 @normal2x_height_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @normal2x_height_generic_input_fmts() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handle_aix(int signo) { printf("signal is: %d\n", signo); }


x86 assembly (clang, -O0):
<sig_handle_aix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handle_aix>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"signal is: %d\0A\00"
define void @sig_handle_aix(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
void __auto_closedir__(DIR **d) {
  if (*d)
    closedir(*d);
}


x86 assembly (clang, -O0):
<__auto_closedir__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <__auto_closedir__+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <closedir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__auto_closedir__>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <__auto_closedir__+0xd>
jmp    1030 <closedir@plt>
ret

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

LLVM IR (-O2):
define void @__auto_closedir__(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @closedir(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int snprintf(char *, int, char *, unsigned char);
int STR_FEC_OUT(char *p, int n, unsigned char fec_out) {
  if (fec_out == 0)
    return 0;
  return snprintf(p, n, "fect_out:%d ", fec_out);
}


x86 assembly (clang, -O0):
<STR_FEC_OUT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %al,-0x15(%rbp)
movzbl -0x15(%rbp),%eax
cmp    $0x0,%eax
jne    113d <STR_FEC_OUT+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1157 <STR_FEC_OUT+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xeb5(%rip),%rdx
movzbl -0x15(%rbp),%ecx
call   1030 <snprintf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<STR_FEC_OUT>:
test   %edx,%edx
je     1123 <STR_FEC_OUT+0x13>
movzbl %dl,%ecx
lea    0xee2(%rip),%rdx
jmp    1030 <snprintf@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"fect_out:%d \00"
define i32 @STR_FEC_OUT(i8* %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8 %2, i8* %7
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 0, i32* %4
br label %17
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = load i8, i8* %7
%16 = call i32 @snprintf(i8* %13, i32 %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext %15)
store i32 %16, i32* %4
br label %17
17: ; preds = %12, %11
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@.str = [13 x i8] c"fect_out:%d \00"
define i32 @STR_FEC_OUT(i8* %0, i32 %1, i8 zeroext %2) {
%4 = icmp eq i8 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 zeroext %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 0, %3 ]
ret i32 %8
}
/* Variables and functions */
int PRCMHIBRegRead(int);
unsigned long PRCMSysResetCauseGet() {
  unsigned long ulWakeupStatus;
  ulWakeupStatus =
      ((*((volatile unsigned long *)(0x4402D000 + 0x0000000C))) & 0xFF);
  if (ulWakeupStatus == 0x00000000) {
    if (PRCMHIBRegRead(0x4402F800 + 0x00000468) & 0x1) {
      ulWakeupStatus = 0x00000007;
    }
  }
  return ulWakeupStatus;
}


x86 assembly (clang, -O0):
<PRCMSysResetCauseGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4402d00c,%eax
mov    (%rax),%rax
and    $0xff,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1158 <PRCMSysResetCauseGet+0x48>
mov    $0x4402fc68,%edi
call   1030 <PRCMHIBRegRead@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1153 <PRCMSysResetCauseGet+0x43>
movq   $0x7,-0x8(%rbp)
jmp    1158 <PRCMSysResetCauseGet+0x48>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMSysResetCauseGet>:
push   %rax
mov    $0xff,%eax
and    0x4402d00c,%rax
44
je     1122 <PRCMSysResetCauseGet+0x12>
pop    %rcx
ret
mov    $0x4402fc68,%edi
call   1030 <PRCMHIBRegRead@plt>
xor    %ecx,%ecx
test   $0x1,%al
mov    $0x7,%eax
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @PRCMSysResetCauseGet() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1141035020 to i64*)
%3 = and i64 %2, 255
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = call i32 @PRCMHIBRegRead(i32 1141046376)
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i64 7, i64* %1
br label %11
11: ; preds = %10, %6
br label %12
12: ; preds = %11, %0
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
define i64 @PRCMSysResetCauseGet() {
%1 = load volatile i64, i64* inttoptr (i64 1141035020 to i64*)
%2 = and i64 %1, 255
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = tail call i32 @PRCMHIBRegRead(i32 1141046376)
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i64 0, i64 7
br label %9
9: ; preds = %4, %0
%10 = phi i64 [ %2, %0 ], [ %8, %4 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ die(int, char *);
void verify(void *ptr) {
  if (ptr == NULL) {
    die(1, "Not enough memory for allocation.");
  }
}


x86 assembly (clang, -O0):
<verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1138 <verify+0x28>
mov    $0x1,%edi
lea    0xecd(%rip),%rsi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify>:
test   %rdi,%rdi
je     1116 <verify+0x6>
ret
lea    0xee3(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <die@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Not enough memory for allocation.\00"
define void @verify(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @die(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Not enough memory for allocation.\00"
define void @verify(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @die(i32 1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
void delay3usec(void) {
  int i;
  for (i = 0; i < 75; i++) {
    ;
  }
}


x86 assembly (clang, -O0):
<delay3usec>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4b,-0x4(%rbp)
jge    1128 <delay3usec+0x28>
jmp    111a <delay3usec+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay3usec+0xb>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay3usec() {
ret void
}
int check_string(char *s, char *f) {
  int i;
  for (i = 0; f[i] != '\0'; i++) {
    if (f[i] != s[i]) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1167 <check_string+0x67>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1154 <check_string+0x54>
movl   $0x1,-0x4(%rbp)
jmp    116e <check_string+0x6e>
jmp    1159 <check_string+0x59>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <check_string+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_string>:
mov    (%rsi),%al
test   %al,%al
je     1122 <check_string+0x22>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    (%rdi,%rcx,1),%al
jne    1125 <check_string+0x25>
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <check_string+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_string(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %15, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = getelementptr inbounds i8, i8* %0, i64 %10
%13 = load i8, i8* %12
%14 = icmp eq i8 %11, %13
%15 = add nuw i64 %10, 1
br i1 %14, label %5, label %16
16: ; preds = %9, %5, %2
%17 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %17
}
void f(void) {
  if (0 & 1 == 1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
void rootwrap(void) {}


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

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

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

LLVM IR (-O2):
define void @rootwrap() {
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SysCtlAltClkConfig(uint32_t ui32Config) {
  (*((volatile unsigned long *)(0x400FE138))) = ui32Config;
}


x86 assembly (clang, -O0):
<SysCtlAltClkConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400fe138,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlAltClkConfig>:
mov    %rdi,0x400fe138
40
ret

LLVM IR (-O0):
define void @SysCtlAltClkConfig(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074782520 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlAltClkConfig(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074782520 to i64*)
ret void
}
int test_imm_F9uint16_reg(unsigned short val) {
  return ((val) & (-0xF9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F9uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff07,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F9uint16_reg>:
test   $0xff07,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F9uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -249
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}