xunge/DecIR huggingface dataset:
int main(void) {
  int a = 0;
  do {
    continue;
  } while (a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    1117 <main+0x17>
cmpl   $0x0,-0x8(%rbp)
jne    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int thread_parent_task_can_contiue(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @thread_parent_task_can_contiue() {
ret i32 1
}

LLVM IR (-O2):
define i32 @thread_parent_task_can_contiue() {
ret i32 1
}
void *__attribute__((noclone, no)) test_builtin_frame_address(unsigned i) {
  void *const fa[] = {__builtin_frame_address(0), __builtin_frame_address(1),
                      __builtin_frame_address(2), __builtin_frame_address(3),
                      __builtin_frame_address(4)};
  return fa[i];
}


x86 assembly (clang, -O0):
<test_builtin_frame_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rbp,%rax
mov    %rax,-0x30(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    %rbp,%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x30(%rbp,%rax,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_frame_address>:
push   %rbp
mov    %rsp,%rbp
mov    %rbp,-0x30(%rbp)
mov    0x0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    %edi,%eax
mov    -0x30(%rbp,%rax,8),%rax
pop    %rbp
ret

LLVM IR (-O0):
define i8* @test_builtin_frame_address(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i8*]
store i32 %0, i32* %2
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i64 0, i64 0
%5 = call i8* @llvm.frameaddress.p0i8(i32 0)
store i8* %5, i8** %4
%6 = getelementptr inbounds i8*, i8** %4, i64 1
%7 = call i8* @llvm.frameaddress.p0i8(i32 1)
store i8* %7, i8** %6
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = call i8* @llvm.frameaddress.p0i8(i32 2)
store i8* %9, i8** %8
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = call i8* @llvm.frameaddress.p0i8(i32 3)
store i8* %11, i8** %10
%12 = getelementptr inbounds i8*, i8** %10, i64 1
%13 = call i8* @llvm.frameaddress.p0i8(i32 4)
store i8* %13, i8** %12
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i64 0, i64 %15
%17 = load i8*, i8** %16
ret i8* %17
}

LLVM IR (-O2):
define i8* @test_builtin_frame_address(i32 %0) {
%2 = alloca [5 x i8*]
%3 = bitcast [5 x i8*]* %2 to i8*
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
%5 = tail call i8* @llvm.frameaddress.p0i8(i32 0)
store i8* %5, i8** %4
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 1
%7 = tail call i8* @llvm.frameaddress.p0i8(i32 1)
store i8* %7, i8** %6
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 2
%9 = tail call i8* @llvm.frameaddress.p0i8(i32 2)
store i8* %9, i8** %8
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 3
%11 = tail call i8* @llvm.frameaddress.p0i8(i32 3)
store i8* %11, i8** %10
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 4
%13 = tail call i8* @llvm.frameaddress.p0i8(i32 4)
store i8* %13, i8** %12
%14 = zext i32 %0 to i64
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %14
%16 = load i8*, i8** %15
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int syntax(char *argv[]) {
  fprintf(stderr, "syntax: %s <pftw|nftw> <directory>\n", argv[0]);
  return -1;
}


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syntax>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xedc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"syntax: %s <pftw|nftw> <directory>\0A\00"
define i32 @syntax(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"syntax: %s <pftw|nftw> <directory>\0A\00"
define i32 @syntax(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, char const *, int);
float readFloatFromByteArray(const char *byteArray, const int offset) {
  float val;
  memcpy(&val, byteArray + offset, sizeof(float));
  return val;
}


x86 assembly (clang, -O0):
<readFloatFromByteArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
lea    -0x10(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFloatFromByteArray>:
push   %rax
movslq %esi,%rsi
add    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @readFloatFromByteArray(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca float
store i8* %0, i8** %3
store i32 %1, i32* %4
%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 = call i32 @memcpy(float* %5, i8* %9, i32 4)
%11 = load float, float* %5
ret float %11
}

LLVM IR (-O2):
define float @readFloatFromByteArray(i8* %0, i32 %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = call i32 @memcpy(float* %3, i8* %6, i32 4)
%8 = load float, float* %3
ret float %8
}
__typeof__(toupper("")) test_toupper_80(void) { return toupper(""); }


x86 assembly (clang, -O0):
<test_toupper_80>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rax
mov    %eax,%edi
call   1030 <toupper@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_toupper_80() {
%1 = call i32 @toupper(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_toupper_80() {
%1 = tail call i32 @toupper(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}
void uniphier_board_late_init(void) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<uniphier_board_late_init>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <uniphier_board_late_init+0x9>
jmp    110e <uniphier_board_late_init+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @uniphier_board_late_init() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ readl(void *);
uint32_t read_pxpat0s(unsigned port) {
  return readl((void *)0xb0010000 + (port * 0x100) + (0x44));
}


x86 assembly (clang, -O0):
<read_pxpat0s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%edi
add    %rax,%rdi
add    $0x44,%rdi
call   1030 <readl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_pxpat0s>:
shl    $0x8,%edi
mov    $0xb0010044,%eax
add    %rax,%rdi
jmp    1030 <readl@plt>

LLVM IR (-O0):
define i32 @read_pxpat0s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 256
%5 = zext i32 %4 to i64
%6 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %5
%7 = getelementptr i8, i8* %6, i64 68
%8 = call i32 @readl(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @read_pxpat0s(i32 %0) {
%2 = shl i32 %0, 8
%3 = zext i32 %2 to i64
%4 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %3
%5 = getelementptr i8, i8* %4, i64 68
%6 = tail call i32 @readl(i8* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ nxtFillRect(int, int, int, int);
void drawP() {
  nxtFillRect(4, 34, 12, 21);
  nxtFillRect(10, 50, 21, 47);
  nxtFillRect(4, 43, 7, 35);
}


x86 assembly (clang, -O0):
<drawP>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x22,%esi
mov    $0xc,%edx
mov    $0x15,%ecx
call   1030 <nxtFillRect@plt>
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x15,%edx
mov    $0x2f,%ecx
call   1030 <nxtFillRect@plt>
mov    $0x4,%edi
mov    $0x2b,%esi
mov    $0x7,%edx
mov    $0x23,%ecx
call   1030 <nxtFillRect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawP>:
push   %rax
mov    $0x4,%edi
mov    $0x22,%esi
mov    $0xc,%edx
mov    $0x15,%ecx
call   1030 <nxtFillRect@plt>
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x15,%edx
mov    $0x2f,%ecx
call   1030 <nxtFillRect@plt>
mov    $0x4,%edi
mov    $0x2b,%esi
mov    $0x7,%edx
mov    $0x23,%ecx
pop    %rax
jmp    1030 <nxtFillRect@plt>

LLVM IR (-O0):
define void @drawP() {
%1 = call i32 @nxtFillRect(i32 4, i32 34, i32 12, i32 21)
%2 = call i32 @nxtFillRect(i32 10, i32 50, i32 21, i32 47)
%3 = call i32 @nxtFillRect(i32 4, i32 43, i32 7, i32 35)
ret void
}

LLVM IR (-O2):
define void @drawP() {
%1 = tail call i32 @nxtFillRect(i32 4, i32 34, i32 12, i32 21)
%2 = tail call i32 @nxtFillRect(i32 10, i32 50, i32 21, i32 47)
%3 = tail call i32 @nxtFillRect(i32 4, i32 43, i32 7, i32 35)
ret void
}
int identity(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @identity(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ to_stdout(char);
void print_str(char *s) {
  int i;
  i = 0;
  while (s[i] != '\0') {
    to_stdout(s[i]);
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <print_str+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <to_stdout@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_str+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_str>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print_str+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <to_stdout@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print_str+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @to_stdout(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void transform_mag_terminate(void) {}


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

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

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

LLVM IR (-O2):
define void @transform_mag_terminate() {
ret void
}
main() {
  union {
    unsigned char bytes[4];
    float f;
  } nun = {0, 0, 0xc0, 0x7f};
  return f(nun.f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movsd  0xee8(%rip),%xmm0
mov    $0x1,%al
jmp    1030 <f@plt>

LLVM IR (-O0):
%union.anon = type { float }
@__const.main.nun = { [4 x i8] } { [4 x i8] c"\00\00\C0\7F" }
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.anon
store i32 0, i32* %1
%3 = bitcast %union.anon* %2 to i8*
%4 = bitcast %union.anon* %2 to float*
%5 = load float, float* %4
%6 = fpext float %5 to double
%7 = call i32 (double, ...) bitcast (i32 (...)* @f to i32 (double, ...)*)(double %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (double, ...) bitcast (i32 (...)* @f to i32 (double, ...)*)(double 0x7FF8000000000000)
ret i32 %1
}
int getBufferSize() { return 32768; }


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

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

LLVM IR (-O0):
define i32 @getBufferSize() {
ret i32 32768
}

LLVM IR (-O2):
define i32 @getBufferSize() {
ret i32 32768
}
int ff1(x, y)
float x;
int y[];
{ x = y[0]; }


x86 assembly (clang, -O0):
<ff1>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ff1(double %0, i32* %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca i32*
%6 = fptrunc double %0 to float
store float %6, float* %4
store i32* %1, i32** %5
%7 = load i32*, i32** %5
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to float
store float %10, float* %4
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @ff1(double %0, i32* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_log_set_show_backtrace() {
  printf("NOT IMPLEMENTED:"
         "pa_log_set_show_backtrace"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"NOT IMPLEMENTED:pa_log_set_show_backtrace\0A\00"
define i32 @pa_log_set_show_backtrace() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_log_set_show_backtrace\00"
define i32 @pa_log_set_show_backtrace() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *progname) {
  printf("Usage: %s [-k KEYID] [-l bufsize ] [-d] [MESSAGE]\n"
         "    Log your messages.  If no message is given in the \n"
         "    argument list, log messages will be read from stdin.\n",
         progname);
  printf(" -k KEYID  : User-defined KEYID. Default: 0x%08X\n"
         " -l BUFSIZE: Buffer size. Default: %d K bytes\n"
         " -d        : clean up log buffer after finished logging\n",
         0x414e4547, 16);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
mov    $0x414e4547,%esi
mov    $0x10,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"Usage: %s [-k KEYID] [-l bufsize ] [-d] [MESSAGE]\0A Log your messages. If no message is given in the \0A argument list, log messages will be read from stdin.\0A\00"
@.str.1 = [152 x i8] c" -k KEYID : User-defined KEYID. Default: 0x%08X\0A -l BUFSIZE: Buffer size. Default: %d K bytes\0A -d : clean up log buffer after finished logging\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 1095648583, i32 16)
ret void
}

LLVM IR (-O2):
@.str = [163 x i8] c"Usage: %s [-k KEYID] [-l bufsize ] [-d] [MESSAGE]\0A Log your messages. If no message is given in the \0A argument list, log messages will be read from stdin.\0A\00"
@.str.1 = [152 x i8] c" -k KEYID : User-defined KEYID. Default: 0x%08X\0A -l BUFSIZE: Buffer size. Default: %d K bytes\0A -d : clean up log buffer after finished logging\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 1095648583, i32 16)
ret void
}
int __popcountsi2(int a) {
  int x = (int)a;
  x = x - ((x >> 1) & 0x55555555);
  x = ((x >> 2) & 0x33333333) + (x & 0x33333333);
  x = (x + (x >> 4)) & 0x0F0F0F0F;
  x = (x + (x >> 16));
  return (x + (x >> 8)) & 0x0000003F;
}


x86 assembly (clang, -O0):
<__popcountsi2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x1,%ecx
and    $0x55555555,%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x2,%eax
and    $0x33333333,%eax
mov    -0x8(%rbp),%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
add    %ecx,%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__popcountsi2>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
and    $0x33333333,%eax
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x8,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @__popcountsi2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = ashr i32 %6, 1
%8 = and i32 %7, 1431655765
%9 = sub nsw i32 %5, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = ashr i32 %10, 2
%12 = and i32 %11, 858993459
%13 = load i32, i32* %3
%14 = and i32 %13, 858993459
%15 = add nsw i32 %12, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = load i32, i32* %3
%18 = ashr i32 %17, 4
%19 = add nsw i32 %16, %18
%20 = and i32 %19, 252645135
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = load i32, i32* %3
%23 = ashr i32 %22, 16
%24 = add nsw i32 %21, %23
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = load i32, i32* %3
%27 = ashr i32 %26, 8
%28 = add nsw i32 %25, %27
%29 = and i32 %28, 63
ret i32 %29
}

LLVM IR (-O2):
define i32 @__popcountsi2(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub nsw i32 %0, %3
%5 = lshr i32 %4, 2
%6 = and i32 %5, 858993459
%7 = and i32 %4, 858993459
%8 = add nuw nsw i32 %6, %7
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 16
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 8
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
/* Variables and functions */
void *malloc(size_t);
void *__libc_malloc(size_t size) { return malloc(size); }


x86 assembly (clang, -O0):
<__libc_malloc>:
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):
<__libc_malloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @__libc_malloc(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* @__libc_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame = [50 x i8] c"SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame\00"
define void @SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__func__.SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame = [50 x i8] c"SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame\00"
define void @SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @__func__.SteamAPI_vr_IVRCompositor_ClearLastSubmittedFrame, i64 0, i64 0), i8* %0)
ret void
}
int square(int x) {
  int result;
  result = x * x;
  return result;
}


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

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

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

LLVM IR (-O2):
define i32 @square(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
char *concatenate(char *, char *, int, char const *, char *);
char *get_container_credentials_file(const char *work_dir) {
  return concatenate("%s/%s", "container credentials", 2, work_dir,
                     "container_tokens");
}


x86 assembly (clang, -O0):
<get_container_credentials_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0xed9(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x2,%edx
lea    0xee2(%rip),%r8
call   1030 <concatenate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_container_credentials_file>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xef4(%rip),%r8
mov    $0x2,%edx
jmp    1030 <concatenate@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [22 x i8] c"container credentials\00"
@.str.2 = [17 x i8] c"container_tokens\00"
define i8* @get_container_credentials_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@.str.1 = [22 x i8] c"container credentials\00"
@.str.2 = [17 x i8] c"container_tokens\00"
define i8* @get_container_credentials_file(i8* %0) {
%2 = tail call i8* @concatenate(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
scalar_t__ isdigit(int);
bool valid_numeral_char(char ch) { return isdigit((int)ch) || ch == ','; }


x86 assembly (clang, -O0):
<valid_numeral_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <valid_numeral_char+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x2c,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_numeral_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
cmp    $0x2c,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @valid_numeral_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 44
br label %11
11: ; preds = %7, %1
%12 = phi i1 [ true, %1 ], [ %10, %7 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @valid_numeral_char(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i64 @isdigit(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = icmp eq i8 %0, 44
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ perror(char *);
void udp_socket_close(int fd) {
  int rv;
  rv = close(fd);
  if (fd == -1) {
    perror("socket");
  }
}


x86 assembly (clang, -O0):
<udp_socket_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    114c <udp_socket_close+0x2c>
lea    0xeb9(%rip),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_socket_close>:
push   %rbx
mov    %edi,%ebx
call   1030 <close@plt>
cmp    $0xffffffff,%ebx
je     112f <udp_socket_close+0xf>
pop    %rbx
ret
lea    0xeca(%rip),%rdi
pop    %rbx
jmp    1040 <perror@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"socket\00"
define void @udp_socket_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printfunX(void *, void *);
void __attribute__((no_instrument_function))
__cyg_profile_func_exit(void *this_fn, void *call_site) {
  printfunX(this_fn, call_site);
}


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

x86 assembly (clang, -O2):
<__cyg_profile_func_exit>:
jmp    1030 <printfunX@plt>

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

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* %0, i8* %1) {
%3 = tail call i32 @printfunX(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M381_f(char *s) {
  debug("M381_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M381_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M381_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M381_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M381_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M381_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M381_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int dif_uart_byte_send_polled(const void *uart, uint8_t data) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ create_wam_areas(struct worker *);
struct worker *create_wam_storage();
int /*<<< orphan*/ local_init_each_time(struct worker *);
int /*<<< orphan*/ numstack_init(struct worker *);
struct worker *create_and_init_wam() {
  register struct worker *w;
  w = create_wam_storage();
  create_wam_areas(w);
  numstack_init(w);
  local_init_each_time(w);
  return w;
}


x86 assembly (clang, -O0):
<create_and_init_wam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <create_wam_storage@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <create_wam_areas@plt>
mov    -0x8(%rbp),%rdi
call   1050 <numstack_init@plt>
mov    -0x8(%rbp),%rdi
call   1060 <local_init_each_time@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_and_init_wam>:
push   %rbx
xor    %eax,%eax
call   1030 <create_wam_storage@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <create_wam_areas@plt>
mov    %rbx,%rdi
call   1050 <numstack_init@plt>
mov    %rbx,%rdi
call   1060 <local_init_each_time@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.worker = type { i32 }
define %struct.worker* @create_and_init_wam() {
%1 = alloca %struct.worker*
%2 = call %struct.worker* (...) @create_wam_storage()
store %struct.worker* %2, %struct.worker** %1
%3 = load %struct.worker*, %struct.worker** %1
%4 = call i32 @create_wam_areas(%struct.worker* %3)
%5 = load %struct.worker*, %struct.worker** %1
%6 = call i32 @numstack_init(%struct.worker* %5)
%7 = load %struct.worker*, %struct.worker** %1
%8 = call i32 @local_init_each_time(%struct.worker* %7)
%9 = load %struct.worker*, %struct.worker** %1
ret %struct.worker* %9
}

LLVM IR (-O2):
%struct.worker = type { i32 }
define %struct.worker* @create_and_init_wam() {
%1 = tail call %struct.worker* (...) @create_wam_storage()
%2 = tail call i32 @create_wam_areas(%struct.worker* %1)
%3 = tail call i32 @numstack_init(%struct.worker* %1)
%4 = tail call i32 @local_init_each_time(%struct.worker* %1)
ret %struct.worker* %1
}
void g_log_set_handler() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_epu8(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_subs_epu8(__m128i A, __m128i B) { return _mm_subs_epu8(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_subs_epu8>:
jmp    1030 <_mm_subs_epu8@plt>

LLVM IR (-O0):
define i32 @test_mm_subs_epu8(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 = call i32 @_mm_subs_epu8(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_subs_epu8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_epu8(i32 %0, i32 %1)
ret i32 %3
}
OP(fd, d0) {
  illegal_1();
  op_d0();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_d0@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_d0()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_d0()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dollars(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  char dest[20];
  char *src = "113213212";
  dollars(dest, src);
  puts(dest);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <dollars@plt>
lea    -0x30(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <dollars@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"113213212\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [20 x i8]
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%9 = load i8*, i8** %7
%10 = call i32 @dollars(i8* %8, i8* %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%12 = call i32 @puts(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"113213212\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @dollars(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @puts(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g_writeln(char *);
int key_gen(char *);
scalar_t__ key_gen_run_it();
int key_gen_auto(void) {
  if (key_gen_run_it()) {
    return key_gen("/etc/xrdp/rsakeys.ini");
  }
  g_writeln("xrdp-keygen does not need to run");
  return 0;
}


x86 assembly (clang, -O0):
<key_gen_auto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <key_gen_run_it@plt>
cmp    $0x0,%rax
je     115d <key_gen_auto+0x2d>
lea    0xeb0(%rip),%rdi
call   1030 <key_gen@plt>
mov    %eax,-0x4(%rbp)
jmp    1170 <key_gen_auto+0x40>
lea    0xeb2(%rip),%rdi
call   1040 <g_writeln@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_gen_auto>:
push   %rax
xor    %eax,%eax
call   1050 <key_gen_run_it@plt>
test   %rax,%rax
je     114a <key_gen_auto+0x1a>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1030 <key_gen@plt>
lea    0xec5(%rip),%rdi
call   1040 <g_writeln@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/etc/xrdp/rsakeys.ini\00"
@.str.1 = [33 x i8] c"xrdp-keygen does not need to run\00"
define i32 @key_gen_auto() {
%1 = alloca i32
%2 = call i64 (...) @key_gen_run_it()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @key_gen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = call i32 @g_writeln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [22 x i8] c"/etc/xrdp/rsakeys.ini\00"
@.str.1 = [33 x i8] c"xrdp-keygen does not need to run\00"
define i32 @key_gen_auto() {
%1 = tail call i64 (...) @key_gen_run_it()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @key_gen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @g_writeln(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ 0, %5 ]
ret i32 %8
}
int fvin_read(float *vecbuf, int veclen) {
  if (0)
    return -2;
  if (0)
    return -3;
  if (0)
    return -1;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @fvin_read(float* nocapture readnone %0, i32 %1) {
ret i32 0
}
void av_bitstream_filter_close() {}


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

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

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

LLVM IR (-O2):
define void @av_bitstream_filter_close() {
ret void
}
int mystrlen(char *s) {
  int i = 0;
  char *p = s;
  while (*p) {
    p++;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <mystrlen+0x3e>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <mystrlen+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

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


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

x86 assembly (clang, -O2):
<floating_point_bit_fields_message2_signal1_decode>:
cvtss2sd %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @floating_point_bit_fields_message2_signal1_decode(float %0) {
%2 = fpext float %0 to double
ret double %2
}
long long zuzs() { return 0x00007fff0000ffffLL; }


x86 assembly (clang, -O0):
<zuzs>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff0000ffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zuzs>:
movabs $0x7fff0000ffff,%rax
ret

LLVM IR (-O0):
define i64 @zuzs() {
ret i64 140733193453567
}

LLVM IR (-O2):
define i64 @zuzs() {
ret i64 140733193453567
}
int tolower(c)
register int c;
{
  if (c >= 'A' && c <= 'Z')
    c -= 'A' - 'a';
  return (c);
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1124 <tolower+0x24>
cmpl   $0x5a,-0x4(%rbp)
jg     1124 <tolower+0x24>
mov    -0x4(%rbp),%eax
sub    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, -32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
char *get_unit_type(unsigned char iunit, unsigned char ibase,
                    unsigned char imod, int flg) {
  return ("");
}


x86 assembly (clang, -O0):
<get_unit_type>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    %ecx,-0x8(%rbp)
lea    0xee0(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @get_unit_type(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i32 %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i32 %3, i32* %8
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* @get_unit_type(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i32 %3) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
void gtk_adjustment_get_type() {}


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

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

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

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