xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ dsfmt_gv_fill_array_close1_open2(double *, int);
void fill_array_close1_open2(double array[], int size) {
  dsfmt_gv_fill_array_close1_open2(array, size);
}


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

x86 assembly (clang, -O2):
<fill_array_close1_open2>:
jmp    1030 <dsfmt_gv_fill_array_close1_open2@plt>

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

LLVM IR (-O2):
define void @fill_array_close1_open2(double* %0, i32 %1) {
%3 = tail call i32 @dsfmt_gv_fill_array_close1_open2(double* %0, i32 %1)
ret void
}
/* Type definitions */
struct strbuf {
  int dummy;
};
struct child_process {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strbuf_addf(struct strbuf *, char *);
int task_finished(int result, struct child_process *cp, struct strbuf *err,
                  void *pp_cb, void *pp_task_cb) {
  strbuf_addf(err, "asking for a quick stop\n");
  return 1;
}


x86 assembly (clang, -O0):
<task_finished>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1030 <strbuf_addf@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_finished>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <strbuf_addf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.child_process = type { i32 }
%struct.strbuf = type { i32 }
@.str = [25 x i8] c"asking for a quick stop\0A\00"
define i32 @task_finished(i32 %0, %struct.child_process* %1, %struct.strbuf* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca %struct.child_process*
%8 = alloca %struct.strbuf*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store %struct.child_process* %1, %struct.child_process** %7
store %struct.strbuf* %2, %struct.strbuf** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load %struct.strbuf*, %struct.strbuf** %8
%12 = call i32 @strbuf_addf(%struct.strbuf* %11, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.child_process = type { i32 }
%struct.strbuf = type { i32 }
@.str = [25 x i8] c"asking for a quick stop\0A\00"
define i32 @task_finished(i32 %0, %struct.child_process* nocapture readnone %1, %struct.strbuf* %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
%6 = tail call i32 @strbuf_addf(%struct.strbuf* %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int strlen(char *);
void appch(char *str, char ch) {
  str[strlen(str)] = ch;
  str[strlen(str) + 1] = '\0';
  putchar(ch);
}


x86 assembly (clang, -O0):
<appch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x21(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x21(%rbp),%dl
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appch>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
mov    %bpl,(%rbx,%rax,1)
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,0x1(%rax,%rbx,1)
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @appch(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
store i8 %5, i8* %10
%11 = load i8*, i8** %3
%12 = load i8*, i8** %3
%13 = call i32 @strlen(i8* %12)
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %11, i64 %15
store i8 0, i8* %16
%17 = load i8, i8* %4
%18 = call i32 @putchar(i8 signext %17)
ret void
}

LLVM IR (-O2):
define void @appch(i8* %0, i8 signext %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %1, i8* %5
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
%10 = tail call i32 @putchar(i8 signext %1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int set_dobldobl_state_to_verbose(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(660, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<set_dobldobl_state_to_verbose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x294,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_dobldobl_state_to_verbose>:
mov    $0x294,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @set_dobldobl_state_to_verbose() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 660, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_dobldobl_state_to_verbose() {
%1 = tail call i32 @_ada_use_c2phc(i32 660, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int is_leap(int year) {
  year -= 100;
  return !(year & 3) && ((year % 100) || !(year % 400));
}


x86 assembly (clang, -O0):
<is_leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x64,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x3,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1159 <is_leap+0x59>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x6(%rbp)
jne    1153 <is_leap+0x53>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <is_leap+0x9>
ret
add    $0xffffff9c,%edi
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x1,%eax
cmp    $0x28f5c28,%edx
ja     1108 <is_leap+0x8>
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @is_leap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 100
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 3
%7 = icmp ne i32 %6, 0
br i1 %7, label %19, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = srem i32 %9, 100
%11 = icmp ne i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = load i32, i32* %2
%14 = srem i32 %13, 400
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %12, %8
%18 = phi i1 [ true, %8 ], [ %16, %12 ]
br label %19
19: ; preds = %17, %1
%20 = phi i1 [ false, %1 ], [ %18, %17 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @is_leap(i32 %0) {
%2 = add nsw i32 %0, -100
%3 = and i32 %0, 3
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = srem i32 %2, 100
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = srem i32 %2, 400
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %8, %1
%13 = phi i32 [ 0, %1 ], [ 1, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ ansi_escape(char *);
void term_clear_screen() { ansi_escape("2J"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"2J\00"
define void @term_clear_screen() {
%1 = tail call i32 @ansi_escape(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int get_action_val_name_any(char *, int /*<<< orphan*/ *, int,
                            int /*<<< orphan*/);
int get_action_len_name_gr(char *saction, int len) {
  return get_action_val_name_any(saction, NULL, len, 0);
}


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

x86 assembly (clang, -O2):
<get_action_len_name_gr>:
mov    %esi,%edx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <get_action_val_name_any@plt>

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

LLVM IR (-O2):
define i32 @get_action_len_name_gr(i8* %0, i32 %1) {
%3 = tail call i32 @get_action_val_name_any(i8* %0, i32* null, i32 %1, i32 0)
ret i32 %3
}
int test3(int e, int f) { return e | (e & f); }


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

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

LLVM IR (-O0):
define i32 @test3(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* %3
%7 = load i32, i32* %4
%8 = and i32 %6, %7
%9 = or i32 %5, %8
ret i32 %9
}

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

/* Variables and functions */
int rope_insert(struct rope *, int /*<<< orphan*/, void *, size_t);
int /*<<< orphan*/ rope_size(struct rope *);
int rope_append(struct rope *rope, void *data, size_t size) {
  return rope_insert(rope, rope_size(rope), data, size);
}


x86 assembly (clang, -O0):
<rope_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rope_size@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <rope_insert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rope_append>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <rope_size@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <rope_insert@plt>

LLVM IR (-O0):
%struct.rope = type { i32 }
define i32 @rope_append(%struct.rope* %0, i8* %1, i64 %2) {
%4 = alloca %struct.rope*
%5 = alloca i8*
%6 = alloca i64
store %struct.rope* %0, %struct.rope** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.rope*, %struct.rope** %4
%8 = load %struct.rope*, %struct.rope** %4
%9 = call i32 @rope_size(%struct.rope* %8)
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = call i32 @rope_insert(%struct.rope* %7, i32 %9, i8* %10, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.rope = type { i32 }
define i32 @rope_append(%struct.rope* %0, i8* %1, i64 %2) {
%4 = tail call i32 @rope_size(%struct.rope* %0)
%5 = tail call i32 @rope_insert(%struct.rope* %0, i32 %4, i8* %1, i64 %2)
ret i32 %5
}
void ff_hevc_put_hevc_bi_pel_pixels24_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels24_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_char(char);
void f() { write_char('.'); }


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

x86 assembly (clang, -O2):
<f>:
mov    $0x2e,%edi
jmp    1030 <write_char@plt>

LLVM IR (-O0):
define void @f() {
%1 = call i32 @write_char(i8 signext 46)
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 @write_char(i8 signext 46)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello World, I'm @name@!\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Hello World, I'm @name@!\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [25 x i8] c"Hello World, I'm @name@!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = 1 + 2 * 4 - ((4 / 2 + 3 % 2) - 2);
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 8, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
scalar_t__ test19_aux1();
scalar_t__ test19_aux2();
scalar_t__ test19_aux3(int *);
int test19() {
  int z;
  if (test19_aux1() + test19_aux2() && test19_aux1() && test19_aux3(&z))
    return z;
  return 0;
}


x86 assembly (clang, -O0):
<test19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <test19_aux1@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test19_aux2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
cmp    $0x0,%rax
je     118d <test19+0x5d>
mov    $0x0,%al
call   1040 <test19_aux1@plt>
cmp    $0x0,%rax
je     118d <test19+0x5d>
lea    -0x8(%rbp),%rdi
call   1050 <test19_aux3@plt>
cmp    $0x0,%rax
je     118d <test19+0x5d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1194 <test19+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test19>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <test19_aux1@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <test19_aux2@plt>
add    %rbx,%rax
je     116e <test19+0x3e>
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <test19_aux1@plt>
test   %rax,%rax
je     116e <test19+0x3e>
lea    0x4(%rsp),%rdi
call   1050 <test19_aux3@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     116e <test19+0x3e>
mov    0x4(%rsp),%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @test19() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @test19_aux1()
%4 = call i64 (...) @test19_aux2()
%5 = add nsw i64 %3, %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = call i64 (...) @test19_aux1()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i64 @test19_aux3(i32* %2)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %2
store i32 %14, i32* %1
br label %16
15: ; preds = %10, %7, %0
store i32 0, i32* %1
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @test19() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i64 (...) @test19_aux1()
%4 = tail call i64 (...) @test19_aux2()
%5 = sub i64 0, %4
%6 = icmp eq i64 %3, %5
br i1 %6, label %15, label %7
7: ; preds = %0
%8 = tail call i64 (...) @test19_aux1()
%9 = icmp eq i64 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = call i64 @test19_aux3(i32* %1)
%12 = icmp eq i64 %11, 0
%13 = load i32, i32* %1
%14 = select i1 %12, i32 0, i32 %13
br label %15
15: ; preds = %10, %0, %7
%16 = phi i32 [ 0, %7 ], [ 0, %0 ], [ %14, %10 ]
ret i32 %16
}
/* Variables and functions */
void *worst_fit_alloc(size_t size) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @worst_fit_alloc(i64 %0) {
ret i8* null
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
void nmt_set_nodeid(struct can_frame *frame, int nodeid) {
  frame->data[1] = nodeid;
}


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

x86 assembly (clang, -O2):
<nmt_set_nodeid>:
mov    (%rdi),%rax
mov    %esi,0x4(%rax)
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define void @nmt_set_nodeid(%struct.can_frame* %0, i32 %1) {
%3 = alloca %struct.can_frame*
%4 = alloca i32
store %struct.can_frame* %0, %struct.can_frame** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load %struct.can_frame*, %struct.can_frame** %3
%7 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %6, i32 0, i32 0
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define void @nmt_set_nodeid(%struct.can_frame* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 1
store i32 %1, i32* %5
ret void
}
/* Variables and functions */
int pow(double, int);
double fPrima(double x) { return 3 * pow(x, 2); }


x86 assembly (clang, -O0):
<fPrima>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
imul   $0x3,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fPrima>:
push   %rax
mov    $0x2,%edi
call   1030 <pow@plt>
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fPrima(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @pow(double %3, i32 2)
%5 = mul nsw i32 3, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @fPrima(double %0) {
%2 = tail call i32 @pow(double %0, i32 2)
%3 = mul nsw i32 %2, 3
%4 = sitofp i32 %3 to double
ret double %4
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ strncmp(char const *, char const *, int);
const char *strmatch(const char *buf, const char *str) {
  int len = strlen(str);
  if (!strncmp(buf, str, len))
    return buf + len;
  return NULL;
}


x86 assembly (clang, -O0):
<strmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1169 <strmatch+0x49>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <strmatch+0x51>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strmatch>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
movslq %ebp,%rdx
add    %r14,%rdx
xor    %ecx,%ecx
test   %eax,%eax
cmove  %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @strmatch(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = select i1 %5, i8* %7, i8* null
ret i8* %8
}
/* Type definitions */
struct t_list {
  int dummy;
};

/* Variables and functions */
struct t_list *add_back_list(struct t_list *plist, struct t_list *other) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.t_list = type { i32 }
define %struct.t_list* @add_back_list(%struct.t_list* %0, %struct.t_list* %1) {
%3 = alloca %struct.t_list*
%4 = alloca %struct.t_list*
store %struct.t_list* %0, %struct.t_list** %3
store %struct.t_list* %1, %struct.t_list** %4
ret %struct.t_list* null
}

LLVM IR (-O2):
%struct.t_list = type { i32 }
define noalias %struct.t_list* @add_back_list(%struct.t_list* nocapture readnone %0, %struct.t_list* nocapture readnone %1) {
ret %struct.t_list* null
}
void jinit_merged_upsampler(void) {}


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

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

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

LLVM IR (-O2):
define void @jinit_merged_upsampler() {
ret void
}
void gg_userlist_remove_free(struct gg_http *h) {}


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

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

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

LLVM IR (-O2):
%struct.gg_http = type opaque
define void @gg_userlist_remove_free(%struct.gg_http* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int sum1, sum2, i, j;
  for (i = 1; i < 101; i++) {
    sum1 = sum1 + i * i;
    sum2 = sum2 + i;
  }
  printf("%d", sum2 * sum2 - sum1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x65,-0x1c(%rbp)
jge    115d <main+0x4d>
mov    -0x14(%rbp),%eax
mov    -0x1c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112d <main+0x1d>
mov    -0x18(%rbp),%esi
imul   -0x18(%rbp),%esi
sub    -0x14(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_add_ui(int /*<<< orphan*/, int /*<<< orphan*/, int);
int mpz_jacobi(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpz_mod(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void GetJnHash(mpz_t n, mpz_t jn_hash) {
  while (mpz_jacobi(jn_hash, n) != 1) {
    mpz_add_ui(jn_hash, jn_hash, 1);
    mpz_mod(jn_hash, jn_hash, n);
  }
}


x86 assembly (clang, -O0):
<GetJnHash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <mpz_jacobi@plt>
cmp    $0x1,%eax
je     1175 <GetJnHash+0x45>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1030 <mpz_add_ui@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1040 <mpz_mod@plt>
jmp    113e <GetJnHash+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetJnHash>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
nopl   0x0(%rax)
mov    %ebp,%esi
call   1050 <mpz_jacobi@plt>
cmp    $0x1,%eax
je     1169 <GetJnHash+0x39>
mov    %ebx,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <mpz_add_ui@plt>
mov    %ebx,%edi
mov    %ebx,%esi
mov    %ebp,%edx
call   1040 <mpz_mod@plt>
mov    %ebx,%edi
jmp    1140 <GetJnHash+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @GetJnHash(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %10, %2
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @mpz_jacobi(i32 %6, i32 %7)
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @mpz_add_ui(i32 %11, i32 %12, i32 1)
%14 = load i32, i32* %4
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = call i32 @mpz_mod(i32 %14, i32 %15, i32 %16)
br label %5
18: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @GetJnHash(i32 %0, i32 %1) {
%3 = tail call i32 @mpz_jacobi(i32 %1, i32 %0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = tail call i32 @mpz_add_ui(i32 %1, i32 %1, i32 1)
%7 = tail call i32 @mpz_mod(i32 %1, i32 %1, i32 %0)
%8 = tail call i32 @mpz_jacobi(i32 %1, i32 %0)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int count = 10, x;
  int *int_pointer;
  int_pointer = &count;
  x = *int_pointer;
  printf("count = %i, x  = %i\n", count, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xebc(%rip),%rdi
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    $0xa,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"count = %i, x = %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 10, i32 10)
ret i32 0
}
void reverse(char *s, char *p) {
  char t;
  --p;
  while (s < p) {
    t = *p;
    *p = *s;
    *s = t;
    ++s;
    --p;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1161 <reverse+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <reverse+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
add    $0xffffffffffffffff,%rsi
cmp    %rdi,%rsi
jbe    112c <reverse+0x2c>
add    $0x1,%rdi
nopl   (%rax)
movzbl (%rsi),%eax
movzbl -0x1(%rdi),%ecx
mov    %cl,(%rsi)
mov    %al,-0x1(%rdi)
add    $0xffffffffffffffff,%rsi
lea    0x1(%rdi),%rax
cmp    %rsi,%rdi
mov    %rax,%rdi
jb     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 -1
%4 = icmp ugt i8* %3, %0
br i1 %4, label %5, label %13
5: ; preds = %2, %5
%6 = phi i8* [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = load i8, i8* %6
%9 = load i8, i8* %7
store i8 %9, i8* %6
store i8 %8, i8* %7
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = getelementptr inbounds i8, i8* %6, i64 -1
%12 = icmp ult i8* %10, %11
br i1 %12, label %5, label %13
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FD_CLOEXEC;
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ abort();
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void set_cloexec(int fd) {
  if (-1 == fcntl(fd, F_SETFD, FD_CLOEXEC)) {
    perror("fcntl");
    abort();
  }
}


x86 assembly (clang, -O0):
<set_cloexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
mov    0x2e8a(%rip),%rax
mov    (%rax),%edx
call   1040 <fcntl@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1177 <set_cloexec+0x47>
lea    0xe95(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cloexec>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
call   1040 <fcntl@plt>
cmp    $0xffffffff,%eax
je     114f <set_cloexec+0x1f>
pop    %rax
ret
lea    0xeaa(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
@.str = [6 x i8] c"fcntl\00"
define void @set_cloexec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFD
%5 = load i32, i32* @FD_CLOEXEC
%6 = call i32 @fcntl(i32 %3, i32 %4, i32 %5)
%7 = icmp eq i32 -1, %6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
@.str = [6 x i8] c"fcntl\00"
define void @set_cloexec(i32 %0) {
%2 = load i32, i32* @F_SETFD
%3 = load i32, i32* @FD_CLOEXEC
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %1
ret void
}
int type_char2int(char *cp) {
  char *op;
  int val = 0;
  op = (char *)&val;
  *op++ = *cp++;
  *op++ = *cp++;
  *op++ = *cp++;
  *op = *cp;
  return (val);
}


x86 assembly (clang, -O0):
<type_char2int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @type_char2int(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = load i8, i8* %2
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %4
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = shl nuw i32 %9, 24
%11 = zext i8 %7 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = zext i8 %5 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = zext i8 %3 to i32
%16 = or i32 %14, %15
%17 = or i32 %16, %12
%18 = or i32 %17, %10
ret i32 %18
}
/* Variables and functions */
size_t strspn(char const *, char const *);
__attribute__((__weak__, __always___)) size_t
softboundmpx_strspn(const char *s, const char *accept) {
  return strspn(s, accept);
}


x86 assembly (clang, -O0):
<softboundmpx_strspn>:
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 <strspn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_strspn>:
jmp    1030 <strspn@plt>

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

LLVM IR (-O2):
define weak i64 @softboundmpx_strspn(i8* %0, i8* %1) {
%3 = tail call i64 @strspn(i8* %0, i8* %1)
ret i64 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  long flags;
};
typedef TYPE_1__ XSizeHints;

/* Variables and functions */
void set_XSizeHints_flags(void *_p, long _v) {
  ((XSizeHints *)_p)->flags = (long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XSizeHints_flags(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int k;
  for (k = 0; k <= 255; k++) {
    printf("%c - %d\n", k, k);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
int benchmark_finiworker(void *tsd) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @benchmark_finiworker(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int StaticLibrary1Function(char);
int StaticLibrary2Function(char c) { return StaticLibrary1Function(c) + 42; }


x86 assembly (clang, -O0):
<StaticLibrary2Function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <StaticLibrary1Function@plt>
add    $0x2a,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StaticLibrary2Function>:
push   %rax
call   1030 <StaticLibrary1Function@plt>
add    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @StaticLibrary2Function(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @StaticLibrary1Function(i8 signext %3)
%5 = add nsw i32 %4, 42
ret i32 %5
}

LLVM IR (-O2):
define i32 @StaticLibrary2Function(i8 signext %0) {
%2 = tail call i32 @StaticLibrary1Function(i8 signext %0)
%3 = add nsw i32 %2, 42
ret i32 %3
}
void g_byte_array_append() {}


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

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

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

LLVM IR (-O2):
define void @g_byte_array_append() {
ret void
}
int Wait_for_pid(int of_pid, char *name, int suspend, int timeout) {}


x86 assembly (clang, -O0):
<Wait_for_pid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Wait_for_pid(i32 %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int pthread_attr_setaffinity_np(pthread_attr_t *attr, size_t cpusetsize,
                                cpu_set_t *cpuset) {
  attr = attr;
  cpusetsize = cpusetsize;
  cpuset = cpuset;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_attr_setaffinity_np>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_attr_setaffinity_np(i32* nocapture readnone %0, i64 %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_01(uint64_t x) {
  __asm__("rolq $1, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_01>:
mov    %rdi,%rax
rol    %rax
ret

LLVM IR (-O0):
define i8* @ROL64_01(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$1, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_01(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$1, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < 100; i++)
    f(7, argc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1152 <main+0x42>
mov    -0x8(%rbp),%esi
mov    $0x7,%edi
call   1030 <f@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x64,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x7,%edi
mov    %ebx,%esi
call   1030 <f@plt>
add    $0xffffffff,%ebp
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %6, %3 ]
%5 = tail call i32 @f(i32 7, i32 %0)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 0
}