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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
void createFile(char *pValidFilePath) {
  printf("start createFile() Function\n");
  FILE *TheFile;
  TheFile = fopen(pValidFilePath, "w+b");
  fclose(TheFile);
  printf("end createFile() Function\n");
}


x86 assembly (clang, -O0):
<createFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createFile>:
push   %rbx
mov    %rdi,%rbx
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <fopen@plt>
mov    %rax,%rdi
call   1040 <fclose@plt>
lea    0xec2(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"start createFile() Function\0A\00"
@.str.1 = [4 x i8] c"w+b\00"
@.str.2 = [27 x i8] c"end createFile() Function\0A\00"
define void @createFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @fclose(i32* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"w+b\00"
@str = [28 x i8] c"start createFile() Function\00"
@str.3 = [26 x i8] c"end createFile() Function\00"
define void @createFile(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @fclose(i32* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int LINES;
int winrows() { return LINES; }


x86 assembly (clang, -O0):
<winrows>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<winrows>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@LINES = global i32 0
define i32 @winrows() {
%1 = load i32, i32* @LINES
ret i32 %1
}

LLVM IR (-O2):
@LINES = global i32 0
define i32 @winrows() {
%1 = load i32, i32* @LINES
ret i32 %1
}
/* Variables and functions */
float getTimeForBinarySearch(int *, int, int);
int /*<<< orphan*/ printf(char *, float);
void generateBinarySearch(int left, int right) {
  int arr[2500], value;
  float time;
  time = getTimeForBinarySearch(arr, left, right);
  printf("%-10.4f", time);
}


x86 assembly (clang, -O0):
<generateBinarySearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x2720(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <getTimeForBinarySearch@plt>
movss  %xmm0,-0x2728(%rbp)
ff
movss  -0x2728(%rbp),%xmm0
ff
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateBinarySearch>:
sub    $0x2718,%rsp
mov    %esi,%edx
mov    %edi,%esi
mov    %rsp,%rdi
call   1040 <getTimeForBinarySearch@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x2718,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%-10.4f\00"
define void @generateBinarySearch(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2500 x i32]
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = getelementptr inbounds [2500 x i32], [2500 x i32]* %5, i64 0, i64 0
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call float @getTimeForBinarySearch(i32* %8, i32 %9, i32 %10)
store float %11, float* %7
%12 = load float, float* %7
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %12)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%-10.4f\00"
define void @generateBinarySearch(i32 %0, i32 %1) {
%3 = alloca [2500 x i32]
%4 = bitcast [2500 x i32]* %3 to i8*
%5 = getelementptr inbounds [2500 x i32], [2500 x i32]* %3, i64 0, i64 0
%6 = call float @getTimeForBinarySearch(i32* %5, i32 %0, i32 %1)
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %6)
ret void
}
int GetMin(int a, int b) { return (a > b) ? b : a; }


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

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

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

LLVM IR (-O2):
define i32 @GetMin(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
long fooi(long x) { return -(x == 0); }


x86 assembly (clang, -O0):
<fooi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooi>:
cmp    $0x1,%rdi
sbb    %rax,%rax
ret

LLVM IR (-O0):
define i64 @fooi(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = sub nsw i32 0, %5
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @fooi(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = sext i1 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ a_0_55(int, char *);
void a_0_58(void) {
  { a_0_55(((((35)))), ": ?"); }
}


x86 assembly (clang, -O0):
<a_0_58>:
push   %rbp
mov    %rsp,%rbp
mov    $0x23,%edi
lea    0xee0(%rip),%rsi
call   1030 <a_0_55@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_0_58>:
lea    0xee9(%rip),%rsi
mov    $0x23,%edi
jmp    1030 <a_0_55@plt>

LLVM IR (-O0):
@.str = [4 x i8] c": ?\00"
define void @a_0_58() {
%1 = call i32 @a_0_55(i32 35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c": ?\00"
define void @a_0_58() {
%1 = tail call i32 @a_0_55(i32 35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
const char *fpp_config_get_plugin_file_name(void) { return ""; }


x86 assembly (clang, -O0):
<fpp_config_get_plugin_file_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @fpp_config_get_plugin_file_name() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @fpp_config_get_plugin_file_name() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("(getchar() !=EOF) = %d\n", (getchar() != EOF));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"(getchar() !=EOF) = %d\0A\00"
@EOF = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i64 (...) @getchar()
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"(getchar() !=EOF) = %d\0A\00"
@EOF = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void writeLog(FILE *fp, char *str) { fprintf(fp, "%s", str); }


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

x86 assembly (clang, -O2):
<writeLog>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
define void @writeLog(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fputs(i8* %1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, unsigned int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ readInput(char *, unsigned int);
void readWrapper(char *buff, unsigned int maxLen) {
  memset(buff, 0, maxLen);
  if (!readInput(buff, maxLen)) {
    printf("Read Error. Exiting\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<readWrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <readInput@plt>
cmp    $0x0,%eax
jne    118c <readWrapper+0x4c>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readWrapper>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %esi,%esi
mov    %ebp,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <readInput@plt>
test   %eax,%eax
je     1166 <readWrapper+0x26>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe93(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Read Error. Exiting\0A\00"
@EXIT_FAILURE = global i32 0
define void @readWrapper(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @memset(i8* %5, i32 0, i32 %6)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @readInput(i8* %8, i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [20 x i8] c"Read Error. Exiting\00"
define void @readWrapper(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
%4 = tail call i32 @readInput(i8* %0, i32 %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret void
}
/* Type definitions */
struct dhcpmsg {
  int dummy;
};

/* Variables and functions */
size_t add_option_string(struct dhcpmsg *, int, char const *, int);
size_t add_option_request_list(struct dhcpmsg *packet) {
  static const char reqdata[] = {
      0x01, 0x03, 0x06, 0x0c, 0x0f, 0x1c,
  };
  return add_option_string(packet, 0x37, reqdata, sizeof reqdata);
}


x86 assembly (clang, -O0):
<add_option_request_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x37,%esi
lea    0xed4(%rip),%rdx
mov    $0x6,%ecx
call   1030 <add_option_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_option_request_list>:
lea    0xee9(%rip),%rdx
mov    $0x37,%esi
mov    $0x6,%ecx
jmp    1030 <add_option_string@plt>

LLVM IR (-O0):
%struct.dhcpmsg = type { i32 }
@add_option_request_list.reqdata = internal constant [6 x i8] c"\01\03\06\0C\0F\1C"
define i64 @add_option_request_list(%struct.dhcpmsg* %0) {
%2 = alloca %struct.dhcpmsg*
store %struct.dhcpmsg* %0, %struct.dhcpmsg** %2
%3 = load %struct.dhcpmsg*, %struct.dhcpmsg** %2
%4 = call i64 @add_option_string(%struct.dhcpmsg* %3, i32 55, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @add_option_request_list.reqdata, i64 0, i64 0), i32 6)
ret i64 %4
}

LLVM IR (-O2):
%struct.dhcpmsg = type { i32 }
@add_option_request_list.reqdata = internal constant [6 x i8] c"\01\03\06\0C\0F\1C"
define i64 @add_option_request_list(%struct.dhcpmsg* %0) {
%2 = tail call i64 @add_option_string(%struct.dhcpmsg* %0, i32 55, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @add_option_request_list.reqdata, i64 0, i64 0), i32 6)
ret i64 %2
}
/* Variables and functions */
int strcmp(char *, char *);
int key_cmp_str(char *old, char *new) { return strcmp(new, old); }


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

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

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

LLVM IR (-O2):
define i32 @key_cmp_str(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
ret i32 %3
}
float m_max(float value_a, float value_b) {
  if (value_a > value_b)
    return value_a;
  return value_b;
}


x86 assembly (clang, -O0):
<m_max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    112c <m_max+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1136 <m_max+0x36>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_max>:
maxss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @m_max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
int skip_to_newline(char *input, int offset) {
  while (input[offset] != 10) {
    offset++;
  }
  return ++offset;
}


x86 assembly (clang, -O0):
<skip_to_newline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     112e <skip_to_newline+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <skip_to_newline+0xb>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_to_newline>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0xa,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <skip_to_newline+0x10>
ret

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

LLVM IR (-O2):
define i32 @skip_to_newline(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %9, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
%9 = add i64 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
%12 = add nsw i32 %11, 1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ create_perf_event();
void start_data_dirty_capture(void) { create_perf_event(); }


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

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

LLVM IR (-O0):
define void @start_data_dirty_capture() {
%1 = call i32 (...) @create_perf_event()
ret void
}

LLVM IR (-O2):
define void @start_data_dirty_capture() {
%1 = tail call i32 (...) @create_perf_event()
ret void
}
void *_MarkAllocaS(void *ptr, unsigned int marker) { return ptr; }


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

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

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

LLVM IR (-O2):
define i8* @_MarkAllocaS(i8* readnone returned %0, i32 %1) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int num1 = 10, num2 = 20;
  printf("Initially: num1 = %d, num2 = %d\n", num1, num2);
  num1 = num1 + num2;
  num2 = num1 - num2;
  num1 = num1 - num2;
  printf("Finally: num1 = %d, num2 = %d\n", num1, num2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec1(%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
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Initially: num1 = %d, num2 = %d\0A\00"
@.str.1 = [31 x i8] c"Finally: num1 = %d, num2 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 10, i32* %1
store i32 20, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %2
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Initially: num1 = %d, num2 = %d\0A\00"
@.str.1 = [31 x i8] c"Finally: num1 = %d, num2 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 10, i32 20)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 10)
ret i32 0
}
int ledf2(double a, double b) { return a <= b; }


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

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

LLVM IR (-O0):
define i32 @ledf2(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 ole double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ledf2(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void err_empty() {
  printf("Array is empty!\n");
  system("pause");
}


x86 assembly (clang, -O0):
<err_empty>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_empty>:
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Array is empty!\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define void @err_empty() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@str = [16 x i8] c"Array is empty!\00"
define void @err_empty() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void encode(char *in __attribute__((__unused__)),
            char *out __attribute__((__unused__)),
            int count __attribute__((__unused__))) {}


x86 assembly (clang, -O0):
<encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @encode(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
double ls_cost_nm7_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<ls_cost_nm7_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <ls_cost_nm7_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <ls_cost_nm7_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <ls_cost_nm7_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <ls_cost_nm7_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm7_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ls_cost_nm7_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @ls_cost_nm7_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
void gtk_rc_style_get_type() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @SSMR3PutStruct() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void tef_xml_rd_deinit(void) { xml_deinit(); }


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

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

LLVM IR (-O0):
define void @tef_xml_rd_deinit() {
%1 = call i32 (...) @xml_deinit()
ret void
}

LLVM IR (-O2):
define void @tef_xml_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
int builtin_cmd(char **argv) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @builtin_cmd(i8** nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct mymsg {
  int dummy;
};

/* Variables and functions */
scalar_t__ malloc(int);
struct mymsg *mallocmymsg(int len) {
  return (struct mymsg *)malloc(len);
}


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

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

LLVM IR (-O0):
%struct.mymsg = type { i32 }
define %struct.mymsg* @mallocmymsg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to %struct.mymsg*
ret %struct.mymsg* %5
}

LLVM IR (-O2):
%struct.mymsg = type { i32 }
define %struct.mymsg* @mallocmymsg(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to %struct.mymsg*
ret %struct.mymsg* %3
}
unsigned int Divide(unsigned int Dividend, int Divisor) {
  unsigned int Temp;
  unsigned int i;
  i = 0;
  Temp = Dividend;
  while (Temp >= Divisor) {
    Temp -= Divisor;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<Divide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jb     113c <Divide+0x3c>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1117 <Divide+0x17>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Divide>:
xor    %eax,%eax
cmp    %esi,%edi
jb     1119 <Divide+0x19>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
sub    %esi,%edi
add    $0x1,%eax
cmp    %esi,%edi
jae    1110 <Divide+0x10>
ret

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

LLVM IR (-O2):
define i32 @Divide(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = sub i32 %6, %1
%8 = add i32 %5, 1
%9 = icmp ult i32 %7, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %11
}
void print_indent(n) int n;
{
  while (n-- > 0)
    printf(" ");
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1142 <print_indent+0x32>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    111b <print_indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %rbx
test   %edi,%edi
jle    1132 <print_indent+0x22>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <print_indent+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_indent(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i32 32)
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_compositor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_destroy(struct wl_proxy *);
void wl_compositor_destroy(struct wl_compositor *wl_compositor) {
  wl_proxy_destroy((struct wl_proxy *)wl_compositor);
}


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

x86 assembly (clang, -O2):
<wl_compositor_destroy>:
jmp    1030 <wl_proxy_destroy@plt>

LLVM IR (-O0):
%struct.wl_compositor = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_compositor_destroy(%struct.wl_compositor* %0) {
%2 = alloca %struct.wl_compositor*
store %struct.wl_compositor* %0, %struct.wl_compositor** %2
%3 = load %struct.wl_compositor*, %struct.wl_compositor** %2
%4 = bitcast %struct.wl_compositor* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_destroy(%struct.wl_proxy* %4)
ret void
}

LLVM IR (-O2):
%struct.wl_compositor = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_compositor_destroy(%struct.wl_compositor* %0) {
%2 = bitcast %struct.wl_compositor* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_destroy(%struct.wl_proxy* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings(void *, char *,
                                                            char *);
int /*<<< orphan*/ printf(char *, unsigned int);
void UpnpMediaRenderer_AVTransport_GetTransportSettings(
    void *upnptoken, unsigned int InstanceID) {
  printf("Invoke: UpnpMediaRenderer_AVTransport_GetTransportSettings(%u);\r\n",
         InstanceID);
  UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings(
      upnptoken, "Sample String", "Sample String");
}


x86 assembly (clang, -O0):
<UpnpMediaRenderer_AVTransport_GetTransportSettings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef9(%rip),%rdx
mov    %rdx,%rsi
call   1030 <UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpMediaRenderer_AVTransport_GetTransportSettings>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0b(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
pop    %rbx
jmp    1030 <UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"Invoke: UpnpMediaRenderer_AVTransport_GetTransportSettings(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpMediaRenderer_AVTransport_GetTransportSettings(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"Invoke: UpnpMediaRenderer_AVTransport_GetTransportSettings(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpMediaRenderer_AVTransport_GetTransportSettings(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UpnpResponse_MediaRenderer_AVTransport_GetTransportSettings(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int FILENAME_MAX;
int /*<<< orphan*/ get_property(char const *, char const *, char *,
                                char const *);
char *realpath2(char *, char *);
char *get_property_fname(const char *filename, const char *propname,
                         char *buffer, const char *def) {
  char tmp[FILENAME_MAX];
  get_property(filename, propname, tmp, def);
  return realpath2(tmp, buffer);
}


x86 assembly (clang, -O0):
<get_property_fname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
call   1040 <get_property@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <realpath2@plt>
mov    -0x28(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_property_fname>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdx
call   1040 <get_property@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <realpath2@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@FILENAME_MAX = global i32 0
define i8* @get_property_fname(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i32, i32* @FILENAME_MAX
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %9
%14 = alloca i8, i64 %12
store i64 %12, i64* %10
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = load i8*, i8** %8
%18 = call i32 @get_property(i8* %15, i8* %16, i8* %14, i8* %17)
%19 = load i8*, i8** %7
%20 = call i8* @realpath2(i8* %14, i8* %19)
%21 = load i8*, i8** %9
ret i8* %20
}

LLVM IR (-O2):
@FILENAME_MAX = global i32 0
define i8* @get_property_fname(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = load i32, i32* @FILENAME_MAX
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = call i32 @get_property(i8* %0, i8* %1, i8* %7, i8* %3)
%9 = call i8* @realpath2(i8* %7, i8* %2)
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_ex_free(int /*<<< orphan*/ **,
                                     int /*<<< orphan*/ const *);
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it) {
  ASN1_item_ex_free(&val, it);
}


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

x86 assembly (clang, -O2):
<ASN1_item_free>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <ASN1_item_ex_free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @ASN1_item_free(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 = call i32 @ASN1_item_ex_free(i32** %3, i32* %5)
ret void
}

LLVM IR (-O2):
define void @ASN1_item_free(i32* %0, i32* %1) {
%3 = alloca i32*
store i32* %0, i32** %3
%4 = call i32 @ASN1_item_ex_free(i32** %3, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setAmSnrRssi(unsigned short, unsigned short);
int /*<<< orphan*/ si475xAMRX_initialize();
void si47xxAMRX_initialize(int rssi, int snr) {
  setAmSnrRssi((unsigned short)rssi, (unsigned short)snr);
  si475xAMRX_initialize();
}


x86 assembly (clang, -O0):
<si47xxAMRX_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,%cx
mov    -0x8(%rbp),%eax
movzwl %cx,%edi
movzwl %ax,%esi
call   1030 <setAmSnrRssi@plt>
mov    $0x0,%al
call   1040 <si475xAMRX_initialize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si47xxAMRX_initialize>:
push   %rax
movzwl %di,%edi
movzwl %si,%esi
call   1030 <setAmSnrRssi@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <si475xAMRX_initialize@plt>

LLVM IR (-O0):
define void @si47xxAMRX_initialize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = trunc i32 %5 to i16
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i16
%9 = call i32 @setAmSnrRssi(i16 zeroext %6, i16 zeroext %8)
%10 = call i32 (...) @si475xAMRX_initialize()
ret void
}

LLVM IR (-O2):
define void @si47xxAMRX_initialize(i32 %0, i32 %1) {
%3 = trunc i32 %0 to i16
%4 = trunc i32 %1 to i16
%5 = tail call i32 @setAmSnrRssi(i16 zeroext %3, i16 zeroext %4)
%6 = tail call i32 (...) @si475xAMRX_initialize()
ret void
}
getval(p, p_argt) char *p;
char *p_argt;
{
  p = skipwd(p);
  p = skipbl(p);
  *p_argt = *p;
  if ((*p == '+') || (*p == '-'))
    ++p;
  return (ctod(p));
}


x86 assembly (clang, -O0):
<getval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <skipwd@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <skipbl@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     118e <getval+0x5e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    119a <getval+0x6a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <ctod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getval>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <skipwd@plt>
movslq %eax,%rdi
xor    %eax,%eax
call   1040 <skipbl@plt>
movslq %eax,%rdi
mov    (%rdi),%al
mov    %al,(%rbx)
mov    (%rdi),%al
cmp    $0x2d,%al
je     1156 <getval+0x26>
cmp    $0x2b,%al
jne    115a <getval+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <ctod@plt>

LLVM IR (-O0):
define i32 @getval(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 = call i32 (i8*, ...) bitcast (i32 (...)* @skipwd to i32 (i8*, ...)*)(i8* %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @skipbl to i32 (i8*, ...)*)(i8* %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = load i8*, i8** %4
store i8 %14, i8* %15
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 43
br i1 %19, label %25, label %20
20: ; preds = %2
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 45
br i1 %24, label %25, label %28
25: ; preds = %20, %2
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %3
br label %28
28: ; preds = %25, %20
%29 = load i8*, i8** %3
%30 = call i32 (i8*, ...) bitcast (i32 (...)* @ctod to i32 (i8*, ...)*)(i8* %29)
ret i32 %30
}

LLVM IR (-O2):
define i32 @getval(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @skipwd to i32 (i8*, ...)*)(i8* %0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @skipbl to i32 (i8*, ...)*)(i8* %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = load i8, i8* %8
store i8 %9, i8* %1
%10 = load i8, i8* %8
switch i8 %10, label %13 [
i8 43, label %11
i8 45, label %11
]
11: ; preds = %2, %2
%12 = getelementptr inbounds i8, i8* %8, i64 1
br label %13
13: ; preds = %2, %11
%14 = phi i8* [ %12, %11 ], [ %8, %2 ]
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ctod to i32 (i8*, ...)*)(i8* %14)
ret i32 %15
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
void set_XKeyEvent_x(void *_p, int _v) { ((XKeyEvent *)_p)->x = (int)_v; }


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

x86 assembly (clang, -O2):
<set_XKeyEvent_x>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeyEvent_x(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
float toFloat_float(float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @toFloat_float(float returned %0) {
ret float %0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int);
void fprint_anl_data_to_direct(FILE *stream, uint8_t direct, uint8_t data) {
  fprintf(stream,
          "ANL   "
          "0x%02X"
          ", #"
          "0x%02X"
          "               ",
          direct, data);
}


x86 assembly (clang, -O0):
<fprint_anl_data_to_direct>:
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),%edx
mov    -0x10(%rbp),%ecx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_anl_data_to_direct>:
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"ANL 0x%02X,x%02X \00"
define void @fprint_anl_data_to_direct(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 = load i32, i32* %6
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"ANL 0x%02X,x%02X \00"
define void @fprint_anl_data_to_direct(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ getpgid(int /*<<< orphan*/);
pid_t getpgrp(void) { return getpgid(0); }


x86 assembly (clang, -O0):
<getpgrp>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <getpgid@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpgrp>:
xor    %edi,%edi
jmp    1030 <getpgid@plt>

LLVM IR (-O0):
define i32 @getpgrp() {
%1 = call i32 @getpgid(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpgrp() {
%1 = tail call i32 @getpgid(i32 0)
ret i32 %1
}