xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
scalar_t__ EINTR;
int /*<<< orphan*/ MSG_PEEK;
scalar_t__ errno;
int recv(int, void *, size_t, int /*<<< orphan*/);
ssize_t recv_peek(int sockfd, void *buf, size_t len) {
  while (1) {
    int ret = recv(sockfd, buf, len, MSG_PEEK);
    if (ret == -1 && errno == EINTR) {
      continue;
    }
    return ret;
  }
}


x86 assembly (clang, -O0):
<recv_peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
call   1030 <recv@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1168 <recv_peek+0x58>
mov    0x2e88(%rip),%rax
mov    (%rax),%rax
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    1168 <recv_peek+0x58>
jmp    1123 <recv_peek+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recv_peek>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r15
mov    0x2ea7(%rip),%r12
mov    0x2e98(%rip),%r13
nopl   0x0(%rax,%rax,1)
mov    (%r15),%ecx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <recv@plt>
cmp    $0xffffffff,%eax
jne    115f <recv_peek+0x4f>
mov    (%r12),%rcx
cmp    0x0(%r13),%rcx
je     1140 <recv_peek+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @recv_peek(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %8
8: ; preds = %3, %20
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i32, i32* @MSG_PEEK
%13 = call i32 @recv(i32 %9, i8* %10, i64 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %8
%17 = load i64, i64* @errno
%18 = load i64, i64* @EINTR
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
br label %8
21: ; preds = %16, %8
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@MSG_PEEK = global i32 0
@errno = global i64 0
@EINTR = global i64 0
define i32 @recv_peek(i32 %0, i8* %1, i64 %2) {
br label %4
4: ; preds = %8, %3
%5 = load i32, i32* @MSG_PEEK
%6 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i64, i64* @errno
%10 = load i64, i64* @EINTR
%11 = icmp eq i64 %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %8
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ msgeln(char *);
int /*<<< orphan*/ system(char *);
void printHeader() {
  system("clear || cls");
  msgeln("Area de processamentos POG =p, Powered by Fernando Junior");
  msgeln("Jogo inicializado com sucesso");
  msgeln("");
}


x86 assembly (clang, -O0):
<printHeader>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <system@plt>
lea    0xed6(%rip),%rdi
call   1030 <msgeln@plt>
lea    0xf04(%rip),%rdi
call   1030 <msgeln@plt>
lea    0xf15(%rip),%rdi
call   1030 <msgeln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHeader>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xed9(%rip),%rdi
call   1030 <msgeln@plt>
lea    0xf07(%rip),%rdi
call   1030 <msgeln@plt>
lea    0xf18(%rip),%rdi
pop    %rax
jmp    1030 <msgeln@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"clear || cls\00"
@.str.1 = [58 x i8] c"Area de processamentos POG =p, Powered by Fernando Junior\00"
@.str.2 = [30 x i8] c"Jogo inicializado com sucesso\00"
@.str.3 = [1 x i8] zeroinitializer
define void @printHeader() {
%1 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @msgeln(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @msgeln(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @msgeln(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"clear || cls\00"
@.str.1 = [58 x i8] c"Area de processamentos POG =p, Powered by Fernando Junior\00"
@.str.2 = [30 x i8] c"Jogo inicializado com sucesso\00"
@.str.3 = [1 x i8] zeroinitializer
define void @printHeader() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @msgeln(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @msgeln(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @msgeln(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsapxsumpw(int, float, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dsapxsumpw(N, 5.0f, x, stride);
  printf("sum: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
movss  0xe8c(%rip),%xmm0
call   1040 <stdlib_strided_dsapxsumpw@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movss  0xebd(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_dsapxsumpw@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dsapxsumpw(i32 %6, float 5.000000e+00, float* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [10 x i8] c"sum: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsapxsumpw(i32 4, float 5.000000e+00, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ USB_WriteEP(int, void *, int /*<<< orphan*/);
void USB_StatusInStage(void) { USB_WriteEP(0x80, ((void *)0), 0); }


x86 assembly (clang, -O0):
<USB_StatusInStage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <USB_WriteEP@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<USB_StatusInStage>:
mov    $0x80,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <USB_WriteEP@plt>

LLVM IR (-O0):
define void @USB_StatusInStage() {
%1 = call i32 @USB_WriteEP(i32 128, i8* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @USB_StatusInStage() {
%1 = tail call i32 @USB_WriteEP(i32 128, i8* null, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BuildYUY2toRGB();
void init_rgb(void) {
  static int init_done = 0;
  if (!init_done) {
    BuildYUY2toRGB();
    init_done = 1;
  }
}


x86 assembly (clang, -O0):
<init_rgb>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1132 <init_rgb+0x22>
mov    $0x0,%al
call   1030 <BuildYUY2toRGB@plt>
movl   $0x1,0x2efa(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rgb>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    1128 <init_rgb+0x18>
xor    %eax,%eax
call   1030 <BuildYUY2toRGB@plt>
movb   $0x1,0x2f04(%rip)
pop    %rax
ret

LLVM IR (-O0):
@init_rgb.init_done = internal global i32 0
define void @init_rgb() {
%1 = load i32, i32* @init_rgb.init_done
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 (...) @BuildYUY2toRGB()
store i32 1, i32* @init_rgb.init_done
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@init_rgb.init_done = internal unnamed_addr global i1 false
define void @init_rgb() {
%1 = load i1, i1* @init_rgb.init_done
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 (...) @BuildYUY2toRGB()
store i1 true, i1* @init_rgb.init_done
br label %4
4: ; preds = %2, %0
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ charstoint(unsigned char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ verify(int);
void test_charstoint() {
  printf("Test convert characters to integer");
  unsigned char in[3] = "Man";
  uint32_t expected = 0x4d616e;
  uint32_t actual = charstoint(in, 3);
  verify(expected == actual);
}


x86 assembly (clang, -O0):
<test_charstoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0xed8(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xed0(%rip),%al
mov    %al,-0x1(%rbp)
movq   $0x4d616e,-0x10(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x3,%esi
call   1050 <charstoint@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <verify@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_charstoint>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
movb   $0x6e,0x6(%rsp)
movw   $0x614d,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x3,%esi
call   1050 <charstoint@plt>
xor    %edi,%edi
cmp    $0x4d616e,%rax
sete   %dil
call   1040 <verify@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Test convert characters to integer\00"
@__const.test_charstoint.in = [3 x i8] c"Man"
define void @test_charstoint() {
%1 = alloca [3 x i8]
%2 = alloca i64
%3 = alloca i64
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = bitcast [3 x i8]* %1 to i8*
store i64 5071214, i64* %2
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%7 = call i64 @charstoint(i8* %6, i32 3)
store i64 %7, i64* %3
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = icmp eq i64 %8, %9
%11 = zext i1 %10 to i32
%12 = call i32 @verify(i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Test convert characters to integer\00"
@__const.test_charstoint.in = [3 x i8] c"Man"
define void @test_charstoint() {
%1 = alloca [3 x i8]
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%4 = call i64 @charstoint(i8* %3, i32 3)
%5 = icmp eq i64 %4, 5071214
%6 = zext i1 %5 to i32
%7 = call i32 @verify(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NotDuplicateUrl(char *);
int /*<<< orphan*/ legalUrl(char *);
scalar_t__ urlMayBeRecursive(char *);
int gyldig_url(char word[]) {
  if (!legalUrl(word)) {
    return 0;
  } else if (!NotDuplicateUrl(word)) {
    return 0;
  } else if (urlMayBeRecursive(word)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<gyldig_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <legalUrl@plt>
cmp    $0x0,%eax
jne    115a <gyldig_url+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    11a8 <gyldig_url+0x78>
mov    -0x10(%rbp),%rdi
call   1030 <NotDuplicateUrl@plt>
cmp    $0x0,%eax
jne    1178 <gyldig_url+0x48>
movl   $0x0,-0x4(%rbp)
jmp    11a8 <gyldig_url+0x78>
mov    -0x10(%rbp),%rdi
call   1040 <urlMayBeRecursive@plt>
cmp    $0x0,%rax
je     1197 <gyldig_url+0x67>
movl   $0x0,-0x4(%rbp)
jmp    11a8 <gyldig_url+0x78>
jmp    119c <gyldig_url+0x6c>
jmp    11a1 <gyldig_url+0x71>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gyldig_url>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <legalUrl@plt>
xor    %ebp,%ebp
test   %eax,%eax
je     115e <gyldig_url+0x2e>
mov    %rbx,%rdi
call   1030 <NotDuplicateUrl@plt>
test   %eax,%eax
je     115e <gyldig_url+0x2e>
mov    %rbx,%rdi
call   1040 <urlMayBeRecursive@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @gyldig_url(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @legalUrl(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %21
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @NotDuplicateUrl(i8* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i32 0, i32* %2
br label %21
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i64 @urlMayBeRecursive(i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 0, i32* %2
br label %21
18: ; preds = %13
br label %19
19: ; preds = %18
br label %20
20: ; preds = %19
store i32 1, i32* %2
br label %21
21: ; preds = %20, %17, %12, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @gyldig_url(i8* %0) {
%2 = tail call i32 @legalUrl(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @NotDuplicateUrl(i8* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @urlMayBeRecursive(i8* %0)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %1 ], [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}
double toRadians(double degs) {
  double convert = (2 * 3.1415926535897932384626433832795) / 360;
  return degs * convert;
}


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

x86 assembly (clang, -O2):
<toRadians>:
mulsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @toRadians(double %0) {
%2 = fmul double %0, 0x3F91DF46A2529D39
ret double %2
}
void waitForTx() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_setzero_pd();
__m128d test_mm_setzero_pd() { return _mm_setzero_pd(); }


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

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

LLVM IR (-O0):
define i32 @test_mm_setzero_pd() {
%1 = call i32 (...) @_mm_setzero_pd()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_mm_setzero_pd() {
%1 = tail call i32 (...) @_mm_setzero_pd()
ret i32 %1
}
double limit(double x) { return (x < 0) ? 0 : ((x > 1) ? 1 : x); }


x86 assembly (clang, -O0):
<limit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1124 <limit+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <limit+0x61>
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <limit+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <limit+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):
<limit>:
movsd  0xef8(%rip),%xmm1
minsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm2,%xmm0
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @limit(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, 1.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 [ 0.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @limit(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 1.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double 0.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void help(const char *argv0) {
  printf("This is falseflat, an equivalent of topformflat for the False "
         "programming\n"
         "language. See http://delta.tigris.org/ and http://strlen.com/false "
         "for more\n"
         "information.\n\n"
         "Usage: %s [level] <in_file.f >out_file.f\n",
         argv0);
}


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

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

LLVM IR (-O0):
@.str = [206 x i8] c"This is falseflat, an equivalent of topformflat for the False programming\0Alanguage. See http://delta.tigris.org/ and http://strlen.com/false for more\0Ainformation.\0A\0AUsage: %s [level] <in_file.f >out_file.f\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [206 x i8] c"This is falseflat, an equivalent of topformflat for the False programming\0Alanguage. See http://delta.tigris.org/ and http://strlen.com/false for more\0Ainformation.\0A\0AUsage: %s [level] <in_file.f >out_file.f\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *path) {
  printf("Usage: %s <fpscode> <infile> [outfile]\n\n", path);
  printf("If outfile is ommitted, infile will be modified.\n");
  printf(
      "FPS codes:\n  1:23.976\n  2:24\n  3:25\n  4:29.97\n  5:30\n  6:50\nNote "
      "that these are only the most common fps codes.\nYou may specify any "
      "other number in hex (0-f). Refer to the DVD specification.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Usage: %s <fpscode> <infile> [outfile]\0A\0A\00"
@.str.1 = [50 x i8] c"If outfile is ommitted, infile will be modified.\0A\00"
@.str.2 = [192 x i8] c"FPS codes:\0A 1:23.976\0A 2:24\0A 3:25\0A 4:29.97\0A 5:30\0A 6:50\0ANote that these are only the most common fps codes.\0AYou may specify any other number in hex (0-f). Refer to the DVD specification.\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 ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([192 x i8], [192 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"Usage: %s <fpscode> <infile> [outfile]\0A\0A\00"
@str = [49 x i8] c"If outfile is ommitted, infile will be modified.\00"
@str.3 = [191 x i8] c"FPS codes:\0A 1:23.976\0A 2:24\0A 3:25\0A 4:29.97\0A 5:30\0A 6:50\0ANote that these are only the most common fps codes.\0AYou may specify any other number in hex (0-f). Refer to the DVD specification.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([191 x i8], [191 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ arch_pusharg(int, int);
void emit_pusharg(int size, int reg, int arg) { arch_pusharg(reg, arg); }


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

x86 assembly (clang, -O2):
<emit_pusharg>:
mov    %esi,%edi
mov    %edx,%esi
jmp    1030 <arch_pusharg@plt>

LLVM IR (-O0):
define void @emit_pusharg(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* %5
%8 = load i32, i32* %6
%9 = call i32 @arch_pusharg(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @emit_pusharg(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @arch_pusharg(i32 %1, i32 %2)
ret void
}
int myisspace(int c) {
  return ((c == ' ') || (c == '\t') || (c == '\r') || (c == '\n') ||
          (c == '\f') || (c == '\v'));
}


x86 assembly (clang, -O0):
<myisspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <myisspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <myisspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <myisspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <myisspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <myisspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myisspace>:
cmp    $0x20,%edi
ja     111d <myisspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <myisspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @myisspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 13
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 12
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @myisspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void iobench_report() {}


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

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

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

LLVM IR (-O2):
define void @iobench_report() {
ret void
}
int fib(int param1) {
  int eax;
  int eax_1;
  int local2;
  if (param1 <= 1) {
    local2 = param1;
  } else {
    eax_1 = fib(param1 - 1);
    eax = fib(param1 - 2);
    local2 = eax_1 + eax;
  }
  return local2;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jg     1130 <fib+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <fib+0x45>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fib+0x10>
mov    %ebx,%ecx
jmp    1144 <fib+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fib+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ ln();
int /*<<< orphan*/ printf(char *, char const);
extern void print_char_arr(const char *arr, int length) {
  for (int i = 0; i < length; i++) {
    printf("%c \t", arr[i]);
  }
  ln();
}


x86 assembly (clang, -O0):
<print_char_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1168 <print_char_arr+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <print_char_arr+0x16>
mov    $0x0,%al
call   1040 <ln@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char_arr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1156 <print_char_arr+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_char_arr+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <ln@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%c \09\00"
define void @print_char_arr(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 (...) @ln()
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ util_exit(char *);
char *util_alloc_atlink_target(const char *path, const char *link) {
  util_exit("Sorry: readlinkat() function not implemented");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"Sorry: readlinkat() function not implemented\00"
define i8* @util_alloc_atlink_target(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = call i32 @util_exit(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
@.str = [45 x i8] c"Sorry: readlinkat() function not implemented\00"
define noalias i8* @util_alloc_atlink_target(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @util_exit(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ pause();
int /*<<< orphan*/ printf(char *, int);
void test4_handler(int sig) {
  printf("child, sig %d received\n", sig);
  pause();
}


x86 assembly (clang, -O0):
<test4_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <pause@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pause@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"child, sig %d received\0A\00"
define void @test4_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @pause()
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"child, sig %d received\0A\00"
define void @test4_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 (...) @pause()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_seat {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_seat_get_version(struct wl_seat *wl_seat) {
  return wl_proxy_get_version((struct wl_proxy *)wl_seat);
}


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

x86 assembly (clang, -O2):
<wl_seat_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

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

LLVM IR (-O2):
%struct.wl_seat = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_seat_get_version(%struct.wl_seat* %0) {
%2 = bitcast %struct.wl_seat* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ puts(char *);
char *CreateString(int NumberOfCharacters) {
  char *String;
  String = (char *)malloc((NumberOfCharacters + 1) * sizeof(char));
  if (String == NULL) {
    puts("Out of memory!");
    exit(3);
  }
  return String;
}


x86 assembly (clang, -O0):
<CreateString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <CreateString+0x43>
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateString>:
push   %rax
add    $0x1,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <CreateString+0x10>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @CreateString(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 3)
unreachable
16: ; preds = %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @CreateString(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 3)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %3 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello , world\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello , world\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello , world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void stress_log_system_info(void) {}


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

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

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

LLVM IR (-O2):
define void @stress_log_system_info() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_is_special(int fd,
                                                         const char *path) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_is_special>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_is_special(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char const *);
void err(const char *msg) {
  printf(msg);
  printf("------- End Prim 's MST -------\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err>:
push   %rax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"------- End Prim 's MST -------\0A\00"
@EXIT_FAILURE = global i32 0
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [32 x i8] c"------- End Prim 's MST -------\00"
define void @err(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void pft(char *from, char *to) {
  while (from <= to)
    printf("%c", *(from++));
}


x86 assembly (clang, -O0):
<pft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1151 <pft+0x41>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <pft+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pft>:
push   %r15
push   %r14
push   %rbx
cmp    %rsi,%rdi
ja     1144 <pft+0x34>
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xed9(%rip),%r15
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%esi
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <printf@plt>
cmp    %r14,%rbx
jbe    1130 <pft+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @pft(i8* %0, i8* readnone %1) {
%3 = icmp ugt i8* %0, %1
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %6, %4 ], [ %0, %2 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp ugt i8* %6, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
void *malloc(size_t size) {
  void *__libc_malloc(size_t size);
  return __libc_malloc(size);
}


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

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

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

LLVM IR (-O2):
define i8* @malloc(i64 %0) {
%2 = tail call i8* @__libc_malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ square_calc_1(char *);
int main(int argc, char *argv[]) {
  char *host;
  if (argc < 2) {
    printf("usage: %s server_host\n", argv[0]);
    exit(1);
  }
  host = argv[1];
  square_calc_1(host);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <square_calc_1@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     114f <main+0x1f>
mov    (%rsi),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    0x8(%rsi),%rdi
call   1050 <square_calc_1@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @square_calc_1(i8* %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *applet_from_path(const char *str) {
  const char *p = strrchr(str, '/');
  if (p == NULL)
    p = str;
  else
    p++;
  return p;
}


x86 assembly (clang, -O0):
<applet_from_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <applet_from_path+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <applet_from_path+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<applet_from_path>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @applet_from_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %2
store i8* %9, i8** %3
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @applet_from_path(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sig_segv_handler(int seg) { exit(0); }


x86 assembly (clang, -O0):
<sig_segv_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @sig_segv_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sig_segv_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
void BN_clear_free(void) {}


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

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

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

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


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

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

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

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