xunge/DecIR huggingface dataset:
/* Variables and functions */
double fabs(double);
double max_value(double number1, double number2) {
  return (fabs(number1) > fabs(number2) ? fabs(number1) : fabs(number2));
}


x86 assembly (clang, -O0):
<max_value>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xee6(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movaps 0xed6(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    1152 <max_value+0x52>
movsd  -0x8(%rbp),%xmm0
movaps 0xebc(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1167 <max_value+0x67>
movsd  -0x10(%rbp),%xmm0
movaps 0xea2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_value>:
movapd 0xef8(%rip),%xmm2
andpd  %xmm2,%xmm0
andpd  %xmm2,%xmm1
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max_value(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @llvm.fabs.f64(double %5)
%7 = load double, double* %4
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp ogt double %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load double, double* %3
%12 = call double @llvm.fabs.f64(double %11)
br label %16
13: ; preds = %2
%14 = load double, double* %4
%15 = call double @llvm.fabs.f64(double %14)
br label %16
16: ; preds = %13, %10
%17 = phi double [ %12, %10 ], [ %15, %13 ]
ret double %17
}

LLVM IR (-O2):
define double @max_value(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %0)
%4 = tail call double @llvm.fabs.f64(double %1)
%5 = fcmp ogt double %3, %4
%6 = select i1 %5, double %3, double %4
ret double %6
}
void *string_copy_func(void *key) {
  char *s = (char *)key;
  char *copy = (char *)malloc(strlen(s) * sizeof(char));
  strcpy(copy, s);
  return copy;
}


x86 assembly (clang, -O0):
<string_copy_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
shl    $0x0,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_copy_func>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @string_copy_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = mul i64 %7, 1
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = call i8* @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @string_copy_func(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i8* @malloc(i64 %2)
%4 = tail call i8* @strcpy(i8* dereferenceable(1) %3, i8* dereferenceable(1) %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free(void *ptr) {
  if (ptr) {
    free(ptr);
  }
}


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

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

LLVM IR (-O0):
define void @safe_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @safe_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int PrintNumbers() {
  printf("%d\n", 1);
  printf("%d\n", 101);
  printf("%d\n", 1001);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<PrintNumbers>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x65,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x3e9,%esi
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintNumbers>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x65,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e9,%esi
call   1030 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @PrintNumbers() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 101)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1001)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
void elv_requeue_request(struct request_queue *x, struct request *y) { return; }


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.request = type opaque
define void @elv_requeue_request(%struct.request_queue* %0, %struct.request* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.request*
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.request* %1, %struct.request** %4
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.request = type opaque
define void @elv_requeue_request(%struct.request_queue* nocapture %0, %struct.request* nocapture %1) {
ret void
}
call2i(c1, f1, c2, c3, d1, c4, c5, c6, f2, s, c7, d2) char c1;
float f1;
char c2;
char c3;
double d1;
char c4;
char c5;
char c6;
float f2;
short s;
char c7;
double d2;
{
  c1 = 'a';
  f1 = 0.0;
  c2 = 5;
  d1 = 0.0;
  c3 = 6;
  f2 = 0.1;
  c4 = 7;
  d2 = 0.2;
  c5 = 's';
  c6 = 'f';
  c7 = 'z';
  s = 77;
}


x86 assembly (clang, -O0):
<call2i>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm2,-0x40(%rbp)
mov    %r9d,-0x48(%rbp)
mov    %r8d,-0x44(%rbp)
mov    %ecx,-0x34(%rbp)
mov    %edx,%r8d
mov    -0x48(%rbp),%edx
mov    %esi,%r9d
mov    -0x44(%rbp),%esi
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
mov    %edi,%r10d
mov    -0x34(%rbp),%edi
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%ecx
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm0
mov    %r10b,-0x5(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %r9b,-0xd(%rbp)
mov    %r8b,-0xe(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %dil,-0x19(%rbp)
mov    %sil,-0x1a(%rbp)
mov    %dl,-0x1b(%rbp)
movss  %xmm0,-0x20(%rbp)
mov    %cx,-0x22(%rbp)
mov    %al,-0x23(%rbp)
movsd  %xmm3,-0x30(%rbp)
movb   $0x61,-0x5(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movb   $0x5,-0xd(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movb   $0x6,-0xe(%rbp)
movss  0xe76(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movb   $0x7,-0x19(%rbp)
movsd  0xe5d(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movb   $0x73,-0x1a(%rbp)
movb   $0x66,-0x1b(%rbp)
movb   $0x7a,-0x23(%rbp)
movw   $0x4d,-0x22(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call2i(i32 %0, double %1, i32 %2, i32 %3, double %4, i32 %5, i32 %6, i32 %7, double %8, i32 %9, i32 %10, double %11) {
%13 = alloca i32
%14 = alloca i8
%15 = alloca float
%16 = alloca i8
%17 = alloca i8
%18 = alloca double
%19 = alloca i8
%20 = alloca i8
%21 = alloca i8
%22 = alloca float
%23 = alloca i16
%24 = alloca i8
%25 = alloca double
%26 = trunc i32 %0 to i8
%27 = fptrunc double %1 to float
%28 = trunc i32 %2 to i8
%29 = trunc i32 %3 to i8
%30 = trunc i32 %5 to i8
%31 = trunc i32 %6 to i8
%32 = trunc i32 %7 to i8
%33 = fptrunc double %8 to float
%34 = trunc i32 %9 to i16
%35 = trunc i32 %10 to i8
store i8 %26, i8* %14
store float %27, float* %15
store i8 %28, i8* %16
store i8 %29, i8* %17
store double %4, double* %18
store i8 %30, i8* %19
store i8 %31, i8* %20
store i8 %32, i8* %21
store float %33, float* %22
store i16 %34, i16* %23
store i8 %35, i8* %24
store double %11, double* %25
store i8 97, i8* %14
store float 0.000000e+00, float* %15
store i8 5, i8* %16
store double 0.000000e+00, double* %18
store i8 6, i8* %17
store float 0x3FB99999A0000000, float* %22
store i8 7, i8* %19
store double 2.000000e-01, double* %25
store i8 115, i8* %20
store i8 102, i8* %21
store i8 122, i8* %24
store i16 77, i16* %23
%36 = load i32, i32* %13
ret i32 %36
}

LLVM IR (-O2):
define i32 @call2i(i32 %0, double %1, i32 %2, i32 %3, double %4, i32 %5, i32 %6, i32 %7, double %8, i32 %9, i32 %10, double %11) {
ret i32 undef
}
in_swaps(s) short *s;
{
  union SWAPS {
    short s;
    unsigned char c[2];
  } * u;
  unsigned char t;
  u = (union SWAPS *)s;
  t = u->c[0];
  u->c[0] = u->c[1];
  u->c[1] = t;
}


x86 assembly (clang, -O0):
<in_swaps>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_swaps>:
rolw   $0x8,(%rdi)
ret

LLVM IR (-O0):
%union.SWAPS = type { i16 }
define i32 @in_swaps(i16* %0) {
%2 = alloca i32
%3 = alloca i16*
%4 = alloca %union.SWAPS*
%5 = alloca i8
store i16* %0, i16** %3
%6 = load i16*, i16** %3
%7 = bitcast i16* %6 to %union.SWAPS*
store %union.SWAPS* %7, %union.SWAPS** %4
%8 = load %union.SWAPS*, %union.SWAPS** %4
%9 = bitcast %union.SWAPS* %8 to [2 x i8]*
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%11 = load i8, i8* %10
store i8 %11, i8* %5
%12 = load %union.SWAPS*, %union.SWAPS** %4
%13 = bitcast %union.SWAPS* %12 to [2 x i8]*
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %13, i64 0, i64 1
%15 = load i8, i8* %14
%16 = load %union.SWAPS*, %union.SWAPS** %4
%17 = bitcast %union.SWAPS* %16 to [2 x i8]*
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %17, i64 0, i64 0
store i8 %15, i8* %18
%19 = load i8, i8* %5
%20 = load %union.SWAPS*, %union.SWAPS** %4
%21 = bitcast %union.SWAPS* %20 to [2 x i8]*
%22 = getelementptr inbounds [2 x i8], [2 x i8]* %21, i64 0, i64 1
store i8 %19, i8* %22
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @in_swaps(i16* nocapture %0) {
%2 = bitcast i16* %0 to [2 x i8]*
%3 = bitcast i16* %0 to i8*
%4 = load i8, i8* %3
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%6 = load i8, i8* %5
store i8 %6, i8* %3
store i8 %4, i8* %5
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x6e() {
  Assert_real((isalnum(110)),
              "/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_isalnum.c",
              555, ("isalnum should be 1 for n"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x6e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x22b,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x6e>:
push   %rax
mov    $0x6e,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x22b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for n\00"
define void @t_isalnum_0x6e() {
%1 = call i32 @isalnum(i32 110)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for n\00"
define void @t_isalnum_0x6e() {
%1 = tail call i32 @isalnum(i32 110)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ search_postfix_clear();
void evdns_search_clear(void) { search_postfix_clear(); }


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

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

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

LLVM IR (-O2):
define void @evdns_search_clear() {
%1 = tail call i32 (...) @search_postfix_clear()
ret void
}
void rop3_35_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = T & stk3;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


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

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

LLVM IR (-O2):
define void @rop3_35_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = and i8 %5, %2
%7 = or i8 %6, %1
%8 = xor i8 %7, -1
%9 = and i8 %4, %1
%10 = or i8 %9, %8
store i8 %10, i8* %0
ret void
}
void __attribute__((no)) HEX00_cookiesDatInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_cookiesDatInit() {
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
const char *safe_name(const char *nameptr) {
  if ((nameptr == NULL) || (strlen(nameptr) == 0))
    return "???";
  return nameptr;
}


x86 assembly (clang, -O0):
<safe_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113a <safe_name+0x2a>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    114a <safe_name+0x3a>
lea    0xebf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <safe_name+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_name>:
test   %rdi,%rdi
je     1114 <safe_name+0x14>
cmpb   $0x0,(%rdi)
lea    0xef1(%rip),%rax
cmovne %rdi,%rax
ret
lea    0xee5(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"???\00"
define i8* @safe_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0
br label %7
7: ; preds = %3, %1
%8 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ], [ %6, %3 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
int mus_char_to_lint(const unsigned char *inp) {
  int o;
  unsigned char *outp = (unsigned char *)&o;
  memcpy((void *)outp, (void *)inp, 4);
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_lint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_char_to_lint>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mus_char_to_lint(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
void __attribute__((__no__)) foo(double d, float f, long double ld) {}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
fstpt  -0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(double %0, float %1, x86_fp80 %2) {
%4 = alloca double
%5 = alloca float
%6 = alloca x86_fp80
store double %0, double* %4
store float %1, float* %5
store x86_fp80 %2, x86_fp80* %6
ret void
}

LLVM IR (-O2):
define void @foo(double %0, float %1, x86_fp80 %2) {
ret void
}
unsigned int convertMantissa(unsigned int i) {
  unsigned int m = i << 13u;
  unsigned int e = 0u;
  while (!(m & 0x00800000u)) {
    e -= 0x00800000u;
    m <<= 1u;
  }
  m &= ~0x00800000u;
  e += 0x38800000u;
  return m | e;
}


x86 assembly (clang, -O0):
<convertMantissa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xd,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x800000,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1134 <convertMantissa+0x34>
jmp    114d <convertMantissa+0x4d>
mov    -0xc(%rbp),%eax
sub    $0x800000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <convertMantissa+0x17>
mov    -0x8(%rbp),%eax
and    $0xff7fffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x38800000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertMantissa>:
mov    %edi,%edx
shl    $0xd,%edx
mov    $0x38800000,%ecx
test   $0x400,%edi
jne    1135 <convertMantissa+0x35>
mov    $0x38800000,%ecx
nopw   0x0(%rax,%rax,1)
lea    (%rdx,%rdx,1),%eax
add    $0xff800000,%ecx
test   $0x400000,%edx
mov    %eax,%edx
je     1120 <convertMantissa+0x20>
jmp    1137 <convertMantissa+0x37>
mov    %edx,%eax
and    $0xff7fe000,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convertMantissa(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = shl i32 %5, 13
store i32 %6, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %12, %1
%8 = load i32, i32* %3
%9 = and i32 %8, 8388608
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = load i32, i32* %4
%14 = sub i32 %13, 8388608
store i32 %14, i32* %4
%15 = load i32, i32* %3
%16 = shl i32 %15, 1
store i32 %16, i32* %3
br label %7
17: ; preds = %7
%18 = load i32, i32* %3
%19 = and i32 %18, -8388609
store i32 %19, i32* %3
%20 = load i32, i32* %4
%21 = add i32 %20, 947912704
store i32 %21, i32* %4
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = or i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @convertMantissa(i32 %0) {
%2 = shl i32 %0, 13
%3 = and i32 %0, 1024
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = phi i32 [ %9, %5 ], [ %2, %1 ]
%8 = add i32 %6, -8388608
%9 = shl i32 %7, 1
%10 = and i32 %7, 4194304
%11 = icmp eq i32 %10, 0
br i1 %11, label %5, label %12
12: ; preds = %5
%13 = add i32 %6, 939524096
br label %14
14: ; preds = %12, %1
%15 = phi i32 [ %2, %1 ], [ %9, %12 ]
%16 = phi i32 [ 947912704, %1 ], [ %13, %12 ]
%17 = and i32 %15, -8396800
%18 = or i32 %16, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ gen_strchrnul(char *, int, char *);
int /*<<< orphan*/ init_buff(char *, int const);
int mksym_i32();
char *strchrnul(char *, int);
void test_strchrnul() {
  const int len = 5;
  char s[len];
  init_buff(s, len);
  int c = mksym_i32();
  char *res = strchrnul(s, c);
  gen_strchrnul(s, c, res);
}


x86 assembly (clang, -O0):
<test_strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x5,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1050 <init_buff@plt>
mov    $0x0,%al
call   1040 <mksym_i32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    -0x30(%rbp),%rdi
call   1030 <strchrnul@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
lea    -0x30(%rbp),%rdi
call   1060 <gen_strchrnul@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strchrnul>:
push   %rbp
push   %rbx
push   %rax
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <init_buff@plt>
xor    %eax,%eax
call   1040 <mksym_i32@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strchrnul@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
call   1060 <gen_strchrnul@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @test_strchrnul() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 5, i32* %1
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %2
%6 = alloca i8, i64 5
%7 = call i32 @init_buff(i8* %6, i32 5)
%8 = call i32 (...) @mksym_i32()
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i8* @strchrnul(i8* %6, i32 %9)
store i8* %10, i8** %4
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = call i32 @gen_strchrnul(i8* %6, i32 %11, i8* %12)
%14 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @test_strchrnul() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @init_buff(i8* %2, i32 5)
%4 = call i32 (...) @mksym_i32()
%5 = call i8* @strchrnul(i8* %2, i32 %4)
%6 = call i32 @gen_strchrnul(i8* %2, i32 %4, i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t detexPack32R8(int r) { return (uint32_t)r; }


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

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

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

LLVM IR (-O2):
define i32 @detexPack32R8(i32 returned %0) {
ret i32 %0
}
int startswith(const char *pfx, const char *s) {
  while (*pfx)
    if (*pfx++ != *s++)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<startswith>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <startswith+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <startswith+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <startswith+0x5d>
jmp    110c <startswith+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<startswith>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1127 <startswith+0x27>
lea    0x1(%rax),%rdx
cmp    (%rsi,%rax,1),%cl
mov    %rdx,%rax
je     1110 <startswith+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ mpz_div_2exp(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void gmpint_rshift(mpz_t *rop, mpz_t *op, mp_bitcnt_t bits) {
  mpz_div_2exp(*rop, *op, bits);
}


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

x86 assembly (clang, -O2):
<gmpint_rshift>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <mpz_div_2exp@plt>

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

LLVM IR (-O2):
define void @gmpint_rshift(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @mpz_div_2exp(i32 %4, i32 %5, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gr_text(int /*<<< orphan*/, int, char const *);
void draw_text_line(int row, const char *t) {
  if (t[0] != '\0') {
    gr_text(0, (row + 1) * 18 - 1, t);
  }
}


x86 assembly (clang, -O0):
<draw_text_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1146 <draw_text_line+0x36>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   $0x12,%eax,%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <gr_text@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_text_line>:
cmpb   $0x0,(%rsi)
je     1128 <draw_text_line+0x18>
mov    %rsi,%rdx
lea    (%rdi,%rdi,8),%eax
lea    (%rax,%rax,1),%esi
add    $0x11,%esi
xor    %edi,%edi
jmp    1030 <gr_text@plt>
ret

LLVM IR (-O0):
define void @draw_text_line(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 %12, 18
%14 = sub nsw i32 %13, 1
%15 = load i8*, i8** %4
%16 = call i32 @gr_text(i32 0, i32 %14, i8* %15)
br label %17
17: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @draw_text_line(i32 %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = mul i32 %0, 18
%7 = add i32 %6, 17
%8 = tail call i32 @gr_text(i32 0, i32 %7, i8* %1)
br label %9
9: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *q_free(void *ptr) {
  if (ptr)
    free(ptr);
}


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

x86 assembly (clang, -O2):
<q_free>:
test   %rdi,%rdi
je     111f <q_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i8* @q_free(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @q_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* undef
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int bbdn_close(int socketha) {
  if (close(socketha) != 0) {
    printf("Error: bbdn_close can't close\n");
    perror("close");
  }
  return 1;
}


x86 assembly (clang, -O0):
<bbdn_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0x0,%rax
je     1165 <bbdn_close+0x35>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbdn_close>:
push   %rax
call   1040 <close@plt>
test   %rax,%rax
jne    1142 <bbdn_close+0x12>
mov    $0x1,%eax
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
call   1050 <perror@plt>
jmp    113b <bbdn_close+0xb>

LLVM IR (-O0):
@.str = [31 x i8] c"Error: bbdn_close can't close\0A\00"
@.str.1 = [6 x i8] c"close\00"
define i32 @bbdn_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @close(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
ret i32 1
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"close\00"
@str = [30 x i8] c"Error: bbdn_close can't close\00"
define i32 @bbdn_close(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %4, %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x91() {
  Assert_real((isgraph(145) == 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_isgraph.c",
              730, ("isgraph should be 0 for 0x91"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x91>:
push   %rax
mov    $0x91,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2da,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x91\00"
define void @t_isgraph_0x91() {
%1 = call i64 @isgraph(i32 145)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 730, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x91\00"
define void @t_isgraph_0x91() {
%1 = tail call i64 @isgraph(i32 145)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 730, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int err(char *msg) {
  printf("%s\n", msg);
  printf("ERROR\n");
  return 2;
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [6 x i8] c"ERROR\00"
define i32 @err(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 2
}
void make_hfsplus_class_pages() { return; }


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

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

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

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

/* Variables and functions */
int pci_read_conf_dword(int /*<<< orphan*/, int /*<<< orphan*/,
                        int /*<<< orphan*/, int /*<<< orphan*/);
uint16_t pci_get_vendor_id(uint8_t bus, uint8_t dev) {
  uint32_t v = pci_read_conf_dword(bus, dev, 0, 0);
  return v & 0xFFFF;
}


x86 assembly (clang, -O0):
<pci_get_vendor_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <pci_read_conf_dword@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_get_vendor_id>:
push   %rax
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <pci_read_conf_dword@plt>
movzwl %ax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pci_get_vendor_id(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 @pci_read_conf_dword(i32 %6, i32 %7, i32 0, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = and i32 %9, 65535
ret i32 %10
}

LLVM IR (-O2):
define i32 @pci_get_vendor_id(i32 %0, i32 %1) {
%3 = tail call i32 @pci_read_conf_dword(i32 %0, i32 %1, i32 0, i32 0)
%4 = and i32 %3, 65535
ret i32 %4
}
/* Variables and functions */
void *memchr(const void *src, int c, size_t len) {
  const char *s = src;
  while (len--) {
    if (*s == c)
      return (void *)s;
    s++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     115e <memchr+0x5e>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    114d <memchr+0x4d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <memchr+0x66>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1117 <memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     1124 <memchr+0x24>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
movsbl (%rax),%ecx
cmp    %esi,%ecx
je     1126 <memchr+0x26>
add    $0xffffffffffffffff,%rdx
add    $0x1,%rax
test   %rdx,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %12
%6 = phi i64 [ %8, %12 ], [ %2, %3 ]
%7 = phi i8* [ %13, %12 ], [ %0, %3 ]
%8 = add i64 %6, -1
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, %1
br i1 %11, label %15, label %12
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = icmp eq i64 %8, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %12, %3
%16 = phi i8* [ null, %3 ], [ null, %12 ], [ %7, %5 ]
ret i8* %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxpat1c(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x38));
}


x86 assembly (clang, -O0):
<write_pxpat1c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%esi
add    %rax,%rsi
add    $0x38,%rsi
call   1030 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pxpat1c>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010038,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxpat1c(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 56
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxpat1c(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 56
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
struct graph *adjacencyMatrix(int, int);
int /*<<< orphan*/ printGraph(struct graph *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int v, e;
  printf("Enter number of vertices and edges in the graph : ");
  scanf("%d%d", &v, &e);
  struct graph *g = adjacencyMatrix(v, e);
  printGraph(g);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <adjacencyMatrix@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <printGraph@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <adjacencyMatrix@plt>
mov    %rax,%rdi
call   1060 <printGraph@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.graph = type { i32 }
@.str = [51 x i8] c"Enter number of vertices and edges in the graph : \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.graph*
%4 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call %struct.graph* @adjacencyMatrix(i32 %6, i32 %7)
store %struct.graph* %8, %struct.graph** %3
%9 = load %struct.graph*, %struct.graph** %3
%10 = call i32 @printGraph(%struct.graph* %9)
ret i32 0
}

LLVM IR (-O2):
%struct.graph = type { i32 }
@.str = [51 x i8] c"Enter number of vertices and edges in the graph : \00"
@.str.1 = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call %struct.graph* @adjacencyMatrix(i32 %7, i32 %8)
%10 = call i32 @printGraph(%struct.graph* %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void progress_end(void) { printf("\n"); }


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

x86 assembly (clang, -O2):
<progress_end>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @progress_end() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
int csqr(int arg) { return arg * arg; }


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

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

LLVM IR (-O0):
define i32 @csqr(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 @csqr(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12_MAC_DATA;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_MAC_DATA_it;
int i2d_PKCS12_MAC_DATA(PKCS12_MAC_DATA *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS12_MAC_DATA_it);
}


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

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

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

LLVM IR (-O2):
@PKCS12_MAC_DATA_it = global i32 0
define i32 @i2d_PKCS12_MAC_DATA(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS12_MAC_DATA_it)
ret i32 %3
}