xunge/DecIR huggingface dataset:
/* Type definitions */
struct RadarScan {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RadarScanReset(struct RadarScan *);
int /*<<< orphan*/ free(struct RadarScan *);
void RadarScanFree(struct RadarScan *ptr) {
  if (ptr == NULL)
    return;
  RadarScanReset(ptr);
  free(ptr);
}


x86 assembly (clang, -O0):
<RadarScanFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <RadarScanFree+0x1c>
jmp    114e <RadarScanFree+0x2e>
mov    -0x8(%rbp),%rdi
call   1040 <RadarScanReset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RadarScanFree>:
test   %rdi,%rdi
je     1137 <RadarScanFree+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <RadarScanReset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.RadarScan = type { i32 }
define void @RadarScanFree(%struct.RadarScan* %0) {
%2 = alloca %struct.RadarScan*
store %struct.RadarScan* %0, %struct.RadarScan** %2
%3 = load %struct.RadarScan*, %struct.RadarScan** %2
%4 = icmp eq %struct.RadarScan* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.RadarScan*, %struct.RadarScan** %2
%8 = call i32 @RadarScanReset(%struct.RadarScan* %7)
%9 = load %struct.RadarScan*, %struct.RadarScan** %2
%10 = call i32 @free(%struct.RadarScan* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.RadarScan = type { i32 }
define void @RadarScanFree(%struct.RadarScan* %0) {
%2 = icmp eq %struct.RadarScan* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @RadarScanReset(%struct.RadarScan* %0)
%5 = tail call i32 @free(%struct.RadarScan* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void post_assignment() { write("msproject.xml", "</Assignment>\n", NULL); }


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

x86 assembly (clang, -O2):
<post_assignment>:
lea    0xee9(%rip),%rdi
lea    0xef0(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [15 x i8] c"</Assignment>\0A\00"
define void @post_assignment() {
%1 = call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [15 x i8] c"</Assignment>\0A\00"
define void @post_assignment() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yogrt_set_interval2_start(int);
int iyogrt_set_interval2_start_(int *seconds_before_end) {
  yogrt_set_interval2_start(*seconds_before_end);
  return *seconds_before_end;
}


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

x86 assembly (clang, -O2):
<iyogrt_set_interval2_start_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <yogrt_set_interval2_start@plt>
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @iyogrt_set_interval2_start_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @yogrt_set_interval2_start(i32 %2)
%4 = load i32, i32* %0
ret i32 %4
}
void f1(a) int a[100][200];
{
  int i;
  for (i = 0; i < 100; i++) {
    a[i][1] = 3;
  }
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1140 <f1+0x40>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x320,%rcx,%rcx
add    %rcx,%rax
movl   $0x3,0x4(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <f1+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    $0xc84,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x3,-0xc80(%rdi,%rax,1)
movl   $0x3,-0x960(%rdi,%rax,1)
movl   $0x3,-0x640(%rdi,%rax,1)
movl   $0x3,-0x320(%rdi,%rax,1)
movl   $0x3,(%rdi,%rax,1)
add    $0xfa0,%rax
cmp    $0x14504,%rax
jne    1110 <f1+0x10>
ret

LLVM IR (-O0):
define void @f1([200 x i32]* %0) {
%2 = alloca [200 x i32]*
%3 = alloca i32
store [200 x i32]* %0, [200 x i32]** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load [200 x i32]*, [200 x i32]** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [200 x i32], [200 x i32]* %8, i64 %10
%12 = getelementptr inbounds [200 x i32], [200 x i32]* %11, i64 0, i64 1
store i32 3, i32* %12
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @f1([200 x i32]* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %13, %2 ]
%4 = getelementptr inbounds [200 x i32], [200 x i32]* %0, i64 %3, i64 1
store i32 3, i32* %4
%5 = add nuw nsw i64 %3, 1
%6 = getelementptr inbounds [200 x i32], [200 x i32]* %0, i64 %5, i64 1
store i32 3, i32* %6
%7 = add nuw nsw i64 %3, 2
%8 = getelementptr inbounds [200 x i32], [200 x i32]* %0, i64 %7, i64 1
store i32 3, i32* %8
%9 = add nuw nsw i64 %3, 3
%10 = getelementptr inbounds [200 x i32], [200 x i32]* %0, i64 %9, i64 1
store i32 3, i32* %10
%11 = add nuw nsw i64 %3, 4
%12 = getelementptr inbounds [200 x i32], [200 x i32]* %0, i64 %11, i64 1
store i32 3, i32* %12
%13 = add nuw nsw i64 %3, 5
%14 = icmp eq i64 %13, 100
br i1 %14, label %15, label %2
15: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *args[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("%s\n", args[i]);
  }
  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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\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
store i32 0, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

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

/* Variables and functions */
struct UPnPDevice *UPnPGetDevice2(struct UPnPDevice *, int, int *);
struct UPnPDevice *UPnPGetDevice1(struct UPnPDevice *device, int index) {
  int c_Index = -1;
  return UPnPGetDevice2(device, index, &c_Index);
}


x86 assembly (clang, -O0):
<UPnPGetDevice1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <UPnPGetDevice2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPGetDevice1>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rdx
call   1030 <UPnPGetDevice2@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.UPnPDevice = type { i32 }
define %struct.UPnPDevice* @UPnPGetDevice1(%struct.UPnPDevice* %0, i32 %1) {
%3 = alloca %struct.UPnPDevice*
%4 = alloca i32
%5 = alloca i32
store %struct.UPnPDevice* %0, %struct.UPnPDevice** %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%6 = load %struct.UPnPDevice*, %struct.UPnPDevice** %3
%7 = load i32, i32* %4
%8 = call %struct.UPnPDevice* @UPnPGetDevice2(%struct.UPnPDevice* %6, i32 %7, i32* %5)
ret %struct.UPnPDevice* %8
}

LLVM IR (-O2):
%struct.UPnPDevice = type { i32 }
define %struct.UPnPDevice* @UPnPGetDevice1(%struct.UPnPDevice* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 -1, i32* %3
%5 = call %struct.UPnPDevice* @UPnPGetDevice2(%struct.UPnPDevice* %0, i32 %1, i32* %3)
ret %struct.UPnPDevice* %5
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
void __operation(int32_t a, int32_t b, int32_t *ptr_c) {
  int32_t c;
  c = a + b;
  *ptr_c = c;
}


x86 assembly (clang, -O0):
<__operation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__operation>:
add    %rsi,%rdi
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define void @__operation(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = add nsw i64 %8, %9
store i64 %10, i64* %7
%11 = load i64, i64* %7
%12 = load i64*, i64** %6
store i64 %11, i64* %12
ret void
}

LLVM IR (-O2):
define void @__operation(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = add nsw i64 %1, %0
store i64 %4, i64* %2
ret void
}
/* Variables and functions */
int applid2fd(unsigned int);
int capi20_fileno(unsigned ApplID) { return applid2fd(ApplID); }


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

x86 assembly (clang, -O2):
<capi20_fileno>:
jmp    1030 <applid2fd@plt>

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

LLVM IR (-O2):
define i32 @capi20_fileno(i32 %0) {
%2 = tail call i32 @applid2fd(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ myputchar(int /*<<< orphan*/);
void myputs(const char *str) {
  while (*str)
    myputchar(*str++);
}


x86 assembly (clang, -O0):
<myputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <myputs+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <myputchar@plt>
jmp    111c <myputs+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @myputs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @myputchar(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @myputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @myputchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_lexval();
int /*<<< orphan*/ var_dcl();
int yyselect();
struct_dec() {
  switch (yyselect()) {
  case 35: {
    get_lexval();
    get_lexval();
    get_lexval();
    var_dcl();
    get_lexval();
    get_lexval();
  } break;
  }
}


x86 assembly (clang, -O0):
<struct_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <yyselect@plt>
sub    $0x23,%eax
jne    1177 <struct_dec+0x47>
jmp    114d <struct_dec+0x1d>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    $0x0,%al
call   1030 <var_dcl@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    $0x0,%al
call   1050 <get_lexval@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<struct_dec>:
push   %rax
xor    %eax,%eax
call   1040 <yyselect@plt>
cmp    $0x23,%eax
jne    1167 <struct_dec+0x37>
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1030 <var_dcl@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
xor    %eax,%eax
call   1050 <get_lexval@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @struct_dec() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %10 [
i32 35, label %3
]
3: ; preds = %0
%4 = call i32 (...) @get_lexval()
%5 = call i32 (...) @get_lexval()
%6 = call i32 (...) @get_lexval()
%7 = call i32 (...) @var_dcl()
%8 = call i32 (...) @get_lexval()
%9 = call i32 (...) @get_lexval()
br label %10
10: ; preds = %0, %3
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @struct_dec() {
%1 = tail call i32 (...) @yyselect()
%2 = icmp eq i32 %1, 35
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i32 (...) @get_lexval()
%5 = tail call i32 (...) @get_lexval()
%6 = tail call i32 (...) @get_lexval()
%7 = tail call i32 (...) @var_dcl()
%8 = tail call i32 (...) @get_lexval()
%9 = tail call i32 (...) @get_lexval()
br label %10
10: ; preds = %0, %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fistp_preg32_dword(int reg32) {
  put8(0xDB);
  put8(0x18 + reg32);
}


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

x86 assembly (clang, -O2):
<fistp_preg32_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdb,%edi
call   1030 <put8@plt>
add    $0x18,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fistp_preg32_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 219)
%4 = load i32, i32* %2
%5 = add nsw i32 24, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fistp_preg32_dword(i32 %0) {
%2 = tail call i32 @put8(i32 219)
%3 = add nsw i32 %0, 24
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  printf("%d\n%d", a * a, a * a * a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    %edx,%esi
imul   %edx,%esi
imul   %esi,%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d\0A%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 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void pr_array(int a[], int len) {
  int k;
  for (k = 0; k < len; k++)
    printf("%d, ", a[k]);
  printf("\n");
}


x86 assembly (clang, -O0):
<pr_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <pr_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <pr_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <pr_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <pr_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @pr_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int int16_handler(void) {
  printf("\nint16: keyboard not supported right now.\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"\0Aint16: keyboard not supported right now.\0A\00"
define i32 @int16_handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [42 x i8] c"\0Aint16: keyboard not supported right now.\00"
define i32 @int16_handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct mntent *getmntent_r(int /*<<< orphan*/ *, struct mntent *, char *, int);
char *malloc(int);
int /*<<< orphan*/ perror(char *);
struct mntent *getmntent(FILE *fp) {
  static char *buf = NULL;
  static struct mntent mntbuf;
  buf = malloc(1024);
  if (!buf)
    perror("malloc");
  return getmntent_r(fp, &mntbuf, buf, 1024);
}


x86 assembly (clang, -O0):
<getmntent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,0x2ef3(%rip)
cmpq   $0x0,0x2eeb(%rip)
jne    1167 <getmntent+0x37>
lea    0xe9e(%rip),%rdi
call   1050 <perror@plt>
mov    -0x8(%rbp),%rdi
mov    0x2ece(%rip),%rdx
lea    0x2ecf(%rip),%rsi
mov    $0x400,%ecx
call   1030 <getmntent_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmntent>:
push   %rbx
mov    %rdi,%rbx
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,0x2efb(%rip)
test   %rax,%rax
je     1162 <getmntent+0x32>
lea    0x2ef7(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
mov    $0x400,%ecx
pop    %rbx
jmp    1030 <getmntent_r@plt>
lea    0xe97(%rip),%rdi
call   1050 <perror@plt>
mov    0x2ecb(%rip),%rax
jmp    114a <getmntent+0x1a>

LLVM IR (-O0):
%struct.mntent = type { i32 }
@getmntent.buf = internal global i8* null
@getmntent.mntbuf = internal global %struct.mntent zeroinitializer
@.str = [7 x i8] c"malloc\00"
define %struct.mntent* @getmntent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i8* @malloc(i32 1024)
store i8* %3, i8** @getmntent.buf
%4 = load i8*, i8** @getmntent.buf
%5 = icmp ne i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i32*, i32** %2
%10 = load i8*, i8** @getmntent.buf
%11 = call %struct.mntent* @getmntent_r(i32* %9, %struct.mntent* @getmntent.mntbuf, i8* %10, i32 1024)
ret %struct.mntent* %11
}

LLVM IR (-O2):
%struct.mntent = type { i32 }
@getmntent.buf = internal unnamed_addr global i8* null
@getmntent.mntbuf = internal global %struct.mntent zeroinitializer
@.str = [7 x i8] c"malloc\00"
define %struct.mntent* @getmntent(i32* %0) {
%2 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
store i8* %2, i8** @getmntent.buf
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** @getmntent.buf
br label %7
7: ; preds = %4, %1
%8 = phi i8* [ %6, %4 ], [ %2, %1 ]
%9 = tail call %struct.mntent* @getmntent_r(i32* %0, %struct.mntent* @getmntent.mntbuf, i8* %8, i32 1024)
ret %struct.mntent* %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlPeripheralDisable(uint32_t ui32Peripheral) {
  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe600,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe600,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralDisable>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movq   $0x0,0x43fcc000(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074783744, %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, 4026531840
%9 = or i64 %8, 33554432
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = add nsw i32 1074783744, %12
%14 = sext i32 %13 to i64
%15 = and i64 %14, 1048575
%16 = shl i64 %15, 5
%17 = or i64 %9, %16
%18 = load i32, i32* %2
%19 = and i32 %18, 255
%20 = shl i32 %19, 2
%21 = sext i32 %20 to i64
%22 = or i64 %17, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 0, i64* %23
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralDisable(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140637696
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
store volatile i64 0, i64* %9
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *__mempcpy(void *dest, const void *src, size_t len) {
  return memcpy(dest, src, len) + len;
}


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

x86 assembly (clang, -O2):
<__mempcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @__mempcpy(i8* writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
%4 = getelementptr i8, i8* %0, i64 %2
ret i8* %4
}
/* Variables and functions */
int *malloc(int);
int *tabAlloc(int size) { return malloc(size * sizeof(int)); }


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

x86 assembly (clang, -O2):
<tabAlloc>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @tabAlloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = mul i64 %4, 4
%6 = trunc i64 %5 to i32
%7 = call i32* @malloc(i32 %6)
ret i32* %7
}

LLVM IR (-O2):
define noalias i32* @tabAlloc(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i32* @malloc(i32 %2)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ test_admm_gauss(int, int);
int main() {
  int n = 5;
  int k = 2;
  test_admm_gauss(n, k);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_admm_gauss(i32 5, i32 2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
scalar_t__ ftruncate(int, int /*<<< orphan*/);
int restart_ftruncate(int fd, off_t size) {
  while (ftruncate(fd, size) < 0) {
    if (errno != EINTR)
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<restart_ftruncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <ftruncate@plt>
cmp    $0x0,%rax
jge    115e <restart_ftruncate+0x4e>
mov    0x2ea6(%rip),%rax
mov    (%rax),%rax
mov    0x2e94(%rip),%rcx
cmp    (%rcx),%rax
je     1159 <restart_ftruncate+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <restart_ftruncate+0x55>
jmp    111e <restart_ftruncate+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restart_ftruncate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r14
mov    0x2eaf(%rip),%r15
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <ftruncate@plt>
test   %rax,%rax
jns    114d <restart_ftruncate+0x3d>
mov    (%r14),%rax
cmp    (%r15),%rax
je     1130 <restart_ftruncate+0x20>
mov    $0xffffffff,%eax
jmp    114f <restart_ftruncate+0x3f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @restart_ftruncate(i32 %0, i32 %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i64 @ftruncate(i32 %0, i32 %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
br i1 %9, label %3, label %10
10: ; preds = %3, %6
%11 = phi i32 [ -1, %6 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ f20(int /*<<< orphan*/, int, int, int, int, int, int, int,
                       int, int, int, int, int, int, int, int, int, int, int,
                       int);
void t() {
  f20(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19);
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0xb,0x28(%rsp)
movl   $0xc,0x30(%rsp)
movl   $0xd,0x38(%rsp)
movl   $0xe,0x40(%rsp)
movl   $0xf,0x48(%rsp)
movl   $0x10,0x50(%rsp)
movl   $0x11,0x58(%rsp)
movl   $0x12,0x60(%rsp)
movl   $0x13,0x68(%rsp)
call   1030 <f20@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0x13
push   $0x12
push   $0x11
push   $0x10
push   $0xf
push   $0xe
push   $0xd
push   $0xc
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1030 <f20@plt>
add    $0x70,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @t() {
%1 = call i32 @f20(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19)
ret void
}

LLVM IR (-O2):
define void @t() {
%1 = tail call i32 @f20(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
int main(void) {
  foo(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
ret i32 0
}
int main() {
  int real = 0;
  int *const pointer = &real;
  *pointer = 9;
  return real;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x9,(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 9
}
unsigned int inportl(unsigned short _port) {
  unsigned int rv;
  asm volatile("inl %1, %0" : "=a"(rv) : "dN"(_port));
  return rv;
}


x86 assembly (clang, -O0):
<inportl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inportl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inportl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inportl(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ NupAndDown();
void Ncc(void) {
  int x;
  for (x = 0; x < 8; x++) {
    NupAndDown();
  }
}


x86 assembly (clang, -O0):
<Ncc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    113e <Ncc+0x2e>
mov    $0x0,%al
call   1030 <NupAndDown@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <Ncc+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ncc>:
push   %rax
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
call   1030 <NupAndDown@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <NupAndDown@plt>

LLVM IR (-O0):
define void @Ncc() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 8
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 (...) @NupAndDown()
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @Ncc() {
%1 = tail call i32 (...) @NupAndDown()
%2 = tail call i32 (...) @NupAndDown()
%3 = tail call i32 (...) @NupAndDown()
%4 = tail call i32 (...) @NupAndDown()
%5 = tail call i32 (...) @NupAndDown()
%6 = tail call i32 (...) @NupAndDown()
%7 = tail call i32 (...) @NupAndDown()
%8 = tail call i32 (...) @NupAndDown()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int X509_cmp_time_internal(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
int X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) {
  return X509_cmp_time_internal(ctm, cmp_time, 0);
}


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

x86 assembly (clang, -O2):
<X509_cmp_time>:
xor    %edx,%edx
jmp    1030 <X509_cmp_time_internal@plt>

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

LLVM IR (-O2):
define i32 @X509_cmp_time(i32* %0, i32* %1) {
%3 = tail call i32 @X509_cmp_time_internal(i32* %0, i32* %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ move_file(char *, char *);
int /*<<< orphan*/ pre_write(char *);
void sendaster(char *path) {
  pre_write(" all aster ");
  move_file("all.mail", path);
}


x86 assembly (clang, -O0):
<sendaster>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <pre_write@plt>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <move_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendaster>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <pre_write@plt>
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <move_file@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" all aster \00"
@.str.1 = [9 x i8] c"all.mail\00"
define void @sendaster(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @pre_write(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @move_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" all aster \00"
@.str.1 = [9 x i8] c"all.mail\00"
define void @sendaster(i8* %0) {
%2 = tail call i32 @pre_write(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @move_file(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
void str_exchange(char *str, char old, char new) {
  assert(str);
  for (; *str; str++)
    if (*str == old)
      *str = new;
}


x86 assembly (clang, -O0):
<str_exchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116f <str_exchange+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1159 <str_exchange+0x49>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    115e <str_exchange+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <str_exchange+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_exchange>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%al
test   %al,%al
je     1146 <str_exchange+0x36>
add    $0x1,%rbx
jmp    113b <str_exchange+0x2b>
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1146 <str_exchange+0x36>
cmp    %bpl,%al
jne    1130 <str_exchange+0x20>
mov    %r14b,-0x1(%rbx)
jmp    1130 <str_exchange+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @str_exchange(i8* %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @assert(i8* %0)
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %3, %12
%8 = phi i8 [ %14, %12 ], [ %5, %3 ]
%9 = phi i8* [ %13, %12 ], [ %0, %3 ]
%10 = icmp eq i8 %8, %1
br i1 %10, label %11, label %12
11: ; preds = %7
store i8 %2, i8* %9
br label %12
12: ; preds = %7, %11
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %12, %3
ret void
}
int dalavuelta(int numero) {
  int resultado = 0;
  while (numero > 0) {
    resultado = resultado * 10 + numero % 10;
    numero = numero / 10;
  }
  return resultado;
}


x86 assembly (clang, -O0):
<dalavuelta>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <dalavuelta+0x45>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <dalavuelta+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dalavuelta>:
xor    %eax,%eax
test   %edi,%edi
jle    1131 <dalavuelta+0x31>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <dalavuelta+0x10>
ret

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

LLVM IR (-O2):
define i32 @dalavuelta(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = urem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = udiv i32 %5, 10
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char mls_type_get_char(unsigned char *buf, unsigned int len) {
  char dst = 0;
  assert(1 <= len);
  dst |= (char)(buf[0] & 0xff);
  return dst;
}


x86 assembly (clang, -O0):
<mls_type_get_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movb   $0x0,-0xd(%rbp)
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xff,%eax
movsbl %al,%ecx
movsbl -0xd(%rbp),%eax
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mls_type_get_char>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %esi,%esi
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @mls_type_get_char(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8 0, i8* %5
%6 = load i32, i32* %4
%7 = icmp ule i32 1, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = sext i8 %15 to i32
%17 = load i8, i8* %5
%18 = sext i8 %17 to i32
%19 = or i32 %18, %16
%20 = trunc i32 %19 to i8
store i8 %20, i8* %5
%21 = load i8, i8* %5
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @mls_type_get_char(i8* nocapture %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i8, i8* %0
ret i8 %6
}