xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ PROXY_POLICY;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ PROXY_POLICY_it;
PROXY_POLICY *d2i_PROXY_POLICY(PROXY_POLICY **a, const unsigned char **in,
                               long len) {
  return (PROXY_POLICY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                       &PROXY_POLICY_it);
}


x86 assembly (clang, -O0):
<d2i_PROXY_POLICY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_PROXY_POLICY>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@PROXY_POLICY_it = global i32 0
define i32* @d2i_PROXY_POLICY(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @PROXY_POLICY_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@PROXY_POLICY_it = global i32 0
define i32* @d2i_PROXY_POLICY(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @PROXY_POLICY_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
float sq_perimeter_side(float side) {
  float perimeter = side * 4;
  return perimeter;
}


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

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

LLVM IR (-O0):
define float @sq_perimeter_side(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fmul float %4, 4.000000e+00
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @sq_perimeter_side(float %0) {
%2 = fmul float %0, 4.000000e+00
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int get_posval(char *, char *);
int /*<<< orphan*/ stderr;
int get_perc(char *name, char *val) {
  int value = get_posval(name, val);
  if (value < 0 || value > 100) {
    fprintf(stderr, "atoprc: %s value %d not in range 0-100\n", name, value);
    exit(1);
  }
  return value;
}


x86 assembly (clang, -O0):
<get_perc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <get_posval@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1164 <get_perc+0x34>
cmpl   $0x64,-0x14(%rbp)
jle    118a <get_perc+0x5a>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xe85(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_perc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_posval@plt>
cmp    $0x65,%eax
jae    1140 <get_perc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rcx
mov    (%rcx),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"atoprc: %s value %d not in range 0-100\0A\00"
define i32 @get_perc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @get_posval(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* %5
%13 = icmp sgt i32 %12, 100
br i1 %13, label %14, label %20
14: ; preds = %11, %2
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %3
%17 = load i32, i32* %5
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17)
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %11
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"atoprc: %s value %d not in range 0-100\0A\00"
define i32 @get_perc(i8* %0, i8* %1) {
%3 = tail call i32 @get_posval(i8* %0, i8* %1)
%4 = icmp ugt i32 %3, 100
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/);
int main() { pthread_exit(0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @pthread_exit(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @pthread_exit(i32 0)
ret i32 0
}
formula(k) int k;
{
  if (k <= 0)
    return (0);
  return (((((((k * (k + 1)) / 2))))));
}


x86 assembly (clang, -O0):
<formula>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <formula+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1134 <formula+0x34>
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<formula>:
test   %edi,%edi
jle    1114 <formula+0x14>
lea    0x1(%rdi),%ecx
imul   %edi,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @formula(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nuw nsw i32 %0, 1
%5 = mul nsw i32 %4, %0
%6 = sdiv i32 %5, 2
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ _Qp_sqrt(long double *, long double *);
long double __ieee754_sqrtl(long double x) {
  long double ret;
  _Qp_sqrt(&ret, &x);
  return ret;
}


x86 assembly (clang, -O0):
<__ieee754_sqrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <_Qp_sqrt@plt>
fldt   -0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_sqrtl>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fstpt  0x10(%rsp)
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   1030 <_Qp_sqrt@plt>
fldt   (%rsp)
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define x86_fp80 @__ieee754_sqrtl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = bitcast x86_fp80* %3 to i8*
%5 = call i32 @_Qp_sqrt(x86_fp80* %3, x86_fp80* %2)
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sig_pipe(int signo) {
  printf("SIGPIPE caught\n");
  exit(1);
}


x86 assembly (clang, -O0):
<sig_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [16 x i8] c"SIGPIPE caught\0A\00"
define void @sig_pipe(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"SIGPIPE caught\00"
define void @sig_pipe(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int islower(int c) { return 'a' <= c && c <= 'z'; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x61,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <islower+0x24>
cmpl   $0x7a,-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):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 97, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
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 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void prefetch(void *p) { (void)p; }


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

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

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

LLVM IR (-O2):
define void @prefetch(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int personality(int /*<<< orphan*/);
int main(void) { return personality(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <personality@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @personality(i32 0)
ret i32 %1
}
int func_ret_int(int a, int b, register int c) {
  int d;
  d = b - 6;
  return a + b + c;
}


x86 assembly (clang, -O0):
<func_ret_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_ret_int>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @func_ret_int(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 = sub nsw i32 %8, 6
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @func_ret_int(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ u_int16_t;

/* Variables and functions */
u_int16_t get_pkt_tick() {
  static u_int16_t tick = 0;
  return ++tick;
}


x86 assembly (clang, -O0):
<get_pkt_tick>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1d(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2f12(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pkt_tick>:
mov    0x2f21(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2f16(%rip)
ret

LLVM IR (-O0):
@get_pkt_tick.tick = internal global i64 0
define i64 @get_pkt_tick() {
%1 = load i64, i64* @get_pkt_tick.tick
%2 = add nsw i64 %1, 1
store i64 %2, i64* @get_pkt_tick.tick
ret i64 %2
}

LLVM IR (-O2):
@get_pkt_tick.tick = internal unnamed_addr global i64 0
define i64 @get_pkt_tick() {
%1 = load i64, i64* @get_pkt_tick.tick
%2 = add nsw i64 %1, 1
store i64 %2, i64* @get_pkt_tick.tick
ret i64 %2
}
void destruct() {}


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

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

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

LLVM IR (-O2):
define void @destruct() {
ret void
}
int resetBit(int num, int position, int new_number) {
  new_number = num & ~(1 << position);
  return new_number;
}


x86 assembly (clang, -O0):
<resetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @resetBit(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 = shl i32 1, %8
%10 = xor i32 %9, -1
%11 = and i32 %7, %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @resetBit(i32 %0, i32 %1, i32 %2) {
%4 = shl nuw i32 1, %1
%5 = xor i32 %4, -1
%6 = and i32 %5, %0
ret i32 %6
}
void arts_esd_audio_pause() { return; }


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

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

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

LLVM IR (-O2):
define void @arts_esd_audio_pause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const);
void glmPrintMatrix2f(const float m[4]) {
  printf("[ %f %f ]\n", m[0], m[2]);
  printf("[ %f %f ]\n\n", m[1], m[3]);
}


x86 assembly (clang, -O0):
<glmPrintMatrix2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm1
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintMatrix2f>:
push   %rbx
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  0x8(%rdi),%xmm1
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rbx),%xmm0
movss  0xc(%rbx),%xmm1
lea    0xed1(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"[ %f %f ]\0A\00"
@.str.1 = [12 x i8] c"[ %f %f ]\0A\0A\00"
define void @glmPrintMatrix2f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 2
%8 = load float, float* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %5, float %8)
%10 = load float*, float** %2
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 3
%15 = load float, float* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %12, float %15)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"[ %f %f ]\0A\00"
@.str.1 = [12 x i8] c"[ %f %f ]\0A\0A\00"
define void @glmPrintMatrix2f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 2
%4 = load float, float* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %2, float %4)
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 3
%9 = load float, float* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %7, float %9)
ret void
}
void gtk_paint_focus() {}


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

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

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

LLVM IR (-O2):
define void @gtk_paint_focus() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
main() {
  char c;
  char d;
  int nbits;
  c = -1;
  for (nbits = 1; nbits < 100; nbits++) {
    d = (1 << nbits) - 1;
    if (d == c)
      break;
  }
  if (nbits == 100)
    _exit(-1);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    116c <main+0x5c>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1159 <main+0x49>
jmp    116c <main+0x5c>
jmp    115e <main+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <main+0x1a>
cmpl   $0x64,-0xc(%rbp)
jne    1180 <main+0x70>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i32 0, i32* %1
store i8 -1, i8* %2
store i32 1, i32* %4
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %4
%10 = shl i32 1, %9
%11 = sub nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %14, %16
br i1 %17, label %18, label %19
18: ; preds = %8
br label %23
19: ; preds = %8
br label %20
20: ; preds = %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %5
23: ; preds = %18, %5
%24 = load i32, i32* %4
%25 = icmp eq i32 %24, 100
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @_exit(i32 -1)
unreachable
28: ; preds = %23
%29 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int rec1(int);
int rec2(int j) {
  if (j <= 0)
    return 0;
  return rec2(rec1(j + 1)) - 1;
}


x86 assembly (clang, -O0):
<rec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1141 <rec2+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1159 <rec2+0x39>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1040 <rec1@plt>
mov    %eax,%edi
call   1030 <rec2@plt>
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec2>:
push   %rbx
test   %edi,%edi
jle    1133 <rec2+0x23>
mov    %edi,%eax
xor    %ebx,%ebx
nopl   0x0(%rax)
add    $0x1,%eax
mov    %eax,%edi
call   1030 <rec1@plt>
add    $0xffffffff,%ebx
test   %eax,%eax
jg     1120 <rec2+0x10>
jmp    1135 <rec2+0x25>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rec2(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = tail call i32 @rec1(i32 %6)
%8 = add nsw i32 %5, -1
%9 = icmp slt i32 %7, 1
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Type definitions */
struct bpf_args {
  int dummy;
};

/* Variables and functions */
int subprog();
__attribute__((section("raw_tracepoint/sched_process_exec"), used)) int
sched_process_exec(struct bpf_args *ctx) {
  return subprog();
}


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

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

LLVM IR (-O0):
%struct.bpf_args = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.bpf_args*)* @sched_process_exec to i8*)], section "llvm.metadata"
define i32 @sched_process_exec(%struct.bpf_args* %0) section "raw_tracepoint/sched_process_exec" {
%2 = alloca %struct.bpf_args*
store %struct.bpf_args* %0, %struct.bpf_args** %2
%3 = call i32 (...) @subprog()
ret i32 %3
}

LLVM IR (-O2):
%struct.bpf_args = type { i32 }
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.bpf_args*)* @sched_process_exec to i8*)], section "llvm.metadata"
define i32 @sched_process_exec(%struct.bpf_args* nocapture readnone %0) section "raw_tracepoint/sched_process_exec" {
%2 = tail call i32 (...) @subprog()
ret i32 %2
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn83() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn83");
  return result;
}


x86 assembly (clang, -O0):
<fn83>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn83>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn83\00"
define i8* @fn83() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn83\00"
define i8* @fn83() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_SERVICELOC;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_SERVICELOC_it;
int i2d_OCSP_SERVICELOC(OCSP_SERVICELOC *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_SERVICELOC_it);
}


x86 assembly (clang, -O0):
<i2d_OCSP_SERVICELOC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_OCSP_SERVICELOC>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@OCSP_SERVICELOC_it = global i32 0
define i32 @i2d_OCSP_SERVICELOC(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 @ASN1_item_i2d(i32* %5, i8** %6, i32* @OCSP_SERVICELOC_it)
ret i32 %7
}

LLVM IR (-O2):
@OCSP_SERVICELOC_it = global i32 0
define i32 @i2d_OCSP_SERVICELOC(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @OCSP_SERVICELOC_it)
ret i32 %3
}
void stats_atomic_add(int *var, int value) { int t = 0, tmp = 0; }


x86 assembly (clang, -O0):
<stats_atomic_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @stats_atomic_add(i32* nocapture %0, i32 %1) {
ret void
}
void TMTimerRCPtr(void) {}


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

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

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

LLVM IR (-O2):
define void @TMTimerRCPtr() {
ret void
}
int setup_clt(int pin) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setup_clt(i32 %0) {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int mul(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int sum(int, int);
int main(void) {
  int n1 = mul(10, 20);
  int n2 = sum(10, 20);
  printf("%d, %d\n", n1, n2);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x14,%esi
call   1050 <mul@plt>
mov    %eax,-0x8(%rbp)
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <sum@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
mov    $0x14,%esi
call   1050 <mul@plt>
mov    %eax,%ebx
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <sum@plt>
lea    0xea8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @mul(i32 10, i32 20)
%2 = tail call i32 @sum(i32 10, i32 20)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int cbmarch_unlisten(int);
int cbm_unlisten(int HandleDevice) {
  ;
  return cbmarch_unlisten(HandleDevice);
}


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

x86 assembly (clang, -O2):
<cbm_unlisten>:
jmp    1030 <cbmarch_unlisten@plt>

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

LLVM IR (-O2):
define i32 @cbm_unlisten(i32 %0) {
%2 = tail call i32 @cbmarch_unlisten(i32 %0)
ret i32 %2
}
/* Variables and functions */
int sscanf(char *, char *, unsigned long long *);
int strlen(char const *);
char *strstr(char const *, char const *);
void scan_one(const char *buff, const char *key, unsigned long long *val) {
  int o;
  char *b = strstr(buff, key);
  if (b)
    o = sscanf(b + strlen(key), ": %llu", val);
}


x86 assembly (clang, -O0):
<scan_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     118d <scan_one+0x5d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x18(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1040 <sscanf@plt>
mov    %eax,-0x1c(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_one>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
call   1050 <strstr@plt>
test   %rax,%rax
je     116c <scan_one+0x3c>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
add    %rax,%rbx
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sscanf@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c": %llu\00"
define void @scan_one(i8* %0, i8* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64* %2, i64** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* @strstr(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %22
14: ; preds = %3
%15 = load i8*, i8** %8
%16 = load i8*, i8** %5
%17 = call i32 @strlen(i8* %16)
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
%20 = load i64*, i64** %6
%21 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64* %20)
store i32 %21, i32* %7
br label %22
22: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c": %llu\00"
define void @scan_one(i8* %0, i8* %1, i64* %2) {
%4 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %1)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = tail call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %11
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main(void) {
#pragma acc parallel
  { abort(); }
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *sqlitexx_port_strdup(const char *s) {
  char *d;
  d = (char *)malloc(strlen(s) + 1);
  if (d == NULL)
    return NULL;
  strcpy(d, s);
  return d;
}


x86 assembly (clang, -O0):
<sqlitexx_port_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <sqlitexx_port_strdup+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    1182 <sqlitexx_port_strdup+0x52>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqlitexx_port_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115a <sqlitexx_port_strdup+0x2a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    115c <sqlitexx_port_strdup+0x2c>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @sqlitexx_port_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %1, %7
%10 = phi i8* [ %5, %7 ], [ null, %1 ]
ret i8* %10
}
seterrc(cp, d) char *cp, d;
{
  char chbuf[2];
  chbuf[0] = d;
  chbuf[1] = 0;
  seterr2(cp, chbuf);
}


x86 assembly (clang, -O0):
<seterrc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x13(%rbp)
movb   $0x0,-0x12(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x13(%rbp),%rsi
mov    $0x0,%al
call   1030 <seterr2@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seterrc>:
push   %rax
mov    %sil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rsi
xor    %eax,%eax
call   1030 <seterr2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @seterrc(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
%6 = alloca [2 x i8]
%7 = trunc i32 %1 to i8
store i8* %0, i8** %4
store i8 %7, i8* %5
%8 = load i8, i8* %5
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
store i8 %8, i8* %9
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 1
store i8 0, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @seterr2 to i32 (i8*, i8*, ...)*)(i8* %11, i8* %12)
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @seterrc(i8* %0, i32 %1) {
%3 = alloca [2 x i8]
%4 = trunc i32 %1 to i8
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %4, i8* %5
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %6
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @seterr2 to i32 (i8*, i8*, ...)*)(i8* %0, i8* %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int find_or_insert(int);
void *process(void *arg) {
  int val = *(int *)arg;
  int found = find_or_insert(val);
  assert(found);
  return NULL;
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <find_or_insert@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rax
mov    (%rdi),%edi
call   1040 <find_or_insert@plt>
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @process(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @find_or_insert(i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @assert(i32 %10)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @process(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @find_or_insert(i32 %3)
%5 = tail call i32 @assert(i32 %4)
ret i8* null
}
int config_READER_VIDEOGUARD(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_READER_VIDEOGUARD() {
ret i32 0
}
void Br() {}


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

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

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

LLVM IR (-O2):
define void @Br() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ tu_move(int, int);
__attribute__((always_)) void tu_mvaddstr(int y, int x, const char *str) {
  tu_move(y, x);
  fputs(str, stdout);
}


x86 assembly (clang, -O0):
<tu_mvaddstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <tu_move@plt>
mov    -0x10(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tu_mvaddstr>:
push   %rbx
mov    %rdx,%rbx
call   1030 <tu_move@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @tu_mvaddstr(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @tu_move(i32 %7, i32 %8)
%10 = load i8*, i8** %6
%11 = load i32, i32* @stdout
%12 = call i32 @fputs(i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @tu_mvaddstr(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @tu_move(i32 %0, i32 %1)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* %2, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setproctitle(char *, char *, char *);
int /*<<< orphan*/ setproctitle_init(int, char **, char **);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[], char *envp[]) {
  setproctitle_init(argc, argv, envp);
  setproctitle("%s@%s", "test_very_long_user_name_in_process_name",
               "192.168.123.145");
  while (1)
    sleep(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <setproctitle_init@plt>
lea    0xe9f(%rip),%rdi
lea    0xe9e(%rip),%rsi
lea    0xec0(%rip),%rdx
call   1030 <setproctitle@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    1174 <main+0x44>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <setproctitle_init@plt>
lea    0xec3(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xee4(%rip),%rdx
call   1030 <setproctitle@plt>
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [6 x i8] c"%s@%s\00"
@.str.1 = [41 x i8] c"test_very_long_user_name_in_process_name\00"
@.str.2 = [16 x i8] c"192.168.123.145\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = load i8**, i8*** %6
%10 = load i8**, i8*** %7
%11 = call i32 @setproctitle_init(i32 %8, i8** %9, i8** %10)
%12 = call i32 @setproctitle(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %3, %13
%14 = call i32 @sleep(i32 10)
br label %13
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s@%s\00"
@.str.1 = [41 x i8] c"test_very_long_user_name_in_process_name\00"
@.str.2 = [16 x i8] c"192.168.123.145\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @setproctitle_init(i32 %0, i8** %1, i8** %2)
%5 = tail call i32 @setproctitle(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %3, %6
%7 = tail call i32 @sleep(i32 10)
br label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct dhcpmsg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_u32_option(struct dhcpmsg *, int, int /*<<< orphan*/);
void add_option_reqip(struct dhcpmsg *packet, uint32_t ip) {
  add_u32_option(packet, 0x32, ip);
}


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

x86 assembly (clang, -O2):
<add_option_reqip>:
mov    %esi,%edx
mov    $0x32,%esi
jmp    1030 <add_u32_option@plt>

LLVM IR (-O0):
%struct.dhcpmsg = type { i32 }
define void @add_option_reqip(%struct.dhcpmsg* %0, i32 %1) {
%3 = alloca %struct.dhcpmsg*
%4 = alloca i32
store %struct.dhcpmsg* %0, %struct.dhcpmsg** %3
store i32 %1, i32* %4
%5 = load %struct.dhcpmsg*, %struct.dhcpmsg** %3
%6 = load i32, i32* %4
%7 = call i32 @add_u32_option(%struct.dhcpmsg* %5, i32 50, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.dhcpmsg = type { i32 }
define void @add_option_reqip(%struct.dhcpmsg* %0, i32 %1) {
%3 = tail call i32 @add_u32_option(%struct.dhcpmsg* %0, i32 50, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr, "usage: %s G(for global)|N(for noglobal) /path/to/lib/dbd\n",
          prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"usage: %s G(for global)|N(for noglobal) /path/to/lib/dbd\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"usage: %s G(for global)|N(for noglobal) /path/to/lib/dbd\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ start();
int main() {
  start();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @start()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start()
ret i32 0
}
int is_old_only(int dir_id) { return dir_id == 0x01; }


x86 assembly (clang, -O0):
<is_old_only>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_old_only>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_old_only(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_old_only(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int success() {
  printf("OK\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<success>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<success>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"OK\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @success() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [3 x i8] c"OK\00"
define i32 @success() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}