xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ IsEolMsdos(char const *);
scalar_t__ IsEolUnix(char const *);
int /*<<< orphan*/ g_assert(char const *);
extern int IsEol(const char *pc) {
  g_assert(pc);
  return IsEolUnix(pc) || IsEolMsdos(pc);
}


x86 assembly (clang, -O0):
<IsEol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <g_assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <IsEolUnix@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1173 <IsEol+0x43>
mov    -0x8(%rbp),%rdi
call   1050 <IsEolMsdos@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEol>:
push   %rbx
mov    %rdi,%rbx
call   1030 <g_assert@plt>
mov    %rbx,%rdi
call   1040 <IsEolUnix@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1150 <IsEol+0x20>
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <IsEolMsdos@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IsEol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @g_assert(i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @IsEolUnix(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @IsEolMsdos(i8* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ true, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @IsEol(i8* %0) {
%2 = tail call i32 @g_assert(i8* %0)
%3 = tail call i64 @IsEolUnix(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i64 @IsEolMsdos(i8* %0)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 1, %1 ], [ %8, %5 ]
ret i32 %10
}
int exact_square(int n) {
  int c = 0, i;
  for (i = 1; i <= n; i++) {
    if (i * i == n) {
      c = 1;
      break;
    }
  }
  return c;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1150 <exact_square+0x50>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    113d <exact_square+0x3d>
movl   $0x1,-0x8(%rbp)
jmp    1150 <exact_square+0x50>
jmp    1142 <exact_square+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <exact_square+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
xor    %eax,%eax
test   %edi,%edi
jle    1127 <exact_square+0x27>
mov    %edi,%ecx
neg    %ecx
mov    $0x1,%edx
nop
mov    %edx,%esi
imul   %edx,%esi
cmp    %edi,%esi
je     1128 <exact_square+0x28>
lea    (%rcx,%rdx,1),%esi
add    $0x1,%esi
add    $0x1,%edx
cmp    $0x1,%esi
jne    1110 <exact_square+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 1, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %6, %1
%11 = phi i32 [ 0, %1 ], [ 1, %6 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
int strcmp(char const *const, char const *const);
int qsort_aux_strings(const void *a, const void *b) {
  return strcmp(*(const char const *const *)a, *(const char const *const *)b);
}


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

x86 assembly (clang, -O2):
<qsort_aux_strings>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @qsort_aux_strings(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_aux_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(unsigned int);
int /*<<< orphan*/ stderr;
void *xmalloc(unsigned size) {
  void *result = malloc(size);
  if (!result) {
    fprintf(stderr, "Out of memory\n");
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1175 <xmalloc+0x45>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"Out of memory\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @xmalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
int PDC_set_scrn_mode(new_mode)
int new_mode;
{}


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

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

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

LLVM IR (-O2):
define i32 @PDC_set_scrn_mode(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ GetHTTP(char **);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc < 2) {
    usage();
    return (1);
  }
  GetHTTP(argv);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1153 <main+0x33>
mov    $0x0,%al
call   1040 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1163 <main+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <GetHTTP@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1134 <main+0x14>
xor    %eax,%eax
call   1040 <usage@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    %rsi,%rdi
call   1030 <GetHTTP@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
store i32 1, i32* %3
br label %13
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = call i32 @GetHTTP(i8** %11)
store i32 0, i32* %3
br label %13
13: ; preds = %10, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %8
6: ; preds = %2
%7 = tail call i32 @GetHTTP(i8** %1)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %9
}
void ff_hevc_put_hevc_uni_w_epel_v16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v16_8_sse4() {
ret void
}
/* Variables and functions */
int atoi(char *);
char *roadmap_option_get_geometry(char const *);
char *strchr(char const *, char);
int roadmap_option_height(const char *name) {
  const char *option = roadmap_option_get_geometry(name);
  char *separator;
  separator = strchr(option, 'x');
  if (separator == NULL) {
    return 200;
  }
  return atoi(separator + 1);
}


x86 assembly (clang, -O0):
<roadmap_option_height>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <roadmap_option_get_geometry@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x78,%esi
call   1040 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1172 <roadmap_option_height+0x42>
movl   $0xc8,-0x4(%rbp)
jmp    1182 <roadmap_option_height+0x52>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_option_height>:
push   %rax
call   1030 <roadmap_option_get_geometry@plt>
mov    %rax,%rdi
mov    $0x78,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1155 <roadmap_option_height+0x25>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rax
jmp    1050 <atoi@plt>
mov    $0xc8,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @roadmap_option_height(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @roadmap_option_get_geometry(i8* %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i8* @strchr(i8* %8, i8 signext 120)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 200, i32* %2
br label %17
13: ; preds = %1
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %2
br label %17
17: ; preds = %13, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @roadmap_option_height(i8* %0) {
%2 = tail call i8* @roadmap_option_get_geometry(i8* %0)
%3 = tail call i8* @strchr(i8* dereferenceable(1) %2, i8 signext 120)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ 200, %1 ]
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool __create_1_less_than(void *cc, void *v, void *k) {
  return *(uint32_t *)v < *(uint32_t *)cc;
}


x86 assembly (clang, -O0):
<__create_1_less_than>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__create_1_less_than>:
mov    (%rsi),%rcx
xor    %eax,%eax
cmp    (%rdi),%rcx
setl   %al
ret

LLVM IR (-O0):
define i32 @__create_1_less_than(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
%13 = icmp slt i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @__create_1_less_than(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %0 to i64*
%7 = load i64, i64* %6
%8 = icmp slt i64 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
__typeof__(strchr(1, (void *)1)) test_strchr_178(void) {
  return strchr(1, (void *)1);
}


x86 assembly (clang, -O0):
<test_strchr_178>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    %edi,%esi
call   1030 <strchr@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @test_strchr_178() {
%1 = call i8* @strchr(i8* inttoptr (i64 1 to i8*), i32 ptrtoint (i8* inttoptr (i64 1 to i8*) to i32))
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_strchr_178() {
%1 = tail call i8* @strchr(i8* inttoptr (i64 1 to i8*), i32 1)
ret i8* %1
}
int test_imm_77uint16_reg(unsigned short val) {
  return ((val) & (-0x77 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_77uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -119
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t cwk_path_join_and_normalize_multiple(char const **, char *, size_t);
size_t cwk_path_join(const char *path_a, const char *path_b, char *buffer,
                     size_t buffer_size) {
  const char *paths[3];
  paths[0] = path_a;
  paths[1] = path_b;
  paths[2] = NULL;
  return cwk_path_join_and_normalize_multiple(paths, buffer, buffer_size);
}


x86 assembly (clang, -O0):
<cwk_path_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <cwk_path_join_and_normalize_multiple@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwk_path_join>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
mov    %rsi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <cwk_path_join_and_normalize_multiple@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @cwk_path_join(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca [3 x i8*]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %9, i64 0, i64 0
store i8* %10, i8** %11
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [3 x i8*], [3 x i8*]* %9, i64 0, i64 1
store i8* %12, i8** %13
%14 = getelementptr inbounds [3 x i8*], [3 x i8*]* %9, i64 0, i64 2
store i8* null, i8** %14
%15 = getelementptr inbounds [3 x i8*], [3 x i8*]* %9, i64 0, i64 0
%16 = load i8*, i8** %7
%17 = load i64, i64* %8
%18 = call i64 @cwk_path_join_and_normalize_multiple(i8** %15, i8* %16, i64 %17)
ret i64 %18
}

LLVM IR (-O2):
define i64 @cwk_path_join(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca [3 x i8*]
%6 = bitcast [3 x i8*]* %5 to i8*
%7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %5, i64 0, i64 0
store i8* %0, i8** %7
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %5, i64 0, i64 1
store i8* %1, i8** %8
%9 = getelementptr inbounds [3 x i8*], [3 x i8*]* %5, i64 0, i64 2
store i8* null, i8** %9
%10 = call i64 @cwk_path_join_and_normalize_multiple(i8** %7, i8* %2, i64 %3)
ret i64 %10
}
long long bit04() { return 0x0000000000000010LL; }


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

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

LLVM IR (-O0):
define i64 @bit04() {
ret i64 16
}

LLVM IR (-O2):
define i64 @bit04() {
ret i64 16
}
/* Variables and functions */
int /*<<< orphan*/ ef_input(char const *);
void run(const char *file_name) { ef_input(file_name); }


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

x86 assembly (clang, -O2):
<run>:
jmp    1030 <ef_input@plt>

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

LLVM IR (-O2):
define void @run(i8* %0) {
%2 = tail call i32 @ef_input(i8* %0)
ret void
}
const char *vdeFun_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  case 2:
    return "o2";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vdeFun_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <vdeFun_name_out+0x3c>
jmp    111a <vdeFun_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <vdeFun_name_out+0x4c>
jmp    112b <vdeFun_name_out+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <vdeFun_name_out+0x5c>
jmp    116c <vdeFun_name_out+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vdeFun_name_out+0x74>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vdeFun_name_out+0x74>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vdeFun_name_out+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdeFun_name_out>:
cmp    $0x2,%edi
ja     1117 <vdeFun_name_out+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
define i8* @vdeFun_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
@reltable.vdeFun_name_out = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.vdeFun_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.vdeFun_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.vdeFun_name_out to i64)) to i32)]
define i8* @vdeFun_name_out(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.vdeFun_name_out to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
scalar_t__ is_leap_year(unsigned int);
unsigned _days_in_year(unsigned year) { return is_leap_year(year) ? 366 : 365; }


x86 assembly (clang, -O0):
<_days_in_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_leap_year@plt>
mov    %rax,%rdx
mov    $0x16d,%eax
mov    $0x16e,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_days_in_year>:
push   %rax
call   1030 <is_leap_year@plt>
cmp    $0x1,%rax
mov    $0x16e,%eax
sbb    $0x0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_days_in_year(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @is_leap_year(i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 366, i32 365
ret i32 %7
}

LLVM IR (-O2):
define i32 @_days_in_year(i32 %0) {
%2 = tail call i64 @is_leap_year(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 365, i32 366
ret i32 %4
}
/* Variables and functions */
int syscall(int, char const *, char const *, char const *, unsigned long,
            void const *);
int mount(const char *special, const char *dir, const char *fstype,
          unsigned long flags, const void *data) {
  return syscall(21, special, dir, fstype, flags, data);
}


x86 assembly (clang, -O0):
<mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    $0x15,%edi
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mount>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x15,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @mount(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = load i8*, i8** %10
%16 = call i32 @syscall(i32 21, i8* %11, i8* %12, i8* %13, i64 %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @mount(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4) {
%6 = tail call i32 @syscall(i32 21, i8* %0, i8* %1, i8* %2, i64 %3, i8* %4)
ret i32 %6
}
int doBackGroundTaskWithCallback(void *callbackFunction) {
  BCLMarkFunc(__PRETTY_FUNCTION__, __FUNCTION__);
  startThread(callbackFunction);
  return 0;
}


x86 assembly (clang, -O0):
<doBackGroundTaskWithCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    $0x0,%al
call   1030 <BCLMarkFunc@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <startThread@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doBackGroundTaskWithCallback>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <BCLMarkFunc@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <startThread@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__PRETTY_FUNCTION__.doBackGroundTaskWithCallback = [41 x i8] c"int doBackGroundTaskWithCallback(void *)\00"
@__FUNCTION__.doBackGroundTaskWithCallback = [29 x i8] c"doBackGroundTaskWithCallback\00"
define i32 @doBackGroundTaskWithCallback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @BCLMarkFunc to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @__PRETTY_FUNCTION__.doBackGroundTaskWithCallback, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @__FUNCTION__.doBackGroundTaskWithCallback, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @startThread to i32 (i8*, ...)*)(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__PRETTY_FUNCTION__.doBackGroundTaskWithCallback = [41 x i8] c"int doBackGroundTaskWithCallback(void *)\00"
@__FUNCTION__.doBackGroundTaskWithCallback = [29 x i8] c"doBackGroundTaskWithCallback\00"
define i32 @doBackGroundTaskWithCallback(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @BCLMarkFunc to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @__PRETTY_FUNCTION__.doBackGroundTaskWithCallback, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @__FUNCTION__.doBackGroundTaskWithCallback, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @startThread to i32 (i8*, ...)*)(i8* %0)
ret i32 0
}
/* Variables and functions */
double sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ vec_mag_sq(double, double);
double vec_mag(double x, double y) { return sqrt(vec_mag_sq(x, y)); }


x86 assembly (clang, -O0):
<vec_mag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <vec_mag_sq@plt>
mov    %eax,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @vec_mag(double %0, double %1) {
%3 = tail call i32 @vec_mag_sq(double %0, double %1)
%4 = tail call double @sqrt(i32 %3)
ret double %4
}
int checkReserved(char *s) {}


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

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

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

LLVM IR (-O2):
define i32 @checkReserved(i8* nocapture readnone %0) {
ret i32 undef
}
void disconnect() {}


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

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

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

LLVM IR (-O2):
define void @disconnect() {
ret void
}
int h(x)
float x;
{ return 0; }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @h(double %0) {
%2 = alloca float
%3 = fptrunc double %0 to float
store float %3, float* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @h(double %0) {
ret i32 0
}
void yydestruct(const char *yymsg, int yytype, int *yyvaluep) {
  ((void)(yyvaluep));
  if (!yymsg)
    yymsg = "Deleting";
  ;

#pragma GCC diagnostic push

#pragma GCC diagnostic ignored "-Wuninitialized"

#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

  ((void)(yytype));

#pragma GCC diagnostic pop
}


x86 assembly (clang, -O0):
<yydestruct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1125 <yydestruct+0x25>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @yydestruct(i8* nocapture %0, i32 %1, i32* nocapture %2) {
ret void
}
double f12(double x) {
  double t = x - (-0.0);
  return t - (-0.0);
}


x86 assembly (clang, -O0):
<f12>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f12>:
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f12(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, -0.000000e+00
store double %5, double* %3
%6 = load double, double* %3
%7 = fsub double %6, -0.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f12(double %0) {
%2 = fadd double %0, 0.000000e+00
ret double %2
}
void sigfunc(int signo) {}


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

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

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

LLVM IR (-O2):
define void @sigfunc(i32 %0) {
ret void
}
int rl_init_alloc(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rl_init_alloc() {
ret i32 0
}
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int *arr, int lhs, int rhs) {
  if (lhs < rhs) {
    int mid;
    mid = partition(arr, lhs, rhs);
    quick_sort(arr, lhs, mid - 1);
    quick_sort(arr, mid + 1, rhs);
  }
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quick_sort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
void n_spaces(n) int n;
{
  while (!(n == 0)) {
    putchar(' ');
    n--;
  }
}


x86 assembly (clang, -O0):
<n_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
xor    $0xff,%al
test   $0x1,%al
jne    1131 <n_spaces+0x21>
jmp    114b <n_spaces+0x3b>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <n_spaces+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_spaces>:
push   %rbx
test   %edi,%edi
je     1131 <n_spaces+0x21>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <n_spaces+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @n_spaces(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 32)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @n_spaces(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 32)
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void gs_wait_message(int code) { (void)code; }


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

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

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

LLVM IR (-O2):
define void @gs_wait_message(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_prog(char *);
void add_progs(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++)
    add_prog(argv[i]);
}


x86 assembly (clang, -O0):
<add_progs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <add_progs+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <add_prog@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <add_progs+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_progs>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <add_progs+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <add_prog@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <add_progs+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @add_progs(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @add_prog(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int myCompare(const void *a, const void *b) {
  return strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<myCompare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @myCompare(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @myCompare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int main(void) {
  printf("str1");
  fflush(stdout);
  sleep(5);
  printf("str2");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"str1\00"
@stdout = global i32 0
@.str.1 = [5 x i8] c"str2\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @sleep(i32 5)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"str1\00"
@stdout = global i32 0
@.str.1 = [5 x i8] c"str2\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @sleep(i32 5)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ si_uid;
  scalar_t__ si_pid;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long);
void hdl(int sig, siginfo_t *siginfo, void *context) {
  printf("Sending PID: %ld, UID: %ld\n", (long)siginfo->si_pid,
         (long)siginfo->si_uid);
}


x86 assembly (clang, -O0):
<hdl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdl>:
mov    (%rsi),%rdx
mov    0x8(%rsi),%rsi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
@.str = [28 x i8] c"Sending PID: %ld, UID: %ld\0A\00"
define void @hdl(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %12)
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64, i64 }
@.str = [28 x i8] c"Sending PID: %ld, UID: %ld\0A\00"
define void @hdl(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %7)
ret void
}
int getNextChar(int myChar) {
  myChar = (myChar + 1) % 127;
  if (myChar < 33) {
    myChar = 33;
  };
  return myChar;
}


x86 assembly (clang, -O0):
<getNextChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x7f,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jge    1129 <getNextChar+0x29>
movl   $0x21,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNextChar>:
mov    %edi,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff81020409,%rax,%rax
shr    $0x20,%rax
add    %edi,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x6,%eax
add    %ecx,%eax
mov    %eax,%ecx
shl    $0x7,%ecx
sub    %ecx,%eax
lea    (%rdi,%rax,1),%ecx
add    $0x1,%ecx
cmp    $0x22,%ecx
mov    $0x21,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getNextChar(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = srem i32 %2, 127
%4 = icmp sgt i32 %3, 33
%5 = select i1 %4, i32 %3, i32 33
ret i32 %5
}
/* Type definitions */
struct RNAup_args_info {
  int dummy;
};

/* Variables and functions */
int RNAup_cmdline_parser2(int, char **, struct RNAup_args_info *,
                          int /*<<< orphan*/, int, int);
int RNAup_cmdline_parser(int argc, char **argv,
                         struct RNAup_args_info *args_info) {
  return RNAup_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<RNAup_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <RNAup_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAup_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAup_cmdline_parser2@plt>

LLVM IR (-O0):
%struct.RNAup_args_info = type { i32 }
define i32 @RNAup_cmdline_parser(i32 %0, i8** %1, %struct.RNAup_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.RNAup_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.RNAup_args_info* %2, %struct.RNAup_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.RNAup_args_info*, %struct.RNAup_args_info** %6
%10 = call i32 @RNAup_cmdline_parser2(i32 %7, i8** %8, %struct.RNAup_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.RNAup_args_info = type { i32 }
define i32 @RNAup_cmdline_parser(i32 %0, i8** %1, %struct.RNAup_args_info* %2) {
%4 = tail call i32 @RNAup_cmdline_parser2(i32 %0, i8** %1, %struct.RNAup_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
int hash_function(char data) { return (((1 << 4) - 1) & data); }


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

x86 assembly (clang, -O2):
<hash_function>:
mov    %edi,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @hash_function(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 15, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hash_function(i8 signext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i32
ret i32 %3
}
int test_75_4(int *mem) { return __atomic_fetch_nand(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_75_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x10,%rcx
mov    %rcx,-0x20(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    0x10(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
mov    %edx,-0x28(%rbp)
not    %edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    1158 <test_75_4+0x58>
jmp    112a <test_75_4+0x2a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_75_4>:
mov    0x10(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %ecx
lock cmpxchg %ecx,0x10(%rdi)
jne    1110 <test_75_4+0x10>
ret

LLVM IR (-O0):
define i32 @test_75_4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 4
store i32 -1, i32* %3
%7 = load i32, i32* %3
%8 = atomicrmw nand i32* %6, i32 %7 acq_rel
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_75_4(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = atomicrmw nand i32* %2, i32 -1 acq_rel
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ match_indirect(char **, void *);
bool match_optional(char **p, void *bd) {
  match_indirect(p, bd);
  return true;
}


x86 assembly (clang, -O0):
<match_optional>:
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 <match_indirect@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_optional>:
push   %rax
call   1030 <match_indirect@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @match_optional(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 i32 @match_indirect(i8** %5, i8* %6)
ret i32 1
}

LLVM IR (-O2):
define i32 @match_optional(i8** %0, i8* %1) {
%3 = tail call i32 @match_indirect(i8** %0, i8* %1)
ret i32 1
}