xunge/DecIR huggingface dataset:
unsigned char getTransliteratedCharacter(unsigned char character) { return 0; }


x86 assembly (clang, -O0):
<getTransliteratedCharacter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @getTransliteratedCharacter(i8 zeroext %0) {
ret i8 0
}
void foo_1_1_1_2_1_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_2_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
void *xcalloc(size_t nmemb, size_t size) {
  void *p;
  p = calloc(nmemb, size);
  if (!p)
    abort();
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xcalloc+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     112d <xcalloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i8* %3
}
void XtGetGC() {}


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

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

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

LLVM IR (-O2):
define void @XtGetGC() {
ret void
}
DISCRETE_STEP(dst_gain) {
  set_output(0, DISCRETE_INPUT(0) * DISCRETE_INPUT(1) + DISCRETE_INPUT(2));
}


x86 assembly (clang, -O0):
<DISCRETE_STEP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <DISCRETE_INPUT@plt>
mov    %eax,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <DISCRETE_INPUT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <DISCRETE_INPUT@plt>
mov    -0xc(%rbp),%esi
add    %eax,%esi
xor    %edi,%edi
mov    $0x0,%al
call   1040 <set_output@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DISCRETE_STEP>:
push   %rbx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <DISCRETE_INPUT@plt>
mov    %eax,%ebx
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <DISCRETE_INPUT@plt>
imul   %eax,%ebx
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <DISCRETE_INPUT@plt>
add    %eax,%ebx
xor    %edi,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <set_output@plt>

LLVM IR (-O0):
define i32 @DISCRETE_STEP(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 0)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 1)
%6 = mul nsw i32 %4, %5
%7 = call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 2)
%8 = add nsw i32 %6, %7
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @set_output to i32 (i32, i32, ...)*)(i32 0, i32 %8)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @DISCRETE_STEP(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 1)
%4 = mul nsw i32 %3, %2
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @DISCRETE_INPUT to i32 (i32, ...)*)(i32 2)
%6 = add nsw i32 %4, %5
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @set_output to i32 (i32, i32, ...)*)(i32 0, i32 %6)
ret i32 undef
}
/* Variables and functions */
int f100(int *);
int f101(int *p) { return f100(p); }


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

x86 assembly (clang, -O2):
<f101>:
jmp    1030 <f100@plt>

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

LLVM IR (-O2):
define i32 @f101(i32* %0) {
%2 = tail call i32 @f100(i32* %0)
ret i32 %2
}
void f3(void) {
#pragma unused(x)
}


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

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

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

LLVM IR (-O2):
define void @f3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ niceprint(char *);
void sinkhole(void) {
  niceprint(
      "One random party member steps on and collapses a sinkhole, and must "
      "succeed on a DC 12 Dexterity saving throw to avoid fallign into a "
      "20'-deep pit and taking 2d6 bludgeoning damage. Climbing out of the "
      "pit requires a successful DC 15 Strength (Athletics) check.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [264 x i8] c"One random party member steps on and collapses a sinkhole, and must succeed on a DC 12 Dexterity saving throw to avoid fallign into a 20'-deep pit and taking 2d6 bludgeoning damage. Climbing out of the pit requires a successful DC 15 Strength (Athletics) check.\0A\0A\00"
define void @sinkhole() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [264 x i8] c"One random party member steps on and collapses a sinkhole, and must succeed on a DC 12 Dexterity saving throw to avoid fallign into a 20'-deep pit and taking 2d6 bludgeoning damage. Climbing out of the pit requires a successful DC 15 Strength (Athletics) check.\0A\0A\00"
define void @sinkhole() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0))
ret void
}
int _libkb_kbsignal_lock(void) {
  int x = 0;
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @_libkb_kbsignal_lock() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_redirect_log() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_redirect_log() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_redirect_log() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int leap_year_p(long y) {
  return ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0);
}


x86 assembly (clang, -O0):
<leap_year_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    113d <leap_year_p+0x3d>
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    $0x1,%al
cmp    $0x0,%rdx
mov    %al,-0x9(%rbp)
jne    1155 <leap_year_p+0x55>
mov    -0x8(%rbp),%rax
mov    $0x190,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leap_year_p>:
movabs $0xa3d70a3d70a3d70b,%rcx
0a d7 a3
mov    %rdi,%rax
imul   %rcx
test   $0x3,%dil
jne    1139 <leap_year_p+0x39>
add    %rdi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x6,%rdx
add    %rax,%rdx
imul   $0x64,%rdx,%rcx
mov    %rdi,%rdx
mov    $0x1,%eax
sub    %rcx,%rdx
je     1139 <leap_year_p+0x39>
ret
movabs $0x8f5c28f5c28f5c29,%rax
28 5c 8f
imul   %rax,%rdi
movabs $0x51eb851eb851eb0,%rcx
b8 1e 05
add    %rdi,%rcx
ror    $0x4,%rcx
movabs $0xa3d70a3d70a3d7,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
setb   %al
ret

LLVM IR (-O0):
define i32 @leap_year_p(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 4
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %2
%8 = srem i64 %7, 100
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i64, i64* %2
%12 = srem i64 %11, 400
%13 = icmp eq i64 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @leap_year_p(i64 %0) {
%2 = and i64 %0, 3
%3 = icmp ne i64 %2, 0
%4 = srem i64 %0, 100
%5 = icmp eq i64 %4, 0
%6 = or i1 %3, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = srem i64 %0, 400
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ 1, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ vt100_EscSeq(int, unsigned char *, long long);
void vt100_CPL(int n) { vt100_EscSeq(n, (unsigned char *)"F", (long long)2); }


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

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <vt100_EscSeq@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"F\00"
define void @vt100_CPL(i32 %0) {
%2 = tail call i32 @vt100_EscSeq(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pm_reboot();
int _reboot_handler(int argc, char **argv) {
  (void)argc;
  (void)argv;
  pm_reboot();
  return 0;
}


x86 assembly (clang, -O0):
<_reboot_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <pm_reboot@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_reboot_handler(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 = call i32 (...) @pm_reboot()
ret i32 0
}

LLVM IR (-O2):
define i32 @_reboot_handler(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pm_reboot()
ret i32 0
}
int ol_backend_gamma_absolute_init(struct ol_backend_gamma_s *self) {
  (void)(self);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ol_backend_gamma_s = type opaque
define i32 @ol_backend_gamma_absolute_init(%struct.ol_backend_gamma_s* %0) {
%2 = alloca %struct.ol_backend_gamma_s*
store %struct.ol_backend_gamma_s* %0, %struct.ol_backend_gamma_s** %2
%3 = load %struct.ol_backend_gamma_s*, %struct.ol_backend_gamma_s** %2
ret i32 0
}

LLVM IR (-O2):
%struct.ol_backend_gamma_s = type opaque
define i32 @ol_backend_gamma_absolute_init(%struct.ol_backend_gamma_s* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void peasoup(int *green) {
  while ((*green)--)
    puts("Blech!");
  *green = 13 * 51 + 3;
}


x86 assembly (clang, -O0):
<peasoup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,(%rcx)
cmp    $0x0,%eax
je     1143 <peasoup+0x33>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
jmp    111c <peasoup+0xc>
mov    -0x8(%rbp),%rax
movl   $0x29a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peasoup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
subl   $0x1,(%rdi)
jb     113d <peasoup+0x2d>
lea    0xedd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
subl   $0x1,(%rbx)
jae    1130 <peasoup+0x20>
movl   $0x29a,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"Blech!\00"
define void @peasoup(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, -1
store i32 %3, i32* %0
%4 = icmp eq i32 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %0
%8 = add nsw i32 %7, -1
store i32 %8, i32* %0
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
store i32 666, i32* %0
ret void
}
int microfs_decompressor_data_exit_noop(
    struct microfs_sb_info *sbi, struct microfs_decompressor_data *data) {
  (void)sbi;
  (void)data;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.microfs_sb_info = type opaque
%struct.microfs_decompressor_data = type opaque
define i32 @microfs_decompressor_data_exit_noop(%struct.microfs_sb_info* %0, %struct.microfs_decompressor_data* %1) {
%3 = alloca %struct.microfs_sb_info*
%4 = alloca %struct.microfs_decompressor_data*
store %struct.microfs_sb_info* %0, %struct.microfs_sb_info** %3
store %struct.microfs_decompressor_data* %1, %struct.microfs_decompressor_data** %4
%5 = load %struct.microfs_sb_info*, %struct.microfs_sb_info** %3
%6 = load %struct.microfs_decompressor_data*, %struct.microfs_decompressor_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.microfs_sb_info = type opaque
%struct.microfs_decompressor_data = type opaque
define i32 @microfs_decompressor_data_exit_noop(%struct.microfs_sb_info* nocapture readnone %0, %struct.microfs_decompressor_data* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int L_tmpnam;
char *strdup(char *);
int /*<<< orphan*/ tmpnam(char *);
char *cfilesystem_tempfilename() {
  char buffer[L_tmpnam];
  tmpnam(buffer);
  return strdup(buffer);
}


x86 assembly (clang, -O0):
<cfilesystem_tempfilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x18(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x10(%rbp)
call   1030 <tmpnam@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strdup@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfilesystem_tempfilename>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1030 <tmpnam@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@L_tmpnam = global i32 0
define i8* @cfilesystem_tempfilename() {
%1 = alloca i8*
%2 = alloca i64
%3 = load i32, i32* @L_tmpnam
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i8, i64 %4
store i64 %4, i64* %2
%7 = call i32 @tmpnam(i8* %6)
%8 = call i8* @strdup(i8* %6)
%9 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@L_tmpnam = global i32 0
define noalias i8* @cfilesystem_tempfilename() {
%1 = load i32, i32* @L_tmpnam
%2 = zext i32 %1 to i64
%3 = alloca i8, i64 %2
%4 = call i32 @tmpnam(i8* %3)
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void sig_handler(int sigN) {
  fprintf(stderr, "Caught SIGNAL %d\n", sigN);
  exit(3);
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_handler>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Caught SIGNAL %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Caught SIGNAL %d\0A\00"
define void @sig_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 3)
unreachable
}
float cosf(float x) {
  float sin;
  __asm__ __volatile__("flds %2;"
                       "fsincos;"
                       "fstps %1;"
                       "fstps %0"
                       : "=m"(sin), "=m"(x)
                       : "m"(x));
  return x;
}


x86 assembly (clang, -O0):
<cosf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
flds   -0x4(%rbp)
fsincos
fstps  -0x4(%rbp)
fstps  -0x8(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosf>:
movss  %xmm0,-0x8(%rsp)
flds   -0x8(%rsp)
fsincos
fstps  -0x8(%rsp)
fstps  -0x4(%rsp)
movss  -0x8(%rsp),%xmm0
ret

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

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = bitcast float* %3 to i8*
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ print_client_stats(int, int);
int /*<<< orphan*/ print_server_stats(int, int);
void print_all_stats(int opt_srv, int opt_clt, int opt_prt) {
  print_server_stats(opt_srv, opt_prt);
  print_client_stats(opt_clt, opt_prt);
}


x86 assembly (clang, -O0):
<print_all_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <print_server_stats@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <print_client_stats@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_all_stats>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edx,%esi
call   1030 <print_server_stats@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print_client_stats@plt>

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

LLVM IR (-O2):
define void @print_all_stats(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @print_server_stats(i32 %0, i32 %2)
%5 = tail call i32 @print_client_stats(i32 %1, i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ target;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselectionrequest_target(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselectionrequest.target;
}


x86 assembly (clang, -O0):
<get_XEvent_xselectionrequest_target>:
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_xselectionrequest_target>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselectionrequest_target(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_xselectionrequest_target(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
struct mcon_str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mcon_str_addl(struct mcon_str *, char *, int,
                                 int /*<<< orphan*/);
void mcon_serialize_int32(struct mcon_str *str, int num) {
  int i = (num);
  mcon_str_addl(str, (char *)&i, 4, 0);
}


x86 assembly (clang, -O0):
<mcon_serialize_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <mcon_str_addl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcon_serialize_int32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <mcon_str_addl@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.mcon_str = type { i32 }
define void @mcon_serialize_int32(%struct.mcon_str* %0, i32 %1) {
%3 = alloca %struct.mcon_str*
%4 = alloca i32
%5 = alloca i32
store %struct.mcon_str* %0, %struct.mcon_str** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load %struct.mcon_str*, %struct.mcon_str** %3
%8 = bitcast i32* %5 to i8*
%9 = call i32 @mcon_str_addl(%struct.mcon_str* %7, i8* %8, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
%struct.mcon_str = type { i32 }
define void @mcon_serialize_int32(%struct.mcon_str* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %1, i32* %3
%5 = call i32 @mcon_str_addl(%struct.mcon_str* %0, i8* %4, i32 4, i32 0)
ret void
}
/* Variables and functions */
void(Memento_listBlockInfo)(void) {}


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

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

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

LLVM IR (-O2):
define void @Memento_listBlockInfo() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
FILE *t_fclose(FILE *stream) {
  if (stream == NULL) {
    printf(" An attemp was made to close an already closed file ");
  } else {
    fclose(stream);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<t_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <t_fclose+0x28>
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
jmp    1151 <t_fclose+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_fclose>:
push   %rax
test   %rdi,%rdi
je     112d <t_fclose+0xd>
call   1030 <fclose@plt>
jmp    1139 <t_fclose+0x19>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c" An attemp was made to close an already closed file \00"
define i32* @t_fclose(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = call i32 @fclose(i32* %8)
br label %10
10: ; preds = %7, %5
ret i32* null
}

LLVM IR (-O2):
@.str = [53 x i8] c" An attemp was made to close an already closed file \00"
define noalias i32* @t_fclose(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @fclose(i32* %0)
br label %7
7: ; preds = %5, %3
ret i32* null
}
/* Variables and functions */
scalar_t__ getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main(void) {
  char cur_line[200];
  while (getline(cur_line, 200 - 1) != 0) {
    reverse(cur_line);
    printf("%s\n", cur_line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
mov    $0xc7,%esi
call   1050 <getline@plt>
cmp    $0x0,%rax
je     1181 <main+0x51>
lea    -0xd0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0xd0(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rsp,%rdi
mov    $0xc7,%esi
call   1050 <getline@plt>
test   %rax,%rax
je     1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xc7,%esi
call   1050 <getline@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i64 @getline(i8* %4, i32 199)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i64 @getline(i8* %2, i32 199)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @getline(i8* %2, i32 199)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
ret i32 0
}
void gtk_check_button_new_with_mnemonic() {}


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

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

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

LLVM IR (-O2):
define void @gtk_check_button_new_with_mnemonic() {
ret void
}
/* Variables and functions */
bool notg(bool s) { return !s; }


x86 assembly (clang, -O0):
<notg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<notg>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @notg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @notg(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int execute_getgroups32() { return 0; }


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

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

LLVM IR (-O0):
define i32 @execute_getgroups32() {
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_getgroups32() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_bounds();
int validation();
int initialization() {
  get_bounds();
  int result = validation();
  return result;
}


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

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

LLVM IR (-O0):
define i32 @initialization() {
%1 = alloca i32
%2 = call i32 (...) @get_bounds()
%3 = call i32 (...) @validation()
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @initialization() {
%1 = tail call i32 (...) @get_bounds()
%2 = tail call i32 (...) @validation()
ret i32 %2
}
/* Type definitions */
struct bitmask {
  int dummy;
};

/* Variables and functions */
struct bitmask *numa_allocate_cpumask();
int /*<<< orphan*/ numa_bitmask_setbit(struct bitmask *, unsigned int);
int /*<<< orphan*/ numa_free_cpumask(struct bitmask *);
int /*<<< orphan*/ numa_sched_setaffinity(int /*<<< orphan*/, struct bitmask *);
void backend_set_numa(unsigned id) {
  struct bitmask *bm = numa_allocate_cpumask();
  numa_bitmask_setbit(bm, id);
  numa_sched_setaffinity(0, bm);
  numa_free_cpumask(bm);
}


x86 assembly (clang, -O0):
<backend_set_numa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <numa_allocate_cpumask@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <numa_bitmask_setbit@plt>
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
call   1030 <numa_sched_setaffinity@plt>
mov    -0x10(%rbp),%rdi
call   1050 <numa_free_cpumask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backend_set_numa>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <numa_allocate_cpumask@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1040 <numa_bitmask_setbit@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <numa_sched_setaffinity@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <numa_free_cpumask@plt>

LLVM IR (-O0):
%struct.bitmask = type { i32 }
define void @backend_set_numa(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.bitmask*
store i32 %0, i32* %2
%4 = call %struct.bitmask* (...) @numa_allocate_cpumask()
store %struct.bitmask* %4, %struct.bitmask** %3
%5 = load %struct.bitmask*, %struct.bitmask** %3
%6 = load i32, i32* %2
%7 = call i32 @numa_bitmask_setbit(%struct.bitmask* %5, i32 %6)
%8 = load %struct.bitmask*, %struct.bitmask** %3
%9 = call i32 @numa_sched_setaffinity(i32 0, %struct.bitmask* %8)
%10 = load %struct.bitmask*, %struct.bitmask** %3
%11 = call i32 @numa_free_cpumask(%struct.bitmask* %10)
ret void
}

LLVM IR (-O2):
%struct.bitmask = type { i32 }
define void @backend_set_numa(i32 %0) {
%2 = tail call %struct.bitmask* (...) @numa_allocate_cpumask()
%3 = tail call i32 @numa_bitmask_setbit(%struct.bitmask* %2, i32 %0)
%4 = tail call i32 @numa_sched_setaffinity(i32 0, %struct.bitmask* %2)
%5 = tail call i32 @numa_free_cpumask(%struct.bitmask* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_CC_SFD_OUTPUT() { set_io_bit(-6, 3); }


x86 assembly (clang, -O0):
<TOSH_MAKE_CC_SFD_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffa,%edi
mov    $0x3,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_CC_SFD_OUTPUT>:
mov    $0xfffffffa,%edi
mov    $0x3,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_CC_SFD_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -6, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_CC_SFD_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -6, i32 3)
ret void
}
void cmdqSecDeInitialize(void) { return; }


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

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

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

LLVM IR (-O2):
define void @cmdqSecDeInitialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove_from_table(int);
void invalidate_memory(int i) { remove_from_table((i << 4) >> 31); }


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

x86 assembly (clang, -O2):
<invalidate_memory>:
shl    $0x4,%edi
sar    $0x1f,%edi
jmp    1030 <remove_from_table@plt>

LLVM IR (-O0):
define void @invalidate_memory(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 4
%5 = ashr i32 %4, 31
%6 = call i32 @remove_from_table(i32 %5)
ret void
}

LLVM IR (-O2):
define void @invalidate_memory(i32 %0) {
%2 = shl i32 %0, 4
%3 = ashr i32 %2, 31
%4 = tail call i32 @remove_from_table(i32 %3)
ret void
}
/* Variables and functions */
unsigned int serial_device_type_get(unsigned int);
unsigned int machine_bus_device_type_get(unsigned int unit) {
  return serial_device_type_get(unit);
}


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

x86 assembly (clang, -O2):
<machine_bus_device_type_get>:
jmp    1030 <serial_device_type_get@plt>

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

LLVM IR (-O2):
define i32 @machine_bus_device_type_get(i32 %0) {
%2 = tail call i32 @serial_device_type_get(i32 %0)
ret i32 %2
}
int yg1(int x __attribute((blah))) {}


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

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

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

LLVM IR (-O2):
define i32 @yg1(i32 %0) {
ret i32 undef
}
unsigned int idrnet_peek(void *ptr, unsigned int offset) {
  unsigned char *buf_c = (unsigned char *)ptr;
  return (unsigned int)buf_c[offset];
}


x86 assembly (clang, -O0):
<idrnet_peek>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idrnet_peek>:
mov    %esi,%eax
movzbl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @idrnet_peek(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @idrnet_peek(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ control(int);
int getch();
void run() {
  int c;
  while ((c = getch())) {
    control(c);
  }
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1148 <run+0x28>
mov    -0x4(%rbp),%edi
call   1030 <control@plt>
jmp    1128 <run+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getch@plt>
test   %eax,%eax
je     1144 <run+0x24>
mov    %eax,%edi
call   1030 <control@plt>
jmp    1130 <run+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @run() {
%1 = tail call i32 (...) @getch()
%2 = icmp eq i32 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @control(i32 %4)
%6 = tail call i32 (...) @getch()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int pledge(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ proxyLog(char *);
void setupInitialPledge() {
  if (pledge("stdio inet dns", NULL) == -1) {
    proxyLog("initial pledge failed");
    abort();
  }
}


x86 assembly (clang, -O0):
<setupInitialPledge>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pledge@plt>
cmp    $0xffffffff,%eax
jne    1160 <setupInitialPledge+0x30>
lea    0xebb(%rip),%rdi
call   1040 <proxyLog@plt>
mov    $0x0,%al
call   1030 <abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupInitialPledge>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %esi,%esi
call   1050 <pledge@plt>
cmp    $0xffffffff,%eax
je     1146 <setupInitialPledge+0x16>
pop    %rax
ret
lea    0xec2(%rip),%rdi
call   1040 <proxyLog@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"stdio inet dns\00"
@.str.1 = [22 x i8] c"initial pledge failed\00"
define void @setupInitialPledge() {
%1 = call i32 @pledge(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @proxyLog(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"stdio inet dns\00"
@.str.1 = [22 x i8] c"initial pledge failed\00"
define void @setupInitialPledge() {
%1 = tail call i32 @pledge(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @proxyLog(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int SQLITE_OK;
int /*<<< orphan*/ printfHelper(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int scmFullPathname(sqlite3_vfs *pVfs, const char *zPath, int nPathOut,
                    char *zPathOut) {
  strcpy(zPathOut, zPath);
  printfHelper("scmFullPathname %s\n", zPathOut);
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<scmFullPathname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <printfHelper@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmFullPathname>:
push   %rbx
mov    %rcx,%rbx
mov    %rcx,%rdi
call   1030 <strcpy@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printfHelper@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"scmFullPathname %s\0A\00"
@SQLITE_OK = global i32 0
define i32 @scmFullPathname(i32* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = load i8*, i8** %6
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %8
%13 = call i32 @printfHelper(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @SQLITE_OK
ret i32 %14
}

LLVM IR (-O2):
@.str = [20 x i8] c"scmFullPathname %s\0A\00"
@SQLITE_OK = global i32 0
define i32 @scmFullPathname(i32* nocapture readnone %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @strcpy(i8* %3, i8* %1)
%6 = tail call i32 @printfHelper(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = load i32, i32* @SQLITE_OK
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_compiler_options(void) {
  printf("------------ Compiler Options ----------\n");
  printf("----------------------------------------\n");
}


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

x86 assembly (clang, -O2):
<print_compiler_options>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [41 x i8] c"------------ Compiler Options ----------\00"
@str.2 = [41 x i8] c"----------------------------------------\00"
define void @print_compiler_options() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.2, i64 0, i64 0))
ret void
}
unsigned short nm_readw(unsigned short *ptr) { return *ptr; }


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

x86 assembly (clang, -O2):
<nm_readw>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @nm_readw(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @nm_readw(i16* nocapture %0) {
%2 = load i16, i16* %0
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("\n\tUsage: mklocale [options] <file>\n\n");
  printf("\tOptions:\n\n");
  printf("\t\t-h,--help\toutput usage information\n");
  printf("\t\t-v,--version\toutput the version number\n");
  printf("\t\t-n,--name [locale]\tuses a locale for that name\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf35(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0A\09Usage: mklocale [options] <file>\0A\0A\00"
@.str.1 = [12 x i8] c"\09Options:\0A\0A\00"
@.str.2 = [38 x i8] c"\09\09-h,--help\09output usage information\0A\00"
@.str.3 = [42 x i8] c"\09\09-v,--version\09output the version number\0A\00"
@.str.4 = [50 x i8] c"\09\09-n,--name [locale]\09uses a locale for that name\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"\0A\09Usage: mklocale [options] <file>\0A\00"
@str.5 = [11 x i8] c"\09Options:\0A\00"
@str.6 = [37 x i8] c"\09\09-h,--help\09output usage information\00"
@str.7 = [41 x i8] c"\09\09-v,--version\09output the version number\00"
@str.8 = [49 x i8] c"\09\09-n,--name [locale]\09uses a locale for that name\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.8, i64 0, i64 0))
ret void
}
void RTTestGuardedFree(void) {}


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

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

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

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