xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *MStringCopy(char *s) {
  char *res;
  if (s == NULL)
    return NULL;
  else {
    res = (char *)malloc((strlen(s) + 1) * sizeof(char));
    strcpy(res, s);
    return res;
  }
}


x86 assembly (clang, -O0):
<MStringCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <MStringCopy+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1186 <MStringCopy+0x56>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MStringCopy>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1159 <MStringCopy+0x29>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115c <MStringCopy+0x2c>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @MStringCopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %21
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 1
%14 = trunc i64 %13 to i32
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %4
%17 = load i8*, i8** %4
%18 = load i8*, i8** %3
%19 = call i32 @strcpy(i8* %17, i8* %18)
%20 = load i8*, i8** %4
store i8* %20, i8** %2
br label %21
21: ; preds = %8, %7
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @MStringCopy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ logicTest();
int /*<<< orphan*/ mathTest();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("MAIN Begins!\n");
  mathTest();
  logicTest();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <mathTest@plt>
mov    $0x0,%al
call   1040 <logicTest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <mathTest@plt>
xor    %eax,%eax
call   1040 <logicTest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"MAIN Begins!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @mathTest()
%4 = call i32 (...) @logicTest()
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"MAIN Begins!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @mathTest()
%3 = tail call i32 (...) @logicTest()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int my_strlen(char const *);
int /*<<< orphan*/ xwrite(int /*<<< orphan*/, char const *, int);
void print_error(const char *msg) {
  xwrite(STDERR_FILENO, "minishell: ", 11);
  xwrite(STDERR_FILENO, msg, my_strlen(msg));
  xwrite(STDERR_FILENO, "\n", 1);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0xb,%edx
call   1040 <xwrite@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    0xe8b(%rip),%rsi
mov    $0x1,%edx
call   1040 <xwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
mov    $0xb,%edx
call   1040 <xwrite@plt>
mov    (%r14),%ebp
mov    %rbx,%rdi
call   1030 <my_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    (%r14),%edi
lea    0xea9(%rip),%rsi
mov    $0x1,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <xwrite@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
@.str = [12 x i8] c"minishell: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDERR_FILENO
%4 = call i32 @xwrite(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%5 = load i32, i32* @STDERR_FILENO
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @my_strlen(i8* %7)
%9 = call i32 @xwrite(i32 %5, i8* %6, i32 %8)
%10 = load i32, i32* @STDERR_FILENO
%11 = call i32 @xwrite(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
@.str = [12 x i8] c"minishell: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_error(i8* %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @xwrite(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%4 = load i32, i32* @STDERR_FILENO
%5 = tail call i32 @my_strlen(i8* %0)
%6 = tail call i32 @xwrite(i32 %4, i8* %0, i32 %5)
%7 = load i32, i32* @STDERR_FILENO
%8 = tail call i32 @xwrite(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_SIG;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_SIG_it;
X509_SIG *X509_SIG_new(void) { return (X509_SIG *)ASN1_item_new(&X509_SIG_it); }


x86 assembly (clang, -O0):
<X509_SIG_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_SIG_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_SIG_it = global i32 0
define i32* @X509_SIG_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_SIG_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_SIG_it = global i32 0
define i32* @X509_SIG_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_SIG_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void writelines(char *lineptr[], int from, int to) {
  int i;
  for (i = from; i < to; i++)
    printf("%s\n", lineptr[i]);
}


x86 assembly (clang, -O0):
<writelines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115a <writelines+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <writelines+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writelines>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1155 <writelines+0x45>
mov    %edx,%r15d
movslq %esi,%rax
lea    (%rdi,%rax,8),%r12
sub    %esi,%r15d
xor    %ebx,%ebx
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1140 <writelines+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @writelines(i8** nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = sext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = add nsw i64 %8, 1
%13 = trunc i64 %12 to i32
%14 = icmp eq i32 %13, %2
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
void unlock(pthread_mutex_t *lock) {}


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

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

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

LLVM IR (-O2):
define void @unlock(i32* nocapture %0) {
ret void
}
extern __attribute__((__gnu___)) float __attribute__((__const__))
crealf(float _Complex _Z) {
  return __real__ _Z;
}


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

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

LLVM IR (-O0):
define float @crealf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
%4 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @crealf(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 0
ret float %2
}
int test_imm_E1uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xE1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E1uint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0xe1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E1uint64_lowword_mem>:
testb  $0xe1,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E1uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 225
%6 = icmp ne i64 %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_E1uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 225
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ af_sa_len(struct sockaddr const *);
socklen_t af_sas_len(const struct sockaddr_storage *sas) {
  return (af_sa_len((const struct sockaddr *)sas));
}


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

x86 assembly (clang, -O2):
<af_sas_len>:
jmp    1030 <af_sa_len@plt>

LLVM IR (-O0):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @af_sas_len(%struct.sockaddr_storage* %0) {
%2 = alloca %struct.sockaddr_storage*
store %struct.sockaddr_storage* %0, %struct.sockaddr_storage** %2
%3 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %2
%4 = bitcast %struct.sockaddr_storage* %3 to %struct.sockaddr*
%5 = call i32 @af_sa_len(%struct.sockaddr* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @af_sas_len(%struct.sockaddr_storage* %0) {
%2 = bitcast %struct.sockaddr_storage* %0 to %struct.sockaddr*
%3 = tail call i32 @af_sa_len(%struct.sockaddr* %2)
ret i32 %3
}
/* Variables and functions */
int basecmp(char *, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int strcmpi(char *s1, char *s2) { return basecmp(s1, s2, 0, 0); }


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

x86 assembly (clang, -O2):
<strcmpi>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <basecmp@plt>

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

LLVM IR (-O2):
define i32 @strcmpi(i8* %0, i8* %1) {
%3 = tail call i32 @basecmp(i8* %0, i8* %1, i32 0, i32 0)
ret i32 %3
}
/* Type definitions */
struct cart {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _cartVarDbName(char *, char *);
int /*<<< orphan*/ cartSetInt(struct cart *, int /*<<< orphan*/, int);
void cartSetIntDb(struct cart *cart, char *db, char *var, int val) {
  cartSetInt(cart, _cartVarDbName(db, var), val);
}


x86 assembly (clang, -O0):
<cartSetIntDb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <_cartVarDbName@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
call   1030 <cartSetInt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cartSetIntDb>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <_cartVarDbName@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <cartSetInt@plt>

LLVM IR (-O0):
%struct.cart = type { i32 }
define void @cartSetIntDb(%struct.cart* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.cart*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.cart* %0, %struct.cart** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.cart*, %struct.cart** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @_cartVarDbName(i8* %10, i8* %11)
%13 = load i32, i32* %8
%14 = call i32 @cartSetInt(%struct.cart* %9, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.cart = type { i32 }
define void @cartSetIntDb(%struct.cart* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @_cartVarDbName(i8* %1, i8* %2)
%6 = tail call i32 @cartSetInt(%struct.cart* %0, i32 %5, i32 %3)
ret void
}
int main() {
  int i;
  int j;
  j = 0;
  i = 0;
  while (i <= j) {
    if (j - i < 1) {
      j = j + 2;
    }
    i = i + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     114b <main+0x4b>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x1,%eax
jge    113d <main+0x3d>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
scalar_t__ foo();
int huft_build(unsigned *b) {
  int k;
  for (k = 0; k <= 10; k++)
    if (foo())
      ;
}


x86 assembly (clang, -O0):
<huft_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     1156 <huft_build+0x46>
mov    $0x0,%al
call   1030 <foo@plt>
cmp    $0x0,%rax
je     1143 <huft_build+0x33>
jmp    1143 <huft_build+0x33>
jmp    1148 <huft_build+0x38>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <huft_build+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<huft_build>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @huft_build(i32* nocapture readnone %0) {
%2 = tail call i64 (...) @foo()
%3 = tail call i64 (...) @foo()
%4 = tail call i64 (...) @foo()
%5 = tail call i64 (...) @foo()
%6 = tail call i64 (...) @foo()
%7 = tail call i64 (...) @foo()
%8 = tail call i64 (...) @foo()
%9 = tail call i64 (...) @foo()
%10 = tail call i64 (...) @foo()
%11 = tail call i64 (...) @foo()
%12 = tail call i64 (...) @foo()
ret i32 undef
}
void emit_type_definition_ordering(
    struct processor_explicatory_state *process_state,
    struct modern_stream *stream, void *stream_state,
    struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_type_definition_ordering>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_ordering(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_ordering(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SHT2x_GetTempPoll(float *);
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char const *argv[]) {
  float a = 25;
  SHT2x_GetTempPoll(&a);
  printf("%f\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <SHT2x_GetTempPoll@plt>
movss  -0x14(%rbp),%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x41c80000,0x4(%rsp)
41
lea    0x4(%rsp),%rdi
call   1040 <SHT2x_GetTempPoll@plt>
movss  0x4(%rsp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 2.500000e+01, float* %6
%7 = call i32 @SHT2x_GetTempPoll(float* %6)
%8 = load float, float* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 2.500000e+01, float* %3
%5 = call i32 @SHT2x_GetTempPoll(float* %3)
%6 = load float, float* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void fmt_devname(char *name, int num) {
  if (num >= 0)
    sprintf(name, "md%d", num);
  else
    sprintf(name, "md_d%d", -1 - num);
}


x86 assembly (clang, -O0):
<fmt_devname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1141 <fmt_devname+0x31>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
jmp    1159 <fmt_devname+0x49>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%edx
sub    -0xc(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_devname>:
mov    %esi,%edx
test   %esi,%esi
js     1122 <fmt_devname+0x12>
lea    0xee3(%rip),%rsi
jmp    1030 <sprintf@plt>
not    %edx
lea    0xeda(%rip),%rsi
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"md%d\00"
@.str.1 = [7 x i8] c"md_d%d\00"
define void @fmt_devname(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %9
6: ; preds = %2
%7 = xor i32 %1, -1
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xbd() {
  Assert_real((isupper(189) == 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_isupper.c",
              950, ("isupper should be 0 for 0xbd"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xbd>:
push   %rax
mov    $0xbd,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b6,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xbd\00"
define void @t_isupper_0xbd() {
%1 = call i64 @isupper(i32 189)
%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 950, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xbd\00"
define void @t_isupper_0xbd() {
%1 = tail call i64 @isupper(i32 189)
%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 950, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x2e() {
  Assert_real((isascii(46)),
              "/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_isascii.c",
              235, ("isascii should be 1 for ."));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x2e>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xeb,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for .\00"
define void @t_isascii_0x2e() {
%1 = call i32 @isascii(i32 46)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for .\00"
define void @t_isascii_0x2e() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_D7uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xD7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D7uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xd7,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_D7uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 215
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ newFct2(char *, int /*<<< orphan*/);
void newFct0(char *S) { newFct2(S, 0); }


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

x86 assembly (clang, -O2):
<newFct0>:
xor    %esi,%esi
jmp    1030 <newFct2@plt>

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

LLVM IR (-O2):
define void @newFct0(i8* %0) {
%2 = tail call i32 @newFct2(i8* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
__attribute((noreturn)) void fail(const char *msg) {
  printf("error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @fail(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void *doswap(void **target, void *val) {
  void *old = *target;
  *target = val;
  return old;
}


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

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

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

LLVM IR (-O2):
define i8* @doswap(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
store i8* %1, i8** %0
ret i8* %3
}
void ff_hevc_put_hevc_bi_qpel_v16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v16_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x89() {
  Assert_real((isxdigit(137) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              690, ("isxdigit should be 0 for 0x89"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x89\00"
define void @t_isxdigit_0x89() {
%1 = call i64 @isxdigit(i32 137)
%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 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x89\00"
define void @t_isxdigit_0x89() {
%1 = tail call i64 @isxdigit(i32 137)
%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 690, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RGB24ToARGBRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToARGBRow_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int /*<<< orphan*/);
void t_isdigit_0x00() {
  Assert_real((isdigit(0) == 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",
              5, ("isdigit should be 0 for 0x00"));
}


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

x86 assembly (clang, -O2):
push   %rax
xor    %edi,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec8(%rip),%rsi
lea    0xf69(%rip),%rcx
mov    $0x5,%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 = [29 x i8] c"isdigit should be 0 for 0x00\00"
define void @t_isdigit_0x00() {
%1 = call i64 @isdigit(i32 0)
%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 5, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x00\00"
define void @t_isdigit_0x00() {
%1 = tail call i64 @isdigit(i32 0)
%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 5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ pow(double, double);
void challenge_RI_pow(long long *a, long long *b, long long *res) {
  *res = (long long)pow((double)*a, (double)*b);
}


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

x86 assembly (clang, -O2):
<challenge_RI_pow>:
push   %rbx
mov    %rdx,%rbx
cvtsi2sdq (%rdi),%xmm0
cvtsi2sdq (%rsi),%xmm1
call   1030 <pow@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @challenge_RI_pow(i64* %0, i64* %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = load i64*, i64** %5
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call i64 @pow(double %9, double %12)
%14 = load i64*, i64** %6
store i64 %13, i64* %14
ret void
}

LLVM IR (-O2):
define void @challenge_RI_pow(i64* nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = load i64, i64* %0
%5 = sitofp i64 %4 to double
%6 = load i64, i64* %1
%7 = sitofp i64 %6 to double
%8 = tail call i64 @pow(double %5, double %7)
store i64 %8, i64* %2
ret void
}
/* Variables and functions */
int japi_menuitem(int, char *);
int j_menuitem(int arg0, char *arg1) { return (japi_menuitem(arg0, arg1)); }


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

x86 assembly (clang, -O2):
<j_menuitem>:
jmp    1030 <japi_menuitem@plt>

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

LLVM IR (-O2):
define i32 @j_menuitem(i32 %0, i8* %1) {
%3 = tail call i32 @japi_menuitem(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main(void) {
  unsigned int a[2];
  unsigned int b[2];
  unsigned int c[2];
#pragma acc kernels pcopyout(a, b, c)
  {
    a[0] = 0;
    b[0] = 1;
    c[0] = a[0];
  }
  if (a[0] != 0 || b[0] != 1 || c[0] != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1151 <main+0x41>
cmpl   $0x1,-0x14(%rbp)
jne    1151 <main+0x41>
cmpl   $0x0,-0x1c(%rbp)
je     1158 <main+0x48>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca [2 x i32]
%4 = alloca [2 x i32]
store i32 0, i32* %1
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 1, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %8, i32* %9
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %21, label %13
13: ; preds = %0
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%15 = load i32, i32* %14
%16 = icmp ne i32 %15, 1
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%19 = load i32, i32* %18
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17, %13, %0
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
long syscall(int, int, int, int, int *, int *);
long scallinfo(int scinum, int pid, int nreq, int *req, int *res) {
  return syscall(323, scinum, pid, nreq, req, res);
}


x86 assembly (clang, -O0):
<scallinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    $0x143,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scallinfo>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x143,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @scallinfo(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i64 @syscall(i32 323, i32 %11, i32 %12, i32 %13, i32* %14, i32* %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @scallinfo(i32 %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = tail call i64 @syscall(i32 323, i32 %0, i32 %1, i32 %2, i32* %3, i32* %4)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc11(int status, void *arg) {
  printf("Executing exitfunc11 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc11>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc11 (status=%d, arg=%d)\0A\00"
define void @exitfunc11(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc11 (status=%d, arg=%d)\0A\00"
define void @exitfunc11(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
__attribute__((weak)) void __hlt_globals_init(void *ctx) {}


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

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

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

LLVM IR (-O2):
define weak void @__hlt_globals_init(i8* %0) {
ret void
}
void allocateChanByRef(unsigned *c) { *c = 0x02; }


x86 assembly (clang, -O0):
<allocateChanByRef>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocateChanByRef>:
movl   $0x2,(%rdi)
ret

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

LLVM IR (-O2):
define void @allocateChanByRef(i32* nocapture writeonly %0) {
store i32 2, i32* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_laursys_witset(int dim) {
  int *b;
  double *c;
  int fail = _ada_use_c2phc4c(856, &dim, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_laursys_witset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x358,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_laursys_witset>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x358,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @copy_quaddobl_laursys_witset(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 856, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_laursys_witset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 856, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void mdv_check_sectormap(uint8_t *buf) { ; }


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

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

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

LLVM IR (-O2):
define void @mdv_check_sectormap(i32* nocapture %0) {
ret void
}