xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_append_mixed_cell(int n, int r, int k, int labels[],
                             double *normal) {
  int d[3], fail;
  d[0] = r;
  d[1] = n;
  d[2] = k;
  fail = _ada_use_c2phc(93, d, labels, normal);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_append_mixed_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x5d,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_append_mixed_cell>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x5d,%edi
mov    %rcx,%rdx
mov    %r8,%rcx
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @celcon_append_mixed_cell(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store double* %4, double** %10
%13 = load i32, i32* %7
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %6
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %8
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load i32*, i32** %9
%21 = load double*, double** %10
%22 = call i32 @_ada_use_c2phc(i32 93, i32* %19, i32* %20, double* %21)
store i32 %22, i32* %12
%23 = load i32, i32* %12
ret i32 %23
}

LLVM IR (-O2):
define i32 @celcon_append_mixed_cell(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %0, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %2, i32* %10
%11 = call i32 @_ada_use_c2phc(i32 93, i32* %8, i32* %3, double* %4)
ret i32 %11
}
int test_imm_3Euint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x3E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Euint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 62
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void omap_iommu_restore_ctx(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @omap_iommu_restore_ctx(%struct.device* nocapture %0) {
ret void
}
void baz() {}


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

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

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

LLVM IR (-O2):
define void @baz() {
ret void
}
_Bool __VERIFIER_nondet_bool() {
  _Bool val;
  return val;
}


x86 assembly (clang, -O0):
<__VERIFIER_nondet_bool>:
push   %rbp
mov    %rsp,%rbp
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @__VERIFIER_nondet_bool() {
%1 = alloca i8
%2 = load i8, i8* %1
%3 = trunc i8 %2 to i1
ret i1 %3
}

LLVM IR (-O2):
define zeroext i1 @__VERIFIER_nondet_bool() {
ret i1 undef
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *, char const *);
int /*<<< orphan*/ stress_check_capability(int /*<<< orphan*/);
int stress_binderfs_supported(const char *name) {
  if (!stress_check_capability((0))) {
    pr_inf("%s stressor will be skipped, "
           "need to be running with CAP_SYS_ADMIN "
           "rights for this stressor\n",
           name);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress_binderfs_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
cmp    $0x0,%eax
jne    1158 <stress_binderfs_supported+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <pr_inf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <stress_binderfs_supported+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_binderfs_supported>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
test   %eax,%eax
jne    1147 <stress_binderfs_supported+0x27>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <pr_inf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [93 x i8] c"%s stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor\0A\00"
define i32 @stress_binderfs_supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @stress_check_capability(i32 0)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pr_inf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [93 x i8] c"%s stressor will be skipped, need to be running with CAP_SYS_ADMIN rights for this stressor\0A\00"
define i32 @stress_binderfs_supported(i8* %0) {
%2 = tail call i32 @stress_check_capability(i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pr_inf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World!!!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [16 x i8] c"Hello World!!!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello World!!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int getOrdinal(uint8_t **buffer) { return *((*buffer)++); }


x86 assembly (clang, -O0):
<getOrdinal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,(%rcx)
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getOrdinal>:
mov    (%rdi),%rax
lea    0x4(%rax),%rcx
mov    %rcx,(%rdi)
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @getOrdinal(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i32 1
store i32* %5, i32** %3
%6 = load i32, i32* %4
ret i32 %6
}

LLVM IR (-O2):
define i32 @getOrdinal(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = getelementptr inbounds i32, i32* %2, i64 1
store i32* %3, i32** %0
%4 = load i32, i32* %2
ret i32 %4
}
int saw(unsigned int phase, unsigned int amplitude) {
  return amplitude - phase * amplitude / 0x10000;
}


x86 assembly (clang, -O0):
<saw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
shr    $0x10,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<saw>:
mov    %esi,%eax
imul   %esi,%edi
shr    $0x10,%edi
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @saw(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 = load i32, i32* %4
%8 = mul i32 %6, %7
%9 = udiv i32 %8, 65536
%10 = sub i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @saw(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = lshr i32 %3, 16
%5 = sub i32 %1, %4
ret i32 %5
}
int test_imm_3Dint8_reg(signed char val) {
  return ((val) & (-0x3D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Dint8_reg(i8 signext %0) {
%2 = and i8 %0, -61
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int call_rec(int i) {
  int x;
  for (x = 0; x < 10000; x++)
    ;
  if (i != 0)
    return call_rec(i - 1);
  return i;
}


x86 assembly (clang, -O0):
<call_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    1142 <call_rec+0x32>
jmp    1134 <call_rec+0x24>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <call_rec+0x12>
cmpl   $0x0,-0x8(%rbp)
je     115f <call_rec+0x4f>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <call_rec@plt>
mov    %eax,-0x4(%rbp)
jmp    1165 <call_rec+0x55>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @call_rec(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void prsafree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<prsafree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @prsafree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void test(void) {
  unsigned int a = 1;
  unsigned long long b = -a;
  long long c = -a;
  unsigned long b2 = -a;
  long c2 = -a;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,%eax
mov    %rax,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i32 1, i32* %1
%6 = load i32, i32* %1
%7 = sub i32 0, %6
%8 = zext i32 %7 to i64
store i64 %8, i64* %2
%9 = load i32, i32* %1
%10 = sub i32 0, %9
%11 = zext i32 %10 to i64
store i64 %11, i64* %3
%12 = load i32, i32* %1
%13 = sub i32 0, %12
%14 = zext i32 %13 to i64
store i64 %14, i64* %4
%15 = load i32, i32* %1
%16 = sub i32 0, %15
%17 = zext i32 %16 to i64
store i64 %17, i64* %5
ret void
}

LLVM IR (-O2):
define void @test() {
ret void
}
void on_connect(void *handle) {}


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

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

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

LLVM IR (-O2):
define void @on_connect(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *my_malloc(size_t);
void leaky(size_t n, int do_leak) {
  void *p = my_malloc(n);
  if (!do_leak) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<leaky>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <my_malloc@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114f <leaky+0x2f>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leaky>:
push   %rbx
mov    %esi,%ebx
call   1040 <my_malloc@plt>
test   %ebx,%ebx
je     112e <leaky+0xe>
pop    %rbx
ret
mov    %rax,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @leaky(i64 %0, i32 %1) {
%3 = tail call i8* @my_malloc(i64 %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XPropertyEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XPropertyEvent_display(void *_p, void *_v) {
  ((XPropertyEvent *)_p)->display = (Display *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XPropertyEvent_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XPropertyEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insert(int);
void op_compinsrt() { insert(1); }


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

x86 assembly (clang, -O2):
<op_compinsrt>:
mov    $0x1,%edi
jmp    1030 <insert@plt>

LLVM IR (-O0):
define void @op_compinsrt() {
%1 = call i32 @insert(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_compinsrt() {
%1 = tail call i32 @insert(i32 1)
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int /*<<< orphan*/ strcpylow(char *, char *);
int my_strcasecmp(char *s1, char *s2) {
  char t1[1024];
  char t2[1024];
  strcpylow(s1, t1);
  strcpylow(s2, t2);
  return strcmp(t1, t2);
}


x86 assembly (clang, -O0):
<my_strcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1030 <strcpylow@plt>
mov    -0x10(%rbp),%rdi
lea    -0x810(%rbp),%rsi
call   1030 <strcpylow@plt>
lea    -0x410(%rbp),%rdi
lea    -0x810(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcasecmp>:
push   %r15
push   %r14
push   %rbx
sub    $0x800,%rsp
mov    %rsi,%rbx
lea    0x400(%rsp),%r14
mov    %r14,%rsi
call   1030 <strcpylow@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpylow@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
add    $0x800,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @my_strcasecmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
%6 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%9 = call i32 @strcpylow(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%12 = call i32 @strcpylow(i8* %10, i8* %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @my_strcasecmp(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = call i32 @strcpylow(i8* %0, i8* %5)
%8 = call i32 @strcpylow(i8* %1, i8* %6)
%9 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %9
}
const char *mz_version(void) { return "10.0.1"; }


x86 assembly (clang, -O0):
<mz_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mz_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"10.0.1\00"
define i8* @mz_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"10.0.1\00"
define i8* @mz_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct darray {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ darray_free(struct darray *);
int /*<<< orphan*/ darray_push_back_darray(size_t const, struct darray *,
                                           struct darray *);
void darray_join(const size_t element_size, struct darray *dst,
                 struct darray *da) {
  darray_push_back_darray(element_size, dst, da);
  darray_free(da);
}


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

x86 assembly (clang, -O2):
<darray_join>:
push   %rbx
mov    %rdx,%rbx
call   1030 <darray_push_back_darray@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <darray_free@plt>

LLVM IR (-O0):
%struct.darray = type { i32 }
define void @darray_join(i64 %0, %struct.darray* %1, %struct.darray* %2) {
%4 = alloca i64
%5 = alloca %struct.darray*
%6 = alloca %struct.darray*
store i64 %0, i64* %4
store %struct.darray* %1, %struct.darray** %5
store %struct.darray* %2, %struct.darray** %6
%7 = load i64, i64* %4
%8 = load %struct.darray*, %struct.darray** %5
%9 = load %struct.darray*, %struct.darray** %6
%10 = call i32 @darray_push_back_darray(i64 %7, %struct.darray* %8, %struct.darray* %9)
%11 = load %struct.darray*, %struct.darray** %6
%12 = call i32 @darray_free(%struct.darray* %11)
ret void
}

LLVM IR (-O2):
%struct.darray = type { i32 }
define void @darray_join(i64 %0, %struct.darray* %1, %struct.darray* %2) {
%4 = tail call i32 @darray_push_back_darray(i64 %0, %struct.darray* %1, %struct.darray* %2)
%5 = tail call i32 @darray_free(%struct.darray* %2)
ret void
}
int MyMin(int x, int y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<MyMin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <MyMin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <MyMin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyMin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @MyMin(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @MyMin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void halWriteReg8(uintptr_t physicalAddress, uint8_t val) {
  volatile uint8_t *ptr = (uint8_t *)physicalAddress;
  *ptr = val;
}


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

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

LLVM IR (-O0):
define void @halWriteReg8(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32*
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = load i32*, i32** %5
store volatile i32 %8, i32* %9
ret void
}

LLVM IR (-O2):
define void @halWriteReg8(i64 %0, i32 %1) {
%3 = inttoptr i64 %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dxl_hal_close();
void dxl_terminate(void) { dxl_hal_close(); }


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

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

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

LLVM IR (-O2):
define void @dxl_terminate() {
%1 = tail call i32 (...) @dxl_hal_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int main() {
  char str[5];
  snprintf(str, 10, "%s", "abc");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x5(%rbp),%rdi
mov    $0xa,%esi
lea    0xed8(%rip),%rdx
lea    0xed4(%rip),%rcx
call   1030 <snprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdx
lea    0xee4(%rip),%rcx
lea    0x3(%rsp),%rdi
mov    $0xa,%esi
call   1030 <snprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int *get_arr();
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void set_arr() {
  int *arr = get_arr();
  int i;
  srand((unsigned)time(NULL));
  for (i = 0; i < 50000; ++i)
    arr[i] = rand() % 1000000;
}


x86 assembly (clang, -O0):
<set_arr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_arr@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xc350,-0xc(%rbp)
jge    119f <set_arr+0x5f>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116a <set_arr+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_arr>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <get_arr@plt>
mov    %rax,%r14
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %ebx,%ebx
xchg   %ax,%ax
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x431bde83,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rcx
add    %edx,%ecx
imul   $0xf4240,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0xc350,%rbx
jne    1160 <set_arr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @set_arr() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* (...) @get_arr()
store i32* %3, i32** %1
%4 = call i64 @time(i32* null)
%5 = trunc i64 %4 to i32
%6 = call i32 @srand(i32 %5)
store i32 0, i32* %2
br label %7
7: ; preds = %17, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 50000
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = call i32 (...) @rand()
%12 = srem i32 %11, 1000000
%13 = load i32*, i32** %1
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
store i32 %12, i32* %16
br label %17
17: ; preds = %10
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %7
20: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @set_arr() {
%1 = tail call i32* (...) @get_arr()
%2 = tail call i64 @time(i32* null)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @srand(i32 %3)
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %10, %5 ]
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 1000000
%9 = getelementptr inbounds i32, i32* %1, i64 %6
store i32 %8, i32* %9
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, 50000
br i1 %11, label %12, label %5
12: ; preds = %5
ret void
}
/* Variables and functions */
char *stpcpy(char *__restrict to, const char *__restrict from) {
  for (; (*to = *from); ++from, ++to)
    ;
  return (to);
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1142 <stpcpy+0x42>
jmp    1125 <stpcpy+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %cl,(%rdi)
test   %cl,%cl
je     1122 <stpcpy+0x22>
add    $0x1,%rsi
nop
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

LLVM IR (-O0):
define i8* @stpcpy(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %11, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = load i8*, i8** %3
store i8 %7, i8* %8
%9 = icmp ne i8 %7, 0
br i1 %9, label %10, label %16
10: ; preds = %5
br label %11
11: ; preds = %10
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %3
br label %5
16: ; preds = %5
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @stpcpy(i8* noalias writeonly %0, i8* noalias nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %8
store i8 %10, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i8* [ %0, %2 ], [ %9, %5 ]
ret i8* %13
}
void loop_of_cpuid() {
  for (int i = 0; i < 100; i++) {
    __asm__ __volatile__("xorl %%eax, %%eax\n"
                         "cpuid\n" ::
                             : "%rax", "%rbx", "%rcx", "%rdx");
  }
}


x86 assembly (clang, -O0):
<loop_of_cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1128 <loop_of_cpuid+0x28>
xor    %eax,%eax
cpuid
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110c <loop_of_cpuid+0xc>
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_of_cpuid>:
push   %rbx
mov    $0x64,%esi
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
cpuid
add    $0xffffffff,%esi
jne    1110 <loop_of_cpuid+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @loop_of_cpuid() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @loop_of_cpuid() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %4, %2 ]
tail call void asm sideeffect "xorl %eax, %eax\0Acpuid\0A", "~{rax},~{rbx},~{rcx},~{rdx},~{dirflag},~{fpsr},~{flags}"()
%4 = add nuw nsw i32 %3, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %1, label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ****wchar_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ ******);
void pyi_free_wargv(wchar_t **wargv) {
  wchar_t **arg = wargv;
  while (arg[0]) {
    free(arg[0]);
    arg++;
  }
  free(wargv);
}


x86 assembly (clang, -O0):
<pyi_free_wargv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <pyi_free_wargv+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <pyi_free_wargv+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pyi_free_wargv>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <pyi_free_wargv+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <pyi_free_wargv+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @pyi_free_wargv(i32****** %0) {
%2 = alloca i32******
%3 = alloca i32******
store i32****** %0, i32******* %2
%4 = load i32******, i32******* %2
store i32****** %4, i32******* %3
br label %5
5: ; preds = %10, %1
%6 = load i32******, i32******* %3
%7 = getelementptr inbounds i32*****, i32****** %6, i64 0
%8 = load i32*****, i32****** %7
%9 = icmp ne i32***** %8, null
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = load i32******, i32******* %3
%12 = getelementptr inbounds i32*****, i32****** %11, i64 0
%13 = load i32*****, i32****** %12
%14 = bitcast i32***** %13 to i32******
%15 = call i32 @free(i32****** %14)
%16 = load i32******, i32******* %3
%17 = getelementptr inbounds i32*****, i32****** %16, i32 1
store i32****** %17, i32******* %3
br label %5
18: ; preds = %5
%19 = load i32******, i32******* %2
%20 = call i32 @free(i32****** %19)
ret void
}

LLVM IR (-O2):
define void @pyi_free_wargv(i32****** nocapture %0) {
%2 = load i32*****, i32****** %0
%3 = icmp eq i32***** %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i32***** [ %10, %4 ], [ %2, %1 ]
%6 = phi i32****** [ %9, %4 ], [ %0, %1 ]
%7 = bitcast i32***** %5 to i32******
%8 = tail call i32 @free(i32****** %7)
%9 = getelementptr inbounds i32*****, i32****** %6, i64 1
%10 = load i32*****, i32****** %9
%11 = icmp eq i32***** %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @free(i32****** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: mond [-s] <executable> <interval> <logFilename>\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"usage: mond [-s] <executable> <interval> <logFilename>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [55 x i8] c"usage: mond [-s] <executable> <interval> <logFilename>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int done_command(int argc, char **argv) {
  fprintf(stderr, "2do done not yet implemented");
  return 0;
}


x86 assembly (clang, -O0):
<done_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<done_command>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"2do done not yet implemented\00"
define i32 @done_command(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"2do done not yet implemented\00"
define i32 @done_command(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int printUsage(char *cmd) {
  printf("Usage:\n");
  printf("%s -i src.vmdk: displays information for specified virtual disk\n",
         cmd);
  printf("%s [-t toolsVersion] src.vmdk dst.vmdk: converts source disk to "
         "destination disk with given tools version\n\n",
         cmd);
  return 1;
}


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

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xf82(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [65 x i8] c"%s -i src.vmdk: displays information for specified virtual disk\0A\00"
@.str.2 = [108 x i8] c"%s [-t toolsVersion] src.vmdk dst.vmdk: converts source disk to destination disk with given tools version\0A\0A\00"
define i32 @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 1
}

LLVM IR (-O2):
@.str.1 = [65 x i8] c"%s -i src.vmdk: displays information for specified virtual disk\0A\00"
@.str.2 = [108 x i8] c"%s [-t toolsVersion] src.vmdk dst.vmdk: converts source disk to destination disk with given tools version\0A\0A\00"
@str = [7 x i8] c"Usage:\00"
define i32 @printUsage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_ror_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m512i rot16_512(__m512i x) {
  return _mm512_ror_epi32(x, 16);
}


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

x86 assembly (clang, -O2):
<rot16_512>:
mov    $0x10,%esi
jmp    1030 <_mm512_ror_epi32@plt>

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

LLVM IR (-O2):
define i32 @rot16_512(i32 %0) {
%2 = tail call i32 @_mm512_ror_epi32(i32 %0, i32 16)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x2a() {
  Assert_real((ispunct(42)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              215, ("ispunct should be 1 for *"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x2a>:
push   %rax
mov    $0x2a,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xd7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for *\00"
define void @t_ispunct_0x2a() {
%1 = call i32 @ispunct(i32 42)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for *\00"
define void @t_ispunct_0x2a() {
%1 = tail call i32 @ispunct(i32 42)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int /*<<< orphan*/ rtrim(char **);
char *strstrip(char *s) {
  rtrim(&s);
  while (isspace(*s))
    s++;
  return s;
}


x86 assembly (clang, -O0):
<strstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <rtrim@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     115c <strstrip+0x3c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1135 <strstrip+0x15>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strstrip>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1040 <rtrim@plt>
mov    (%rsp),%rax
movsbl (%rax),%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <isspace@plt>
test   %rax,%rax
je     115c <strstrip+0x3c>
mov    (%rsp),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rsp)
movsbl 0x1(%rax),%edi
jmp    1140 <strstrip+0x20>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @strstrip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @rtrim(i8** %2)
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
%11 = load i8, i8* %10
%12 = call i64 @isspace(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %8
14: ; preds = %8, %1
%15 = load i8*, i8** %2
ret i8* %15
}
int XmbTextPropertyToTextList() {}


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

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

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

LLVM IR (-O2):
define i32 @XmbTextPropertyToTextList() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ initStrips();
void play_welcome() {
  for (int w = 0; w < 5; w++) {
    initStrips();
  }
}


x86 assembly (clang, -O0):
<play_welcome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    113e <play_welcome+0x2e>
mov    $0x0,%al
call   1030 <initStrips@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <play_welcome+0xf>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @play_welcome() {
%1 = tail call i32 (...) @initStrips()
%2 = tail call i32 (...) @initStrips()
%3 = tail call i32 (...) @initStrips()
%4 = tail call i32 (...) @initStrips()
%5 = tail call i32 (...) @initStrips()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x, y;
  scanf("%d", &x);
  if (x > 5) {
    y = x;
  } else {
    y = -x;
  }
  printf("%d", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jle    1154 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    115c <main+0x3c>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
neg    %esi
cmp    $0x6,%eax
cmovge %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 5
%6 = sub nsw i32 0, %4
%7 = select i1 %5, i32 %4, i32 %6
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}