xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b, PROD;
  scanf("%d%d", &a, &b);
  PROD = a * b;
  printf("PROD = %d\n", PROD);
  return 0;
}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @test_afficher_mains() {
ret void
}
/* Variables and functions */
scalar_t__ is_path_well_formed(char *);
int /*<<< orphan*/ strcpy(char *, char *);
void ensure_path_well_formed(char *path) {
  if (is_path_well_formed(path)) {
    return;
  }
  strcpy(path, "/");
}


x86 assembly (clang, -O0):
<ensure_path_well_formed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_path_well_formed@plt>
cmp    $0x0,%rax
je     1144 <ensure_path_well_formed+0x24>
jmp    1154 <ensure_path_well_formed+0x34>
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ensure_path_well_formed>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_path_well_formed@plt>
test   %rax,%rax
je     1130 <ensure_path_well_formed+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define void @ensure_path_well_formed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @is_path_well_formed(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @ensure_path_well_formed(i8* %0) {
%2 = tail call i64 @is_path_well_formed(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret void
}
int Cyc_Absyn_number_of_caps() { return 2; }


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

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

LLVM IR (-O0):
define i32 @Cyc_Absyn_number_of_caps() {
ret i32 2
}

LLVM IR (-O2):
define i32 @Cyc_Absyn_number_of_caps() {
ret i32 2
}
void iwl_legacy_print_rx_config_cmd(struct iwl_priv *priv,
                                    struct iwl_rxon_context *ctx) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
%struct.iwl_rxon_context = type opaque
define void @iwl_legacy_print_rx_config_cmd(%struct.iwl_priv* nocapture %0, %struct.iwl_rxon_context* nocapture %1) {
ret void
}
int test_imm_0Cuint16_reg(unsigned short val) {
  return ((val) & (-0x0C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Cuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xfffffff4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Cuint16_reg>:
test   $0xfff4,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Cuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -12
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ om_html_entities(int /*<<< orphan*/ *, char *);
void om_html_print_title(FILE *fp, char *title) {
  fprintf(fp,
          "<tr><td align=\"center\" class=\"title\" colspan=\"3\"><a "
          "name=\"%s\"></a>",
          title);
  om_html_entities(fp, title);
  fprintf(fp, "</td></tr>\n");
}


x86 assembly (clang, -O0):
<om_html_print_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <om_html_entities@plt>
mov    -0x8(%rbp),%rdi
lea    0xee5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_html_print_title>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <om_html_entities@plt>
lea    0xee6(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fwrite@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"<tr><td align=\22center\22 class=\22title\22 colspan=\223\22><a name=\22%s\22></a>\00"
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
define void @om_html_print_title(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @om_html_entities(i32* %8, i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"<tr><td align=\22center\22 class=\22title\22 colspan=\223\22><a name=\22%s\22></a>\00"
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
define void @om_html_print_title(i32* %0, i8* %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @om_html_entities(i32* %0, i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 11, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outw(int, int);
void get_font_access(void) {
  outw(0x0100, 0x3c4);
  outw(0x0402, 0x3c4);
  outw(0x0704, 0x3c4);
  outw(0x0300, 0x3c4);
  outw(0x0204, 0x3ce);
  outw(0x0005, 0x3ce);
  outw(0x0406, 0x3ce);
}


x86 assembly (clang, -O0):
<get_font_access>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x402,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x704,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x300,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x204,%edi
mov    $0x3ce,%esi
call   1030 <outw@plt>
mov    $0x5,%edi
mov    $0x3ce,%esi
call   1030 <outw@plt>
mov    $0x406,%edi
mov    $0x3ce,%esi
call   1030 <outw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_font_access>:
push   %rax
mov    $0x100,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x402,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x704,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x300,%edi
mov    $0x3c4,%esi
call   1030 <outw@plt>
mov    $0x204,%edi
mov    $0x3ce,%esi
call   1030 <outw@plt>
mov    $0x5,%edi
mov    $0x3ce,%esi
call   1030 <outw@plt>
mov    $0x406,%edi
mov    $0x3ce,%esi
pop    %rax
jmp    1030 <outw@plt>

LLVM IR (-O0):
define void @get_font_access() {
%1 = call i32 @outw(i32 256, i32 964)
%2 = call i32 @outw(i32 1026, i32 964)
%3 = call i32 @outw(i32 1796, i32 964)
%4 = call i32 @outw(i32 768, i32 964)
%5 = call i32 @outw(i32 516, i32 974)
%6 = call i32 @outw(i32 5, i32 974)
%7 = call i32 @outw(i32 1030, i32 974)
ret void
}

LLVM IR (-O2):
define void @get_font_access() {
%1 = tail call i32 @outw(i32 256, i32 964)
%2 = tail call i32 @outw(i32 1026, i32 964)
%3 = tail call i32 @outw(i32 1796, i32 964)
%4 = tail call i32 @outw(i32 768, i32 964)
%5 = tail call i32 @outw(i32 516, i32 974)
%6 = tail call i32 @outw(i32 5, i32 974)
%7 = tail call i32 @outw(i32 1030, i32 974)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, int, char *, size_t, int);
int strerror_r(int, char *, size_t);
char *str_error_r(int errnum, char *buf, size_t buflen) {
  int err = strerror_r(errnum, buf, buflen);
  if (err)
    snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum,
             buf, buflen, err);
  return buf;
}


x86 assembly (clang, -O0):
<str_error_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strerror_r@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1175 <str_error_r+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x1c(%rbp),%eax
lea    0xe93(%rip),%rdx
mov    %eax,(%rsp)
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_error_r>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <strerror_r@plt>
test   %eax,%eax
je     1156 <str_error_r+0x36>
mov    %eax,(%rsp)
lea    0xebd(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%ecx
mov    %rbx,%r8
mov    %r14,%r9
call   1030 <snprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d\00"
define i8* @str_error_r(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @strerror_r(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i64, i64* %6
%17 = load i32, i32* %4
%18 = load i8*, i8** %5
%19 = load i64, i64* %6
%20 = load i32, i32* %7
%21 = call i32 @snprintf(i8* %15, i64 %16, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %17, i8* %18, i64 %19, i32 %20)
br label %22
22: ; preds = %14, %3
%23 = load i8*, i8** %5
ret i8* %23
}

LLVM IR (-O2):
@.str = [43 x i8] c"INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d\00"
define i8* @str_error_r(i32 %0, i8* returned %1, i64 %2) {
%4 = tail call i32 @strerror_r(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @snprintf(i8* %1, i64 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i64 %2, i32 %4)
br label %8
8: ; preds = %6, %3
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ oh_no();
void slinky(int i) {
  if (i == 2) {
    oh_no();
  }
}


x86 assembly (clang, -O0):
<slinky>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    112c <slinky+0x1c>
mov    $0x0,%al
call   1030 <oh_no@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slinky>:
cmp    $0x2,%edi
jne    111c <slinky+0xc>
xor    %eax,%eax
jmp    1030 <oh_no@plt>
ret

LLVM IR (-O0):
define void @slinky(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @oh_no()
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @slinky(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @oh_no()
br label %5
5: ; preds = %3, %1
ret void
}
int maxThreeInts(int first, int second, int third) {
  if (first >= second && first >= third)
    return first;
  if (second >= third)
    return second;
  return third;
}


x86 assembly (clang, -O0):
<maxThreeInts>:
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     1130 <maxThreeInts+0x30>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1130 <maxThreeInts+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <maxThreeInts+0x4d>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1147 <maxThreeInts+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <maxThreeInts+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxThreeInts>:
cmp    %edx,%esi
mov    %esi,%ecx
cmovl  %edx,%ecx
cmp    %edx,%edi
mov    %edi,%eax
cmovl  %ecx,%eax
cmp    %esi,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @maxThreeInts(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 %17
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %5
store i32 %16, i32* %4
br label %25
17: ; preds = %11, %3
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = icmp sge i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load i32, i32* %6
store i32 %22, i32* %4
br label %25
23: ; preds = %17
%24 = load i32, i32* %7
store i32 %24, i32* %4
br label %25
25: ; preds = %23, %21, %15
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @maxThreeInts(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp slt i32 %0, %2
%6 = or i1 %4, %5
%7 = icmp slt i32 %1, %2
%8 = select i1 %7, i32 %2, i32 %1
%9 = select i1 %6, i32 %8, i32 %0
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, float *, int);
uint32_t eh_float32_to_uint32(float d) {
  uint32_t u32;
  memcpy(&u32, &d, sizeof(float));
  return u32;
}


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

x86 assembly (clang, -O2):
<eh_float32_to_uint32>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @eh_float32_to_uint32(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ co__cclear();
int /*<<< orphan*/ e_calli(int /*<<< orphan*/);
int /*<<< orphan*/ getchar;
int /*<<< orphan*/ ra_mchange(int /*<<< orphan*/, int);
void co_input(int rc) {
  co__cclear();
  ra_mchange(0, rc);
  e_calli(getchar);
}


x86 assembly (clang, -O0):
<co_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <co__cclear@plt>
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1050 <ra_mchange@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <e_calli@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_input>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <co__cclear@plt>
xor    %edi,%edi
mov    %ebx,%esi
call   1050 <ra_mchange@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1040 <e_calli@plt>

LLVM IR (-O0):
@getchar = global i32 0
define void @co_input(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @co__cclear()
%4 = load i32, i32* %2
%5 = call i32 @ra_mchange(i32 0, i32 %4)
%6 = load i32, i32* @getchar
%7 = call i32 @e_calli(i32 %6)
ret void
}

LLVM IR (-O2):
@getchar = global i32 0
define void @co_input(i32 %0) {
%2 = tail call i32 (...) @co__cclear()
%3 = tail call i32 @ra_mchange(i32 0, i32 %0)
%4 = load i32, i32* @getchar
%5 = tail call i32 @e_calli(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check(void *);
void *realloc(void *, size_t);
void *realloc_check(void *ptr, size_t size) {
  ptr = realloc(ptr, size);
  check(ptr);
  return ptr;
}


x86 assembly (clang, -O0):
<realloc_check>:
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 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <check@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_check>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <check@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @realloc_check(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = tail call i32 @check(i8* %3)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n > 0 && (n & (n - 1)) == 0) {
    printf("%d is a power of 2\n", n);
  } else {
    printf("%d is NOT a power of 2\n", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1171 <main+0x51>
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1171 <main+0x51>
mov    -0x8(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x60>
mov    -0x8(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    -0x1(%rsi),%eax
test   %eax,%esi
lea    0xec1(%rip),%rdi
lea    0xece(%rip),%rax
cmovne %rax,%rdi
test   %esi,%esi
cmovle %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [20 x i8] c"%d is a power of 2\0A\00"
@.str.2 = [24 x i8] c"%d is NOT a power of 2\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %0
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
%10 = and i32 %7, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %6
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %18
15: ; preds = %6, %0
%16 = load i32, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [20 x i8] c"%d is a power of 2\0A\00"
@.str.2 = [24 x i8] c"%d is NOT a power of 2\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
%6 = call i32 @llvm.ctpop.i32(i32 %4)
%7 = icmp ult i32 %6, 2
%8 = and i1 %5, %7
%9 = select i1 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @printf(i8* %9, i32 %4)
ret i32 0
}
/* Variables and functions */
int d19(int);
int d20(int a) { return d19(d19(a)); }


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

x86 assembly (clang, -O2):
<d20>:
push   %rax
call   1030 <d19@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d19@plt>

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

LLVM IR (-O2):
define i32 @d20(i32 %0) {
%2 = tail call i32 @d19(i32 %0)
%3 = tail call i32 @d19(i32 %2)
ret i32 %3
}
/* Variables and functions */
int f463(int *);
int f464(int *p) { return f463(p); }


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

x86 assembly (clang, -O2):
<f464>:
jmp    1030 <f463@plt>

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

LLVM IR (-O2):
define i32 @f464(i32* %0) {
%2 = tail call i32 @f463(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank5(int);
void m32setParamsBXX5(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank5(val << 10);
}


x86 assembly (clang, -O0):
<m32setParamsBXX5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shl    $0xa,%edi
call   1030 <chr1setBank5@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m32setParamsBXX5>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank5@plt>

LLVM IR (-O0):
define void @m32setParamsBXX5(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 %6, 10
%8 = call i32 @chr1setBank5(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m32setParamsBXX5(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank5(i32 %3)
ret void
}
int doshl(int a, int b) { return a >> 2; }


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

x86 assembly (clang, -O2):
<doshl>:
mov    %edi,%eax
sar    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @doshl(i32 %0, i32 %1) {
%3 = ashr i32 %0, 2
ret i32 %3
}
float angle_diff(float angle1, float angle2) {
  float d;
  if (angle1 > angle2) {
    d = angle1 - angle2;
  } else {
    d = angle2 - angle1;
  }
  if (d > 3.14159265358979323846f) {
    return 2 * 3.14159265358979323846f - d;
  } else {
    return d;
  }
}


x86 assembly (clang, -O0):
<angle_diff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1131 <angle_diff+0x31>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1140 <angle_diff+0x40>
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xeb3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    116d <angle_diff+0x6d>
movss  0xea6(%rip),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1177 <angle_diff+0x77>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<angle_diff>:
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
cmpltss %xmm0,%xmm1
andps  %xmm1,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
movss  0xedc(%rip),%xmm2
subss  %xmm1,%xmm2
movss  0xed4(%rip),%xmm0
cmpltss %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @angle_diff(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = fsub float %0, %1
%5 = fsub float %1, %0
%6 = select i1 %3, float %4, float %5
%7 = fcmp ogt float %6, 0x400921FB60000000
%8 = fsub float 0x401921FB60000000, %6
%9 = select i1 %7, float %8, float %6
ret float %9
}
__attribute__((noreturn)) void extirq_default_handler(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<extirq_default_handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <extirq_default_handler+0x9>
jmp    1109 <extirq_default_handler+0x9>

x86 assembly (clang, -O2):
<extirq_default_handler>:
jmp    1100 <extirq_default_handler>

LLVM IR (-O0):
define void @extirq_default_handler() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @extirq_default_handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_return_metadata(void *, void *);
scalar_t__ readdir(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) struct dirent *
softboundmpx_readdir(DIR *dir) {
  void *ret_ptr = (void *)readdir(dir);
  void *ret_ptr_bound = (char *)ret_ptr + sizeof(struct dirent);
  __softboundmpx_store_return_metadata(ret_ptr, ret_ptr_bound);
  return (struct dirent *)ret_ptr;
}


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

x86 assembly (clang, -O2):
<softboundmpx_readdir>:
push   %rbx
call   1030 <readdir@plt>
mov    %rax,%rbx
lea    0x4(%rax),%rsi
mov    %rax,%rdi
call   1040 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
define weak %struct.dirent* @softboundmpx_readdir(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i8*
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @readdir(i32* %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 4
store i8* %9, i8** %4
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @__softboundmpx_store_return_metadata(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = bitcast i8* %13 to %struct.dirent*
ret %struct.dirent* %14
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define weak %struct.dirent* @softboundmpx_readdir(i32* %0) {
%2 = tail call i64 @readdir(i32* %0)
%3 = inttoptr i64 %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = tail call i32 @__softboundmpx_store_return_metadata(i8* %3, i8* %4)
%6 = inttoptr i64 %2 to %struct.dirent*
ret %struct.dirent* %6
}
/* Variables and functions */
int /*<<< orphan*/ PlatformPcal9555GpioPullup(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ PlatformPcal9555GpioSetDir(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ PlatformPcal9555GpioSetLevel(int, int, int /*<<< orphan*/);
void vGalileoRouteLEDPins(void) {
  PlatformPcal9555GpioPullup(0x25, 15, (0));
  PlatformPcal9555GpioSetDir(0x25, 14, (0));
  PlatformPcal9555GpioSetLevel(0x25, 14, (0));
  PlatformPcal9555GpioSetDir(0x26, 14, (0));
  PlatformPcal9555GpioSetLevel(0x26, 14, (0));
}


x86 assembly (clang, -O0):
<vGalileoRouteLEDPins>:
push   %rbp
mov    %rsp,%rbp
mov    $0x25,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1040 <PlatformPcal9555GpioPullup@plt>
mov    $0x25,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1050 <PlatformPcal9555GpioSetDir@plt>
mov    $0x25,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1030 <PlatformPcal9555GpioSetLevel@plt>
mov    $0x26,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1050 <PlatformPcal9555GpioSetDir@plt>
mov    $0x26,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1030 <PlatformPcal9555GpioSetLevel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vGalileoRouteLEDPins>:
push   %rax
mov    $0x25,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1040 <PlatformPcal9555GpioPullup@plt>
mov    $0x25,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1050 <PlatformPcal9555GpioSetDir@plt>
mov    $0x25,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1030 <PlatformPcal9555GpioSetLevel@plt>
mov    $0x26,%edi
mov    $0xe,%esi
xor    %edx,%edx
call   1050 <PlatformPcal9555GpioSetDir@plt>
mov    $0x26,%edi
mov    $0xe,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <PlatformPcal9555GpioSetLevel@plt>

LLVM IR (-O0):
define void @vGalileoRouteLEDPins() {
%1 = call i32 @PlatformPcal9555GpioPullup(i32 37, i32 15, i32 0)
%2 = call i32 @PlatformPcal9555GpioSetDir(i32 37, i32 14, i32 0)
%3 = call i32 @PlatformPcal9555GpioSetLevel(i32 37, i32 14, i32 0)
%4 = call i32 @PlatformPcal9555GpioSetDir(i32 38, i32 14, i32 0)
%5 = call i32 @PlatformPcal9555GpioSetLevel(i32 38, i32 14, i32 0)
ret void
}

LLVM IR (-O2):
define void @vGalileoRouteLEDPins() {
%1 = tail call i32 @PlatformPcal9555GpioPullup(i32 37, i32 15, i32 0)
%2 = tail call i32 @PlatformPcal9555GpioSetDir(i32 37, i32 14, i32 0)
%3 = tail call i32 @PlatformPcal9555GpioSetLevel(i32 37, i32 14, i32 0)
%4 = tail call i32 @PlatformPcal9555GpioSetDir(i32 38, i32 14, i32 0)
%5 = tail call i32 @PlatformPcal9555GpioSetLevel(i32 38, i32 14, i32 0)
ret void
}
unsigned int in(int h, int l) { return (255); }


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

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

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

LLVM IR (-O2):
define i32 @in(i32 %0, i32 %1) {
ret i32 255
}
/* Variables and functions */
int /*<<< orphan*/ cyg_test_exit();
int /*<<< orphan*/ nc_slave(int);
int /*<<< orphan*/ printf(char *);
void net_test(int param) {
  if (param == 0) {
    printf("Start Network Characterization - SLAVE\n");
  }
  nc_slave(param);
  cyg_test_exit();
}


x86 assembly (clang, -O0):
<net_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1151 <net_test+0x21>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <nc_slave@plt>
mov    $0x0,%al
call   1050 <cyg_test_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_test>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jne    1143 <net_test+0x13>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <nc_slave@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <cyg_test_exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Start Network Characterization - SLAVE\0A\00"
define void @net_test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = call i32 @nc_slave(i32 %8)
%10 = call i32 (...) @cyg_test_exit()
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"Start Network Characterization - SLAVE\00"
define void @net_test(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @nc_slave(i32 %0)
%7 = tail call i32 (...) @cyg_test_exit()
ret void
}
long long uuss() { return 0x7fff7fffffffffffLL; }


x86 assembly (clang, -O0):
<uuss>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff7fffffffffff,%rax
7f ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuss>:
movabs $0x7fff7fffffffffff,%rax
7f ff 7f
ret

LLVM IR (-O0):
define i64 @uuss() {
ret i64 9223231299366420479
}

LLVM IR (-O2):
define i64 @uuss() {
ret i64 9223231299366420479
}
/* Type definitions */
struct ipc_peer {
  int dummy;
};
struct _ipc_peer_impl {
  int dummy;
};

/* Variables and functions */
struct _ipc_peer_impl *_conv_peer(struct ipc_peer *);
long ipc_destroy(struct ipc_peer *pr) {
  struct _ipc_peer_impl *ipi = _conv_peer(pr);
  if (!ipi)
    goto error_ret;
  return 0;
error_ret:
  return -1;
}


x86 assembly (clang, -O0):
<ipc_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_conv_peer@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1139 <ipc_destroy+0x29>
jmp    1146 <ipc_destroy+0x36>
movq   $0x0,-0x8(%rbp)
jmp    114e <ipc_destroy+0x3e>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_destroy>:
push   %rax
call   1030 <_conv_peer@plt>
cmp    $0x1,%rax
sbb    %rax,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.ipc_peer = type { i32 }
%struct._ipc_peer_impl = type { i32 }
define i64 @ipc_destroy(%struct.ipc_peer* %0) {
%2 = tail call %struct._ipc_peer_impl* @_conv_peer(%struct.ipc_peer* %0)
%3 = icmp eq %struct._ipc_peer_impl* %2, null
%4 = sext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(void) {
  int x = 100;
  printf("integer: %d\n", x);
  char ch = 'M';
  printf("character: %c\n", ch);
  int m, n, o;
  m = n = o = 99;
  printf("%d\t, %d\t, %d", m, n, o);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x4d,-0x9(%rbp)
movsbl -0x9(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x63,-0x18(%rbp)
movl   $0x63,-0x14(%rbp)
movl   $0x63,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeaa(%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    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x4d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x63,%esi
mov    $0x63,%edx
mov    $0x63,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"integer: %d\0A\00"
@.str.1 = [15 x i8] c"character: %c\0A\00"
@.str.2 = [13 x i8] c"%d\09, %d\09, %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
store i8 77, i8* %3
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %10)
store i32 99, i32* %6
store i32 99, i32* %5
store i32 99, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"integer: %d\0A\00"
@.str.1 = [15 x i8] c"character: %c\0A\00"
@.str.2 = [13 x i8] c"%d\09, %d\09, %d\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 100)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 77)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 99, i32 99, i32 99)
ret i32 0
}
/* Variables and functions */
int d(int);
int /*<<< orphan*/ niceprint(char *);
int /*<<< orphan*/ printf(char *, int);
void gorge(void) {
  niceprint(
      "The characters must make a difficult climb down a gorge "
      "and up the other side, or find a way around it. Their travel pace "
      "for the day is slowed by half unless they come up with a plan to cross "
      "the gorge quickly.\n\n");
  printf("Gorge Depth: %d feet\n\n", 100 * (d(4) + d(4)));
}


x86 assembly (clang, -O0):
<gorge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
imul   $0x64,%eax,%esi
lea    0xf6a(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gorge>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <niceprint@plt>
mov    $0x4,%edi
call   1030 <d@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1030 <d@plt>
add    %ebx,%eax
imul   $0x64,%eax,%esi
lea    0xf77(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [214 x i8] c"The characters must make a difficult climb down a gorge and up the other side, or find a way around it. Their travel pace for the day is slowed by half unless they come up with a plan to cross the gorge quickly.\0A\0A\00"
@.str.1 = [23 x i8] c"Gorge Depth: %d feet\0A\0A\00"
define void @gorge() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @d(i32 4)
%3 = call i32 @d(i32 4)
%4 = add nsw i32 %2, %3
%5 = mul nsw i32 100, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [214 x i8] c"The characters must make a difficult climb down a gorge and up the other side, or find a way around it. Their travel pace for the day is slowed by half unless they come up with a plan to cross the gorge quickly.\0A\0A\00"
@.str.1 = [23 x i8] c"Gorge Depth: %d feet\0A\0A\00"
define void @gorge() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([214 x i8], [214 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @d(i32 4)
%3 = tail call i32 @d(i32 4)
%4 = add nsw i32 %3, %2
%5 = mul nsw i32 %4, 100
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void quicksort_doHeavyWork(void) {
  return;
  for (int32_t __i = 0; __i < 50; __i++) {
    for (int32_t __j = 0; __j < 50; __j++) {
      __j *__j *__j;
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @quicksort_doHeavyWork() {
ret void
}
char EasyVR_Speech(char status) { return status - 'A'; }


x86 assembly (clang, -O0):
<EasyVR_Speech>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EasyVR_Speech>:
lea    -0x41(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @EasyVR_Speech(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 65
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @EasyVR_Speech(i8 signext %0) {
%2 = add i8 %0, -65
ret i8 %2
}
void clearScreen() {}


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

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

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

LLVM IR (-O2):
define void @clearScreen() {
ret void
}
void glPolygonOffsetx(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPolygonOffsetx() {
ret void
}
void kgsl_cffdump_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @kgsl_cffdump_init() {
ret void
}
int CIF2() { return 0; }


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

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

LLVM IR (-O0):
define i32 @CIF2() {
ret i32 0
}

LLVM IR (-O2):
define i32 @CIF2() {
ret i32 0
}
int intHash(const void *pKey, int nKey) {
  return nKey ^ (nKey << 8) ^ (nKey >> 8);
}


x86 assembly (clang, -O0):
<intHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
xor    %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intHash>:
mov    %esi,%eax
shl    $0x8,%eax
xor    %esi,%eax
sar    $0x8,%esi
xor    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @intHash(i8* nocapture readnone %0, i32 %1) {
%3 = shl i32 %1, 8
%4 = xor i32 %3, %1
%5 = ashr i32 %1, 8
%6 = xor i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main() { exit(77); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4d,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4d,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 77)
unreachable
}
unsigned long atomic(const char *name, unsigned long (*op)(unsigned long),
                     unsigned long arg) {
  return (*op)(arg);
}


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

x86 assembly (clang, -O2):
<atomic>:
mov    %rdx,%rdi
jmp    *%rsi

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

LLVM IR (-O2):
define i64 @atomic(i8* nocapture readnone %0, i64 (i64)* nocapture %1, i64 %2) {
%4 = tail call i64 %1(i64 %2)
ret i64 %4
}
void ff_sws_init_swscale_ppc() {}


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

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

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

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