xunge/DecIR huggingface dataset:
int is_id_char(ch)
int ch;
{
  return ((1 && isalnum((sizeof(ch) == sizeof(unsigned char)
                             ? (int)(unsigned char)(ch)
                             : (int)(ch)))) ||
          (ch == '_') || (ch == '$'));
}


x86 assembly (clang, -O0):
<is_id_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    114c <is_id_char+0x3c>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114c <is_id_char+0x3c>
cmpl   $0x24,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_id_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %eax,%eax
setne  %al
cmp    $0x5f,%ebx
sete   %cl
cmp    $0x24,%ebx
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_id_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isalnum(i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 95
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 36
br label %12
12: ; preds = %9, %6, %1
%13 = phi i1 [ true, %6 ], [ true, %1 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_id_char(i32 %0) {
%2 = tail call i32 @isalnum(i32 %0)
%3 = icmp ne i32 %2, 0
%4 = icmp eq i32 %0, 95
%5 = or i1 %4, %3
%6 = icmp eq i32 %0, 36
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ aes_128_decrypt(unsigned char *, unsigned long *);
void regular_ecb_decrypt(unsigned char *reg, unsigned long long reg_len,
                         unsigned long expanded_key[44]) {
  unsigned long long cur;
  for (cur = 0; cur < reg_len; cur = cur + 16) {
    aes_128_decrypt(&reg[cur], expanded_key);
  }
}


x86 assembly (clang, -O0):
<regular_ecb_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115c <regular_ecb_decrypt+0x4c>
mov    -0x8(%rbp),%rdi
add    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <aes_128_decrypt@plt>
mov    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <regular_ecb_decrypt+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regular_ecb_decrypt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1145 <regular_ecb_decrypt+0x35>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
mov    %r14,%rsi
call   1030 <aes_128_decrypt@plt>
add    $0x10,%rbx
cmp    %r12,%rbx
jb     1130 <regular_ecb_decrypt+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @regular_ecb_decrypt(i8* %0, i64 %1, i64* %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %9, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @aes_128_decrypt(i8* %7, i64* %2)
%9 = add i64 %6, 16
%10 = icmp ult i64 %9, %1
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
unsigned short int f93(unsigned short int x, unsigned int y) {
  return (x << ((-y) & (8 * sizeof(unsigned short) - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f93>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0xf,%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f93>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f93(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = sub i32 0, %7
%9 = zext i32 %8 to i64
%10 = and i64 %9, 15
%11 = trunc i64 %10 to i32
%12 = shl i32 %6, %11
%13 = load i16, i16* %3
%14 = zext i16 %13 to i32
%15 = load i32, i32* %4
%16 = ashr i32 %14, %15
%17 = add nsw i32 %12, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f93(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 0, %1
%5 = and i32 %4, 15
%6 = shl nuw nsw i32 %3, %5
%7 = lshr i32 %3, %1
%8 = add nuw nsw i32 %6, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}
unsigned xrop3_24_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk1 = S ^ T;
  stk2 = T ^ D;
  stk1 = stk1 & stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_24_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_24_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %ecx,%edx
xor    $0xff,%edx
not    %eax
and    %edx,%eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_24_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %8
%25 = load i32, i32* %7
%26 = load i32, i32* %5
%27 = xor i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_24_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = xor i32 %4, -1
%9 = and i32 %7, %8
%10 = and i32 %9, %6
%11 = or i32 %10, %3
ret i32 %11
}
int stringHash1(char *str) {
  int i;
  int r = 0;
  for (i = 0; str[i] != '\0'; i++)
    r += str[i];
  return r;
}


x86 assembly (clang, -O0):
<stringHash1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114b <stringHash1+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <stringHash1+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringHash1>:
mov    (%rdi),%cl
test   %cl,%cl
je     1121 <stringHash1+0x21>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <stringHash1+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stringHash1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8 [ %12, %4 ], [ %2, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add nsw i32 %7, %8
%10 = add nuw nsw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ glmCos3f(float *, float *);
int /*<<< orphan*/ glmRadians3f(float *, float const *);
void glmCosD3f(float out[3], const float angle[3]) {
  glmRadians3f(out, angle);
  glmCos3f(out, out);
}


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

x86 assembly (clang, -O2):
<glmCosD3f>:
push   %rbx
mov    %rdi,%rbx
call   1040 <glmRadians3f@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <glmCos3f@plt>

LLVM IR (-O0):
define void @glmCosD3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @glmRadians3f(float* %5, float* %6)
%8 = load float*, float** %3
%9 = load float*, float** %3
%10 = call i32 @glmCos3f(float* %8, float* %9)
ret void
}

LLVM IR (-O2):
define void @glmCosD3f(float* %0, float* %1) {
%3 = tail call i32 @glmRadians3f(float* %0, float* %1)
%4 = tail call i32 @glmCos3f(float* %0, float* %0)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ LogError(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
void BecomeOrphan(void) {
  pid_t child_id;
  child_id = fork();
  switch (child_id) {
  case 0:
    break;
  case -1:
    LogError("daemon fork failed, errno = %d\n", errno);
    break;
  default: {
  }
    exit(0);
  }
}


x86 assembly (clang, -O0):
<BecomeOrphan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xffffffff,%eax
je     116b <BecomeOrphan+0x3b>
jmp    1156 <BecomeOrphan+0x26>
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1185 <BecomeOrphan+0x55>
jmp    1166 <BecomeOrphan+0x36>
jmp    118c <BecomeOrphan+0x5c>
mov    0x2e6e(%rip),%rax
mov    (%rax),%esi
lea    0xe85(%rip),%rdi
call   1030 <LogError@plt>
jmp    118c <BecomeOrphan+0x5c>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BecomeOrphan>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1157 <BecomeOrphan+0x27>
cmp    $0xffffffff,%eax
jne    1159 <BecomeOrphan+0x29>
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1030 <LogError@plt>
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"daemon fork failed, errno = %d\0A\00"
@errno = global i32 0
define void @BecomeOrphan() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = load i32, i32* %1
switch i32 %3, label %8 [
i32 0, label %4
i32 -1, label %5
]
4: ; preds = %0
br label %10
5: ; preds = %0
%6 = load i32, i32* @errno
%7 = call i32 @LogError(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %5, %4
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"daemon fork failed, errno = %d\0A\00"
@errno = global i32 0
define void @BecomeOrphan() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %5 [
i32 0, label %7
i32 -1, label %2
]
2: ; preds = %0
%3 = load i32, i32* @errno
%4 = tail call i32 @LogError(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %7
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2, %0
ret void
}
/* Variables and functions */
int GET32(int);
unsigned int uart_check(void) {
  if (GET32((0x20000000 + 0x00215054)) & 0x01)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<uart_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20215054,%edi
call   1030 <GET32@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     113a <uart_check+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <uart_check+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_check>:
push   %rax
mov    $0x20215054,%edi
call   1030 <GET32@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_check() {
%1 = alloca i32
%2 = call i32 @GET32(i32 539054164)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @uart_check() {
%1 = tail call i32 @GET32(i32 539054164)
%2 = and i32 %1, 1
ret i32 %2
}
void __atomic_dec(volatile long *p) {
  asm volatile("lock; decq %0" : "=m"(*p) : "m"(*p) : "memory");
}


x86 assembly (clang, -O0):
<__atomic_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
lock decq (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_dec>:
lock decq (%rdi)
ret

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

LLVM IR (-O2):
define void @__atomic_dec(i64* %0) {
tail call void asm sideeffect "lock; decq $0", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %0, i64* elementtype(i64) %0)
ret void
}
void main_loop_wakeup() { ; }


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

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

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

LLVM IR (-O2):
define void @main_loop_wakeup() {
ret void
}
/* Type definitions */
struct hostent {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int _nss_ddnss_gethostbyname3_r(char const *, int, struct hostent *, char *,
                                size_t, int *, int *, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *);
enum nss_status _nss_ddnss_gethostbyname2_r(const char *name, int af,
                                            struct hostent *host, char *buffer,
                                            size_t buflen, int *errnop,
                                            int *h_errnop) {
  return _nss_ddnss_gethostbyname3_r(name, af, host, buffer, buflen, errnop,
                                     h_errnop, NULL, NULL);
}


x86 assembly (clang, -O0):
<_nss_ddnss_gethostbyname2_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
xor    %r10d,%r10d
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <_nss_ddnss_gethostbyname3_r@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_ddnss_gethostbyname2_r>:
sub    $0x18,%rsp
mov    0x20(%rsp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %rax,(%rsp)
call   1030 <_nss_ddnss_gethostbyname3_r@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
define i32 @_nss_ddnss_gethostbyname2_r(i8* %0, i32 %1, %struct.hostent* %2, i8* %3, i64 %4, i32* %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca %struct.hostent*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32*
%14 = alloca i32*
store i8* %0, i8** %8
store i32 %1, i32* %9
store %struct.hostent* %2, %struct.hostent** %10
store i8* %3, i8** %11
store i64 %4, i64* %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load %struct.hostent*, %struct.hostent** %10
%18 = load i8*, i8** %11
%19 = load i64, i64* %12
%20 = load i32*, i32** %13
%21 = load i32*, i32** %14
%22 = call i32 @_nss_ddnss_gethostbyname3_r(i8* %15, i32 %16, %struct.hostent* %17, i8* %18, i64 %19, i32* %20, i32* %21, i32* null, i32* null)
ret i32 %22
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
define i32 @_nss_ddnss_gethostbyname2_r(i8* %0, i32 %1, %struct.hostent* %2, i8* %3, i64 %4, i32* %5, i32* %6) {
%8 = tail call i32 @_nss_ddnss_gethostbyname3_r(i8* %0, i32 %1, %struct.hostent* %2, i8* %3, i64 %4, i32* %5, i32* %6, i32* null, i32* null)
ret i32 %8
}
void force_eval_double(double x) {
  volatile double y __attribute__((unused)) = x;
}


x86 assembly (clang, -O0):
<force_eval_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<force_eval_double>:
movsd  %xmm0,-0x8(%rsp)
ret

LLVM IR (-O0):
define void @force_eval_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store volatile double %4, double* %3
ret void
}

LLVM IR (-O2):
define void @force_eval_double(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char const *, char *);
int is_const(const char *arg) { return (NULL != strstr(arg, "const ")); }


x86 assembly (clang, -O0):
<is_const>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_const>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"const \00"
define i32 @is_const(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @strstr(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* null, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"const \00"
define i32 @is_const(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ findMedianSortedArrays(int *, int, int *, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  int nums1[] = {2, 3, 4};
  int nums1Size = 3;
  int nums2[] = {1};
  int nums2Size = 1;
  printf("findMedianSortedArrays =  %.2lf\n",
         findMedianSortedArrays(nums1, nums1Size, nums2, nums2Size));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x3,-0x14(%rbp)
mov    0xebc(%rip),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <findMedianSortedArrays@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
movl   $0x1,0x4(%rsp)
lea    0x8(%rsp),%rdi
lea    0x4(%rsp),%rdx
mov    $0x3,%esi
mov    $0x1,%ecx
call   1040 <findMedianSortedArrays@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.nums1 = [3 x i32] [i32 2, i32 3, i32 4]
@__const.main.nums2 = [1 x i32] [i32 1]
@.str = [33 x i8] c"findMedianSortedArrays = %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca [1 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [3 x i32]* %2 to i8*
store i32 3, i32* %3
%7 = bitcast [1 x i32]* %4 to i8*
store i32 1, i32* %5
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%11 = load i32, i32* %5
%12 = call i32 @findMedianSortedArrays(i32* %8, i32 %9, i32* %10, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums1 = [3 x i32] [i32 2, i32 3, i32 4]
@.str = [33 x i8] c"findMedianSortedArrays = %.2lf\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 1, i32* %5
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = call i32 @findMedianSortedArrays(i32* %6, i32 3, i32* %5, i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
int f4(int t) {
  int a = 32 - t;
  return (int)(32 - (unsigned)a);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x20,%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 32, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sub i32 32, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f4(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ dec2bin(char *, int);
int /*<<< orphan*/ printf(char *);
void bit_neg(int flag, int mask) {
  dec2bin("   flag ", flag);
  dec2bin("neg (~) ", ~flag);
  printf("\n");
}


x86 assembly (clang, -O0):
<bit_neg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1040 <dec2bin@plt>
mov    -0x4(%rbp),%esi
xor    $0xffffffff,%esi
lea    0xebf(%rip),%rdi
call   1040 <dec2bin@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_neg>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
not    %ebx
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c"neg (~) \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @bit_neg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = xor i32 %7, -1
%9 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c"neg (~) \00"
define void @bit_neg(i32 %0, i32 %1) {
%3 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = xor i32 %0, -1
%5 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int syscall(int, int, char const *, int);
int finit_module(int fd, const char *uargs, int flags) {
  if (-1 == -1) {
    errno = ENOSYS;
    return -1;
  }
  return syscall(-1, fd, uargs, flags);
}


x86 assembly (clang, -O0):
<finit_module>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<finit_module>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @finit_module(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @finit_module(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
int function_key(int key) { return key > 255 || key == ' ' || key == 10; }


x86 assembly (clang, -O0):
<function_key>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1132 <function_key+0x32>
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1132 <function_key+0x32>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_key>:
cmp    $0x100,%edi
setge  %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
cmp    $0xa,%edi
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @function_key(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 255
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 32
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @function_key(i32 %0) {
%2 = icmp sgt i32 %0, 255
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = icmp eq i32 %0, 10
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ptr_glFinish();
extern void glFinish(void) { ptr_glFinish(); }


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

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

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

LLVM IR (-O2):
define void @glFinish() {
%1 = tail call i32 (...) @ptr_glFinish()
ret void
}
int fibo(int n) {
  if (n == 1)
    return 0;
  if (n == 2)
    return 1;
  if (n > 2)
    return fibo(n - 1) + fibo(n - 2);
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <fibo+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1174 <fibo+0x64>
cmpl   $0x2,-0x8(%rbp)
jne    1147 <fibo+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1174 <fibo+0x64>
cmpl   $0x2,-0x8(%rbp)
jle    1174 <fibo+0x64>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
xor    %r14d,%r14d
xor    %ebp,%ebp
cmp    $0x1,%ebx
je     1141 <fibo+0x31>
cmp    $0x2,%ebx
je     113b <fibo+0x2b>
jle    1141 <fibo+0x31>
lea    -0x1(%rbx),%edi
call   1030 <fibo@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x1,%ebx
jne    1120 <fibo+0x10>
jmp    1141 <fibo+0x31>
mov    $0x1,%r14d
add    %ebp,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo(i32 %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ 0, %1 ], [ %11, %7 ]
%4 = phi i32 [ %0, %1 ], [ %10, %7 ]
switch i32 %4, label %5 [
i32 1, label %12
i32 2, label %13
]
5: ; preds = %2
%6 = icmp sgt i32 %4, 2
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = add nsw i32 %4, -1
%9 = tail call i32 @fibo(i32 %8)
%10 = add nsw i32 %4, -2
%11 = add nsw i32 %9, %3
br label %2
12: ; preds = %5, %2
br label %13
13: ; preds = %2, %12
%14 = phi i32 [ 0, %12 ], [ 1, %2 ]
%15 = add nsw i32 %14, %3
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xfb() {
  Assert_real((isodigit(251) == 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_isodigit.c",
              1260, ("isodigit should be 0 for 0xfb"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xfb\00"
define void @t_isodigit_0xfb() {
%1 = call i64 @isodigit(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xfb\00"
define void @t_isodigit_0xfb() {
%1 = tail call i64 @isodigit(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmRadians3f(float *, float const *);
int /*<<< orphan*/ glmTan3f(float *, float *);
void glmTanD3f(float out[3], const float angle[3]) {
  glmRadians3f(out, angle);
  glmTan3f(out, out);
}


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

x86 assembly (clang, -O2):
<glmTanD3f>:
push   %rbx
mov    %rdi,%rbx
call   1040 <glmRadians3f@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <glmTan3f@plt>

LLVM IR (-O0):
define void @glmTanD3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @glmRadians3f(float* %5, float* %6)
%8 = load float*, float** %3
%9 = load float*, float** %3
%10 = call i32 @glmTan3f(float* %8, float* %9)
ret void
}

LLVM IR (-O2):
define void @glmTanD3f(float* %0, float* %1) {
%3 = tail call i32 @glmRadians3f(float* %0, float* %1)
%4 = tail call i32 @glmTan3f(float* %0, float* %0)
ret void
}
/* Variables and functions */
char *hdate_string(int, int const, int const, int /*<<< orphan*/);
char *hdate_get_day_string(int const day_of_week, int const short_form) {
  return hdate_string(1, day_of_week, short_form, 0);
}


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

x86 assembly (clang, -O2):
<hdate_get_day_string>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1,%edi
xor    %ecx,%ecx
jmp    1030 <hdate_string@plt>

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

LLVM IR (-O2):
define i8* @hdate_get_day_string(i32 %0, i32 %1) {
%3 = tail call i8* @hdate_string(i32 1, i32 %0, i32 %1, i32 0)
ret i8* %3
}
void PWM1Generator1_Handler(void) {
  while (1) {
  }
}


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

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

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

LLVM IR (-O2):
define void @PWM1Generator1_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double firstNumber, secondNumber, result;
  printf("Enter two number:\n");
  scanf("%lf %lf", &firstNumber, &secondNumber);
  result = firstNumber * secondNumber;
  printf("Result = %.2lf\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter two number:\0A\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [16 x i8] c"Result = %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fmul double %7, %8
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [16 x i8] c"Result = %.2lf\0A\00"
@str = [18 x i8] c"Enter two number:\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}
int test7b(int y) {
  int x = x;
  if (y)
    x = 1;
  return x;
}


x86 assembly (clang, -O0):
<test7b>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111e <test7b+0x1e>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test7b(i32 %0) {
ret i32 1
}
int do_767() { return 767; }


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

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

LLVM IR (-O0):
define i32 @do_767() {
ret i32 767
}

LLVM IR (-O2):
define i32 @do_767() {
ret i32 767
}
int SomeFunctionInFoo() { return 5; }


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

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

LLVM IR (-O0):
define i32 @SomeFunctionInFoo() {
ret i32 5
}

LLVM IR (-O2):
define i32 @SomeFunctionInFoo() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int other_function();
void app_main(void) { assert(other_function() == 3); }


x86 assembly (clang, -O0):
<app_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <other_function@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_main>:
push   %rax
xor    %eax,%eax
call   1040 <other_function@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @app_main() {
%1 = call i32 (...) @other_function()
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
define void @app_main() {
%1 = tail call i32 (...) @other_function()
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
void sizeof_vla(int a) {
  if (a == 5) {
    char x[a];
    int y[sizeof(x)];
    y[4] = 4;
    y[5] = 5;
  }
}


x86 assembly (clang, -O0):
<sizeof_vla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jne    1167 <sizeof_vla+0x67>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x20(%rbp)
movl   $0x4,0x10(%rax)
movl   $0x5,0x14(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @sizeof_vla(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = alloca i8, i64 %10
store i64 %10, i64* %4
%13 = alloca i32, i64 %10
store i64 %10, i64* %5
%14 = getelementptr inbounds i32, i32* %13, i64 4
store i32 4, i32* %14
%15 = getelementptr inbounds i32, i32* %13, i64 5
store i32 5, i32* %15
%16 = load i8*, i8** %3
br label %17
17: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @sizeof_vla(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_write(int, unsigned int, char *);
void outl(unsigned int value, unsigned short int port) {
  check_write((int)port, value, "outl");
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
call   1030 <check_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
mov    %edi,%eax
lea    0xee7(%rip),%rdx
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <check_write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"outl\00"
define void @outl(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = load i32, i32* %3
%8 = call i32 @check_write(i32 %6, i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"outl\00"
define void @outl(i32 %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = tail call i32 @check_write(i32 %3, i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void showHelp(void) {
  printf("Usage:\n    ask -m <message> -d <default option> -o <option1> -o "
         "<option2> ...\n\n    Returns number of option selected (0 for first, "
         "1 for second...)\n    Returns -1 on invalid selection\n    Returns "
         "-2 after displaying this help message\n\nOptions:\n    '-m str' Set "
         "message to user to \"str\"\n    '-d x' set default answer to \"x\"\n "
         "   '-o x' add option \"x\"\n");
  exit(-2);
}


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

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

LLVM IR (-O0):
@.str = [350 x i8] c"Usage:\0A ask -m <message> -d <default option> -o <option1> -o <option2> ...\0A\0A Returns number of option selected (0 for first, 1 for second...)\0A Returns -1 on invalid selection\0A Returns -2 after displaying this help message\0A\0AOptions:\0A '-m str' Set message to user to \22str\22\0A '-d x' set default answer to \22x\22\0A '-o x' add option \22x\22\0A\00"
define void @showHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([350 x i8], [350 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -2)
unreachable
}

LLVM IR (-O2):
@str = [349 x i8] c"Usage:\0A ask -m <message> -d <default option> -o <option1> -o <option2> ...\0A\0A Returns number of option selected (0 for first, 1 for second...)\0A Returns -1 on invalid selection\0A Returns -2 after displaying this help message\0A\0AOptions:\0A '-m str' Set message to user to \22str\22\0A '-d x' set default answer to \22x\22\0A '-o x' add option \22x\22\00"
define void @showHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([349 x i8], [349 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -2)
unreachable
}
int test_imm_A4int64_lowword_reg(long long val) {
  return ((val) & (0xA4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A4int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 164
%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_A4int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 164
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
char __scan_char(const char **_str, int flags) {
  char c;
  c = **_str;
  (*_str)++;
  return c;
}


x86 assembly (clang, -O0):
<__scan_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movsbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__scan_char>:
mov    (%rdi),%rcx
mov    (%rcx),%al
add    $0x1,%rcx
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define signext i8 @__scan_char(i8** nocapture %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %5, i8** %0
ret i8 %4
}