xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, float *);
float atofpm(const char *s) {
  float r = 0.0;
  sscanf(s, "%f", &r);
  return r;
}


x86 assembly (clang, -O0):
<atofpm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sscanf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atofpm>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define float @atofpm(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
store float 0.000000e+00, float* %3
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define float @atofpm(i8* nocapture %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%5 = load float, float* %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ bar(char *);
int foo() {
  int i = 0;
  {
    char a[8192];
    bar(a);
    i += a[0];
  }
  {
    char a[8192];
    char b[32];
    bar(a);
    i += a[0];
    bar(b);
    i += a[0];
  }
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4030,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2010(%rbp),%rdi
call   1030 <bar@plt>
movsbl -0x2010(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4010(%rbp),%rdi
call   1030 <bar@plt>
movsbl -0x4010(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4030(%rbp),%rdi
call   1030 <bar@plt>
movsbl -0x4010(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
sub    $0x2028,%rsp
lea    0x20(%rsp),%rdi
call   1030 <bar@plt>
movsbl 0x20(%rsp),%ebx
lea    0x20(%rsp),%rdi
call   1030 <bar@plt>
movsbl 0x20(%rsp),%ebp
add    %ebx,%ebp
mov    %rsp,%rdi
call   1030 <bar@plt>
movsbl 0x20(%rsp),%eax
add    %ebp,%eax
add    $0x2028,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca [8192 x i8]
%3 = alloca [8192 x i8]
%4 = alloca [32 x i8]
store i32 0, i32* %1
%5 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%6 = call i32 @bar(i8* %5)
%7 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
%12 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%13 = call i32 @bar(i8* %12)
%14 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i32, i32* %1
%18 = add nsw i32 %17, %16
store i32 %18, i32* %1
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%20 = call i32 @bar(i8* %19)
%21 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = load i32, i32* %1
%25 = add nsw i32 %24, %23
store i32 %25, i32* %1
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca [8192 x i8]
%2 = alloca [8192 x i8]
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %1, i64 0, i64 0
%5 = call i32 @bar(i8* %4)
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @bar(i8* %8)
%11 = load i8, i8* %8
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, %7
%14 = call i32 @bar(i8* %9)
%15 = load i8, i8* %8
%16 = sext i8 %15 to i32
%17 = add nsw i32 %13, %16
ret i32 %17
}
/* Variables and functions */
int touch_input();
int touch_all(void) {
  int idx, bit;
  static int Is_All;
  idx = touch_input();
  bit = 1 << idx;
  Is_All |= bit;
  if (Is_All == 0xFF)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<touch_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <touch_input@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     0x2ef4(%rip),%eax
mov    %eax,0x2eee(%rip)
cmpl   $0xff,0x2ee4(%rip)
jne    115a <touch_all+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <touch_all+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch_all>:
push   %rax
xor    %eax,%eax
call   1030 <touch_input@plt>
mov    0x2f0e(%rip),%ecx
bts    %eax,%ecx
mov    %ecx,0x2f05(%rip)
xor    %eax,%eax
cmp    $0xff,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@touch_all.Is_All = internal global i32 0
define i32 @touch_all() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @touch_input()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = shl i32 1, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* @touch_all.Is_All
%9 = or i32 %8, %7
store i32 %9, i32* @touch_all.Is_All
%10 = load i32, i32* @touch_all.Is_All
%11 = icmp eq i32 %10, 255
br i1 %11, label %12, label %13
12: ; preds = %0
store i32 1, i32* %1
br label %14
13: ; preds = %0
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@touch_all.Is_All = internal unnamed_addr global i32 0
define i32 @touch_all() {
%1 = tail call i32 (...) @touch_input()
%2 = shl nuw i32 1, %1
%3 = load i32, i32* @touch_all.Is_All
%4 = or i32 %3, %2
store i32 %4, i32* @touch_all.Is_All
%5 = icmp eq i32 %4, 255
%6 = zext i1 %5 to i32
ret i32 %6
}
fix_options(request) struct request_info *request;
{}


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

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

LLVM IR (-O0):
%struct.request_info = type opaque
define i32 @fix_options(%struct.request_info* %0) {
%2 = alloca i32
%3 = alloca %struct.request_info*
store %struct.request_info* %0, %struct.request_info** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.request_info = type opaque
define i32 @fix_options(%struct.request_info* nocapture readnone %0) {
ret i32 undef
}
double ATMtoINHG(double ATM) {
  double INHG = 29.9213 * ATM;
  return INHG;
}


x86 assembly (clang, -O0):
<ATMtoINHG>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @ATMtoINHG(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 2.992130e+01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @ATMtoINHG(double %0) {
%2 = fmul double %0, 2.992130e+01
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ foo();
scalar_t__ jump();
int main(void) {
  if (jump())
    goto end;
  while (1) {
    for (int i = 0; i < 100; ++i) {
      foo();
    }
  }
end:
  cleanup();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <jump@plt>
cmp    $0x0,%rax
je     1155 <main+0x25>
jmp    1185 <main+0x55>
jmp    115a <main+0x2a>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1180 <main+0x50>
mov    $0x0,%al
call   1030 <foo@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <main+0x31>
jmp    115a <main+0x2a>
mov    $0x0,%al
call   1050 <cleanup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <jump@plt>
test   %rax,%rax
je     1150 <main+0x20>
xor    %eax,%eax
call   1050 <cleanup@plt>
xor    %eax,%eax
pop    %rbx
ret
nopl   0x0(%rax,%rax,1)
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <foo@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x30>
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @jump()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %4, %0
br label %4
4: ; preds = %3, %4
%5 = phi i32 [ 0, %3 ], [ %7, %4 ]
%6 = tail call i32 (...) @foo()
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, 100
br i1 %8, label %3, label %4
9: ; preds = %0
%10 = tail call i32 (...) @cleanup()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ crb_puts(int /*<<< orphan*/, char *, int);
void backspace_and_erase(void) { crb_puts(0, "\b \b", 3); }


x86 assembly (clang, -O0):
<backspace_and_erase>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x3,%edx
call   1030 <crb_puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<backspace_and_erase>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x3,%edx
jmp    1030 <crb_puts@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"\08 \08\00"
define void @backspace_and_erase() {
%1 = tail call i32 @crb_puts(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
void skip_post_post(void) { {}; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ cttk_i31_divrem(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ const *,
                                   int /*<<< orphan*/ const *);
void cttk_i31_rem(uint32_t *r, const uint32_t *a, const uint32_t *b) {
  cttk_i31_divrem(NULL, r, a, b);
}


x86 assembly (clang, -O0):
<cttk_i31_rem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <cttk_i31_divrem@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cttk_i31_rem>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <cttk_i31_divrem@plt>

LLVM IR (-O0):
define void @cttk_i31_rem(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @cttk_i31_divrem(i32* null, i32* %7, i32* %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @cttk_i31_rem(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @cttk_i31_divrem(i32* null, i32* %0, i32* %1, i32* %2)
ret void
}
/* Variables and functions */
int f476(int *);
int f477(int *p) { return f476(p); }


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

x86 assembly (clang, -O2):
<f477>:
jmp    1030 <f476@plt>

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

LLVM IR (-O2):
define i32 @f477(i32* %0) {
%2 = tail call i32 @f476(i32* %0)
ret i32 %2
}
void excHandler(void) {
  while (1)
    ;
}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @d2i_RSAPrivateKey_bio() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printAllCombos(int, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  int n = 4;
  char *parray = (char *)malloc(2 * n * sizeof(char) + 1);
  printf("\n");
  printAllCombos(n, n, parray, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <printAllCombos@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x9,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1040 <printAllCombos@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 4, i32* %1
%3 = load i32, i32* %1
%4 = mul nsw i32 2, %3
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 1
%7 = add i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %1
%13 = load i32, i32* %1
%14 = load i8*, i8** %2
%15 = call i32 @printAllCombos(i32 %12, i32 %13, i8* %14, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 9)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @printAllCombos(i32 4, i32 4, i8* %2, i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glTexEnvfv_size(int /*<<< orphan*/);
GLint __glTexEnviv_size(GLenum e) { return __glTexEnvfv_size(e); }


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

x86 assembly (clang, -O2):
<__glTexEnviv_size>:
jmp    1030 <__glTexEnvfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glTexEnviv_size(i32 %0) {
%2 = tail call i32 @__glTexEnvfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void make_full_path_pdb(char *pdb_file, char *data_dir, char *prot) {
  strcpy(pdb_file, "");
  strcat(pdb_file, data_dir);
  strcat(pdb_file, "/");
  strcat(pdb_file, prot);
  strcat(pdb_file, ".pdb");
}


x86 assembly (clang, -O0):
<make_full_path_pdb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1040 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_full_path_pdb>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcat@plt>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [5 x i8] c".pdb\00"
define void @make_full_path_pdb(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** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @strcat(i8* %9, i8* %10)
%12 = load i8*, i8** %4
%13 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = load i8*, i8** %4
%15 = load i8*, i8** %6
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [5 x i8] c".pdb\00"
define void @make_full_path_pdb(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @strcat(i8* %0, i8* %1)
%6 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @strcat(i8* %0, i8* %2)
%8 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool IsNumeric(char C) {
  bool Result = ('0' <= C && C <= '9') || C == '+' || C == '-';
  return Result;
}


x86 assembly (clang, -O0):
<IsNumeric>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     112d <IsNumeric+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x9(%rbp)
jle    114c <IsNumeric+0x4c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x9(%rbp)
je     114c <IsNumeric+0x4c>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNumeric>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x2b,%dil
sete   %cl
cmp    $0x2d,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @IsNumeric(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sle i32 48, %5
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 43
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 45
br label %19
19: ; preds = %15, %11, %7
%20 = phi i1 [ true, %11 ], [ true, %7 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @IsNumeric(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = icmp eq i8 %0, 43
%5 = or i1 %4, %3
%6 = icmp eq i8 %0, 45
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
int isprefix(s, pref)
char *s;
char *pref;
{
  while (1) {
    if (*pref == 0)
      return 1;
    if (*s == 0)
      return 0;
    if (*s != *pref)
      return 0;
    s++;
    pref++;
  }
}


x86 assembly (clang, -O0):
<isprefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1128 <isprefix+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1183 <isprefix+0x83>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1144 <isprefix+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1183 <isprefix+0x83>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1166 <isprefix+0x66>
movl   $0x0,-0x4(%rbp)
jmp    1183 <isprefix+0x83>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <isprefix+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprefix>:
mov    (%rsi),%r8b
mov    $0x1,%eax
test   %r8b,%r8b
je     112c <isprefix+0x2c>
xor    %edx,%edx
nop
movzbl (%rdi,%rdx,1),%ecx
test   %cl,%cl
je     112d <isprefix+0x2d>
cmp    %r8b,%cl
jne    112d <isprefix+0x2d>
movzbl 0x1(%rsi,%rdx,1),%r8d
add    $0x1,%rdx
test   %r8b,%r8b
jne    1110 <isprefix+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isprefix(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %6
6: ; preds = %2, %27
%7 = load i8*, i8** %5
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %6
store i32 1, i32* %3
br label %32
12: ; preds = %6
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 0, i32* %3
br label %32
18: ; preds = %12
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8*, i8** %5
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %21, %24
br i1 %25, label %26, label %27
26: ; preds = %18
store i32 0, i32* %3
br label %32
27: ; preds = %18
%28 = load i8*, i8** %4
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %4
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %5
br label %6
32: ; preds = %26, %17, %11
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @isprefix(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %16, %13 ], [ %3, %2 ]
%7 = phi i8* [ %15, %13 ], [ %1, %2 ]
%8 = phi i8* [ %14, %13 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
%11 = icmp eq i8 %9, %6
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = getelementptr inbounds i8, i8* %7, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %13, %5, %2
%19 = phi i32 [ 1, %2 ], [ 0, %5 ], [ 1, %13 ]
ret i32 %19
}
void x64_nop(int i, unsigned tar, unsigned arg1, unsigned arg2) {}


x86 assembly (clang, -O0):
<x64_nop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @x64_nop(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @x64_nop(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Type definitions */
typedef int wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ EILSEQ;
int /*<<< orphan*/ errno;
size_t wcrtomb(char *__restrict s, wchar_t wc, mbstate_t *__restrict ps) {
  if (s == NULL)
    return (1);
#pragma diag_suppress 188
  if (wc < 0 || wc > 127) {
    errno = EILSEQ;
    return ((size_t)-1);
  }
  *s = (unsigned char)wc;
  return (1);
}


x86 assembly (clang, -O0):
<wcrtomb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1127 <wcrtomb+0x27>
movq   $0x1,-0x8(%rbp)
jmp    116d <wcrtomb+0x6d>
cmpl   $0x0,-0x14(%rbp)
jl     113b <wcrtomb+0x3b>
cmpl   $0x7f,-0x14(%rbp)
jle    115a <wcrtomb+0x5a>
mov    0x2eae(%rip),%rax
mov    (%rax),%ecx
mov    0x2e8d(%rip),%rax
mov    %ecx,(%rax)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    116d <wcrtomb+0x6d>
mov    -0x14(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcrtomb>:
mov    $0x1,%eax
test   %rdi,%rdi
je     112f <wcrtomb+0x2f>
cmp    $0x80,%esi
jb     112c <wcrtomb+0x2c>
mov    0x2ed7(%rip),%rax
mov    (%rax),%eax
mov    0x2eb6(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffffffffffff,%rax
ret
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
@EILSEQ = global i32 0
@errno = global i32 0
define i64 @wcrtomb(i8* noalias %0, i32 %1, i32* noalias %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %3
store i64 1, i64* %4
br label %23
11: ; preds = %3
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 127
br i1 %16, label %17, label %19
17: ; preds = %14, %11
%18 = load i32, i32* @EILSEQ
store i32 %18, i32* @errno
store i64 -1, i64* %4
br label %23
19: ; preds = %14
%20 = load i32, i32* %6
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %5
store i8 %21, i8* %22
store i64 1, i64* %4
br label %23
23: ; preds = %19, %17, %10
%24 = load i64, i64* %4
ret i64 %24
}

LLVM IR (-O2):
@EILSEQ = global i32 0
@errno = global i32 0
define i64 @wcrtomb(i8* noalias writeonly %0, i32 %1, i32* noalias nocapture readnone %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = icmp ugt i32 %1, 127
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = load i32, i32* @EILSEQ
store i32 %8, i32* @errno
br label %11
9: ; preds = %5
%10 = trunc i32 %1 to i8
store i8 %10, i8* %0
br label %11
11: ; preds = %3, %9, %7
%12 = phi i64 [ -1, %7 ], [ 1, %9 ], [ 1, %3 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, int);
void fast_memset(void *dst, int value, int width) { memset(dst, value, width); }


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

x86 assembly (clang, -O2):
<fast_memset>:
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @fast_memset(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_opt_math();
int InitECC(void) {
  init_opt_math();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @InitECC() {
%1 = tail call i32 (...) @init_opt_math()
ret i32 0
}
unsigned long der_object_identifier_bits(unsigned long x) {
  unsigned long c;
  x &= 0xFFFFFFFF;
  c = 0;
  while (x) {
    ++c;
    x >>= 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<der_object_identifier_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xffffffff,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <der_object_identifier_bits+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1122 <der_object_identifier_bits+0x22>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<der_object_identifier_bits>:
mov    $0xffffffff,%ecx
xor    %eax,%eax
and    %rdi,%rcx
je     1120 <der_object_identifier_bits+0x20>
mov    %rcx,%rdx
nop
add    $0x1,%rax
shr    %rdx
cmp    $0x1,%rcx
mov    %rdx,%rcx
ja     1110 <der_object_identifier_bits+0x10>
ret

LLVM IR (-O0):
define i64 @der_object_identifier_bits(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 4294967295
store i64 %5, i64* %2
store i64 0, i64* %3
br label %6
6: ; preds = %9, %1
%7 = load i64, i64* %2
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = lshr i64 %12, 1
store i64 %13, i64* %2
br label %6
14: ; preds = %6
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @der_object_identifier_bits(i64 %0) {
%2 = and i64 %0, 4294967295
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i64 [ %8, %4 ], [ %2, %1 ]
%7 = add nuw nsw i64 %5, 1
%8 = lshr i64 %6, 1
%9 = icmp ult i64 %6, 2
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = phi i64 [ 0, %1 ], [ %7, %4 ]
ret i64 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct tcphdr {
  int /*<<< orphan*/ seq;
};

/* Variables and functions */
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t tcphdr_seq_ntohl(struct tcphdr *h) { return ntohl(h->seq); }


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

x86 assembly (clang, -O2):
<tcphdr_seq_ntohl>:
mov    (%rdi),%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
%struct.tcphdr = type { i32 }
define i32 @tcphdr_seq_ntohl(%struct.tcphdr* %0) {
%2 = alloca %struct.tcphdr*
store %struct.tcphdr* %0, %struct.tcphdr** %2
%3 = load %struct.tcphdr*, %struct.tcphdr** %2
%4 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @ntohl(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tcphdr = type { i32 }
define i32 @tcphdr_seq_ntohl(%struct.tcphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohl(i32 %3)
ret i32 %4
}
void foo(float *f) {
  float p = 0.1f;
  __asm__ volatile("movss (%1), %%xmm1\n"
                   "movss %%xmm1, %0\n"
                   : "=m"(p)
                   : "r"(f)
                   : "%xmm1");
  assert(p == *f);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
movss  %xmm1,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
ucomiss (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
movl   $0x3dcccccd,0x4(%rsp)
3d
movss  (%rdi),%xmm1
movss  %xmm1,0x4(%rsp)
movss  (%rdi),%xmm0
cmpeqss 0x4(%rsp),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @foo(float* %0) {
%2 = alloca float*
%3 = alloca float
store float* %0, float** %2
store float 0x3FB99999A0000000, float* %3
%4 = load float*, float** %2
%5 = load float, float* %3
%6 = load float*, float** %2
%7 = load float, float* %6
%8 = fcmp oeq float %5, %7
%9 = zext i1 %8 to i32
%10 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %9)
ret void
}

LLVM IR (-O2):
define void @foo(float* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
store float 0x3FB99999A0000000, float* %2
%4 = load float, float* %2
%5 = load float, float* %0
%6 = fcmp oeq float %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %7)
ret void
}
int mIsChinaState(int ccode) { return (ccode >= 496 && ccode <= 526); }


x86 assembly (clang, -O0):
<mIsChinaState>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <mIsChinaState+0x26>
cmpl   $0x20e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mIsChinaState>:
add    $0xfffffe10,%edi
xor    %eax,%eax
cmp    $0x1f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @mIsChinaState(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 496
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 526
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @mIsChinaState(i32 %0) {
%2 = add i32 %0, -496
%3 = icmp ult i32 %2, 31
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ show_user(char *);
int main(int argc, char **argv) {
  show_user(argv[1]);
  exit(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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <show_user@plt>
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <show_user@plt>
xor    %edi,%edi
call   1030 <exit@plt>

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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @show_user(i8* %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @show_user(i8* %4)
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, scalar_t__ *);
void test_minus_one() {
  char *str = "-1";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert(dest == (uint64_t)-1);
}


x86 assembly (clang, -O0):
<test_minus_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
cmpq   $0xffffffffffffffff,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_minus_one>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <read_unixtstamp@plt>
xor    %edi,%edi
cmpq   $0xffffffffffffffff,(%rsp)
sete   %dil
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-1\00"
define void @test_minus_one() {
%1 = alloca i8*
%2 = alloca i64
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i64* %2)
%5 = load i64, i64* %2
%6 = icmp eq i64 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"-1\00"
define void @test_minus_one() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = icmp eq i64 %4, -1
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_inc();
int /*<<< orphan*/ e_writeback();
int /*<<< orphan*/ e_zpx();
void e_inc_zpx() {
  e_zpx();
  e_inc();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_inc_zpx>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <e_zpx@plt>
mov    $0x0,%al
call   1050 <e_inc@plt>
mov    $0x0,%al
call   1030 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_inc_zpx>:
push   %rax
xor    %eax,%eax
call   1040 <e_zpx@plt>
xor    %eax,%eax
call   1050 <e_inc@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_writeback@plt>

LLVM IR (-O0):
define void @e_inc_zpx() {
%1 = call i32 (...) @e_zpx()
%2 = call i32 (...) @e_inc()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_inc_zpx() {
%1 = tail call i32 (...) @e_zpx()
%2 = tail call i32 (...) @e_inc()
%3 = tail call i32 (...) @e_writeback()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ path_strv_resolve(char **, char const *);
scalar_t__ strv_isempty(char **);
char **strv_uniq(char **);
char **path_strv_resolve_uniq(char **l, const char *prefix) {
  if (strv_isempty(l))
    return l;
  if (!path_strv_resolve(l, prefix))
    return NULL;
  return strv_uniq(l);
}


x86 assembly (clang, -O0):
<path_strv_resolve_uniq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strv_isempty@plt>
cmp    $0x0,%rax
je     1160 <path_strv_resolve_uniq+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1190 <path_strv_resolve_uniq+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <path_strv_resolve@plt>
cmp    $0x0,%eax
jne    1183 <path_strv_resolve_uniq+0x53>
movq   $0x0,-0x8(%rbp)
jmp    1190 <path_strv_resolve_uniq+0x60>
mov    -0x10(%rbp),%rdi
call   1030 <strv_uniq@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_strv_resolve_uniq>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <strv_isempty@plt>
test   %rax,%rax
je     114f <path_strv_resolve_uniq+0x1f>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <path_strv_resolve@plt>
test   %eax,%eax
je     116d <path_strv_resolve_uniq+0x3d>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strv_uniq@plt>
xor    %ebx,%ebx
jmp    1144 <path_strv_resolve_uniq+0x14>

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

LLVM IR (-O2):
define i8** @path_strv_resolve_uniq(i8** %0, i8* %1) {
%3 = tail call i64 @strv_isempty(i8** %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @path_strv_resolve(i8** %0, i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i8** @strv_uniq(i8** %0)
br label %10
10: ; preds = %5, %2, %8
%11 = phi i8** [ %9, %8 ], [ %0, %2 ], [ null, %5 ]
ret i8** %11
}
/* Variables and functions */
int funcC();
int funcD() { return funcC(); }


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

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

LLVM IR (-O0):
define i32 @funcD() {
%1 = call i32 (...) @funcC()
ret i32 %1
}

LLVM IR (-O2):
define i32 @funcD() {
%1 = tail call i32 (...) @funcC()
ret i32 %1
}
/* Variables and functions */
int bbm_byte_read(void *, unsigned short, unsigned short, unsigned char *);
int bbm_com_byte_read(void *handle, unsigned short devid, unsigned short addr,
                      unsigned char *data) {
  int res;
  res = bbm_byte_read(handle, devid, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_byte_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0xc(%rbp),%ax
mov    -0x18(%rbp),%rcx
movzwl %dx,%esi
movzwl %ax,%edx
call   1030 <bbm_byte_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_byte_read>:
jmp    1030 <bbm_byte_read@plt>

LLVM IR (-O0):
define i32 @bbm_com_byte_read(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i16
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = load i16, i16* %6
%12 = load i16, i16* %7
%13 = load i8*, i8** %8
%14 = call i32 @bbm_byte_read(i8* %10, i16 zeroext %11, i16 zeroext %12, i8* %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @bbm_com_byte_read(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3) {
%5 = tail call i32 @bbm_byte_read(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int deleteSocket(int socket_fd) { close(socket_fd); }


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

x86 assembly (clang, -O2):
<deleteSocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @deleteSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 undef
}
int valid_char(char c) {
  return c == '&' || c == '|' || c == '=' || c == '[' || c == ']';
}


x86 assembly (clang, -O0):
<valid_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x26,%ecx
mov    %al,-0x2(%rbp)
je     115f <valid_char+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7c,%ecx
mov    %al,-0x2(%rbp)
je     115f <valid_char+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3d,%ecx
mov    %al,-0x2(%rbp)
je     115f <valid_char+0x5f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5b,%ecx
mov    %al,-0x2(%rbp)
je     115f <valid_char+0x5f>
movsbl -0x1(%rbp),%eax
cmp    $0x5d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_char>:
mov    $0x1,%eax
lea    -0x3d(%rdi),%ecx
cmp    $0x3f,%cl
ja     1120 <valid_char+0x20>
movzbl %cl,%ecx
movabs $0x8000000040000001,%rdx
bt     %rcx,%rdx
jb     1126 <valid_char+0x26>
cmp    $0x26,%dil
jne    1127 <valid_char+0x27>
ret
xor    %eax,%eax
cmp    $0x5d,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @valid_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 38
br i1 %5, label %22, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 124
br i1 %9, label %22, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 61
br i1 %13, label %22, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 91
br i1 %17, label %22, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 93
br label %22
22: ; preds = %18, %14, %10, %6, %1
%23 = phi i1 [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %21, %18 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @valid_char(i8 signext %0) {
switch i8 %0, label %2 [
i8 124, label %5
i8 91, label %5
i8 61, label %5
i8 38, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 93
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
unsigned char *mem_copy_qword2vect_little(unsigned char *,
                                          int /*<<< orphan*/ const);
unsigned char *arch_mem_copy_qword2vect_little(unsigned char *v,
                                               const uint64_t qword) {
  return mem_copy_qword2vect_little(v, qword);
}


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

x86 assembly (clang, -O2):
<arch_mem_copy_qword2vect_little>:
jmp    1030 <mem_copy_qword2vect_little@plt>

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

LLVM IR (-O2):
define i8* @arch_mem_copy_qword2vect_little(i8* %0, i32 %1) {
%3 = tail call i8* @mem_copy_qword2vect_little(i8* %0, i32 %1)
ret i8* %3
}
void default_free(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @default_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void cpp_default2(int x, const char *s) { printf("Got %d %s\n", x, s); }


x86 assembly (clang, -O0):
<cpp_default2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpp_default2>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Got %d %s\0A\00"
define void @cpp_default2(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Got %d %s\0A\00"
define void @cpp_default2(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}