xunge/DecIR huggingface dataset:
void free2DMatrix(int **M, int rows) {
  int i;
  for (i = 0; i < rows; i++)
    free(M[i]);
  free(M);
  return;
}


x86 assembly (clang, -O0):
<free2DMatrix>:
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    1151 <free2DMatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free2DMatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free2DMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free2DMatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free2DMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free2DMatrix(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 = bitcast i32* %15 to i8*
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 = load i32**, i32*** %3
%22 = bitcast i32** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @free2DMatrix(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 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%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 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
int bow_multiplier(int sval) { return (sval % 10); }


x86 assembly (clang, -O0):
<bow_multiplier>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bow_multiplier>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bow_multiplier(i32 %0) {
%2 = srem i32 %0, 10
ret i32 %2
}
/* Type definitions */
struct user_t {
  int dummy;
};

/* Variables and functions */
int mhia_handle_msg(struct user_t *, void *);
int user_handler_message(struct user_t *user, void *msg) {
  return mhia_handle_msg(user, msg);
}


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

x86 assembly (clang, -O2):
<user_handler_message>:
jmp    1030 <mhia_handle_msg@plt>

LLVM IR (-O0):
%struct.user_t = type { i32 }
define i32 @user_handler_message(%struct.user_t* %0, i8* %1) {
%3 = alloca %struct.user_t*
%4 = alloca i8*
store %struct.user_t* %0, %struct.user_t** %3
store i8* %1, i8** %4
%5 = load %struct.user_t*, %struct.user_t** %3
%6 = load i8*, i8** %4
%7 = call i32 @mhia_handle_msg(%struct.user_t* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.user_t = type { i32 }
define i32 @user_handler_message(%struct.user_t* %0, i8* %1) {
%3 = tail call i32 @mhia_handle_msg(%struct.user_t* %0, i8* %1)
ret i32 %3
}
void PrintChar(char c) {}


x86 assembly (clang, -O0):
<PrintChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @PrintChar(i8 signext %0) {
ret void
}
unsigned long ConvertTo16(unsigned long Address) {
  return (((Address >> 1) & 0x0001FFFF) | (Address & 0x000C0000L));
}


x86 assembly (clang, -O0):
<ConvertTo16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
and    $0x1ffff,%rax
mov    -0x8(%rbp),%rcx
and    $0xc0000,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertTo16>:
mov    %edi,%eax
shr    %eax
and    $0x1ffff,%eax
and    $0xc0000,%edi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ConvertTo16(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = and i64 %4, 131071
%6 = load i64, i64* %2
%7 = and i64 %6, 786432
%8 = or i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @ConvertTo16(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %2, 131071
%4 = and i64 %0, 786432
%5 = or i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ LogSetThresholdLevel(int);
int atoi(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void CmdLog(int argc, char *argv[]) {
  int n;
  {
    if ((argc - 1) < 1) {
      fprintf(stderr, "Error: %d arguments required\n", 1);
      return;
    }
  };
  n = atoi(argv[1]);
  LogSetThresholdLevel(n);
}


x86 assembly (clang, -O0):
<CmdLog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cmp    $0x1,%eax
jge    116d <CmdLog+0x3d>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
mov    $0x1,%edx
call   1040 <fprintf@plt>
jmp    1185 <CmdLog+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <LogSetThresholdLevel@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdLog>:
push   %rax
cmp    $0x1,%edi
jg     1151 <CmdLog+0x21>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x1,%edx
pop    %rax
jmp    1040 <fprintf@plt>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <LogSetThresholdLevel@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Error: %d arguments required\0A\00"
define void @CmdLog(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 1)
br label %19
12: ; preds = %2
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = call i32 @LogSetThresholdLevel(i32 %17)
br label %19
19: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Error: %d arguments required\0A\00"
define void @CmdLog(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 1)
br label %12
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @LogSetThresholdLevel(i32 %10)
br label %12
12: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WSACleanup();
void stopWinsock() { WSACleanup(); }


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

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

LLVM IR (-O0):
define void @stopWinsock() {
%1 = call i32 (...) @WSACleanup()
ret void
}

LLVM IR (-O2):
define void @stopWinsock() {
%1 = tail call i32 (...) @WSACleanup()
ret void
}
void handle_cmd_line(struct network *net, char *line) {}


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

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

LLVM IR (-O0):
%struct.network = type opaque
define void @handle_cmd_line(%struct.network* %0, i8* %1) {
%3 = alloca %struct.network*
%4 = alloca i8*
store %struct.network* %0, %struct.network** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.network = type opaque
define void @handle_cmd_line(%struct.network* nocapture %0, i8* nocapture %1) {
ret void
}
int main(void) {
  int c[] = {1, 2, 3, 4};
  printf("%d\n", 0 [c]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
int somar(int x, int y) { return x + y; }


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

x86 assembly (clang, -O2):
<somar>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @somar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int calc_rownum(c, r) {
  if (c < 81)
    return 9 * c + r;
  else
    return (c - 81) + 9 * r;
}


x86 assembly (clang, -O0):
<calc_rownum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x51,-0x8(%rbp)
jge    1123 <calc_rownum+0x23>
imul   $0x9,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <calc_rownum+0x32>
mov    -0x8(%rbp),%eax
sub    $0x51,%eax
imul   $0x9,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_rownum>:
lea    -0x51(%rdi),%ecx
cmp    $0x51,%edi
lea    (%rsi,%rsi,8),%edx
cmovl  %esi,%edx
lea    (%rdi,%rdi,8),%eax
cmovge %ecx,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @calc_rownum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 81
%4 = add nsw i32 %0, -81
%5 = mul nsw i32 %1, 9
%6 = mul nsw i32 %0, 9
%7 = select i1 %3, i32 %1, i32 %5
%8 = select i1 %3, i32 %6, i32 %4
%9 = add nsw i32 %8, %7
ret i32 %9
}
int rec_eukl(int a, int b) {
  int temp;
  if (b < a) {
    temp = b;
    b = a;
    a = temp;
  }
  if (a == 0) {
    return b;
  } else {
    rec_eukl(a, b % a);
  }
}


x86 assembly (clang, -O0):
<rec_eukl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113c <rec_eukl+0x2c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <rec_eukl+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <rec_eukl+0x52>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
call   1030 <rec_eukl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec_eukl>:
cmp    %edi,%esi
mov    %edi,%ecx
cmovl  %esi,%ecx
cmovl  %edi,%esi
test   %ecx,%ecx
je     1133 <rec_eukl+0x33>
mov    %esi,%edx
mov    %ecx,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%eax
cltd
idiv   %ecx
test   %ecx,%ecx
cmovns %edx,%edi
cmovns %ecx,%edx
mov    %edi,%ecx
test   %edi,%edi
jne    1120 <rec_eukl+0x20>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @rec_eukl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* %5
store i32 %11, i32* %6
%12 = load i32, i32* %4
store i32 %12, i32* %5
%13 = load i32, i32* %6
store i32 %13, i32* %4
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* %5
store i32 %18, i32* %3
br label %25
19: ; preds = %14
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = srem i32 %21, %22
%24 = call i32 @rec_eukl(i32 %20, i32 %23)
br label %25
25: ; preds = %17, %19
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @rec_eukl(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 %0, i32 %1
%6 = icmp eq i32 %4, 0
br i1 %6, label %15, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %13, %7 ], [ %5, %2 ]
%9 = phi i32 [ %12, %7 ], [ %4, %2 ]
%10 = srem i32 %8, %9
%11 = icmp sgt i32 %9, -1
%12 = select i1 %11, i32 %10, i32 %9
%13 = select i1 %11, i32 %9, i32 %10
%14 = icmp eq i32 %12, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
size_t list_meter_int32_t(const void *el) { return sizeof(int32_t); }


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

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

LLVM IR (-O0):
define i64 @list_meter_int32_t(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i64 4
}

LLVM IR (-O2):
define i64 @list_meter_int32_t(i8* nocapture readnone %0) {
ret i64 4
}
/* Type definitions */
struct gonc_array_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gonc_array_list_remove(struct gonc_array_list *, size_t);
int /*<<< orphan*/ gonc_entry_destroy(int /*<<< orphan*/);
void gonc_array_list_delete(struct gonc_array_list *array_list, size_t index) {
  gonc_entry_destroy(gonc_array_list_remove(array_list, index));
}


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

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

LLVM IR (-O0):
%struct.gonc_array_list = type { i32 }
define void @gonc_array_list_delete(%struct.gonc_array_list* %0, i64 %1) {
%3 = alloca %struct.gonc_array_list*
%4 = alloca i64
store %struct.gonc_array_list* %0, %struct.gonc_array_list** %3
store i64 %1, i64* %4
%5 = load %struct.gonc_array_list*, %struct.gonc_array_list** %3
%6 = load i64, i64* %4
%7 = call i32 @gonc_array_list_remove(%struct.gonc_array_list* %5, i64 %6)
%8 = call i32 @gonc_entry_destroy(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.gonc_array_list = type { i32 }
define void @gonc_array_list_delete(%struct.gonc_array_list* %0, i64 %1) {
%3 = tail call i32 @gonc_array_list_remove(%struct.gonc_array_list* %0, i64 %1)
%4 = tail call i32 @gonc_entry_destroy(i32 %3)
ret void
}
void linear(int p) {
  for (int i = 0; i < p; i++) {
  }
}


x86 assembly (clang, -O0):
<linear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <linear+0x2d>
jmp    111f <linear+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <linear+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @linear(i32 %0) {
ret void
}
/* Variables and functions */
int in(int);
int /*<<< orphan*/ out(int, int);
int vga_crt_in(int index) {
  out(0x03D4, index);
  return in(0x03D5);
}


x86 assembly (clang, -O0):
<vga_crt_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x3d4,%edi
call   1030 <out@plt>
mov    $0x3d5,%edi
call   1040 <in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vga_crt_in>:
push   %rax
mov    %edi,%esi
mov    $0x3d4,%edi
call   1030 <out@plt>
mov    $0x3d5,%edi
pop    %rax
jmp    1040 <in@plt>

LLVM IR (-O0):
define i32 @vga_crt_in(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @out(i32 980, i32 %3)
%5 = call i32 @in(i32 981)
ret i32 %5
}

LLVM IR (-O2):
define i32 @vga_crt_in(i32 %0) {
%2 = tail call i32 @out(i32 980, i32 %0)
%3 = tail call i32 @in(i32 981)
ret i32 %3
}
void MasterServer_OnChange(void) {}


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

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

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

LLVM IR (-O2):
define void @MasterServer_OnChange() {
ret void
}
void nodemap_mod_exit(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *malloc(uintptr_t);
uint32_t *mallocUint(uintptr_t numUints) {
  uint32_t *temp = NULL;
  temp = malloc(numUints * sizeof(uint32_t));
  return temp;
}


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

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

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

LLVM IR (-O2):
define noalias i32* @mallocUint(i64 %0) {
%2 = shl i64 %0, 2
%3 = tail call i32* @malloc(i64 %2)
ret i32* %3
}
int LoadConfig(char *FileName) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @LoadConfig(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_SYS_GetFlashClockFreq();
uint32_t CLOCK_SYS_GetFtfFreq(uint32_t instance) {
  (void)instance;
  return CLOCK_SYS_GetFlashClockFreq();
}


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

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

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

LLVM IR (-O2):
define i32 @CLOCK_SYS_GetFtfFreq(i32 %0) {
%2 = tail call i32 (...) @CLOCK_SYS_GetFlashClockFreq()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ palFind();
int main() {
  palFind();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @palFind()
ret i32 0
}
char *tail(s)
register char *s;
{
  register char *t;
  t = s;
  while (*s)
    if (*s++ == '/')
      t = s;
  return (t);
}


x86 assembly (clang, -O0):
<tail>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <tail+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1140 <tail+0x40>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <tail+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tail>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <tail+0x22>
lea    0x1(%rax),%rdx
nopl   (%rax)
cmp    $0x2f,%cl
cmove  %rdx,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <tail+0x10>
ret

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

LLVM IR (-O2):
define i8* @tail(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = icmp eq i8 %5, 47
%10 = select i1 %9, i8* %8, i8* %6
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void DeleteEntropyData(void *entropyattr) { free(entropyattr); }


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

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

LLVM IR (-O2):
define void @DeleteEntropyData(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ svz_log(int /*<<< orphan*/, char *);
void *svz_malloc_func(size_t);
void *svz_pmalloc(size_t size) {
  void *ptr = svz_malloc_func(size);
  if (ptr == NULL) {
    svz_log(0, "malloc: virtual memory exhausted\n");
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<svz_pmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <svz_malloc_func@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116c <svz_pmalloc+0x3c>
xor    %edi,%edi
lea    0xea3(%rip),%rsi
call   1050 <svz_log@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svz_pmalloc>:
push   %rax
call   1030 <svz_malloc_func@plt>
test   %rax,%rax
je     113d <svz_pmalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rsi
xor    %edi,%edi
call   1050 <svz_log@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"malloc: virtual memory exhausted\0A\00"
define i8* @svz_pmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @svz_malloc_func(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @svz_log(i32 0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [34 x i8] c"malloc: virtual memory exhausted\0A\00"
define i8* @svz_pmalloc(i64 %0) {
%2 = tail call i8* @svz_malloc_func(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @svz_log(i32 0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
void endutxent(void) {}


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

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

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

LLVM IR (-O2):
define void @endutxent() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void error(void) { write(2, "Erreur\n", 7); }


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
mov    $0x7,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Erreur\0A\00"
define void @error() {
%1 = call i32 @write(i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Erreur\0A\00"
define void @error() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
ret void
}
/* Type definitions */
struct s_vector {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct s_vector *);
scalar_t__ vector_destroy(struct s_vector *);
int vector_delete(struct s_vector **vector) {
  assert(vector != NULL);
  if (vector_destroy(*vector))
    return (-1);
  free(*vector);
  return (0);
}


x86 assembly (clang, -O0):
<vector_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <vector_destroy@plt>
cmp    $0x0,%rax
je     1170 <vector_delete+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <vector_delete+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_delete>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rdi
call   1050 <vector_destroy@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1159 <vector_delete+0x29>
pop    %rbx
ret
mov    (%rbx),%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.s_vector = type { i32 }
define i32 @vector_delete(%struct.s_vector** %0) {
%2 = alloca i32
%3 = alloca %struct.s_vector**
store %struct.s_vector** %0, %struct.s_vector*** %3
%4 = load %struct.s_vector**, %struct.s_vector*** %3
%5 = icmp ne %struct.s_vector** %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load %struct.s_vector**, %struct.s_vector*** %3
%9 = load %struct.s_vector*, %struct.s_vector** %8
%10 = call i64 @vector_destroy(%struct.s_vector* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %17
13: ; preds = %1
%14 = load %struct.s_vector**, %struct.s_vector*** %3
%15 = load %struct.s_vector*, %struct.s_vector** %14
%16 = call i32 @free(%struct.s_vector* %15)
store i32 0, i32* %2
br label %17
17: ; preds = %13, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.s_vector = type { i32 }
define i32 @vector_delete(%struct.s_vector** %0) {
%2 = icmp ne %struct.s_vector** %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load %struct.s_vector*, %struct.s_vector** %0
%6 = tail call i64 @vector_destroy(%struct.s_vector* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load %struct.s_vector*, %struct.s_vector** %0
%10 = tail call i32 @free(%struct.s_vector* %9)
br label %11
11: ; preds = %1, %8
%12 = phi i32 [ 0, %8 ], [ -1, %1 ]
ret i32 %12
}
void d2i_OCSP_RESPID(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OCSP_RESPID() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void del_usage() {
  printf("Usage: remove { target | interface | access-list } \n");
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"Usage: remove { target | interface | access-list } \0A\00"
define void @del_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"Usage: remove { target | interface | access-list } \00"
define void @del_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(int *, int *, int);
void move_ivector_1left_block(int *v, long nl, long nh) {
  memmove(v + nl - 1, v + nl, 4 * (nh - nl + 1));
}


x86 assembly (clang, -O0):
<move_ivector_1left_block>:
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    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_ivector_1left_block>:
lea    (%rdi,%rsi,4),%rax
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
sub    %esi,%edx
lea    0x4(,%rdx,4),%edx
mov    %rax,%rsi
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @move_ivector_1left_block(i32* %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = sub nsw i64 %2, %1
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 2
%9 = add i32 %8, 4
%10 = tail call i32 @memmove(i32* %5, i32* %4, i32 %9)
ret void
}
char *checkStr(char *ptr, char const *str) {
  while (*str)
    if (*ptr++ != *str++)
      return 0;
  return ptr;
}


x86 assembly (clang, -O0):
<checkStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <checkStr+0x57>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1152 <checkStr+0x52>
movq   $0x0,-0x8(%rbp)
jmp    115f <checkStr+0x5f>
jmp    110c <checkStr+0xc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkStr>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi),%ecx
test   %cl,%cl
je     1128 <checkStr+0x28>
lea    0x1(%rax),%rdx
add    $0x1,%rsi
cmp    %cl,(%rax)
mov    %rdx,%rax
je     1110 <checkStr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @checkStr(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %11, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %10, %6
br i1 %12, label %3, label %13
13: ; preds = %3, %8
%14 = phi i8* [ null, %8 ], [ %4, %3 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ strchr(char *, int);
int ctype_822special(int c) { return strchr("()<>@,;:\\\".[]", c) != 0; }


x86 assembly (clang, -O0):
<ctype_822special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctype_822special>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"()<>@,;:\\\22.[]\00"
define i32 @ctype_822special(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @strchr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [14 x i8] c"()<>@,;:\\\22.[]\00"
define i32 @ctype_822special(i32 %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fft_is_delimeter(char);
int fft_advance(char **str) {
  while (!fft_is_delimeter(**str))
    ++(*str);
  return (1);
}


x86 assembly (clang, -O0):
<fft_advance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <fft_is_delimeter@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1140 <fft_advance+0x30>
jmp    1153 <fft_advance+0x43>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <fft_advance+0xc>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fft_advance>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <fft_is_delimeter@plt>
test   %eax,%eax
jne    1139 <fft_advance+0x29>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <fft_advance+0x10>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fft_advance(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i32 @fft_is_delimeter(i8 signext %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i32 @fft_is_delimeter(i8 signext %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %6, label %12
12: ; preds = %6, %1
ret i32 1
}
void __gcj_personality_v0(void) {}


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

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

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

LLVM IR (-O2):
define void @__gcj_personality_v0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) { printf("Hello World!\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int store_new_hyperplane_sections(int m, int k, int n, double *c) {
  int a[3], *b, fail;
  a[0] = m;
  a[1] = k;
  a[2] = n;
  fail = _ada_use_c2phc(60, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<store_new_hyperplane_sections>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x3c,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_new_hyperplane_sections>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x3c,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @store_new_hyperplane_sections(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [3 x i32]
%10 = alloca i32*
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%19 = load i32*, i32** %10
%20 = load double*, double** %8
%21 = call i32 @_ada_use_c2phc(i32 60, i32* %18, i32* %19, double* %20)
store i32 %21, i32* %11
%22 = load i32, i32* %11
ret i32 %22
}

LLVM IR (-O2):
define i32 @store_new_hyperplane_sections(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca [3 x i32]
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %2, i32* %9
%10 = call i32 @_ada_use_c2phc(i32 60, i32* %7, i32* undef, double* %3)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void write_uint32(uint32_t offset, uint32_t value) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ mat3_zero(float *);
__attribute__((always_)) struct mat3 *psmat3_zero(struct mat3 *result) {
  mat3_zero((float *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat3_zero>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat3_zero@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_zero(%struct.mat3* %0) {
%2 = alloca %struct.mat3*
store %struct.mat3* %0, %struct.mat3** %2
%3 = load %struct.mat3*, %struct.mat3** %2
%4 = bitcast %struct.mat3* %3 to float*
%5 = call i32 @mat3_zero(float* %4)
%6 = load %struct.mat3*, %struct.mat3** %2
ret %struct.mat3* %6
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_zero(%struct.mat3* returned %0) {
%2 = bitcast %struct.mat3* %0 to float*
%3 = tail call i32 @mat3_zero(float* %2)
ret %struct.mat3* %0
}
void forfft_(x, n, isign) register struct complex *x;
int *n, *isign;
{ forfft(x, (*n), (*isign)); }


x86 assembly (clang, -O0):
<forfft_>:
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    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1030 <forfft@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forfft_>:
mov    (%rsi),%esi
mov    (%rdx),%edx
xor    %eax,%eax
jmp    1030 <forfft@plt>

LLVM IR (-O0):
%struct.complex = type opaque
define void @forfft_(%struct.complex* %0, i32* %1, i32* %2) {
%4 = alloca %struct.complex*
%5 = alloca i32*
%6 = alloca i32*
store %struct.complex* %0, %struct.complex** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.complex*, %struct.complex** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 (%struct.complex*, i32, i32, ...) bitcast (i32 (...)* @forfft to i32 (%struct.complex*, i32, i32, ...)*)(%struct.complex* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.complex = type opaque
define void @forfft_(%struct.complex* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 (%struct.complex*, i32, i32, ...) bitcast (i32 (...)* @forfft to i32 (%struct.complex*, i32, i32, ...)*)(%struct.complex* %0, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
char IN(int);
char uartRead() { return IN(0x00); }


x86 assembly (clang, -O0):
<uartRead>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <IN@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uartRead>:
xor    %edi,%edi
jmp    1030 <IN@plt>

LLVM IR (-O0):
define signext i8 @uartRead() {
%1 = call signext i8 @IN(i32 0)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @uartRead() {
%1 = tail call signext i8 @IN(i32 0)
ret i8 %1
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void SetApplnKeyPad() { WRITETEST("\033="); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\1B=\00"
define void @SetApplnKeyPad() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\1B=\00"
define void @SetApplnKeyPad() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ dlsym(void *, char const *);
const char *ll_bcsym(void *lib, const char *sym) {
  return (const char *)dlsym(lib, sym);
}


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

x86 assembly (clang, -O2):
<ll_bcsym>:
jmp    1030 <dlsym@plt>

LLVM IR (-O0):
define i8* @ll_bcsym(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @dlsym(i8* %5, i8* %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @ll_bcsym(i8* %0, i8* %1) {
%3 = tail call i64 @dlsym(i8* %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}