xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  char a;
  int b = 0;
  for (b; b < 257; b++) {
    a = b;
    printf("%d - %c\n", b, a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x101,-0xc(%rbp)
jge    115a <main+0x4a>
mov    -0xc(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebd(%rip),%rdi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
movsbl %bl,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x101,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d - %c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i8 signext %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 257
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
char *secure_getenv(char const *);
char *__wrap_secure_getenv(const char *name) { return secure_getenv(name); }


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

x86 assembly (clang, -O2):
<__wrap_secure_getenv>:
jmp    1030 <secure_getenv@plt>

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

LLVM IR (-O2):
define i8* @__wrap_secure_getenv(i8* %0) {
%2 = tail call i8* @secure_getenv(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int m_entry_nr1(void) {
  int res = 1;
  printf("\n>> Called m_entry_nr1\n");
  res = 0;
  return res;
}


x86 assembly (clang, -O0):
<m_entry_nr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_entry_nr1>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [23 x i8] c"\0A>> Called m_entry_nr1\00"
define i32 @m_entry_nr1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void VP8EncDspInitMIPS32(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8EncDspInitMIPS32() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushinteger16array_(char *x, unsigned int *n) { pushNarray(x, (*n * 16)); }


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

x86 assembly (clang, -O2):
<pushinteger16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushinteger16array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 16
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushinteger16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *default_realloc(void *buf, size_t size) { return realloc(buf, size); }


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

x86 assembly (clang, -O2):
<default_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @default_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @default_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
float sq_perimeter_side(float);
float sqrt(float);
float sq_perimeter_area(float area) {
  float side = sqrt(area);
  float perimeter = sq_perimeter_side(side);
  return perimeter;
}


x86 assembly (clang, -O0):
<sq_perimeter_area>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <sq_perimeter_side@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq_perimeter_area>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1131 <sq_perimeter_area+0x11>
sqrtss %xmm0,%xmm0
jmp    1030 <sq_perimeter_side@plt>
push   %rax
call   1040 <sqrt@plt>
add    $0x8,%rsp
jmp    1030 <sq_perimeter_side@plt>

LLVM IR (-O0):
define float @sq_perimeter_area(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @sqrt(float %5)
store float %6, float* %3
%7 = load float, float* %3
%8 = call float @sq_perimeter_side(float %7)
store float %8, float* %4
%9 = load float, float* %4
ret float %9
}

LLVM IR (-O2):
define float @sq_perimeter_area(float %0) {
%2 = tail call float @sqrt(float %0)
%3 = tail call float @sq_perimeter_side(float %2)
ret float %3
}
__attribute__((no_icf)) _Bool f1(char *s) {
  return __builtin_strstr(s, "hello") == s;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define zeroext i1 @f1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strstr(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = icmp eq i8* %4, %5
ret i1 %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define zeroext i1 @f1(i8* nocapture %0) {
%2 = tail call i32 @strncmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5)
%3 = icmp eq i32 %2, 0
ret i1 %3
}
/* Variables and functions */
size_t StringArray_getLength(char const **);
char **realloc(char const **, int);
const char **StringArray_add(const char **array, const char *string) {
  size_t length = StringArray_getLength(array);
  array = realloc(array, sizeof(const char *) * (length + 2));
  array[length] = string;
  array[length + 1] = NULL;
  return array;
}


x86 assembly (clang, -O0):
<StringArray_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <StringArray_getLength@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
add    $0x2,%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movq   $0x0,0x8(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringArray_add>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <StringArray_getLength@plt>
mov    %rax,%rbx
lea    0x10(,%rax,8),%esi
mov    %r15,%rdi
call   1040 <realloc@plt>
mov    %r14,(%rax,%rbx,8)
movq   $0x0,0x8(%rax,%rbx,8)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8** @StringArray_add(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i64
store i8** %0, i8*** %3
store i8* %1, i8** %4
%6 = load i8**, i8*** %3
%7 = call i64 @StringArray_getLength(i8** %6)
store i64 %7, i64* %5
%8 = load i8**, i8*** %3
%9 = load i64, i64* %5
%10 = add i64 %9, 2
%11 = mul i64 8, %10
%12 = trunc i64 %11 to i32
%13 = call i8** @realloc(i8** %8, i32 %12)
store i8** %13, i8*** %3
%14 = load i8*, i8** %4
%15 = load i8**, i8*** %3
%16 = load i64, i64* %5
%17 = getelementptr inbounds i8*, i8** %15, i64 %16
store i8* %14, i8** %17
%18 = load i8**, i8*** %3
%19 = load i64, i64* %5
%20 = add i64 %19, 1
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
store i8* null, i8** %21
%22 = load i8**, i8*** %3
ret i8** %22
}

LLVM IR (-O2):
define i8** @StringArray_add(i8** %0, i8* %1) {
%3 = tail call i64 @StringArray_getLength(i8** %0)
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 3
%6 = add i32 %5, 16
%7 = tail call i8** @realloc(i8** %0, i32 %6)
%8 = getelementptr inbounds i8*, i8** %7, i64 %3
store i8* %1, i8** %8
%9 = add i64 %3, 1
%10 = getelementptr inbounds i8*, i8** %7, i64 %9
store i8* null, i8** %10
ret i8** %7
}
void ble_rsp_attclient_execute_write(
    const struct ble_msg_attclient_execute_write_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_attclient_execute_write_rsp_t = type opaque
define void @ble_rsp_attclient_execute_write(%struct.ble_msg_attclient_execute_write_rsp_t* nocapture %0) {
ret void
}
unsigned short f(unsigned short val) { return val; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @f(i16 returned zeroext %0) {
ret i16 %0
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int dfs(struct TreeNode *, int /*<<< orphan*/);
int sumNumbers(struct TreeNode *root) {
  if (root == NULL) {
    return 0;
  }
  return dfs(root, 0);
}


x86 assembly (clang, -O0):
<sumNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <sumNumbers+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1141 <sumNumbers+0x31>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <dfs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumNumbers>:
test   %rdi,%rdi
je     111c <sumNumbers+0xc>
xor    %esi,%esi
jmp    1030 <dfs@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca %struct.TreeNode*
store %struct.TreeNode* %0, %struct.TreeNode** %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %3
%5 = icmp eq %struct.TreeNode* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load %struct.TreeNode*, %struct.TreeNode** %3
%9 = call i32 @dfs(%struct.TreeNode* %8, i32 0)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = icmp eq %struct.TreeNode* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @dfs(%struct.TreeNode* %0, i32 0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Type definitions */
struct esh_shell {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
bool init_plugin(struct esh_shell *shell) {
  printf("Plugin 'cd' initialized...\n");
  return true;
}


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

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

LLVM IR (-O0):
%struct.esh_shell = type { i32 }
@.str = [28 x i8] c"Plugin 'cd' initialized...\0A\00"
define i32 @init_plugin(%struct.esh_shell* %0) {
%2 = alloca %struct.esh_shell*
store %struct.esh_shell* %0, %struct.esh_shell** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.esh_shell = type { i32 }
@str = [27 x i8] c"Plugin 'cd' initialized...\00"
define i32 @init_plugin(%struct.esh_shell* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int memcmp(char *, char *, int);
extern int bcmp(char *a, char *b, int c) { return memcmp(a, b, c); }


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

x86 assembly (clang, -O2):
<bcmp>:
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @bcmp(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
char octchar(int x) { return '0' + (x & 7); }


x86 assembly (clang, -O0):
<octchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7,%eax
add    $0x30,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<octchar>:
and    $0x7,%dil
lea    0x30(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @octchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 7
%5 = add nsw i32 48, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @octchar(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = and i8 %2, 7
%4 = or i8 %3, 48
ret i8 %4
}
int read_data_dht() {}


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

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

LLVM IR (-O0):
define i32 @read_data_dht() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @read_data_dht() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int hea_test_u64_bit(int /*<<< orphan*/ const, int);
int hea_cq_aer_inv_class_access_err_check(const __u64 *aer) {
  return hea_test_u64_bit(*aer, 37);
}


x86 assembly (clang, -O0):
<hea_cq_aer_inv_class_access_err_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x25,%esi
call   1030 <hea_test_u64_bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hea_cq_aer_inv_class_access_err_check>:
mov    (%rdi),%edi
mov    $0x25,%esi
jmp    1030 <hea_test_u64_bit@plt>

LLVM IR (-O0):
define i32 @hea_cq_aer_inv_class_access_err_check(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @hea_test_u64_bit(i32 %4, i32 37)
ret i32 %5
}

LLVM IR (-O2):
define i32 @hea_cq_aer_inv_class_access_err_check(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @hea_test_u64_bit(i32 %2, i32 37)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_add_atRi(FILE *stream, unsigned char i) {
  fprintf(stream, "ADD   A, @R%X                    ", i);
}


x86 assembly (clang, -O0):
<fprint_add_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_add_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ADD A, @R%X \00"
define void @fprint_add_atRi(i32* %0, i8 zeroext %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 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ADD A, @R%X \00"
define void @fprint_add_atRi(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ erase();
int curs_erase(int mode) {
  if (mode)
    clear();
  else
    erase();
}


x86 assembly (clang, -O0):
<curs_erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1141 <curs_erase+0x21>
mov    $0x0,%al
call   1040 <clear@plt>
jmp    1148 <curs_erase+0x28>
mov    $0x0,%al
call   1030 <erase@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_erase>:
push   %rax
xor    %eax,%eax
test   %edi,%edi
je     112e <curs_erase+0xe>
call   1040 <clear@plt>
pop    %rcx
ret
call   1030 <erase@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @curs_erase(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @clear()
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @erase()
br label %7
7: ; preds = %5, %3
ret i32 undef
}
void A(int x, int y) {
  x = 10 * y;
  y = x + 20;
}


x86 assembly (clang, -O0):
<A>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @A(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 = mul nsw i32 10, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 20
store i32 %8, i32* %4
ret void
}

LLVM IR (-O2):
define void @A(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int32_t L_deposit_h(int16_t var1) {
  int32_t L_var_out;
  L_var_out = (int32_t)var1 << 16;
  return (L_var_out);
}


x86 assembly (clang, -O0):
<L_deposit_h>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<L_deposit_h>:
mov    %rdi,%rax
shl    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @L_deposit_h(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = shl i32 %5, 16
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @L_deposit_h(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = shl i32 %2, 16
ret i32 %3
}
void wifi_evt_system_state(const struct wifi_msg_system_state_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_system_state_evt_t = type opaque
define void @wifi_evt_system_state(%struct.wifi_msg_system_state_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main();
void _start() {
  int ex = main();
  exit(ex);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <main@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %eax,%eax
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = alloca i32
%2 = call i32 (...) @main()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @main()
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t rgbTo16(uint8_t r, uint8_t g, uint8_t b) {
  return (((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3));
}


x86 assembly (clang, -O0):
<rgbTo16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
shl    $0xb,%eax
mov    -0x8(%rbp),%ecx
sar    $0x2,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgbTo16>:
and    $0xfffffff8,%edi
shl    $0x8,%edi
lea    0x0(,%rsi,8),%eax
and    $0xffffffe0,%eax
or     %edi,%eax
sar    $0x3,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rgbTo16(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 = ashr i32 %7, 3
%9 = shl i32 %8, 11
%10 = load i32, i32* %5
%11 = ashr i32 %10, 2
%12 = shl i32 %11, 5
%13 = or i32 %9, %12
%14 = load i32, i32* %6
%15 = ashr i32 %14, 3
%16 = or i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @rgbTo16(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 8
%5 = and i32 %4, -2048
%6 = shl i32 %1, 3
%7 = and i32 %6, -32
%8 = or i32 %7, %5
%9 = ashr i32 %2, 3
%10 = or i32 %8, %9
ret i32 %10
}
/* Variables and functions */
int fun(char *, char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  char a[] = "this", b[] = "that";
  printf("%d", fun(a, b));
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeae(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xea9(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1030 <fun@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x0,0x14(%rsp)
movl   $0x73696874,0x10(%rsp)
73
movb   $0x0,0xc(%rsp)
movl   $0x74616874,0x8(%rsp)
74
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <fun@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x i8] c"this\00"
@__const.main.b = [5 x i8] c"that\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i8]* %2 to i8*
%5 = bitcast [5 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%8 = call i32 @fun(i8* %6, i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i8] c"this\00"
@__const.main.b = [5 x i8] c"that\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @fun(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef float *__m128;

/* Variables and functions */
float __attribute__((__always___, __nodebug__)) _mm_cvtss_f32(__m128 a) {
  return a[0];
}


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

x86 assembly (clang, -O2):
<_mm_cvtss_f32>:
movss  (%rdi),%xmm0
ret

LLVM IR (-O0):
define float @_mm_cvtss_f32(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @_mm_cvtss_f32(float* nocapture %0) {
%2 = load float, float* %0
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned int f9(unsigned int x, unsigned int y) {
  unsigned int r = x - y;
  if (r > y)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    113a <f9+0x2a>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9>:
push   %rbx
mov    %edi,%ebx
sub    %esi,%ebx
cmp    %esi,%ebx
jbe    1120 <f9+0x10>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f9(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 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp ugt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f9(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
%4 = icmp ugt i32 %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void XSetWindowBackgroundPixmap() {}


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

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

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

LLVM IR (-O2):
define void @XSetWindowBackgroundPixmap() {
ret void
}
void writeToPin(int pinNumber, int value) { return; }


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

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

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

LLVM IR (-O2):
define void @writeToPin(i32 %0, i32 %1) {
ret void
}
double f(double x) { return (1. / (1. + x)); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xee2(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  0xef8(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 1.000000e+00, %3
%5 = fdiv double 1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fdiv double 1.000000e+00, %2
ret double %3
}
int gl_svga_dummy_function(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @gl_svga_dummy_function() {
ret i32 0
}

LLVM IR (-O2):
define i32 @gl_svga_dummy_function() {
ret i32 0
}
I0R1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if (22 <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0R1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzwl -0x8(%rbp),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     113c <I0R1+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <I0R1+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0R1>:
and    $0xfffe,%esi
xor    %eax,%eax
cmp    $0x16,%esi
setae  %al
ret

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

LLVM IR (-O2):
define i32 @I0R1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = and i32 %1, 65534
%8 = icmp ugt i32 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x61() {
  Assert_real((isdigit(97) == 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_isdigit.c",
              490, ("isdigit should be 0 for a"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x61>:
push   %rax
mov    $0x61,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1ea,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for a\00"
define void @t_isdigit_0x61() {
%1 = call i64 @isdigit(i32 97)
%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 490, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for a\00"
define void @t_isdigit_0x61() {
%1 = tail call i64 @isdigit(i32 97)
%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 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xab() {
  Assert_real((ispunct(171) == 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_ispunct.c",
              860, ("ispunct should be 0 for 0xab"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xab>:
push   %rax
mov    $0xab,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x35c,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xab\00"
define void @t_ispunct_0xab() {
%1 = call i64 @ispunct(i32 171)
%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 860, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xab\00"
define void @t_ispunct_0xab() {
%1 = tail call i64 @ispunct(i32 171)
%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 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char const *);
void ft_putendl(char const *s) {
  if (s) {
    ft_putstr(s);
    ft_putchar('\n');
  }
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114a <ft_putendl+0x2a>
mov    -0x8(%rbp),%rdi
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putendl>:
test   %rdi,%rdi
je     1136 <ft_putendl+0x16>
push   %rax
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>
ret

LLVM IR (-O0):
define void @ft_putendl(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 %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @ft_putstr(i8* %6)
%8 = call i32 @ft_putchar(i8 signext 10)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @ft_putendl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @ft_putstr(i8* %0)
%5 = tail call i32 @ft_putchar(i8 signext 10)
br label %6
6: ; preds = %3, %1
ret void
}
void ti_(int *const ia, int *const ni, int *const i) {

  int j;
  *i = 0;
  for (j = 0; j < *ni; j++)
    *i = *i + ia[j];
}


x86 assembly (clang, -O0):
<ti_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1155 <ti_+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rdx
add    (%rax,%rdx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1121 <ti_+0x21>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_>:
movl   $0x0,(%rdx)
cmpl   $0x0,(%rsi)
jle    1123 <ti_+0x23>
xor    %r8d,%r8d
xor    %ecx,%ecx
add    (%rdi,%rcx,4),%r8d
mov    %r8d,(%rdx)
add    $0x1,%rcx
movslq (%rsi),%rax
cmp    %rax,%rcx
jl     1110 <ti_+0x10>
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ IntRegister(int, void (*)());
void SysTickIntRegister(void (*pfnHandler)(void)) {
  IntRegister(15, pfnHandler);
  (*((volatile uint32_t *)(0xE000E010))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<SysTickIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xf,%edi
call   1030 <IntRegister@plt>
mov    $0xe000e010,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0xe000e010,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTickIntRegister>:
push   %rax
mov    %rdi,%rsi
mov    $0xf,%edi
call   1030 <IntRegister@plt>
mov    $0xe000e010,%eax
orl    $0x2,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @SysTickIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @IntRegister(i32 15, void (...)* %4)
%6 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%7 = or i32 %6, 2
store volatile i32 %7, i32* inttoptr (i64 3758153744 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysTickIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @IntRegister(i32 15, void (...)* %2)
%4 = load volatile i32, i32* inttoptr (i64 3758153744 to i32*)
%5 = or i32 %4, 2
store volatile i32 %5, i32* inttoptr (i64 3758153744 to i32*)
ret void
}
long int __get_child_max(void) { return -1; }


x86 assembly (clang, -O0):
<__get_child_max>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_child_max>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @__get_child_max() {
ret i64 -1
}

LLVM IR (-O2):
define i64 @__get_child_max() {
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ sm3_update(void *, void const *, size_t);
void sph_sm3(void *cc, const void *data, size_t len) {
  sm3_update(cc, data, len);
}


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

x86 assembly (clang, -O2):
<sph_sm3>:
jmp    1030 <sm3_update@plt>

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

LLVM IR (-O2):
define void @sph_sm3(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @sm3_update(i8* %0, i8* %1, i64 %2)
ret void
}
void clean(char *p) {
  while (*p) {
    if ((*p == '/') || (*p == '.') || (*p == '\\') || (*p == '-'))
      *p = '_';
    p++;
  }
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116d <clean+0x6d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1155 <clean+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1155 <clean+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1155 <clean+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    115c <clean+0x5c>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <clean+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean>:
movabs $0x800000000007,%rax
jmp    1124 <clean+0x24>
nopl   0x0(%rax)
test   %cl,%cl
je     113d <clean+0x3d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdi
movzbl (%rdi),%ecx
lea    -0x2d(%rcx),%edx
cmp    $0x2f,%dl
ja     1110 <clean+0x10>
movzbl %dl,%edx
bt     %rdx,%rax
jae    1110 <clean+0x10>
movb   $0x5f,(%rdi)
jmp    1120 <clean+0x20>
ret

LLVM IR (-O0):
define void @clean(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %29, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %32
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %27, label %12
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 46
br i1 %16, label %27, label %17
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 92
br i1 %21, label %27, label %22
22: ; preds = %17
%23 = load i8*, i8** %2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 45
br i1 %26, label %27, label %29
27: ; preds = %22, %17, %12, %7
%28 = load i8*, i8** %2
store i8 95, i8* %28
br label %29
29: ; preds = %27, %22
%30 = load i8*, i8** %2
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %2
br label %3
32: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @clean(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 47, label %5
i8 46, label %5
i8 92, label %5
i8 45, label %5
]
5: ; preds = %2, %2, %2, %2
store i8 95, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
void shr1(const char *s) {}


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

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

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

LLVM IR (-O2):
define void @shr1(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void *keep_alive(void *args) {
  while (1) {
    sleep(30);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<keep_alive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1e,%edi
call   1030 <sleep@plt>
jmp    111c <keep_alive+0xc>

x86 assembly (clang, -O2):
<keep_alive>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1e,%edi
call   1030 <sleep@plt>
jmp    1120 <keep_alive+0x10>

LLVM IR (-O0):
define i8* @keep_alive(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @sleep(i32 30)
br label %3
}

LLVM IR (-O2):
define noalias i8* @keep_alive(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 30)
br label %2
}