xunge/DecIR huggingface dataset:
curvisible() {}


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

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

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

LLVM IR (-O2):
define i32 @curvisible() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ edit();
int /*<<< orphan*/ loadMap(char *);
int /*<<< orphan*/ scrPos(int, int /*<<< orphan*/);
int /*<<< orphan*/ storeMap(char *);
int main(int argc, char *argv[]) {
  if (1 < argc) {
    loadMap(argv[1]);
    if (edit())
      storeMap(argv[1]);
    scrPos(22, 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    119b <main+0x5b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <loadMap@plt>
mov    $0x0,%al
call   1030 <edit@plt>
cmp    $0x0,%rax
je     118f <main+0x4f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <storeMap@plt>
mov    $0x16,%edi
xor    %esi,%esi
call   1060 <scrPos@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1174 <main+0x34>
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <loadMap@plt>
xor    %eax,%eax
call   1030 <edit@plt>
test   %rax,%rax
je     1167 <main+0x27>
mov    0x8(%rbx),%rdi
call   1040 <storeMap@plt>
mov    $0x16,%edi
xor    %esi,%esi
call   1060 <scrPos@plt>
pop    %rbx
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 1, %6
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @loadMap(i8* %11)
%13 = call i64 (...) @edit()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %8
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @storeMap(i8* %18)
br label %20
20: ; preds = %15, %8
%21 = call i32 @scrPos(i32 22, i32 0)
br label %22
22: ; preds = %20, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @loadMap(i8* %6)
%8 = tail call i64 (...) @edit()
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = load i8*, i8** %5
%12 = tail call i32 @storeMap(i8* %11)
br label %13
13: ; preds = %10, %4
%14 = tail call i32 @scrPos(i32 22, i32 0)
br label %15
15: ; preds = %13, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ be200_is_idle(int /*<<< orphan*/);
int /*<<< orphan*/ uart1_read();
int /*<<< orphan*/ uart1_writeb(float);
void be200_uart_check_idle() {
  uint8_t idx;
  idx = uart1_read();
  if (be200_is_idle(idx))
    uart1_writeb('T');
  else
    uart1_writeb('F');
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <uart1_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <be200_is_idle@plt>
cmp    $0x0,%rax
je     1166 <be200_uart_check_idle+0x36>
movss  0xea8(%rip),%xmm0
call   1040 <uart1_writeb@plt>
jmp    1173 <be200_uart_check_idle+0x43>
movss  0xe92(%rip),%xmm0
call   1040 <uart1_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %eax,%eax
call   1050 <uart1_read@plt>
mov    %eax,%edi
call   1030 <be200_is_idle@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
lea    0xeb2(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
pop    %rax
jmp    1040 <uart1_writeb@plt>

LLVM IR (-O0):
define void @be200_uart_check_idle() {
%1 = alloca i32
%2 = call i32 (...) @uart1_read()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i64 @be200_is_idle(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @uart1_writeb(float 8.400000e+01)
br label %10
8: ; preds = %0
%9 = call i32 @uart1_writeb(float 7.000000e+01)
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
define void @be200_uart_check_idle() {
%1 = tail call i32 (...) @uart1_read()
%2 = tail call i64 @be200_is_idle(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, float 7.000000e+01, float 8.400000e+01
%5 = tail call i32 @uart1_writeb(float %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookpointer8array(char *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 8));
}


x86 assembly (clang, -O0):
<lookpointer8array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
call   1030 <lookNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookpointer8array>:
shl    $0x3,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookpointer8array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 8
%8 = call i32 @lookNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @lookpointer8array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printUsage(const char *cmd) {
  printf("Usage: %s <cmd> [arg 1] [arg2] ... [arg9]\n", cmd);
}


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

x86 assembly (clang, -O2):
<printUsage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: %s <cmd> [arg 1] [arg2] ... [arg9]\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Usage: %s <cmd> [arg 1] [arg2] ... [arg9]\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
extern const char *textcat_Version(void) { return "3.4.5"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"3.4.5\00"
define i8* @textcat_Version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void hexdump(void *b, int len) {
  unsigned char *p = (unsigned char *)b;
  while (len--)
    printf("%.2X ", *p++);
  printf("\n");
}


x86 assembly (clang, -O0):
<hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1160 <hexdump+0x50>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movzbl (%rax),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1127 <hexdump+0x17>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1158 <hexdump+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <hexdump+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.2X \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @hexdump(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
store i8* %6, i8** %5
br label %7
7: ; preds = %11, %2
%8 = load i32, i32* %4
%9 = add nsw i32 %8, -1
store i32 %9, i32* %4
%10 = icmp ne i32 %8, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
%14 = load i8, i8* %12
%15 = zext i8 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %7
17: ; preds = %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.2X \00"
define void @hexdump(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = add nsw i32 %6, -1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp eq i32 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
int dns_opt_cmp(const struct dns_opt *a, const struct dns_opt *b) {
  (void)a;
  (void)b;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.dns_opt = type opaque
define i32 @dns_opt_cmp(%struct.dns_opt* %0, %struct.dns_opt* %1) {
%3 = alloca %struct.dns_opt*
%4 = alloca %struct.dns_opt*
store %struct.dns_opt* %0, %struct.dns_opt** %3
store %struct.dns_opt* %1, %struct.dns_opt** %4
%5 = load %struct.dns_opt*, %struct.dns_opt** %3
%6 = load %struct.dns_opt*, %struct.dns_opt** %4
ret i32 0
}

LLVM IR (-O2):
%struct.dns_opt = type opaque
define i32 @dns_opt_cmp(%struct.dns_opt* nocapture readnone %0, %struct.dns_opt* nocapture readnone %1) {
ret i32 0
}
int _private_foo() { return 42; }


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

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

LLVM IR (-O0):
define i32 @_private_foo() {
ret i32 42
}

LLVM IR (-O2):
define i32 @_private_foo() {
ret i32 42
}
/* Type definitions */
struct timespec {
  int tv_sec;
  unsigned long long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long long currentTimeNano() {
  struct timespec t;
  clock_gettime(CLOCK_MONOTONIC, &t);
  return t.tv_sec * 1000000000 + t.tv_nsec;
}


x86 assembly (clang, -O0):
<currentTimeNano>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentTimeNano>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movslq 0x8(%rsp),%rax
imul   $0x3b9aca00,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @currentTimeNano() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @currentTimeNano() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000000
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i64, i64* %9
%11 = add i64 %10, %8
ret i64 %11
}
void echo_info(info) const char *info;
{
  int i;
  char ch = '=';
  for (i = 0; i < 80; i++)
    printf("%c", ch);
  printf("\n%s\n", info);
}


x86 assembly (clang, -O0):
<echo_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x3d,-0xd(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x50,-0xc(%rbp)
jge    1151 <echo_info+0x41>
movsbl -0xd(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <echo_info+0x17>
mov    -0x8(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_info>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x50,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x3d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1130 <echo_info+0x10>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"\0A%s\0A\00"
define void @echo_info(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8
store i8* %0, i8** %2
store i8 61, i8* %4
store i32 0, i32* %3
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 80
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = load i8*, i8** %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %16)
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"\0A%s\0A\00"
define void @echo_info(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @putchar(i32 61)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 80
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ADC_In(void) {
  uint32_t result = 0;
  (*((volatile uint32_t *)0x40038028)) = 0x8;
  while (((*((volatile uint32_t *)0x40038004)) & 0x8) == 0) {
  };
  result = (*((volatile uint32_t *)0x400380A8)) & 0xFFF;
  (*((volatile uint32_t *)0x4003800C)) = 0x8;
  return result;
}


x86 assembly (clang, -O0):
<ADC_In>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x40038028,%eax
movl   $0x8,(%rax)
mov    $0x40038004,%eax
mov    (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
jne    112e <ADC_In+0x2e>
jmp    1116 <ADC_In+0x16>
mov    $0x400380a8,%eax
mov    (%rax),%eax
and    $0xfff,%eax
mov    %eax,-0x4(%rbp)
mov    $0x4003800c,%eax
movl   $0x8,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_In>:
movl   $0x8,0x40038028
nopl   0x0(%rax,%rax,1)
testl  $0x8,0x40038004
je     1110 <ADC_In+0x10>
mov    $0xfff,%eax
and    0x400380a8,%eax
movl   $0x8,0x4003800c
ret

LLVM IR (-O0):
define i32 @ADC_In() {
%1 = alloca i32
store i32 0, i32* %1
store volatile i32 8, i32* inttoptr (i64 1073971240 to i32*)
br label %2
2: ; preds = %6, %0
%3 = load volatile i32, i32* inttoptr (i64 1073971204 to i32*)
%4 = and i32 %3, 8
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = load volatile i32, i32* inttoptr (i64 1073971368 to i32*)
%9 = and i32 %8, 4095
store i32 %9, i32* %1
store volatile i32 8, i32* inttoptr (i64 1073971212 to i32*)
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @ADC_In() {
store volatile i32 8, i32* inttoptr (i64 1073971240 to i32*)
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1073971204 to i32*)
%3 = and i32 %2, 8
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1073971368 to i32*)
%7 = and i32 %6, 4095
store volatile i32 8, i32* inttoptr (i64 1073971212 to i32*)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *print_not_valid_type_for_debug_print(void *blank) {
  (void)(blank);
  fprintf(stderr,
          "This is not a valid type to DEBUG_PRINT, please add your type/"
          " library type to_string function wrapper to the"
          " GET_CREATE_DEBUG_STRING_FUNC _Generic Selection in the"
          "debug_print.h header. Exiting program with non-zero exit code.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_not_valid_type_for_debug_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [228 x i8] c"This is not a valid type to DEBUG_PRINT, please add your type/ library type to_string function wrapper to the GET_CREATE_DEBUG_STRING_FUNC _Generic Selection in thedebug_print.h header. Exiting program with non-zero exit code.\0A\00"
define i8* @print_not_valid_type_for_debug_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([228 x i8], [228 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [228 x i8] c"This is not a valid type to DEBUG_PRINT, please add your type/ library type to_string function wrapper to the GET_CREATE_DEBUG_STRING_FUNC _Generic Selection in thedebug_print.h header. Exiting program with non-zero exit code.\0A\00"
define noalias i8* @print_not_valid_type_for_debug_print(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([228 x i8], [228 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct obus_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ obus_node_is_unref(struct obus_node *);
int obus_node_is_ref(struct obus_node *node) {
  return !obus_node_is_unref(node);
}


x86 assembly (clang, -O0):
<obus_node_is_ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <obus_node_is_unref@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obus_node_is_ref>:
push   %rax
call   1030 <obus_node_is_unref@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.obus_node = type { i32 }
define i32 @obus_node_is_ref(%struct.obus_node* %0) {
%2 = alloca %struct.obus_node*
store %struct.obus_node* %0, %struct.obus_node** %2
%3 = load %struct.obus_node*, %struct.obus_node** %2
%4 = call i32 @obus_node_is_unref(%struct.obus_node* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.obus_node = type { i32 }
define i32 @obus_node_is_ref(%struct.obus_node* %0) {
%2 = tail call i32 @obus_node_is_unref(%struct.obus_node* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__8__IO__set();
void CC2420ControlP__CSN__set(void) { HplAtm128GeneralIOPinP__8__IO__set(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__CSN__set() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__8__IO__set()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
f(float f) { printf("%f\n", f); }


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

x86 assembly (clang, -O2):
<f>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @f(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void variable_bound_exiting_loops_widened(int x) {
  int i = 0;
  int t = 1;
  while (i < x) {
    ++i;
  }
  clang_analyzer_eval(t == 1);
}


x86 assembly (clang, -O0):
<variable_bound_exiting_loops_widened>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <variable_bound_exiting_loops_widened+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <variable_bound_exiting_loops_widened+0x19>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @variable_bound_exiting_loops_widened(i32 %0) {
%2 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int cmdline_part(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "--part=xc6slx9"))
      return 0x04001093;
  }
  return 0x04001093;
}


x86 assembly (clang, -O0):
<cmdline_part>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <cmdline_part+0x62>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <cmdline_part+0x4f>
movl   $0x4001093,-0x4(%rbp)
jmp    1179 <cmdline_part+0x69>
jmp    1164 <cmdline_part+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <cmdline_part+0x16>
movl   $0x4001093,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"--part=xc6slx9\00"
define i32 @cmdline_part(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %11
store i32 67113107, i32* %3
br label %25
20: ; preds = %11
br label %21
21: ; preds = %20
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %7
24: ; preds = %7
store i32 67113107, i32* %3
br label %25
25: ; preds = %24, %19
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @cmdline_part(i32 %0, i8** nocapture %1) {
ret i32 67113107
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int fchmod(int fildes, mode_t mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fchmod(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ _FPU_GETCW(int);
int /*<<< orphan*/ __feraiseexcept(int);
int /*<<< orphan*/ __fesetenv(int /*<<< orphan*/ const *);
int __feupdateenv(const fenv_t *envp) {
  int temp;
  _FPU_GETCW(temp);
  temp &= FE_ALL_EXCEPT;
  __fesetenv(envp);
  __feraiseexcept(temp);
  return 0;
}


x86 assembly (clang, -O0):
<__feupdateenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <_FPU_GETCW@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <__fesetenv@plt>
mov    -0xc(%rbp),%edi
call   1030 <__feraiseexcept@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__feupdateenv>:
push   %rbx
mov    %rdi,%rbx
call   1040 <_FPU_GETCW@plt>
mov    %rbx,%rdi
call   1050 <__fesetenv@plt>
xor    %edi,%edi
call   1030 <__feraiseexcept@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @__feupdateenv(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @_FPU_GETCW(i32 %4)
%6 = load i32, i32* @FE_ALL_EXCEPT
%7 = load i32, i32* %3
%8 = and i32 %7, %6
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = call i32 @__fesetenv(i32* %9)
%11 = load i32, i32* %3
%12 = call i32 @__feraiseexcept(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @__feupdateenv(i32* %0) {
%2 = tail call i32 @_FPU_GETCW(i32 undef)
%3 = tail call i32 @__fesetenv(i32* %0)
%4 = tail call i32 @__feraiseexcept(i32 0)
ret i32 0
}
int powerOf2(int n) { return 1 << n; }


x86 assembly (clang, -O0):
<powerOf2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<powerOf2>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @powerOf2(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mystrncpy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char a[] = "Hello";
  char b[8];
  mystrncpy(b, a, strlen(a));
  puts(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xa(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1050 <mystrncpy@plt>
lea    -0x12(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movw   $0x6f,0xc(%rsp)
movl   $0x6c6c6548,0x8(%rsp)
6c
lea    0x8(%rsp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1050 <mystrncpy@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.a = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = bitcast [6 x i8]* %2 to i8*
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @mystrncpy(i8* %5, i8* %6, i32 %8)
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @strlen(i8* %3)
%6 = call i32 @mystrncpy(i8* %4, i8* %3, i32 %5)
%7 = call i32 @puts(i8* %4)
ret i32 0
}
int Q_log(int val) {
  int answer = 0;
  while (val >>= 1)
    answer++;
  return answer;
}


x86 assembly (clang, -O0):
<Q_log>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <Q_log+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <Q_log+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_log>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <Q_log+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <Q_log+0x10>
ret

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

LLVM IR (-O2):
define i32 @Q_log(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ local_mcu_Pin1_clear__E();
void pollen_parts_Led1_off__E() {
  { local_mcu_Pin1_clear__E(); }
}


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

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

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

LLVM IR (-O2):
define void @pollen_parts_Led1_off__E() {
%1 = tail call i32 (...) @local_mcu_Pin1_clear__E()
ret void
}
/* Type definitions */
struct _tuple13 {
  int dummy;
};
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
struct _tuple13 *Cyc_line_rec(struct Cyc_Lexing_lexbuf *, int /*<<< orphan*/);
struct _tuple13 *Cyc_line(struct Cyc_Lexing_lexbuf *lexbuf) {
  struct _tuple13 *_T0;
  _T0 = Cyc_line_rec(lexbuf, 0);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_line>:
xor    %esi,%esi
jmp    1030 <Cyc_line_rec@plt>

LLVM IR (-O0):
%struct._tuple13 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple13* @Cyc_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca %struct._tuple13*
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call %struct._tuple13* @Cyc_line_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 0)
store %struct._tuple13* %5, %struct._tuple13** %3
%6 = load %struct._tuple13*, %struct._tuple13** %3
ret %struct._tuple13* %6
}

LLVM IR (-O2):
%struct._tuple13 = type { i32 }
%struct.Cyc_Lexing_lexbuf = type { i32 }
define %struct._tuple13* @Cyc_line(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call %struct._tuple13* @Cyc_line_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 0)
ret %struct._tuple13* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int pthread_attr_setschedpolicy(int /*<<< orphan*/ *, int);
void set_thread_policy(pthread_attr_t *attr, int policy) {
  int rs = pthread_attr_setschedpolicy(attr, policy);
  assert(rs == 0);
}


x86 assembly (clang, -O0):
<set_thread_policy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <pthread_attr_setschedpolicy@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_thread_policy>:
push   %rax
call   1030 <pthread_attr_setschedpolicy@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @set_thread_policy(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @pthread_attr_setschedpolicy(i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @set_thread_policy(i32* %0, i32 %1) {
%3 = tail call i32 @pthread_attr_setschedpolicy(i32* %0, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADC_(int);
int /*<<< orphan*/ c64_memZero();
void ADC_zp(void) {
  c64_memZero();
  ADC_(1);
}


x86 assembly (clang, -O0):
<ADC_zp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <c64_memZero@plt>
mov    $0x1,%edi
call   1040 <ADC_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_zp>:
push   %rax
xor    %eax,%eax
call   1030 <c64_memZero@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <ADC_@plt>

LLVM IR (-O0):
define void @ADC_zp() {
%1 = call i32 (...) @c64_memZero()
%2 = call i32 @ADC_(i32 1)
ret void
}

LLVM IR (-O2):
define void @ADC_zp() {
%1 = tail call i32 (...) @c64_memZero()
%2 = tail call i32 @ADC_(i32 1)
ret void
}
int test4() { return 0; }


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

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

LLVM IR (-O0):
define i32 @test4() {
ret i32 0
}

LLVM IR (-O2):
define i32 @test4() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(int);
int is_pid(const char *str) {
  int ch;
  for (; (ch = *str); str++) {
    if (!isdigit(ch))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1162 <is_pid+0x52>
mov    -0x14(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114c <is_pid+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1169 <is_pid+0x59>
jmp    1151 <is_pid+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_pid+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pid>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1126 <is_pid+0x26>
add    $0x1,%rdi
nop
movsbl %cl,%ecx
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jae    1127 <is_pid+0x27>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <is_pid+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_pid(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %7
4: ; preds = %7
%5 = load i8, i8* %13
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %13, %4 ], [ %0, %1 ]
%10 = sext i8 %8 to i32
%11 = add nsw i32 %10, -48
%12 = icmp ult i32 %11, 10
%13 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %12, label %4, label %14
14: ; preds = %7, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %15
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int tune_continuation_parameters(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(70, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<tune_continuation_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x46,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tune_continuation_parameters>:
mov    $0x46,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @tune_continuation_parameters() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 70, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @tune_continuation_parameters() {
%1 = tail call i32 @_ada_use_c2phc(i32 70, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  printf("\nUsage:\n   %s\n\n",
         "sr2gr"
         " <infile> <outfile> <pixel size> [-license] [-version] [-help]");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [68 x i8] c"sr2gr <infile> <outfile> <pixel size> [-license] [-version] [-help]\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [68 x i8] c"sr2gr <infile> <outfile> <pixel size> [-license] [-version] [-help]\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_2_le(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_uint16_le(uint8_t *dst, uint32_t offs,
                                    const uint16_t *src) {
  uint8_t tmp[2] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_2_le(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_uint16_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x20(%rbp),%rsi
call   1030 <ivory_serialize_pack_prim_2_le@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_uint16_le>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_2_le@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_uint16_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [2 x i32]* %7 to i8*
%9 = bitcast [2 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 8)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_2_le(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_uint16_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%6 = bitcast i64* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 8)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = bitcast i64* %4 to i32*
%11 = call i32 @ivory_serialize_pack_prim_2_le(i32* %9, i32* %10)
ret void
}
/* Variables and functions */
int strlen(char *);
void clob_last(char *string, char newstuff) {
  int length = 0;
  if (string)
    length = strlen(string);
  if (length >= 1)
    string[length - 1] = newstuff;
}


x86 assembly (clang, -O0):
<clob_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <clob_last+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     115d <clob_last+0x4d>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clob_last>:
push   %rbp
push   %rbx
push   %rax
test   %rdi,%rdi
je     112d <clob_last+0x1d>
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    112d <clob_last+0x1d>
add    $0xffffffff,%eax
mov    %bpl,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @clob_last(i8* %0, i8 signext %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = add nsw i32 %5, -1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 %1, i8* %10
br label %11
11: ; preds = %2, %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x3e() {
  Assert_real((isbdigit(62) == 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_isbdigit.c",
              315, ("isbdigit should be 0 for >"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x3e>:
push   %rax
mov    $0x3e,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x13b,%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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for >\00"
define void @t_isbdigit_0x3e() {
%1 = call i64 @isbdigit(i32 62)
%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 315, i8* getelementptr inbounds ([27 x i8], [27 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for >\00"
define void @t_isbdigit_0x3e() {
%1 = tail call i64 @isbdigit(i32 62)
%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 315, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}