xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ tosLog_error(char *, char *, char *);
int tosInt32_div(int x, int y) {
  if (y == 0)
    tosLog_error("tosInt32", "div", "Division by zero");
  return x / y;
}


x86 assembly (clang, -O0):
<tosInt32_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1142 <tosInt32_div+0x32>
lea    0xed1(%rip),%rdi
lea    0xed3(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <tosLog_error@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosInt32_div>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
test   %esi,%esi
jne    1135 <tosInt32_div+0x25>
lea    0xede(%rip),%rdi
lea    0xee0(%rip),%rsi
lea    0xedd(%rip),%rdx
call   1030 <tosLog_error@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"tosInt32\00"
@.str.1 = [4 x i8] c"div\00"
@.str.2 = [17 x i8] c"Division by zero\00"
define i32 @tosInt32_div(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @tosLog_error(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sdiv i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
@.str = [9 x i8] c"tosInt32\00"
@.str.1 = [4 x i8] c"div\00"
@.str.2 = [17 x i8] c"Division by zero\00"
define i32 @tosInt32_div(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @tosLog_error(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = sdiv i32 %0, %1
ret i32 %7
}
void FanIntDisable(unsigned long ulBase, unsigned long ulFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000090))) &= ~ulFlags;
}


x86 assembly (clang, -O0):
<FanIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x90(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x90(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FanIntDisable>:
not    %rsi
and    %rsi,0x90(%rdi)
ret

LLVM IR (-O0):
define void @FanIntDisable(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 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 144
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @FanIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 144
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
void target(char *txt) {}


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

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

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

LLVM IR (-O2):
define void @target(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_bit(int, void volatile *);
void sync_clear_bit(int nr, volatile void *addr) { clear_bit(nr, addr); }


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

x86 assembly (clang, -O2):
<sync_clear_bit>:
jmp    1030 <clear_bit@plt>

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

LLVM IR (-O2):
define void @sync_clear_bit(i32 %0, i8* %1) {
%3 = tail call i32 @clear_bit(i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m_lista_dispositivos_todos_Bluetooth(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main() { m_lista_dispositivos_todos_Bluetooth(stdout); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <m_lista_dispositivos_todos_Bluetooth@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <m_lista_dispositivos_todos_Bluetooth@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = call i32 @m_lista_dispositivos_todos_Bluetooth(i32 %1)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @m_lista_dispositivos_todos_Bluetooth(i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char);
char *skipwhite(char *p) {
  while (*p && isspace(*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skipwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skipwhite+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skipwhite+0x47>
jmp    1168 <skipwhite+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skipwhite+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipwhite>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skipwhite+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skipwhite+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skipwhite+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

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

/* Variables and functions */
char cigar_int_to_op(uint32_t cigar_int) {
  return (cigar_int & 0xfU) > 8 ? 'M' : "MIDNSHP=X"[cigar_int & 0xfU];
}


x86 assembly (clang, -O0):
<cigar_int_to_op>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
cmp    $0x8,%eax
jbe    1123 <cigar_int_to_op+0x23>
mov    $0x4d,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <cigar_int_to_op+0x3b>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xecc(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cigar_int_to_op>:
and    $0xf,%edi
mov    $0x4d,%al
cmp    $0x8,%edi
ja     1114 <cigar_int_to_op+0x14>
lea    0xeef(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@.str = [10 x i8] c"MIDNSHP=X\00"
define signext i8 @cigar_int_to_op(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 15
%5 = icmp ugt i32 %4, 8
br i1 %5, label %6, label %7
6: ; preds = %1
br label %14
7: ; preds = %1
%8 = load i32, i32* %2
%9 = and i32 %8, 15
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [10 x i8], [10 x i8]* @.str, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %7, %6
%15 = phi i32 [ 77, %6 ], [ %13, %7 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"MIDNSHP=X\00"
define signext i8 @cigar_int_to_op(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ugt i32 %2, 8
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds [10 x i8], [10 x i8]* @.str, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 77, %1 ]
ret i8 %9
}
void inputStream_initFile() {}


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

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

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

LLVM IR (-O2):
define void @inputStream_initFile() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           char const *);
int /*<<< orphan*/ send_status(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ strlen(char const *);
void send_response(FILE *client, int code, const char *message_body) {
  send_status(client, code);
  fprintf(client, "Connection: close\r\nContent-length: %zu\r\n\r\n%s",
          strlen(message_body), message_body);
}


x86 assembly (clang, -O0):
<send_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <send_status@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    -0x18(%rbp),%rcx
lea    0xe8f(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_response>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <send_status@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Connection: close\0D\0AContent-length: %zu\0D\0A\0D\0A%s\00"
define void @send_response(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = call i32 @send_status(i32* %7, i32 %8)
%10 = load i32*, i32** %4
%11 = load i8*, i8** %6
%12 = call i32 @strlen(i8* %11)
%13 = load i8*, i8** %6
%14 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Connection: close\0D\0AContent-length: %zu\0D\0A\0D\0A%s\00"
define void @send_response(i32* %0, i32 %1, i8* %2) {
%4 = tail call i32 @send_status(i32* %0, i32 %1)
%5 = tail call i32 @strlen(i8* %2)
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %2)
ret void
}
int main(void) {
  float x;
  x = 3.1415;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float 0x400921CAC0000000, float* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ stm32f4_ts_check_boundary(int *, int);
int stm32f4_ts_calibrate_y(int y) {
  int tmp_y;
  y -= 360;
  tmp_y = y / 11;
  stm32f4_ts_check_boundary(&tmp_y, 320 - 1);
  return tmp_y;
}


x86 assembly (clang, -O0):
<stm32f4_ts_calibrate_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x168,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x13f,%esi
call   1030 <stm32f4_ts_check_boundary@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stm32f4_ts_calibrate_y>:
push   %rax
add    $0xfffffe98,%edi
movslq %edi,%rax
imul   $0x2e8ba2e9,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x13f,%esi
call   1030 <stm32f4_ts_check_boundary@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stm32f4_ts_calibrate_y(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 360
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 11
store i32 %7, i32* %3
%8 = call i32 @stm32f4_ts_check_boundary(i32* %3, i32 319)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @stm32f4_ts_calibrate_y(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = add nsw i32 %0, -360
%5 = sdiv i32 %4, 11
store i32 %5, i32* %2
%6 = call i32 @stm32f4_ts_check_boundary(i32* %2, i32 319)
%7 = load i32, i32* %2
ret i32 %7
}
/* Variables and functions */
int noscramble(int);
int whiletest2(int a) {
  while (a > 0) {
    a = noscramble(a);
    a--;
  }
  return a;
}


x86 assembly (clang, -O0):
<whiletest2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    113e <whiletest2+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <noscramble@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <whiletest2+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whiletest2>:
push   %rax
test   %edi,%edi
jle    112d <whiletest2+0x1d>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <noscramble@plt>
lea    -0x1(%rax),%edi
cmp    $0x1,%eax
jg     1120 <whiletest2+0x10>
mov    %edi,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @whiletest2(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @noscramble(i32 %4)
%6 = add nsw i32 %5, -1
%7 = icmp sgt i32 %5, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
%9 = phi i32 [ %0, %1 ], [ %6, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fftss_plan_with_nthreads(int);
void dfftss_plan_with_nthreads_(int *nthreads) {
  fftss_plan_with_nthreads(*nthreads);
}


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

x86 assembly (clang, -O2):
<dfftss_plan_with_nthreads_>:
mov    (%rdi),%edi
jmp    1030 <fftss_plan_with_nthreads@plt>

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

LLVM IR (-O2):
define void @dfftss_plan_with_nthreads_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @fftss_plan_with_nthreads(i32 %2)
ret void
}
void free_if_hostnames(char **names) {
  int i;
  if (!names)
    return;
  for (i = 0; names[i]; i++)
    free(names[i]);
  free(names);
}


x86 assembly (clang, -O0):
<free_if_hostnames>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <free_if_hostnames+0x1c>
jmp    116e <free_if_hostnames+0x5e>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1165 <free_if_hostnames+0x55>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <free_if_hostnames+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_if_hostnames>:
test   %rdi,%rdi
je     1150 <free_if_hostnames+0x40>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_if_hostnames+0x31>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_if_hostnames+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @free_if_hostnames(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %11, %6 ], [ %4, %3 ]
tail call void @free(i8* %8)
%9 = add nuw nsw i64 %7, 1
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3
%14 = bitcast i8** %0 to i8*
tail call void @free(i8* %14)
br label %15
15: ; preds = %1, %13
ret void
}
/* Variables and functions */
char *memchr(char const *, int /*<<< orphan*/, size_t);
size_t strnlen(const char *str, size_t max) {
  const char *end = memchr(str, 0, max);
  return end ? (size_t)(end - str) : max;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1152 <strnlen+0x42>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    115a <strnlen+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memchr@plt>
mov    %rax,%rcx
sub    %rbx,%rcx
test   %rax,%rax
cmove  %r14,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = tail call i8* @memchr(i8* %0, i32 0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = select i1 %4, i64 %1, i64 %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void Mesh_System_Free(unsigned char *memory) { free(memory); }


x86 assembly (clang, -O0):
<Mesh_System_Free>:
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):
<Mesh_System_Free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @Mesh_System_Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
extern void atsruntime_handle_unmatchedval(char *msg0) {
  fprintf(stderr, "exit(ATS): unmatched value at run-time:\n%s\n", msg0);
  exit(1);
  return;
}


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

x86 assembly (clang, -O2):
<atsruntime_handle_unmatchedval>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"exit(ATS): unmatched value at run-time:\0A%s\0A\00"
define void @atsruntime_handle_unmatchedval(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"exit(ATS): unmatched value at run-time:\0A%s\0A\00"
define void @atsruntime_handle_unmatchedval(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void setval_382(unsigned *p) { *p = 3353381192U; }


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

x86 assembly (clang, -O2):
<setval_382>:
movl   $0xc7e08948,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_382(i32* nocapture writeonly %0) {
store i32 -941586104, i32* %0
ret void
}
/* Type definitions */
struct tokeniser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ error(struct tokeniser *, char *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void error1(struct tokeniser *t, char *s) { error(t, s, 0, 0, 0); }


x86 assembly (clang, -O0):
<error1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error1>:
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <error@plt>

LLVM IR (-O0):
%struct.tokeniser = type { i32 }
define void @error1(%struct.tokeniser* %0, i8* %1) {
%3 = alloca %struct.tokeniser*
%4 = alloca i8*
store %struct.tokeniser* %0, %struct.tokeniser** %3
store i8* %1, i8** %4
%5 = load %struct.tokeniser*, %struct.tokeniser** %3
%6 = load i8*, i8** %4
%7 = call i32 @error(%struct.tokeniser* %5, i8* %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.tokeniser = type { i32 }
define void @error1(%struct.tokeniser* %0, i8* %1) {
%3 = tail call i32 @error(%struct.tokeniser* %0, i8* %1, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rightrot(int, int);
int main(void) {
  unsigned x = 3;
  printf("%u", rightrot(3, 33));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    $0x3,%edi
mov    $0x21,%esi
call   1040 <rightrot@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x21,%esi
call   1040 <rightrot@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%3 = call i32 @rightrot(i32 3, i32 33)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = tail call i32 @rightrot(i32 3, i32 33)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_greetings2();
int /*<<< orphan*/ sleep(int);
void *thread2_func(void *unused) {
  while (1) {
    print_greetings2();
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<thread2_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <print_greetings2@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    112c <thread2_func+0xc>

x86 assembly (clang, -O2):
<thread2_func>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <print_greetings2@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <thread2_func+0x10>

LLVM IR (-O0):
define i8* @thread2_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @print_greetings2()
%5 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
define noalias i8* @thread2_func(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (...) @print_greetings2()
%4 = tail call i32 @sleep(i32 1)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ getDimension();
char getNonSpace();
int /*<<< orphan*/ ungetTexChar(char);
void IgnoreMeasure(void) {
  char c = getNonSpace();
  if (c == '=')
    c = getNonSpace();
  ungetTexChar(c);
  getDimension();
}


x86 assembly (clang, -O0):
<IgnoreMeasure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getNonSpace@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x3d,%eax
jne    1159 <IgnoreMeasure+0x29>
mov    $0x0,%al
call   1040 <getNonSpace@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <ungetTexChar@plt>
mov    $0x0,%al
call   1050 <getDimension@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IgnoreMeasure>:
push   %rax
xor    %eax,%eax
call   1040 <getNonSpace@plt>
cmp    $0x3d,%al
jne    1143 <IgnoreMeasure+0x13>
xor    %eax,%eax
call   1040 <getNonSpace@plt>
movsbl %al,%edi
call   1030 <ungetTexChar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getDimension@plt>

LLVM IR (-O0):
define void @IgnoreMeasure() {
%1 = alloca i8
%2 = call signext i8 (...) @getNonSpace()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 61
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call signext i8 (...) @getNonSpace()
store i8 %7, i8* %1
br label %8
8: ; preds = %6, %0
%9 = load i8, i8* %1
%10 = call i32 @ungetTexChar(i8 signext %9)
%11 = call i32 (...) @getDimension()
ret void
}

LLVM IR (-O2):
define void @IgnoreMeasure() {
%1 = tail call signext i8 (...) @getNonSpace()
%2 = icmp eq i8 %1, 61
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call signext i8 (...) @getNonSpace()
br label %5
5: ; preds = %3, %0
%6 = phi i8 [ %4, %3 ], [ %1, %0 ]
%7 = tail call i32 @ungetTexChar(i8 signext %6)
%8 = tail call i32 (...) @getDimension()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ avm_getactual(unsigned int);
int /*<<< orphan*/ avm_tostring(int /*<<< orphan*/);
unsigned int avm_totalactuals();
int /*<<< orphan*/ putchar(char);
void lib_print(void) {
  unsigned n = avm_totalactuals();
  unsigned i;
  for (i = 0; i < n; i++) {
    avm_tostring(avm_getactual(i));
    putchar(' ');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<lib_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <avm_totalactuals@plt>
mov    %eax,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    118c <lib_print+0x4c>
mov    -0x8(%rbp),%edi
call   1040 <avm_getactual@plt>
mov    %eax,%edi
call   1050 <avm_tostring@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <lib_print+0x19>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_print>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <avm_totalactuals@plt>
test   %eax,%eax
je     117f <lib_print+0x3f>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
call   1040 <avm_getactual@plt>
mov    %eax,%edi
call   1050 <avm_tostring@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1160 <lib_print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @lib_print() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @avm_totalactuals()
store i32 %3, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i32, i32* %2
%10 = call i32 @avm_getactual(i32 %9)
%11 = call i32 @avm_tostring(i32 %10)
%12 = call i32 @putchar(i8 signext 32)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
%17 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @lib_print() {
%1 = tail call i32 (...) @avm_totalactuals()
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %8, %3 ], [ 0, %0 ]
%5 = tail call i32 @avm_getactual(i32 %4)
%6 = tail call i32 @avm_tostring(i32 %5)
%7 = tail call i32 @putchar(i8 signext 32)
%8 = add nuw i32 %4, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %10, label %3
10: ; preds = %3, %0
%11 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *);
int main(void) {
  int number;
  while (scanf("%d", &number))
    printf("Negation: [%d]\n", !number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     1168 <main+0x48>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     1183 <main+0x63>
lea    0xebd(%rip),%r14
lea    0xeb3(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %esi,%esi
cmpl   $0x0,0xc(%rsp)
sete   %sil
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"Negation: [%d]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"Negation: [%d]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %0
ret i32 0
}
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/currgn.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 = [147 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/currgn.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 ([147 x i8], [147 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 = [147 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/currgn.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 ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
void set_pin_value(int v) {
  unsigned tmp;
  tmp = (*(volatile unsigned long *)0xE0200C24);
  if (v) {
    tmp |= (1 << 2);
  } else {
    tmp &= ~(1 << 2);
  }
  (*(volatile unsigned long *)0xE0200C24) = tmp;
}


x86 assembly (clang, -O0):
<set_pin_value>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xe0200c24,%eax
mov    (%rax),%rax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112a <set_pin_value+0x2a>
mov    -0x8(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <set_pin_value+0x33>
mov    -0x8(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    $0xe0200c24,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pin_value>:
mov    $0xe0200c24,%eax
mov    (%rax),%rcx
mov    %ecx,%edx
or     $0x4,%edx
and    $0xfffffffb,%ecx
test   %edi,%edi
cmovne %rdx,%rcx
mov    %ecx,%ecx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @set_pin_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load volatile i64, i64* inttoptr (i64 3760196644 to i64*)
%5 = trunc i64 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = or i32 %9, 4
store i32 %10, i32* %3
br label %14
11: ; preds = %1
%12 = load i32, i32* %3
%13 = and i32 %12, -5
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
%16 = zext i32 %15 to i64
store volatile i64 %16, i64* inttoptr (i64 3760196644 to i64*)
ret void
}

LLVM IR (-O2):
define void @set_pin_value(i32 %0) {
%2 = load volatile i64, i64* inttoptr (i64 3760196644 to i64*)
%3 = icmp eq i32 %0, 0
%4 = or i64 %2, 4
%5 = and i64 %2, 4294967291
%6 = select i1 %3, i64 %5, i64 %4
%7 = and i64 %6, 4294967295
store volatile i64 %7, i64* inttoptr (i64 3760196644 to i64*)
ret void
}
int check_values(int h1, int h2, int m1, int m2) {
  if (h1 < 0 || h2 < 0 || h1 > 23 || h2 > 23 || m1 < 0 || m2 < 0 || m2 > 59 ||
      m1 > 59) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<check_values>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1160 <check_values+0x60>
cmpl   $0x0,-0xc(%rbp)
jl     1160 <check_values+0x60>
cmpl   $0x17,-0x8(%rbp)
jg     1160 <check_values+0x60>
cmpl   $0x17,-0xc(%rbp)
jg     1160 <check_values+0x60>
cmpl   $0x0,-0x10(%rbp)
jl     1160 <check_values+0x60>
cmpl   $0x0,-0x14(%rbp)
jl     1160 <check_values+0x60>
cmpl   $0x3b,-0x14(%rbp)
jg     1160 <check_values+0x60>
cmpl   $0x3b,-0x10(%rbp)
jle    116c <check_values+0x6c>
movl   $0x0,-0x4(%rbp)
jmp    1173 <check_values+0x73>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_values>:
mov    %esi,%eax
or     %edi,%eax
setns  %r8b
cmp    $0x18,%edi
setl   %r9b
and    %r8b,%r9b
cmp    $0x18,%esi
setl   %sil
mov    %ecx,%edi
or     %edx,%edi
setns  %al
and    %sil,%al
and    %r9b,%al
cmp    $0x3c,%ecx
setl   %cl
cmp    $0x3c,%edx
setl   %dl
and    %cl,%dl
and    %al,%dl
movzbl %dl,%eax
ret

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

LLVM IR (-O2):
define i32 @check_values(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = or i32 %1, %0
%6 = icmp slt i32 %5, 0
%7 = icmp sgt i32 %0, 23
%8 = or i1 %7, %6
%9 = icmp sgt i32 %1, 23
%10 = or i1 %9, %8
%11 = or i32 %3, %2
%12 = icmp slt i32 %11, 0
%13 = or i1 %12, %10
%14 = icmp sgt i32 %3, 59
%15 = or i1 %14, %13
%16 = icmp sgt i32 %2, 59
%17 = or i1 %16, %15
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}
/* Variables and functions */
scalar_t__ MMalloc(long);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *util_strsav(char *s) {
  return strcpy(((char *)MMalloc((long)sizeof(char) * (long)(strlen(s) + 1))),
                s);
}


x86 assembly (clang, -O0):
<util_strsav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <MMalloc@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_strsav>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1040 <MMalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @util_strsav(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = mul nsw i64 1, %5
%7 = call i64 @MMalloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @util_strsav(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @MMalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ bsp_irq_mask(int);
void irq_8259_mask(int irq) { bsp_irq_mask(irq); }


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

x86 assembly (clang, -O2):
<irq_8259_mask>:
jmp    1030 <bsp_irq_mask@plt>

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

LLVM IR (-O2):
define void @irq_8259_mask(i32 %0) {
%2 = tail call i32 @bsp_irq_mask(i32 %0)
ret void
}
void __DELETE_java_io_FileDescriptor(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_io_FileDescriptor(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ skript();
void main(void) {
  printf("ProolSkript Interpreter\n");
  skript();
  puts("");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <skript@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <skript@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"ProolSkript Interpreter\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @skript()
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"ProolSkript Interpreter\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @skript()
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void PANIC(char *msg) {
  perror(msg);
  exit(0);
}


x86 assembly (clang, -O0):
<PANIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PANIC>:
push   %rax
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @PANIC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @PANIC(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}