xunge/DecIR huggingface dataset:
int adds1(unsigned long long x, unsigned y) {
  unsigned long long l = x + y;
  return !!l;
}


x86 assembly (clang, -O0):
<adds1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adds1>:
mov    %esi,%ecx
xor    %eax,%eax
add    %rdi,%rcx
setne  %al
ret

LLVM IR (-O0):
define i32 @adds1(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = add i64 %6, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = icmp ne i64 %10, 0
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @adds1(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = sub i64 0, %0
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  time_t start = 0, end = 0;
  time(&start);
  sleep(1);
  time(&end);
  double diff = difftime(end, start);
  printf("%f", diff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
call   1050 <time@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
lea    -0x18(%rbp),%rdi
call   1050 <time@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <difftime@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rdi
call   1050 <time@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    %rsp,%rdi
call   1050 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1040 <difftime@plt>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = call i32 @time(i32* %3)
%8 = call i32 @sleep(i32 1)
%9 = call i32 @time(i32* %4)
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = call double @difftime(i32 %10, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %12)
ret i32 0
}
int test_imm_1Aint32_mem(int *val) {
  return ((*val) & (0x1A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Aint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x1a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Aint32_mem>:
testb  $0x1a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Aint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 26
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long int labs(long int j) { return (j > 0) ? (j) : (-j); }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1120 <labs+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i64, i64* %2
br label %10
7: ; preds = %1
%8 = load i64, i64* %2
%9 = sub nsw i64 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i64 [ %6, %5 ], [ %9, %7 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
SORU_3_PROTOTYPE() {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define i32 @SORU_3_PROTOTYPE() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned long *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void store_fucks(FILE *fp, unsigned long *fucks) {
  rewind(fp);
  if (fwrite(fucks, sizeof(*fucks), 1, fp) != 1) {
    printf("writing error on \"%s\" \n", "/tmp/accumulatedfucks");
    return;
  }
}


x86 assembly (clang, -O0):
<store_fucks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x8,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
cmp    $0x1,%eax
je     117c <store_fucks+0x4c>
lea    0xe90(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_fucks>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <rewind@plt>
mov    %r14,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
cmp    $0x1,%eax
jne    1161 <store_fucks+0x31>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe98(%rip),%rdi
lea    0xea9(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"writing error on \22%s\22 \0A\00"
@.str.1 = [22 x i8] c"/tmp/accumulatedfucks\00"
define void @store_fucks(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
store i32* %0, i32** %3
store i64* %1, i64** %4
%5 = load i32*, i32** %3
%6 = call i32 @rewind(i32* %5)
%7 = load i64*, i64** %4
%8 = load i32*, i32** %3
%9 = call i32 @fwrite(i64* %7, i32 8, i32 1, i32* %8)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"writing error on \22%s\22 \0A\00"
@.str.1 = [22 x i8] c"/tmp/accumulatedfucks\00"
define void @store_fucks(i32* nocapture %0, i64* nocapture %1) {
%3 = tail call i32 @rewind(i32* %0)
%4 = tail call i32 @fwrite(i64* %1, i32 8, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
unsigned long foo(unsigned long x) { return ((x << 63) >> 63) + 1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x3f,%rax
shr    $0x3f,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
and    $0x1,%edi
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @foo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 63
%5 = lshr i64 %4, 63
%6 = add i64 %5, 1
ret i64 %6
}

LLVM IR (-O2):
define i64 @foo(i64 %0) {
%2 = and i64 %0, 1
%3 = add nuw nsw i64 %2, 1
ret i64 %3
}
void foo575() {}


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

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

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

LLVM IR (-O2):
define void @foo575() {
ret void
}
void rop3_226_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T ^ *D;
  stk2 = S & stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_226_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_226_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_226_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ signal(int, void *);
int dcd_sighandler(int sig) {
  signal(sig, (void *)dcd_sighandler);
  return 0;
}


x86 assembly (clang, -O0):
<dcd_sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rsi
call   1030 <signal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcd_sighandler>:
push   %rax
mov    0x2ed0(%rip),%rsi
call   1030 <signal@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @dcd_sighandler(i32 %0) {
%2 = tail call i32 @signal(i32 %0, i8* bitcast (i32 (i32)* @dcd_sighandler to i8*))
ret i32 0
}
unsigned int encode_base64_length(unsigned int input_length) {
  return (input_length + 2) / 3 * 4;
}


x86 assembly (clang, -O0):
<encode_base64_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_base64_length>:
lea    0x2(%rdi),%ecx
mov    $0xaaaaaaab,%eax
imul   %rcx,%rax
shr    $0x20,%rax
add    %eax,%eax
and    $0xfffffffc,%eax
ret

LLVM IR (-O0):
define i32 @encode_base64_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2
%5 = udiv i32 %4, 3
%6 = mul i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @encode_base64_length(i32 %0) {
%2 = add i32 %0, 2
%3 = udiv i32 %2, 3
%4 = shl i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
void do_echo() {
  char text[128];
  printf("Text: ");
  fgets(text, 128, stdin);
  printf("%s", text);
}


x86 assembly (clang, -O0):
<do_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x80(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    $0x80,%esi
call   1040 <fgets@plt>
lea    -0x80(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_echo>:
push   %rbx
sub    $0x80,%rsp
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <fgets@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Text: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @do_echo() {
%1 = alloca [128 x i8]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 128, i32 %4)
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Text: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @do_echo() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 128, i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *str_clone(char *s) {
  char *clone;
  int len;
  if (!s || !(len = strlen(s)))
    return NULL;
  clone = (char *)malloc(len + 1);
  strcpy(clone, s);
  return clone;
}


x86 assembly (clang, -O0):
<str_clone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <str_clone+0x2c>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jne    1169 <str_clone+0x39>
movq   $0x0,-0x8(%rbp)
jmp    118d <str_clone+0x5d>
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
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):
<str_clone>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115f <str_clone+0x2f>
mov    %rdi,%rbx
call   1040 <strlen@plt>
test   %eax,%eax
je     115f <str_clone+0x2f>
add    $0x1,%eax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    1162 <str_clone+0x32>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @str_clone(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = add nsw i32 %4, 1
%8 = tail call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @strcpy(i8* %9, i8* %0)
br label %11
11: ; preds = %1, %3, %6
%12 = phi i8* [ %9, %6 ], [ null, %3 ], [ null, %1 ]
ret i8* %12
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int oct_gt(const char *pat, const char *text) {
  return (strcmp(text, pat) > 0);
}


x86 assembly (clang, -O0):
<oct_gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_gt>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @oct_gt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @oct_gt(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* %0)
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int main() {
  *(int *)0 = 0;
  return 0;
}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store i32 0, i32* null
ret i32 0
}

LLVM IR (-O2):
void swap(int *a, int *b) {
  int tmp = *b;
  *b = *a;
  *a = tmp;
}


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

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

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
store i32 %4, i32* %1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void print_units(char *callSign) {
  printf(":%-9s:UNIT.deg.C\n", callSign);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_units>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_units>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [18 x i8] c":%-9s:UNIT.deg.C\0A\00"
@stdout = global i32 0
define void @print_units(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c":%-9s:UNIT.deg.C\0A\00"
@stdout = global i32 0
define void @print_units(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
bool fspath_walk(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_walk(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _IOC(int /*<<< orphan*/, char, int, int);
int ioctl(int, int /*<<< orphan*/, char *);
int ads129x_set_registers(int ads129x_fd, int offset, char *data, int count) {
  return ioctl(ads129x_fd, _IOC(0, 'm', 0x40 | offset, count), data);
}


x86 assembly (clang, -O0):
<ads129x_set_registers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edx
or     $0x40,%edx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
mov    $0x6d,%esi
call   1030 <_IOC@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1040 <ioctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ads129x_set_registers>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%edx
mov    %edi,%ebp
or     $0x40,%edx
xor    %edi,%edi
mov    $0x6d,%esi
call   1030 <_IOC@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @ads129x_set_registers(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = or i32 64, %10
%12 = load i32, i32* %8
%13 = call i32 @_IOC(i32 0, i8 signext 109, i32 %11, i32 %12)
%14 = load i8*, i8** %7
%15 = call i32 @ioctl(i32 %9, i32 %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @ads129x_set_registers(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = or i32 %1, 64
%6 = tail call i32 @_IOC(i32 0, i8 signext 109, i32 %5, i32 %3)
%7 = tail call i32 @ioctl(i32 %0, i32 %6, i8* %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ nes6502_init();
void nsf_init(void) { nes6502_init(); }


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

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

LLVM IR (-O0):
define void @nsf_init() {
%1 = call i32 (...) @nes6502_init()
ret void
}

LLVM IR (-O2):
define void @nsf_init() {
%1 = tail call i32 (...) @nes6502_init()
ret void
}
void av_version_info() {}


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

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

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

LLVM IR (-O2):
define void @av_version_info() {
ret void
}
umatch(s, p) register char *s, *p;
{
  if (*p == 0)
    return (1);
  while (*s)
    if (amatch(s++, p))
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<umatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <umatch+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1189 <umatch+0x79>
jmp    1141 <umatch+0x31>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1182 <umatch+0x72>
mov    -0x10(%rbp),%rdi
mov    %rdi,%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <amatch@plt>
cmp    $0x0,%eax
je     117d <umatch+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    1189 <umatch+0x79>
jmp    1141 <umatch+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umatch>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%r14d
cmpb   $0x0,(%rsi)
je     114f <umatch+0x3f>
mov    %rsi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi)
je     114c <umatch+0x3c>
lea    0x1(%rdi),%rbp
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <amatch@plt>
mov    %rbp,%rdi
test   %eax,%eax
je     1130 <umatch+0x20>
jmp    114f <umatch+0x3f>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @umatch(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8* [ %10, %9 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @amatch to i32 (i8*, i8*, ...)*)(i8* %6, i8* %1)
%12 = icmp eq i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %5, %9, %2
%14 = phi i32 [ 1, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %14
}
/* Variables and functions */
int omp_get_max_threads();
int mic_get_max_threads(int dev, int offload) {
  int mthreads;
#pragma offload target(mic : dev) out(mthreads) if (offload)
  { mthreads = omp_get_max_threads(); }
  return mthreads;
}


x86 assembly (clang, -O0):
<mic_get_max_threads>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <omp_get_max_threads@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mic_get_max_threads(i32 %0, i32 %1) {
%3 = tail call i32 (...) @omp_get_max_threads()
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct context {
  int dummy;
};

/* Variables and functions */
int send_vendor_pkt(struct context *, int /*<<< orphan*/ *, int,
                    int /*<<< orphan*/ *, int /*<<< orphan*/);
int pushbutton_request(struct context *ctx, uint8_t *mac) {
  return send_vendor_pkt(ctx, mac, 0x8001, NULL, 0);
}


x86 assembly (clang, -O0):
<pushbutton_request>:
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    $0x8001,%edx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <send_vendor_pkt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushbutton_request>:
mov    $0x8001,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <send_vendor_pkt@plt>

LLVM IR (-O0):
%struct.context = type { i32 }
define i32 @pushbutton_request(%struct.context* %0, i32* %1) {
%3 = alloca %struct.context*
%4 = alloca i32*
store %struct.context* %0, %struct.context** %3
store i32* %1, i32** %4
%5 = load %struct.context*, %struct.context** %3
%6 = load i32*, i32** %4
%7 = call i32 @send_vendor_pkt(%struct.context* %5, i32* %6, i32 32769, i32* null, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.context = type { i32 }
define i32 @pushbutton_request(%struct.context* %0, i32* %1) {
%3 = tail call i32 @send_vendor_pkt(%struct.context* %0, i32* %1, i32 32769, i32* null, i32 0)
ret i32 %3
}
void sum(long double *result, const long double x, long double *unused) {
  *result += x;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    %rsi,-0x28(%rbp)
fldt   -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
faddp  %st,%st(1)
fstpt  (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
fldt   0x8(%rsp)
fldt   (%rdi)
faddp  %st,%st(1)
fstpt  (%rdi)
ret

LLVM IR (-O0):
define void @sum(x86_fp80* %0, x86_fp80 %1, x86_fp80* %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80
%6 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80* %2, x86_fp80** %6
%7 = load x86_fp80, x86_fp80* %5
%8 = load x86_fp80*, x86_fp80** %4
%9 = load x86_fp80, x86_fp80* %8
%10 = fadd x86_fp80 %9, %7
store x86_fp80 %10, x86_fp80* %8
ret void
}

LLVM IR (-O2):
define void @sum(x86_fp80* nocapture %0, x86_fp80 %1, x86_fp80* nocapture readnone %2) {
%4 = load x86_fp80, x86_fp80* %0
%5 = fadd x86_fp80 %4, %1
store x86_fp80 %5, x86_fp80* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_printf(char *);
void initHASH() { uart_printf("HASH initialize"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"HASH initialize\00"
define void @initHASH() {
%1 = call i32 @uart_printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"HASH initialize\00"
define void @initHASH() {
%1 = tail call i32 @uart_printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
long __attribute__((no)) laddv(long a, long b) { return a + b; }


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

x86 assembly (clang, -O2):
<laddv>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @laddv(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @laddv(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
void rifft1pt(float *ioptr, float scale) {
  float f0r, f0i;
  float t0r, t0i;
  f0r = ioptr[0];
  f0i = ioptr[1];
  t0r = f0r + f0i;
  t0i = f0r - f0i;
  ioptr[0] = scale * t0r;
  ioptr[1] = scale * t0i;
}


x86 assembly (clang, -O0):
<rifft1pt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rifft1pt>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
movaps %xmm1,%xmm3
addss  %xmm2,%xmm3
subss  %xmm2,%xmm1
mulss  %xmm0,%xmm3
movss  %xmm3,(%rdi)
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
ret

LLVM IR (-O0):
define void @rifft1pt(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float* %0, float** %3
store float %1, float* %4
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
store float %11, float* %5
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
store float %14, float* %6
%15 = load float, float* %5
%16 = load float, float* %6
%17 = fadd float %15, %16
store float %17, float* %7
%18 = load float, float* %5
%19 = load float, float* %6
%20 = fsub float %18, %19
store float %20, float* %8
%21 = load float, float* %4
%22 = load float, float* %7
%23 = fmul float %21, %22
%24 = load float*, float** %3
%25 = getelementptr inbounds float, float* %24, i64 0
store float %23, float* %25
%26 = load float, float* %4
%27 = load float, float* %8
%28 = fmul float %26, %27
%29 = load float*, float** %3
%30 = getelementptr inbounds float, float* %29, i64 1
store float %28, float* %30
ret void
}

LLVM IR (-O2):
define void @rifft1pt(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = fadd float %3, %5
%7 = fsub float %3, %5
%8 = fmul float %6, %1
store float %8, float* %0
%9 = fmul float %7, %1
store float %9, float* %4
ret void
}
void __attribute__((weak)) tim1_trg_com_tim11_isr() {
  debug_handler(__FUNCTION__);
}


x86 assembly (clang, -O0):
<tim1_trg_com_tim11_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tim1_trg_com_tim11_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.tim1_trg_com_tim11_isr = [23 x i8] c"tim1_trg_com_tim11_isr\00"
define weak void @tim1_trg_com_tim11_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.tim1_trg_com_tim11_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.tim1_trg_com_tim11_isr = [23 x i8] c"tim1_trg_com_tim11_isr\00"
define weak void @tim1_trg_com_tim11_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.tim1_trg_com_tim11_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int i;
  int sum1, sum2;
  sum1 = 0;
  sum2 = 0;
  for (i = 0; i < 10; i++) {
    sum1 += i;
  }
  sum2 = sum1;
  for (i = 10; i < 20; i++) {
    sum2 += i;
  }
  printf("sum1: %d, total: %d\n", sum1, sum2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1155 <main+0x45>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1183 <main+0x73>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <main+0x52>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"sum1: %d, total: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 45, i32 190)
ret i32 0
}
__attribute__((__no__)) void
do_nothing_packed_dynamic_partial(struct test_packed *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_packed_dynamic_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_packed_dynamic_partial+0x1b>
jmp    1120 <do_nothing_packed_dynamic_partial+0x20>
jmp    1120 <do_nothing_packed_dynamic_partial+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_packed = type opaque
define void @do_nothing_packed_dynamic_partial(%struct.test_packed* %0) {
%2 = alloca %struct.test_packed*
store %struct.test_packed* %0, %struct.test_packed** %2
%3 = load %struct.test_packed*, %struct.test_packed** %2
%4 = ptrtoint %struct.test_packed* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_packed = type opaque
define void @do_nothing_packed_dynamic_partial(%struct.test_packed* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendBlink(int, int, int, int);
int /*<<< orphan*/ sendConf(int, int);
void setPurpleBlueBlink(int sockfd, int timeOn, int period) {
  sendConf(sockfd, (1 << 7) | (1 << 3) | (3 << 1));
  sendBlink(sockfd, 0x11, timeOn, period);
}


x86 assembly (clang, -O0):
<setPurpleBlueBlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8e,%esi
call   1040 <sendConf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x11,%esi
call   1030 <sendBlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPurpleBlueBlink>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x8e,%esi
call   1040 <sendConf@plt>
mov    %ebx,%edi
mov    $0x11,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sendBlink@plt>

LLVM IR (-O0):
define void @setPurpleBlueBlink(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 = call i32 @sendConf(i32 %7, i32 142)
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @sendBlink(i32 %9, i32 17, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @setPurpleBlueBlink(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sendConf(i32 %0, i32 142)
%5 = tail call i32 @sendBlink(i32 %0, i32 17, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char const);
int isoptish(const char *text) {
  return text[0] == '-' && (text[1] == '-' || isalpha(text[1]));
}


x86 assembly (clang, -O0):
<isoptish>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1164 <isoptish+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0xa(%rbp)
je     115e <isoptish+0x4e>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoptish>:
push   %rax
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
jne    1138 <isoptish+0x28>
mov    0x1(%rdi),%cl
mov    $0x1,%eax
cmp    $0x2d,%cl
je     1138 <isoptish+0x28>
movsbl %cl,%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @isoptish(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 45
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = tail call i64 @isalpha(i8 signext %6)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %8, %1
%13 = phi i32 [ 0, %1 ], [ 1, %4 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ sa_handler;
};

/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             int /*<<< orphan*/ *);
void ssid_signal_handle() {
  struct sigaction sigact;
  sigact.sa_handler = SIG_IGN;
  sigaction(SIGPIPE, &sigact, NULL);
}


x86 assembly (clang, -O0):
<ssid_signal_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssid_signal_handle>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sigaction = type { i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @ssid_signal_handle() {
%1 = alloca %struct.sigaction
%2 = load i32, i32* @SIG_IGN
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 0
store i32 %2, i32* %3
%4 = load i32, i32* @SIGPIPE
%5 = call i32 @sigaction(i32 %4, %struct.sigaction* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @ssid_signal_handle() {
%1 = alloca %struct.sigaction
%2 = bitcast %struct.sigaction* %1 to i8*
%3 = load i32, i32* @SIG_IGN
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
store i32 %3, i32* %4
%5 = load i32, i32* @SIGPIPE
%6 = call i32 @sigaction(i32 %5, %struct.sigaction* %1, i32* null)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int diction(const void *a, const void *b) {
  return (strcmp(*(const char **)a, *(const char **)b));
}


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

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

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

LLVM IR (-O2):
define i32 @diction(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}