xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ put_unaligned_le32(unsigned int, unsigned char *);
int write32(unsigned int v, FILE *f) {
  unsigned char buf[4];
  put_unaligned_le32(v, buf);
  return fwrite(buf, 1, 4, f) == 4 ? 0 : -1;
}


x86 assembly (clang, -O0):
<write32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1030 <put_unaligned_le32@plt>
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1040 <fwrite@plt>
mov    %eax,%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x4,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rsi
call   1030 <put_unaligned_le32@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x4,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x4,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @write32(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%8 = call i32 @put_unaligned_le32(i32 %6, i8* %7)
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%10 = load i32*, i32** %4
%11 = call i32 @fwrite(i8* %9, i32 1, i32 4, i32* %10)
%12 = icmp eq i32 %11, 4
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 -1
ret i32 %14
}

LLVM IR (-O2):
define i32 @write32(i32 %0, i32* nocapture %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @put_unaligned_le32(i32 %0, i8* %4)
%6 = call i32 @fwrite(i8* %4, i32 1, i32 4, i32* %1)
%7 = icmp ne i32 %6, 4
%8 = sext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int strcmp(char const *, char const *);
int stringCmp(const void *a, const void *b) {
  const char **ia = (const char **)a;
  const char **ib = (const char **)b;
  return strcmp(*ia, *ib);
}


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

x86 assembly (clang, -O2):
<stringCmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @stringCmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @stringCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
void *dlvsym(void *, char const *, char *);
void *dlvsym_no_such_version(void *handle, const char *name) {
  return dlvsym(handle, name, "NO_SUCH_VERSION");
}


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

x86 assembly (clang, -O2):
<dlvsym_no_such_version>:
lea    0xee9(%rip),%rdx
jmp    1030 <dlvsym@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"NO_SUCH_VERSION\00"
define i8* @dlvsym_no_such_version(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @dlvsym(i8* %5, i8* %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@.str = [16 x i8] c"NO_SUCH_VERSION\00"
define i8* @dlvsym_no_such_version(i8* %0, i8* %1) {
%3 = tail call i8* @dlvsym(i8* %0, i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
void PhysicsComponent_update(void *_self) {
  if (!_self)
    return;
}


x86 assembly (clang, -O0):
<PhysicsComponent_update>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <PhysicsComponent_update+0x18>
jmp    1118 <PhysicsComponent_update+0x18>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @PhysicsComponent_update(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @PhysicsComponent_update(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct msg_buff {
  int dummy;
};
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int nla_put(struct msg_buff *, int, int, int /*<<< orphan*/ *);
int nla_put_u32(struct msg_buff *msg, int attrtype, __u32 value) {
  return nla_put(msg, attrtype, sizeof(__u32), &value);
}


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

x86 assembly (clang, -O2):
<nla_put_u32>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x4,%edx
call   1030 <nla_put@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.msg_buff = type { i32 }
define i32 @nla_put_u32(%struct.msg_buff* %0, i32 %1, i32 %2) {
%4 = alloca %struct.msg_buff*
%5 = alloca i32
%6 = alloca i32
store %struct.msg_buff* %0, %struct.msg_buff** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.msg_buff*, %struct.msg_buff** %4
%8 = load i32, i32* %5
%9 = call i32 @nla_put(%struct.msg_buff* %7, i32 %8, i32 4, i32* %6)
ret i32 %9
}

LLVM IR (-O2):
%struct.msg_buff = type { i32 }
define i32 @nla_put_u32(%struct.msg_buff* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @nla_put(%struct.msg_buff* %0, i32 %1, i32 4, i32* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int main(int argc, const char **argv) {
  putchar(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @putchar(i32 0)
ret i32 0
}
int compareTo(int a, int b) {
  if (a < b)
    return -1;
  else if (a > b)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compareTo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <compareTo+0x22>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <compareTo+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113a <compareTo+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <compareTo+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareTo>:
xor    %ecx,%ecx
cmp    %esi,%edi
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compareTo(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = icmp sgt i32 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ doLog(char *, char *, int, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Logging__fatal(char *fileName, int lineNo, char *msg) {
  doLog("FATAL", fileName, lineNo, msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<Logging__fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1030 <doLog@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Logging__fatal>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1030 <doLog@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"FATAL\00"
@EXIT_FAILURE = global i32 0
define void @Logging__fatal(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @doLog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"FATAL\00"
@EXIT_FAILURE = global i32 0
define void @Logging__fatal(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @doLog(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
_Complex int bar(_Complex int z) { return z * ~z; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edi
xor    %esi,%esi
sub    -0xc(%rbp),%esi
mov    %edx,%ecx
imul   %edi,%ecx
mov    %eax,%r8d
imul   %esi,%r8d
sub    %r8d,%ecx
imul   %edi,%eax
imul   %esi,%edx
add    %edx,%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %rdi,%rax
shr    $0x20,%rax
imul   %edi,%edi
imul   %eax,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i64 @bar(i64 %0) {
%2 = alloca { i32, i32 }
%3 = alloca { i32, i32 }
%4 = bitcast { i32, i32 }* %3 to i64*
store i64 %0, i64* %4
%5 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 0
%10 = load i32, i32* %9
%11 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %3, i32 0, i32 1
%12 = load i32, i32* %11
%13 = sub i32 0, %12
%14 = mul i32 %6, %10
%15 = mul i32 %8, %13
%16 = sub i32 %14, %15
%17 = mul i32 %8, %10
%18 = mul i32 %6, %13
%19 = add i32 %17, %18
%20 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 0
%21 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %2, i32 0, i32 1
store i32 %16, i32* %20
store i32 %19, i32* %21
%22 = bitcast { i32, i32 }* %2 to i64*
%23 = load i64, i64* %22
ret i64 %23
}

LLVM IR (-O2):
define i64 @bar(i64 %0) {
%2 = lshr i64 %0, 32
%3 = mul i64 %0, %0
%4 = mul nuw i64 %2, %2
%5 = add i64 %4, %3
%6 = and i64 %5, 4294967295
ret i64 %6
}
void ff_hevc_put_hevc_uni_w_qpel_v48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_v48_8_sse4() {
ret void
}
int numPatternTypes() { return 61; }


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

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

LLVM IR (-O0):
define i32 @numPatternTypes() {
ret i32 61
}

LLVM IR (-O2):
define i32 @numPatternTypes() {
ret i32 61
}
int get_min_array_size(void) { return ((19937 / 104) * 2); }


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

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

LLVM IR (-O0):
define i32 @get_min_array_size() {
ret i32 382
}

LLVM IR (-O2):
define i32 @get_min_array_size() {
ret i32 382
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void die(int exit_code, const char *msg) {
  fprintf(stderr, "Fatal error: %s\n", msg);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @die(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @die(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __bswap_variable_16(int /*<<< orphan*/);
__attribute__((always_)) void __bswap_16s(uint16_t *x) {
  *x = __bswap_variable_16(*x);
}


x86 assembly (clang, -O0):
<__bswap_16s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <__bswap_variable_16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bswap_16s>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <__bswap_variable_16@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @__bswap_16s(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__bswap_variable_16(i32 %2)
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
char *config_get_option(char const *);
int /*<<< orphan*/ strcasecmp(char const *, char const *);
int config_compare_option(const char *key, const char *compare) {
  const char *option = config_get_option(key);
  if (!option || !compare) {
    return 0;
  }
  return !strcasecmp(option, compare);
}


x86 assembly (clang, -O0):
<config_compare_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <config_get_option@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1153 <config_compare_option+0x33>
cmpq   $0x0,-0x18(%rbp)
jne    115f <config_compare_option+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    117c <config_compare_option+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_compare_option>:
push   %rbx
mov    %rsi,%rbx
call   1040 <config_get_option@plt>
mov    %rax,%rdi
xor    %eax,%eax
test   %rbx,%rbx
je     1149 <config_compare_option+0x29>
test   %rdi,%rdi
je     1149 <config_compare_option+0x29>
mov    %rbx,%rsi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @config_compare_option(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i8* @config_get_option(i8* %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %15, label %14
14: ; preds = %11, %2
store i32 0, i32* %3
br label %22
15: ; preds = %11
%16 = load i8*, i8** %6
%17 = load i8*, i8** %5
%18 = call i32 @strcasecmp(i8* %16, i8* %17)
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
store i32 %21, i32* %3
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @config_compare_option(i8* %0, i8* %1) {
%3 = tail call i8* @config_get_option(i8* %0)
%4 = icmp ne i8* %3, null
%5 = icmp ne i8* %1, null
%6 = and i1 %5, %4
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 @strcasecmp(i8* %3, i8* %1)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 0, %2 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void locSrvSendRangeFloat(uint8_t id, float range) {}


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

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

LLVM IR (-O0):
define void @locSrvSendRangeFloat(i32 %0, float %1) {
%3 = alloca i32
%4 = alloca float
store i32 %0, i32* %3
store float %1, float* %4
ret void
}

LLVM IR (-O2):
define void @locSrvSendRangeFloat(i32 %0, float %1) {
ret void
}
int length_r(char *s) {
  if (*s == '\0')
    return 0;
  return 1 + length_r(s + 1);
}


x86 assembly (clang, -O0):
<length_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1138 <length_r+0x28>
movl   $0x0,-0x4(%rbp)
jmp    114b <length_r+0x3b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <length_r@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length_r>:
cmpb   $0x0,(%rdi)
je     111c <length_r+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length_r+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @length_r(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add nuw nsw i32 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int icheck(float a, float b) { return a <= b; }


x86 assembly (clang, -O0):
<icheck>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<icheck>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
ret

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

LLVM IR (-O2):
define i32 @icheck(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t bcdtobin16(uint8_t bcd) {
  uint16_t res = 0;
  res = (bcd & 0x0F);
  res += ((bcd >> 4) & 0x000F) * 10;
  res += ((bcd >> 8) & 0x000F) * 100;
  res += ((bcd >> 12) & 0x000F) * 1000;
  return res;
}


x86 assembly (clang, -O0):
<bcdtobin16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
imul   $0xa,%eax,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xf,%eax
imul   $0x64,%eax,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
imul   $0x3e8,%eax,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcdtobin16>:
mov    %edi,%eax
and    $0xf,%eax
mov    %edi,%ecx
shr    $0x4,%ecx
and    $0xf,%ecx
lea    (%rcx,%rcx,4),%ecx
lea    (%rax,%rcx,2),%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xf,%ecx
imul   $0x64,%ecx,%ecx
add    %eax,%ecx
shr    $0xc,%edi
and    $0xf,%edi
imul   $0x3e8,%edi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bcdtobin16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = and i32 %4, 15
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = ashr i32 %6, 4
%8 = and i32 %7, 15
%9 = mul nsw i32 %8, 10
%10 = load i32, i32* %3
%11 = add nsw i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = ashr i32 %12, 8
%14 = and i32 %13, 15
%15 = mul nsw i32 %14, 100
%16 = load i32, i32* %3
%17 = add nsw i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %2
%19 = ashr i32 %18, 12
%20 = and i32 %19, 15
%21 = mul nsw i32 %20, 1000
%22 = load i32, i32* %3
%23 = add nsw i32 %22, %21
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @bcdtobin16(i32 %0) {
%2 = and i32 %0, 15
%3 = lshr i32 %0, 4
%4 = and i32 %3, 15
%5 = mul nuw nsw i32 %4, 10
%6 = add nuw nsw i32 %5, %2
%7 = lshr i32 %0, 8
%8 = and i32 %7, 15
%9 = mul nuw nsw i32 %8, 100
%10 = add nuw nsw i32 %6, %9
%11 = lshr i32 %0, 12
%12 = and i32 %11, 15
%13 = mul nuw nsw i32 %12, 1000
%14 = add nuw nsw i32 %10, %13
ret i32 %14
}
int test_imm_88int16_reg(short val) {
  return ((val) & (0x88 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_88int16_reg>:
test   $0x88,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_88int16_reg(i16 signext %0) {
%2 = and i16 %0, 136
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_default_system(void **ret) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_default_system>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_default_system>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_default_system(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_default_system(i8** nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void batadv_v_mesh_free(struct batadv_priv *bat_priv) {}


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

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

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

LLVM IR (-O2):
%struct.batadv_priv = type opaque
define void @batadv_v_mesh_free(%struct.batadv_priv* nocapture %0) {
ret void
}
void gtk_file_chooser_set_action() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_set_action() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Itoa(int, char *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char buffer[256] = {0};
  int n = 255;
  int paddingWidth = 24;
  Itoa(n, buffer, 24);
  printf("%s.\n", buffer);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1050 <memset@plt>
movl   $0xff,-0x114(%rbp)
movl   $0x18,-0x118(%rbp)
mov    -0x114(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0x18,%edx
call   1030 <Itoa@plt>
lea    -0x110(%rbp),%rsi
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0xff,%edi
mov    %rbx,%rsi
mov    $0x18,%edx
call   1030 <Itoa@plt>
lea    0xe42(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [256 x i8]* %2 to i8*
store i32 255, i32* %3
store i32 24, i32* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%8 = call i32 @Itoa(i32 %6, i8* %7, i32 24)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s.\0A\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @Itoa(i32 255, i8* %2, i32 24)
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fixed32_pack(int, char *);
int /*<<< orphan*/ is_big_endian();
int /*<<< orphan*/ memcpy(void *, int *, int);
size_t fixed64_pack(uint64_t value, void *out) {
  if (!is_big_endian()) {
    memcpy(out, &value, 8);
  } else {
    fixed32_pack(value, out);
    fixed32_pack(value >> 32, ((char *)out) + 4);
  }
  return 8;
}


x86 assembly (clang, -O0):
<fixed64_pack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <is_big_endian@plt>
cmp    $0x0,%eax
jne    1166 <fixed64_pack+0x36>
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
jmp    1189 <fixed64_pack+0x59>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fixed32_pack@plt>
mov    -0x4(%rbp),%edi
mov    $0x20,%ecx
sar    %cl,%edi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
call   1030 <fixed32_pack@plt>
mov    $0x8,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed64_pack>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %edi,0x4(%rsp)
xor    %eax,%eax
call   1050 <is_big_endian@plt>
test   %eax,%eax
je     115f <fixed64_pack+0x2f>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <fixed32_pack@plt>
add    $0x4,%rbx
mov    %rbx,%rsi
call   1030 <fixed32_pack@plt>
jmp    1171 <fixed64_pack+0x41>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    $0x8,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @fixed64_pack(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @is_big_endian()
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @memcpy(i8* %8, i32* %3, i32 8)
br label %19
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = call i32 @fixed32_pack(i32 %11, i8* %12)
%14 = load i32, i32* %3
%15 = ashr i32 %14, 32
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 4
%18 = call i32 @fixed32_pack(i32 %15, i8* %17)
br label %19
19: ; preds = %10, %7
ret i64 8
}

LLVM IR (-O2):
define i64 @fixed64_pack(i32 %0, i8* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = tail call i32 (...) @is_big_endian()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = call i32 @memcpy(i8* %1, i32* %3, i32 8)
br label %12
8: ; preds = %2
%9 = tail call i32 @fixed32_pack(i32 %0, i8* %1)
%10 = getelementptr inbounds i8, i8* %1, i64 4
%11 = tail call i32 @fixed32_pack(i32 poison, i8* %10)
br label %12
12: ; preds = %8, %6
ret i64 8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *prg) { printf("Usage: %s: [host:port]\n", prg); }


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

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

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

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: %s: [host:port]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void om_text_print_hline(FILE *fp) { fprintf(fp, "\n"); }


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

x86 assembly (clang, -O2):
<om_text_print_hline>:
mov    %rdi,%rsi
mov    $0xa,%edi
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define void @om_text_print_hline(i32* nocapture %0) {
%2 = tail call i32 @fputc(i32 10, i32* %0)
ret void
}
f(a, b, c) { return a == b == c; }


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

x86 assembly (clang, -O2):
<f>:
xor    %ecx,%ecx
cmp    %esi,%edi
sete   %cl
xor    %eax,%eax
cmp    %edx,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @f(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* %5
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = load i32, i32* %6
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
%5 = zext i1 %4 to i32
%6 = icmp eq i32 %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int limitcolumn(char *, int /*<<< orphan*/);
int columnwidth(char *s) { return limitcolumn(s, 0); }


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

x86 assembly (clang, -O2):
<columnwidth>:
xor    %esi,%esi
jmp    1030 <limitcolumn@plt>

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

LLVM IR (-O2):
define i32 @columnwidth(i8* %0) {
%2 = tail call i32 @limitcolumn(i8* %0, i32 0)
ret i32 %2
}
void g_string_chunk_insert_const() {}


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

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

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

LLVM IR (-O2):
define void @g_string_chunk_insert_const() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int print_uint16(int /*<<< orphan*/, char *);
int print_int16(int16_t n, char *p) {
  int sign;
  if ((sign = n < 0)) {
    *p++ = '-';
    n = -n;
  }
  return print_uint16((uint16_t)n, p) + sign;
}


x86 assembly (clang, -O0):
<print_int16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1140 <print_int16+0x30>
jmp    115c <print_int16+0x4c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <print_uint16@plt>
add    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int16>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
js     111e <print_int16+0xe>
mov    %rbx,%rdi
jmp    112b <print_int16+0x1b>
movb   $0x2d,(%rsi)
add    $0x1,%rsi
mov    %rbx,%rdi
neg    %rdi
shr    $0x3f,%rbx
call   1030 <print_uint16@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @print_int16(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %5
br i1 %7, label %9, label %14
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 45, i8* %10
%12 = load i64, i64* %3
%13 = sub nsw i64 0, %12
store i64 %13, i64* %3
br label %14
14: ; preds = %9, %2
%15 = load i64, i64* %3
%16 = trunc i64 %15 to i32
%17 = load i8*, i8** %4
%18 = call i32 @print_uint16(i32 %16, i8* %17)
%19 = load i32, i32* %5
%20 = add nsw i32 %18, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @print_int16(i64 %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
%6 = sub nsw i64 0, %0
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %5, %4 ], [ %1, %2 ]
%9 = phi i64 [ %6, %4 ], [ %0, %2 ]
%10 = lshr i64 %0, 63
%11 = trunc i64 %10 to i32
%12 = trunc i64 %9 to i32
%13 = tail call i32 @print_uint16(i32 %12, i8* %8)
%14 = add nsw i32 %13, %11
ret i32 %14
}
void BN_mod_exp_mont(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_exp_mont() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ texConv_AI44_ARGB4444(unsigned char *, unsigned char *, int);
void TexConv_AI44_ARGB4444(unsigned char *src, unsigned char *dst, int width,
                           int height) {
  int size = (width * height) >> 2;
  texConv_AI44_ARGB4444(src, dst, size);
}


x86 assembly (clang, -O0):
<TexConv_AI44_ARGB4444>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <texConv_AI44_ARGB4444@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TexConv_AI44_ARGB4444>:
imul   %ecx,%edx
sar    $0x2,%edx
jmp    1030 <texConv_AI44_ARGB4444@plt>

LLVM IR (-O0):
define void @TexConv_AI44_ARGB4444(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = mul nsw i32 %10, %11
%13 = ashr i32 %12, 2
store i32 %13, i32* %9
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = load i32, i32* %9
%17 = call i32 @texConv_AI44_ARGB4444(i8* %14, i8* %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @TexConv_AI44_ARGB4444(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %2
%6 = ashr i32 %5, 2
%7 = tail call i32 @texConv_AI44_ARGB4444(i8* %0, i8* %1, i32 %6)
ret void
}
void pm8921_bms_charging_began(void) {}


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

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

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

LLVM IR (-O2):
define void @pm8921_bms_charging_began() {
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
typedef int /*<<< orphan*/ query;

/* Variables and functions */
char *sqlQuickString(struct sqlConnection *, char *);
int /*<<< orphan*/ sqlSafef(char *, int, char *, int);
char *visiGeneSliceType(struct sqlConnection *conn, int id) {
  char query[256];
  sqlSafef(query, sizeof(query),
           "select sliceType.name from image,preparation,sliceType "
           "where image.id = %d "
           "and image.preparation = preparation.id "
           "and preparation.sliceType = sliceType.id",
           id);
  return sqlQuickString(conn, query);
}


x86 assembly (clang, -O0):
<visiGeneSliceType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x100,%esi
lea    0xeb8(%rip),%rdx
call   1040 <sqlSafef@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <sqlQuickString@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneSliceType>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xeca(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1040 <sqlSafef@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sqlQuickString@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [155 x i8] c"select sliceType.name from image,preparation,sliceType where image.id = %d and image.preparation = preparation.id and preparation.sliceType = sliceType.id\00"
define i8* @visiGeneSliceType(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
%5 = alloca [256 x i8]
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sqlSafef(i8* %6, i32 256, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i8* @sqlQuickString(%struct.sqlConnection* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [155 x i8] c"select sliceType.name from image,preparation,sliceType where image.id = %d and image.preparation = preparation.id and preparation.sliceType = sliceType.id\00"
define i8* @visiGeneSliceType(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sqlSafef(i8* %4, i32 256, i8* getelementptr inbounds ([155 x i8], [155 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i8* @sqlQuickString(%struct.sqlConnection* %0, i8* %4)
ret i8* %6
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
int is_vowel(wchar_t ch) {
  switch (ch) {
  case L'A':
  case L'E':
  case L'I':
  case L'O':
  case L'U':
  case L'Y':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     1170 <is_vowel+0x70>
jmp    111b <is_vowel+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     1170 <is_vowel+0x70>
jmp    112c <is_vowel+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     1170 <is_vowel+0x70>
jmp    113d <is_vowel+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
je     1170 <is_vowel+0x70>
jmp    114e <is_vowel+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x55,%eax
je     1170 <is_vowel+0x70>
jmp    115f <is_vowel+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x59,%eax
jne    117c <is_vowel+0x7c>
jmp    1170 <is_vowel+0x70>
movl   $0x1,-0x4(%rbp)
jmp    1183 <is_vowel+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vowel>:
add    $0xffffffbf,%edi
ror    %edi
xor    %eax,%eax
cmp    $0xc,%edi
ja     1119 <is_vowel+0x19>
movslq %edi,%rax
lea    0xeea(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @is_vowel(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 65, label %5
i32 69, label %5
i32 73, label %5
i32 79, label %5
i32 85, label %5
i32 89, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.is_vowel = [13 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1]
define i32 @is_vowel(i32 %0) {
%2 = add i32 %0, -65
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %2, i32 31)
%4 = icmp ult i32 %3, 13
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [13 x i32], [13 x i32]* @switch.table.is_vowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
void CL_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @CL_Init() {
ret void
}
unsigned short RdFwVr_OFILM(void) {
  unsigned short UsVerVal_OFILM;
  UsVerVal_OFILM = (unsigned short)((0x02 << 8) | 0x01);
  return (UsVerVal_OFILM);
}


x86 assembly (clang, -O0):
<RdFwVr_OFILM>:
push   %rbp
mov    %rsp,%rbp
movw   $0x201,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RdFwVr_OFILM>:
mov    $0x201,%ax
ret

LLVM IR (-O0):
define zeroext i16 @RdFwVr_OFILM() {
%1 = alloca i16
store i16 513, i16* %1
%2 = load i16, i16* %1
ret i16 %2
}

LLVM IR (-O2):
define zeroext i16 @RdFwVr_OFILM() {
ret i16 513
}
void _py_func(void) {}


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

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

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

LLVM IR (-O2):
define void @_py_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello World\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int main() {
  int a = 1;
  int b = 1;
  while (a) {
    a += b;
    b *= 2;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O2):