xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ recv_ack();
scalar_t__ send_msg(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strlen(char *);
void send_text(char *txt) {
  char buf[80];
  sprintf(buf, "T %s\n", txt);
  if (send_msg(buf, strlen(buf))) {
    recv_ack();
  }
}


x86 assembly (clang, -O0):
<send_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea5(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
cmp    $0x0,%rax
je     118d <send_text+0x4d>
mov    $0x0,%al
call   1030 <recv_ack@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_text>:
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%rdx
lea    0xeb1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
test   %rax,%rax
je     1178 <send_text+0x38>
xor    %eax,%eax
call   1030 <recv_ack@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"T %s\0A\00"
define void @send_text(i8* %0) {
%2 = alloca i8*
%3 = alloca [80 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = call i64 @send_msg(i8* %7, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 (...) @recv_ack()
br label %14
14: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"T %s\0A\00"
define void @send_text(i8* %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @strlen(i8* %3)
%6 = call i64 @send_msg(i8* %3, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 (...) @recv_ack()
br label %10
10: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sla_fk45z_(double *, double *, double *, double *, double *);
void slaFk45z(double r1950, double d1950, double bepoch, double *r2000,
              double *d2000) {
  sla_fk45z_(&r1950, &d1950, &bepoch, r2000, d2000);
}


x86 assembly (clang, -O0):
<slaFk45z>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sla_fk45z_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaFk45z>:
sub    $0x18,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sla_fk45z_@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @slaFk45z(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
%9 = call i32 @sla_fk45z_(double* %6, double* %7, double* %8, double* %3, double* %4)
ret void
}
void BIO_get_callback(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_get_callback() {
ret void
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ selcall_deinit(struct demod_state *);
void ccir_deinit(struct demod_state *s) { selcall_deinit(s); }


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

x86 assembly (clang, -O2):
<ccir_deinit>:
jmp    1030 <selcall_deinit@plt>

LLVM IR (-O0):
%struct.demod_state = type { i32 }
define void @ccir_deinit(%struct.demod_state* %0) {
%2 = alloca %struct.demod_state*
store %struct.demod_state* %0, %struct.demod_state** %2
%3 = load %struct.demod_state*, %struct.demod_state** %2
%4 = call i32 @selcall_deinit(%struct.demod_state* %3)
ret void
}

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @ccir_deinit(%struct.demod_state* %0) {
%2 = tail call i32 @selcall_deinit(%struct.demod_state* %0)
ret void
}
/* Variables and functions */
int default_key_compare(const void *key1, const void *key2) {
  return (int)((uintptr_t)key1 - (uintptr_t)key2);
}


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

x86 assembly (clang, -O2):
<default_key_compare>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @default_key_compare(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @default_key_compare(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __getdelim(char **, size_t *, char, int /*<<< orphan*/ *);
ssize_t __getline(char **lineptr, size_t *n, FILE *stream) {
  return __getdelim(lineptr, n, '\n', stream);
}


x86 assembly (clang, -O0):
<__getline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0xa,%edx
call   1030 <__getdelim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <__getdelim@plt>

LLVM IR (-O0):
define i32 @__getline(i8** %0, i64* %1, i32* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i32*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %4
%8 = load i64*, i64** %5
%9 = load i32*, i32** %6
%10 = call i32 @__getdelim(i8** %7, i64* %8, i8 signext 10, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @__getline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @__getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t a52_convert(int32_t i) {
  i >>= 15;
  return (i > 32767) ? 32767 : ((i < -32768) ? -32768 : i);
}


x86 assembly (clang, -O0):
<a52_convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x7fff,-0x4(%rbp)
jle    112a <a52_convert+0x2a>
mov    $0x7fff,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <a52_convert+0x50>
cmpl   $0xffff8000,-0x4(%rbp)
jge    1144 <a52_convert+0x44>
mov    $0xffff8000,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <a52_convert+0x4a>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52_convert>:
sar    $0xf,%edi
cmp    $0xffff8001,%edi
mov    $0xffff8000,%ecx
cmovge %edi,%ecx
cmp    $0x7fff,%ecx
mov    $0x7fff,%eax
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @a52_convert(i32 %0) {
%2 = ashr i32 %0, 15
%3 = icmp sgt i32 %2, -32768
%4 = select i1 %3, i32 %2, i32 -32768
%5 = icmp slt i32 %4, 32767
%6 = select i1 %5, i32 %4, i32 32767
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ USDHC2_DriverIRQHandler();
__attribute__((weak)) void USDHC2_IRQHandler(void) {
  USDHC2_DriverIRQHandler();
}


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

x86 assembly (clang, -O2):
<USDHC2_IRQHandler>:
xor    %eax,%eax
jmp    1030 <USDHC2_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @USDHC2_IRQHandler() {
%1 = call i32 (...) @USDHC2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @USDHC2_IRQHandler() {
%1 = tail call i32 (...) @USDHC2_DriverIRQHandler()
ret void
}
/* Variables and functions */
long strtol(char const *, char **, int);
unsigned long makeuid(const char *username) {
  long uidcheck = 0;
  char *pos = NULL;
  uidcheck = strtol(username, &pos, 10);
  return (pos[0] == '\0') ? uidcheck : 0;
}


x86 assembly (clang, -O0):
<makeuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    115f <makeuid+0x4f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    116a <makeuid+0x5a>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    116a <makeuid+0x5a>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeuid>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    (%rsp),%rcx
xor    %edx,%edx
cmpb   $0x0,(%rcx)
cmovne %rdx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @makeuid(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i64 %4, i64 0
ret i64 %8
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t dvbvbittx_get_line(const uint8_t *p) { return p[0] & 0x1f; }


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

x86 assembly (clang, -O2):
<dvbvbittx_get_line>:
mov    (%rdi),%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @dvbvbittx_get_line(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = and i32 %5, 31
ret i32 %6
}

LLVM IR (-O2):
define i32 @dvbvbittx_get_line(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 31
ret i32 %3
}
void f_int1(int f) { return; }


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

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

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

LLVM IR (-O2):
define void @f_int1(i32 %0) {
ret void
}
int max_integer(int i1, int i2) {
  if (i1 > i2)
    return i1;
  return i2;
}


x86 assembly (clang, -O0):
<max_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <max_integer+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max_integer+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_integer>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max_integer(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 sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @max_integer(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ CityStringHash64WithSeeds(char const *, size_t, int,
                                             int /*<<< orphan*/);
uint64_t CityHash64WithSeed(const char *s, size_t len, uint64_t seed) {
  return CityStringHash64WithSeeds(s, len, (0x9ae16a3b2f90404fULL), seed);
}


x86 assembly (clang, -O0):
<CityHash64WithSeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    $0x2f90404f,%edx
call   1030 <CityStringHash64WithSeeds@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CityHash64WithSeed>:
mov    %edx,%ecx
mov    $0x2f90404f,%edx
jmp    1030 <CityStringHash64WithSeeds@plt>

LLVM IR (-O0):
define i32 @CityHash64WithSeed(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call i32 @CityStringHash64WithSeeds(i8* %7, i64 %8, i32 797982799, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @CityHash64WithSeed(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @CityStringHash64WithSeeds(i8* %0, i64 %1, i32 797982799, i32 %2)
ret i32 %4
}
char f1(char *x) { return *x; }


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

x86 assembly (clang, -O2):
<f1>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define signext i8 @f1(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int /*<<< orphan*/);
void C67_MVKH(int r, int fc) { C67_asm("MVKH.", fc, r, 0); }


x86 assembly (clang, -O0):
<C67_MVKH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xed5(%rip),%rdi
xor    %ecx,%ecx
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_MVKH>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
xor    %ecx,%ecx
jmp    1030 <C67_asm@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"MVKH.\00"
define void @C67_MVKH(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void handle_pabt(void) {
  uart_puts("\nPrefetch Abort");
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<handle_pabt>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <uart_puts@plt>
jmp    1120 <handle_pabt+0x10>

x86 assembly (clang, -O2):
<handle_pabt>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <uart_puts@plt>
nopl   (%rax)
jmp    1120 <handle_pabt+0x10>

LLVM IR (-O0):
@.str = [16 x i8] c"\0APrefetch Abort\00"
define void @handle_pabt() {
%1 = call i32 @uart_puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0APrefetch Abort\00"
define void @handle_pabt() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
void gtk_grab_get_current() {}


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

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

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

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

/* Variables and functions */
int bitcnt(int);
int clz(uint32_t x) {
  x = x | (x >> 1);
  x = x | (x >> 2);
  x = x | (x >> 4);
  x = x | (x >> 8);
  x = x | (x >> 16);
  return bitcnt(~x);
}


x86 assembly (clang, -O0):
<clz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
call   1030 <bitcnt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clz>:
mov    %edi,%eax
sar    %eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
sar    $0x10,%eax
or     %eax,%edi
not    %edi
jmp    1030 <bitcnt@plt>

LLVM IR (-O0):
define i32 @clz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 1
%6 = or i32 %3, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = ashr i32 %8, 2
%10 = or i32 %7, %9
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = ashr i32 %12, 4
%14 = or i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = ashr i32 %16, 8
%18 = or i32 %15, %17
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = ashr i32 %20, 16
%22 = or i32 %19, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = xor i32 %23, -1
%25 = call i32 @bitcnt(i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @clz(i32 %0) {
%2 = ashr i32 %0, 1
%3 = or i32 %2, %0
%4 = ashr i32 %3, 2
%5 = or i32 %4, %3
%6 = ashr i32 %5, 4
%7 = or i32 %6, %5
%8 = ashr i32 %7, 8
%9 = or i32 %8, %7
%10 = ashr i32 %9, 16
%11 = or i32 %10, %9
%12 = xor i32 %11, -1
%13 = tail call i32 @bitcnt(i32 %12)
ret i32 %13
}
/* Variables and functions */
scalar_t__ RAND_MAX;
int rand();
double roll(int x) {
  int i = rand();
  double r = ((double)i) / ((double)RAND_MAX);
  if (x == 0) {
    return r;
  }
  int y = (int)(x * r);
  return (double)y;
}


x86 assembly (clang, -O0):
<roll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x10(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
mov    0x2eb7(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1158 <roll+0x48>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1173 <roll+0x63>
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
mov    0x2ec3(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
test   %ebx,%ebx
je     1145 <roll+0x35>
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
mulsd  %xmm1,%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @roll(i32 %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store i32 %0, i32* %3
%7 = call i32 (...) @rand()
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = load i64, i64* @RAND_MAX
%11 = sitofp i64 %10 to double
%12 = fdiv double %9, %11
store double %12, double* %5
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = load double, double* %5
store double %16, double* %2
br label %25
17: ; preds = %1
%18 = load i32, i32* %3
%19 = sitofp i32 %18 to double
%20 = load double, double* %5
%21 = fmul double %19, %20
%22 = fptosi double %21 to i32
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = sitofp i32 %23 to double
store double %24, double* %2
br label %25
25: ; preds = %17, %15
%26 = load double, double* %2
ret double %26
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @roll(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = sitofp i32 %2 to double
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
%7 = icmp eq i32 %0, 0
%8 = sitofp i32 %0 to double
%9 = fmul double %6, %8
%10 = fptosi double %9 to i32
%11 = sitofp i32 %10 to double
%12 = select i1 %7, double %6, double %11
ret double %12
}
/* Variables and functions */
scalar_t__ atof(char const *);
int convert(const char str[]) { return (int)atof(str); }


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

x86 assembly (clang, -O2):
<convert>:
jmp    1030 <atof@plt>

LLVM IR (-O0):
define i32 @convert(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @atof(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @convert(i8* nocapture %0) {
%2 = tail call i64 @atof(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void Mark(int R, int C, int Size, short Col[], short Diag[], short AntiD[]) {
  int Idx;
  Col[C] = 1;
  Idx = R - C + Size - 1;
  Diag[Idx] = 1;
  Idx = R + C;
  AntiD[Idx] = 1;
}


x86 assembly (clang, -O0):
<Mark>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movw   $0x1,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movw   $0x1,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movw   $0x1,(%rax,%rcx,2)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mark>:
movslq %esi,%rax
movw   $0x1,(%rcx,%rax,2)
mov    %eax,%ecx
not    %ecx
add    %edi,%ecx
add    %edx,%ecx
movslq %ecx,%rcx
movw   $0x1,(%r8,%rcx,2)
add    %edi,%eax
cltq
movw   $0x1,(%r9,%rax,2)
ret

LLVM IR (-O0):
define void @Mark(i32 %0, i32 %1, i32 %2, i16* %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i16*
%11 = alloca i16*
%12 = alloca i16*
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i16* %3, i16** %10
store i16* %4, i16** %11
store i16* %5, i16** %12
%14 = load i16*, i16** %10
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i16, i16* %14, i64 %16
store i16 1, i16* %17
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = sub nsw i32 %18, %19
%21 = load i32, i32* %9
%22 = add nsw i32 %20, %21
%23 = sub nsw i32 %22, 1
store i32 %23, i32* %13
%24 = load i16*, i16** %11
%25 = load i32, i32* %13
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i16, i16* %24, i64 %26
store i16 1, i16* %27
%28 = load i32, i32* %7
%29 = load i32, i32* %8
%30 = add nsw i32 %28, %29
store i32 %30, i32* %13
%31 = load i16*, i16** %12
%32 = load i32, i32* %13
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i16, i16* %31, i64 %33
store i16 1, i16* %34
ret void
}

LLVM IR (-O2):
define void @Mark(i32 %0, i32 %1, i32 %2, i16* nocapture writeonly %3, i16* nocapture writeonly %4, i16* nocapture writeonly %5) {
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i16, i16* %3, i64 %7
store i16 1, i16* %8
%9 = xor i32 %1, -1
%10 = add i32 %9, %0
%11 = add i32 %10, %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i16, i16* %4, i64 %12
store i16 1, i16* %13
%14 = add nsw i32 %1, %0
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i16, i16* %5, i64 %15
store i16 1, i16* %16
ret void
}
char get_path_separator() { return ':'; }


x86 assembly (clang, -O0):
<get_path_separator>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3a,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_path_separator>:
mov    $0x3a,%al
ret

LLVM IR (-O0):
define signext i8 @get_path_separator() {
ret i8 58
}

LLVM IR (-O2):
define signext i8 @get_path_separator() {
ret i8 58
}
int envid_sort_fn(const void *val1, const void *val2) {
  const unsigned int *r1 = (const unsigned int *)val1;
  const unsigned int *r2 = (const unsigned int *)val2;
  return (*r1 - *r2);
}


x86 assembly (clang, -O0):
<envid_sort_fn>:
push   %rbp
mov    %rsp,%rbp
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),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @envid_sort_fn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub i32 %5, %6
ret i32 %7
}
void ff_hevc_put_hevc_bi_pel_pixels32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels32_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int main() {
  char *a = "abcd";
  if (a[0] != 'a') {
    _exit(-1);
  }
  if (a[1] != 'b') {
    _exit(-2);
  }
  if (a[2] != 'c') {
    _exit(-3);
  }
  if (a[3] != 'd') {
    _exit(-4);
  }
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
je     1144 <main+0x34>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x62,%eax
je     115f <main+0x4f>
mov    $0xfffffffe,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x63,%eax
je     117a <main+0x6a>
mov    $0xfffffffd,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x64,%eax
je     1195 <main+0x85>
mov    $0xfffffffc,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"abcd\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 97
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @_exit(i32 -1)
unreachable
10: ; preds = %0
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 98
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 @_exit(i32 -2)
unreachable
18: ; preds = %10
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 99
br i1 %23, label %24, label %26
24: ; preds = %18
%25 = call i32 @_exit(i32 -3)
unreachable
26: ; preds = %18
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i64 3
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 100
br i1 %31, label %32, label %34
32: ; preds = %26
%33 = call i32 @_exit(i32 -4)
unreachable
34: ; preds = %26
%35 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int check(int);
int invoke(int *pi) { return check(*pi); }


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

x86 assembly (clang, -O2):
<invoke>:
mov    (%rdi),%edi
jmp    1030 <check@plt>

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

LLVM IR (-O2):
define i32 @invoke(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @check(i32 %2)
ret i32 %3
}
void __attribute__((weak)) dac_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dac_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dac_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dac_isr = [8 x i8] c"dac_isr\00"
define weak void @dac_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.dac_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dac_isr = [8 x i8] c"dac_isr\00"
define weak void @dac_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.dac_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: "
                  "imagedump options <image filename> ...\n"
                  " -v              Print version info and exit\n"
                  " -d              Turn on progressive levels of detail\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [146 x i8] c"usage: imagedump options <image filename> ...\0A -v Print version info and exit\0A -d Turn on progressive levels of detail\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [146 x i8] c"usage: imagedump options <image filename> ...\0A -v Print version info and exit\0A -d Turn on progressive levels of detail\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void _internal() {}


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

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

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

LLVM IR (-O2):
define void @_internal() {
ret void
}
/* Variables and functions */
scalar_t__ inb(int);
int /*<<< orphan*/ outb(unsigned char, int);
void __console_tx_byte(unsigned char byte) {
  while (inb(0x3f8 + 0x05))
    ;
  outb(byte, 0x3f8 + 0x00);
}


x86 assembly (clang, -O0):
<__console_tx_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3fd,%edi
call   1040 <inb@plt>
cmp    $0x0,%rax
je     1147 <__console_tx_byte+0x27>
jmp    112e <__console_tx_byte+0xe>
mov    $0x3f8,%esi
movzbl -0x1(%rbp),%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_byte>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3fd,%edi
call   1040 <inb@plt>
test   %rax,%rax
jne    1130 <__console_tx_byte+0x10>
movzbl %bl,%edi
mov    $0x3f8,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @__console_tx_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %6, %1
%4 = call i64 @inb(i32 1021)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
br label %3
7: ; preds = %3
%8 = load i8, i8* %2
%9 = call i32 @outb(i8 zeroext %8, i32 1016)
ret void
}

LLVM IR (-O2):
define void @__console_tx_byte(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @inb(i32 1021)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
%6 = tail call i32 @outb(i8 zeroext %0, i32 1016)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef unsigned long uint32_t;

/* Variables and functions */
void AESLengthSet(uint32_t ui32Base, uint64_t ui64Length) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000054))) =
      (uint32_t)(ui64Length);
  (*((volatile unsigned long *)(ui32Base + 0x00000058))) =
      (uint32_t)(ui64Length >> 32);
}


x86 assembly (clang, -O0):
<AESLengthSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x54(%rax)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x58(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESLengthSet>:
movslq %esi,%rax
mov    %rax,0x54(%rdi)
ret

LLVM IR (-O0):
define void @AESLengthSet(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = load i64, i64* %3
%8 = add i64 %7, 84
%9 = inttoptr i64 %8 to i64*
store volatile i64 %6, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 32
%12 = sext i32 %11 to i64
%13 = load i64, i64* %3
%14 = add i64 %13, 88
%15 = inttoptr i64 %14 to i64*
store volatile i64 %12, i64* %15
ret void
}

LLVM IR (-O2):
define void @AESLengthSet(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = add i64 %0, 84
%5 = inttoptr i64 %4 to i64*
store volatile i64 %3, i64* %5
%6 = add i64 %0, 88
%7 = inttoptr i64 %6 to i64*
store volatile i64 poison, i64* %7
ret void
}
void fim() {}


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

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

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

LLVM IR (-O2):
define void @fim() {
ret void
}
void CopyString(char acSource[], char acDestination[]) {
  unsigned char ucCurrentPosition;
  for (ucCurrentPosition = 0;; ucCurrentPosition++) {
    acDestination[ucCurrentPosition] = acSource[ucCurrentPosition];
    if (0 == acSource[ucCurrentPosition])
      break;
  }
}


x86 assembly (clang, -O0):
<CopyString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movzbl -0x11(%rbp),%ecx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movzbl -0x11(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movzbl -0x11(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1141 <CopyString+0x41>
jmp    1153 <CopyString+0x53>
jmp    1146 <CopyString+0x46>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1110 <CopyString+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyString>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %al,%ecx
movzbl (%rdi,%rcx,1),%eax
mov    %al,(%rsi,%rcx,1)
mov    %ecx,%eax
add    $0x1,%al
cmpb   $0x0,(%rdi,%rcx,1)
jne    1110 <CopyString+0x10>
ret

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

LLVM IR (-O2):
define void @CopyString(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8 [ 0, %2 ], [ %11, %3 ]
%5 = zext i8 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 %7, i8* %8
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
%11 = add i8 %4, 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret void
}
void estat_expedient() {}


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

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

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

LLVM IR (-O2):
define void @estat_expedient() {
ret void
}
int int_identity(int x) { return x; }


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

x86 assembly (clang, -O2):
<int_identity>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_identity(i32 returned %0) {
ret i32 %0
}
void send_unstructured_vdm_message(void *data, int cmd) {}


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

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

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

LLVM IR (-O2):
define void @send_unstructured_vdm_message(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *Cmalloc(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<Cmalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @Cmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ _(char *);
int /*<<< orphan*/ pz_do_dialog(int /*<<< orphan*/, char const *,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void pz_message(const char *text) {
  pz_do_dialog(_("Information"), text, _("Ok"), 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<pz_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <_@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xec2(%rip),%rdi
call   1040 <_@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <pz_do_dialog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pz_message>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed3(%rip),%rdi
call   1040 <_@plt>
mov    %eax,%ebp
lea    0xed1(%rip),%rdi
call   1040 <_@plt>
movl   $0x0,(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <pz_do_dialog@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Information\00"
@.str.1 = [3 x i8] c"Ok\00"
define void @pz_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @_(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @_(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @pz_do_dialog(i32 %3, i8* %4, i32 %5, i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Information\00"
@.str.1 = [3 x i8] c"Ok\00"
define void @pz_message(i8* %0) {
%2 = tail call i32 @_(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @_(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @pz_do_dialog(i32 %2, i8* %0, i32 %3, i32 0, i32 0, i32 0, i32 0)
ret void
}
void SIO1pause() {}


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

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

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

LLVM IR (-O2):
define void @SIO1pause() {
ret void
}
int backlight_dummy_max_brightness(struct backlight *b) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.backlight = type opaque
define i32 @backlight_dummy_max_brightness(%struct.backlight* nocapture readnone %0) {
ret i32 0
}
_Bool QuietGreater(double f1, double f2) { return __builtin_isgreater(f1, f2); }


x86 assembly (clang, -O0):
<QuietGreater>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietGreater>:
ucomisd %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietGreater(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietGreater(double %0, double %1) {
%3 = fcmp ogt double %0, %1
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int BMI_sockio_new_sock() {
  return (socket(AF_INET, SOCK_STREAM, IPPROTO_TCP));
}


x86 assembly (clang, -O0):
<BMI_sockio_new_sock>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BMI_sockio_new_sock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@IPPROTO_TCP = global i32 0
define i32 @BMI_sockio_new_sock() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = load i32, i32* @IPPROTO_TCP
%4 = call i32 @socket(i32 %1, i32 %2, i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@IPPROTO_TCP = global i32 0
define i32 @BMI_sockio_new_sock() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = load i32, i32* @IPPROTO_TCP
%4 = tail call i32 @socket(i32 %1, i32 %2, i32 %3)
ret i32 %4
}
int local(char c) {
  char cs[6];
  for (int i = 0; i < 6; i++)
    cs[i] = c;
  return cs[0];
}


x86 assembly (clang, -O0):
<local>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1134 <local+0x34>
mov    -0x1(%rbp),%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x7(%rbp,%rax,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <local+0x11>
movsbl -0x7(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<local>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @local(i8 signext %0) {
%2 = alloca i8
%3 = alloca [6 x i8]
%4 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i8, i8* %2
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 %11
store i8 %9, i8* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %5
16: ; preds = %5
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @local(i8 signext %0) {
%2 = sext i8 %0 to i32
ret i32 %2
}