xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_223() {
  Assert_real((isqrt(223) == 14),
              "/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/stdlib/isqrt.c",
              1120, ("Integer square root of 223 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_223>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdf,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x460,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_223>:
push   %rax
mov    $0xdf,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x460,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 223 should be 14\00"
define void @t_sqrt_223() {
%1 = call i32 @isqrt(i32 223)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1120, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 223 should be 14\00"
define void @t_sqrt_223() {
%1 = tail call i32 @isqrt(i32 223)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1120, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct v4l2_capability {
  int dummy;
};
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int main(void) {
  struct v4l2_capability c;
  (void)c;
  return sizeof(c);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
float __ocml_mul_rtz_f32(float, float);
float __fmul_rz(float x, float y) { return __ocml_mul_rtz_f32(x, y); }


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

x86 assembly (clang, -O2):
<__fmul_rz>:
jmp    1030 <__ocml_mul_rtz_f32@plt>

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

LLVM IR (-O2):
define float @__fmul_rz(float %0, float %1) {
%3 = tail call float @__ocml_mul_rtz_f32(float %0, float %1)
ret float %3
}
void rop3_199_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_199_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)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%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_199_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
or     %dl,%cl
and    %sil,%cl
xor    %dl,%cl
or     %sil,%cl
not    %cl
and    %sil,%al
or     %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_199_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** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = or i32 %12, %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* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_199_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %6, %2
%8 = or i8 %7, %1
%9 = xor i8 %8, -1
%10 = and i8 %4, %1
%11 = or i8 %10, %9
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putp(char const *);
int /*<<< orphan*/ setupterm(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *);
char *tigetstr(char *);
char *tparm(char const *, int);
int main() {
  setupterm(NULL, 1, NULL);
  const char *setf = tigetstr("setaf");
  const char *red = tparm(setf, 1);
  putp(red);
  printf("whooo!\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%esi
mov    %rdx,%rdi
call   1030 <setupterm@plt>
lea    0xe89(%rip),%rdi
call   1070 <tigetstr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1060 <tparm@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <putp@plt>
lea    0xe64(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <setupterm@plt>
lea    0xe9a(%rip),%rdi
call   1070 <tigetstr@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1060 <tparm@plt>
mov    %rax,%rdi
call   1050 <putp@plt>
lea    0xe7f(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"setaf\00"
@.str.1 = [8 x i8] c"whooo!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @setupterm(i32* null, i32 1, i32* null)
%5 = call i8* @tigetstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i8* @tparm(i8* %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @putp(i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"setaf\00"
@str = [7 x i8] c"whooo!\00"
define i32 @main() {
%1 = tail call i32 @setupterm(i32* null, i32 1, i32* null)
%2 = tail call i8* @tigetstr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @tparm(i8* %2, i32 1)
%4 = tail call i32 @putp(i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int Foo(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @Foo() {
ret i32 42
}

LLVM IR (-O2):
define i32 @Foo() {
ret i32 42
}
void EVP_add_digest(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_add_digest() {
ret void
}
/* Variables and functions */
bool divides_l(long n, long m) {
  if (n == 0) {
    return false;
  }
  if (m == 0) {
    return true;
  }
  return (m % n) == 0;
}


x86 assembly (clang, -O0):
<divides_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <divides_l+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1153 <divides_l+0x53>
cmpq   $0x0,-0x18(%rbp)
jne    113a <divides_l+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1153 <divides_l+0x53>
mov    -0x18(%rbp),%rax
cqto
idivq  -0x10(%rbp)
cmp    $0x0,%rdx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divides_l>:
test   %rdi,%rdi
je     1120 <divides_l+0x20>
test   %rsi,%rsi
je     1123 <divides_l+0x23>
mov    %rsi,%rax
or     %rdi,%rax
shr    $0x20,%rax
je     1129 <divides_l+0x29>
mov    %rsi,%rax
cqto
idiv   %rdi
jmp    112f <divides_l+0x2f>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret
mov    %esi,%eax
xor    %edx,%edx
div    %edi
xor    %eax,%eax
test   %rdx,%rdx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @divides_l(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i64 %1, 0
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = srem i64 %1, %0
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ], [ 1, %4 ]
ret i32 %11
}
/* Variables and functions */
void free(void *);
void json_allocator_free(void *ptr) { return free(ptr); }


x86 assembly (clang, -O0):
<json_allocator_free>:
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):
<json_allocator_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @json_allocator_free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ lcd_op(int, int, int /*<<< orphan*/);
void lcd_setcursor(uint8_t col, uint8_t row) {
  int row_offsets[] = {0x00, 0x40, 0x14, 0x54};
  if (row > 2)
    row = 1;
  lcd_op(0x80 | (col + row_offsets[row]), 0x1, 0);
}


x86 assembly (clang, -O0):
<lcd_setcursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1145 <lcd_setcursor+0x35>
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
movslq -0x8(%rbp),%rax
add    -0x20(%rbp,%rax,4),%edi
or     $0x80,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <lcd_op@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_setcursor>:
cmp    $0x3,%esi
mov    $0x1,%eax
cmovge %eax,%esi
movslq %esi,%rax
lea    0xedb(%rip),%rcx
add    (%rcx,%rax,4),%edi
or     $0x80,%edi
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <lcd_op@plt>

LLVM IR (-O0):
@__const.lcd_setcursor.row_offsets = [4 x i32] [i32 0, i32 64, i32 20, i32 84]
define void @lcd_setcursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast [4 x i32]* %5 to i8*
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %4
br label %10
10: ; preds = %9, %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = add nsw i32 %11, %15
%17 = or i32 128, %16
%18 = call i32 @lcd_op(i32 %17, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@__const.lcd_setcursor.row_offsets = [4 x i32] [i32 0, i32 64, i32 20, i32 84]
define void @lcd_setcursor(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 2
%4 = select i1 %3, i32 1, i32 %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @__const.lcd_setcursor.row_offsets, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = add nsw i32 %7, %0
%9 = or i32 %8, 128
%10 = tail call i32 @lcd_op(i32 %9, i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gp_get_realtime(long *);
void gp_get_usertime(long *pdt) { gp_get_realtime(pdt); }


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

x86 assembly (clang, -O2):
<gp_get_usertime>:
jmp    1030 <gp_get_realtime@plt>

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

LLVM IR (-O2):
define void @gp_get_usertime(i64* %0) {
%2 = tail call i32 @gp_get_realtime(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void open_exit(void *arg) { free(arg); }


x86 assembly (clang, -O0):
<open_exit>:
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):
<open_exit>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @open_exit(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct obj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cintern(char *);
int /*<<< orphan*/ setvar(int /*<<< orphan*/, int /*<<< orphan*/, struct obj *);
void init_sliba_version(void) {
  setvar(cintern("*sliba-version*"),
         cintern("$Id: sliba.c,v 1.8 2002/09/08 01:47:19 johns Exp $"),
         ((struct obj *)0));
}


x86 assembly (clang, -O0):
<init_sliba_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,-0x4(%rbp)
lea    0xed2(%rip),%rdi
call   1040 <cintern@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setvar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_sliba_version>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <cintern@plt>
mov    %eax,%ebx
lea    0xeda(%rip),%rdi
call   1040 <cintern@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <setvar@plt>

LLVM IR (-O0):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*sliba-version*\00"
@.str.1 = [51 x i8] c"$Id: sliba.c,v 1.8 2002/09/08 01:47:19 johns Exp $\00"
define void @init_sliba_version() {
%1 = call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cintern(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}

LLVM IR (-O2):
%struct.obj = type { i32 }
@.str = [16 x i8] c"*sliba-version*\00"
@.str.1 = [51 x i8] c"$Id: sliba.c,v 1.8 2002/09/08 01:47:19 johns Exp $\00"
define void @init_sliba_version() {
%1 = tail call i32 @cintern(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cintern(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @setvar(i32 %1, i32 %2, %struct.obj* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, scalar_t__);
int strcmp(char *, char *);
scalar_t__ strlen(char *);
int main() {
  char src[50] = "asdfasdfyxdfasfasd";
  char dest[50];
  memcpy(dest, src, strlen(src) + 1);
  return strcmp(dest, src);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x32,%edx
call   1050 <memcpy@plt>
lea    -0x80(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.src = [50 x i8] c"asdfasdfyxdfasfasd\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
store i32 0, i32* %1
%4 = bitcast [50 x i8]* %2 to i8*
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @memcpy(i8* %5, i8* %6, i64 %9)
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%13 = call i32 @strcmp(i8* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
@__const.main.src = [50 x i8] c"asdfasdfyxdfasfasd\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i64 @strlen(i8* %3)
%6 = add nsw i64 %5, 1
%7 = call i32 @memcpy(i8* %4, i8* %3, i64 %6)
%8 = call i32 @strcmp(i8* %4, i8* %3)
ret i32 %8
}
void null_canon(a1) struct sockaddr *a1;
{ ; }


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

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

LLVM IR (-O0):
%struct.sockaddr = type opaque
define void @null_canon(%struct.sockaddr* %0) {
%2 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %2
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type opaque
define void @null_canon(%struct.sockaddr* nocapture %0) {
ret void
}
void vector(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_unpacklo_pi16(__m64 a, __m64 b) {
  return _mm_unpacklo_pi16(a, b);
}


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

x86 assembly (clang, -O2):
<test_mm_unpacklo_pi16>:
jmp    1030 <_mm_unpacklo_pi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_unpacklo_pi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(int argc, char *argv[]) { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ err_fatal(char *);
int listen(int, int);
void Listen(int socket, int backlog) {
  int result;
  result = listen(socket, backlog);
  if (result == -1) {
    err_fatal("ERROR. listen() failed");
  }
  return;
}


x86 assembly (clang, -O0):
<Listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <listen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <Listen+0x32>
lea    0xeb3(%rip),%rdi
call   1030 <err_fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rax
call   1040 <listen@plt>
cmp    $0xffffffff,%eax
je     112d <Listen+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <err_fatal@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"ERROR. listen() failed\00"
define void @Listen(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* %3
%7 = load i32, i32* %4
%8 = call i32 @listen(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @err_fatal(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"ERROR. listen() failed\00"
define void @Listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_fatal(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
struct XDR {
  int dummy;
};

/* Variables and functions */
int xdr_long(struct XDR *, int *);
int xdr_short(struct XDR *, short *);
extern int xdr_int(struct XDR *xdrs, int *ip) {
  return xdr_long(xdrs, ip);
  goto __done2;
L1:;
  return xdr_short(xdrs, (short *)ip);
__done2:;
}


x86 assembly (clang, -O0):
<xdr_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <xdr_long@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_int>:
jmp    1030 <xdr_long@plt>

LLVM IR (-O0):
%struct.XDR = type { i32 }
define i32 @xdr_int(%struct.XDR* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.XDR*
%5 = alloca i32*
store %struct.XDR* %0, %struct.XDR** %4
store i32* %1, i32** %5
%6 = load %struct.XDR*, %struct.XDR** %4
%7 = load i32*, i32** %5
%8 = call i32 @xdr_long(%struct.XDR* %6, i32* %7)
store i32 %8, i32* %3
br label %15
9: ; No predecessors!
%10 = load %struct.XDR*, %struct.XDR** %4
%11 = load i32*, i32** %5
%12 = bitcast i32* %11 to i16*
%13 = call i32 @xdr_short(%struct.XDR* %10, i16* %12)
store i32 %13, i32* %3
br label %15
14: ; No predecessors!
br label %15
15: ; preds = %14, %9, %2
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.XDR = type { i32 }
define i32 @xdr_int(%struct.XDR* %0, i32* %1) {
%3 = tail call i32 @xdr_long(%struct.XDR* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xrealloc(void *p, size_t sz) {
  void *out;
  out = realloc(p, sz);
  if (!out) {
    perror("Failed xrealloc: ");
    abort();
  }
  return out;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <xrealloc+0x3f>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Failed xrealloc: \00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [18 x i8] c"Failed xrealloc: \00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
void Undefined_Handler(void) {}


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

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

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

LLVM IR (-O2):
define void @Undefined_Handler() {
ret void
}
void refreshGoodSlavesCount(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               105, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<refreshGoodSlavesCount>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x69,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<refreshGoodSlavesCount>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x69,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.refreshGoodSlavesCount = [23 x i8] c"refreshGoodSlavesCount\00"
define void @refreshGoodSlavesCount() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.refreshGoodSlavesCount, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.refreshGoodSlavesCount = [23 x i8] c"refreshGoodSlavesCount\00"
define void @refreshGoodSlavesCount() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.refreshGoodSlavesCount, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t UINT32_C(int);
size_t ht_int_hash_function(const void *key, size_t len) {
  (void)len;
  return ((size_t)key ^ (UINT32_C(0x2f693b52))) * 2654435761UL;
}


x86 assembly (clang, -O0):
<ht_int_hash_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x2f693b52,%edi
call   1030 <UINT32_C@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %rcx,%rax
movabs $0x9e3779b1,%rcx
imul   %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_int_hash_function>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f693b52,%edi
call   1030 <UINT32_C@plt>
xor    %rbx,%rax
mov    $0x9e3779b1,%ecx
imul   %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ht_int_hash_function(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = call i64 @UINT32_C(i32 795425618)
%9 = xor i64 %7, %8
%10 = mul i64 %9, 2654435761
ret i64 %10
}

LLVM IR (-O2):
define i64 @ht_int_hash_function(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i64 @UINT32_C(i32 795425618)
%5 = xor i64 %4, %3
%6 = mul i64 %5, 2654435761
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ gds_write_bgnlib(int);
int /*<<< orphan*/ gds_write_header(int);
int /*<<< orphan*/ gds_write_libname(int, char *);
int /*<<< orphan*/ gds_write_units(int, float, float);
void gds_create_lib(int fd, char *libname, float dbu_um) {
  float dbu_uu, dbu_m;
  dbu_uu = 0.001;
  dbu_m = 1.0e-9;
  gds_write_header(fd);
  gds_write_bgnlib(fd);
  gds_write_libname(fd, libname);
  gds_write_units(fd, dbu_uu, dbu_m);
}


x86 assembly (clang, -O0):
<gds_create_lib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  0xea8(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe97(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <gds_write_header@plt>
mov    -0x4(%rbp),%edi
call   1030 <gds_write_bgnlib@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <gds_write_libname@plt>
mov    -0x4(%rbp),%edi
movss  -0x18(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
call   1060 <gds_write_units@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gds_create_lib>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <gds_write_header@plt>
mov    %ebp,%edi
call   1030 <gds_write_bgnlib@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <gds_write_libname@plt>
movss  0xe9a(%rip),%xmm0
movss  0xe96(%rip),%xmm1
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <gds_write_units@plt>

LLVM IR (-O0):
define void @gds_create_lib(i32 %0, i8* %1, float %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 %0, i32* %4
store i8* %1, i8** %5
store float %2, float* %6
store float 0x3F50624DE0000000, float* %7
store float 0x3E112E0BE0000000, float* %8
%9 = load i32, i32* %4
%10 = call i32 @gds_write_header(i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @gds_write_bgnlib(i32 %11)
%13 = load i32, i32* %4
%14 = load i8*, i8** %5
%15 = call i32 @gds_write_libname(i32 %13, i8* %14)
%16 = load i32, i32* %4
%17 = load float, float* %7
%18 = load float, float* %8
%19 = call i32 @gds_write_units(i32 %16, float %17, float %18)
ret void
}

LLVM IR (-O2):
define void @gds_create_lib(i32 %0, i8* %1, float %2) {
%4 = tail call i32 @gds_write_header(i32 %0)
%5 = tail call i32 @gds_write_bgnlib(i32 %0)
%6 = tail call i32 @gds_write_libname(i32 %0, i8* %1)
%7 = tail call i32 @gds_write_units(i32 %0, float 0x3F50624DE0000000, float 0x3E112E0BE0000000)
ret void
}
void border_sw_ext_diagonal_special_sand_short_vert(unsigned char *pic,
                                                    unsigned char *mirr) {
  *pic = 0x2C;
  *mirr = 0x01;
}


x86 assembly (clang, -O0):
<border_sw_ext_diagonal_special_sand_short_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2c,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_sw_ext_diagonal_special_sand_short_vert>:
movb   $0x2c,(%rdi)
movb   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @border_sw_ext_diagonal_special_sand_short_vert(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
store i8 44, i8* %5
%6 = load i8*, i8** %4
store i8 1, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_sw_ext_diagonal_special_sand_short_vert(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 44, i8* %0
store i8 1, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(void) {
  char x = 'A';
  char y = 'Z';
  printf("%c\t%c\n", x, y);
  char s = x;
  x = y;
  y = s;
  printf("%c\t%c\n", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x41,-0x1(%rbp)
movb   $0x5a,-0x2(%rbp)
mov    -0x1(%rbp),%al
lea    0xed6(%rip),%rdi
movsbl %al,%esi
movsbl -0x2(%rbp),%edx
call   1030 <printf@plt>
mov    -0x1(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
lea    0xeae(%rip),%rdi
movsbl %al,%esi
movsbl -0x2(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c\09%c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 90)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 90, i8 signext 65)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Teapot_Destroy();
void DestroyGL() { Teapot_Destroy(); }


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

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

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

LLVM IR (-O2):
define void @DestroyGL() {
%1 = tail call i32 (...) @Teapot_Destroy()
ret void
}
/* Variables and functions */
int mutlak_deger(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int sayi, sonuc;
  printf("sayi girin:");
  scanf("%d", &sayi);
  sonuc = mutlak_deger(sayi);
  printf("mutlak deger: %d\n", sonuc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <mutlak_deger@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <mutlak_deger@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"sayi girin:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"mutlak deger: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @mutlak_deger(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"sayi girin:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [18 x i8] c"mutlak deger: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @mutlak_deger(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
void opserr(int errno, char *par) {}


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

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

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

LLVM IR (-O2):
define void @opserr(i32 %0, i8* nocapture %1) {
ret void
}
void may_over_or_underrun_symbolic2_Nowarn_Good(int n) {
  int a[n];
  a[1] = 0;
}


x86 assembly (clang, -O0):
<may_over_or_underrun_symbolic2_Nowarn_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
movl   $0x0,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @may_over_or_underrun_symbolic2_Nowarn_Good(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 0, i32* %9
%10 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @may_over_or_underrun_symbolic2_Nowarn_Good(i32 %0) {
ret void
}
/* Variables and functions */
int regexec(void *, char const *, int /*<<< orphan*/, int /*<<< orphan*/ *,
            int /*<<< orphan*/);
int cmp_regex(const char *haystack, const char *needle) {
  return regexec((void *)needle, haystack, 0, NULL, 0);
}


x86 assembly (clang, -O0):
<cmp_regex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%ecx
mov    %r8d,%edx
call   1030 <regexec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_regex>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <regexec@plt>

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

LLVM IR (-O2):
define i32 @cmp_regex(i8* %0, i8* %1) {
%3 = tail call i32 @regexec(i8* %1, i8* %0, i32 0, i32* null, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ graphicsclose();
int /*<<< orphan*/ keyclose();
int /*<<< orphan*/ printf(char *);
void restorehardware(void) {
  printf("Releasing keyboard...");
  keyclose();
  printf("done.\n");
  graphicsclose();
}


x86 assembly (clang, -O0):
<restorehardware>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <keyclose@plt>
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <graphicsclose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<restorehardware>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <keyclose@plt>
lea    0xebb(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <graphicsclose@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Releasing keyboard...\00"
@.str.1 = [7 x i8] c"done.\0A\00"
define void @restorehardware() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @keyclose()
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @graphicsclose()
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Releasing keyboard...\00"
@str = [6 x i8] c"done.\00"
define void @restorehardware() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @keyclose()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @graphicsclose()
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char);
int is_valild_char(char ch) { return isalnum(ch) || ch == '_'; }


x86 assembly (clang, -O0):
<is_valild_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <is_valild_char+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valild_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_valild_char(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ makespace(char **, size_t);
int /*<<< orphan*/ strncat(char *, char const *, size_t);
void _xstrncat(char **str1, const char *str2, size_t len) {
  if (str2 == NULL)
    str2 = "(null)";
  makespace(str1, len);
  strncat(*str1, str2, len);
}


x86 assembly (clang, -O0):
<_xstrncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <_xstrncat+0x2a>
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <makespace@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xstrncat>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
test   %rsi,%rsi
lea    0xec8(%rip),%rax
cmove  %rax,%rbx
mov    %rdx,%rsi
call   1030 <makespace@plt>
mov    (%r15),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strncat@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"(null)\00"
define void @_xstrncat(i8** %0, i8* %1, i64 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i64
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %3
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %5
br label %10
10: ; preds = %9, %3
%11 = load i8**, i8*** %4
%12 = load i64, i64* %6
%13 = call i32 @makespace(i8** %11, i64 %12)
%14 = load i8**, i8*** %4
%15 = load i8*, i8** %14
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = call i32 @strncat(i8* %15, i8* %16, i64 %17)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
define void @_xstrncat(i8** %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %1, null
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1
%6 = tail call i32 @makespace(i8** %0, i64 %2)
%7 = load i8*, i8** %0
%8 = tail call i32 @strncat(i8* %7, i8* %5, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void printboth(int x, int y) { printf("x: %d, y: %d\n", x, y); }


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

x86 assembly (clang, -O2):
<printboth>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

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