xunge/DecIR huggingface dataset:
/* Variables and functions */
double exp(double);
double sinh(double x) {
  x = exp(x);
  return ((x - (1.0 / x)) / 2.0);
}


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
push   %rax
call   1030 <exp@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
store double %4, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fdiv double 1.000000e+00, %6
%8 = fsub double %5, %7
%9 = fdiv double %8, 2.000000e+00
ret double %9
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fdiv double 1.000000e+00, %2
%4 = fsub double %2, %3
%5 = fmul double %4, 5.000000e-01
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ get();
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *consommer() {
  int i;
  for (i = 0; i < 10 / 2; i++) {
    get();
    sleep(1);
  }
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<consommer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1168 <consommer+0x38>
mov    $0x0,%al
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <consommer+0xf>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consommer>:
push   %rax
xor    %eax,%eax
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1040 <get@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @consommer() {
%1 = alloca i8*
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = call i32 (...) @get()
%8 = call i32 @sleep(i32 1)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = call i32 @pthread_exit(i32* null)
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @consommer() {
%1 = tail call i32 (...) @get()
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 (...) @get()
%4 = tail call i32 @sleep(i32 1)
%5 = tail call i32 (...) @get()
%6 = tail call i32 @sleep(i32 1)
%7 = tail call i32 (...) @get()
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 (...) @get()
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x_root;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
void set_XKeyEvent_x_root(void *_p, int _v) {
  ((XKeyEvent *)_p)->x_root = (int)_v;
}


x86 assembly (clang, -O0):
<set_XKeyEvent_x_root>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XKeyEvent_x_root>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeyEvent_x_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
short test_49_2(short *mem) { return __atomic_fetch_and(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_49_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x24(%rbp)
and    %esi,%edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    115d <test_49_2+0x5d>
jmp    1125 <test_49_2+0x25>
mov    -0x1a(%rbp),%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_49_2>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
and    $0x1,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test_49_2+0x10>
ret

LLVM IR (-O0):
define signext i16 @test_49_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw and i16* %6, i16 %7 acq_rel
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @test_49_2(i16* nocapture %0) {
%2 = atomicrmw and i16* %0, i16 1 acq_rel
ret i16 %2
}
/* Type definitions */
struct qa_table_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct qa_table_t *);
void qa_exit_handler(void *table) {
  if (table) {
    struct qa_table_t *table = (struct qa_table_t *)table;
    if (table) {
      free(table);
    }
  }
}


x86 assembly (clang, -O0):
<qa_exit_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1148 <qa_exit_handler+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1143 <qa_exit_handler+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    1148 <qa_exit_handler+0x38>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.qa_table_t = type { i32 }
define void @qa_exit_handler(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.qa_table_t*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load %struct.qa_table_t*, %struct.qa_table_t** %3
store %struct.qa_table_t* %7, %struct.qa_table_t** %3
%8 = load %struct.qa_table_t*, %struct.qa_table_t** %3
%9 = icmp ne %struct.qa_table_t* %8, null
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load %struct.qa_table_t*, %struct.qa_table_t** %3
%12 = call i32 @free(%struct.qa_table_t* %11)
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @qa_exit_handler(i8* nocapture %0) {
ret void
}
void smintg_destroy(struct smintg *intg __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
%struct.smintg = type opaque
define void @smintg_destroy(%struct.smintg* nocapture %0) {
ret void
}
void bnxt_vf_reps_free(struct bnxt *bp) {}


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

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

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

LLVM IR (-O2):
%struct.bnxt = type opaque
define void @bnxt_vf_reps_free(%struct.bnxt* nocapture %0) {
ret void
}
void bae(int a, int b) {}


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

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

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

LLVM IR (-O2):
define void @bae(i32 %0, i32 %1) {
ret void
}
int sysfs_update_group(struct kobject *kobj,
                       const struct attribute_group *grp) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define i32 @sysfs_update_group(%struct.kobject* %0, %struct.attribute_group* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.attribute_group*
store %struct.kobject* %0, %struct.kobject** %3
store %struct.attribute_group* %1, %struct.attribute_group** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.attribute_group = type opaque
define i32 @sysfs_update_group(%struct.kobject* nocapture readnone %0, %struct.attribute_group* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int VIM_HIF_GetReg8(int);
int /*<<< orphan*/ VIM_HIF_SetReg8(int, unsigned char);
void VIM_IPP_SetEffect(unsigned char bEffect) {
  unsigned char bTemp;
  bTemp = (VIM_HIF_GetReg8((0x1c00 + 0x000)) & 0xE0);
  bTemp |= bEffect;
  VIM_HIF_SetReg8((0x1c00 + 0x000), bTemp);
}


x86 assembly (clang, -O0):
<VIM_IPP_SetEffect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1c00,%edi
call   1040 <VIM_HIF_GetReg8@plt>
and    $0xe0,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
mov    $0x1c00,%edi
movzbl -0x2(%rbp),%esi
call   1030 <VIM_HIF_SetReg8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_IPP_SetEffect>:
push   %rbx
mov    %edi,%ebx
mov    $0x1c00,%edi
call   1040 <VIM_HIF_GetReg8@plt>
and    $0xe0,%al
or     %bl,%al
movzbl %al,%esi
mov    $0x1c00,%edi
pop    %rbx
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_IPP_SetEffect(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = call i32 @VIM_HIF_GetReg8(i32 7168)
%5 = and i32 %4, 224
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8, i8* %3
%14 = call i32 @VIM_HIF_SetReg8(i32 7168, i8 zeroext %13)
ret void
}

LLVM IR (-O2):
define void @VIM_IPP_SetEffect(i8 zeroext %0) {
%2 = tail call i32 @VIM_HIF_GetReg8(i32 7168)
%3 = trunc i32 %2 to i8
%4 = and i8 %3, -32
%5 = or i8 %4, %0
%6 = tail call i32 @VIM_HIF_SetReg8(i32 7168, i8 zeroext %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_63(int /*<<< orphan*/);
int gen_63() {
  handle_63(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_63>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_63@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_63() {
%1 = call i32 @handle_63(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_63() {
%1 = tail call i32 @handle_63(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int f(int *p) {
  printf("p=%p\n", p);
  return 0;
}


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

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"p=%p\0A\00"
define i32 @f(i32* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ l_sleep(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Main Started:\n");
  l_sleep(5);
  printf("Main End:\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <l_sleep@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <l_sleep@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Main Started:\0A\00"
@.str.1 = [11 x i8] c"Main End:\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @l_sleep(i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Main Started:\00"
@str.2 = [10 x i8] c"Main End:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @l_sleep(i32 5)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("\nHello World\n\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"\0AHello World\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x79() {
  Assert_real((isupper(121) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              610, ("isupper should be 0 for y"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x79>:
push   %rax
mov    $0x79,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x262,%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 = [26 x i8] c"isupper should be 0 for y\00"
define void @t_isupper_0x79() {
%1 = call i64 @isupper(i32 121)
%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 610, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for y\00"
define void @t_isupper_0x79() {
%1 = tail call i64 @isupper(i32 121)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 610, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int const suzerain_inorder_wavenumber_max(int const);
int const suzerain_inorder_wavenumber_min(int const);
int suzerain_inorder_wavenumber_valid(const int N, const int w) {
  return suzerain_inorder_wavenumber_min(N) <= w &&
         w <= suzerain_inorder_wavenumber_max(N);
}


x86 assembly (clang, -O0):
<suzerain_inorder_wavenumber_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <suzerain_inorder_wavenumber_min@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
jg     1161 <suzerain_inorder_wavenumber_valid+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <suzerain_inorder_wavenumber_max@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suzerain_inorder_wavenumber_valid>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <suzerain_inorder_wavenumber_min@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
jg     1144 <suzerain_inorder_wavenumber_valid+0x24>
mov    %ebp,%edi
call   1030 <suzerain_inorder_wavenumber_max@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setge  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @suzerain_inorder_wavenumber_valid(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 = call i32 @suzerain_inorder_wavenumber_min(i32 %5)
%7 = load i32, i32* %4
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = call i32 @suzerain_inorder_wavenumber_max(i32 %11)
%13 = icmp sle i32 %10, %12
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @suzerain_inorder_wavenumber_valid(i32 %0, i32 %1) {
%3 = tail call i32 @suzerain_inorder_wavenumber_min(i32 %0)
%4 = icmp sgt i32 %3, %1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @suzerain_inorder_wavenumber_max(i32 %0)
%7 = icmp sge i32 %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int main() {
  int i = 42;
  printf("address of i: %p\n", &i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2a,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"address of i: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"address of i: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: wc [-lwc] [name ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Usage: wc [-lwc] [name ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int **);
void bar(void) {
  int z[2][2] = {{1, 2}, {3, 4}};
  foo(2, z);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
mov    $0x2,%edi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2,%edi
call   1030 <foo@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.bar.z = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]]
define void @bar() {
%1 = alloca [2 x [2 x i32]]
%2 = bitcast [2 x [2 x i32]]* %1 to i8*
%3 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 0
%4 = bitcast [2 x i32]* %3 to i32**
%5 = call i32 @foo(i32 2, i32** %4)
ret void
}

LLVM IR (-O2):
@__const.bar.z = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]]
define void @bar() {
%1 = alloca [2 x [2 x i32]]
%2 = bitcast [2 x [2 x i32]]* %1 to i8*
%3 = bitcast [2 x [2 x i32]]* %1 to i32**
%4 = call i32 @foo(i32 2, i32** %3)
ret void
}
short isutf8cont(char c) { return (c & 0xC0) == 0x80; }


x86 assembly (clang, -O0):
<isutf8cont>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<isutf8cont>:
and    $0xc0,%dil
xor    %eax,%eax
cmp    $0x80,%dil
sete   %al
ret

LLVM IR (-O0):
define signext i16 @isutf8cont(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 192
%6 = icmp eq i32 %5, 128
%7 = zext i1 %6 to i32
%8 = trunc i32 %7 to i16
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @isutf8cont(i8 signext %0) {
%2 = and i8 %0, -64
%3 = icmp eq i8 %2, -128
%4 = zext i1 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ console_tx_hex32(unsigned int);
void print_warn_hex32(unsigned int value) { console_tx_hex32(value); }


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

x86 assembly (clang, -O2):
<print_warn_hex32>:
jmp    1030 <console_tx_hex32@plt>

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

LLVM IR (-O2):
define void @print_warn_hex32(i32 %0) {
%2 = tail call i32 @console_tx_hex32(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_userattr_subpacket(char *, int);
extern void User_Attribute_Packet(int len) {
  parse_userattr_subpacket("Sub", len);
}


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

x86 assembly (clang, -O2):
<User_Attribute_Packet>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <parse_userattr_subpacket@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"Sub\00"
define void @User_Attribute_Packet(i32 %0) {
%2 = tail call i32 @parse_userattr_subpacket(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void print_test_stage_ok(void) {
  static size_t stage = 0;
  printf("test stage %zu ok\n", stage++);
}


x86 assembly (clang, -O0):
<print_test_stage_ok>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f15(%rip),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x2f07(%rip)
mov    %eax,%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_test_stage_ok>:
mov    0x2f19(%rip),%rsi
lea    0x1(%rsi),%rax
mov    %rax,0x2f0e(%rip)
lea    0xed7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@print_test_stage_ok.stage = internal global i64 0
@.str = [19 x i8] c"test stage %zu ok\0A\00"
define void @print_test_stage_ok() {
%1 = load i64, i64* @print_test_stage_ok.stage
%2 = add i64 %1, 1
store i64 %2, i64* @print_test_stage_ok.stage
%3 = trunc i64 %1 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@print_test_stage_ok.stage = internal unnamed_addr global i64 0
@.str = [19 x i8] c"test stage %zu ok\0A\00"
define void @print_test_stage_ok() {
%1 = load i64, i64* @print_test_stage_ok.stage
%2 = add i64 %1, 1
store i64 %2, i64* @print_test_stage_ok.stage
%3 = trunc i64 %1 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int real_while() {
  int i = 0;
  int j = 3 * i;
  while (i < 30) {
    j = j + i;
    i++;
  }
  return j;
}


x86 assembly (clang, -O0):
<real_while>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1e,-0x4(%rbp)
jge    1133 <real_while+0x33>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <real_while+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @real_while() {
ret i32 435
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t SawTooth(uint32_t phase) { return (*(int32_t *)&phase) >> 2; }


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

x86 assembly (clang, -O2):
<SawTooth>:
mov    %edi,%eax
sar    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @SawTooth(i32 %0) {
%2 = ashr i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
main() {
  int a, b, c;
  a = 4;
  b = 5;
  c = a / b;
  printf("This sum of %d and %d is %d\n", a, b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"This sum of %d and %d is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 4, i32* %1
store i32 5, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = sdiv i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"This sum of %d and %d is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 4, i32 5, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ como_end();
int /*<<< orphan*/ exit(int);
void quit(int status) {
  como_end();
  exit(status);
}


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

x86 assembly (clang, -O2):
<quit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <como_end@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @quit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @como_end()
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @quit(i32 %0) {
%2 = tail call i32 (...) @como_end()
%3 = tail call i32 @exit(i32 %0)
unreachable
}
void g() {
  f(__func__);
  f(__FUNCTION__);
  f(__PRETTY_FUNCTION__);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <f@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <f@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <f@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <f@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <f@plt>

LLVM IR (-O0):
@__func__.g = [2 x i8] c"g\00"
@__PRETTY_FUNCTION__.g = [9 x i8] c"void g()\00"
define void @g() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.g, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.g, i64 0, i64 0))
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__PRETTY_FUNCTION__.g, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.g = [2 x i8] c"g\00"
@__PRETTY_FUNCTION__.g = [9 x i8] c"void g()\00"
define void @g() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.g, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__func__.g, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @f to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__PRETTY_FUNCTION__.g, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ htonl(scalar_t__);
int checkEndian() {
  uint32_t x = 1;
  if (x == htonl(x)) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<checkEndian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <htonl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    114d <checkEndian+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1154 <checkEndian+0x44>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkEndian>:
push   %rax
mov    $0x1,%edi
call   1030 <htonl@plt>
xor    %ecx,%ecx
cmp    $0x1,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @checkEndian() {
%1 = tail call i64 @htonl(i64 1)
%2 = icmp ne i64 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
char *swap(char *str, int pos1, int pos2) {
  char temp = str[pos1];
  str[pos1] = str[pos2];
  str[pos2] = temp;
  return str;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    %rdi,%rax
movslq %esi,%rdi
mov    (%rax,%rdi,1),%sil
movslq %edx,%rdx
mov    (%rax,%rdx,1),%cl
mov    %cl,(%rax,%rdi,1)
mov    %sil,(%rax,%rdx,1)
ret

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

LLVM IR (-O2):
define i8* @swap(i8* returned %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
int stun_set_command_message_len_str(unsigned char *buf, int len) {
  if (len < (20))
    return -1;
  ((uint16_t *)buf)[1] = ntohs((uint16_t)(len - (20)));
  return 0;
}


x86 assembly (clang, -O0):
<stun_set_command_message_len_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1135 <stun_set_command_message_len_str+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <stun_set_command_message_len_str+0x40>
mov    -0x14(%rbp),%edi
sub    $0x14,%edi
call   1030 <ntohs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stun_set_command_message_len_str>:
mov    $0xffffffff,%eax
cmp    $0x14,%esi
jl     112e <stun_set_command_message_len_str+0x1e>
push   %rbx
mov    %rdi,%rbx
add    $0xffffffec,%esi
mov    %esi,%edi
call   1030 <ntohs@plt>
mov    %eax,0x4(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @stun_set_command_message_len_str(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp slt i32 %1, 20
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = add nsw i32 %1, -20
%6 = tail call i32 @ntohs(i32 %5)
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Me();
int /*<<< orphan*/ SendItem(int /*<<< orphan*/, char *);
void Act_Cls(void) { SendItem(Me(), "\014\n"); }


x86 assembly (clang, -O0):
<Act_Cls>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Me@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
call   1030 <SendItem@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Cls>:
push   %rax
xor    %eax,%eax
call   1040 <Me@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <SendItem@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0C\0A\00"
define void @Act_Cls() {
%1 = tail call i32 (...) @Me()
%2 = tail call i32 @SendItem(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int cp(char const *, char const *);
int CopyLinux(const char *to, const char *from) { return cp(to, from); }


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

x86 assembly (clang, -O2):
<CopyLinux>:
jmp    1030 <cp@plt>

LLVM IR (-O0):
define i32 @CopyLinux(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 @cp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @CopyLinux(i8* %0, i8* %1) {
%3 = tail call i32 @cp(i8* %0, i8* %1)
ret i32 %3
}
void RTVfsObjFromDir(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsObjFromDir() {
ret void
}
void XrmQPutResource() {}


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

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

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

LLVM IR (-O2):
define void @XrmQPutResource() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CStatsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void I2CStatsRequestUpdate() { UAVObjRequestUpdate(I2CStatsHandle()); }


x86 assembly (clang, -O0):
<I2CStatsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <I2CStatsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CStatsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <I2CStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @I2CStatsRequestUpdate() {
%1 = call i32 (...) @I2CStatsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @I2CStatsRequestUpdate() {
%1 = tail call i32 (...) @I2CStatsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
unsigned short float2half(float);
float half2float(unsigned short);
unsigned short divide(unsigned short a, unsigned short b) {
  float op1 = half2float(a);
  float op2 = half2float(b);
  return float2half(op1 / op2);
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%edi
call   1040 <half2float@plt>
movss  %xmm0,-0x8(%rbp)
movzwl -0x4(%rbp),%edi
call   1040 <half2float@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
call   1030 <float2half@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
call   1040 <half2float@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1040 <half2float@plt>
movss  0xc(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <float2half@plt>

LLVM IR (-O0):
define zeroext i16 @divide(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca float
%6 = alloca float
store i16 %0, i16* %3
store i16 %1, i16* %4
%7 = load i16, i16* %3
%8 = call float @half2float(i16 zeroext %7)
store float %8, float* %5
%9 = load i16, i16* %4
%10 = call float @half2float(i16 zeroext %9)
store float %10, float* %6
%11 = load float, float* %5
%12 = load float, float* %6
%13 = fdiv float %11, %12
%14 = call zeroext i16 @float2half(float %13)
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @divide(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call float @half2float(i16 zeroext %0)
%4 = tail call float @half2float(i16 zeroext %1)
%5 = fdiv float %3, %4
%6 = tail call zeroext i16 @float2half(float %5)
ret i16 %6
}
void gdk_region_xor() {}


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

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

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

LLVM IR (-O2):
define void @gdk_region_xor() {
ret void
}
void path_021_expected_7(int a, int b) {
  while (b) {
    switch (a) {
    case 0:
      return;
    case 1:
      switch (a) {
      case 0:
        return;
      default:
        break;
      }
      break;
    default:
      break;
    }
    if (b > 0) {
      b--;
    }
  }
}


x86 assembly (clang, -O0):
<path_021_expected_7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1179 <path_021_expected_7+0x79>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1138 <path_021_expected_7+0x38>
jmp    1127 <path_021_expected_7+0x27>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     113d <path_021_expected_7+0x3d>
jmp    115c <path_021_expected_7+0x5c>
jmp    1179 <path_021_expected_7+0x79>
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    1152 <path_021_expected_7+0x52>
jmp    114d <path_021_expected_7+0x4d>
jmp    1179 <path_021_expected_7+0x79>
jmp    1157 <path_021_expected_7+0x57>
jmp    1161 <path_021_expected_7+0x61>
jmp    1161 <path_021_expected_7+0x61>
cmpl   $0x0,-0x8(%rbp)
jle    1174 <path_021_expected_7+0x74>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <path_021_expected_7+0xa>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @path_021_expected_7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %23, %2
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i32, i32* %3
switch i32 %9, label %16 [
i32 0, label %10
i32 1, label %11
]
10: ; preds = %8
br label %24
11: ; preds = %8
%12 = load i32, i32* %3
switch i32 %12, label %14 [
i32 0, label %13
]
13: ; preds = %11
br label %24
14: ; preds = %11
br label %15
15: ; preds = %14
br label %17
16: ; preds = %8
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %4
%22 = add nsw i32 %21, -1
store i32 %22, i32* %4
br label %23
23: ; preds = %20, %17
br label %5
24: ; preds = %10, %13, %5
ret void
}

LLVM IR (-O2):
define void @path_021_expected_7(i32 %0, i32 %1) {
ret void
}
division(int a, int b) { return (a / b); }


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

x86 assembly (clang, -O2):
<division>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @division(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 = sdiv i32 %5, %6
ret i32 %7
}

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


x86 assembly (clang, -O0):
<I0R1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movzbl -0x6(%rbp),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     113b <I0R1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <I0R1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @I0R1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = and i32 %1, 254
%8 = icmp ugt i32 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}