xunge/DecIR huggingface dataset:
int getNextString(char buf[62 * 5 + 3], int j) {
  while (buf[j++] != '\0')
    ;
  if (buf[j] == '#')
    return -1;
  return j;
}


x86 assembly (clang, -O0):
<getNextString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     112f <getNextString+0x2f>
jmp    110b <getNextString+0xb>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x23,%eax
jne    1150 <getNextString+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <getNextString+0x56>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNextString>:
mov    %esi,%eax
movslq %esi,%rcx
lea    (%rdi,%rcx,1),%rdx
shl    $0x20,%rcx
movabs $0x100000000,%rsi
nopw   0x0(%rax,%rax,1)
add    %rsi,%rcx
add    $0x1,%eax
cmpb   $0x0,(%rdx)
lea    0x1(%rdx),%rdx
jne    1120 <getNextString+0x20>
sar    $0x20,%rcx
cmpb   $0x23,(%rdi,%rcx,1)
mov    $0xffffffff,%ecx
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getNextString(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %6, %4 ], [ %3, %2 ]
%6 = add i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %5
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
%12 = shl i64 %6, 32
%13 = ashr exact i64 %12, 32
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 35
%17 = select i1 %16, i32 -1, i32 %11
ret i32 %17
}
double kdel(int i, int j) {
  int result;
  if (i == j) {
    result = 1.0;
  } else
    result = 0.0;
  return (result);
}


x86 assembly (clang, -O0):
<kdel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1122 <kdel+0x22>
movl   $0x1,-0xc(%rbp)
jmp    1129 <kdel+0x29>
movl   $0x0,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kdel>:
cmp    %esi,%edi
je     1108 <kdel+0x8>
xorps  %xmm0,%xmm0
ret
movsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @kdel(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 = icmp eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %5
br label %11
10: ; preds = %2
store i32 0, i32* %5
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @kdel(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, double 1.000000e+00, double 0.000000e+00
ret double %4
}
long long int possibleCharsDoubleString(long long int n) {
  if (n == 0) {
    return 0LL;
  }
  if (n & 1) {
    return n - 1;
  }
  return n;
}


x86 assembly (clang, -O0):
<possibleCharsDoubleString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <possibleCharsDoubleString+0x20>
movq   $0x0,-0x8(%rbp)
jmp    114b <possibleCharsDoubleString+0x4b>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1143 <possibleCharsDoubleString+0x43>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    114b <possibleCharsDoubleString+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<possibleCharsDoubleString>:
mov    %rdi,%rax
and    $0xfffffffffffffffe,%rax
ret

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

LLVM IR (-O2):
define i64 @possibleCharsDoubleString(i64 %0) {
%2 = and i64 %0, -2
ret i64 %2
}
int test_imm_03int8_reg(signed char val) {
  return ((val) & (0x03 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_03int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_03int8_reg>:
test   $0x3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_03int8_reg(i8 signext %0) {
%2 = and i8 %0, 3
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ strlen(char const *);
extern int strlenzero(const char *str) {
  if (str && strlen(str)) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<strlenzero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <strlenzero+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
je     1146 <strlenzero+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114d <strlenzero+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlenzero>:
test   %rdi,%rdi
je     110d <strlenzero+0xd>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
je     110d <strlenzero+0xd>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @strlenzero(i8* %0) {
%2 = alloca i32
%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 %11
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 0, i32* %2
br label %12
11: ; preds = %6, %1
store i32 1, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @strlenzero(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool CANRetryGet(uint32_t ui32Base) {
  ;
  if ((*((volatile uint32_t *)(ui32Base + 0x00000000))) & 0x00000020) {
    return (false);
  }
  return (true);
}


x86 assembly (clang, -O0):
<CANRetryGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1129 <CANRetryGet+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1130 <CANRetryGet+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANRetryGet>:
movslq %edi,%rcx
xor    %eax,%eax
testl  $0x20,(%rcx)
sete   %al
ret

LLVM IR (-O0):
define i32 @CANRetryGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 0
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, 32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @CANRetryGet(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = lshr i32 %4, 5
%6 = and i32 %5, 1
%7 = xor i32 %6, 1
ret i32 %7
}
void InsertB12(int x, unsigned char *buf) {
  buf[1] = x & 0xf;
  x >>= 4;
  buf[0] = x & 0xff;
}


x86 assembly (clang, -O0):
<InsertB12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InsertB12>:
mov    %edi,%eax
and    $0xf,%al
mov    %al,0x1(%rsi)
shr    $0x4,%edi
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @InsertB12(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 = and i32 %5, 15
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 4
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 0
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @InsertB12(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
%4 = and i8 %3, 15
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %5
%6 = lshr i32 %0, 4
%7 = trunc i32 %6 to i8
store i8 %7, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shfree(void *ptr) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shfree(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ load_all_messages();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ sh_loop();
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  setbuf(stdout, NULL);
  load_all_messages();
  printf("Welcome to the chat logs.\nType \"help\" for a command listing.\n");
  sh_loop();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    $0x0,%al
call   1060 <load_all_messages@plt>
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <sh_loop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
xor    %eax,%eax
call   1060 <load_all_messages@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <sh_loop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [62 x i8] c"Welcome to the chat logs.\0AType \22help\22 for a command listing.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stdout
%6 = call i32 @setbuf(i32 %5, i32* null)
%7 = call i32 (...) @load_all_messages()
%8 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @sh_loop()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [61 x i8] c"Welcome to the chat logs.\0AType \22help\22 for a command listing.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @setbuf(i32 %3, i32* null)
%5 = tail call i32 (...) @load_all_messages()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (...) @sh_loop()
ret i32 0
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *indirectString(struct sqlConnection *, int, char *, char *);
char *genePixSliceType(struct sqlConnection *conn, int id) {
  return indirectString(conn, id, "sliceType", "name");
}


x86 assembly (clang, -O0):
<genePixSliceType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
lea    0xed6(%rip),%rcx
call   1030 <indirectString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genePixSliceType>:
lea    0xee9(%rip),%rdx
lea    0xeec(%rip),%rcx
jmp    1030 <indirectString@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"sliceType\00"
@.str.1 = [5 x i8] c"name\00"
define i8* @genePixSliceType(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @indirectString(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [10 x i8] c"sliceType\00"
@.str.1 = [5 x i8] c"name\00"
define i8* @genePixSliceType(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @indirectString(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i8* %3
}
double exparg(int l) {
  double lnb = .69314718055995;
  int m = (l == 0) ? +1024 : -1021 - 1;
  return m * lnb * .99999;
}


x86 assembly (clang, -O0):
<exparg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xfffffc02,%eax
mov    $0x400,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<exparg>:
test   %edi,%edi
mov    $0x400,%eax
mov    $0xfffffc02,%ecx
cmove  %eax,%ecx
cvtsi2sd %ecx,%xmm0
mulsd  0xee5(%rip),%xmm0
mulsd  0xee5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @exparg(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store i32 %0, i32* %2
store double 0x3FE62E42FEFA3A19, double* %3
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1024, i32 -1022
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = sitofp i32 %9 to double
%11 = load double, double* %3
%12 = fmul double %10, %11
%13 = fmul double %12, 9.999900e-01
ret double %13
}

LLVM IR (-O2):
define double @exparg(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1024, i32 -1022
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x3FE62E42FEFA3A19
%6 = fmul double %5, 9.999900e-01
ret double %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xerror;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xerror_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xerror.serial = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xerror_serial(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 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xerror_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *getprogname();
int /*<<< orphan*/ stderr;
void show_help() {
  fprintf(stderr, "%s:  [-d] source file\n", getprogname());
  fprintf(stderr, "\t-d: show debugging info\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<show_help>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%r14
mov    (%r14),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb4(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xeb5(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"%s: [-d] source file\0A\00"
@.str.1 = [26 x i8] c"\09-d: show debugging info\0A\00"
@EXIT_FAILURE = global i32 0
define void @show_help() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @stderr
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"%s: [-d] source file\0A\00"
@.str.1 = [26 x i8] c"\09-d: show debugging info\0A\00"
@EXIT_FAILURE = global i32 0
define void @show_help() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stderr;
void y(int x) { fprintf(stderr, "%c%d\n", 'y', x); }


x86 assembly (clang, -O0):
<y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
lea    0xed2(%rip),%rsi
mov    $0x79,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
mov    %edi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0x79,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @y(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 121, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @y(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 121, i32 %0)
ret void
}
unsigned xrop3_156_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_156_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_156_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x79() {
  Assert_real((isodigit(121) == 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_isodigit.c",
              610, ("isodigit should be 0 for y"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for y\00"
define void @t_isodigit_0x79() {
%1 = tail call i64 @isodigit(i32 121)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 610, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t linearSearch(const int array[], int key, size_t size) {
  size_t n;
  for (n = 0; n < size; ++n) {
    if (array[n] == key) {
      return n;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    115c <linearSearch+0x5c>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1146 <linearSearch+0x46>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <linearSearch+0x64>
jmp    114b <linearSearch+0x4b>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1117 <linearSearch+0x17>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
mov    $0xffffffffffffffff,%rax
test   %rdx,%rdx
je     111e <linearSearch+0x1e>
xor    %ecx,%ecx
xchg   %ax,%ax
cmp    %esi,(%rdi,%rcx,4)
je     111f <linearSearch+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <linearSearch+0x10>
ret
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @linearSearch(i32* nocapture %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %10
%6 = phi i64 [ %11, %10 ], [ 0, %3 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %1
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %10, %3
%14 = phi i64 [ -1, %3 ], [ -1, %10 ], [ %6, %5 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void got_libend(char *cp, int len) { printf("LIBEND\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"LIBEND\00"
define void @got_libend(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
void get_botref(cc1, cc) int *cc1, cc;
{
  int bb, ac;
  def_abs2conc(&bb, cc);
  if (bb == 0) {
    *cc1 = cc;
  } else {
    val_abs2conc(&ac, cc);
    last_a2c(cc1, ac);
  }
}


x86 assembly (clang, -O0):
<get_botref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <def_abs2conc@plt>
cmpl   $0x0,-0x10(%rbp)
jne    1165 <get_botref+0x35>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    1181 <get_botref+0x51>
mov    -0xc(%rbp),%esi
lea    -0x14(%rbp),%rdi
mov    $0x0,%al
call   1050 <val_abs2conc@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1040 <last_a2c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_botref>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1030 <def_abs2conc@plt>
cmpl   $0x0,0x4(%rsp)
je     1166 <get_botref+0x36>
mov    %rsp,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <val_abs2conc@plt>
mov    (%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <last_a2c@plt>
jmp    1168 <get_botref+0x38>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @get_botref(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @def_abs2conc to i32 (i32*, i32, ...)*)(i32* %3, i32 %1)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 %1, i32* %0
br label %15
11: ; preds = %2
%12 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_abs2conc to i32 (i32*, i32, ...)*)(i32* %4, i32 %1)
%13 = load i32, i32* %4
%14 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @last_a2c to i32 (i32*, i32, ...)*)(i32* %0, i32 %13)
br label %15
15: ; preds = %11, %10
ret void
}
const char *v4l2_fourcc_name(unsigned int fourcc) {
  static char name[5];
  unsigned int i;
  for (i = 0; i < 4; ++i) {
    name[i] = fourcc & 0xff;
    fourcc >>= 8;
  }
  name[4] = '\0';
  return name;
}


x86 assembly (clang, -O0):
<v4l2_fourcc_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jae    1148 <v4l2_fourcc_name+0x48>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
lea    0x2ef3(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <v4l2_fourcc_name+0xe>
movb   $0x0,0x2ed6(%rip)
lea    0x2ecb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l2_fourcc_name>:
mov    %edi,%ecx
mov    %cl,0x2f19(%rip)
lea    0x2f12(%rip),%rax
mov    %ch,0x2f0d(%rip)
mov    %edi,%edx
shr    $0x10,%edx
mov    %dl,0x2f03(%rip)
shr    $0x18,%ecx
mov    %cl,0x2efb(%rip)
movb   $0x0,0x2ef5(%rip)
ret

LLVM IR (-O0):
@v4l2_fourcc_name.name = internal global [5 x i8] zeroinitializer
define i8* @v4l2_fourcc_name(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %3
%6 = icmp ult i32 %5, 4
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 255
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds [5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 %12
store i8 %10, i8* %13
%14 = load i32, i32* %2
%15 = lshr i32 %14, 8
store i32 %15, i32* %2
br label %16
16: ; preds = %7
%17 = load i32, i32* %3
%18 = add i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
store i8 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 4)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 0)
}

LLVM IR (-O2):
@v4l2_fourcc_name.name = internal global [5 x i8] zeroinitializer
define i8* @v4l2_fourcc_name(i32 %0) {
%2 = trunc i32 %0 to i8
store i8 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 0)
%3 = lshr i32 %0, 8
%4 = trunc i32 %3 to i8
store i8 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 1)
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
store i8 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 2)
%7 = lshr i32 %0, 24
%8 = trunc i32 %7 to i8
store i8 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 4)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @v4l2_fourcc_name.name, i64 0, i64 0)
}
void gtk_list_store_move_before() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_move_before() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void editfree(void *ptr) { free((char *)ptr); }


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

LLVM IR (-O0):
define void @editfree(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 @editfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void rewriteConfigSentinelOption(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",
               118, "Function '%s' is disabled.", __func__);
}


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

x86 assembly (clang, -O2):
<rewriteConfigSentinelOption>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x76,%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__.rewriteConfigSentinelOption = [28 x i8] c"rewriteConfigSentinelOption\00"
define void @rewriteConfigSentinelOption() {
%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 118, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.rewriteConfigSentinelOption, 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__.rewriteConfigSentinelOption = [28 x i8] c"rewriteConfigSentinelOption\00"
define void @rewriteConfigSentinelOption() {
%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 118, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.rewriteConfigSentinelOption, i64 0, i64 0))
ret void
}
void g_log_set_fatal_mask() {}


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

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

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

LLVM IR (-O2):
define void @g_log_set_fatal_mask() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_write(unsigned int, char *);
void put_eth(unsigned int i) { file_write(i, "ethernet.resp"); }


x86 assembly (clang, -O0):
<put_eth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <file_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_eth>:
lea    0xee9(%rip),%rsi
jmp    1030 <file_write@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ethernet.resp\00"
define void @put_eth(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @file_write(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"ethernet.resp\00"
define void @put_eth(i32 %0) {
%2 = tail call i32 @file_write(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int bpf_detach_perf_event(uint32_t ev_type, uint32_t ev_config) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bpf_detach_perf_event(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void input(int a[], int size) {
  int i = 0;
  while (i < size) {
    scanf("%d", &a[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <input+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <input+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <input+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <input+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @input(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int quot;
  int rem;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
div_t div(int numer, int denom) {
  div_t result;
  result.quot = numer / denom;
  result.rem = numer - (result.quot * denom);
  return (result);
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x10(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i64 @div(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sdiv i32 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load i32, i32* %5
%14 = mul nsw i32 %12, %13
%15 = sub nsw i32 %10, %14
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i32 %15, i32* %16
%17 = bitcast %struct.TYPE_3__* %3 to i64*
%18 = load i64, i64* %17
ret i64 %18
}

LLVM IR (-O2):
define i64 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = mul nsw i32 %3, %1
%5 = srem i32 %0, %1
%6 = zext i32 %5 to i64
%7 = shl nuw i64 %6, 32
%8 = zext i32 %3 to i64
%9 = or i64 %7, %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ moveSpiderMotor(int);
void moveSpiderMotors(void) {
  int i;
  for (i = 1; i <= 18; i++)
    moveSpiderMotor(i);
}


x86 assembly (clang, -O0):
<moveSpiderMotors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x12,-0x4(%rbp)
jg     113f <moveSpiderMotors+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <moveSpiderMotor@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <moveSpiderMotors+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveSpiderMotors>:
push   %rax
mov    $0x1,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x2,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x3,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x4,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x5,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x6,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x7,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x8,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x9,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xa,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xb,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xc,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xd,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xe,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0xf,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x10,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x11,%edi
call   1030 <moveSpiderMotor@plt>
mov    $0x12,%edi
pop    %rax
jmp    1030 <moveSpiderMotor@plt>

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

LLVM IR (-O2):
define void @moveSpiderMotors() {
%1 = tail call i32 @moveSpiderMotor(i32 1)
%2 = tail call i32 @moveSpiderMotor(i32 2)
%3 = tail call i32 @moveSpiderMotor(i32 3)
%4 = tail call i32 @moveSpiderMotor(i32 4)
%5 = tail call i32 @moveSpiderMotor(i32 5)
%6 = tail call i32 @moveSpiderMotor(i32 6)
%7 = tail call i32 @moveSpiderMotor(i32 7)
%8 = tail call i32 @moveSpiderMotor(i32 8)
%9 = tail call i32 @moveSpiderMotor(i32 9)
%10 = tail call i32 @moveSpiderMotor(i32 10)
%11 = tail call i32 @moveSpiderMotor(i32 11)
%12 = tail call i32 @moveSpiderMotor(i32 12)
%13 = tail call i32 @moveSpiderMotor(i32 13)
%14 = tail call i32 @moveSpiderMotor(i32 14)
%15 = tail call i32 @moveSpiderMotor(i32 15)
%16 = tail call i32 @moveSpiderMotor(i32 16)
%17 = tail call i32 @moveSpiderMotor(i32 17)
%18 = tail call i32 @moveSpiderMotor(i32 18)
ret void
}