xunge/DecIR huggingface dataset:
int makeEqual(char *s1, int n1, char *s2, int n2) {
  int i;
  for (i = 0; i < n1; i++) {
  }
}


x86 assembly (clang, -O0):
<makeEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1138 <makeEqual+0x38>
jmp    112a <makeEqual+0x2a>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1119 <makeEqual+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @makeEqual(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
ret i32 undef
}
int isquare(int x) { return x * x; }


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

x86 assembly (clang, -O2):
<isquare>:
mov    %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @isquare(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
int main(void) {
  char gesture[3][10] = {"scissor", "stone", "cloth"};
  int man, computer, result, ret;
  int i, j;
  computer = rand() % 3;
  printf("rand   %d", rand());
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 10; j++) {
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    11d5 <main+0xb5>
movl   $0x0,-0x48(%rbp)
cmpl   $0xa,-0x48(%rbp)
jge    11c2 <main+0xa2>
jmp    11b4 <main+0x94>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11a5 <main+0x85>
jmp    11c7 <main+0xa7>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1194 <main+0x74>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"rand %d\00"
define i32 @main() {
%1 = tail call i32 (...) @rand()
%2 = tail call i32 (...) @rand()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_mul_flt(float *, float, float);
float xil_fpo_mul_flt(float a, float b) {
  float res_flt;
  xip_fpo_mul_flt(&res_flt, a, b);
  return res_flt;
}


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

x86 assembly (clang, -O2):
<xil_fpo_mul_flt>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <xip_fpo_mul_flt@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @xil_fpo_mul_flt(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call i32 @xip_fpo_mul_flt(float* %5, float %6, float %7)
%9 = load float, float* %5
ret float %9
}

LLVM IR (-O2):
define float @xil_fpo_mul_flt(float %0, float %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = call i32 @xip_fpo_mul_flt(float* %3, float %0, float %1)
%6 = load float, float* %3
ret float %6
}
signed long long f20(signed long long v_foo) {
  signed long long v_shr = v_foo >> 60;
  signed long long v_and = v_shr & 30;
  return v_and;
}


x86 assembly (clang, -O0):
<f20>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x3c,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1e,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f20>:
mov    %rdi,%rax
sar    $0x3c,%rax
and    $0x1e,%eax
ret

LLVM IR (-O0):
define i64 @f20(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = ashr i64 %5, 60
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = and i64 %7, 30
store i64 %8, i64* %4
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
define i64 @f20(i64 %0) {
%2 = ashr i64 %0, 60
%3 = and i64 %2, 30
ret i64 %3
}
/* Variables and functions */
long long strtoll(char const *, char **, int);
long long int atoll(const char *str) {
  return (strtoll(str, (char **)NULL, 10));
}


x86 assembly (clang, -O0):
<atoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoll>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoll@plt>

LLVM IR (-O0):
define i64 @atoll(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtoll(i8* %3, i8** null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atoll(i8* nocapture %0) {
%2 = tail call i64 @strtoll(i8* nocapture %0, i8** null, i32 10)
ret i64 %2
}
float clampf(float x, float min, float max) {
  if (x < min)
    return min;
  if (x > max)
    return max;
  return x;
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clampf+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <clampf+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clampf+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clampf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clampf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSETLAYOUT_safe(const char *record) { return (core3_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRSETLAYOUT_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETLAYOUT_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ closeFile(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *openFile(char *, char *);
void saveGPIOValue(char *buff) {
  FILE *file = openFile("/sys/class/gpio/gpio26/value", "r");
  fgets(buff, 1024, file);
  closeFile(file);
}


x86 assembly (clang, -O0):
<saveGPIOValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <openFile@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x400,%esi
call   1040 <fgets@plt>
mov    -0x10(%rbp),%rdi
call   1050 <closeFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saveGPIOValue>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <openFile@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   1040 <fgets@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <closeFile@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"/sys/class/gpio/gpio26/value\00"
@.str.1 = [2 x i8] c"r\00"
define void @saveGPIOValue(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @openFile(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i8*, i8** %2
%6 = load i32*, i32** %3
%7 = call i32 @fgets(i8* %5, i32 1024, i32* %6)
%8 = load i32*, i32** %3
%9 = call i32 @closeFile(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"/sys/class/gpio/gpio26/value\00"
@.str.1 = [2 x i8] c"r\00"
define void @saveGPIOValue(i8* %0) {
%2 = tail call i32* @openFile(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fgets(i8* %0, i32 1024, i32* %2)
%4 = tail call i32 @closeFile(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xdd() {
  Assert_real((isxdigit(221) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              1110, ("isxdigit should be 0 for 0xdd"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0xdd>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdd,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x456,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0xdd>:
push   %rax
mov    $0xdd,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x456,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xdd\00"
define void @t_isxdigit_0xdd() {
%1 = call i64 @isxdigit(i32 221)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1110, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xdd\00"
define void @t_isxdigit_0xdd() {
%1 = tail call i64 @isxdigit(i32 221)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1110, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double xdiv(double nom, double denom) {
  return (denom != 0.0) ? nom / denom : -1.0;
}


x86 assembly (clang, -O0):
<xdiv>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112b <xdiv+0x2b>
jp     112b <xdiv+0x2b>
jmp    113f <xdiv+0x3f>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1151 <xdiv+0x51>
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1151 <xdiv+0x51>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdiv>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    110c <xdiv+0xc>
jnp    1111 <xdiv+0x11>
divsd  %xmm1,%xmm0
ret
movsd  0xee7(%rip),%xmm0
ret

LLVM IR (-O0):
define double @xdiv(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fdiv double %8, %9
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %7
%13 = phi double [ %10, %7 ], [ -1.000000e+00, %11 ]
ret double %13
}

LLVM IR (-O2):
define double @xdiv(double %0, double %1) {
%3 = fcmp une double %1, 0.000000e+00
%4 = fdiv double %0, %1
%5 = select i1 %3, double %4, double -1.000000e+00
ret double %5
}
void handle_LWP(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_LWP(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(long);
void i2c_sleep(long t) {
  if (t > 0)
    usleep(t);
}


x86 assembly (clang, -O0):
<i2c_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1130 <i2c_sleep+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_sleep>:
test   %rdi,%rdi
jle    111a <i2c_sleep+0xa>
jmp    1030 <usleep@plt>
ret

LLVM IR (-O0):
define void @i2c_sleep(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 %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @usleep(i64 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @i2c_sleep(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @usleep(i64 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die(const char *s) {
  perror(s);
  exit(errno);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @errno
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @errno
%4 = tail call i32 @exit(i32 %3)
unreachable
}
unsigned xrop3_204_0_0(unsigned char s, unsigned char t) {
  unsigned S = ((unsigned)s << 8) | s;
  return S;
}


x86 assembly (clang, -O0):
<xrop3_204_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_204_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_204_0_0(i8 zeroext %0, i8 zeroext %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 = zext i8 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @xrop3_204_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
ret i32 %4
}
double plt_mapminmax(double xmin, double xmax, double ymin, double ymax,
                     double x) {
  return (ymax - ymin) * (x - xmin) / (xmax - xmin) + ymin;
}


x86 assembly (clang, -O0):
<plt_mapminmax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<plt_mapminmax>:
subsd  %xmm2,%xmm3
subsd  %xmm0,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @plt_mapminmax(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %9
%12 = load double, double* %8
%13 = fsub double %11, %12
%14 = load double, double* %10
%15 = load double, double* %6
%16 = fsub double %14, %15
%17 = fmul double %13, %16
%18 = load double, double* %7
%19 = load double, double* %6
%20 = fsub double %18, %19
%21 = fdiv double %17, %20
%22 = load double, double* %8
%23 = fadd double %21, %22
ret double %23
}

LLVM IR (-O2):
define double @plt_mapminmax(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %3, %2
%7 = fsub double %4, %0
%8 = fmul double %6, %7
%9 = fsub double %1, %0
%10 = fdiv double %8, %9
%11 = fadd double %10, %2
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *,
                          int /*<<< orphan*/);
void syslog_nx(const char *message) {
  syslog(LOG_ERR, "%s: %s", message, strerror(errno));
}


x86 assembly (clang, -O0):
<syslog_nx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
lea    0xea2(%rip),%rsi
call   1030 <syslog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syslog_nx>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @syslog_nx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i32 @strerror(i32 %5)
%7 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @syslog_nx(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *netpgp_allocate(size_t n, size_t nels) { return calloc(n, nels); }


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

x86 assembly (clang, -O2):
<netpgp_allocate>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @netpgp_allocate(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 = call i8* @calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @netpgp_allocate(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
int \U000000c0(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @"\C3\80"() {
ret i32 1
}

LLVM IR (-O2):
define i32 @"\C3\80"() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printPromote() { printf("[CatShell] $ "); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"[CatShell] $ \00"
define void @printPromote() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"[CatShell] $ \00"
define void @printPromote() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_cmd_knowledge_notes();
void textui_knowledge_notes(void *obj, const char *name) {
  (void)obj;
  (void)name;
  do_cmd_knowledge_notes();
}


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

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

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

LLVM IR (-O2):
define void @textui_knowledge_notes(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @do_cmd_knowledge_notes()
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local2;
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      local2 = 0UL;
      while (local2 < 1UL) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 146565199UL) + (unsigned short)17348;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
cmp    $0x1,%rax
jae    1166 <RandomFunc+0x66>
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1155 <RandomFunc+0x55>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1136 <RandomFunc+0x36>
movzwl -0x16(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x16(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0x8bc684f,%rax
add    $0x43c4,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0xffffe6ba,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
%7 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%8 = load i16*, i16** %3
%9 = getelementptr inbounds i16, i16* %8, i64 0
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = add nsw i32 %11, 2885
%13 = trunc i32 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %7
br label %15
15: ; preds = %29, %2
%16 = load i16, i16* %7
%17 = zext i16 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %34
19: ; preds = %15
store i16 0, i16* %6
br label %20
20: ; preds = %24, %19
%21 = load i16, i16* %6
%22 = zext i16 %21 to i64
%23 = icmp ult i64 %22, 1
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i16, i16* %6
%26 = zext i16 %25 to i64
%27 = add i64 %26, 2
%28 = trunc i64 %27 to i16
store i16 %28, i16* %6
br label %20
29: ; preds = %20
%30 = load i16, i16* %7
%31 = zext i16 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i16
store i16 %33, i16* %7
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%36 = load i16, i16* %35
%37 = zext i16 %36 to i64
%38 = sub i64 %37, 146565199
%39 = add i64 %38, 17348
%40 = trunc i64 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, -6470
store i16 %4, i16* %1
ret void
}
/* Type definitions */
typedef scalar_t__ const uint64_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
const uint64_t utime_time() {
  struct timeval t;
  gettimeofday(&t, NULL);
  return ((uint64_t)(t.tv_sec * 1000000) + (uint64_t)t.tv_usec);
}


x86 assembly (clang, -O0):
<utime_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utime_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @utime_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @utime_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ mm_free(void *);
void ss128_mm_free(void *data_, void *ptr, unsigned int z) {
  (void)data_;
  (void)z;
  mm_free(ptr);
}


x86 assembly (clang, -O0):
<ss128_mm_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <mm_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ss128_mm_free(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @mm_free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int mp_add(unsigned int, unsigned int);
int main() {
  unsigned int a, b, r;
  r = mp_add(a, b);
  __VERIFIER_assert(r == a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <mp_add@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @mp_add(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = add i32 %9, %10
%12 = icmp eq i32 %8, %11
%13 = zext i1 %12 to i32
%14 = call i32 @__VERIFIER_assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mp_add(i32 undef, i32 undef)
%2 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void CRYPTO_set_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_ex_data() {
ret void
}
decsyn(o) {
  error("Declaration syntax");
  errflush(o);
}


x86 assembly (clang, -O0):
<decsyn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <errflush@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decsyn>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <error@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <errflush@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Declaration syntax\00"
define i32 @decsyn(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @errflush to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [19 x i8] c"Declaration syntax\00"
define i32 @decsyn(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @errflush to i32 (i32, ...)*)(i32 %0)
ret i32 undef
}
int decagonalnumber(int num) { return 4 * num * num - 3 * num; }


x86 assembly (clang, -O0):
<decagonalnumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
imul   -0x4(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decagonalnumber>:
lea    -0x3(,%rdi,4),%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @decagonalnumber(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 4, %3
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = mul nsw i32 3, %7
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @decagonalnumber(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = add i32 %2, -3
%4 = mul i32 %3, %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadByte(int /*<<< orphan*/, int);
uint8_t wiznetGetSocketTimeToLive(uint8_t socket) {
  return wiznetRegReadByte(socket, (0x0000 + 0x0016));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketTimeToLive>:
mov    $0x16,%esi
jmp    1030 <wiznetRegReadByte@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketTimeToLive(i32 %0) {
%2 = tail call i32 @wiznetRegReadByte(i32 %0, i32 22)
ret i32 %2
}
/* Variables and functions */
long _fast_ftol(double);
long fast_ftol(float x) { return _fast_ftol((double)x); }


x86 assembly (clang, -O0):
<fast_ftol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <_fast_ftol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_ftol>:
cvtss2sd %xmm0,%xmm0
jmp    1030 <_fast_ftol@plt>

LLVM IR (-O0):
define i64 @fast_ftol(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @_fast_ftol(double %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @fast_ftol(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @_fast_ftol(double %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ ss2sbc(float, float, float);
void ss2sbc_(float *r, float *g, float *b) { ss2sbc(*r, *g, *b); }


x86 assembly (clang, -O0):
<ss2sbc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
call   1030 <ss2sbc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss2sbc_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
jmp    1030 <ss2sbc@plt>

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

LLVM IR (-O2):
define void @ss2sbc_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = load float, float* %2
%7 = tail call i32 @ss2sbc(float %4, float %5, float %6)
ret void
}
/* Variables and functions */
char *frob();
int /*<<< orphan*/ oof();
test_4(int code) {
  char *temp = frob();
  int rotate = (code == 22);
  if (temp == 0 || !rotate)
    oof();
}


x86 assembly (clang, -O0):
<test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <frob@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x16,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <test_4+0x3a>
cmpl   $0x0,-0x14(%rbp)
jne    1161 <test_4+0x41>
mov    $0x0,%al
call   1030 <oof@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_4>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <frob@plt>
cmp    $0x16,%ebx
jne    1136 <test_4+0x16>
test   %rax,%rax
je     1136 <test_4+0x16>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <oof@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
%6 = call i8* (...) @frob()
store i8* %6, i8** %4
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 22
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %15, label %12
12: ; preds = %1
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12, %1
%16 = call i32 (...) @oof()
br label %17
17: ; preds = %15, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @test_4(i32 %0) {
%2 = tail call i8* (...) @frob()
%3 = icmp eq i32 %0, 22
%4 = icmp ne i8* %2, null
%5 = and i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %1, %6
ret i32 undef
}
int isspace(int c) {
  if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     112f <isspace+0x2f>
cmpl   $0x9,-0x8(%rbp)
je     112f <isspace+0x2f>
cmpl   $0xd,-0x8(%rbp)
je     112f <isspace+0x2f>
cmpl   $0xa,-0x8(%rbp)
jne    113b <isspace+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <isspace+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 10, label %3
i32 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int valid_digit(char *ip_dgt) {
  while (*ip_dgt) {
    if (*ip_dgt >= '0' && *ip_dgt <= '9')
      ++ip_dgt;
    else
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<valid_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <valid_digit+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1146 <valid_digit+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1146 <valid_digit+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <valid_digit+0x52>
movl   $0x0,-0x4(%rbp)
jmp    115e <valid_digit+0x5e>
jmp    1108 <valid_digit+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_digit>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <valid_digit+0x23>
add    $0x1,%rdi
nop
add    $0xd0,%cl
cmp    $0xa,%cl
jae    1124 <valid_digit+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <valid_digit+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @valid_digit(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -48
%11 = icmp ult i8 %10, 10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
struct libdeflate_decompressor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct libdeflate_decompressor *);
void libdeflate_free_decompressor(struct libdeflate_decompressor *d) {
  free(d);
}


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

x86 assembly (clang, -O2):
<libdeflate_free_decompressor>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.libdeflate_decompressor = type { i32 }
define void @libdeflate_free_decompressor(%struct.libdeflate_decompressor* %0) {
%2 = alloca %struct.libdeflate_decompressor*
store %struct.libdeflate_decompressor* %0, %struct.libdeflate_decompressor** %2
%3 = load %struct.libdeflate_decompressor*, %struct.libdeflate_decompressor** %2
%4 = call i32 @free(%struct.libdeflate_decompressor* %3)
ret void
}

LLVM IR (-O2):
%struct.libdeflate_decompressor = type { i32 }
define void @libdeflate_free_decompressor(%struct.libdeflate_decompressor* nocapture %0) {
%2 = tail call i32 @free(%struct.libdeflate_decompressor* %0)
ret void
}
/* Type definitions */
struct window {
  int dummy;
};
struct pixel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ findSeams(struct pixel *, struct window *, int, int, int);
void findSeamsHorizontal(struct pixel *imageVector, struct window *imageWindow,
                         int findAreas, int skipEdge) {
  findSeams(imageVector, imageWindow, 1, findAreas, skipEdge);
}


x86 assembly (clang, -O0):
<findSeamsHorizontal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x1,%edx
call   1030 <findSeams@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findSeamsHorizontal>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0x1,%edx
jmp    1030 <findSeams@plt>

LLVM IR (-O0):
%struct.pixel = type { i32 }
%struct.window = type { i32 }
define void @findSeamsHorizontal(%struct.pixel* %0, %struct.window* %1, i32 %2, i32 %3) {
%5 = alloca %struct.pixel*
%6 = alloca %struct.window*
%7 = alloca i32
%8 = alloca i32
store %struct.pixel* %0, %struct.pixel** %5
store %struct.window* %1, %struct.window** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.pixel*, %struct.pixel** %5
%10 = load %struct.window*, %struct.window** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @findSeams(%struct.pixel* %9, %struct.window* %10, i32 1, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.pixel = type { i32 }
%struct.window = type { i32 }
define void @findSeamsHorizontal(%struct.pixel* %0, %struct.window* %1, i32 %2, i32 %3) {
%5 = tail call i32 @findSeams(%struct.pixel* %0, %struct.window* %1, i32 1, i32 %2, i32 %3)
ret void
}
float atof(char *str) { return 0; }


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

x86 assembly (clang, -O2):
<atof>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @atof(i8* nocapture readnone %0) {
ret float 0.000000e+00
}
int valid_cid(int cid) { return 0 <= cid && cid < 20; }


x86 assembly (clang, -O0):
<valid_cid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1121 <valid_cid+0x21>
cmpl   $0x14,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_cid>:
xor    %eax,%eax
cmp    $0x14,%edi
setb   %al
ret

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