xunge/DecIR huggingface dataset:
/* Variables and functions */
int eval(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char exp[] = "235*+9-";
  printf("postfix evaluation: %d\n", eval(exp));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <eval@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x2d392b2a353332,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1040 <eval@plt>
lea    0xec2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.exp = [8 x i8] c"235*+9-\00"
@.str = [24 x i8] c"postfix evaluation: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
store i32 0, i32* %1
%3 = bitcast [8 x i8]* %2 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @eval(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"postfix evaluation: %d\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 12729231506486066, i64* %1
%3 = call i32 @eval(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char const);
bool is_pid_dir(const char *filename) {
  while (*filename) {
    if (!isdigit(*filename))
      return false;
    filename++;
  }
  return true;
}


x86 assembly (clang, -O0):
<is_pid_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <is_pid_dir+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114a <is_pid_dir+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <is_pid_dir+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_pid_dir+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pid_dir>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_pid_dir+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <is_pid_dir+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_pid_dir+0x20>
jmp    114b <is_pid_dir+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_pid_dir(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
struct ssh_cipher {
  int dummy;
};

/* Variables and functions */
struct ssh_cipher *create_handle(int, int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ encrypt(struct ssh_cipher *, unsigned char *, int);
int /*<<< orphan*/ free_handle(struct ssh_cipher *);
void cipher(unsigned char *block) {
  struct ssh_cipher *handle = create_handle(
      32, 0, "imtheoperatorwithmypocketcalcula", "initializationve");
  encrypt(handle, block, (1 << 28));
  free_handle(handle);
}


x86 assembly (clang, -O0):
<cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x20,%edi
xor    %esi,%esi
lea    0xeb6(%rip),%rdx
lea    0xed0(%rip),%rcx
call   1040 <create_handle@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x10000000,%edx
call   1030 <encrypt@plt>
mov    -0x10(%rbp),%rdi
call   1050 <free_handle@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cipher>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdx
lea    0xedc(%rip),%rcx
mov    $0x20,%edi
xor    %esi,%esi
call   1040 <create_handle@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x10000000,%edx
call   1030 <encrypt@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <free_handle@plt>

LLVM IR (-O0):
%struct.ssh_cipher = type { i32 }
@.str = [33 x i8] c"imtheoperatorwithmypocketcalcula\00"
@.str.1 = [17 x i8] c"initializationve\00"
define void @cipher(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ssh_cipher*
store i8* %0, i8** %2
%4 = call %struct.ssh_cipher* @create_handle(i32 32, i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
store %struct.ssh_cipher* %4, %struct.ssh_cipher** %3
%5 = load %struct.ssh_cipher*, %struct.ssh_cipher** %3
%6 = load i8*, i8** %2
%7 = call i32 @encrypt(%struct.ssh_cipher* %5, i8* %6, i32 268435456)
%8 = load %struct.ssh_cipher*, %struct.ssh_cipher** %3
%9 = call i32 @free_handle(%struct.ssh_cipher* %8)
ret void
}

LLVM IR (-O2):
%struct.ssh_cipher = type { i32 }
@.str = [33 x i8] c"imtheoperatorwithmypocketcalcula\00"
@.str.1 = [17 x i8] c"initializationve\00"
define void @cipher(i8* %0) {
%2 = tail call %struct.ssh_cipher* @create_handle(i32 32, i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @encrypt(%struct.ssh_cipher* %2, i8* %0, i32 268435456)
%4 = tail call i32 @free_handle(%struct.ssh_cipher* %2)
ret void
}
int MIMEH_is_contenttype(int range_type, int content_type) {
  int diff;
  diff = content_type - range_type;
  if ((diff < 99) && (diff > 0))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<MIMEH_is_contenttype>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x63,-0x10(%rbp)
jge    1133 <MIMEH_is_contenttype+0x33>
cmpl   $0x0,-0x10(%rbp)
jle    1133 <MIMEH_is_contenttype+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <MIMEH_is_contenttype+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIMEH_is_contenttype>:
not    %edi
add    %esi,%edi
xor    %eax,%eax
cmp    $0x62,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @MIMEH_is_contenttype(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = add i32 %3, %1
%5 = icmp ult i32 %4, 98
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
double fmod(double, double);
double Double_mod(double x, double y) { return fmod(x, y); }


x86 assembly (clang, -O0):
<Double_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_mod>:
jmp    1030 <fmod@plt>

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

LLVM IR (-O2):
define double @Double_mod(double %0, double %1) {
%3 = tail call double @fmod(double %0, double %1)
ret double %3
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_lflag;
};

/* Variables and functions */
int /*<<< orphan*/ ISIG;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void enable_signal() {
  struct termios term;
  tcgetattr(0, &term);
  term.c_lflag |= ISIG;
  tcsetattr(0, TCSANOW, &term);
}


x86 assembly (clang, -O0):
<enable_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_signal>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
or     %eax,0x8(%rsp)
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    %rbx,%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@ISIG = global i32 0
@TCSANOW = global i32 0
define void @enable_signal() {
%1 = alloca %struct.termios
%2 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%3 = load i32, i32* @ISIG
%4 = getelementptr inbounds %struct.termios, %struct.termios* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = or i32 %5, %3
store i32 %6, i32* %4
%7 = load i32, i32* @TCSANOW
%8 = call i32 @tcsetattr(i32 0, i32 %7, %struct.termios* %1)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@ISIG = global i32 0
@TCSANOW = global i32 0
define void @enable_signal() {
%1 = alloca %struct.termios
%2 = bitcast %struct.termios* %1 to i8*
%3 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%4 = load i32, i32* @ISIG
%5 = getelementptr inbounds %struct.termios, %struct.termios* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = or i32 %6, %4
store i32 %7, i32* %5
%8 = load i32, i32* @TCSANOW
%9 = call i32 @tcsetattr(i32 0, i32 %8, %struct.termios* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ClearPacketRx();
int /*<<< orphan*/ WF_ProcessRxPacket();
scalar_t__ isPacketRx();
void RxPacketCheck(void) {
  if (isPacketRx()) {
    ClearPacketRx();
    WF_ProcessRxPacket();
  }
}


x86 assembly (clang, -O0):
<RxPacketCheck>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <isPacketRx@plt>
cmp    $0x0,%rax
je     1153 <RxPacketCheck+0x23>
mov    $0x0,%al
call   1040 <ClearPacketRx@plt>
mov    $0x0,%al
call   1030 <WF_ProcessRxPacket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RxPacketCheck>:
push   %rax
xor    %eax,%eax
call   1050 <isPacketRx@plt>
test   %rax,%rax
je     114c <RxPacketCheck+0x1c>
xor    %eax,%eax
call   1040 <ClearPacketRx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <WF_ProcessRxPacket@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @RxPacketCheck() {
%1 = call i64 (...) @isPacketRx()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @ClearPacketRx()
%5 = call i32 (...) @WF_ProcessRxPacket()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @RxPacketCheck() {
%1 = tail call i64 (...) @isPacketRx()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @ClearPacketRx()
%5 = tail call i32 (...) @WF_ProcessRxPacket()
br label %6
6: ; preds = %3, %0
ret void
}
/* Variables and functions */
double sqrt(double);
__attribute__((__weak__, __always___)) double softboundcets_sqrt(double x) {
  return sqrt(x);
}


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

x86 assembly (clang, -O2):
<softboundcets_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <softboundcets_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define weak double @softboundcets_sqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double %3)
ret double %4
}

LLVM IR (-O2):
define weak double @softboundcets_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "genfiles/jump_analysis.c",
        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/jump_analysis.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/jump_analysis.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
char *strchr(char const *, int);
int strlen(char const *);
char *strchrnul(const char *s1, int i) {
  char *s = strchr(s1, i);
  return s ? s : (char *)s1 + strlen(s1);
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1157 <strchrnul+0x37>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1178 <strchrnul+0x58>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strchr@plt>
test   %rax,%rax
je     1130 <strchrnul+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ %3, %2 ]
ret i8* %10
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xproperty;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xproperty_display(void *_p, void *_v) {
  ((XEvent *)_p)->xproperty.display = (Display *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xproperty_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ light(unsigned char *, int, int);
void fail() {
  unsigned char fail_word[8] = {0, 0, 32, 0, 24, 36, 0, 0};
  while (1)
    light(fail_word, 2, 2);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x2,%edx
mov    %edx,%esi
call   1030 <light@plt>
jmp    1123 <fail+0x13>

x86 assembly (clang, -O2):
<fail>:
push   %rbx
sub    $0x10,%rsp
movabs $0x241800200000,%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <light@plt>
jmp    1130 <fail+0x20>

LLVM IR (-O0):
@__const.fail.fail_word = [8 x i8] c"\00\00 \00\18$\00\00"
define void @fail() {
%1 = alloca [8 x i8]
%2 = bitcast [8 x i8]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%5 = call i32 @light(i8* %4, i32 2, i32 2)
br label %3
}

LLVM IR (-O2):
define void @fail() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 39685499912192, i64* %1
br label %3
3: ; preds = %3, %0
%4 = call i32 @light(i8* %2, i32 2, i32 2)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG3(char *, int, ...);
int Do_lock(int fd, int block) {
  int code = -2;
  DEBUG3("Do_lock: fd %d, block '%d'", fd, block);
  DEBUG3("Do_lock: status %d", code);
  return (code);
}


x86 assembly (clang, -O0):
<Do_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xfffffffe,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG3@plt>
mov    -0xc(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG3@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Do_lock>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <DEBUG3@plt>
lea    0xef1(%rip),%rdi
mov    $0xfffffffe,%esi
xor    %eax,%eax
call   1030 <DEBUG3@plt>
mov    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Do_lock: fd %d, block '%d'\00"
@.str.1 = [19 x i8] c"Do_lock: status %d\00"
define i32 @Do_lock(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -2, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32, ...) @DEBUG3(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %5
%10 = call i32 (i8*, i32, ...) @DEBUG3(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
@.str = [27 x i8] c"Do_lock: fd %d, block '%d'\00"
@.str.1 = [19 x i8] c"Do_lock: status %d\00"
define i32 @Do_lock(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) @DEBUG3(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 (i8*, i32, ...) @DEBUG3(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 -2)
ret i32 -2
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t I2CMasterLineStateGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x0000002C))));
}


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

x86 assembly (clang, -O2):
<I2CMasterLineStateGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x2c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CMasterLineStateGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ mode;
};
struct TYPE_4__ {
  TYPE_1__ xfocus;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xfocus_mode(void *_p) {
  return (int)((XEvent *)_p)->xfocus.mode;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xfocus_mode>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xfocus_mode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xfocus_mode(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void XSharpFontExtentsXft(void *fontSet, void *max_ink_return,
                          void *max_logical_return) {}


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

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

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

LLVM IR (-O2):
define void @XSharpFontExtentsXft(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void ui_error(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @ui_error(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
struct radix_tree_root {
  int dummy;
};

/* Variables and functions */
int root_tag_get(struct radix_tree_root const *, unsigned int);
int radix_tree_tagged(const struct radix_tree_root *root, unsigned int tag) {
  return root_tag_get(root, tag);
}


x86 assembly (clang, -O0):
<radix_tree_tagged>:
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 <root_tag_get@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_tree_tagged>:
jmp    1030 <root_tag_get@plt>

LLVM IR (-O0):
%struct.radix_tree_root = type { i32 }
define i32 @radix_tree_tagged(%struct.radix_tree_root* %0, i32 %1) {
%3 = alloca %struct.radix_tree_root*
%4 = alloca i32
store %struct.radix_tree_root* %0, %struct.radix_tree_root** %3
store i32 %1, i32* %4
%5 = load %struct.radix_tree_root*, %struct.radix_tree_root** %3
%6 = load i32, i32* %4
%7 = call i32 @root_tag_get(%struct.radix_tree_root* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.radix_tree_root = type { i32 }
define i32 @radix_tree_tagged(%struct.radix_tree_root* %0, i32 %1) {
%3 = tail call i32 @root_tag_get(%struct.radix_tree_root* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("ok\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ok\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

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

/* Variables and functions */
void build_aad(uint8_t aad[5], size_t reclen) {
  aad[0] = 23;
  aad[1] = 3;
  aad[2] = 3;
  aad[3] = (uint8_t)(reclen >> 8);
  aad[4] = (uint8_t)reclen;
}


x86 assembly (clang, -O0):
<build_aad>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x17,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x8(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_aad>:
movabs $0x300000017,%rax
mov    %rax,(%rdi)
movl   $0x3,0x8(%rdi)
mov    %rsi,%rax
shr    $0x8,%rax
mov    %eax,0xc(%rdi)
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @build_aad(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
store i32 23, i32* %6
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 3, i32* %8
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 2
store i32 3, i32* %10
%11 = load i64, i64* %4
%12 = lshr i64 %11, 8
%13 = trunc i64 %12 to i32
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 3
store i32 %13, i32* %15
%16 = load i64, i64* %4
%17 = trunc i64 %16 to i32
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 4
store i32 %17, i32* %19
ret void
}

LLVM IR (-O2):
define void @build_aad(i32* nocapture writeonly %0, i64 %1) {
store i32 23, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 3, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 2
store i32 3, i32* %4
%5 = lshr i64 %1, 8
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %6, i32* %7
%8 = trunc i64 %1 to i32
%9 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %8, i32* %9
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void aes_Rotate(uint8_t block[4]) {
  uint8_t tmp;
  tmp = block[0];
  block[0] = block[1];
  block[1] = block[2];
  block[2] = block[3];
  block[3] = tmp;
}


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

x86 assembly (clang, -O2):
<aes_Rotate>:
movdqu (%rdi),%xmm0
pshufd $0x39,%xmm0,%xmm0
movdqu %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @aes_Rotate(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
%22 = load i32, i32* %3
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 3
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @aes_Rotate(i32* nocapture %0) {
%2 = bitcast i32* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = shufflevector <4 x i32> %3, <4 x i32> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>
%5 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_standard_monodromy(int n, int d, int k) {
  int fail;
  double *c;
  int dk[2];
  dk[0] = d;
  dk[1] = k;
  fail = _ada_use_c2phc4c(50, &n, dk, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_standard_monodromy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x32,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_standard_monodromy>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x32,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @initialize_standard_monodromy(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%15 = load double*, double** %8
%16 = call i32 @_ada_use_c2phc4c(i32 50, i32* %4, i32* %14, double* %15, i32 0)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @initialize_standard_monodromy(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %4
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 50, i32* %4, i32* %7, double* undef, i32 0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Keccak(int, int, unsigned char const *, unsigned int, int,
                          unsigned char *, int);
void FIPS202_SHA3_512(const unsigned char *input, unsigned int inputByteLen,
                      unsigned char *output) {
  Keccak(576, 1024, input, inputByteLen, 0x06, output, 64);
}


x86 assembly (clang, -O0):
<FIPS202_SHA3_512>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r9
mov    $0x240,%edi
mov    $0x400,%esi
mov    $0x6,%r8d
movl   $0x40,(%rsp)
call   1030 <Keccak@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIPS202_SHA3_512>:
push   %rax
mov    %rdx,%r9
mov    %esi,%ecx
mov    %rdi,%rdx
movl   $0x40,(%rsp)
mov    $0x240,%edi
mov    $0x400,%esi
mov    $0x6,%r8d
call   1030 <Keccak@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @FIPS202_SHA3_512(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @Keccak(i32 576, i32 1024, i8* %7, i32 %8, i32 6, i8* %9, i32 64)
ret void
}

LLVM IR (-O2):
define void @FIPS202_SHA3_512(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @Keccak(i32 576, i32 1024, i8* %0, i32 %1, i32 6, i8* %2, i32 64)
ret void
}
void do_fxrstor(const void *buffer) {
  asm volatile("rex64/fxrstor"
               " (%0)"
               :
               : "r"(buffer));
}


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

x86 assembly (clang, -O2):
<do_fxrstor>:
fxrstor64 (%rdi)
ret

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

LLVM IR (-O2):
define void @do_fxrstor(i8* %0) {
tail call void asm sideeffect "rex64/fxrstor ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mvaddch(int, int, char);
void drawFour(int y, int x) {
  mvaddch(y + 5, x + 10, 'O');
  mvaddch(y + 5, x + 2, 'O');
  mvaddch(y + 1, x + 10, 'O');
  mvaddch(y + 1, x + 2, 'O');
}


x86 assembly (clang, -O0):
<drawFour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x5,%edi
mov    -0x8(%rbp),%esi
add    $0xa,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x5,%edi
mov    -0x8(%rbp),%esi
add    $0x2,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
add    $0xa,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
add    $0x2,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawFour>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
lea    0x5(%rbx),%ebp
lea    0xa(%r14),%r15d
mov    %ebp,%edi
mov    %r15d,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
add    $0x2,%r14d
mov    %ebp,%edi
mov    %r14d,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
add    $0x1,%ebx
mov    %ebx,%edi
mov    %r15d,%esi
mov    $0x4f,%edx
call   1030 <mvaddch@plt>
mov    %ebx,%edi
mov    %r14d,%esi
mov    $0x4f,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <mvaddch@plt>

LLVM IR (-O0):
define void @drawFour(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 = add nsw i32 %5, 5
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 10
%9 = call i32 @mvaddch(i32 %6, i32 %8, i8 signext 79)
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 5
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 2
%14 = call i32 @mvaddch(i32 %11, i32 %13, i8 signext 79)
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 10
%19 = call i32 @mvaddch(i32 %16, i32 %18, i8 signext 79)
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 2
%24 = call i32 @mvaddch(i32 %21, i32 %23, i8 signext 79)
ret void
}

LLVM IR (-O2):
define void @drawFour(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 5
%4 = add nsw i32 %1, 10
%5 = tail call i32 @mvaddch(i32 %3, i32 %4, i8 signext 79)
%6 = add nsw i32 %1, 2
%7 = tail call i32 @mvaddch(i32 %3, i32 %6, i8 signext 79)
%8 = add nsw i32 %0, 1
%9 = tail call i32 @mvaddch(i32 %8, i32 %4, i8 signext 79)
%10 = tail call i32 @mvaddch(i32 %8, i32 %6, i8 signext 79)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __cpuid(unsigned int, unsigned int, unsigned int,
                           unsigned int, unsigned int);
void getCpuid(unsigned int eaxIn, unsigned int data[4]) {
  __cpuid(eaxIn, data[0], data[1], data[2], data[3]);
}


x86 assembly (clang, -O0):
<getCpuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%r8d
call   1030 <__cpuid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCpuid>:
mov    (%rsi),%eax
mov    0x4(%rsi),%edx
mov    0x8(%rsi),%ecx
mov    0xc(%rsi),%r8d
mov    %eax,%esi
jmp    1030 <__cpuid@plt>

LLVM IR (-O0):
define void @getCpuid(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 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 3
%17 = load i32, i32* %16
%18 = call i32 @__cpuid(i32 %5, i32 %8, i32 %11, i32 %14, i32 %17)
ret void
}

LLVM IR (-O2):
define void @getCpuid(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %1, i64 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 3
%9 = load i32, i32* %8
%10 = tail call i32 @__cpuid(i32 %0, i32 %3, i32 %5, i32 %7, i32 %9)
ret void
}
void yy_1_IgnoredElementHeader(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_IgnoredElementHeader(i8* nocapture %0, i32 %1) {
ret void
}
unsigned long parity_check(unsigned long prbs_accum) {
  unsigned long mask = 1UL, parity = 0UL;
  int i;
  for (i = 0; i < 32; ++i) {
    parity ^= ((prbs_accum & mask) != 0UL);
    mask <<= 1;
  }
  return parity;
}


x86 assembly (clang, -O0):
<parity_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x20,-0x1c(%rbp)
jge    1161 <parity_check+0x61>
mov    -0x8(%rbp),%rax
and    -0x10(%rbp),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
cltq
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111f <parity_check+0x1f>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity_check>:
mov    $0x1,%ecx
mov    $0x20,%r8d
xor    %eax,%eax
nopl   (%rax)
xor    %esi,%esi
test   %rdi,%rcx
setne  %sil
xor    %rax,%rsi
lea    (%rcx,%rcx,1),%rax
xor    %edx,%edx
test   %rdi,%rax
setne  %dl
xor    %rsi,%rdx
lea    0x0(,%rcx,4),%rax
xor    %esi,%esi
test   %rdi,%rax
setne  %sil
lea    0x0(,%rcx,8),%r9
xor    %eax,%eax
test   %rdi,%r9
setne  %al
xor    %rsi,%rax
xor    %rdx,%rax
shl    $0x4,%rcx
add    $0xfffffffc,%r8d
jne    1110 <parity_check+0x10>
ret

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

LLVM IR (-O2):
define i64 @parity_check(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %26, %2 ]
%4 = phi i64 [ 0, %1 ], [ %24, %2 ]
%5 = phi i64 [ 1, %1 ], [ %25, %2 ]
%6 = and i64 %5, %0
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = xor i64 %4, %8
%10 = shl i64 %5, 1
%11 = and i64 %10, %0
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i64
%14 = xor i64 %9, %13
%15 = shl i64 %5, 2
%16 = and i64 %15, %0
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i64
%19 = xor i64 %14, %18
%20 = shl i64 %5, 3
%21 = and i64 %20, %0
%22 = icmp ne i64 %21, 0
%23 = zext i1 %22 to i64
%24 = xor i64 %19, %23
%25 = shl i64 %5, 4
%26 = add nuw nsw i32 %3, 4
%27 = icmp eq i32 %26, 32
br i1 %27, label %28, label %2
28: ; preds = %2
ret i64 %24
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int n;
  char a[20];
  printf("input: ");
  scanf("%d", &n);
  itoa(n, a);
  printf("%d\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1050 <itoa@plt>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rsi
call   1050 <itoa@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"input: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @itoa(i32 %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"input: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = call i32 @itoa(i32 %7, i8* %4)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_is_pending() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_is_pending"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_pstream_is_pending\0A\00"
define i32 @pa_pstream_is_pending() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_pstream_is_pending\00"
define i32 @pa_pstream_is_pending() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int f1(int a, int b) {
  int x = 1;
  return x;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
ret i32 1
}