xunge/DecIR huggingface dataset:
/* Variables and functions */
char *form_getvar(char const *);
int sscanf(char const *, char const *, void *);
int form_getv(const char *name, const char *format, void *var) {
  const char *str = form_getvar(name);
  if (!str)
    return -1;
  return sscanf(str, format, var);
}


x86 assembly (clang, -O0):
<form_getv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <form_getvar@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1158 <form_getv+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <form_getv+0x4c>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <sscanf@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_getv>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1040 <form_getvar@plt>
test   %rax,%rax
je     1149 <form_getv+0x29>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sscanf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @form_getv(i8* %0, i8* nocapture %1, i8* %2) {
%4 = tail call i8* @form_getvar(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @sscanf(i8* %4, i8* %1, i8* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Type definitions */
struct dnsresp {
  int dummy;
};

/* Variables and functions */
char *_resolv_v4_ghbn(char *raddr, struct dnsresp *d_resp, char *extra) {
  return NULL;
}


x86 assembly (clang, -O0):
<_resolv_v4_ghbn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dnsresp = type { i32 }
define i8* @_resolv_v4_ghbn(i8* %0, %struct.dnsresp* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.dnsresp*
%6 = alloca i8*
store i8* %0, i8** %4
store %struct.dnsresp* %1, %struct.dnsresp** %5
store i8* %2, i8** %6
ret i8* null
}

LLVM IR (-O2):
%struct.dnsresp = type { i32 }
define noalias i8* @_resolv_v4_ghbn(i8* nocapture readnone %0, %struct.dnsresp* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* null
}
void foo473() {}


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

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

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

LLVM IR (-O2):
define void @foo473() {
ret void
}
int isSafe(int maze[4][4], int x, int y) {
  if (x >= 0 && x < 4 && y >= 0 && y < 4 && maze[x][y] == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isSafe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115f <isSafe+0x5f>
cmpl   $0x4,-0x14(%rbp)
jge    115f <isSafe+0x5f>
cmpl   $0x0,-0x18(%rbp)
jl     115f <isSafe+0x5f>
cmpl   $0x4,-0x18(%rbp)
jge    115f <isSafe+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    115f <isSafe+0x5f>
movl   $0x1,-0x4(%rbp)
jmp    1166 <isSafe+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSafe>:
mov    %edx,%eax
or     %esi,%eax
cmp    $0x3,%eax
ja     111f <isSafe+0x1f>
mov    %esi,%eax
mov    %edx,%ecx
shl    $0x4,%rax
add    %rax,%rdi
mov    $0x1,%eax
cmpl   $0x1,(%rdi,%rcx,4)
je     1121 <isSafe+0x21>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isSafe([4 x i32]* nocapture %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = icmp ult i32 %4, 4
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = zext i32 %1 to i64
%8 = zext i32 %2 to i64
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 %7, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 1
br i1 %11, label %13, label %12
12: ; preds = %6, %3
br label %13
13: ; preds = %6, %12
%14 = phi i32 [ 0, %12 ], [ 1, %6 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ bind_helper(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int bind_engine_opencl(ENGINE *e, const char *id) {
  if (!bind_helper(e)) {
    fprintf(stderr, "bind failed\n");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<bind_engine_opencl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <bind_helper@plt>
cmp    $0x0,%eax
jne    1163 <bind_engine_opencl+0x43>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    116a <bind_engine_opencl+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_engine_opencl>:
push   %rax
call   1040 <bind_helper@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1133 <bind_engine_opencl+0x13>
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"bind failed\0A\00"
define i32 @bind_engine_opencl(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
%6 = load i32*, i32** %4
%7 = call i32 @bind_helper(i32* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"bind failed\0A\00"
define i32 @bind_engine_opencl(i32* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bind_helper(i32* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %9
}
char *tilt_backslashes(char *s) {
  char *p;
  for (p = s; *p; p++)
    if (*p == '\\')
      *p = '/';
  return s;
}


x86 assembly (clang, -O0):
<tilt_backslashes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <tilt_backslashes+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1134 <tilt_backslashes+0x34>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
jmp    1139 <tilt_backslashes+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <tilt_backslashes+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tilt_backslashes>:
mov    %rdi,%rax
mov    %rdi,%rcx
jmp    1117 <tilt_backslashes+0x17>
nopl   0x0(%rax,%rax,1)
movb   $0x2f,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x5c,%dl
je     1110 <tilt_backslashes+0x10>
test   %dl,%dl
jne    1113 <tilt_backslashes+0x13>
ret

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

LLVM IR (-O2):
define i8* @tilt_backslashes(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 92, label %5
]
5: ; preds = %2
store i8 47, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret i8* %0
}
int is_eligible_point(int pointx, int pointy, int width, int height) {
  return (pointx >= ((13 - 1) / 2) && pointy >= ((13 - 1) / 2) &&
          pointx + ((13 - 1) / 2) < width && pointy + ((13 - 1) / 2) < height);
}


x86 assembly (clang, -O0):
<is_eligible_point>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x6,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jl     1151 <is_eligible_point+0x51>
xor    %eax,%eax
cmpl   $0x6,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1151 <is_eligible_point+0x51>
mov    -0x4(%rbp),%ecx
add    $0x6,%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jge    1151 <is_eligible_point+0x51>
mov    -0x8(%rbp),%eax
add    $0x6,%eax
cmp    -0x10(%rbp),%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eligible_point>:
cmp    $0x6,%edi
setge  %r8b
cmp    $0x6,%esi
setge  %al
and    %r8b,%al
add    $0x6,%edi
cmp    %edx,%edi
setl   %dl
and    %al,%dl
add    $0x6,%esi
cmp    %ecx,%esi
setl   %al
and    %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_eligible_point(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 6
br i1 %10, label %11, label %24
11: ; preds = %4
%12 = load i32, i32* %6
%13 = icmp sge i32 %12, 6
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 6
%17 = load i32, i32* %7
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 6
%22 = load i32, i32* %8
%23 = icmp slt i32 %21, %22
br label %24
24: ; preds = %19, %14, %11, %4
%25 = phi i1 [ false, %14 ], [ false, %11 ], [ false, %4 ], [ %23, %19 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_eligible_point(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %0, 5
%6 = icmp sgt i32 %1, 5
%7 = and i1 %5, %6
%8 = add nsw i32 %0, 6
%9 = icmp slt i32 %8, %2
%10 = select i1 %7, i1 %9, i1 false
%11 = add nsw i32 %1, 6
%12 = icmp slt i32 %11, %3
%13 = select i1 %10, i1 %12, i1 false
%14 = zext i1 %13 to i32
ret i32 %14
}
void preorder(struct node *root) {}


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

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

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

LLVM IR (-O2):
%struct.node = type opaque
define void @preorder(%struct.node* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ go_straight_with_power(int);
void reverse_ramming_speed() { go_straight_with_power(-127); }


x86 assembly (clang, -O0):
<reverse_ramming_speed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffff81,%edi
call   1030 <go_straight_with_power@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_ramming_speed>:
mov    $0xffffff81,%edi
jmp    1030 <go_straight_with_power@plt>

LLVM IR (-O0):
define void @reverse_ramming_speed() {
%1 = call i32 @go_straight_with_power(i32 -127)
ret void
}

LLVM IR (-O2):
define void @reverse_ramming_speed() {
%1 = tail call i32 @go_straight_with_power(i32 -127)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ argentina();
int /*<<< orphan*/ brazil();
int /*<<< orphan*/ italy();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("I am in main\n");
  brazil();
  italy();
  argentina();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <brazil@plt>
mov    $0x0,%al
call   1050 <italy@plt>
mov    $0x0,%al
call   1040 <argentina@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <brazil@plt>
xor    %eax,%eax
call   1060 <italy@plt>
xor    %eax,%eax
call   1050 <argentina@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"I am in main\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @brazil()
%4 = call i32 (...) @italy()
%5 = call i32 (...) @argentina()
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"I am in main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @brazil()
%3 = tail call i32 (...) @italy()
%4 = tail call i32 (...) @argentina()
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char *, struct stat *);
int not_exist(char *f) {
  struct stat info;
  return (stat(f, &info) == -1);
}


x86 assembly (clang, -O0):
<not_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_exist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @not_exist(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @not_exist(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
int main() {
  printf("\033[1mhello from dev/stdout!\033[0m\n");
  fprintf(stderr, "\033[36mhello from dev/stderr!\033[0m\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\1B[1mhello from dev/stdout!\1B[0m\0A\00"
@stderr = global i32 0
@.str.1 = [33 x i8] c"\1B[36mhello from dev/stderr!\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [33 x i8] c"\1B[36mhello from dev/stderr!\1B[0m\0A\00"
@str = [31 x i8] c"\1B[1mhello from dev/stdout!\1B[0m\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int Validate_MediaUri(void *rslObj, const char *mediaUri) {
  ;
  return 1;
}


x86 assembly (clang, -O0):
<Validate_MediaUri>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Validate_MediaUri(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ quick(int /*<<< orphan*/, int);
int main() {
  quick(0, 20 - 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x13,%esi
call   1030 <quick@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @quick(i32 0, i32 19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @quick(i32 0, i32 19)
ret i32 0
}
/* Variables and functions */
scalar_t__ read_serial_port();
int /*<<< orphan*/ usleep(int);
void bt_rx_clear() {
  while (read_serial_port()) {
    usleep(2000);
  }
}


x86 assembly (clang, -O0):
<bt_rx_clear>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <bt_rx_clear+0x9>
mov    $0x0,%al
call   1030 <read_serial_port@plt>
cmp    $0x0,%rax
je     1149 <bt_rx_clear+0x29>
mov    $0x7d0,%edi
call   1040 <usleep@plt>
jmp    1129 <bt_rx_clear+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bt_rx_clear>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <read_serial_port@plt>
test   %rax,%rax
je     1148 <bt_rx_clear+0x28>
mov    $0x7d0,%edi
call   1040 <usleep@plt>
jmp    1130 <bt_rx_clear+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @bt_rx_clear() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @read_serial_port()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = call i32 @usleep(i32 2000)
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @bt_rx_clear() {
%1 = tail call i64 (...) @read_serial_port()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0, %3
%4 = tail call i32 @usleep(i32 2000)
%5 = tail call i64 (...) @read_serial_port()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int op_if(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ t();
int op_not(int a) { return op_if(a, f(), t()); }


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

x86 assembly (clang, -O2):
<op_not>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <f@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <t@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <op_if@plt>

LLVM IR (-O0):
define i32 @op_not(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @f()
%5 = call i32 (...) @t()
%6 = call i32 @op_if(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @op_not(i32 %0) {
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @t()
%4 = tail call i32 @op_if(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int u8islowercyrilici(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8islowercyriliccc(const char *c) {
  return u8islowercyrilici(u8tointcc(c));
}


x86 assembly (clang, -O0):
<u8islowercyriliccc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointcc@plt>
mov    %eax,%edi
call   1040 <u8islowercyrilici@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8islowercyriliccc>:
push   %rax
call   1030 <u8tointcc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8islowercyrilici@plt>

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

LLVM IR (-O2):
define i32 @u8islowercyriliccc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8islowercyrilici(i32 %2)
ret i32 %3
}
int test_imm_11uint16_mem(unsigned short *val) {
  return ((*val) & (0x11 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_11uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x11,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_11uint16_mem>:
testb  $0x11,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_11uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 17
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __set_errno(int);
int __syscall_error(int err_no) {
  __set_errno(-err_no);
  return -1;
}


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

x86 assembly (clang, -O2):
<__syscall_error>:
push   %rax
neg    %edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__syscall_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = call i32 @__set_errno(i32 %4)
ret i32 -1
}

LLVM IR (-O2):
define i32 @__syscall_error(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ wFileWriteByte(int, char);
void *wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasWriteByte() {
  char c;
  int fileNum;
  c = wPopNumber();
  fileNum = wPopNumber();
  wFileWriteByte(fileNum, c);
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
movsbl -0x1(%rbp),%esi
call   1050 <wFileWriteByte@plt>
xor    %edi,%edi
call   1030 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasWriteByte>:
push   %rbx
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <wPopNumber@plt>
movsbl %bl,%esi
mov    %eax,%edi
call   1050 <wFileWriteByte@plt>
xor    %edi,%edi
pop    %rbx
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasWriteByte() {
%1 = alloca i8
%2 = alloca i32
%3 = call i8* (...) @wPopNumber()
%4 = ptrtoint i8* %3 to i8
store i8 %4, i8* %1
%5 = call i8* (...) @wPopNumber()
%6 = ptrtoint i8* %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i8, i8* %1
%9 = call i32 @wFileWriteByte(i32 %7, i8 signext %8)
%10 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
define void @wBasWriteByte() {
%1 = tail call i8* (...) @wPopNumber()
%2 = ptrtoint i8* %1 to i64
%3 = trunc i64 %2 to i8
%4 = tail call i8* (...) @wPopNumber()
%5 = ptrtoint i8* %4 to i64
%6 = trunc i64 %5 to i32
%7 = tail call i32 @wFileWriteByte(i32 %6, i8 signext %3)
%8 = tail call i32 @wPushNumber(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x5f() {
  Assert_real((isprint(95)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              480, ("isprint should be 1 for _"));
}


x86 assembly (clang, -O0):
<t_isprint_0x5f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5f,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1e0,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x5f>:
push   %rax
mov    $0x5f,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1e0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for _\00"
define void @t_isprint_0x5f() {
%1 = call i32 @isprint(i32 95)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for _\00"
define void @t_isprint_0x5f() {
%1 = tail call i32 @isprint(i32 95)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int do_434() { return 434; }


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

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

LLVM IR (-O0):
define i32 @do_434() {
ret i32 434
}

LLVM IR (-O2):
define i32 @do_434() {
ret i32 434
}
/* Type definitions */
struct rk_dllist_node {
  int dummy;
};

/* Variables and functions */
struct rk_dllist_node *rk_dllist_node_alloc(size_t);
int /*<<< orphan*/ rk_dllist_node_set(struct rk_dllist_node *, void *);
struct rk_dllist_node *rk_dllist_node_new(void *val, size_t sz) {
  struct rk_dllist_node *tmp = rk_dllist_node_alloc(sz);
  if (tmp != NULL) {
    rk_dllist_node_set(tmp, val);
  }
  return tmp;
}


x86 assembly (clang, -O0):
<rk_dllist_node_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <rk_dllist_node_alloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <rk_dllist_node_new+0x35>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <rk_dllist_node_set@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rk_dllist_node_new>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <rk_dllist_node_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1142 <rk_dllist_node_new+0x22>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <rk_dllist_node_set@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.rk_dllist_node = type { i32 }
define %struct.rk_dllist_node* @rk_dllist_node_new(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca %struct.rk_dllist_node*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call %struct.rk_dllist_node* @rk_dllist_node_alloc(i64 %6)
store %struct.rk_dllist_node* %7, %struct.rk_dllist_node** %5
%8 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %5
%9 = icmp ne %struct.rk_dllist_node* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %5
%12 = load i8*, i8** %3
%13 = call i32 @rk_dllist_node_set(%struct.rk_dllist_node* %11, i8* %12)
br label %14
14: ; preds = %10, %2
%15 = load %struct.rk_dllist_node*, %struct.rk_dllist_node** %5
ret %struct.rk_dllist_node* %15
}

LLVM IR (-O2):
%struct.rk_dllist_node = type { i32 }
define %struct.rk_dllist_node* @rk_dllist_node_new(i8* %0, i64 %1) {
%3 = tail call %struct.rk_dllist_node* @rk_dllist_node_alloc(i64 %1)
%4 = icmp eq %struct.rk_dllist_node* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @rk_dllist_node_set(%struct.rk_dllist_node* %3, i8* %0)
br label %7
7: ; preds = %5, %2
ret %struct.rk_dllist_node* %3
}
double dlamch(char cmach) {
  extern double dlamch_(char *cmach);
  return dlamch_(&cmach);
}


x86 assembly (clang, -O0):
<dlamch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
call   1030 <dlamch_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlamch>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
call   1030 <dlamch_@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @dlamch(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call double @dlamch_(i8* %2)
ret double %3
}

LLVM IR (-O2):
define double @dlamch(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call double @dlamch_(i8* %2)
ret double %3
}
main() {
  int i = 5;
  char *s = "yo";
  printf(_Generic(i, char * : "%s", int : "%d"), i);
  putchar(10);
  printf(_Generic(s, char * : "%s", int : "%d"), s);
  putchar(10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
lea    0xebf(%rip),%rdi
lea    0xeb2(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"yo\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
ret i32 0
}
/* Variables and functions */
float f(float);
float xpoint(float x1, float x2) {
  float y;
  y = (x1 * f(x2) - x2 * f(x1)) / (f(x2) - f(x1));
  return y;
}


x86 assembly (clang, -O0):
<xpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <f@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <f@plt>
movss  -0x20(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x18(%rbp),%xmm0
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <f@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <f@plt>
movss  -0x14(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpoint>:
sub    $0x18,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x14(%rsp)
movaps %xmm1,%xmm0
call   1030 <f@plt>
movss  %xmm0,0x10(%rsp)
movss  0x14(%rsp),%xmm0
call   1030 <f@plt>
movss  0xc(%rsp),%xmm2
mulss  %xmm2,%xmm0
movss  0x10(%rsp),%xmm1
mulss  0x14(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x10(%rsp)
movaps %xmm2,%xmm0
call   1030 <f@plt>
movss  %xmm0,0xc(%rsp)
movss  0x14(%rsp),%xmm0
call   1030 <f@plt>
movss  0xc(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  0x10(%rsp),%xmm0
divss  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @xpoint(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call float @f(float %7)
%9 = load float, float* %4
%10 = load float, float* %3
%11 = call float @f(float %10)
%12 = fmul float %9, %11
%13 = fneg float %12
%14 = call float @llvm.fmuladd.f32(float %6, float %8, float %13)
%15 = load float, float* %4
%16 = call float @f(float %15)
%17 = load float, float* %3
%18 = call float @f(float %17)
%19 = fsub float %16, %18
%20 = fdiv float %14, %19
store float %20, float* %5
%21 = load float, float* %5
ret float %21
}

LLVM IR (-O2):
define float @xpoint(float %0, float %1) {
%3 = tail call float @f(float %1)
%4 = tail call float @f(float %0)
%5 = fneg float %4
%6 = fmul float %5, %1
%7 = tail call float @llvm.fmuladd.f32(float %0, float %3, float %6)
%8 = tail call float @f(float %1)
%9 = tail call float @f(float %0)
%10 = fsub float %8, %9
%11 = fdiv float %7, %10
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ standard_command(int, int, int, char **);
void one_variable_two_arguments_command(int opcode_byte, char **arguments) {
  standard_command(opcode_byte, 1, 2, arguments);
}


x86 assembly (clang, -O0):
<one_variable_two_arguments_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <standard_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_variable_two_arguments_command>:
mov    %rsi,%rcx
mov    $0x1,%esi
mov    $0x2,%edx
jmp    1030 <standard_command@plt>

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

LLVM IR (-O2):
define void @one_variable_two_arguments_command(i32 %0, i8** %1) {
%3 = tail call i32 @standard_command(i32 %0, i32 1, i32 2, i8** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReadNumber();
int main() {
  ReadNumber();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ReadNumber()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ReadNumber()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("\n%f", (22. / 7.0));
  printf("\n%d", 18);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%f\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 18)
ret i32 0
}
unsigned long long d2ulz(double a) { return (unsigned long long)a; }


x86 assembly (clang, -O0):
<d2ulz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm2
movaps %xmm0,%xmm1
subsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rcx
cvttsd2si %xmm0,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
and    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2ulz>:
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xeec(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @d2ulz(double %0) {
%2 = fptoui double %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ SCOTCHFNUMSIZEOF(int *const);
void scotchfnumsizeof(int *const sizeptr) { SCOTCHFNUMSIZEOF(sizeptr); }


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

x86 assembly (clang, -O2):
<scotchfnumsizeof>:
jmp    1030 <SCOTCHFNUMSIZEOF@plt>

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

LLVM IR (-O2):
define void @scotchfnumsizeof(i32* %0) {
%2 = tail call i32 @SCOTCHFNUMSIZEOF(i32* %0)
ret void
}
/* Variables and functions */
double cosh(double);
double sinh(double);
double BONDS_ILC(double x) { return (cosh(x) / sinh(x) - 1.0 / x); }


x86 assembly (clang, -O0):
<BONDS_ILC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cosh@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  0xea6(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BONDS_ILC>:
sub    $0x28,%rsp
movaps %xmm0,(%rsp)
call   1040 <cosh@plt>
movaps %xmm0,0x10(%rsp)
movapd (%rsp),%xmm0
call   1030 <sinh@plt>
movapd 0x10(%rsp),%xmm1
shufpd $0x2,0xeb5(%rip),%xmm1
unpcklpd (%rsp),%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @BONDS_ILC(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cosh(double %3)
%5 = load double, double* %2
%6 = call double @sinh(double %5)
%7 = fdiv double %4, %6
%8 = load double, double* %2
%9 = fdiv double 1.000000e+00, %8
%10 = fsub double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @BONDS_ILC(double %0) {
%2 = tail call double @cosh(double %0)
%3 = tail call double @sinh(double %0)
%4 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %2, i64 0
%5 = insertelement <2 x double> poison, double %0, i64 1
%6 = insertelement <2 x double> %5, double %3, i64 0
%7 = fdiv <2 x double> %4, %6
%8 = shufflevector <2 x double> %7, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%9 = fsub <2 x double> %7, %8
%10 = extractelement <2 x double> %9, i64 0
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ App_Exit2();
int /*<<< orphan*/ setdis();
void App_Exit(void) {
  setdis();
  App_Exit2();
  return;
}


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

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

LLVM IR (-O0):
define void @App_Exit() {
%1 = call i32 (...) @setdis()
%2 = call i32 (...) @App_Exit2()
ret void
}

LLVM IR (-O2):
define void @App_Exit() {
%1 = tail call i32 (...) @setdis()
%2 = tail call i32 (...) @App_Exit2()
ret void
}
/* Variables and functions */
scalar_t__ isPrime(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int cur = 2;
  int index = 1;
  while (index < 10001) {
    cur++;
    if (isPrime(cur)) {
      index++;
    }
  }
  printf("%d\n", cur);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x2711,-0xc(%rbp)
jge    1173 <main+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isPrime@plt>
cmp    $0x0,%rax
je     116e <main+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2,%ebx
mov    $0x1,%ebp
nopl   (%rax)
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <isPrime@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
cmp    $0x2711,%ebp
jb     1130 <main+0x10>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %8, %1 ]
%3 = phi i32 [ 2, %0 ], [ %4, %1 ]
%4 = add nuw nsw i32 %3, 1
%5 = tail call i64 @isPrime(i32 %4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = add nuw nsw i32 %2, %7
%9 = icmp ult i32 %8, 10001
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
short int shortint_ignoring_unsignedlongint(short int x, unsigned long int y) {
  return x;
}


x86 assembly (clang, -O0):
<shortint_ignoring_unsignedlongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @shortint_ignoring_unsignedlongint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @shortint_ignoring_unsignedlongint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ emit_or(int, int, int);
void emit_or_and_set_flags(int rs1, int rs2, int rt) { emit_or(rs1, rs2, rt); }


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

x86 assembly (clang, -O2):
<emit_or_and_set_flags>:
jmp    1030 <emit_or@plt>

LLVM IR (-O0):
define void @emit_or_and_set_flags(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @emit_or(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @emit_or_and_set_flags(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @emit_or(i32 %0, i32 %1, i32 %2)
ret void
}