xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetICValues() {
  printf("XSetICValues called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"XSetICValues called\00"
define i32 @XSetICValues() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void konk_delay(int delay) {
  int i;
  for (i = 0; i < (1000 * delay); i++) {
    barrier();
  }
}


x86 assembly (clang, -O0):
<konk_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3e8,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    1149 <konk_delay+0x39>
mov    $0x0,%al
call   1030 <barrier@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <konk_delay+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<konk_delay>:
push   %rbx
test   %edi,%edi
jle    113c <konk_delay+0x2c>
imul   $0x3e8,%edi,%eax
cmp    $0x2,%eax
mov    $0x1,%ebx
cmovge %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <barrier@plt>
add    $0xffffffff,%ebx
jne    1130 <konk_delay+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @konk_delay(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = mul i32 %0, 1000
%5 = call i32 @llvm.smax.i32(i32 %4, i32 1)
br label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = tail call i32 (...) @barrier()
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %5
br i1 %10, label %11, label %6
11: ; preds = %6, %1
ret void
}
void report_magnetic_data(struct ssp_data *data, struct sensor_value *mag) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.ssp_data = type opaque
%struct.sensor_value = type opaque
define void @report_magnetic_data(%struct.ssp_data* nocapture %0, %struct.sensor_value* nocapture %1) {
ret void
}
test_value(int value, int warning, int critical) {
  if (value >= warning && value < critical)
    return 1;
  if (value >= critical)
    return 2;
  if (value == -1)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<test_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1131 <test_value+0x31>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1131 <test_value+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1166 <test_value+0x66>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1149 <test_value+0x49>
movl   $0x2,-0x4(%rbp)
jmp    1166 <test_value+0x66>
cmpl   $0xffffffff,-0x8(%rbp)
jne    115f <test_value+0x5f>
movl   $0x2,-0x4(%rbp)
jmp    1166 <test_value+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_value>:
cmp    %esi,%edi
setge  %al
cmp    %edx,%edi
setl   %cl
and    %al,%cl
movzbl %cl,%eax
mov    $0x2,%ecx
sub    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
add    %eax,%eax
cmp    %edx,%edi
cmovge %ecx,%eax
cmp    %esi,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_value(i32 %0, i32 %1, i32 %2) {
%4 = icmp sge i32 %0, %1
%5 = icmp slt i32 %0, %2
%6 = and i1 %4, %5
%7 = xor i1 %5, true
%8 = or i1 %4, %7
%9 = select i1 %6, i32 1, i32 2
%10 = icmp eq i32 %0, -1
%11 = select i1 %10, i32 2, i32 0
%12 = select i1 %8, i32 %9, i32 %11
ret i32 %12
}
void gtk_tree_view_mode_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_mode_get_type() {
ret void
}
char RotCharUp(unsigned int value, char lBound, char rBound) {
  while (value > rBound)
    value = (unsigned int)lBound + (value - rBound - 1);
  return (char)value;
}


x86 assembly (clang, -O0):
<RotCharUp>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jbe    113b <RotCharUp+0x3b>
movsbl -0x5(%rbp),%eax
mov    -0x4(%rbp),%ecx
movsbl -0x6(%rbp),%edx
sub    %edx,%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <RotCharUp+0x12>
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RotCharUp>:
mov    %edi,%eax
cmp    %edi,%edx
jae    1116 <RotCharUp+0x16>
movsbl %sil,%esi
mov    %edx,%ecx
not    %ecx
add    %esi,%ecx
add    %ecx,%eax
cmp    %edx,%eax
ja     1110 <RotCharUp+0x10>
ret

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

LLVM IR (-O2):
define signext i8 @RotCharUp(i32 %0, i8 signext %1, i8 signext %2) {
%4 = sext i8 %2 to i32
%5 = icmp ult i32 %4, %0
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = sext i8 %1 to i32
%8 = xor i32 %4, -1
%9 = add nsw i32 %8, %7
br label %10
10: ; preds = %6, %10
%11 = phi i32 [ %0, %6 ], [ %12, %10 ]
%12 = add i32 %9, %11
%13 = icmp ugt i32 %12, %4
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi i32 [ %0, %3 ], [ %12, %10 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}
/* Type definitions */
struct connection_pool {
  int dummy;
};
struct connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cc_handshake(struct connection *);
int /*<<< orphan*/ cp_recv(struct connection_pool *, int /*<<< orphan*/,
                           int /*<<< orphan*/ *, int /*<<< orphan*/);
void close_client(struct connection_pool *server, struct connection *client) {
  cc_handshake(client);
  cp_recv(server, 0, NULL, 0);
}


x86 assembly (clang, -O0):
<close_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <cc_handshake@plt>
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%edx
mov    %ecx,%esi
call   1030 <cp_recv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_client>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <cc_handshake@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <cp_recv@plt>

LLVM IR (-O0):
%struct.connection_pool = type { i32 }
%struct.connection = type { i32 }
define void @close_client(%struct.connection_pool* %0, %struct.connection* %1) {
%3 = alloca %struct.connection_pool*
%4 = alloca %struct.connection*
store %struct.connection_pool* %0, %struct.connection_pool** %3
store %struct.connection* %1, %struct.connection** %4
%5 = load %struct.connection*, %struct.connection** %4
%6 = call i32 @cc_handshake(%struct.connection* %5)
%7 = load %struct.connection_pool*, %struct.connection_pool** %3
%8 = call i32 @cp_recv(%struct.connection_pool* %7, i32 0, i32* null, i32 0)
ret void
}

LLVM IR (-O2):
%struct.connection_pool = type { i32 }
%struct.connection = type { i32 }
define void @close_client(%struct.connection_pool* %0, %struct.connection* %1) {
%3 = tail call i32 @cc_handshake(%struct.connection* %1)
%4 = tail call i32 @cp_recv(%struct.connection_pool* %0, i32 0, i32* null, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\033[1;1H");
  printf("\033[0K");
  printf("\033[1;80H\033[31m+\033[0m");
  printf("\033[24;80H");
  printf("\033[31m+\033[0m");
  printf("[]");
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[1;1H\00"
@.str.1 = [5 x i8] c"\1B[0K\00"
@.str.2 = [18 x i8] c"\1B[1;80H\1B[31m+\1B[0m\00"
@.str.3 = [9 x i8] c"\1B[24;80H\00"
@.str.4 = [11 x i8] c"\1B[31m+\1B[0m\00"
@.str.5 = [3 x i8] c"[]\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[1;1H\00"
@.str.1 = [5 x i8] c"\1B[0K\00"
@.str.2 = [18 x i8] c"\1B[1;80H\1B[31m+\1B[0m\00"
@.str.3 = [9 x i8] c"\1B[24;80H\00"
@.str.4 = [11 x i8] c"\1B[31m+\1B[0m\00"
@.str.5 = [3 x i8] c"[]\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}
int __attribute__((cold)) bar() { return 1; }


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

x86 assembly (clang, -O2):
<bar>:
mov    $0x1,%eax
ret
cs nopw 0x0(%rax,%rax,1)

LLVM IR (-O0):
define i32 @bar() {
ret i32 1
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 1
}
/* Variables and functions */
size_t bin2b64_output_len(size_t in) { return ((in + 2) / 3) * 4; }


x86 assembly (clang, -O0):
<bin2b64_output_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin2b64_output_len>:
lea    0x2(%rdi),%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
lea    (%rdx,%rdx,1),%rax
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i64 @bin2b64_output_len(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 2
%5 = udiv i64 %4, 3
%6 = mul i64 %5, 4
ret i64 %6
}

LLVM IR (-O2):
define i64 @bin2b64_output_len(i64 %0) {
%2 = add i64 %0, 2
%3 = udiv i64 %2, 3
%4 = shl i64 %3, 2
ret i64 %4
}
int test_imm_19uint16_mem(unsigned short *val) {
  return ((*val) & (-0x19 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_19uint16_mem>:
movzwl (%rdi),%eax
test   $0xffe7,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_19uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -25
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Ola, Mundo!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%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 = [13 x i8] c"Ola, Mundo!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Ola, Mundo!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int possible_trees_aux(int /*<<< orphan*/, size_t);
unsigned possible_trees(size_t tree_size) {
  return possible_trees_aux(0, tree_size);
}


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

x86 assembly (clang, -O2):
<possible_trees>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <possible_trees_aux@plt>

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

LLVM IR (-O2):
define i32 @possible_trees(i64 %0) {
%2 = tail call i32 @possible_trees_aux(i32 0, i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ readfile(char const *, int *, int const *, char *, int *,
                            int *);
void dreadfile(const char *filename, const int *m, const int *n, double *A,
               const int *ldA, int *info) {
  int cm = *m * (int)(sizeof(double) / sizeof(char));
  int cldA = *ldA * (int)(sizeof(double) / sizeof(char));
  readfile(filename, &cm, n, (char *)A, &cldA, info);
}


x86 assembly (clang, -O0):
<dreadfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x3,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
shl    $0x3,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r9
lea    -0x34(%rbp),%rsi
lea    -0x38(%rbp),%r8
call   1030 <readfile@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dreadfile>:
push   %rax
mov    (%rsi),%eax
shl    $0x3,%eax
mov    %eax,0x4(%rsp)
mov    (%r8),%eax
shl    $0x3,%eax
mov    %eax,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%r8
call   1030 <readfile@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @dreadfile(i8* %0, i32* %1, i32* %2, double* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca double*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store double* %3, double** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = mul nsw i32 %16, 8
store i32 %17, i32* %13
%18 = load i32*, i32** %11
%19 = load i32, i32* %18
%20 = mul nsw i32 %19, 8
store i32 %20, i32* %14
%21 = load i8*, i8** %7
%22 = load i32*, i32** %9
%23 = load double*, double** %10
%24 = bitcast double* %23 to i8*
%25 = load i32*, i32** %12
%26 = call i32 @readfile(i8* %21, i32* %13, i32* %22, i8* %24, i32* %14, i32* %25)
ret void
}

LLVM IR (-O2):
define void @dreadfile(i8* %0, i32* nocapture %1, i32* %2, double* %3, i32* nocapture %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %7 to i8*
%10 = load i32, i32* %1
%11 = shl nsw i32 %10, 3
store i32 %11, i32* %7
%12 = bitcast i32* %8 to i8*
%13 = load i32, i32* %4
%14 = shl nsw i32 %13, 3
store i32 %14, i32* %8
%15 = bitcast double* %3 to i8*
%16 = call i32 @readfile(i8* %0, i32* %7, i32* %2, i8* %15, i32* %8, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void debug_perror(char *msg) { debug("%s : %s\n", msg, strerror(errno)); }


x86 assembly (clang, -O0):
<debug_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xeb1(%rip),%rdi
call   1030 <debug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_perror>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <debug@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s : %s\0A\00"
@errno = global i32 0
define void @debug_perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i32 @strerror(i32 %4)
%6 = call i32 @debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s : %s\0A\00"
@errno = global i32 0
define void @debug_perror(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
MessageBufferLayerP__0__RadioChannel__default__setChannelDone();
void MessageBufferLayerP__0__RadioChannel__setChannelDone(void) {
  MessageBufferLayerP__0__RadioChannel__default__setChannelDone();
}


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

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

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

LLVM IR (-O2):
define void @MessageBufferLayerP__0__RadioChannel__setChannelDone() {
%1 = tail call i32 (...) @MessageBufferLayerP__0__RadioChannel__default__setChannelDone()
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t detexPixel64GetB16(uint64_t pixel) {
  return (pixel & 0xFFFF00000000) >> 32;
}


x86 assembly (clang, -O0):
<detexPixel64GetB16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffff00000000,%rcx
and    %rcx,%rax
sar    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPixel64GetB16>:
sar    $0x1f,%edi
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @detexPixel64GetB16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 281470681743360
%6 = ashr i64 %5, 32
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @detexPixel64GetB16(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 65535, i32 0
ret i32 %3
}
/* Variables and functions */
int lgetline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char line[1000];
  int len;
  while ((len = lgetline(line, 1000)) > 0)
    if (len > 80)
      printf("%s\n", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <lgetline@plt>
mov    %eax,-0x3f4(%rbp)
cmp    $0x0,%eax
jle    1177 <main+0x57>
cmpl   $0x50,-0x3f4(%rbp)
jle    1172 <main+0x52>
lea    -0x3f0(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <lgetline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <lgetline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @lgetline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @lgetline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
void mdp4_dma_e_done_dtv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @mdp4_dma_e_done_dtv() {
ret void
}
int foodouble(double x) { return __builtin_lround(x); }


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

x86 assembly (clang, -O2):
<foodouble>:
jmp    1030 <lround@plt>

LLVM IR (-O0):
define i32 @foodouble(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @lround(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @foodouble(double %0) {
%2 = tail call i64 @lround(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
float __nv_y0f(float);
float y0f(float __a) { return __nv_y0f(__a); }


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

x86 assembly (clang, -O2):
<y0f>:
jmp    1030 <__nv_y0f@plt>

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

LLVM IR (-O2):
define float @y0f(float %0) {
%2 = tail call float @__nv_y0f(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print2(char *str) { printf("test C testPrint %s\n", str); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"test C testPrint %s\0A\00"
define void @print2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"test C testPrint %s\0A\00"
define void @print2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void swapi(a, i, j) int *a, i, j;
{
  int temp;
  temp = a[i];
  a[i] = a[j];
  a[j] = temp;
}


x86 assembly (clang, -O0):
<swapi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapi>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swapi(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swapi(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cst_regex_init();
int flite_init() {
  cst_regex_init();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @flite_init() {
%1 = call i32 (...) @cst_regex_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @flite_init() {
%1 = tail call i32 (...) @cst_regex_init()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int atual;
  int nascimento;
  int anos;
  atual = 2016;
  printf("\nQual ano voce nasceu?");
  scanf("%d", &nascimento);
  anos = atual - nascimento;
  printf("\nVoce possui %d anos\n", anos);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0x7e0,%esi
sub    0x4(%rsp),%esi
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0AQual ano voce nasceu?\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0AVoce possui %d anos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 2016, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0AQual ano voce nasceu?\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0AVoce possui %d anos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sub nsw i32 2016, %5
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
char *strdup(char *);
char *string_duplicate(char *original) { return strdup(original); }


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

x86 assembly (clang, -O2):
<string_duplicate>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @string_duplicate(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ system(char *);
void system_(char *line, int linelen) {
  char *com;
  com = malloc(linelen);
  if (com) {
    strncpy(com, line, linelen);
    line[linelen] = '\0';
    system(line);
    free(com);
  }
}


x86 assembly (clang, -O0):
<system_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1194 <system_+0x54>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <strncpy@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1050 <system@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1181 <system_+0x41>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,(%r14,%rax,1)
mov    %r14,%rdi
call   1050 <system@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @system_(i8* %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = tail call i32 @strncpy(i8* %3, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
%9 = tail call i32 @system(i8* %0)
%10 = tail call i32 @free(i8* %3)
br label %11
11: ; preds = %5, %2
ret void
}
void disable_signal() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
void rte_mov16(uint8_t *dst, const uint8_t *src) { memcpy(dst, src, 16); }


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

x86 assembly (clang, -O2):
<rte_mov16>:
mov    $0x10,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @rte_mov16(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 @memcpy(i32* %5, i32* %6, i32 16)
ret void
}

LLVM IR (-O2):
define void @rte_mov16(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %0, i32* %1, i32 16)
ret void
}
MU_TEST(test_del_3) {}


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

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

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

LLVM IR (-O2):
define i32 @MU_TEST(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ putbitchar(char, unsigned long, unsigned long);
void putbitstr(char *str, unsigned long x, unsigned long y, unsigned long w) {
  while (*str != 0) {
    putbitchar(*str, x, y);
    x += w;
    str++;
  }
}


x86 assembly (clang, -O0):
<putbitstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116b <putbitstr+0x5b>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsbl %al,%edi
call   1030 <putbitchar@plt>
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <putbitstr+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putbitstr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114c <putbitstr+0x3c>
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <putbitchar@plt>
add    %r14,%r12
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <putbitstr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @putbitstr(i8* nocapture %0, i64 %1, i64 %2, i64 %3) {
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %14, %7 ], [ %5, %4 ]
%9 = phi i8* [ %13, %7 ], [ %0, %4 ]
%10 = phi i64 [ %12, %7 ], [ %1, %4 ]
%11 = tail call i32 @putbitchar(i8 signext %8, i64 %10, i64 %2)
%12 = add i64 %10, %3
%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 = %7, %4
ret void
}
void foo_2_1_2_2_1_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_1_2_1_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EmitQuad(float, float, float, float, float, float, float,
                            float);
void CNFGTackRectangle(short x1, short y1, short x2, short y2) {
  float ix1 = x1;
  float iy1 = y1;
  float ix2 = x2;
  float iy2 = y2;
  EmitQuad(ix1, iy1, ix2, iy1, ix1, iy2, ix2, iy2);
}


x86 assembly (clang, -O0):
<CNFGTackRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %si,%dx
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %dx,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
movswl -0x2(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movswl -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movswl -0x6(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movswl -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0xc(%rbp),%xmm4
movss  -0x18(%rbp),%xmm5
movss  -0x14(%rbp),%xmm6
movss  -0x18(%rbp),%xmm7
call   1030 <EmitQuad@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CNFGTackRectangle>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
cvtsi2ss %edx,%xmm2
cvtsi2ss %ecx,%xmm5
movaps %xmm1,%xmm3
movaps %xmm0,%xmm4
movaps %xmm2,%xmm6
movaps %xmm5,%xmm7
jmp    1030 <EmitQuad@plt>

LLVM IR (-O0):
define void @CNFGTackRectangle(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i16 %0, i16* %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%13 = load i16, i16* %5
%14 = sitofp i16 %13 to float
store float %14, float* %9
%15 = load i16, i16* %6
%16 = sitofp i16 %15 to float
store float %16, float* %10
%17 = load i16, i16* %7
%18 = sitofp i16 %17 to float
store float %18, float* %11
%19 = load i16, i16* %8
%20 = sitofp i16 %19 to float
store float %20, float* %12
%21 = load float, float* %9
%22 = load float, float* %10
%23 = load float, float* %11
%24 = load float, float* %10
%25 = load float, float* %9
%26 = load float, float* %12
%27 = load float, float* %11
%28 = load float, float* %12
%29 = call i32 @EmitQuad(float %21, float %22, float %23, float %24, float %25, float %26, float %27, float %28)
ret void
}

LLVM IR (-O2):
define void @CNFGTackRectangle(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = sitofp i16 %0 to float
%6 = sitofp i16 %1 to float
%7 = sitofp i16 %2 to float
%8 = sitofp i16 %3 to float
%9 = tail call i32 @EmitQuad(float %5, float %6, float %7, float %6, float %5, float %8, float %7, float %8)
ret void
}
int main(void) {
  int a = 1;
  switch (a) {
  case 1:
    a = 1;
    break;
  case 2:
    a = 1;
  case 4:
    a = 1;
  case 5:
    a = 1;
    break;
  default:
    a = 1;
    break;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     1161 <main+0x61>
mov    -0x10(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    1168 <main+0x68>
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    1168 <main+0x68>
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 1, label %4
i32 2, label %5
i32 4, label %6
i32 5, label %7
]
4: ; preds = %0
store i32 1, i32* %2
br label %9
5: ; preds = %0
store i32 1, i32* %2
br label %6
6: ; preds = %0, %5
store i32 1, i32* %2
br label %7
7: ; preds = %0, %6
store i32 1, i32* %2
br label %9
8: ; preds = %0
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void dispStuInfo(struct student *ps) {}


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

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

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

LLVM IR (-O2):
%struct.student = type opaque
define void @dispStuInfo(%struct.student* nocapture %0) {
ret void
}
int compare(const void *p1, const void *p2) {
  return *(const int *)p2 - *(const int *)p1;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rsi),%eax
sub    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int rl_end_of_history(count, key)
int count __attribute__((unused)), key __attribute__((unused));
{
  rl_maybe_replace_line();
  using_history();
  rl_maybe_unsave_line();
  return 0;
}


x86 assembly (clang, -O0):
<rl_end_of_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <rl_maybe_replace_line@plt>
mov    $0x0,%al
call   1040 <using_history@plt>
mov    $0x0,%al
call   1030 <rl_maybe_unsave_line@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_end_of_history>:
push   %rax
xor    %eax,%eax
call   1050 <rl_maybe_replace_line@plt>
xor    %eax,%eax
call   1040 <using_history@plt>
xor    %eax,%eax
call   1030 <rl_maybe_unsave_line@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rl_end_of_history(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rl_maybe_replace_line()
%6 = call i32 (...) @using_history()
%7 = call i32 (...) @rl_maybe_unsave_line()
ret i32 0
}

LLVM IR (-O2):
define i32 @rl_end_of_history(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rl_maybe_replace_line()
%4 = tail call i32 (...) @using_history()
%5 = tail call i32 (...) @rl_maybe_unsave_line()
ret i32 0
}
unsigned complementBit_fun_uint(unsigned x, unsigned i) { return x ^ 1 << i; }


x86 assembly (clang, -O0):
<complementBit_fun_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @complementBit_fun_uint(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 = shl i32 1, %6
%8 = xor i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @complementBit_fun_uint(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, %0
ret i32 %4
}