xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "usage: %s filename\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s filename\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s filename\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int global_data_getstuff(int *p, int i) { return *p + i; }


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

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

LLVM IR (-O0):
define i32 @global_data_getstuff(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @global_data_getstuff(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
ret i32 %4
}
void set_throttle_percent(int percent) {}


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

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

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

LLVM IR (-O2):
define void @set_throttle_percent(i32 %0) {
ret void
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_scan_region_stop(struct proctal *);
void proctal_scan_region_stop(struct proctal *p) {
  proctal_implementation_scan_region_stop(p);
}


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

x86 assembly (clang, -O2):
<proctal_scan_region_stop>:
jmp    1030 <proctal_implementation_scan_region_stop@plt>

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

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_scan_region_stop(%struct.proctal* %0) {
%2 = tail call i32 @proctal_implementation_scan_region_stop(%struct.proctal* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
int64_t system_message(const char *msg, int64_t code) {
  perror(msg);
  return code;
}


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

x86 assembly (clang, -O2):
<system_message>:
push   %rbx
mov    %esi,%ebx
call   1030 <perror@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @system_message(i8* nocapture %0, i32 returned %1) {
%3 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ morestmts();
int /*<<< orphan*/ stmt();
void stmtlist() {
  stmt();
  morestmts();
}


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

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

LLVM IR (-O0):
define void @stmtlist() {
%1 = call i32 (...) @stmt()
%2 = call i32 (...) @morestmts()
ret void
}

LLVM IR (-O2):
define void @stmtlist() {
%1 = tail call i32 (...) @stmt()
%2 = tail call i32 (...) @morestmts()
ret void
}
/* Variables and functions */
double expf(double);
float bolton(float t) { return (6.112 * expf(17.67 * t / (t + 243.5))); }


x86 assembly (clang, -O0):
<bolton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xec5(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <expf@plt>
movaps %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bolton>:
push   %rax
cvtss2sd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <expf@plt>
mulsd  0xed6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bolton(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double 1.767000e+01, %4
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fadd double %7, 2.435000e+02
%9 = fdiv double %5, %8
%10 = call double @expf(double %9)
%11 = fmul double 6.112000e+00, %10
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @bolton(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 1.767000e+01
%4 = fadd double %2, 2.435000e+02
%5 = fdiv double %3, %4
%6 = tail call double @expf(double %5)
%7 = fmul double %6, 6.112000e+00
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int cmd_number(char const *, char const *, void *);
int /*<<< orphan*/ strcasecmp(char const *, char *);
int cmd_number_inf(const char *com, const char *val, void *closure) {
  if (!strcasecmp(val, "inf")) {
    *(int *)closure = 0;
    return 1;
  }
  return cmd_number(com, val, closure);
}


x86 assembly (clang, -O0):
<cmd_number_inf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1163 <cmd_number_inf+0x43>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1177 <cmd_number_inf+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <cmd_number@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_number_inf>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1154 <cmd_number_inf+0x34>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <cmd_number@plt>
movl   $0x0,(%r14)
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"inf\00"
define i32 @cmd_number_inf(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %6
%9 = call i32 @strcasecmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = bitcast i8* %12 to i32*
store i32 0, i32* %13
store i32 1, i32* %4
br label %19
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = call i32 @cmd_number(i8* %15, i8* %16, i8* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %11
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str = [4 x i8] c"inf\00"
define i32 @cmd_number_inf(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcasecmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = bitcast i8* %2 to i32*
store i32 0, i32* %7
br label %10
8: ; preds = %3
%9 = tail call i32 @cmd_number(i8* %0, i8* %1, i8* %2)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %9, %8 ], [ 1, %6 ]
ret i32 %11
}
void inslash2bol_rv_eol() {}


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

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

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

LLVM IR (-O2):
define void @inslash2bol_rv_eol() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c, nl;
  nl = 0;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      ++nl;
  printf("%d\n", nl);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
@.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 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
const uint8_t *hsp_subevent_ag_indication_get_value(const uint8_t *event) {
  return &event[4];
}


x86 assembly (clang, -O0):
<hsp_subevent_ag_indication_get_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hsp_subevent_ag_indication_get_value>:
lea    0x10(%rdi),%rax
ret

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

LLVM IR (-O2):
define i32* @hsp_subevent_ag_indication_get_value(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
ret i32* %2
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int ioctl(int, int, void *);
int xioctl(int fileDescriptor, int request, void *arg) {
  int r;
  do
    r = ioctl(fileDescriptor, request, arg);
  while (-1 == r && EINTR == errno);
  return r;
}


x86 assembly (clang, -O0):
<xioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    -0x14(%rbp),%ecx
mov    %al,-0x15(%rbp)
jne    1161 <xioctl+0x51>
mov    0x2e8a(%rip),%rax
mov    (%rax),%rax
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1122 <xioctl+0x12>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xioctl>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2eb2(%rip),%r15
mov    0x2eb3(%rip),%r12
nopl   (%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    114a <xioctl+0x3a>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <xioctl+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@EINTR = global i64 0
@errno = global i64 0
define i32 @xioctl(i32 %0, i32 %1, i8* %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @EINTR
%8 = load i64, i64* @errno
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Match(char *, char **);
int Word(char *, char **);
int Verb(char *pattern, char **p) {
  int res = Word(pattern, p);
  if (res && !Match("s", p))
    Match("ed", p);
  return res;
}


x86 assembly (clang, -O0):
<Verb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Word@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1173 <Verb+0x53>
mov    -0x10(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <Match@plt>
cmp    $0x0,%eax
jne    1173 <Verb+0x53>
mov    -0x10(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <Match@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Verb>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <Word@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1153 <Verb+0x33>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <Match@plt>
test   %eax,%eax
jne    1153 <Verb+0x33>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <Match@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
@.str.1 = [3 x i8] c"ed\00"
define i32 @Verb(i8* %0, i8** %1) {
%3 = tail call i32 @Word(i8* %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @Match(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @Match(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %1)
br label %10
10: ; preds = %8, %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _IOW(unsigned char, int, int /*<<< orphan*/);
int /*<<< orphan*/ __u32;
int ioctl(int, int /*<<< orphan*/, int);
int usb_raw_ep_disable(int fd, int ep) {
  return ioctl(fd, _IOW('U', 6, __u32), ep);
}


x86 assembly (clang, -O0):
<usb_raw_ep_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    $0x55,%edi
mov    $0x6,%esi
call   1030 <_IOW@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_raw_ep_disable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    $0x55,%edi
mov    $0x6,%esi
call   1030 <_IOW@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
@__u32 = global i32 0
define i32 @usb_raw_ep_disable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @__u32
%7 = call i32 @_IOW(i8 zeroext 85, i32 6, i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @ioctl(i32 %5, i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@__u32 = global i32 0
define i32 @usb_raw_ep_disable(i32 %0, i32 %1) {
%3 = load i32, i32* @__u32
%4 = tail call i32 @_IOW(i8 zeroext 85, i32 6, i32 %3)
%5 = tail call i32 @ioctl(i32 %0, i32 %4, i32 %1)
ret i32 %5
}
void mreset() {}


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

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

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

LLVM IR (-O2):
define void @mreset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int, int);
int main() {
  int girls = 12;
  int boys = 11;
  swap(girls, boys);
  printf("girls: %d  boys: %d\n", girls, boys);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0xb,%esi
call   1040 <swap@plt>
lea    0xec9(%rip),%rdi
mov    $0xc,%esi
mov    $0xb,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"girls: %d boys: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 12, i32* %2
store i32 11, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @swap(i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"girls: %d boys: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i32 12, i32 11)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 12, i32 11)
ret i32 0
}
/* Type definitions */
struct i915_gem_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ context_close(struct i915_gem_context *);
void kernel_context_close(struct i915_gem_context *ctx) { context_close(ctx); }


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

x86 assembly (clang, -O2):
<kernel_context_close>:
jmp    1030 <context_close@plt>

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

LLVM IR (-O2):
%struct.i915_gem_context = type { i32 }
define void @kernel_context_close(%struct.i915_gem_context* %0) {
%2 = tail call i32 @context_close(%struct.i915_gem_context* %0)
ret void
}
/* Type definitions */
struct tm {
  int tm_isdst;
};

/* Variables and functions */
int tm_isdaylightsavingtime(struct tm date) { return date.tm_isdst; }


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

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @tm_isdaylightsavingtime(i32 %0) {
%2 = alloca %struct.tm
%3 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = getelementptr inbounds %struct.tm, %struct.tm* %2, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @tm_isdaylightsavingtime(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_rdctl(int);
uint32_t _Nios2_Get_ctlreg_badaddr(void) {
  return (uint32_t)__builtin_rdctl(12);
}


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

x86 assembly (clang, -O2):
<_Nios2_Get_ctlreg_badaddr>:
mov    $0xc,%edi
jmp    1030 <__builtin_rdctl@plt>

LLVM IR (-O0):
define i32 @_Nios2_Get_ctlreg_badaddr() {
%1 = call i32 @__builtin_rdctl(i32 12)
ret i32 %1
}

LLVM IR (-O2):
define i32 @_Nios2_Get_ctlreg_badaddr() {
%1 = tail call i32 @__builtin_rdctl(i32 12)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
long int ftell(FILE *stream) {
  int n;
  FILE tmp;
  tmp = *stream;
  n = __infer_nondet_int();
  if (n >= 0)
    return n;
  else
    return -1;
}


x86 assembly (clang, -O0):
<ftell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1146 <ftell+0x36>
movslq -0x14(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <ftell+0x3e>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftell>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovns %eax,%ecx
movslq %ecx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ftell(i32* %0) {
%2 = alloca i64
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
store i64 %13, i64* %2
br label %15
14: ; preds = %1
store i64 -1, i64* %2
br label %15
15: ; preds = %14, %11
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
define i64 @ftell(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = icmp sgt i32 %2, -1
%4 = select i1 %3, i32 %2, i32 -1
%5 = sext i32 %4 to i64
ret i64 %5
}
void aeron_idle_strategy_noop_idle(void *state, int work_count) {}


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

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

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

LLVM IR (-O2):
define void @aeron_idle_strategy_noop_idle(i8* nocapture %0, i32 %1) {
ret void
}
void vrt_nodes_init(int node_id) {}


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

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

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

LLVM IR (-O2):
define void @vrt_nodes_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ avanzarVehiculo();
int /*<<< orphan*/ girarDerecha();
int /*<<< orphan*/ girarIzquierda();
void darVuelta() {
  girarDerecha();
  avanzarVehiculo();
  Delay_ms(1000);
  girarIzquierda();
  avanzarVehiculo();
}


x86 assembly (clang, -O0):
<darVuelta>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <girarDerecha@plt>
mov    $0x0,%al
call   1050 <avanzarVehiculo@plt>
mov    $0x3e8,%edi
call   1060 <Delay_ms@plt>
mov    $0x0,%al
call   1040 <girarIzquierda@plt>
mov    $0x0,%al
call   1050 <avanzarVehiculo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<darVuelta>:
push   %rax
xor    %eax,%eax
call   1030 <girarDerecha@plt>
xor    %eax,%eax
call   1050 <avanzarVehiculo@plt>
mov    $0x3e8,%edi
call   1060 <Delay_ms@plt>
xor    %eax,%eax
call   1040 <girarIzquierda@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <avanzarVehiculo@plt>

LLVM IR (-O0):
define void @darVuelta() {
%1 = call i32 (...) @girarDerecha()
%2 = call i32 (...) @avanzarVehiculo()
%3 = call i32 @Delay_ms(i32 1000)
%4 = call i32 (...) @girarIzquierda()
%5 = call i32 (...) @avanzarVehiculo()
ret void
}

LLVM IR (-O2):
define void @darVuelta() {
%1 = tail call i32 (...) @girarDerecha()
%2 = tail call i32 (...) @avanzarVehiculo()
%3 = tail call i32 @Delay_ms(i32 1000)
%4 = tail call i32 (...) @girarIzquierda()
%5 = tail call i32 (...) @avanzarVehiculo()
ret void
}
void translate_range(file, a, b, aptr, bptr) struct file_data *file;
int a, b;
int *aptr, *bptr;
{
  *aptr = translate_line_number(file, a - 1) + 1;
  *bptr = translate_line_number(file, b + 1) - 1;
}


x86 assembly (clang, -O0):
<translate_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
mov    $0x0,%al
call   1030 <translate_line_number@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
add    $0x1,%esi
mov    $0x0,%al
call   1030 <translate_line_number@plt>
mov    %eax,%ecx
sub    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_range>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %rdi,%rbx
add    $0xffffffff,%esi
xor    %eax,%eax
call   1030 <translate_line_number@plt>
add    $0x1,%eax
mov    %eax,(%r15)
add    $0x1,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <translate_line_number@plt>
add    $0xffffffff,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.file_data = type opaque
define void @translate_range(%struct.file_data* %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca %struct.file_data*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
store %struct.file_data* %0, %struct.file_data** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load %struct.file_data*, %struct.file_data** %6
%12 = load i32, i32* %7
%13 = sub nsw i32 %12, 1
%14 = call i32 (%struct.file_data*, i32, ...) bitcast (i32 (...)* @translate_line_number to i32 (%struct.file_data*, i32, ...)*)(%struct.file_data* %11, i32 %13)
%15 = add nsw i32 %14, 1
%16 = load i32*, i32** %9
store i32 %15, i32* %16
%17 = load %struct.file_data*, %struct.file_data** %6
%18 = load i32, i32* %8
%19 = add nsw i32 %18, 1
%20 = call i32 (%struct.file_data*, i32, ...) bitcast (i32 (...)* @translate_line_number to i32 (%struct.file_data*, i32, ...)*)(%struct.file_data* %17, i32 %19)
%21 = sub nsw i32 %20, 1
%22 = load i32*, i32** %10
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
%struct.file_data = type opaque
define void @translate_range(%struct.file_data* %0, i32 %1, i32 %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = add nsw i32 %1, -1
%7 = tail call i32 (%struct.file_data*, i32, ...) bitcast (i32 (...)* @translate_line_number to i32 (%struct.file_data*, i32, ...)*)(%struct.file_data* %0, i32 %6)
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = add nsw i32 %2, 1
%10 = tail call i32 (%struct.file_data*, i32, ...) bitcast (i32 (...)* @translate_line_number to i32 (%struct.file_data*, i32, ...)*)(%struct.file_data* %0, i32 %9)
%11 = add nsw i32 %10, -1
store i32 %11, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, n, T = 0;
  scanf("%d", &n);
  for (i = 0; i <= n; i = i + 1)
    ;
  T = T + (i * (i + 1) / 2);
  printf("%d", T);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     116c <main+0x4c>
jmp    115e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <main+0x2d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
mov    $0xffffffff,%esi
cmovns %eax,%esi
lea    0x1(%rsi),%eax
add    $0x2,%esi
imul   %eax,%esi
shr    %esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @llvm.smax.i32(i32 %4, i32 -1)
%6 = add nsw i32 %5, 1
%7 = add nsw i32 %5, 2
%8 = mul nsw i32 %7, %6
%9 = lshr i32 %8, 1
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
const float *pixel(const float *p, int n, int c, int i, int j) {
  return p + c * (i * n + j);
}


x86 assembly (clang, -O0):
<pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0xc(%rbp),%edx
add    -0x18(%rbp),%edx
imul   %edx,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel>:
imul   %ecx,%esi
add    %r8d,%esi
imul   %edx,%esi
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
ret

LLVM IR (-O0):
define float* @pixel(float* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store float* %0, float** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load float*, float** %6
%12 = load i32, i32* %8
%13 = load i32, i32* %9
%14 = load i32, i32* %7
%15 = mul nsw i32 %13, %14
%16 = load i32, i32* %10
%17 = add nsw i32 %15, %16
%18 = mul nsw i32 %12, %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds float, float* %11, i64 %19
ret float* %20
}

LLVM IR (-O2):
define float* @pixel(float* readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %3, %1
%7 = add nsw i32 %6, %4
%8 = mul nsw i32 %7, %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds float, float* %0, i64 %9
ret float* %10
}
/* Variables and functions */
int write(int, void const *, size_t);
int cbmarch_raw_write(int f, const void *buf, size_t size) {
  return write(f, buf, size);
}


x86 assembly (clang, -O0):
<cbmarch_raw_write>:
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
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_raw_write>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @cbmarch_raw_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
int g(int x) {
  switch (x + 3) {};
  return 4;
}


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

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

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3
switch i32 %4, label %5 [
]
5: ; preds = %1
ret i32 4
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
ret i32 4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xmap_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xmap.send_event = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xmap_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct ringbufindex {
  int dummy;
};

/* Variables and functions */
scalar_t__ ringbufindex_elements(struct ringbufindex const *);
int ringbufindex_empty(const struct ringbufindex *r) {
  return ringbufindex_elements(r) == 0;
}


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

x86 assembly (clang, -O2):
<ringbufindex_empty>:
push   %rax
call   1030 <ringbufindex_elements@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ringbufindex = type { i32 }
define i32 @ringbufindex_empty(%struct.ringbufindex* %0) {
%2 = alloca %struct.ringbufindex*
store %struct.ringbufindex* %0, %struct.ringbufindex** %2
%3 = load %struct.ringbufindex*, %struct.ringbufindex** %2
%4 = call i64 @ringbufindex_elements(%struct.ringbufindex* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ringbufindex = type { i32 }
define i32 @ringbufindex_empty(%struct.ringbufindex* %0) {
%2 = tail call i64 @ringbufindex_elements(%struct.ringbufindex* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  FILE *f = fopen("check_openpf2.c", "rb");
  if (f == NULL)
    abort();
  fclose(f);
  printf("pass\n");
  return 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)
lea    0xea3(%rip),%rdi
lea    0xeac(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <main+0x3f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xe84(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1171 <main+0x31>
mov    %rax,%rdi
call   1050 <fclose@plt>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"check_openpf2.c\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [6 x i8] c"pass\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %6
%8 = load i32*, i32** %6
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %2
%13 = load i32*, i32** %6
%14 = call i32 @fclose(i32* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"check_openpf2.c\00"
@.str.1 = [3 x i8] c"rb\00"
@str = [5 x i8] c"pass\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @fclose(i32* %3)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ccvector_free_(float *pVector) { free((void *)pVector); }


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

x86 assembly (clang, -O2):
<ccvector_free_>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ccvector_free_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = bitcast float* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
define void @ccvector_free_(float* nocapture %0) {
%2 = bitcast float* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_data(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int);
void idglobal_size(int type, int size, int constsize) {
  if (size > constsize)
    emit_data(0, 0, 0, size - constsize);
  else if (size)
    emit_data(0, 0, 0, size);
}


x86 assembly (clang, -O0):
<idglobal_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1143 <idglobal_size+0x33>
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <emit_data@plt>
jmp    1160 <idglobal_size+0x50>
cmpl   $0x0,-0x8(%rbp)
je     115b <idglobal_size+0x4b>
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <emit_data@plt>
jmp    1160 <idglobal_size+0x50>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idglobal_size>:
mov    %esi,%eax
sub    %edx,%eax
jle    111a <idglobal_size+0xa>
mov    %eax,%ecx
jmp    1120 <idglobal_size+0x10>
mov    %esi,%ecx
test   %esi,%esi
je     112b <idglobal_size+0x1b>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <emit_data@plt>
ret

LLVM IR (-O0):
define void @idglobal_size(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 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = call i32 @emit_data(i32 0, i32 0, i32 0, i32 %13)
br label %22
15: ; preds = %3
%16 = load i32, i32* %5
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %5
%20 = call i32 @emit_data(i32 0, i32 0, i32 0, i32 %19)
br label %21
21: ; preds = %18, %15
br label %22
22: ; preds = %21, %10
ret void
}

LLVM IR (-O2):
define void @idglobal_size(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = sub nsw i32 %1, %2
br label %9
7: ; preds = %3
%8 = icmp eq i32 %1, 0
br i1 %8, label %12, label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %1, %7 ]
%11 = tail call i32 @emit_data(i32 0, i32 0, i32 0, i32 %10)
br label %12
12: ; preds = %9, %7
ret void
}
void g_iconv_close() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ test_san_grid(struct sensor_network const *,
                                 struct grid const *, int, double);
void test_san_cell(const struct sensor_network *sn, const struct grid *g,
                   double t) {
  test_san_grid(sn, g, 1, t);
}


x86 assembly (clang, -O0):
<test_san_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%edx
call   1030 <test_san_grid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_san_cell>:
mov    $0x1,%edx
jmp    1030 <test_san_grid@plt>

LLVM IR (-O0):
%struct.sensor_network = type { i32 }
%struct.grid = type { i32 }
define void @test_san_cell(%struct.sensor_network* %0, %struct.grid* %1, double %2) {
%4 = alloca %struct.sensor_network*
%5 = alloca %struct.grid*
%6 = alloca double
store %struct.sensor_network* %0, %struct.sensor_network** %4
store %struct.grid* %1, %struct.grid** %5
store double %2, double* %6
%7 = load %struct.sensor_network*, %struct.sensor_network** %4
%8 = load %struct.grid*, %struct.grid** %5
%9 = load double, double* %6
%10 = call i32 @test_san_grid(%struct.sensor_network* %7, %struct.grid* %8, i32 1, double %9)
ret void
}

LLVM IR (-O2):
%struct.sensor_network = type { i32 }
%struct.grid = type { i32 }
define void @test_san_cell(%struct.sensor_network* %0, %struct.grid* %1, double %2) {
%4 = tail call i32 @test_san_grid(%struct.sensor_network* %0, %struct.grid* %1, i32 1, double %2)
ret void
}
int cmp(const void *pa, const void *pb) {
  char a = *(const char *)pa;
  char b = *(const char *)pb;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
void ASN1_STRING_print_ex_fp(void) {}


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

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

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

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