xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int sockatmark(int fd) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<sockatmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sockatmark>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @sockatmark(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @sockatmark(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Out(int, int, char);
int /*<<< orphan*/ limpamlc();
int /*<<< orphan*/ mostrapenter(char);
int /*<<< orphan*/ sprintf(char, char *);
void frasenove(char plinha, char penter) {
  limpamlc();
  sprintf(plinha, "9: Agua");
  LCD_Out(1, 5, plinha);
  mostrapenter(penter);
}


x86 assembly (clang, -O0):
<frasenove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1030 <limpamlc@plt>
lea    0xe9e(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1050 <sprintf@plt>
mov    $0x1,%edi
mov    $0x5,%esi
movsbl -0x1(%rbp),%edx
call   1040 <LCD_Out@plt>
movsbl -0x2(%rbp),%edi
call   1060 <mostrapenter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frasenove>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <limpamlc@plt>
lea    0xeab(%rip),%rsi
mov    %ebp,%edi
call   1050 <sprintf@plt>
mov    $0x1,%edi
mov    $0x5,%esi
mov    %ebp,%edx
call   1040 <LCD_Out@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <mostrapenter@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"9: Agua\00"
define void @frasenove(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @limpamlc()
%6 = load i8, i8* %3
%7 = call i32 @sprintf(i8 signext %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = load i8, i8* %3
%9 = call i32 @LCD_Out(i32 1, i32 5, i8 signext %8)
%10 = load i8, i8* %4
%11 = call i32 @mostrapenter(i8 signext %10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"9: Agua\00"
define void @frasenove(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (...) @limpamlc()
%4 = tail call i32 @sprintf(i8 signext %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @LCD_Out(i32 1, i32 5, i8 signext %0)
%6 = tail call i32 @mostrapenter(i8 signext %1)
ret void
}
int f(long a) { return (--a > 0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0x2,%rdi
setge  %al
ret

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

LLVM IR (-O2):
define i32 @f(i64 %0) {
%2 = icmp sgt i64 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
int execute_sethostname() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sethostname() {
ret i32 0
}
unsigned int log2_floor(unsigned int v) {
  unsigned int x = 0;
  while (v) {
    v >>= 1;
    x += 1;
  }
  return x;
}


x86 assembly (clang, -O0):
<log2_floor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <log2_floor+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <log2_floor+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2_floor>:
xor    %eax,%eax
test   %edi,%edi
je     111c <log2_floor+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <log2_floor+0x10>
ret

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

LLVM IR (-O2):
define i32 @log2_floor(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int freadi(FILE *fIn) {
  int iTemp;
  fread(&iTemp, sizeof(int), 1, fIn);
  return iTemp;
}


x86 assembly (clang, -O0):
<freadi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freadi>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @freadi(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = load i32, i32* %2
ret i32 %5
}
void handle_40(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_40(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
void vMemcpy0(unsigned char *pszTarget, const unsigned char *psSource,
              int iLength) {
  memcpy(pszTarget, psSource, iLength);
  pszTarget[iLength] = 0;
}


x86 assembly (clang, -O0):
<vMemcpy0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vMemcpy0>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <memcpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @vMemcpy0(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret void
}
/* Variables and functions */
double deg2hour(int /*<<< orphan*/);
int /*<<< orphan*/ rad2deg(double);
double rad2hour(double x) { return deg2hour(rad2deg(x)); }


x86 assembly (clang, -O0):
<rad2hour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <rad2deg@plt>
mov    %eax,%edi
call   1030 <deg2hour@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2hour>:
push   %rax
call   1040 <rad2deg@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <deg2hour@plt>

LLVM IR (-O0):
define double @rad2hour(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @rad2deg(double %3)
%5 = call double @deg2hour(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @rad2hour(double %0) {
%2 = tail call i32 @rad2deg(double %0)
%3 = tail call double @deg2hour(i32 %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x97() {
  Assert_real((isupper(151) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              760, ("isupper should be 0 for 0x97"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x97\00"
define void @t_isupper_0x97() {
%1 = tail call i64 @isupper(i32 151)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 760, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _mm_comineq_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_load_ss(float *);
int determ_neq_float(uint32_t a, uint32_t b) {
  return !!_mm_comineq_ss(_mm_load_ss((float *)&a), _mm_load_ss((float *)&b));
}


x86 assembly (clang, -O0):
<determ_neq_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
call   1040 <_mm_load_ss@plt>
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <_mm_load_ss@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <_mm_comineq_ss@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determ_neq_float>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <_mm_load_ss@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%rdi
call   1040 <_mm_load_ss@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <_mm_comineq_ss@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @determ_neq_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = bitcast i32* %3 to float*
%6 = call i32 @_mm_load_ss(float* %5)
%7 = bitcast i32* %4 to float*
%8 = call i32 @_mm_load_ss(float* %7)
%9 = call i32 @_mm_comineq_ss(i32 %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @determ_neq_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = bitcast i32* %3 to float*
%6 = call i32 @_mm_load_ss(float* %5)
%7 = bitcast i32* %4 to float*
%8 = call i32 @_mm_load_ss(float* %7)
%9 = call i32 @_mm_comineq_ss(i32 %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_fs(struct ship *ship, long a) { Write(31, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_fs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1f,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_fs>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1f,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_fs(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 31, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_fs(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 31, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cfftf1(int, float *, float *, float *, int *, int);
void cfftb(int n, float c[], float wsave[]) {
  int iw1, iw2;
  if (n == 1)
    return;
  iw1 = 2 * n;
  iw2 = iw1 + 2 * n;
  cfftf1(n, c, wsave, wsave + iw1, (int *)(wsave + iw2), +1);
}


x86 assembly (clang, -O0):
<cfftb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <cfftb+0x22>
jmp    117d <cfftb+0x6d>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r8
mov    $0x1,%r9d
call   1030 <cfftf1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfftb>:
cmp    $0x1,%edi
jne    1116 <cfftb+0x6>
ret
lea    (%rdi,%rdi,1),%eax
lea    0x0(,%rdi,4),%r8d
cltq
lea    (%rdx,%rax,4),%rcx
movslq %r8d,%rax
lea    (%rdx,%rax,4),%r8
mov    $0x1,%r9d
jmp    1030 <cfftf1@plt>

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

LLVM IR (-O2):
define void @cfftb(i32 %0, float* %1, float* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = shl nsw i32 %0, 1
%7 = shl nsw i32 %0, 2
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds float, float* %2, i64 %8
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds float, float* %2, i64 %10
%12 = bitcast float* %11 to i32*
%13 = tail call i32 @cfftf1(i32 %0, float* %1, float* %2, float* %9, i32* %12, i32 1)
br label %14
14: ; preds = %3, %5
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t signum_i16(int16_t i) {
  if (i > 0)
    return 1;
  if (i < 0)
    return (-1);
  return 0;
}


x86 assembly (clang, -O0):
<signum_i16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1120 <signum_i16+0x20>
movq   $0x1,-0x8(%rbp)
jmp    1140 <signum_i16+0x40>
cmpq   $0x0,-0x10(%rbp)
jge    1138 <signum_i16+0x38>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1140 <signum_i16+0x40>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_i16>:
mov    %rdi,%rcx
sar    $0x3f,%rcx
test   %rdi,%rdi
mov    $0x1,%eax
cmovle %rcx,%rax
ret

LLVM IR (-O0):
define i64 @signum_i16(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %12
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 -1, i64* %2
br label %12
11: ; preds = %7
store i64 0, i64* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @signum_i16(i64 %0) {
%2 = ashr i64 %0, 63
%3 = icmp slt i64 %0, 1
%4 = select i1 %3, i64 %2, i64 1
ret i64 %4
}
/* Variables and functions */
double dsfmt_gv_genrand_close1_open2();
double s_genrand_close1_open2(void) { return dsfmt_gv_genrand_close1_open2(); }


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

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

LLVM IR (-O0):
define double @s_genrand_close1_open2() {
%1 = call double (...) @dsfmt_gv_genrand_close1_open2()
ret double %1
}

LLVM IR (-O2):
define double @s_genrand_close1_open2() {
%1 = tail call double (...) @dsfmt_gv_genrand_close1_open2()
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long long);
int /*<<< orphan*/ scanf(char *, unsigned long long *, int *);
int main() {
  unsigned long long int C;
  int N;
  scanf(" %llu %d", &C, &N);
  printf("%d", C % N);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x10(%rsp),%rax
movslq 0xc(%rsp),%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1157 <main+0x37>
xor    %edx,%edx
div    %rcx
jmp    115b <main+0x3b>
xor    %edx,%edx
div    %ecx
lea    0xea4(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c" %llu %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i32
%3 = bitcast i64* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64* %1, i32* %2)
%6 = load i64, i64* %1
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = urem i64 %6, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 %9)
ret i32 0
}
unsigned long long get_num_digits(unsigned long long num) {
  unsigned long long ret = 1;
  while ((num = num / 10) > 0)
    ret++;
  return ret;
}


x86 assembly (clang, -O0):
<get_num_digits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jbe    113d <get_num_digits+0x3d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <get_num_digits+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_digits>:
mov    $0x1,%ecx
cmp    $0xa,%rdi
jb     1137 <get_num_digits+0x37>
mov    $0x1,%ecx
movabs $0xcccccccccccccccd,%rsi
cc cc cc
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%rcx
cmp    $0x63,%rdi
mov    %rdx,%rdi
ja     1120 <get_num_digits+0x20>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @get_num_digits(i64 %0) {
%2 = icmp ult i64 %0, 10
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 1, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i64 %5, 10
%7 = add i64 %4, 1
%8 = icmp ult i64 %5, 100
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 1, %1 ], [ %7, %3 ]
ret i64 %10
}
int isPrime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114d <isPrime+0x4d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113a <isPrime+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1154 <isPrime+0x54>
jmp    113f <isPrime+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <isPrime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    $0x1,%eax
cmp    $0x4,%edi
jl     112c <isPrime+0x2c>
mov    $0x2,%ecx
nop
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1125 <isPrime+0x25>
add    $0x1,%ecx
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
jle    1110 <isPrime+0x10>
xor    %eax,%eax
test   %edx,%edx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 2, %1 ]
%5 = srem i32 %0, %4
%6 = icmp eq i32 %5, 0
%7 = add nuw nsw i32 %4, 1
%8 = mul nsw i32 %7, %7
%9 = icmp sgt i32 %8, %0
%10 = select i1 %6, i1 true, i1 %9
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = xor i1 %6, true
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %11, %1
%15 = phi i32 [ 1, %1 ], [ %13, %11 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\c\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [3 x i8] c"c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int arr[], int arr_size) {
  int i;
  for (i = 0; i < arr_size; i++)
    printf("%d ", arr[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void _rq_string_free(void *p) {
  char *s = (char *)p;
  free(s);
}


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

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

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

LLVM IR (-O2):
define void @_rq_string_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
extern void *bar(void *a, const void *b, unsigned c) {
  int d0, d1, d2;
  __asm__ __volatile__(""
                       : "=&c"(d0), "=&D"(d1), "=&S"(d2)
                       : "0"(c / 4), "q"(c), "1"(a), "2"(b)
                       : "memory");
  return a;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
shr    $0x2,%ecx
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    %ecx,-0x18(%rbp)
mov    %edi,%eax
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %rdi,%rax
mov    %edx,%ecx
shr    $0x2,%ecx
ret

LLVM IR (-O0):
define i8* @bar(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = load i32, i32* %6
%11 = udiv i32 %10, 4
%12 = load i32, i32* %6
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = call { i32, i8*, i8* } asm sideeffect "", "=&{cx},=&{di},=&{si},0,q,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %11, i32 %12, i8* %13, i8* %14)
%16 = extractvalue { i32, i8*, i8* } %15, 0
%17 = extractvalue { i32, i8*, i8* } %15, 1
%18 = extractvalue { i32, i8*, i8* } %15, 2
store i32 %16, i32* %7
%19 = ptrtoint i8* %17 to i64
%20 = trunc i64 %19 to i32
store i32 %20, i32* %8
%21 = ptrtoint i8* %18 to i64
%22 = trunc i64 %21 to i32
store i32 %22, i32* %9
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define i8* @bar(i8* returned %0, i8* %1, i32 %2) {
%4 = lshr i32 %2, 2
%5 = tail call { i32, i8*, i8* } asm sideeffect "", "=&{cx},=&{di},=&{si},0,q,1,2,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %4, i32 %2, i8* %0, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf_s(char *, char *);
void error_crash(char *sz_error) {
  printf_s("error: %s\n", sz_error);
  exit(0);
}


x86 assembly (clang, -O0):
<error_crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf_s@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_crash>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf_s@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"error: %s\0A\00"
define void @error_crash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf_s(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"error: %s\0A\00"
define void @error_crash(i8* %0) {
%2 = tail call i32 @printf_s(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ RC4_KEY;

/* Variables and functions */
int /*<<< orphan*/ RC4(int /*<<< orphan*/ *, unsigned int, unsigned char *,
                       unsigned char *);
int test(RC4_KEY key, unsigned int buflen, unsigned char *buf,
         unsigned char *result) {
  RC4(&key, buflen, buf, result);
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x4(%rbp),%rdi
call   1030 <RC4@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <RC4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @RC4(i32* %5, i32 %9, i8* %10, i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32
store i32 %0, i32* %5
%6 = call i32 @RC4(i32* %5, i32 %1, i8* %2, i8* %3)
ret i32 0
}
unsigned xrop3_234_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D | stk2;
  return (stk1 & (~S)) | (D & S);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_234_1_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 255
}
/* Type definitions */
struct Athena_Viewport {
  int dummy;
};
struct Athena_Menu {
  int dummy;
};
struct Athena_Image {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Athena_ViewportFromMenu(struct Athena_Menu const *,
                                           struct Athena_Image *,
                                           struct Athena_Viewport *);
struct Athena_Viewport *
athena_viewport_from_menu(const struct Athena_Menu *from,
                          struct Athena_Image *image,
                          struct Athena_Viewport *to) {
  Athena_ViewportFromMenu(from, image, to);
  return to;
}


x86 assembly (clang, -O0):
<athena_viewport_from_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <Athena_ViewportFromMenu@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<athena_viewport_from_menu>:
push   %rbx
mov    %rdx,%rbx
call   1030 <Athena_ViewportFromMenu@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Athena_Menu = type { i32 }
%struct.Athena_Image = type { i32 }
%struct.Athena_Viewport = type { i32 }
define %struct.Athena_Viewport* @athena_viewport_from_menu(%struct.Athena_Menu* %0, %struct.Athena_Image* %1, %struct.Athena_Viewport* %2) {
%4 = alloca %struct.Athena_Menu*
%5 = alloca %struct.Athena_Image*
%6 = alloca %struct.Athena_Viewport*
store %struct.Athena_Menu* %0, %struct.Athena_Menu** %4
store %struct.Athena_Image* %1, %struct.Athena_Image** %5
store %struct.Athena_Viewport* %2, %struct.Athena_Viewport** %6
%7 = load %struct.Athena_Menu*, %struct.Athena_Menu** %4
%8 = load %struct.Athena_Image*, %struct.Athena_Image** %5
%9 = load %struct.Athena_Viewport*, %struct.Athena_Viewport** %6
%10 = call i32 @Athena_ViewportFromMenu(%struct.Athena_Menu* %7, %struct.Athena_Image* %8, %struct.Athena_Viewport* %9)
%11 = load %struct.Athena_Viewport*, %struct.Athena_Viewport** %6
ret %struct.Athena_Viewport* %11
}

LLVM IR (-O2):
%struct.Athena_Menu = type { i32 }
%struct.Athena_Image = type { i32 }
%struct.Athena_Viewport = type { i32 }
define %struct.Athena_Viewport* @athena_viewport_from_menu(%struct.Athena_Menu* %0, %struct.Athena_Image* %1, %struct.Athena_Viewport* returned %2) {
%4 = tail call i32 @Athena_ViewportFromMenu(%struct.Athena_Menu* %0, %struct.Athena_Image* %1, %struct.Athena_Viewport* %2)
ret %struct.Athena_Viewport* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XMapRequestEvent;

/* Variables and functions */
void set_XMapRequestEvent_type(void *_p, int _v) {
  ((XMapRequestEvent *)_p)->type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XMapRequestEvent_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XMapRequestEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CloseAllFiles(void *);
int ExitFile(void *theEnv, int num) {
  CloseAllFiles(theEnv);
  return (1);
}


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

x86 assembly (clang, -O2):
<ExitFile>:
push   %rax
call   1030 <CloseAllFiles@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ExitFile(i8* %0, i32 %1) {
%3 = tail call i32 @CloseAllFiles(i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void *malloc(int);
int /*<<< orphan*/ memcpy(char *, ...);
char *construct_state_message(unsigned char msgID) {
  char *msg = malloc(5);
  int *msgLen = malloc(4);
  *msgLen = 1;
  memcpy(msg, msgLen, 4);
  memcpy(msg + 4, &msgID, 1);
  free(msgLen);
  return msg;
}


x86 assembly (clang, -O0):
<construct_state_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x5,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
xor    %eax,%eax
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_state_message>:
push   %r14
push   %rbx
push   %rax
mov    %dil,0x7(%rsp)
mov    $0x5,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x1,(%rax)
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <memcpy@plt>
lea    0x4(%r14),%rdi
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @construct_state_message(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i32*
store i8 %0, i8* %2
%5 = call i8* @malloc(i32 5)
store i8* %5, i8** %3
%6 = call i8* @malloc(i32 4)
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %4
%8 = load i32*, i32** %4
store i32 1, i32* %8
%9 = load i8*, i8** %3
%10 = load i32*, i32** %4
%11 = call i32 (i8*, ...) @memcpy(i8* %9, i32* %10, i32 4)
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 4
%14 = call i32 (i8*, ...) @memcpy(i8* %13, i8* %2, i32 1)
%15 = load i32*, i32** %4
%16 = call i32 @free(i32* %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @construct_state_message(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = tail call dereferenceable_or_null(5) i8* @malloc(i32 5)
%4 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%5 = bitcast i8* %4 to i32*
store i32 1, i32* %5
%6 = tail call i32 (i8*, ...) @memcpy(i8* %3, i8* %4, i32 4)
%7 = getelementptr inbounds i8, i8* %3, i64 4
%8 = call i32 (i8*, ...) @memcpy(i8* %7, i8* %2, i32 1)
%9 = call i32 @free(i32* %5)
ret i8* %3
}
void __VERIFIER_assert(int condition) {}


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

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

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

LLVM IR (-O2):
define void @__VERIFIER_assert(i32 %0) {
ret void
}
void gtk_radio_tool_button_new_from_stock() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_tool_button_new_from_stock() {
ret void
}
/* Variables and functions */
scalar_t__ after(unsigned long, unsigned long);
scalar_t__ before(unsigned long, unsigned long);
int between(unsigned long seq1, unsigned long seq2, unsigned long seq3) {
  return (after(seq1 + 1, seq2) && before(seq1, seq3 + 1));
}


x86 assembly (clang, -O0):
<between>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <after@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     1172 <between+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1040 <before@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<between>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
add    $0x1,%rdi
call   1030 <after@plt>
test   %rax,%rax
je     1154 <between+0x34>
add    $0x1,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <before@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1156 <between+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @between(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 1
%5 = tail call i64 @after(i64 %4, i64 %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = add i64 %2, 1
%9 = tail call i64 @before(i64 %0, i64 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %3
%13 = phi i32 [ 0, %3 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
int int_size_is_32();
int int_size_is_32_for_16bit();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Int size is 32 in 32-bit machine: %d\n", int_size_is_32());
  printf("Int size is 32 in 16-bit machine: %d\n", int_size_is_32_for_16bit());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <int_size_is_32@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <int_size_is_32_for_16bit@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <int_size_is_32@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <int_size_is_32_for_16bit@plt>
lea    0xed2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Int size is 32 in 32-bit machine: %d\0A\00"
@.str.1 = [38 x i8] c"Int size is 32 in 16-bit machine: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @int_size_is_32()
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @int_size_is_32_for_16bit()
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Int size is 32 in 32-bit machine: %d\0A\00"
@.str.1 = [38 x i8] c"Int size is 32 in 16-bit machine: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @int_size_is_32()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @int_size_is_32_for_16bit()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}