xunge/DecIR huggingface dataset:
void unselect_rows(void) {}


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

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

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

LLVM IR (-O2):
define void @unselect_rows() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clearScreen() {
  for (int i = 0; i < 100; i++) {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1143 <clearScreen+0x33>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <clearScreen+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearScreen>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <clearScreen+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @clearScreen() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @putchar(i32 10)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 100
br i1 %6, label %1, label %2
}
int fun1170() { return 1170; }


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

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

LLVM IR (-O0):
define i32 @fun1170() {
ret i32 1170
}

LLVM IR (-O2):
define i32 @fun1170() {
ret i32 1170
}
/* Variables and functions */
int /*<<< orphan*/ cbrt(double);
int /*<<< orphan*/ cbrtf(float);
int /*<<< orphan*/ cbrtl(long double);
void uninitvar_cbrt(void) {
  float f;
  (void)cbrtf(f);
  double d;
  (void)cbrt(d);
  long double ld;
  (void)cbrtl(ld);
}


x86 assembly (clang, -O0):
<uninitvar_cbrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1040 <cbrtf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <cbrt@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <cbrtl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_cbrt>:
sub    $0x18,%rsp
call   1040 <cbrtf@plt>
call   1050 <cbrt@plt>
call   1030 <cbrtl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_cbrt() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @cbrtf(float %4)
%6 = load double, double* %2
%7 = call i32 @cbrt(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @cbrtl(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_cbrt() {
%1 = tail call i32 @cbrtf(float undef)
%2 = tail call i32 @cbrt(double undef)
%3 = tail call i32 @cbrtl(x86_fp80 undef)
ret void
}
/* Variables and functions */
int link(char *, char *);
int /*<<< orphan*/ printf(char *);
int external_build_lib2_call(void) {
  printf("hello from external lib2\n");
  if (-1 != link("", "")) {
    printf("expecting posix's stub  link to return -1");
    return -1;
  }
  return 314;
}


x86 assembly (clang, -O0):
<external_build_lib2_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rsi
mov    %rsi,%rdi
call   1040 <link@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
je     116a <external_build_lib2_call+0x4a>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <external_build_lib2_call+0x51>
movl   $0x13a,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<external_build_lib2_call>:
push   %rax
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
mov    %rdi,%rsi
call   1050 <link@plt>
cmp    $0xffffffff,%eax
je     1164 <external_build_lib2_call+0x34>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    $0x13a,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"hello from external lib2\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [42 x i8] c"expecting posix's stub link to return -1\00"
define i32 @external_build_lib2_call() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @link(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp ne i32 -1, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %8
7: ; preds = %0
store i32 314, i32* %1
br label %8
8: ; preds = %7, %5
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [42 x i8] c"expecting posix's stub link to return -1\00"
@str = [25 x i8] c"hello from external lib2\00"
define i32 @external_build_lib2_call() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @link(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ -1, %4 ], [ 314, %0 ]
ret i32 %7
}
void XMapWindow() {}


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

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

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

LLVM IR (-O2):
define void @XMapWindow() {
ret void
}
unsigned hamdist(unsigned x, unsigned y) {
  unsigned dist = 0, val = x ^ y;
  while (val) {
    ++dist;
    val &= val - 1;
  }
  return dist;
}


x86 assembly (clang, -O0):
<hamdist>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     113e <hamdist+0x3e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    111a <hamdist+0x1a>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hamdist>:
xor    %eax,%eax
xor    %esi,%edi
je     111c <hamdist+0x1c>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <hamdist+0x10>
ret

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

LLVM IR (-O2):
define i32 @hamdist(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %10, %5 ], [ %3, %2 ]
%7 = phi i32 [ %8, %5 ], [ 0, %2 ]
%8 = add i32 %7, 1
%9 = add i32 %6, -1
%10 = and i32 %9, %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %13
}
void USBFS_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @USBFS_SaveConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: uname [-amnprsv]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"usage: uname [-amnprsv]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"usage: uname [-amnprsv]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
scalar_t__ isalpha(char);
int acceptChars(char ch, int *pbDiscardChar) {
  if (isalpha(ch)) {
    *pbDiscardChar = 0;
    return 0;
  }
  *pbDiscardChar = 1;
  return 1;
}


x86 assembly (clang, -O0):
<acceptChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
je     114b <acceptChars+0x3b>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    115c <acceptChars+0x4c>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acceptChars>:
push   %rbx
mov    %rsi,%rbx
call   1030 <isalpha@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,(%rbx)
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @acceptChars(i8 signext %0, i32* nocapture writeonly %1) {
%3 = tail call i64 @isalpha(i8 signext %0)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
store i32 %5, i32* %1
ret i32 %5
}
unsigned long hash_func_str(const int table_size, void *data) {
  unsigned int h;
  unsigned char *p;
  h = 0;
  for (p = (unsigned char *)data; *p != '\0'; p++)
    h = 31 * h + *p;
  return h % table_size;
}


x86 assembly (clang, -O0):
<hash_func_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     114b <hash_func_str+0x4b>
imul   $0x1f,-0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111a <hash_func_str+0x1a>
mov    -0x14(%rbp),%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_func_str>:
mov    (%rsi),%cl
test   %cl,%cl
je     1129 <hash_func_str+0x29>
add    $0x1,%rsi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movzbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_func_str+0x10>
jmp    112b <hash_func_str+0x2b>
xor    %eax,%eax
xor    %edx,%edx
div    %edi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_func_str(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %1, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = zext i8 %6 to i32
%10 = mul i32 %8, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %0
%18 = zext i32 %17 to i64
ret i64 %18
}
unsigned long ub_dirty_pages(struct user_beancounter *ub) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.user_beancounter = type opaque
define i64 @ub_dirty_pages(%struct.user_beancounter* nocapture readnone %0) {
ret i64 0
}
int _citrus_NONE_stdenc_init_state(struct _citrus_stdenc *__restrict ce,
                                   void *__restrict ps) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct._citrus_stdenc = type opaque
define i32 @_citrus_NONE_stdenc_init_state(%struct._citrus_stdenc* noalias %0, i8* noalias %1) {
%3 = alloca %struct._citrus_stdenc*
%4 = alloca i8*
store %struct._citrus_stdenc* %0, %struct._citrus_stdenc** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct._citrus_stdenc = type opaque
define i32 @_citrus_NONE_stdenc_init_state(%struct._citrus_stdenc* noalias nocapture readnone %0, i8* noalias nocapture readnone %1) {
ret i32 0
}
void EVP_PKEY_get_attr_by_NID(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_get_attr_by_NID() {
ret void
}
void *test_builtin_address(unsigned i) {
  void *const ba[] = {__builtin_frame_address(4), __builtin_return_address(4)};
  return ba[i];
}


x86 assembly (clang, -O0):
<test_builtin_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x20(%rbp,%rax,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_address>:
push   %rbp
mov    %rsp,%rbp
mov    0x0(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    %edi,%eax
mov    -0x10(%rbp,%rax,8),%rax
pop    %rbp
ret

LLVM IR (-O0):
define i8* @test_builtin_address(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i8*]
store i32 %0, i32* %2
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%5 = call i8* @llvm.frameaddress.p0i8(i32 4)
store i8* %5, i8** %4
%6 = getelementptr inbounds i8*, i8** %4, i64 1
%7 = call i8* @llvm.returnaddress(i32 4)
store i8* %7, i8** %6
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %9
%11 = load i8*, i8** %10
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_builtin_address(i32 %0) {
%2 = alloca [2 x i8*]
%3 = bitcast [2 x i8*]* %2 to i8*
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%5 = tail call i8* @llvm.frameaddress.p0i8(i32 4)
store i8* %5, i8** %4
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 1
%7 = tail call i8* @llvm.returnaddress(i32 4)
store i8* %7, i8** %6
%8 = zext i32 %0 to i64
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 %8
%10 = load i8*, i8** %9
ret i8* %10
}
void do___html_manual(void) {}


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

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

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

LLVM IR (-O2):
define void @do___html_manual() {
ret void
}
int sumToN(int n) {
  int sum = 0;
  for (; n > 0; n--) {
    sum += n;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumToN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112f <sumToN+0x2f>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <sumToN+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumToN>:
test   %edi,%edi
jle    1119 <sumToN+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sumToN(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define i32 @iwl_dbgfs_register(%struct.iwl_priv* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
void int_reverse(int *array, size_t n) {
  int *end = array + n;
  int t;
  while (--end > array) {
    t = *end;
    *end = *array;
    *array++ = t;
  }
}


x86 assembly (clang, -O0):
<int_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x18(%rbp)
cmp    -0x8(%rbp),%rax
jbe    1163 <int_reverse+0x63>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
jmp    111f <int_reverse+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_reverse>:
lea    (%rdi,%rsi,4),%rax
add    $0xfffffffffffffffc,%rax
cmp    %rdi,%rax
jbe    113a <int_reverse+0x3a>
add    $0x4,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rax),%ecx
mov    -0x4(%rdi),%edx
mov    %edx,(%rax)
mov    %ecx,-0x4(%rdi)
add    $0xfffffffffffffffc,%rax
lea    0x4(%rdi),%rcx
cmp    %rdi,%rax
mov    %rcx,%rdi
ja     1120 <int_reverse+0x20>
ret

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

LLVM IR (-O2):
define void @int_reverse(i32* %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
%4 = getelementptr inbounds i32, i32* %3, i64 -1
%5 = icmp ugt i32* %4, %0
br i1 %5, label %6, label %14
6: ; preds = %2, %6
%7 = phi i32* [ %12, %6 ], [ %4, %2 ]
%8 = phi i32* [ %11, %6 ], [ %0, %2 ]
%9 = load i32, i32* %7
%10 = load i32, i32* %8
store i32 %10, i32* %7
%11 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %9, i32* %8
%12 = getelementptr inbounds i32, i32* %7, i64 -1
%13 = icmp ugt i32* %12, %11
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
double min(double a, double b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ueth_getcputime(void) {
  uint64_t result;
  asm volatile("rdtsc" : "=A"(result));
  return result;
}


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

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

LLVM IR (-O0):
define i8* @ueth_getcputime() {
%1 = alloca i8*
%2 = call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @ueth_getcputime() {
%1 = tail call i8* asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i8* %1
}
/* Variables and functions */
int OffsetOfSubstring(char *, char *);
void CallIfSubstringFound(char *line, char *token,
                          void (*function)(char *, int)) {
  int index = OffsetOfSubstring(line, token);
  if (index != -1)
    function(line, index);
}


x86 assembly (clang, -O0):
<CallIfSubstringFound>:
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
call   1030 <OffsetOfSubstring@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
je     114b <CallIfSubstringFound+0x3b>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CallIfSubstringFound>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <OffsetOfSubstring@plt>
cmp    $0xffffffff,%eax
je     1135 <CallIfSubstringFound+0x25>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    *%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @CallIfSubstringFound(i8* %0, i8* %1, void (i8*, i32)* nocapture %2) {
%4 = tail call i32 @OffsetOfSubstring(i8* %0, i8* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %7, label %6
6: ; preds = %3
tail call void %2(i8* %0, i32 %4)
br label %7
7: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void deallocate(int *ptr, size_t n) {
#pragma omp target exit data map(delete : ptr[:n])
  free(ptr);
}


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

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

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

LLVM IR (-O2):
define void @deallocate(i32* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i32* %0)
ret void
}
void EC_KEY_new_by_curve_name(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_KEY_new_by_curve_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_wait(int);
void Set640x480_60(void) {
  *((volatile unsigned int *)((0x97000000 + 0x008))) =
      ((96 - 1) << 24) | ((48 - 1) << 16) | (640 - 1);
  *((volatile unsigned int *)((0x97000000 + 0x00c))) =
      ((2 - 1) << 24) | ((31 - 1) << 16) | (480 - 1);
  *((volatile unsigned int *)((0x97000000 + 0x010))) =
      ((800 - 1) << 16) | (525 - 1);
  orgfx_wait(2);
  *((volatile unsigned int *)((0xB8000000 + 0x14))) = 640;
  *((volatile unsigned int *)((0xB8000000 + 0x18))) = 480;
}


x86 assembly (clang, -O0):
<Set640x480_60>:
push   %rbp
mov    %rsp,%rbp
mov    $0x97000008,%eax
movl   $0x5f2f027f,(%rax)
mov    $0x9700000c,%eax
movl   $0x11e01df,(%rax)
mov    $0x97000010,%eax
movl   $0x31f020c,(%rax)
mov    $0x2,%edi
call   1030 <orgfx_wait@plt>
mov    $0xb8000014,%eax
movl   $0x280,(%rax)
mov    $0xb8000018,%eax
movl   $0x1e0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Set640x480_60>:
push   %rbx
mov    $0x97000008,%ebx
movl   $0x5f2f027f,(%rbx)
movl   $0x11e01df,0x4(%rbx)
movl   $0x31f020c,0x8(%rbx)
mov    $0x2,%edi
call   1030 <orgfx_wait@plt>
movl   $0x280,0x2100000c(%rbx)
movl   $0x1e0,0x21000010(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @Set640x480_60() {
store volatile i32 1596916351, i32* inttoptr (i64 2533359624 to i32*)
store volatile i32 18743775, i32* inttoptr (i64 2533359628 to i32*)
store volatile i32 52363788, i32* inttoptr (i64 2533359632 to i32*)
%1 = call i32 @orgfx_wait(i32 2)
store volatile i32 640, i32* inttoptr (i64 3087007764 to i32*)
store volatile i32 480, i32* inttoptr (i64 3087007768 to i32*)
ret void
}

LLVM IR (-O2):
define void @Set640x480_60() {
store volatile i32 1596916351, i32* inttoptr (i64 2533359624 to i32*)
store volatile i32 18743775, i32* inttoptr (i64 2533359628 to i32*)
store volatile i32 52363788, i32* inttoptr (i64 2533359632 to i32*)
%1 = tail call i32 @orgfx_wait(i32 2)
store volatile i32 640, i32* inttoptr (i64 3087007764 to i32*)
store volatile i32 480, i32* inttoptr (i64 3087007768 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pan();
int /*<<< orphan*/ ranek();
int main(void) {
  pan();
  pan();
  ranek();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pan()
%2 = tail call i32 (...) @pan()
%3 = tail call i32 (...) @ranek()
ret i32 0
}
/* Variables and functions */
int strcmp(char const *const, char const *const);
int WQSG_strcmp(char const *const str1, char const *const str2) {
  return strcmp(str1, str2);
}


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

x86 assembly (clang, -O2):
<WQSG_strcmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @WQSG_strcmp(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @WQSG_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xconfigure_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xconfigure.window;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xconfigure_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
yyerror() {
  fprintf(stderr, "\nError\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"\0AError\0A\00"
define i32 @yyerror() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"\0AError\0A\00"
define i32 @yyerror() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
void g_unichar_ispunct() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_ispunct() {
ret void
}
int fesetround(int __round) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @fesetround(i32 %0) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ wiringPiSPISetup(int, int);
int gertboardSPISetup(void) {
  if (wiringPiSPISetup(0, 1000000) < 0)
    return -1;
  if (wiringPiSPISetup(1, 1000000) < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<gertboardSPISetup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0xf4240,%esi
call   1030 <wiringPiSPISetup@plt>
cmp    $0x0,%rax
jge    113a <gertboardSPISetup+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <gertboardSPISetup+0x56>
mov    $0x1,%edi
mov    $0xf4240,%esi
call   1030 <wiringPiSPISetup@plt>
cmp    $0x0,%rax
jge    115f <gertboardSPISetup+0x4f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <gertboardSPISetup+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gertboardSPISetup>:
push   %rax
xor    %edi,%edi
mov    $0xf4240,%esi
call   1030 <wiringPiSPISetup@plt>
test   %rax,%rax
js     1137 <gertboardSPISetup+0x27>
mov    $0x1,%edi
mov    $0xf4240,%esi
call   1030 <wiringPiSPISetup@plt>
sar    $0x3f,%rax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gertboardSPISetup() {
%1 = alloca i32
%2 = call i64 @wiringPiSPISetup(i32 0, i32 1000000)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %10
5: ; preds = %0
%6 = call i64 @wiringPiSPISetup(i32 1, i32 1000000)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 -1, i32* %1
br label %10
9: ; preds = %5
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8, %4
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @gertboardSPISetup() {
%1 = tail call i64 @wiringPiSPISetup(i32 0, i32 1000000)
%2 = icmp slt i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @wiringPiSPISetup(i32 1, i32 1000000)
%5 = ashr i64 %4, 63
%6 = trunc i64 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ -1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
void __attribute__((fastcall)) __attribute__((nonnull(1)))
_zmemzero(void *b, size_t n) {
  register char *c = (char *)b;
  while (n != 0) {
    *c++ = 0;
    n--;
  }
}


x86 assembly (clang, -O0):
<_zmemzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <_zmemzero+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <_zmemzero+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zmemzero>:
test   %rsi,%rsi
je     1124 <_zmemzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @_zmemzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_modman_get_next_id_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_modman@%p::get_next_id (rtpp_modman_get_next_id) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_modman_get_next_id_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_modman_get_next_id_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_modman@%p::get_next_id (rtpp_modman_get_next_id) is invoked after destruction\0A\00"
define void @rtpp_modman_get_next_id_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_modman@%p::get_next_id (rtpp_modman_get_next_id) is invoked after destruction\0A\00"
define void @rtpp_modman_get_next_id_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
int foo(int i) {
  if (i) {
    if (i)
      return 0;
    else
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1133 <foo+0x33>
cmpl   $0x0,-0x8(%rbp)
je     1127 <foo+0x27>
movl   $0x0,-0x4(%rbp)
jmp    113a <foo+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    113a <foo+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef void socklen_t;

/* Variables and functions */
int /*<<< orphan*/ mcfi_sandbox_mask(void *);
int socketcall(int (*)(int, int, int, void *, void *), int, int, int,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int getsockopt(int fd, int level, int optname, void *restrict optval,
               socklen_t *restrict optlen) {
  return socketcall(getsockopt, fd, level, optname, mcfi_sandbox_mask(optval),
                    mcfi_sandbox_mask(optlen), 0);
}


x86 assembly (clang, -O0):
<getsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    %eax,%r9d
mov    0x2e79(%rip),%rdi
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsockopt>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%rbx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r12d
mov    %rcx,%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <mcfi_sandbox_mask@plt>
movl   $0x0,(%rsp)
mov    0x2e98(%rip),%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
call   1030 <socketcall@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* noalias %3, i8* noalias %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = call i32 @mcfi_sandbox_mask(i8* %14)
%16 = load i8*, i8** %10
%17 = call i32 @mcfi_sandbox_mask(i8* %16)
%18 = call i32 @socketcall(i32 (i32, i32, i32, i8*, i8*)* @getsockopt, i32 %11, i32 %12, i32 %13, i32 %15, i32 %17, i32 0)
ret i32 %18
}

LLVM IR (-O2):
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* noalias %3, i8* noalias %4) {
%6 = tail call i32 @mcfi_sandbox_mask(i8* %3)
%7 = tail call i32 @mcfi_sandbox_mask(i8* %4)
%8 = tail call i32 @socketcall(i32 (i32, i32, i32, i8*, i8*)* @getsockopt, i32 %0, i32 %1, i32 %2, i32 %6, i32 %7, i32 0)
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};
struct timezone {
  long tz_minuteswest;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(int /*<<< orphan*/, struct timezone *);
struct tm *gmtime_r(scalar_t__ *, struct tm *);
long timezone;
struct tm *localtime_r(const time_t *t, struct tm *r) {
  time_t tmp;
  struct timezone tz;
  gettimeofday(0, &tz);
  timezone = tz.tz_minuteswest * 60L;
  tmp = *t + timezone;
  return gmtime_r(&tmp, r);
}


x86 assembly (clang, -O0):
<localtime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
lea    -0x20(%rbp),%rsi
call   1040 <gettimeofday@plt>
imul   $0x3c,-0x20(%rbp),%rcx
mov    0x2e99(%rip),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2e88(%rip),%rcx
add    (%rcx),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <gmtime_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<localtime_r>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
xor    %edi,%edi
call   1040 <gettimeofday@plt>
imul   $0x3c,0x8(%rsp),%rax
mov    0x2e9a(%rip),%rcx
mov    %rax,(%rcx)
add    (%rbx),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    %r14,%rsi
call   1030 <gmtime_r@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
%struct.timezone = type { i64 }
@timezone = global i64 0
define %struct.tm* @localtime_r(i64* %0, %struct.tm* %1) {
%3 = alloca i64*
%4 = alloca %struct.tm*
%5 = alloca i64
%6 = alloca %struct.timezone
store i64* %0, i64** %3
store %struct.tm* %1, %struct.tm** %4
%7 = call i32 @gettimeofday(i32 0, %struct.timezone* %6)
%8 = getelementptr inbounds %struct.timezone, %struct.timezone* %6, i32 0, i32 0
%9 = load i64, i64* %8
%10 = mul nsw i64 %9, 60
store i64 %10, i64* @timezone
%11 = load i64*, i64** %3
%12 = load i64, i64* %11
%13 = load i64, i64* @timezone
%14 = add nsw i64 %12, %13
store i64 %14, i64* %5
%15 = load %struct.tm*, %struct.tm** %4
%16 = call %struct.tm* @gmtime_r(i64* %5, %struct.tm* %15)
ret %struct.tm* %16
}

LLVM IR (-O2):
%struct.tm = type { i32 }
%struct.timezone = type { i64 }
@timezone = global i64 0
define %struct.tm* @localtime_r(i64* nocapture %0, %struct.tm* %1) {
%3 = alloca i64
%4 = alloca %struct.timezone
%5 = bitcast i64* %3 to i8*
%6 = bitcast %struct.timezone* %4 to i8*
%7 = call i32 @gettimeofday(i32 0, %struct.timezone* %4)
%8 = getelementptr inbounds %struct.timezone, %struct.timezone* %4, i64 0, i32 0
%9 = load i64, i64* %8
%10 = mul nsw i64 %9, 60
store i64 %10, i64* @timezone
%11 = load i64, i64* %0
%12 = add nsw i64 %11, %10
store i64 %12, i64* %3
%13 = call %struct.tm* @gmtime_r(i64* %3, %struct.tm* %1)
ret %struct.tm* %13
}