xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x7d() {
  Assert_real((iscntrl(125) == 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_iscntrl.c",
              630, ("iscntrl should be 0 for }"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for }\00"
define void @t_iscntrl_0x7d() {
%1 = tail call i64 @iscntrl(i32 125)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_nanp_number(const char *p) { return (p[0] >= '2' && p[3] >= '2'); }


x86 assembly (clang, -O0):
<is_nanp_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x32,%ecx
mov    %al,-0x9(%rbp)
jl     112e <is_nanp_number+0x2e>
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x32,%eax
setge  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_nanp_number>:
xor    %eax,%eax
cmpb   $0x32,(%rdi)
jl     1110 <is_nanp_number+0x10>
xor    %eax,%eax
cmpb   $0x32,0x3(%rdi)
setge  %al
ret

LLVM IR (-O0):
define i32 @is_nanp_number(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 50
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 50
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_nanp_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp sgt i8 %2, 49
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 3
%6 = load i8, i8* %5
%7 = icmp sgt i8 %6, 49
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ gethostname(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *hostname(void) {
  static char host[64];
  if (gethostname(host, 64) != 0)
    strcpy(host, "???");
  return (host);
}


x86 assembly (clang, -O0):
<hostname>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
mov    $0x40,%esi
call   1040 <gethostname@plt>
cmp    $0x0,%rax
je     1152 <hostname+0x32>
lea    0x2efa(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2ee7(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hostname>:
push   %rax
lea    0x2f18(%rip),%rdi
mov    $0x40,%esi
call   1040 <gethostname@plt>
test   %rax,%rax
je     114a <hostname+0x2a>
lea    0x2f02(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2eef(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@hostname.host = internal global [64 x i8] zeroinitializer
@.str = [4 x i8] c"???\00"
define i8* @hostname() {
%1 = call i64 @gethostname(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0), i32 64)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @strcpy(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0)
}

LLVM IR (-O2):
@hostname.host = internal global [64 x i8] zeroinitializer
@.str = [4 x i8] c"???\00"
define i8* @hostname() {
%1 = tail call i64 @gethostname(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0), i32 64)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @strcpy(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @hostname.host, i64 0, i64 0)
}
/* Variables and functions */
double atanh(double);
double cosh(double);
double __attribute__((no)) cosatan_(double x) {
  double atg = atanh(x);
  return cosh(atg) + atg;
}


x86 assembly (clang, -O0):
<cosatan_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <atanh@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cosh@plt>
addsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosatan_>:
push   %rax
call   1030 <atanh@plt>
movsd  %xmm0,(%rsp)
call   1040 <cosh@plt>
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @cosatan_(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @atanh(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @cosh(double %6)
%8 = load double, double* %3
%9 = fadd double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @cosatan_(double %0) {
%2 = tail call double @atanh(double %0)
%3 = tail call double @cosh(double %2)
%4 = fadd double %2, %3
ret double %4
}
int str_cpy(char *p, const char *t) {
  while ((*p++ = *t++) != '\0')
    ;
  return 1;
}


x86 assembly (clang, -O0):
<str_cpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <str_cpy+0x3f>
jmp    110c <str_cpy+0xc>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cpy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <str_cpy+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @str_cpy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 1
}
char *RCSid() {
  return RCSid("$Id: alloc.c,v 1.17 2011/09/04 11:08:33 markisch Exp $");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"$Id: alloc.c,v 1.17 2011/09/04 11:08:33 markisch Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
scalar_t__ my_isspace(int);
int stub1(void *);
void stub2(void *);
int skip_spaces(int (*peek)(void *userp), void (*pop)(void *userp),
                void *userp) {
  int n = 0;
  while (my_isspace((*peek)(userp))) {
    n++;
    (*pop)(userp);
  }
  return n;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rdi
call   *%rax
mov    %eax,%edi
call   1030 <my_isspace@plt>
cmp    $0x0,%rax
je     115e <skip_spaces+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
call   *%rax
jmp    112b <skip_spaces+0x1b>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   *%r15
mov    %eax,%edi
call   1030 <my_isspace@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     115b <skip_spaces+0x4b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebp
mov    %rbx,%rdi
call   *%r14
mov    %rbx,%rdi
call   *%r15
mov    %eax,%edi
call   1030 <my_isspace@plt>
test   %rax,%rax
jne    1140 <skip_spaces+0x30>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @skip_spaces(i32 (i8*)* nocapture %0, void (i8*)* nocapture %1, i8* %2) {
%4 = tail call i32 %0(i8* %2)
%5 = tail call i64 @my_isspace(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %3, %7
%8 = phi i32 [ %9, %7 ], [ 0, %3 ]
%9 = add nuw nsw i32 %8, 1
tail call void %1(i8* %2)
%10 = tail call i32 %0(i8* %2)
%11 = tail call i64 @my_isspace(i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %3
%14 = phi i32 [ 0, %3 ], [ %9, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_UART_TXD1_INPUT() { clear_io_bit(0x45, 3); }


x86 assembly (clang, -O0):
<TOSH_MAKE_UART_TXD1_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
mov    $0x3,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_UART_TXD1_INPUT>:
mov    $0x45,%edi
mov    $0x3,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_UART_TXD1_INPUT() {
%1 = call i32 @clear_io_bit(i32 69, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_UART_TXD1_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 69, i32 3)
ret void
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
int sdo_is_expediated(const struct can_frame *frame) {
  return !!(frame->data[0] & 2);
}


x86 assembly (clang, -O0):
<sdo_is_expediated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdo_is_expediated>:
mov    (%rdi),%rax
mov    (%rax),%eax
shr    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define i32 @sdo_is_expediated(%struct.can_frame* %0) {
%2 = alloca %struct.can_frame*
store %struct.can_frame* %0, %struct.can_frame** %2
%3 = load %struct.can_frame*, %struct.can_frame** %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 2
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define i32 @sdo_is_expediated(%struct.can_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = lshr i32 %4, 1
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int);
void test(unsigned X, unsigned Y) {
  printf("%u %u %u %u\n", X, Y, X / (8 << (Y & 15)), X % (8 << (Y & 15)));
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
mov    $0x8,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
mov    $0x8,%edi
shl    %cl,%edi
mov    -0x10(%rbp),%ecx
xor    %edx,%edx
div    %edi
mov    %edx,%r8d
mov    -0xc(%rbp),%edx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    %esi,%edx
mov    %edx,%ecx
and    $0xf,%cl
mov    $0x8,%r8d
shl    %cl,%r8d
add    $0x3,%cl
add    $0xffffffff,%r8d
and    %edi,%r8d
mov    %edi,%eax
shr    %cl,%eax
lea    0xecb(%rip),%rcx
mov    %edi,%esi
mov    %rcx,%rdi
mov    %eax,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%u %u %u %u\0A\00"
define void @test(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 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = and i32 %8, 15
%10 = shl i32 8, %9
%11 = udiv i32 %7, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = and i32 %13, 15
%15 = shl i32 8, %14
%16 = urem i32 %12, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %11, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%u %u %u %u\0A\00"
define void @test(i32 %0, i32 %1) {
%3 = and i32 %1, 15
%4 = shl nuw nsw i32 8, %3
%5 = add nuw nsw i32 %3, 3
%6 = lshr i32 %0, %5
%7 = add nsw i32 %4, -1
%8 = and i32 %7, %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %6, i32 %8)
ret void
}
void blk_flush_plug(struct task_struct *task) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @blk_flush_plug(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgetc(int /*<<< orphan*/ *);
void skip_1(FILE *in) { fgetc(in); }


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

x86 assembly (clang, -O2):
<skip_1>:
jmp    1030 <fgetc@plt>

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

LLVM IR (-O2):
define void @skip_1(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xsi_register_didat(char *, char *);
extern void work_a_3378324598_3212880686_init() {
  xsi_register_didat(
      "work_a_3378324598_3212880686",
      "isim/tb_trafo_isim_beh.exe.sim/work/a_3378324598_3212880686.didat");
}


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

x86 assembly (clang, -O2):
<work_a_3378324598_3212880686_init>:
lea    0xee9(%rip),%rdi
lea    0xeff(%rip),%rsi
jmp    1030 <xsi_register_didat@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"work_a_3378324598_3212880686\00"
@.str.1 = [66 x i8] c"isim/tb_trafo_isim_beh.exe.sim/work/a_3378324598_3212880686.didat\00"
define void @work_a_3378324598_3212880686_init() {
%1 = call i32 @xsi_register_didat(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"work_a_3378324598_3212880686\00"
@.str.1 = [66 x i8] c"isim/tb_trafo_isim_beh.exe.sim/work/a_3378324598_3212880686.didat\00"
define void @work_a_3378324598_3212880686_init() {
%1 = tail call i32 @xsi_register_didat(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char sys_path_sep() { return '/'; }


x86 assembly (clang, -O0):
<sys_path_sep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_path_sep>:
mov    $0x2f,%al
ret

LLVM IR (-O0):
define signext i8 @sys_path_sep() {
ret i8 47
}

LLVM IR (-O2):
define signext i8 @sys_path_sep() {
ret i8 47
}
void ehci_unregister(struct ehci_host *ehci) {}


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

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

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

LLVM IR (-O2):
%struct.ehci_host = type opaque
define void @ehci_unregister(%struct.ehci_host* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ postfix_expr_stub();
int /*<<< orphan*/ primary_expr();
void postfix_expr() {
  primary_expr();
  postfix_expr_stub();
}


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

x86 assembly (clang, -O2):
<postfix_expr>:
push   %rax
xor    %eax,%eax
call   1030 <primary_expr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <postfix_expr_stub@plt>

LLVM IR (-O0):
define void @postfix_expr() {
%1 = call i32 (...) @primary_expr()
%2 = call i32 (...) @postfix_expr_stub()
ret void
}

LLVM IR (-O2):
define void @postfix_expr() {
%1 = tail call i32 (...) @primary_expr()
%2 = tail call i32 (...) @postfix_expr_stub()
ret void
}
__attribute__((always_)) void alternatives_smp_switch(int smp) {}


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

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

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

LLVM IR (-O2):
define void @alternatives_smp_switch(i32 %0) {
ret void
}
void debug64_directive(const char *directive, const char *params) {
  (void)directive;
  (void)params;
}


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

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

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

LLVM IR (-O2):
define void @debug64_directive(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int string_get_input(void *data) {
  char **input_string = (char **)data;
  if (**input_string)
    return *((*input_string)++);
  else
    return 0;
}


x86 assembly (clang, -O0):
<string_get_input>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmpb   $0x0,(%rax)
je     113c <string_get_input+0x3c>
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <string_get_input+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_get_input>:
mov    (%rdi),%rax
cmpb   $0x0,(%rax)
je     1113 <string_get_input+0x13>
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movsbl (%rax),%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_get_input(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %2
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freevec(double *vec) { free((char *)vec); }


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

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

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

LLVM IR (-O2):
define void @freevec(double* nocapture %0) {
%2 = bitcast double* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
void __attribute__((force_align_arg_pointer)) d(void) {}


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
and    $0xfffffffffffffff8,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
push   %rbp
mov    %rsp,%rbp
and    $0xfffffffffffffff8,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
define void @d() {
ret void
}
int islower(int c) {
  if ('a' <= c && c <= 'z')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x61,%eax
cmp    -0x8(%rbp),%eax
jg     112b <islower+0x2b>
cmpl   $0x7a,-0x8(%rbp)
jg     112b <islower+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <islower+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int __dumpbuf(char const *, int, int);
int dumpbuf(const char *buffer, int bytesToWrite) {
  return __dumpbuf(buffer, bytesToWrite, 16);
}


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

x86 assembly (clang, -O2):
<dumpbuf>:
mov    $0x10,%edx
jmp    1030 <__dumpbuf@plt>

LLVM IR (-O0):
define i32 @dumpbuf(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 = call i32 @__dumpbuf(i8* %5, i32 %6, i32 16)
ret i32 %7
}

LLVM IR (-O2):
define i32 @dumpbuf(i8* %0, i32 %1) {
%3 = tail call i32 @__dumpbuf(i8* %0, i32 %1, i32 16)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;
struct sysinfo {
  int uptime;
};

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int sysinfo(struct sysinfo *);
uint32_t get_uptime_ms(void) {
  struct sysinfo info;
  int ret;
  ret = sysinfo(&info);
  if (ret == -1)
    perror("sysinfo");
  return info.uptime * 1000;
}


x86 assembly (clang, -O0):
<get_uptime_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <sysinfo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114a <get_uptime_ms+0x2a>
lea    0xebb(%rip),%rdi
call   1030 <perror@plt>
imul   $0x3e8,-0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uptime_ms>:
push   %rax
mov    %rsp,%rdi
call   1040 <sysinfo@plt>
cmp    $0xffffffff,%eax
je     1137 <get_uptime_ms+0x17>
imul   $0x3e8,(%rsp),%eax
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1030 <perror@plt>
jmp    112e <get_uptime_ms+0xe>

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"sysinfo\00"
define i32 @get_uptime_ms() {
%1 = alloca %struct.sysinfo
%2 = alloca i32
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i32 0, i32 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, 1000
ret i32 %11
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"sysinfo\00"
define i32 @get_uptime_ms() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i32 @sysinfo(%struct.sysinfo* %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
ret i32 %10
}
/* Variables and functions */
char const *Sys_Pwd();
const char *Sys_DefaultBasePath(void) { return Sys_Pwd(); }


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

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

LLVM IR (-O0):
define i8* @Sys_DefaultBasePath() {
%1 = call i8* (...) @Sys_Pwd()
ret i8* %1
}

LLVM IR (-O2):
define i8* @Sys_DefaultBasePath() {
%1 = tail call i8* (...) @Sys_Pwd()
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __infer_nondet_int();
int fgetc(FILE *stream) {
  FILE tmp;
  tmp = *stream;
  return __infer_nondet_int();
}


x86 assembly (clang, -O0):
<fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fgetc(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = call i32 (...) @__infer_nondet_int()
ret i32 %6
}

LLVM IR (-O2):
define i32 @fgetc(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
int iommu_calculate_agaw(struct intel_iommu *iommu) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.intel_iommu = type opaque
define i32 @iommu_calculate_agaw(%struct.intel_iommu* nocapture readnone %0) {
ret i32 0
}
int f(int x) { return x < x + 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = icmp slt i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 1
}
/* Variables and functions */
long internal__syscall1(long, long);
long __syscall1(long n, long a1) { return internal__syscall1(n, a1); }


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

x86 assembly (clang, -O2):
<__syscall1>:
jmp    1030 <internal__syscall1@plt>

LLVM IR (-O0):
define i64 @__syscall1(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i64 @internal__syscall1(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @__syscall1(i64 %0, i64 %1) {
%3 = tail call i64 @internal__syscall1(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf34(int f, int n) { return (cbuf(f, n, 34)); }


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

x86 assembly (clang, -O2):
<cbuf34>:
mov    $0x22,%edx
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf34(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 i32 @cbuf(i32 %5, i32 %6, i32 34)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf34(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 34)
ret i32 %3
}
int seqlen(char *seq) {
  int len = 0;
  for (int i = 0; seq[i] != '\0'; ++i) {
    len += 1;
  }
  return len;
}


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

x86 assembly (clang, -O2):
<seqlen>:
cmpb   $0x0,(%rdi)
je     111c <seqlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <seqlen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @seqlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %4
%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 %19
13: ; preds = %5
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %13
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @seqlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %6, label %8
4: ; preds = %8
%5 = trunc i64 %10 to i32
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ 0, %1 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %1, %8
%9 = phi i64 [ %10, %8 ], [ 0, %1 ]
%10 = add nuw nsw i64 %9, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %4, label %8
}
/* Type definitions */
struct flock {
  scalar_t__ l_len;
  scalar_t__ l_start;
  int /*<<< orphan*/ l_whence;
  int /*<<< orphan*/ l_type;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_UNLCK;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, struct flock *);
void my_unlock(int fd) {
  struct flock lock;
  return;
  lock.l_type = F_UNLCK;
  lock.l_whence = SEEK_SET;
  lock.l_start = 0;
  lock.l_len = 0;
  fcntl(fd, F_SETLK, &lock);
}


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

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

LLVM IR (-O0):
%struct.flock = type { i64, i64, i32, i32 }
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
@SEEK_SET = global i32 0
define void @my_unlock(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.flock
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
%struct.flock = type { i64, i64, i32, i32 }
@F_SETLK = global i32 0
@F_UNLCK = global i32 0
@SEEK_SET = global i32 0
define void @my_unlock(i32 %0) {
ret void
}
void StartVideoCaptureTriggerHost(unsigned long MMIOBase,
                                  unsigned long offset) {
  *(volatile unsigned long *)((unsigned long)(0x1E700000) +
                              (unsigned long)(offset)) =
      (((*(volatile unsigned long *)((unsigned long)(0x1E700000) +
                                     (unsigned long)(offset))) &
        (~0x00000002)) |
       (unsigned long)((0) & (0x00000002)));
  *(volatile unsigned long *)((unsigned long)(0x1E700000) +
                              (unsigned long)(offset)) =
      (((*(volatile unsigned long *)((unsigned long)(0x1E700000) +
                                     (unsigned long)(offset))) &
        (~0x00000002)) |
       (unsigned long)((0x00000002) & (0x00000002)));
}


x86 assembly (clang, -O0):
<StartVideoCaptureTriggerHost>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
or     $0x0,%rcx
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
or     $0x2,%rcx
mov    -0x10(%rbp),%rax
add    $0x1e700000,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartVideoCaptureTriggerHost>:
andq   $0xfffffffffffffffd,0x1e700000(%rsi)
fd
orq    $0x2,0x1e700000(%rsi)
02
ret

LLVM IR (-O0):
define void @StartVideoCaptureTriggerHost(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = add i64 510656512, %5
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -3
%10 = or i64 %9, 0
%11 = load i64, i64* %4
%12 = add i64 510656512, %11
%13 = inttoptr i64 %12 to i64*
store volatile i64 %10, i64* %13
%14 = load i64, i64* %4
%15 = add i64 510656512, %14
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = and i64 %17, -3
%19 = or i64 %18, 2
%20 = load i64, i64* %4
%21 = add i64 510656512, %20
%22 = inttoptr i64 %21 to i64*
store volatile i64 %19, i64* %22
ret void
}

LLVM IR (-O2):
define void @StartVideoCaptureTriggerHost(i64 %0, i64 %1) {
%3 = add i64 %1, 510656512
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -3
store volatile i64 %6, i64* %4
%7 = load volatile i64, i64* %4
%8 = or i64 %7, 2
store volatile i64 %8, i64* %4
ret void
}
void CC1000RadioIntM$RadioSendCoordinator$startSymbol(void) {
  CC1000RadioIntM$RadioSendCoordinator$default$startSymbol();
}


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

x86 assembly (clang, -O2):
xor    %eax,%eax
jmp    1030 <CC1000RadioIntM$RadioSendCoordinator$default$startSymbol@plt>

LLVM IR (-O0):
define void @"CC1000RadioIntM$RadioSendCoordinator$startSymbol"() {
%1 = call i32 (...) @"CC1000RadioIntM$RadioSendCoordinator$default$startSymbol"()
ret void
}

LLVM IR (-O2):
define void @"CC1000RadioIntM$RadioSendCoordinator$startSymbol"() {
%1 = tail call i32 (...) @"CC1000RadioIntM$RadioSendCoordinator$default$startSymbol"()
ret void
}
/* Variables and functions */
scalar_t__ gfx_inw(int);
int /*<<< orphan*/ gfx_outw(int, int);
unsigned long gu2_get_frame_buffer_size(void) {
  unsigned long value;
  gfx_outw(0xAC1C, 0xFC53);
  gfx_outw(0xAC1C, 0x0200);
  value = (unsigned long)(gfx_inw(0xAC1E)) & 0xFFl;
  return (value << 19);
}


x86 assembly (clang, -O0):
<gu2_get_frame_buffer_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1c,%edi
mov    $0x200,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1e,%edi
call   1030 <gfx_inw@plt>
and    $0xff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x13,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu2_get_frame_buffer_size>:
push   %rax
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1c,%edi
mov    $0x200,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1e,%edi
call   1030 <gfx_inw@plt>
movzbl %al,%eax
shl    $0x13,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @gu2_get_frame_buffer_size() {
%1 = alloca i64
%2 = call i32 @gfx_outw(i32 44060, i32 64595)
%3 = call i32 @gfx_outw(i32 44060, i32 512)
%4 = call i64 @gfx_inw(i32 44062)
%5 = and i64 %4, 255
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = shl i64 %6, 19
ret i64 %7
}

LLVM IR (-O2):
define i64 @gu2_get_frame_buffer_size() {
%1 = tail call i32 @gfx_outw(i32 44060, i32 64595)
%2 = tail call i32 @gfx_outw(i32 44060, i32 512)
%3 = tail call i64 @gfx_inw(i32 44062)
%4 = shl i64 %3, 19
%5 = and i64 %4, 133693440
ret i64 %5
}
int is_equal(int *a, int *b, int n) {
  while (n--)
    if (a[n] != b[n])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1150 <is_equal+0x50>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114b <is_equal+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1157 <is_equal+0x57>
jmp    110f <is_equal+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_equal>:
movslq %edx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
sub    $0x1,%rax
jb     1121 <is_equal+0x21>
mov    (%rdi,%rax,4),%ecx
cmp    (%rsi,%rax,4),%ecx
je     1110 <is_equal+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_equal(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %7, %9 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = icmp eq i64 %6, 0
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = getelementptr inbounds i32, i32* %0, i64 %7
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %1, i64 %7
%13 = load i32, i32* %12
%14 = icmp eq i32 %11, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %9
%16 = phi i32 [ 0, %9 ], [ 1, %5 ]
ret i32 %16
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t add_all_word8(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e,
                      uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j) {
  return a + b + c + d + e + f + g + h + i + j;
}


x86 assembly (clang, -O0):
<add_all_word8>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
add    -0x30(%rbp),%rax
add    0x10(%rbp),%rax
add    0x18(%rbp),%rax
add    0x20(%rbp),%rax
add    0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_all_word8>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
add    %r8,%rax
add    %r9,%rax
add    0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    0x18(%rsp),%rax
add    0x20(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @add_all_word8(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store i64 %0, i64* %11
store i64 %1, i64* %12
store i64 %2, i64* %13
store i64 %3, i64* %14
store i64 %4, i64* %15
store i64 %5, i64* %16
store i64 %6, i64* %17
store i64 %7, i64* %18
store i64 %8, i64* %19
store i64 %9, i64* %20
%21 = load i64, i64* %11
%22 = load i64, i64* %12
%23 = add nsw i64 %21, %22
%24 = load i64, i64* %13
%25 = add nsw i64 %23, %24
%26 = load i64, i64* %14
%27 = add nsw i64 %25, %26
%28 = load i64, i64* %15
%29 = add nsw i64 %27, %28
%30 = load i64, i64* %16
%31 = add nsw i64 %29, %30
%32 = load i64, i64* %17
%33 = add nsw i64 %31, %32
%34 = load i64, i64* %18
%35 = add nsw i64 %33, %34
%36 = load i64, i64* %19
%37 = add nsw i64 %35, %36
%38 = load i64, i64* %20
%39 = add nsw i64 %37, %38
ret i64 %39
}

LLVM IR (-O2):
define i64 @add_all_word8(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = add nsw i64 %1, %0
%12 = add nsw i64 %11, %2
%13 = add nsw i64 %12, %3
%14 = add nsw i64 %13, %4
%15 = add nsw i64 %14, %5
%16 = add nsw i64 %15, %6
%17 = add nsw i64 %16, %7
%18 = add nsw i64 %17, %8
%19 = add nsw i64 %18, %9
ret i64 %19
}
void ADCTimerConfig(unsigned long ulBase, unsigned long ulValue) {
  unsigned long ulReg;
  ulReg = (*((volatile unsigned long *)(ulBase + 0x00000068)));
  ulReg = ((ulReg & ~0x1FFFF) | (ulValue & 0x1FFFF));
  (*((volatile unsigned long *)(ulBase + 0x00000068))) = ulReg;
}


x86 assembly (clang, -O0):
<ADCTimerConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0xfffffffffffe0000,%rax
mov    -0x10(%rbp),%rcx
and    $0x1ffff,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x68(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCTimerConfig>:
mov    $0xfffffffffffe0000,%rax
and    0x68(%rdi),%rax
and    $0x1ffff,%esi
or     %rax,%rsi
mov    %rsi,0x68(%rdi)
ret

LLVM IR (-O0):
define void @ADCTimerConfig(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 104
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = and i64 %10, -131072
%12 = load i64, i64* %4
%13 = and i64 %12, 131071
%14 = or i64 %11, %13
store i64 %14, i64* %5
%15 = load i64, i64* %5
%16 = load i64, i64* %3
%17 = add i64 %16, 104
%18 = inttoptr i64 %17 to i64*
store volatile i64 %15, i64* %18
ret void
}

LLVM IR (-O2):
define void @ADCTimerConfig(i64 %0, i64 %1) {
%3 = add i64 %0, 104
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -131072
%7 = and i64 %1, 131071
%8 = or i64 %6, %7
store volatile i64 %8, i64* %4
ret void
}
/* Variables and functions */
int double_to_bits(double);
int isfinite(double x) {
  unsigned long exponent = (double_to_bits(x) >> 52) & 0x7ff;
  unsigned long mantissa = double_to_bits(x) & 0xffffffffffffful;
  return exponent < 2047;
}


x86 assembly (clang, -O0):
<isfinite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_bits@plt>
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
cltq
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <double_to_bits@plt>
cltq
movabs $0xfffffffffffff,%rcx
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x7ff,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfinite>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <double_to_bits@plt>
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <double_to_bits@plt>

LLVM IR (-O0):
define i32 @isfinite(double %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca i64
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 @double_to_bits(double %5)
%7 = ashr i32 %6, 52
%8 = and i32 %7, 2047
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load double, double* %2
%11 = call i32 @double_to_bits(double %10)
%12 = sext i32 %11 to i64
%13 = and i64 %12, 4503599627370495
store i64 %13, i64* %4
%14 = load i64, i64* %3
%15 = icmp ult i64 %14, 2047
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isfinite(double %0) {
%2 = tail call i32 @double_to_bits(double %0)
%3 = tail call i32 @double_to_bits(double %0)
ret i32 poison
}