xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int is_power_of_two_naive(uint32_t x) {
  uint32_t bit = 1;
  for (int i = 0; i < 32; i++, bit <<= 1) {
    if (x == bit) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_power_of_two_naive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x10(%rbp)
jge    1153 <is_power_of_two_naive+0x53>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1137 <is_power_of_two_naive+0x37>
movl   $0x1,-0x4(%rbp)
jmp    115a <is_power_of_two_naive+0x5a>
jmp    113c <is_power_of_two_naive+0x3c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <is_power_of_two_naive+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two_naive>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1138 <is_power_of_two_naive+0x38>
mov    $0x1,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cmp    $0x1e,%edx
ja     1130 <is_power_of_two_naive+0x30>
lea    0x1(%rcx),%edx
add    %eax,%eax
cmp    %edi,%eax
jne    1120 <is_power_of_two_naive+0x20>
xor    %eax,%eax
cmp    $0x1f,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_power_of_two_naive(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 1, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = shl i32 %5, 1
%8 = icmp ult i32 %4, 31
%9 = xor i1 %8, true
%10 = icmp eq i32 %7, %0
%11 = select i1 %9, i1 true, i1 %10
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = zext i1 %8 to i32
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ 1, %1 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ no_multiples(char *);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  char string[100], find, replace;
  printf("Enter 100 character string: ");
  gets(string);
  printf("%s\n", string);
  no_multiples(string);
  printf("%s\n", string);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x70(%rbp),%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1050 <no_multiples@plt>
lea    -0x70(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <no_multiples@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter 100 character string: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = alloca [100 x i8]
%2 = alloca i8
%3 = alloca i8
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%10 = call i32 @no_multiples(i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Enter 100 character string: \00"
define void @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @puts(i8* %2)
%6 = call i32 @no_multiples(i8* %2)
%7 = call i32 @puts(i8* %2)
ret void
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
int /*<<< orphan*/ underend();
void cmd_underend(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(underend());
}


x86 assembly (clang, -O0):
<cmd_underend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_underend+0x27>
jmp    117f <cmd_underend+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1030 <underend@plt>
mov    %eax,%edi
call   1040 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_underend>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_underend+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1030 <underend@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <report_return@plt>

LLVM IR (-O0):
define void @cmd_underend(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 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @underend()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_underend(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @underend()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
void *handle_create(struct connection *conn) { return conn; }


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

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

LLVM IR (-O0):
%struct.connection = type opaque
define i8* @handle_create(%struct.connection* %0) {
%2 = alloca %struct.connection*
store %struct.connection* %0, %struct.connection** %2
%3 = load %struct.connection*, %struct.connection** %2
%4 = bitcast %struct.connection* %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
%struct.connection = type opaque
define i8* @handle_create(%struct.connection* readnone %0) {
%2 = bitcast %struct.connection* %0 to i8*
ret i8* %2
}
int get_operator(int *program, int statement) { return program[statement * 4]; }


x86 assembly (clang, -O0):
<get_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_operator>:
shl    $0x2,%esi
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_operator(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 = mul nsw i32 %6, 4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_operator(i32* nocapture %0, i32 %1) {
%3 = shl nsw i32 %1, 2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
void ff_hevc_put_hevc_qpel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char *, int);
int netConnectHttps(char *hostName, int port) {
  errAbort("No openssl available in netConnectHttps for %s : %d", hostName,
           port);
  return -1;
}


x86 assembly (clang, -O0):
<netConnectHttps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <errAbort@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netConnectHttps>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
call   1030 <errAbort@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"No openssl available in netConnectHttps for %s : %d\00"
define i32 @netConnectHttps(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 @errAbort(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret i32 -1
}

LLVM IR (-O2):
@.str = [52 x i8] c"No openssl available in netConnectHttps for %s : %d\00"
define i32 @netConnectHttps(i8* %0, i32 %1) {
%3 = tail call i32 @errAbort(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i32 -1
}
/* Type definitions */
struct libavl_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ free(void *);
void rtavl_free(struct libavl_allocator *allocator, void *block) {
  assert(allocator != NULL && block != NULL);
  free(block);
}


x86 assembly (clang, -O0):
<rtavl_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     114b <rtavl_free+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtavl_free>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.libavl_allocator = type { i32 }
define void @rtavl_free(%struct.libavl_allocator* %0, i8* %1) {
%3 = alloca %struct.libavl_allocator*
%4 = alloca i8*
store %struct.libavl_allocator* %0, %struct.libavl_allocator** %3
store i8* %1, i8** %4
%5 = load %struct.libavl_allocator*, %struct.libavl_allocator** %3
%6 = icmp ne %struct.libavl_allocator* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
%struct.libavl_allocator = type { i32 }
define void @rtavl_free(%struct.libavl_allocator* readnone %0, i8* %1) {
%3 = icmp ne %struct.libavl_allocator* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @free(i8* %1)
ret void
}
int is_neg(double n) {
  unsigned long long *i;
  i = (unsigned long long *)&n;
  return ((*i >> 63) & 1);
}


x86 assembly (clang, -O0):
<is_neg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shr    $0x3f,%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_neg>:
movmskpd %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_neg(double %0) {
%2 = alloca double
%3 = alloca i64*
store double %0, double* %2
%4 = bitcast double* %2 to i64*
store i64* %4, i64** %3
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = lshr i64 %6, 63
%8 = and i64 %7, 1
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_neg(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ my_func_1();
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  my_func_1();
  fflush(stdout);
  return 0;
}


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)
mov    $0x0,%al
call   1040 <my_func_1@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <my_func_1@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = 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 (...) @my_func_1()
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @my_func_1()
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret i32 0
}
unsigned int size(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @size() {
ret i32 0
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ die(char *, char *);
int open(char *, int /*<<< orphan*/);
struct stream *sopen_fd(char *, int);
struct stream *sopen_read(char *name) {
  int fd = open(name, O_RDONLY);
  if (fd < 0)
    die("Unable to open %s for reading: %m", name);
  return sopen_fd(name, fd);
}


x86 assembly (clang, -O0):
<sopen_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    116b <sopen_read+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1050 <die@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <sopen_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sopen_read>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1159 <sopen_read+0x29>
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
call   1050 <die@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sopen_fd@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
@O_RDONLY = global i32 0
@.str = [34 x i8] c"Unable to open %s for reading: %m\00"
define %struct.stream* @sopen_read(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @die(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %1
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = call %struct.stream* @sopen_fd(i8* %13, i32 %14)
ret %struct.stream* %15
}

LLVM IR (-O2):
%struct.stream = type { i32 }
@O_RDONLY = global i32 0
@.str = [34 x i8] c"Unable to open %s for reading: %m\00"
define %struct.stream* @sopen_read(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @die(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %1
%8 = tail call %struct.stream* @sopen_fd(i8* %0, i32 %3)
ret %struct.stream* %8
}
/* Variables and functions */
double exp(double);
double b(double x) { return x * x * exp(-1.0 * x); }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
xorpd  0xed7(%rip),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @b(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double -1.000000e+00, %6
%8 = call double @exp(double %7)
%9 = fmul double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @b(double %0) {
%2 = fmul double %0, %0
%3 = fneg double %0
%4 = tail call double @exp(double %3)
%5 = fmul double %2, %4
ret double %5
}
void gtk_label_get_single_line_mode() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_get_single_line_mode() {
ret void
}
/* Variables and functions */
int _makepath(char const *);
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ getcwd(char *, int);
int makepath(const char *path) {
  char savedcwd[128];
  int ret;
  getcwd(savedcwd, 128);
  ret = _makepath(path);
  chdir(savedcwd);
  return ret;
}


x86 assembly (clang, -O0):
<makepath>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    $0x80,%esi
call   1050 <getcwd@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_makepath@plt>
mov    %eax,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <chdir@plt>
mov    -0x94(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makepath>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x80,%esi
call   1050 <getcwd@plt>
mov    %rbx,%rdi
call   1040 <_makepath@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <chdir@plt>
mov    %ebx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @makepath(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = call i32 @getcwd(i8* %5, i32 128)
%7 = load i8*, i8** %2
%8 = call i32 @_makepath(i8* %7)
store i32 %8, i32* %4
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%10 = call i32 @chdir(i8* %9)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @makepath(i8* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @getcwd(i8* %3, i32 128)
%5 = call i32 @_makepath(i8* %0)
%6 = call i32 @chdir(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void my_display(int counter, char c) {
  int i;
  i = 0;
  while (i < counter) {
    write(1, &c, 1);
    i++;
  }
}


x86 assembly (clang, -O0):
<my_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1152 <my_display+0x42>
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <my_display+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_display>:
push   %r14
push   %rbx
push   %rax
mov    %sil,0x7(%rsp)
test   %edi,%edi
jle    1147 <my_display+0x37>
mov    %edi,%ebx
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebx
jne    1130 <my_display+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @my_display(i32 %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = call i32 @write(i32 1, i8* %3, i32 1)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: setfib [-[F]]value command\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: setfib [-[F]]value command\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: setfib [-[F]]value command\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int task_flag_asserted(int, int);
int task_used_asserted(int id) { return task_flag_asserted(id, (1 << 0)); }


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

x86 assembly (clang, -O2):
<task_used_asserted>:
mov    $0x1,%esi
jmp    1030 <task_flag_asserted@plt>

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

LLVM IR (-O2):
define i32 @task_used_asserted(i32 %0) {
%2 = tail call i32 @task_flag_asserted(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void irq_mask_all(void) {
  outb(0x21, 0xFF);
  outb(0xA1, 0xFF);
}


x86 assembly (clang, -O0):
<irq_mask_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_mask_all>:
push   %rax
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @irq_mask_all() {
%1 = call i32 @outb(i32 33, i32 255)
%2 = call i32 @outb(i32 161, i32 255)
ret void
}

LLVM IR (-O2):
define void @irq_mask_all() {
%1 = tail call i32 @outb(i32 33, i32 255)
%2 = tail call i32 @outb(i32 161, i32 255)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ analyze(char);
int main() {
  analyze('a');
  analyze('5');
  analyze('$');
  analyze('Z');
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1030 <analyze@plt>
mov    $0x35,%edi
call   1030 <analyze@plt>
mov    $0x24,%edi
call   1030 <analyze@plt>
mov    $0x5a,%edi
call   1030 <analyze@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @analyze(i8 signext 97)
%3 = call i32 @analyze(i8 signext 53)
%4 = call i32 @analyze(i8 signext 36)
%5 = call i32 @analyze(i8 signext 90)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @analyze(i8 signext 97)
%2 = tail call i32 @analyze(i8 signext 53)
%3 = tail call i32 @analyze(i8 signext 36)
%4 = tail call i32 @analyze(i8 signext 90)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ q();
main() {
  int i;
  for (i = 0; i < 10000000; i++)
    q();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jge    1148 <main+0x38>
mov    $0x0,%al
call   1030 <q@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x989680,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <q@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @q()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 10000000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
float UTIL_rad2deg(float x) { return x * (180.0f / 3.14159265358f); }


x86 assembly (clang, -O0):
<UTIL_rad2deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTIL_rad2deg>:
mulss  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @UTIL_rad2deg(float %0) {
%2 = fmul float %0, 0x404CA5DC00000000
ret float %2
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ function(struct TreeNode *, int /*<<< orphan*/, int *);
int sumNumbers(struct TreeNode *root) {
  int result = 0;
  function(root, 0, &result);
  return result;
}


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

x86 assembly (clang, -O2):
<sumNumbers>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdx
xor    %esi,%esi
call   1030 <function@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %2
store i32 0, i32* %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %2
%5 = call i32 @function(%struct.TreeNode* %4, i32 0, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @function(%struct.TreeNode* %0, i32 0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
void fd177(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
a : {
  typedef int(*f)[n];
P02A:
  goto P02A;
  {
    typedef int(*g)[n];
  P024A:
    goto P024A;
    0;
  };
p02B:
  goto p02B;
  goto a;
P02B:
  goto P02B;
  {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
P02C:
  goto P02C;
  ;
  typedef int(*i)[n];
P026A:
  goto P026A;
  0;
};
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd177>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd177+0x7>

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

LLVM IR (-O0):
define void @fd177(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; No predecessors!
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
br label %25
25: ; preds = %25, %22
br label %25
26: ; No predecessors!
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd177(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() { printf("\n %d \n \n", 200); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"\0A %d \0A \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 200)
ret i32 0
}
void collect(as) register char *as;
{
  if ((strcmp(as, "{") == 0) || (strcmp(as, "{}") == 0)) {
    Gcat(as, "");
    sort();
  } else
    acollect(as);
}


x86 assembly (clang, -O0):
<collect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     117e <collect+0x3e>
mov    -0x8(%rbp),%rdi
lea    0xe92(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    119c <collect+0x5c>
mov    -0x8(%rbp),%rdi
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1030 <Gcat@plt>
mov    $0x0,%al
call   1050 <sort@plt>
jmp    11a7 <collect+0x67>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <acollect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<collect>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1172 <collect+0x32>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1172 <collect+0x32>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <acollect@plt>
lea    0xe88(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <Gcat@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <sort@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"{\00"
@.str.1 = [3 x i8] c"{}\00"
@.str.2 = [1 x i8] zeroinitializer
define void @collect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strcmp(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6, %1
%11 = load i8*, i8** %2
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Gcat to i32 (i8*, i8*, ...)*)(i8* %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (...) @sort()
br label %17
14: ; preds = %6
%15 = load i8*, i8** %2
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @acollect to i32 (i8*, ...)*)(i8* %15)
br label %17
17: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"{\00"
@.str.1 = [3 x i8] c"{}\00"
@.str.2 = [1 x i8] zeroinitializer
define void @collect(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Gcat to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 (...) @sort()
br label %12
10: ; preds = %4
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @acollect to i32 (i8*, ...)*)(i8* %0)
br label %12
12: ; preds = %10, %7
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_indent(size_t depth, FILE *fp) {
  size_t i = 0;
  if (depth <= 0)
    return;
  for (i = 0; i < depth; i++) {
    fprintf(fp, "\t");
  }
}


x86 assembly (clang, -O0):
<print_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
ja     1138 <print_indent+0x28>
jmp    116f <print_indent+0x5f>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116f <print_indent+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1140 <print_indent+0x30>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_indent>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1133 <print_indent+0x23>
mov    %rsi,%r14
mov    %rdi,%rbx
nop
mov    $0x9,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <print_indent+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @print_indent(i64 %0, i32* nocapture %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @fputc(i32 9, i32* %1)
%7 = add nuw i64 %5, 1
%8 = icmp eq i64 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getresgid(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
gid_t getegid(void) {
  gid_t egid;
  getresgid(NULL, &egid, NULL);
  return egid;
}


x86 assembly (clang, -O0):
<getegid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edx
lea    -0x4(%rbp),%rsi
mov    %rdx,%rdi
call   1030 <getresgid@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getegid>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
xor    %edx,%edx
call   1030 <getresgid@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getegid() {
%1 = alloca i32
%2 = call i32 @getresgid(i32* null, i32* %1, i32* null)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @getegid() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @getresgid(i32* null, i32* %1, i32* null)
%4 = load i32, i32* %1
ret i32 %4
}
float restacuadrada(float a, float b) {
  float resta = b - a;
  return resta * resta;
}


x86 assembly (clang, -O0):
<restacuadrada>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<restacuadrada>:
subss  %xmm0,%xmm1
mulss  %xmm1,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @restacuadrada(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %4
%7 = load float, float* %3
%8 = fsub float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = load float, float* %5
%11 = fmul float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @restacuadrada(float %0, float %1) {
%3 = fsub float %1, %0
%4 = fmul float %3, %3
ret float %4
}
/* Variables and functions */
long hash(char *);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char input_word[200];
  long word_hash;
  scanf("%s", input_word);
  word_hash = hash(input_word);
  printf("%ld\n", word_hash);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @hash(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %4)
ret i32 0
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_uart3(void) { gpio_mode((struct gpio *)0x40010C00, 10, 3 | 8); }


x86 assembly (clang, -O0):
<gpio_uart3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010c00,%edi
mov    $0xa,%esi
mov    $0xb,%edx
call   1030 <gpio_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_uart3>:
mov    $0x40010c00,%edi
mov    $0xa,%esi
mov    $0xb,%edx
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_uart3() {
%1 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 10, i32 11)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_uart3() {
%1 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 10, i32 11)
ret void
}
/* Variables and functions */
int dwarf_get_ADDR_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_ADDR_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_ADDR_name(val_in, &v);
  return ellipname(res, val_in, v, "ADDR", printonerr);
}


x86 assembly (clang, -O0):
<get_ADDR_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_ADDR_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ADDR_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_ADDR_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ADDR\00"
define i8* @get_ADDR_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_ADDR_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"ADDR\00"
define i8* @get_ADDR_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_ADDR_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Variables and functions */
scalar_t__ strlen(char *);
scalar_t__ strncmp(char *, char *, scalar_t__);
int cmpfunc(char *c, char *func) {
  if (!c)
    return (0);
  if (strncmp(c, func, strlen(func) - 1) == 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<cmpfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <cmpfunc+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1191 <cmpfunc+0x71>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
sub    $0x1,%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    118a <cmpfunc+0x6a>
movl   $0x1,-0x4(%rbp)
jmp    1191 <cmpfunc+0x71>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpfunc>:
test   %rdi,%rdi
je     1159 <cmpfunc+0x39>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @cmpfunc(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = add nsw i64 %5, -1
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %9, %4 ]
ret i32 %11
}