xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void outLong(long *x) {
  if (x)
    printf("%ld ", *x);
}


x86 assembly (clang, -O0):
<outLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113a <outLong+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outLong>:
test   %rdi,%rdi
je     1124 <outLong+0x14>
mov    (%rdi),%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld \00"
define void @outLong(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = icmp ne i64* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64*, i64** %2
%7 = load i64, i64* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld \00"
define void @outLong(i64* %0) {
%2 = icmp eq i64* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i64, i64* %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glColor3fv(float *);
void Color3fv(float v[3]) { glColor3fv(v); }


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

x86 assembly (clang, -O2):
<Color3fv>:
jmp    1030 <glColor3fv@plt>

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

LLVM IR (-O2):
define void @Color3fv(float* %0) {
%2 = tail call i32 @glColor3fv(float* %0)
ret void
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
int __isnormalf(float x) {
  unsigned int iexp;
  union {
    u_int32_t lval;
    float fval;
  } z;
  z.fval = x;
  iexp = z.lval & 0x7f800000;
  return ((iexp != 0x7f800000) && (iexp != 0));
}


x86 assembly (clang, -O0):
<__isnormalf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x7f800000,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x7f800000,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     113a <__isnormalf+0x3a>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isnormalf>:
movd   %xmm0,%eax
and    $0x7f800000,%eax
cmp    $0x7f800000,%eax
setne  %cl
test   %eax,%eax
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @__isnormalf(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca %union.anon
store float %0, float* %2
%5 = load float, float* %2
%6 = bitcast %union.anon* %4 to float*
store float %5, float* %6
%7 = bitcast %union.anon* %4 to i32*
%8 = load i32, i32* %7
%9 = and i32 %8, 2139095040
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 2139095040
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %12, %1
%16 = phi i1 [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @__isnormalf(float %0) {
%2 = bitcast float %0 to i32
%3 = and i32 %2, 2139095040
%4 = icmp ne i32 %3, 2139095040
%5 = icmp ne i32 %3, 0
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
void ff_hevc_put_hevc_uni_qpel_v12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v12_8_sse4() {
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ maxDiamter(struct TreeNode *, int *);
int diameterOfBinaryTree(struct TreeNode *root) {
  int max = 0;
  if (root) {
    maxDiamter(root, &max);
  }
  return max;
}


x86 assembly (clang, -O0):
<diameterOfBinaryTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113b <diameterOfBinaryTree+0x2b>
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <maxDiamter@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diameterOfBinaryTree>:
push   %rax
movl   $0x0,0x4(%rsp)
test   %rdi,%rdi
je     112e <diameterOfBinaryTree+0x1e>
lea    0x4(%rsp),%rsi
call   1030 <maxDiamter@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @diameterOfBinaryTree(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = icmp eq %struct.TreeNode* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 @maxDiamter(%struct.TreeNode* %0, i32* %2)
%7 = load i32, i32* %2
br label %8
8: ; preds = %5, %1
%9 = phi i32 [ %7, %5 ], [ 0, %1 ]
ret i32 %9
}
unsigned long int sum1N(unsigned long int n) { return ((n * (n + 1)) / 2); }


x86 assembly (clang, -O0):
<sum1N>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
shr    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum1N>:
lea    0x1(%rdi),%rax
imul   %rdi,%rax
shr    %rax
ret

LLVM IR (-O0):
define i64 @sum1N(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = add i64 %4, 1
%6 = mul i64 %3, %5
%7 = udiv i64 %6, 2
ret i64 %7
}

LLVM IR (-O2):
define i64 @sum1N(i64 %0) {
%2 = add i64 %0, 1
%3 = mul i64 %2, %0
%4 = lshr i64 %3, 1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int);
int Buf_toInt(const char *x) {
  int len = sizeof(int) + 1;
  char buf[len];
  memcpy(buf, x, sizeof(int));
  buf[len - 1] = '\0';
  return (int)strtol(buf, NULL, 10);
  return 0;
}


x86 assembly (clang, -O0):
<Buf_toInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Buf_toInt>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
movb   $0x0,0x4(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Buf_toInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %2
store i32 5, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %4
%9 = alloca i8, i64 %7
store i64 %7, i64* %5
%10 = load i8*, i8** %2
%11 = call i32 @memcpy(i8* %9, i8* %10, i32 4)
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %9, i64 %14
store i8 0, i8* %15
%16 = call i64 @strtol(i8* %9, i32* null, i32 10)
%17 = trunc i64 %16 to i32
%18 = load i8*, i8** %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @Buf_toInt(i8* %0) {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 4
store i8 0, i8* %5
%6 = call i64 @strtol(i8* nocapture %3, i32* null, i32 10)
%7 = trunc i64 %6 to i32
ret i32 %7
}
int egsy_gcm_mult_lena_lsb_csr_debug_set(
    unsigned int dev_id, union egsy_gcm_mult_lena_lsb_csr_debug_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<egsy_gcm_mult_lena_lsb_csr_debug_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.egsy_gcm_mult_lena_lsb_csr_debug_u = type opaque
define i32 @egsy_gcm_mult_lena_lsb_csr_debug_set(i32 %0, %union.egsy_gcm_mult_lena_lsb_csr_debug_u* %1) {
%3 = alloca i32
%4 = alloca %union.egsy_gcm_mult_lena_lsb_csr_debug_u*
store i32 %0, i32* %3
store %union.egsy_gcm_mult_lena_lsb_csr_debug_u* %1, %union.egsy_gcm_mult_lena_lsb_csr_debug_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.egsy_gcm_mult_lena_lsb_csr_debug_u = type opaque
define i32 @egsy_gcm_mult_lena_lsb_csr_debug_set(i32 %0, %union.egsy_gcm_mult_lena_lsb_csr_debug_u* nocapture readnone %1) {
ret i32 1
}
void _reverse(int *nums, int from, int to) {
  int tmp;
  while (from < to) {
    tmp = nums[from];
    nums[from] = nums[to];
    nums[to] = tmp;
    from += 1;
    to -= 1;
  }
}


x86 assembly (clang, -O0):
<_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <_reverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <_reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_reverse>:
cmp    %edx,%esi
jge    112e <_reverse+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <_reverse+0x10>
ret

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

LLVM IR (-O2):
define void @_reverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printStaticLocalVariable() {
  static int numberone = 2;
  printf("Function printStaticLocalVariable, variable = %d\n", numberone);
  numberone = numberone + 5;
}


x86 assembly (clang, -O0):
<printStaticLocalVariable>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0e(%rip),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2efc(%rip),%eax
add    $0x5,%eax
mov    %eax,0x2ef3(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStaticLocalVariable>:
push   %rax
mov    0x2f11(%rip),%esi
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
addl   $0x5,0x2efe(%rip)
pop    %rax
ret

LLVM IR (-O0):
@printStaticLocalVariable.numberone = internal global i32 2
@.str = [50 x i8] c"Function printStaticLocalVariable, variable = %d\0A\00"
define void @printStaticLocalVariable() {
%1 = load i32, i32* @printStaticLocalVariable.numberone
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @printStaticLocalVariable.numberone
%4 = add nsw i32 %3, 5
store i32 %4, i32* @printStaticLocalVariable.numberone
ret void
}

LLVM IR (-O2):
@printStaticLocalVariable.numberone = internal unnamed_addr global i32 2
@.str = [50 x i8] c"Function printStaticLocalVariable, variable = %d\0A\00"
define void @printStaticLocalVariable() {
%1 = load i32, i32* @printStaticLocalVariable.numberone
%2 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @printStaticLocalVariable.numberone
%4 = add nsw i32 %3, 5
store i32 %4, i32* @printStaticLocalVariable.numberone
ret void
}
/* Variables and functions */
int /*<<< orphan*/ musclient_init();
int /*<<< orphan*/ musserv_init();
int mus_init() {
  musserv_init();
  musclient_init();
  return 0;
}


x86 assembly (clang, -O0):
<mus_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <musserv_init@plt>
mov    $0x0,%al
call   1040 <musclient_init@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mus_init() {
%1 = call i32 (...) @musserv_init()
%2 = call i32 (...) @musclient_init()
ret i32 0
}

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


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

x86 assembly (clang, -O2):
<t_ispunct_0x1a>:
push   %rax
mov    $0x1a,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x87,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x1a\00"
define void @t_ispunct_0x1a() {
%1 = tail call i64 @ispunct(i32 26)
%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 135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ const *g;
  int /*<<< orphan*/ const *N;
};
typedef TYPE_1__ SRP_user_pwd;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
void SRP_user_pwd_set_gN(SRP_user_pwd *vinfo, const BIGNUM *g,
                         const BIGNUM *N) {
  vinfo->N = N;
  vinfo->g = g;
}


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

x86 assembly (clang, -O2):
<SRP_user_pwd_set_gN>:
mov    %rdx,0x8(%rdi)
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32*, i32* }
define void @SRP_user_pwd_set_gN(%struct.TYPE_3__* %0, i32* %1, i32* %2) {
%4 = alloca %struct.TYPE_3__*
%5 = alloca i32*
%6 = alloca i32*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 1
store i32* %7, i32** %9
%10 = load i32*, i32** %5
%11 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %11, i32 0, i32 0
store i32* %10, i32** %12
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32*, i32* }
define void @SRP_user_pwd_set_gN(%struct.TYPE_3__* nocapture writeonly %0, i32* %1, i32* %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
store i32* %2, i32** %4
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
store i32* %1, i32** %5
ret void
}
void FIQ_Exception(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<FIQ_Exception>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <FIQ_Exception+0x9>
jmp    1109 <FIQ_Exception+0x9>

x86 assembly (clang, -O2):
<FIQ_Exception>:
jmp    1100 <FIQ_Exception>

LLVM IR (-O0):
define void @FIQ_Exception() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @FIQ_Exception() {
br label %1
1: ; preds = %0, %1
br label %1
}
int chdir(const char *patch) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @chdir(i8* nocapture readnone %0) {
ret i32 0
}
void transfer_RGB888_to_RGB8(unsigned char *(*output), unsigned char *input) {
  *(*output) = (unsigned char)((input[0] & 0xc0) + ((input[1] & 0xe0) >> 2) +
                               ((input[2] & 0xe0) >> 5));
  (*output)++;
}


x86 assembly (clang, -O0):
<transfer_RGB888_to_RGB8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
and    $0xc0,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xe0,%ecx
sar    $0x2,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
and    $0xe0,%ecx
sar    $0x5,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_RGB888_to_RGB8>:
mov    (%rsi),%al
mov    0x1(%rsi),%cl
and    $0xc0,%al
shr    $0x2,%cl
and    $0x38,%cl
or     %al,%cl
mov    0x2(%rsi),%al
shr    $0x5,%al
or     %cl,%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @transfer_RGB888_to_RGB8(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = and i32 %8, 192
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 224
%15 = ashr i32 %14, 2
%16 = add nsw i32 %9, %15
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = and i32 %20, 224
%22 = ashr i32 %21, 5
%23 = add nsw i32 %16, %22
%24 = trunc i32 %23 to i8
%25 = load i8**, i8*** %3
%26 = load i8*, i8** %25
store i8 %24, i8* %26
%27 = load i8**, i8*** %3
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %27
ret void
}

LLVM IR (-O2):
define void @transfer_RGB888_to_RGB8(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = and i8 %3, -64
%5 = getelementptr inbounds i8, i8* %1, i64 1
%6 = load i8, i8* %5
%7 = lshr i8 %6, 2
%8 = and i8 %7, 56
%9 = or i8 %8, %4
%10 = getelementptr inbounds i8, i8* %1, i64 2
%11 = load i8, i8* %10
%12 = lshr i8 %11, 5
%13 = or i8 %9, %12
%14 = load i8*, i8** %0
store i8 %13, i8* %14
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %0
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int sock_connect(const char *const host, const char *const port) {
  int gai_rc = 0;
  int opt = 1;
  struct addrinfo hints;
  struct addrinfo *res = NULL;
  (void)memset(&hints, 0, sizeof(struct addrinfo));
}


x86 assembly (clang, -O0):
<sock_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movq   $0x0,-0x30(%rbp)
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_connect>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define i32 @sock_connect(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.addrinfo
%9 = alloca %struct.addrinfo*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
store i32 1, i32* %7
store %struct.addrinfo* null, %struct.addrinfo** %9
%10 = call i32 @memset(%struct.addrinfo* %8, i32 0, i32 4)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define i32 @sock_connect(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = alloca %struct.addrinfo
%4 = bitcast %struct.addrinfo* %3 to i8*
%5 = call i32 @memset(%struct.addrinfo* %3, i32 0, i32 4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void pr_err(char *s) {
  printf("error: %s\n", s);
  exit(-1);
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"error: %s\0A\00"
define void @pr_err(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
int app_function(int x) { return x + 27; }


x86 assembly (clang, -O0):
<app_function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1b,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_function>:
lea    0x1b(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @app_function(i32 %0) {
%2 = add nsw i32 %0, 27
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ptr_glPopMatrix();
extern void glPopMatrix(void) { ptr_glPopMatrix(); }


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

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

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

LLVM IR (-O2):
define void @glPopMatrix() {
%1 = tail call i32 (...) @ptr_glPopMatrix()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void g_sleep(int msecs) { usleep(msecs * 1000); }


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

x86 assembly (clang, -O2):
<g_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @g_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @g_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int fibo(int);
int main(void) {
  int counter = 50000;
  int fib;
  while (counter) {
    fib = fibo(40);
    counter -= 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc350,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114b <main+0x3b>
mov    $0x28,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffff3cb0,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x28,%edi
call   1030 <fibo@plt>
inc    %ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 50000, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @fibo(i32 40)
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 50000, %0 ], [ %4, %1 ]
%3 = tail call i32 @fibo(i32 40)
%4 = add nsw i32 %2, -1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ModelicaNotExistError(char *);
const char *ModelicaInternal_fullPathName(const char *name) {
  char *fullName = "";
  ModelicaNotExistError("ModelicaInternal_fullPathName");
  return fullName;
}


x86 assembly (clang, -O0):
<ModelicaInternal_fullPathName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xefa(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <ModelicaNotExistError@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ModelicaInternal_fullPathName>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ModelicaNotExistError@plt>
lea    0xef9(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [30 x i8] c"ModelicaInternal_fullPathName\00"
define i8* @ModelicaInternal_fullPathName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = call i32 @ModelicaNotExistError(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %3
ret i8* %5
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [30 x i8] c"ModelicaInternal_fullPathName\00"
define i8* @ModelicaInternal_fullPathName(i8* nocapture readnone %0) {
%2 = tail call i32 @ModelicaNotExistError(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double errorMult(double, double, double, double);
double errorPow(double A, double errorA, double index) {
  return index * errorMult(A, errorA, A, errorA);
}


x86 assembly (clang, -O0):
<errorPow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
call   1030 <errorMult@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorPow>:
push   %rax
movsd  %xmm2,(%rsp)
movapd %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1030 <errorMult@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @errorPow(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = load double, double* %4
%11 = load double, double* %5
%12 = call double @errorMult(double %8, double %9, double %10, double %11)
%13 = fmul double %7, %12
ret double %13
}

LLVM IR (-O2):
define double @errorPow(double %0, double %1, double %2) {
%4 = tail call double @errorMult(double %0, double %1, double %0, double %1)
%5 = fmul double %4, %2
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ makeDIB(int, int, int);
int /*<<< orphan*/ x11_makeWorkImage(int, int);
void init_offscreen(void) {
  makeDIB(640, 480, 8);
  x11_makeWorkImage(640, 480);
}


x86 assembly (clang, -O0):
<init_offscreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x8,%edx
call   1040 <makeDIB@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
call   1030 <x11_makeWorkImage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_offscreen>:
push   %rax
mov    $0x280,%edi
mov    $0x1e0,%esi
mov    $0x8,%edx
call   1040 <makeDIB@plt>
mov    $0x280,%edi
mov    $0x1e0,%esi
pop    %rax
jmp    1030 <x11_makeWorkImage@plt>

LLVM IR (-O0):
define void @init_offscreen() {
%1 = call i32 @makeDIB(i32 640, i32 480, i32 8)
%2 = call i32 @x11_makeWorkImage(i32 640, i32 480)
ret void
}

LLVM IR (-O2):
define void @init_offscreen() {
%1 = tail call i32 @makeDIB(i32 640, i32 480, i32 8)
%2 = tail call i32 @x11_makeWorkImage(i32 640, i32 480)
ret void
}
/* Type definitions */
struct _tuple0 {
  int dummy;
};
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_var_exp(struct _tuple0 *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_unknownid_exp(struct _tuple0 *q, unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_var_exp(q, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_unknownid_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <Cyc_Absyn_var_exp@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_unknownid_exp>:
jmp    1030 <Cyc_Absyn_var_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct._tuple0 = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_unknownid_exp(%struct._tuple0* %0, i32 %1) {
%3 = alloca %struct._tuple0*
%4 = alloca i32
%5 = alloca %struct.Cyc_Absyn_Exp*
store %struct._tuple0* %0, %struct._tuple0** %3
store i32 %1, i32* %4
%6 = load %struct._tuple0*, %struct._tuple0** %3
%7 = load i32, i32* %4
%8 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_var_exp(%struct._tuple0* %6, i32 %7)
store %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp** %5
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
ret %struct.Cyc_Absyn_Exp* %9
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct._tuple0 = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_unknownid_exp(%struct._tuple0* %0, i32 %1) {
%3 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_var_exp(%struct._tuple0* %0, i32 %1)
ret %struct.Cyc_Absyn_Exp* %3
}
void yy_1_pExtSpaceAtom(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_pExtSpaceAtom(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_inwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_inwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_inwstr+0x2a>
jmp    1170 <cmd_inwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_inwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_inwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_inwstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_inwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int AMI_Up_RegisterBit8(void *, int, int);
int /*<<< orphan*/ AMI_udelay(int);
int AMI_SRSTset(void *i2c_hnd) {
  int res = 0;
  res = AMI_Up_RegisterBit8(i2c_hnd, 0x1d, 0x80);
  AMI_udelay(250);
  return (res);
}


x86 assembly (clang, -O0):
<AMI_SRSTset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1d,%esi
mov    $0x80,%edx
call   1030 <AMI_Up_RegisterBit8@plt>
mov    %eax,-0xc(%rbp)
mov    $0xfa,%edi
call   1040 <AMI_udelay@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMI_SRSTset>:
push   %rbx
mov    $0x1d,%esi
mov    $0x80,%edx
call   1030 <AMI_Up_RegisterBit8@plt>
mov    %eax,%ebx
mov    $0xfa,%edi
call   1040 <AMI_udelay@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @AMI_SRSTset(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @AMI_Up_RegisterBit8(i8* %4, i32 29, i32 128)
store i32 %5, i32* %3
%6 = call i32 @AMI_udelay(i32 250)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @AMI_SRSTset(i8* %0) {
%2 = tail call i32 @AMI_Up_RegisterBit8(i8* %0, i32 29, i32 128)
%3 = tail call i32 @AMI_udelay(i32 250)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, unsigned long, unsigned long);
void panic_decode_fail(unsigned long eip, unsigned long bAddr) {
  panic("Illegal Instruction -- Decode had failed! eip = %lx byte = %lx\n", eip,
        bAddr);
}


x86 assembly (clang, -O0):
<panic_decode_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<panic_decode_fail>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"Illegal Instruction -- Decode had failed! eip = %lx byte = %lx\0A\00"
define void @panic_decode_fail(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @panic(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c"Illegal Instruction -- Decode had failed! eip = %lx byte = %lx\0A\00"
define void @panic_decode_fail(i64 %0, i64 %1) {
%3 = tail call i32 @panic(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int errno;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int, char *);
char *strerror(int);
int main() {
  FILE *fp;
  fp = fopen(" test.txt ", "r");
  printf("ErrorCode [%d]: %s\n ", errno, strerror(errno));
  perror("Message from perror");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x14(%rbp),%esi
mov    %rax,%rdx
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1040 <fopen@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1060 <strerror@plt>
lea    0xea0(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c" test.txt \00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"ErrorCode [%d]: %s\0A \00"
@errno = global i32 0
@.str.3 = [20 x i8] c"Message from perror\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32, i32* @errno
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %4, i8* %6)
%8 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c" test.txt \00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [21 x i8] c"ErrorCode [%d]: %s\0A \00"
@errno = global i32 0
@.str.3 = [20 x i8] c"Message from perror\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %2, i8* %3)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getgid();
int /*<<< orphan*/ getuid();
int /*<<< orphan*/ setgid(int /*<<< orphan*/);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
void spma_lose_privs(void) {
  setuid(getuid());
  setgid(getgid());
}


x86 assembly (clang, -O0):
<spma_lose_privs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%edi
call   1060 <setuid@plt>
mov    $0x0,%al
call   1040 <getgid@plt>
mov    %eax,%edi
call   1050 <setgid@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spma_lose_privs>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%edi
call   1060 <setuid@plt>
xor    %eax,%eax
call   1040 <getgid@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <setgid@plt>

LLVM IR (-O0):
define void @spma_lose_privs() {
%1 = call i32 (...) @getuid()
%2 = call i32 @setuid(i32 %1)
%3 = call i32 (...) @getgid()
%4 = call i32 @setgid(i32 %3)
ret void
}

LLVM IR (-O2):
define void @spma_lose_privs() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @setuid(i32 %1)
%3 = tail call i32 (...) @getgid()
%4 = tail call i32 @setgid(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_deque_zip_iter_add();
int /*<<< orphan*/ test_deque_zip_iter_next();
int /*<<< orphan*/ test_deque_zip_iter_remove();
int /*<<< orphan*/ test_deque_zip_iter_replace();
void test_deque_zip_iter() {
  test_deque_zip_iter_remove();
  test_deque_zip_iter_next();
  test_deque_zip_iter_replace();
  test_deque_zip_iter_add();
}


x86 assembly (clang, -O0):
<test_deque_zip_iter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <test_deque_zip_iter_remove@plt>
mov    $0x0,%al
call   1050 <test_deque_zip_iter_next@plt>
mov    $0x0,%al
call   1030 <test_deque_zip_iter_replace@plt>
mov    $0x0,%al
call   1040 <test_deque_zip_iter_add@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_deque_zip_iter>:
push   %rax
xor    %eax,%eax
call   1060 <test_deque_zip_iter_remove@plt>
xor    %eax,%eax
call   1050 <test_deque_zip_iter_next@plt>
xor    %eax,%eax
call   1030 <test_deque_zip_iter_replace@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_deque_zip_iter_add@plt>

LLVM IR (-O0):
define void @test_deque_zip_iter() {
%1 = call i32 (...) @test_deque_zip_iter_remove()
%2 = call i32 (...) @test_deque_zip_iter_next()
%3 = call i32 (...) @test_deque_zip_iter_replace()
%4 = call i32 (...) @test_deque_zip_iter_add()
ret void
}

LLVM IR (-O2):
define void @test_deque_zip_iter() {
%1 = tail call i32 (...) @test_deque_zip_iter_remove()
%2 = tail call i32 (...) @test_deque_zip_iter_next()
%3 = tail call i32 (...) @test_deque_zip_iter_replace()
%4 = tail call i32 (...) @test_deque_zip_iter_add()
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *strndup(const char *s, size_t n) {
  char *result;
  result = (char *)malloc(n + 1);
  memcpy(result, s, n + 1);
  result[n] = 0;
  return result;
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%r12
mov    %r12,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = add i64 %12, 1
%14 = call i32 @memcpy(i8* %10, i8* %11, i64 %13)
%15 = load i8*, i8** %5
%16 = load i64, i64* %4
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %3)
%7 = getelementptr inbounds i8, i8* %5, i64 %1
store i8 0, i8* %7
ret i8* %5
}
int test_imm_74uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x74 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_74uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 498216206336
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}