xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
int /*<<< orphan*/ loggerf(char *, unsigned long long);
void *util_calloc(size_t num, size_t size) {
  void *m;
  if ((m = calloc(num, size)) == NULL) {
    loggerf("ooops, not enough memory (%llu)", ((unsigned long long)(size)));
    abort();
  };
  return m;
}


x86 assembly (clang, -O0):
<util_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1172 <util_calloc+0x42>
mov    -0x10(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1050 <loggerf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_calloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <calloc@plt>
test   %rax,%rax
je     1140 <util_calloc+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1050 <loggerf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"ooops, not enough memory (%llu)\00"
define i8* @util_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @loggerf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [32 x i8] c"ooops, not enough memory (%llu)\00"
define noalias i8* @util_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @loggerf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %1)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
int test_isZero(int x) { return x == 0; }


x86 assembly (clang, -O0):
<test_isZero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isZero>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @test_isZero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @test_isZero(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int fb_FilePutData(int, long long, void *, unsigned int, int,
                   int /*<<< orphan*/);
int fb_FilePutLarge(int fnum, long long pos, void *value,
                    unsigned int valuelen) {
  return fb_FilePutData(fnum, pos, value, valuelen, 1, 0);
}


x86 assembly (clang, -O0):
<fb_FilePutLarge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <fb_FilePutData@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_FilePutLarge>:
mov    $0x1,%r8d
xor    %r9d,%r9d
jmp    1030 <fb_FilePutData@plt>

LLVM IR (-O0):
define i32 @fb_FilePutLarge(i32 %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @fb_FilePutData(i32 %9, i64 %10, i8* %11, i32 %12, i32 1, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @fb_FilePutLarge(i32 %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @fb_FilePutData(i32 %0, i64 %1, i8* %2, i32 %3, i32 1, i32 0)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(const void *ptr __attribute__((unused)),
              size_t size __attribute__((unused)),
              size_t nmemb __attribute__((unused)),
              FILE *stream __attribute__((unused))) {
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
ret i64 0
}

LLVM IR (-O2):
define i64 @fwrite(i8* nocapture readnone %0, i64 %1, i64 %2, i32* nocapture readnone %3) {
ret i64 0
}
/* Variables and functions */
unsigned char *aes256ecb_encrypt(unsigned char *, size_t *,
                                 unsigned char const *, size_t,
                                 unsigned char const *, unsigned char const *);
unsigned char *crypt_encrypt_aes256ecb(unsigned char *out, size_t *out_len,
                                       const unsigned char *in, size_t in_len,
                                       const unsigned char *nonce,
                                       const unsigned char *key) {
  return aes256ecb_encrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_encrypt_aes256ecb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <aes256ecb_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_encrypt_aes256ecb>:
jmp    1030 <aes256ecb_encrypt@plt>

LLVM IR (-O0):
define i8* @crypt_encrypt_aes256ecb(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @aes256ecb_encrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_encrypt_aes256ecb(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @aes256ecb_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print(char *name[], int n) {
  int i = 0;
  char *p;
  while (i < n) {
    p = *(name + i++);
    printf("%s\n", p);
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <print+0x51>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <print+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <printf@plt>
cmp    %rbx,%r12
jne    1130 <print+0x20>
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 @print(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %11, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %20
11: ; preds = %7
%12 = load i8**, i8*** %3
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8*, i8** %12, i64 %15
%17 = load i8*, i8** %16
store i8* %17, i8** %6
%18 = load i8*, i8** %6
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %7
20: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %8, %6 ]
%8 = add nuw nsw i64 %7, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %7
%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 = icmp eq i64 %8, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ kill(scalar_t__, int /*<<< orphan*/);
extern int singleton_validate_lock(pid_t locker) {
  if (locker == 0) {
    return 0;
  }
  if (kill(locker, 0) == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<singleton_validate_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <singleton_validate_lock+0x23>
movl   $0x0,-0x4(%rbp)
jmp    115b <singleton_validate_lock+0x4b>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <kill@plt>
cmp    $0x0,%rax
jne    1154 <singleton_validate_lock+0x44>
movl   $0x1,-0x4(%rbp)
jmp    115b <singleton_validate_lock+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<singleton_validate_lock>:
test   %rdi,%rdi
je     112d <singleton_validate_lock+0x1d>
push   %rax
xor    %esi,%esi
call   1030 <kill@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @singleton_validate_lock(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @kill(i64 %8, i32 0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @singleton_validate_lock(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @kill(i64 %0, i32 0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Config_adc();
int /*<<< orphan*/ Config_ptos();
int /*<<< orphan*/ Proceso();
void main() {
  Config_ptos();
  Config_adc();
  while (1) {
    Proceso();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Config_ptos@plt>
mov    $0x0,%al
call   1050 <Config_adc@plt>
mov    $0x0,%al
call   1040 <Proceso@plt>
jmp    1142 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Config_ptos@plt>
xor    %eax,%eax
call   1050 <Config_adc@plt>
nop
xor    %eax,%eax
call   1040 <Proceso@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @Config_ptos()
%2 = call i32 (...) @Config_adc()
br label %3
3: ; preds = %0, %3
%4 = call i32 (...) @Proceso()
br label %3
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @Config_ptos()
%2 = tail call i32 (...) @Config_adc()
br label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @Proceso()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ types();
int /*<<< orphan*/ xchg();
int main(void) {
  types();
  xchg();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <types@plt>
mov    $0x0,%al
call   1030 <xchg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <types@plt>
xor    %eax,%eax
call   1030 <xchg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @types()
%3 = call i32 (...) @xchg()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @types()
%2 = tail call i32 (...) @xchg()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_js_xml_of_dom() { exit(1); }


x86 assembly (clang, -O0):
<caml_js_xml_of_dom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_js_xml_of_dom>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_js_xml_of_dom() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_js_xml_of_dom() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_C0uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xC0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C0uint64_highword_reg>:
movabs $0xc000000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C0uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 192
%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_C0uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 824633720832
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ out_line_count(char const *);
int /*<<< orphan*/ printf(char const *, char const *, char const *,
                          char const *);
void out_str3(const char *fmt, const char *s1, const char *s2, const char *s3) {
  printf(fmt, s1, s2, s3);
  out_line_count(fmt);
  out_line_count(s1);
  out_line_count(s2);
  out_line_count(s3);
}


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

x86 assembly (clang, -O2):
<out_str3>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <out_line_count@plt>
mov    %r12,%rdi
call   1040 <out_line_count@plt>
mov    %r15,%rdi
call   1040 <out_line_count@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <out_line_count@plt>

LLVM IR (-O0):
define void @out_str3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* %9, i8* %10, i8* %11, i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @out_line_count(i8* %14)
%16 = load i8*, i8** %6
%17 = call i32 @out_line_count(i8* %16)
%18 = load i8*, i8** %7
%19 = call i32 @out_line_count(i8* %18)
%20 = load i8*, i8** %8
%21 = call i32 @out_line_count(i8* %20)
ret void
}

LLVM IR (-O2):
define void @out_str3(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @printf(i8* %0, i8* %1, i8* %2, i8* %3)
%6 = tail call i32 @out_line_count(i8* %0)
%7 = tail call i32 @out_line_count(i8* %1)
%8 = tail call i32 @out_line_count(i8* %2)
%9 = tail call i32 @out_line_count(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ marker_D();
int /*<<< orphan*/ mutual_test_1(int);
void mutual_test_4(int flag) {
  marker_D();
  if (flag)
    mutual_test_1(flag);
}


x86 assembly (clang, -O0):
<mutual_test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <marker_D@plt>
cmpl   $0x0,-0x4(%rbp)
je     1144 <mutual_test_4+0x24>
mov    -0x4(%rbp),%edi
call   1030 <mutual_test_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutual_test_4>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <marker_D@plt>
test   %ebx,%ebx
je     1136 <mutual_test_4+0x16>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <mutual_test_1@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @mutual_test_4(i32 %0) {
%2 = tail call i32 (...) @marker_D()
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @mutual_test_1(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
int f7(int y, int x) {
  int a = x & y;
  return x | a;
}


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

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

LLVM IR (-O0):
define i32 @f7(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* %4
%7 = load i32, i32* %3
%8 = and i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = or i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @f7(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__44__IO__selectModuleFunc();
void Msp430Adc12ImplP__Port64__selectModuleFunc(void) {
  HplMsp430GeneralIOP__44__IO__selectModuleFunc();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__Port64__selectModuleFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__44__IO__selectModuleFunc()
ret void
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf17(int f, int n) { return (cbuf(f, n, 17)); }


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

x86 assembly (clang, -O2):
<cbuf17>:
mov    $0x11,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf17(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 17)
ret i32 %3
}
/* Variables and functions */
void bzero_1(char *s, size_t n) {
#pragma clang loop unroll(disable)
  while (n--)
    *s++ = 0;
}


x86 assembly (clang, -O0):
<bzero_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     113c <bzero_1+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110c <bzero_1+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero_1>:
test   %rsi,%rsi
je     1124 <bzero_1+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @bzero_1(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %9, %2
%6 = load i64, i64* %4
%7 = add i64 %6, -1
store i64 %7, i64* %4
%8 = icmp ne i64 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 0, i8* %10
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @bzero_1(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
/* Type definitions */
struct t_config_section {
  int dummy;
};
struct t_config_option {
  int dummy;
};
struct t_config_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_dogechat_debug_set_all();
int /*<<< orphan*/ config_file_option_free(struct t_config_option *);
int config_dogechat_debug_delete_option_cb(void *data,
                                           struct t_config_file *config_file,
                                           struct t_config_section *section,
                                           struct t_config_option *option) {
  (void)data;
  (void)config_file;
  (void)section;
  config_file_option_free(option);
  config_dogechat_debug_set_all();
  return 2;
}


x86 assembly (clang, -O0):
<config_dogechat_debug_delete_option_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <config_file_option_free@plt>
mov    $0x0,%al
call   1030 <config_dogechat_debug_set_all@plt>
mov    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_dogechat_debug_delete_option_cb>:
push   %rax
mov    %rcx,%rdi
call   1040 <config_file_option_free@plt>
xor    %eax,%eax
call   1030 <config_dogechat_debug_set_all@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_dogechat_debug_delete_option_cb(i8* %0, %struct.t_config_file* %1, %struct.t_config_section* %2, %struct.t_config_option* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_config_file*
%7 = alloca %struct.t_config_section*
%8 = alloca %struct.t_config_option*
store i8* %0, i8** %5
store %struct.t_config_file* %1, %struct.t_config_file** %6
store %struct.t_config_section* %2, %struct.t_config_section** %7
store %struct.t_config_option* %3, %struct.t_config_option** %8
%9 = load i8*, i8** %5
%10 = load %struct.t_config_file*, %struct.t_config_file** %6
%11 = load %struct.t_config_section*, %struct.t_config_section** %7
%12 = load %struct.t_config_option*, %struct.t_config_option** %8
%13 = call i32 @config_file_option_free(%struct.t_config_option* %12)
%14 = call i32 (...) @config_dogechat_debug_set_all()
ret i32 2
}

LLVM IR (-O2):
%struct.t_config_file = type { i32 }
%struct.t_config_section = type { i32 }
%struct.t_config_option = type { i32 }
define i32 @config_dogechat_debug_delete_option_cb(i8* nocapture readnone %0, %struct.t_config_file* nocapture readnone %1, %struct.t_config_section* nocapture readnone %2, %struct.t_config_option* %3) {
%5 = tail call i32 @config_file_option_free(%struct.t_config_option* %3)
%6 = tail call i32 (...) @config_dogechat_debug_set_all()
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xd6() {
  Assert_real((iscntrl(214) == 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_iscntrl.c",
              1075, ("iscntrl should be 0 for 0xd6"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xd6>:
push   %rax
mov    $0xd6,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x433,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd6\00"
define void @t_iscntrl_0xd6() {
%1 = call i64 @iscntrl(i32 214)
%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 1075, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xd6\00"
define void @t_iscntrl_0xd6() {
%1 = tail call i64 @iscntrl(i32 214)
%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 1075, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void XSyncDestroyAlarm() {}


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

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

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

LLVM IR (-O2):
define void @XSyncDestroyAlarm() {
ret void
}
void async_main_loop(int fd, void *userData) {
  printf("%s callback\n", userData);
  main_loop();
}


x86 assembly (clang, -O0):
<async_main_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <main_loop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<async_main_loop>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <main_loop@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"%s callback\0A\00"
define void @async_main_loop(i32 %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 (...) @main_loop()
ret void
}
int cairo_code_draw_rgbLED_get_height() { return 19; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_rgbLED_get_height() {
ret i32 19
}

LLVM IR (-O2):
define i32 @cairo_code_draw_rgbLED_get_height() {
ret i32 19
}
/* Type definitions */
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int syscall(int, int, int, int /*<<< orphan*/ *, unsigned int);
int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, unsigned int flags) {
  return syscall(424, pidfd, sig, info, flags);
}


x86 assembly (clang, -O0):
<pidfd_send_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x1a8,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pidfd_send_signal>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1a8,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @pidfd_send_signal(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @syscall(i32 424, i32 %9, i32 %10, i32* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pidfd_send_signal(i32 %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @syscall(i32 424, i32 %0, i32 %1, i32* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pairalign_seq();
void align_seq() { pairalign_seq(); }


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

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

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

LLVM IR (-O2):
define void @align_seq() {
%1 = tail call i32 (...) @pairalign_seq()
ret void
}
int main(int argc, char *argv[]) {
  char *p;
  printf("sizeof pointer:%lu\n", sizeof(char *));
  p = 0x100000000;
  printf("%p\n", p);
  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)
lea    0xed3(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movabs $0x100000000,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
movabs $0x100000000,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"sizeof pointer:%lu\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 8)
store i8* inttoptr (i64 4294967296 to i8*), i8** %6
%8 = load i8*, i8** %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"sizeof pointer:%lu\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* inttoptr (i64 4294967296 to i8*))
ret i32 0
}
int test(int a, int b, char flags[], int g1, int g2) {
  int ret;
  __asm__ __volatile__("mov %3, %%edx\n\t"
                       "mov %4, %%eax\n\t"
                       "mov %5, %%ecx\n\t"
                       "movb %b1, %%al\n\t"
                       "movb %b2, %%cl\n\t"
                       "addb %%cl, %%al\n\t"
                       "jno 1f\n\t"
                       "movb $1, (%%edx)\n\t"
                       "1:\n\t"
                       "jns 1f\n\t"
                       "movb $1, 1(%%edx)\n\t"
                       "1:\n\t"
                       "jnz 1f\n\t"
                       "movb $1, 2(%%edx)\n\t"
                       "1:\n\t"
                       "jnp 1f\n\t"
                       "movb $1, 3(%%edx)\n\t"
                       "1:\n\t"
                       "jnc 1f\n\t"
                       "movb $1, 4(%%edx)\n\t"
                       "1:\n\t"
                       "movzbl %%al, %%eax\n\t"
                       "mov %%eax, %0\n\t"
                       : "=m"(ret)
                       : "m"(a), "m"(b), "m"(flags), "m"(g1), "m"(g2)
                       : "eax", "ecx", "edx", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
mov    -0x4(%rbp),%al
mov    -0x8(%rbp),%cl
add    %cl,%al
jno    1130 <test+0x30>
movb   $0x1,(%edx)
jns    113b <test+0x3b>
movb   $0x1,0x1(%edx)
jne    1146 <test+0x46>
movb   $0x1,0x2(%edx)
jnp    1151 <test+0x51>
movb   $0x1,0x3(%edx)
jae    115c <test+0x5c>
movb   $0x1,0x4(%edx)
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    %edi,-0xc(%rsp)
mov    %esi,-0x10(%rsp)
mov    %rdx,-0x8(%rsp)
mov    %ecx,-0x14(%rsp)
mov    %r8d,-0x18(%rsp)
mov    -0x8(%rsp),%edx
mov    -0x14(%rsp),%eax
mov    -0x18(%rsp),%ecx
mov    -0xc(%rsp),%al
mov    -0x10(%rsp),%cl
add    %cl,%al
jno    1132 <test+0x32>
movb   $0x1,(%edx)
jns    1139 <test+0x39>
movb   $0x1,0x1(%edx)
jne    1140 <test+0x40>
movb   $0x1,0x2(%edx)
jnp    1147 <test+0x47>
movb   $0x1,0x3(%edx)
jae    114e <test+0x4e>
movb   $0x1,0x4(%edx)
movzbl %al,%eax
mov    %eax,-0x1c(%rsp)
mov    -0x1c(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = bitcast i32* %11 to i8*
%13 = load i32, i32* %11
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ sbphostn32n(int *, char *, int /*<<< orphan*/);
void sbphostn32n_(int *ierr, char *name, uint32_t namelen) {
  sbphostn32n(ierr, name, namelen);
}


x86 assembly (clang, -O0):
<sbphostn32n_>:
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 <sbphostn32n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbphostn32n_>:
jmp    1030 <sbphostn32n@plt>

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

LLVM IR (-O2):
define void @sbphostn32n_(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sbphostn32n(i32* %0, i8* %1, i32 %2)
ret void
}
/* Type definitions */
struct sembuf {
  int dummy;
};

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int semop(int, struct sembuf *, int);
int r_semop(int semid, struct sembuf *sops, int nsops) {
  while (semop(semid, sops, nsops) == -1) {
    if (errno != EINTR)
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<r_semop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <semop@plt>
cmp    $0xffffffff,%eax
jne    1165 <r_semop+0x55>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rax
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%rax
je     1160 <r_semop+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <r_semop+0x5c>
jmp    1122 <r_semop+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_semop>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <semop@plt>
cmp    $0xffffffff,%eax
jne    1152 <r_semop+0x42>
mov    (%r15),%rax
cmp    (%r12),%rax
je     1130 <r_semop+0x20>
mov    $0xffffffff,%eax
jmp    1154 <r_semop+0x44>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32 }
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_semop(i32 %0, %struct.sembuf* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sembuf*
%7 = alloca i32
store i32 %0, i32* %5
store %struct.sembuf* %1, %struct.sembuf** %6
store i32 %2, i32* %7
br label %8
8: ; preds = %19, %3
%9 = load i32, i32* %5
%10 = load %struct.sembuf*, %struct.sembuf** %6
%11 = load i32, i32* %7
%12 = call i32 @semop(i32 %9, %struct.sembuf* %10, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i64, i64* @errno
%16 = load i64, i64* @EINTR
%17 = icmp ne i64 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 -1, i32* %4
br label %21
19: ; preds = %14
br label %8
20: ; preds = %8
store i32 0, i32* %4
br label %21
21: ; preds = %20, %18
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
%struct.sembuf = type { i32 }
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_semop(i32 %0, %struct.sembuf* %1, i32 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @semop(i32 %0, %struct.sembuf* %1, i32 %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %7
%12 = phi i32 [ -1, %7 ], [ 0, %4 ]
ret i32 %12
}
int BOX_START_FROM_WHICH(int which) {
  int x;
  x = (which % 3) * 3;
  x += ((which / 3) * 3) * 9;
  return x;
}


x86 assembly (clang, -O0):
<BOX_START_FROM_WHICH>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
imul   $0x3,%edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
imul   $0x3,%eax,%eax
imul   $0x9,%eax,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOX_START_FROM_WHICH>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
sub    %edx,%eax
lea    (%rax,%rax,2),%edx
lea    (%rcx,%rcx,8),%eax
lea    (%rax,%rax,2),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @BOX_START_FROM_WHICH(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 3
%6 = mul nsw i32 %5, 3
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 3
%9 = mul nsw i32 %8, 3
%10 = mul nsw i32 %9, 9
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @BOX_START_FROM_WHICH(i32 %0) {
%2 = srem i32 %0, 3
%3 = mul nsw i32 %2, 3
%4 = sub i32 %0, %2
%5 = mul nsw i32 %4, 9
%6 = add nsw i32 %5, %3
ret i32 %6
}
__attribute__((always_)) void hlt(void) { asm("hlt"); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int setxy(int x, int y) {
  printf("{FONTE}33[%d;%dH", y, x);
  return 1;
}


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

x86 assembly (clang, -O2):
<setxy>:
push   %rax
mov    %edi,%edx
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"{FONTE}33[%d;%dH\00"
define i32 @setxy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 1
}

LLVM IR (-O2):
@.str = [17 x i8] c"{FONTE}33[%d;%dH\00"
define i32 @setxy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int _error(char const *progname, char const *message, int ret) {
  fprintf(stderr, "%s: %s: %s\n", progname, message, strerror(errno));
  return ret;
}


x86 assembly (clang, -O0):
<_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    %rax,%r8
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_error>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbp
mov    0x2ea9(%rip),%rax
mov    (%rax),%ebx
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeb2(%rip),%rsi
mov    %ebx,%edi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %rax,%r8
call   1030 <fprintf@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@errno = global i32 0
define i32 @_error(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 i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* @errno
%11 = call i8* @strerror(i32 %10)
%12 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %11)
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@errno = global i32 0
define i32 @_error(i8* %0, i8* %1, i32 returned %2) {
%4 = load i32, i32* @stderr
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %6)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *thread_function(void *arg __attribute__((unused))) {
  pthread_exit(NULL);
  return NULL;
}


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

x86 assembly (clang, -O2):
<thread_function>:
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @pthread_exit(i32* null)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread_function(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* null
}
int main() {
  long long b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
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 i64
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
Z(e) {
  ae(49465);
  H(0);
  ae(15);
  ae(e + 144);
  ae(192);
}


x86 assembly (clang, -O0):
<Z>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0xc139,%edi
mov    $0x0,%al
call   1040 <ae@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1030 <H@plt>
mov    $0xf,%edi
mov    $0x0,%al
call   1040 <ae@plt>
mov    -0x8(%rbp),%edi
add    $0x90,%edi
mov    $0x0,%al
call   1040 <ae@plt>
mov    $0xc0,%edi
mov    $0x0,%al
call   1040 <ae@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Z>:
push   %rbx
mov    %edi,%ebx
mov    $0xc139,%edi
xor    %eax,%eax
call   1040 <ae@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1030 <H@plt>
mov    $0xf,%edi
xor    %eax,%eax
call   1040 <ae@plt>
add    $0x90,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <ae@plt>
mov    $0xc0,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <ae@plt>

LLVM IR (-O0):
define i32 @Z(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 49465)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @H to i32 (i32, ...)*)(i32 0)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 15)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 144
%9 = call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 %8)
%10 = call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 192)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @Z(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 49465)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @H to i32 (i32, ...)*)(i32 0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 15)
%5 = add nsw i32 %0, 144
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 %5)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @ae to i32 (i32, ...)*)(i32 192)
ret i32 undef
}