xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ FlightBatteryStateHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FlightBatteryStateUpdated() { UAVObjUpdated(FlightBatteryStateHandle()); }


x86 assembly (clang, -O0):
<FlightBatteryStateUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FlightBatteryStateHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlightBatteryStateUpdated>:
push   %rax
xor    %eax,%eax
call   1040 <FlightBatteryStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @FlightBatteryStateUpdated() {
%1 = call i32 (...) @FlightBatteryStateHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightBatteryStateUpdated() {
%1 = tail call i32 (...) @FlightBatteryStateHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void gtk_text_buffer_get_mark() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_get_mark() {
ret void
}
void flush(char *buf) { *buf = *buf | *buf; }


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @flush(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = or i32 %5, %8
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %2
store i8 %10, i8* %11
ret void
}

LLVM IR (-O2):
define void @flush(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ perror(char *);
scalar_t__ shutdown(int, int /*<<< orphan*/);
int cancel_connection(int *sock) {
  if (shutdown(*sock, SHUT_RDWR) < 0) {
    perror("Closing connection");
    return 8;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<cancel_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
cmp    $0x0,%rax
jge    1162 <cancel_connection+0x42>
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
movl   $0x8,-0x4(%rbp)
jmp    116e <cancel_connection+0x4e>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cancel_connection>:
push   %rax
mov    (%rdi),%edi
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
test   %rax,%rax
js     1141 <cancel_connection+0x21>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    $0x8,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
@.str = [19 x i8] c"Closing connection\00"
@EXIT_SUCCESS = global i32 0
define i32 @cancel_connection(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = load i32, i32* @SHUT_RDWR
%7 = call i64 @shutdown(i32 %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 8, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* @EXIT_SUCCESS
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
@.str = [19 x i8] c"Closing connection\00"
@EXIT_SUCCESS = global i32 0
define i32 @cancel_connection(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = load i32, i32* @SHUT_RDWR
%4 = tail call i64 @shutdown(i32 %2, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = load i32, i32* @EXIT_SUCCESS
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ 8, %6 ], [ %9, %8 ]
ret i32 %11
}
/* Variables and functions */
int kbd(int /*<<< orphan*/);
int CRT_getc(void) {
  int c;
  while ((c = kbd(0)) == 0)
    ;
  return (c);
}


x86 assembly (clang, -O0):
<CRT_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <kbd@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1130 <CRT_getc+0x20>
jmp    1118 <CRT_getc+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRT_getc>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <kbd@plt>
test   %eax,%eax
je     1120 <CRT_getc+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CRT_getc() {
%1 = alloca i32
br label %2
2: ; preds = %5, %0
%3 = call i32 @kbd(i32 0)
store i32 %3, i32* %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @CRT_getc() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @kbd(i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret i32 %2
}
/* Variables and functions */
char *shex2(char *, int);
char *shex4(char *buf, int val) {
  buf = shex2(buf, val >> 8);
  return shex2(buf, val);
}


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

x86 assembly (clang, -O2):
<shex4>:
push   %rbx
mov    %esi,%ebx
sar    $0x8,%esi
call   1030 <shex2@plt>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <shex2@plt>

LLVM IR (-O0):
define i8* @shex4(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = ashr i32 %6, 8
%8 = call i8* @shex2(i8* %5, i32 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i8* @shex2(i8* %9, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @shex4(i8* %0, i32 %1) {
%3 = ashr i32 %1, 8
%4 = tail call i8* @shex2(i8* %0, i32 %3)
%5 = tail call i8* @shex2(i8* %4, i32 %1)
ret i8* %5
}
int produtoAdicao(int k, int q) {
  if (q == 1)
    return k;
  return k += produtoAdicao(k, (q - 1));
}


x86 assembly (clang, -O0):
<produtoAdicao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1133 <produtoAdicao+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <produtoAdicao+0x3a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <produtoAdicao@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<produtoAdicao>:
lea    -0x1(%rsi),%ecx
imul   %edi,%ecx
xor    %eax,%eax
cmp    $0x1,%esi
cmovne %ecx,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @produtoAdicao(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = add i32 %1, -1
%5 = mul i32 %4, %0
%6 = select i1 %3, i32 0, i32 %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
unsigned long le2belong(unsigned long ul) {
  return ((ul & 0xFF0000) >> 8) + ((ul & 0xFF000000) >> 24) +
         ((ul & 0xFF) << 24) + ((ul & 0xFF00) << 8);
}


x86 assembly (clang, -O0):
<le2belong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff0000,%rax
shr    $0x8,%rax
movabs $0xff000000,%rcx
and    -0x8(%rbp),%rcx
shr    $0x18,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff,%rcx
shl    $0x18,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
add    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @le2belong(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 16711680
%5 = lshr i64 %4, 8
%6 = load i64, i64* %2
%7 = and i64 %6, 4278190080
%8 = lshr i64 %7, 24
%9 = add i64 %5, %8
%10 = load i64, i64* %2
%11 = and i64 %10, 255
%12 = shl i64 %11, 24
%13 = add i64 %9, %12
%14 = load i64, i64* %2
%15 = and i64 %14, 65280
%16 = shl i64 %15, 8
%17 = add i64 %13, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @le2belong(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void _intercept_fini(void) {
  if (4 <= 1)
    fprintf(stderr, "end of _intercept_fini()\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
define void @_intercept_fini() {
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @_intercept_fini() {
ret void
}
int CHECK_PREFIX_66(unsigned char v) { return v == 0x66; }


x86 assembly (clang, -O0):
<CHECK_PREFIX_66>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x66,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CHECK_PREFIX_66>:
xor    %eax,%eax
cmp    $0x66,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @CHECK_PREFIX_66(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 102
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @CHECK_PREFIX_66(i8 zeroext %0) {
%2 = icmp eq i8 %0, 102
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ g();
int rand();
int /*<<< orphan*/ unlock();
int f() {
  if (rand() % 2 == 0) {
    unlock();
    g();
  } else {
    f();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1173 <f+0x33>
mov    $0x0,%al
call   1030 <unlock@plt>
mov    $0x0,%al
call   1050 <g@plt>
jmp    1178 <f+0x38>
call   1040 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <rand@plt>
test   $0x1,%al
jne    1140 <f+0x10>
xor    %eax,%eax
call   1030 <unlock@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <g@plt>

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 (...) @unlock()
%7 = call i32 (...) @g()
br label %10
8: ; preds = %0
%9 = call i32 @f()
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @rand()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %7, %0
%5 = tail call i32 (...) @unlock()
%6 = tail call i32 (...) @g()
ret i32 undef
7: ; preds = %0, %7
%8 = tail call i32 (...) @rand()
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %7
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t zig_subw_u64(uint64_t lhs, uint64_t rhs, uint64_t max) {
  if (lhs < rhs) {
    return max - rhs - lhs + 1;
  } else {
    return lhs - rhs;
  }
}


x86 assembly (clang, -O0):
<zig_subw_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1137 <zig_subw_u64+0x37>
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1143 <zig_subw_u64+0x43>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zig_subw_u64>:
sub    %rdi,%rdx
sub    %rsi,%rdx
lea    0x1(%rdx),%rax
sub    %rsi,%rdi
cmovge %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @zig_subw_u64(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = add i64 %0, %1
%6 = sub i64 1, %5
%7 = add i64 %6, %2
%8 = sub nsw i64 %0, %1
%9 = select i1 %4, i64 %7, i64 %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i;
  int sum = 0;
  for (i = 0; i < 127; i++)
    sum += i;
  printf("Sum is: %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x7f,-0x14(%rbp)
jge    1155 <main+0x45>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
mov    -0x18(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Sum is: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 8001)
ret i32 0
}
double ceil(double x) {}


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

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

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

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

/* Variables and functions */
uint8_t fhex(const char c) {
  if (c <= '9') {
    return (uint8_t)(c - '0');
  } else {
    return (uint8_t)(c - 'a' + 10);
  }
}


x86 assembly (clang, -O0):
<fhex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1126 <fhex+0x26>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <fhex+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fhex>:
lea    -0x57(%rdi),%ecx
lea    -0x30(%rdi),%eax
cmp    $0x3a,%dil
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fhex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 57
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 10
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @fhex(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp slt i8 %0, 58
%4 = select i1 %3, i32 -48, i32 -87
%5 = add nsw i32 %4, %2
ret i32 %5
}
void rop3_147_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & *D;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


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

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

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

LLVM IR (-O2):
define void @rop3_147_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int usage(char *name) {
  fprintf(stderr, "usage: %s [ -i | --integrated | -d | --dedicated ]\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s [ -i | --integrated | -d | --dedicated ]\0A\00"
define i32 @usage(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 ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"usage: %s [ -i | --integrated | -d | --dedicated ]\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int high_half(unsigned char num) { return (num / 16); }


x86 assembly (clang, -O0):
<high_half>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<high_half>:
shr    $0x4,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @high_half(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sdiv i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @high_half(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = zext i8 %2 to i32
ret i32 %3
}
int test_imm_11uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x11 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_11uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 73014444032
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int Large(int left, int right) { return (left > right); }


x86 assembly (clang, -O0):
<Large>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Large>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @Large(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Large(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
long strtol(char const *, void *, int);
long atol(const char *nptr) { return strtol(nptr, ((void *)0), 10); }


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

x86 assembly (clang, -O2):
<atol>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i64 @atol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8* null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atol(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8* null, i32 10)
ret i64 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ backing_store;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
int get_XSetWindowAttributes_backing_store(void *_p) {
  return (int)((XSetWindowAttributes *)_p)->backing_store;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XSetWindowAttributes_backing_store(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int ares_win32_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ares_win32_init() {
ret i32 0
}
void get_dependencies_fmt(char **fmt) {
  *fmt = "apt-cache depends %s | grep \"Depends:\"";
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"apt-cache depends %s | grep \22Depends:\22\00"
define void @get_dependencies_fmt(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8** %3
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"apt-cache depends %s | grep \22Depends:\22\00"
define void @get_dependencies_fmt(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8** %0
ret void
}
/* Type definitions */
struct pico_mqtt_serializer {
  int dummy;
};

/* Variables and functions */
int serialize_acknowledge(struct pico_mqtt_serializer *, int);
int serialize_pubcomp(struct pico_mqtt_serializer *serializer) {
  do {
  } while (0);
  return serialize_acknowledge(serializer, (7 << 4));
}


x86 assembly (clang, -O0):
<serialize_pubcomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1121 <serialize_pubcomp+0x11>
mov    -0x8(%rbp),%rdi
mov    $0x70,%esi
call   1030 <serialize_acknowledge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_pubcomp>:
mov    $0x70,%esi
jmp    1030 <serialize_acknowledge@plt>

LLVM IR (-O0):
%struct.pico_mqtt_serializer = type { i32 }
define i32 @serialize_pubcomp(%struct.pico_mqtt_serializer* %0) {
%2 = alloca %struct.pico_mqtt_serializer*
store %struct.pico_mqtt_serializer* %0, %struct.pico_mqtt_serializer** %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
%5 = load %struct.pico_mqtt_serializer*, %struct.pico_mqtt_serializer** %2
%6 = call i32 @serialize_acknowledge(%struct.pico_mqtt_serializer* %5, i32 112)
ret i32 %6
}

LLVM IR (-O2):
%struct.pico_mqtt_serializer = type { i32 }
define i32 @serialize_pubcomp(%struct.pico_mqtt_serializer* %0) {
%2 = tail call i32 @serialize_acknowledge(%struct.pico_mqtt_serializer* %0, i32 112)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *name) {
  printf("%s: query battery status on ACPI enabled systems.\n"
         "Usage:\n"
         "%s [-h] [-a samples]\n"
         " h - display this help information\n"
         " a - average remaining time over some number of samples\n"
         "     much more accurate than using a single sample\n"
         " V - increase verbosity\n"
         " v - print version information\n",
         name, name);
}


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

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

LLVM IR (-O0):
@.str = [276 x i8] c"%s: query battery status on ACPI enabled systems.\0AUsage:\0A%s [-h] [-a samples]\0A h - display this help information\0A a - average remaining time over some number of samples\0A much more accurate than using a single sample\0A V - increase verbosity\0A v - print version information\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([276 x i8], [276 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [276 x i8] c"%s: query battery status on ACPI enabled systems.\0AUsage:\0A%s [-h] [-a samples]\0A h - display this help information\0A a - average remaining time over some number of samples\0A much more accurate than using a single sample\0A V - increase verbosity\0A v - print version information\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([276 x i8], [276 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
void null_segment(int s) {}


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

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

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

LLVM IR (-O2):
define void @null_segment(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int foo2(int x, int a, int b) {
#pragma critTer : 10 : hello.c:
  printf("Return.\n");
#pragma critTer : 11 : hello.c:
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Return.\0A\00"
define i32 @foo2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@str = [8 x i8] c"Return.\00"
define i32 @foo2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int leftChild(int i) { return 2 * i + 1; }


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

x86 assembly (clang, -O2):
<leftChild>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @leftChild(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @leftChild(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
void info_vip_start(void) {}


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

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

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

LLVM IR (-O2):
define void @info_vip_start() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getprogname();
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void usage(void) {
  syslog(LOG_ERR,
         "Usage: %s [-cdln] [-g group] [-p pathsep] [-s directory] [-u user] "
         "[directory ...]",
         getprogname());
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xea9(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <syslog@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [83 x i8] c"Usage: %s [-cdln] [-g group] [-p pathsep] [-s directory] [-u user] [directory ...]\00"
define void @usage() {
%1 = load i32, i32* @LOG_ERR
%2 = call i32 (...) @getprogname()
%3 = call i32 @syslog(i32 %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [83 x i8] c"Usage: %s [-cdln] [-g group] [-p pathsep] [-s directory] [-u user] [directory ...]\00"
define void @usage() {
%1 = load i32, i32* @LOG_ERR
%2 = tail call i32 (...) @getprogname()
%3 = tail call i32 @syslog(i32 %1, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, float const);
int /*<<< orphan*/ stdout;
float func_float_param(const float f) {
  printf("c: got float (%g)\n", f);
  fflush(stdout);
  return 233.2;
}


x86 assembly (clang, -O0):
<func_float_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movss  0xeac(%rip),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_float_param>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
movss  0xebd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"c: got float (%g)\0A\00"
@stdout = global i32 0
define float @func_float_param(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret float 0x406D266660000000
}

LLVM IR (-O2):
@.str = [19 x i8] c"c: got float (%g)\0A\00"
@stdout = global i32 0
define float @func_float_param(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret float 0x406D266660000000
}
void ff_hevc_put_hevc_uni_w_qpel_h12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PIN_IRQ_Handler(int);
void PIN_INT6_IRQHandler(void) { PIN_IRQ_Handler(6); }


x86 assembly (clang, -O0):
<PIN_INT6_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <PIN_IRQ_Handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PIN_INT6_IRQHandler>:
mov    $0x6,%edi
jmp    1030 <PIN_IRQ_Handler@plt>

LLVM IR (-O0):
define void @PIN_INT6_IRQHandler() {
%1 = call i32 @PIN_IRQ_Handler(i32 6)
ret void
}

LLVM IR (-O2):
define void @PIN_INT6_IRQHandler() {
%1 = tail call i32 @PIN_IRQ_Handler(i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
zgt() { callrts("ccgt"); }


x86 assembly (clang, -O0):
<zgt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <callrts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"ccgt\00"
define i32 @zgt() {
%1 = alloca i32
%2 = call i32 @callrts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccgt\00"
define i32 @zgt() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int f(int, int);
int g(int, int);
int test() {
  int a = 2;
  int b = 3;
  int res;
  if (a > b)
    res = f(a, b);
  else
    res = g(a, b);
  return res + 1;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1155 <test+0x35>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    1163 <test+0x43>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <g@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <g@plt>
add    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 @g(i32 2, i32 3)
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printInvalidCommandMessage(void) {
  printf("Invalid command. Please enter --help for help\n");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"Invalid command. Please enter --help for help\0A\00"
define void @printInvalidCommandMessage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"Invalid command. Please enter --help for help\00"
define void @printInvalidCommandMessage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int round(int);
int temp_F2C(int temp_F) {
  if (temp_F == 999)
    return 999;
  return round((temp_F - 32) * 5 / 9.0);
}


x86 assembly (clang, -O0):
<temp_F2C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
jne    1134 <temp_F2C+0x24>
movl   $0x3e7,-0x4(%rbp)
jmp    1159 <temp_F2C+0x49>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <round@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temp_F2C>:
cmp    $0x3e7,%edi
jne    111e <temp_F2C+0xe>
mov    $0x3e7,%eax
ret
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cvtsi2sd %eax,%xmm0
divsd  0xece(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <round@plt>

LLVM IR (-O0):
define i32 @temp_F2C(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 999
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 999, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 32
%10 = mul nsw i32 %9, 5
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 9.000000e+00
%13 = fptosi double %12 to i32
%14 = call i32 @round(i32 %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @temp_F2C(i32 %0) {
%2 = icmp eq i32 %0, 999
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = mul i32 %0, 5
%5 = add i32 %4, -160
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 9.000000e+00
%8 = fptosi double %7 to i32
%9 = tail call i32 @round(i32 %8)
br label %10
10: ; preds = %1, %3
%11 = phi i32 [ %9, %3 ], [ 999, %1 ]
ret i32 %11
}
void kolibri_redraw(struct gui_window *g) {}


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

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

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

LLVM IR (-O2):
%struct.gui_window = type opaque
define void @kolibri_redraw(%struct.gui_window* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_line(int n, FILE *fp) {
  int i;
  for (i = 1; i <= n; i++) {
    fprintf(fp, "_");
  }
}


x86 assembly (clang, -O0):
<print_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1150 <print_line+0x40>
mov    -0x10(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_line+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1132 <print_line+0x22>
mov    %rsi,%rbx
mov    %edi,%ebp
nopl   0x0(%rax)
mov    $0x5f,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebp
jne    1120 <print_line+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @print_line(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 1, %2 ]
%6 = tail call i32 @fputc(i32 95, i32* %1)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %5, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
int lseek(int file, int ptr, int dir) { return 0; }


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

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

LLVM IR (-O0):
define i32 @lseek(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
ret i32 0
}

LLVM IR (-O2):
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
ret i32 0
}
int isspace(int c) {}


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

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

LLVM IR (-O0):
define i32 @isspace(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 @isspace(i32 %0) {
ret i32 undef
}
process_label() {}


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

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

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

LLVM IR (-O2):
define i32 @process_label() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int EVP_MD_CTX_cleanup(int /*<<< orphan*/ *);
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx) { return EVP_MD_CTX_cleanup(ctx); }


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

x86 assembly (clang, -O2):
<EVP_MD_CTX_reset>:
jmp    1030 <EVP_MD_CTX_cleanup@plt>

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

LLVM IR (-O2):
define i32 @EVP_MD_CTX_reset(i32* %0) {
%2 = tail call i32 @EVP_MD_CTX_cleanup(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((__noreturn__, __unused__)) void(cheat_unwrapped_abort)(void) {
  abort();
}


x86 assembly (clang, -O0):
<cheat_unwrapped_abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<cheat_unwrapped_abort>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @cheat_unwrapped_abort() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @cheat_unwrapped_abort() {
%1 = tail call i32 (...) @abort()
unreachable
}
int tegra_enter_lp0(unsigned long sleep_time) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_enter_lp0(i64 %0) {
ret i32 0
}