xunge/DecIR huggingface dataset:
int do_589() { return 589; }


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

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

LLVM IR (-O0):
define i32 @do_589() {
ret i32 589
}

LLVM IR (-O2):
define i32 @do_589() {
ret i32 589
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void EPSIO_yy_fatal_error(const char *msg) {
  (void)fprintf(stderr, "%s\n", msg);
  exit(2);
}


x86 assembly (clang, -O0):
<EPSIO_yy_fatal_error>:
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    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @EPSIO_yy_fatal_error(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @EPSIO_yy_fatal_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
int fun609() { return 609; }


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

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

LLVM IR (-O0):
define i32 @fun609() {
ret i32 609
}

LLVM IR (-O2):
define i32 @fun609() {
ret i32 609
}
void SysCtlIntDisable(unsigned long ulInts) {
  (*((volatile unsigned long *)(0x400FE054))) &= ~(ulInts);
}


x86 assembly (clang, -O0):
<SysCtlIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400fe054,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400fe054,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlIntDisable>:
not    %rdi
and    %rdi,0x400fe054
40
ret

LLVM IR (-O0):
define void @SysCtlIntDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074782292 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074782292 to i64*)
ret void
}

LLVM IR (-O2):
define void @SysCtlIntDisable(i64 %0) {
%2 = xor i64 %0, -1
%3 = load volatile i64, i64* inttoptr (i64 1074782292 to i64*)
%4 = and i64 %3, %2
store volatile i64 %4, i64* inttoptr (i64 1074782292 to i64*)
ret void
}
/* Variables and functions */
int __sbistype(int, int);
int isrune(int c) { return (__sbistype(c, 0xFFFFFF00L)); }


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

x86 assembly (clang, -O2):
<isrune>:
mov    $0xffffff00,%esi
jmp    1030 <__sbistype@plt>

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

LLVM IR (-O2):
define i32 @isrune(i32 %0) {
%2 = tail call i32 @__sbistype(i32 %0, i32 -256)
ret i32 %2
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) { printf("The GCD is %d", gcd(3918848, 1653264)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3bcc00,%edi
mov    $0x193a10,%esi
call   1040 <gcd@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"The GCD is %d\00"
define i32 @main() {
%1 = call i32 @gcd(i32 3918848, i32 1653264)
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"The GCD is %d\00"
define i32 @main() {
%1 = tail call i32 @gcd(i32 3918848, i32 1653264)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ plcvm_get_bool(int /*<<< orphan*/);
int /*<<< orphan*/ plcvm_pop();
int /*<<< orphan*/ plcvm_push(int /*<<< orphan*/);
void cb_ldm_b1_s(void) { plcvm_push(plcvm_get_bool(plcvm_pop())); }


x86 assembly (clang, -O0):
<cb_ldm_b1_s>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <plcvm_pop@plt>
mov    %eax,%edi
call   1050 <plcvm_get_bool@plt>
mov    %eax,%edi
call   1040 <plcvm_push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cb_ldm_b1_s>:
push   %rax
xor    %eax,%eax
call   1030 <plcvm_pop@plt>
mov    %eax,%edi
call   1050 <plcvm_get_bool@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <plcvm_push@plt>

LLVM IR (-O0):
define void @cb_ldm_b1_s() {
%1 = call i32 (...) @plcvm_pop()
%2 = call i32 @plcvm_get_bool(i32 %1)
%3 = call i32 @plcvm_push(i32 %2)
ret void
}

LLVM IR (-O2):
define void @cb_ldm_b1_s() {
%1 = tail call i32 (...) @plcvm_pop()
%2 = tail call i32 @plcvm_get_bool(i32 %1)
%3 = tail call i32 @plcvm_push(i32 %2)
ret void
}
int test_imm_B8int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xB8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B8int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xb8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B8int64_midword_mem>:
testb  $0xb8,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B8int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 184
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_B8int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12058624
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void g_datalist_clear() {}


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

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

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

LLVM IR (-O2):
define void @g_datalist_clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gff3Tester(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc != 3)
    usage();
  gff3Tester(argv[1], argv[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1147 <main+0x27>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <gff3Tester@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edi
je     1130 <main+0x10>
xor    %eax,%eax
call   1040 <usage@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1030 <gff3Tester@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @gff3Tester(i8* %8, i8* %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ IS_ERR(void const *);
int IS_ERR_OR_NULL(const void *ptr) { return !ptr || IS_ERR(ptr); }


x86 assembly (clang, -O0):
<IS_ERR_OR_NULL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113f <IS_ERR_OR_NULL+0x2f>
mov    -0x8(%rbp),%rdi
call   1030 <IS_ERR@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ERR_OR_NULL>:
test   %rdi,%rdi
je     112b <IS_ERR_OR_NULL+0x1b>
push   %rax
call   1030 <IS_ERR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @IS_ERR_OR_NULL(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @IS_ERR(i8* %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @IS_ERR_OR_NULL(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @IS_ERR(i8* %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void statement_expr_test(void) {
  int a, i;
  a = 0;
  for (i = 0; i < 10; i++) {
    a += 1 + ({
           int b, j;
           b = 0;
           for (j = 0; j < 5; j++)
             b += j;
           b;
         });
  }
  printf("a=%d\n", a);
}


x86 assembly (clang, -O0):
<statement_expr_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    117f <statement_expr_test+0x6f>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    115f <statement_expr_test+0x4f>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <statement_expr_test+0x2e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <statement_expr_test+0x16>
mov    -0x4(%rbp),%esi
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statement_expr_test>:
lea    0xee9(%rip),%rdi
mov    $0x6e,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"a=%d\0A\00"
define void @statement_expr_test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %26, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %29
9: ; preds = %6
store i32 0, i32* %3
store i32 0, i32* %4
br label %10
10: ; preds = %17, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 5
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
br label %17
17: ; preds = %13
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %10
20: ; preds = %10
%21 = load i32, i32* %3
store i32 %21, i32* %5
%22 = load i32, i32* %5
%23 = add nsw i32 1, %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, %23
store i32 %25, i32* %1
br label %26
26: ; preds = %20
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %6
29: ; preds = %6
%30 = load i32, i32* %1
%31 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %30)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"a=%d\0A\00"
define void @statement_expr_test() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 110)
ret void
}
/* Type definitions */
struct mx_flock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _flock_free(struct mx_flock *);
void mx_flock_free(struct mx_flock *lock) { _flock_free(lock); }


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

x86 assembly (clang, -O2):
<mx_flock_free>:
jmp    1030 <_flock_free@plt>

LLVM IR (-O0):
%struct.mx_flock = type { i32 }
define void @mx_flock_free(%struct.mx_flock* %0) {
%2 = alloca %struct.mx_flock*
store %struct.mx_flock* %0, %struct.mx_flock** %2
%3 = load %struct.mx_flock*, %struct.mx_flock** %2
%4 = call i32 @_flock_free(%struct.mx_flock* %3)
ret void
}

LLVM IR (-O2):
%struct.mx_flock = type { i32 }
define void @mx_flock_free(%struct.mx_flock* %0) {
%2 = tail call i32 @_flock_free(%struct.mx_flock* %0)
ret void
}
void CameraXClkConfig(unsigned long ulBase, unsigned long ulCamClkIn,
                      unsigned long ulXClk) {
  unsigned long ulReg;
  unsigned long ucDiv;
  ulReg = (*((volatile unsigned long *)(ulBase + 0x00000048)));
  ulReg &= ~(0x0000001F);
  ucDiv = ((ulCamClkIn) / ulXClk);
  if (ucDiv > 30) {
    return;
  }
  ulReg |= ucDiv;
  (*((volatile unsigned long *)(ulBase + 0x00000048))) = ulReg;
}


x86 assembly (clang, -O0):
<CameraXClkConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
and    $0xffffffffffffffe0,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x28(%rbp)
cmpq   $0x1e,-0x28(%rbp)
jbe    1148 <CameraXClkConfig+0x48>
jmp    1160 <CameraXClkConfig+0x60>
mov    -0x28(%rbp),%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x48(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CameraXClkConfig>:
mov    %rdx,%rcx
mov    %rsi,%rax
mov    0x48(%rdi),%rsi
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     112d <CameraXClkConfig+0x2d>
xor    %edx,%edx
div    %rcx
cmp    $0x1e,%rax
ja     112c <CameraXClkConfig+0x2c>
and    $0xffffffffffffffe0,%rsi
or     %rax,%rsi
mov    %rsi,0x48(%rdi)
ret
xor    %edx,%edx
div    %ecx
cmp    $0x1e,%rax
jbe    1121 <CameraXClkConfig+0x21>
jmp    112c <CameraXClkConfig+0x2c>

LLVM IR (-O0):
define void @CameraXClkConfig(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %4
%10 = add i64 %9, 72
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %7
%13 = load i64, i64* %7
%14 = and i64 %13, -32
store i64 %14, i64* %7
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = udiv i64 %15, %16
store i64 %17, i64* %8
%18 = load i64, i64* %8
%19 = icmp ugt i64 %18, 30
br i1 %19, label %20, label %21
20: ; preds = %3
br label %29
21: ; preds = %3
%22 = load i64, i64* %8
%23 = load i64, i64* %7
%24 = or i64 %23, %22
store i64 %24, i64* %7
%25 = load i64, i64* %7
%26 = load i64, i64* %4
%27 = add i64 %26, 72
%28 = inttoptr i64 %27 to i64*
store volatile i64 %25, i64* %28
br label %29
29: ; preds = %21, %20
ret void
}

LLVM IR (-O2):
define void @CameraXClkConfig(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 72
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = udiv i64 %1, %2
%8 = icmp ugt i64 %7, 30
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = and i64 %6, -32
%11 = or i64 %10, %7
store volatile i64 %11, i64* %5
br label %12
12: ; preds = %3, %9
ret void
}
void coap_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @coap_setup() {
ret void
}
int check_long() { return sizeof(long); }


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

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

LLVM IR (-O0):
define i32 @check_long() {
ret i32 8
}

LLVM IR (-O2):
define i32 @check_long() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void nil_dispose(void *o) { abort(); }


x86 assembly (clang, -O0):
<nil_dispose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<nil_dispose>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @nil_dispose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @nil_dispose(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ AltKeyDown();
scalar_t__ KeyPressed();
int AltKeyPressed(void) {
  if (!AltKeyDown())
    return 0;
  while (AltKeyDown())
    if (KeyPressed())
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<AltKeyPressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <AltKeyDown@plt>
cmp    $0x0,%rax
jne    1145 <AltKeyPressed+0x25>
movl   $0x0,-0x4(%rbp)
jmp    1184 <AltKeyPressed+0x64>
jmp    114a <AltKeyPressed+0x2a>
mov    $0x0,%al
call   1030 <AltKeyDown@plt>
cmp    $0x0,%rax
je     117d <AltKeyPressed+0x5d>
mov    $0x0,%al
call   1040 <KeyPressed@plt>
cmp    $0x0,%rax
je     1178 <AltKeyPressed+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1184 <AltKeyPressed+0x64>
jmp    114a <AltKeyPressed+0x2a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AltKeyPressed>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <AltKeyDown@plt>
test   %rax,%rax
je     115f <AltKeyPressed+0x3f>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <AltKeyDown@plt>
test   %rax,%rax
je     115a <AltKeyPressed+0x3a>
xor    %eax,%eax
call   1040 <KeyPressed@plt>
test   %rax,%rax
je     1140 <AltKeyPressed+0x20>
jmp    115f <AltKeyPressed+0x3f>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @AltKeyPressed() {
%1 = alloca i32
%2 = call i64 (...) @AltKeyDown()
%3 = icmp ne i64 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %15
5: ; preds = %0
br label %6
6: ; preds = %13, %5
%7 = call i64 (...) @AltKeyDown()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = call i64 (...) @KeyPressed()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %1
br label %15
13: ; preds = %9
br label %6
14: ; preds = %6
store i32 1, i32* %1
br label %15
15: ; preds = %14, %12, %4
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @AltKeyPressed() {
%1 = tail call i64 (...) @AltKeyDown()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0, %6
%4 = tail call i64 (...) @AltKeyDown()
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i64 (...) @KeyPressed()
%8 = icmp eq i64 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %6, %0
%10 = phi i32 [ 0, %0 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ callByRef(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x, y;
  x = 10;
  y = 20;
  printf("Value before swap: x=%d\ty=%d\n", x, y);
  callByRef(x, y);
  printf("Value after swap: x=%d\ty=%d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <callByRef@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <printf@plt>
mov    $0xa,%edi
mov    $0x14,%esi
call   1040 <callByRef@plt>
lea    0xed1(%rip),%rdi
mov    $0xa,%esi
mov    $0x14,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Value before swap: x=%d\09y=%d\0A\00"
@.str.1 = [29 x i8] c"Value after swap: x=%d\09y=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @callByRef(i32 %7, i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Value before swap: x=%d\09y=%d\0A\00"
@.str.1 = [29 x i8] c"Value after swap: x=%d\09y=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 10, i32 20)
%2 = tail call i32 @callByRef(i32 10, i32 20)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 20)
ret i32 0
}
/* Variables and functions */
int EFAULT;
int ENOTSUP;
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
scalar_t__ sysconf(int /*<<< orphan*/);
int pthread_get_nproc(int *number) {
  if (number == NULL) {
    return EFAULT;
  }
  if (((*number) = (int)sysconf(_SC_NPROCESSORS_ONLN)) == -1) {
    return ENOTSUP;
  }
  return 0;
}


x86 assembly (clang, -O0):
<pthread_get_nproc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <pthread_get_nproc+0x28>
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <pthread_get_nproc+0x5d>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    -0x10(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0xffffffff,%eax
jne    1166 <pthread_get_nproc+0x56>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <pthread_get_nproc+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_get_nproc>:
push   %rbx
test   %rdi,%rdi
je     113c <pthread_get_nproc+0x2c>
mov    %rdi,%rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
mov    %rax,%rcx
mov    %ecx,(%rbx)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
jne    1145 <pthread_get_nproc+0x35>
mov    0x2e9e(%rip),%rax
jmp    1143 <pthread_get_nproc+0x33>
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EFAULT = global i32 0
@_SC_NPROCESSORS_ONLN = global i32 0
@ENOTSUP = global i32 0
define i32 @pthread_get_nproc(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* @EFAULT
store i32 %7, i32* %2
br label %17
8: ; preds = %1
%9 = load i32, i32* @_SC_NPROCESSORS_ONLN
%10 = call i64 @sysconf(i32 %9)
%11 = trunc i64 %10 to i32
%12 = load i32*, i32** %3
store i32 %11, i32* %12
%13 = icmp eq i32 %11, -1
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = load i32, i32* @ENOTSUP
store i32 %15, i32* %2
br label %17
16: ; preds = %8
store i32 0, i32* %2
br label %17
17: ; preds = %16, %14, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@EFAULT = global i32 0
@_SC_NPROCESSORS_ONLN = global i32 0
@ENOTSUP = global i32 0
define i32 @pthread_get_nproc(i32* writeonly %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = load i32, i32* @EFAULT
br label %12
5: ; preds = %1
%6 = load i32, i32* @_SC_NPROCESSORS_ONLN
%7 = tail call i64 @sysconf(i32 %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %0
%9 = icmp eq i32 %8, -1
%10 = load i32, i32* @ENOTSUP
%11 = select i1 %9, i32 %10, i32 0
br label %12
12: ; preds = %5, %3
%13 = phi i32 [ %4, %3 ], [ %11, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ global_write_bad(int, int);
void call_impure_bad(int size) {
  for (int i = 0; i < size; i++) {
    global_write_bad(i, size);
  }
}


x86 assembly (clang, -O0):
<call_impure_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1147 <call_impure_bad+0x37>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <global_write_bad@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <call_impure_bad+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_impure_bad>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1130 <call_impure_bad+0x20>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <global_write_bad@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <call_impure_bad+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @call_impure_bad(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @global_write_bad(i32 %5, i32 %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
double jac_chain_nm4_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<jac_chain_nm4_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <jac_chain_nm4_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <jac_chain_nm4_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <jac_chain_nm4_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <jac_chain_nm4_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm4_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm4_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @jac_chain_nm4_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
char *hash_plugin_detailed(void) {
  return ("sha256unix - SHA256(Unix) plugin\n"
          "------------------------\n"
          "Use this module to crack shadow passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'. shadow "
          "files are acceptable\n"
          "Known software that uses this password hashing method:\n"
          "Some linux distributions, OpenSolaris\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [320 x i8] c"sha256unix - SHA256(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0ASome linux distributions, OpenSolaris\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([320 x i8], [320 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [320 x i8] c"sha256unix - SHA256(Unix) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0ASome linux distributions, OpenSolaris\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([320 x i8], [320 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzBinaryFuncConstR_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_REQDOWN(int);
void BrzBinaryFuncConstR_reqdown(struct comp *comp, int port) {
  struct BrzBinaryFuncConstR_ *c = (struct BrzBinaryFuncConstR_ *)comp;
  SEND_DATAOFF_DELAYED(0, 0);
  SEND_REQDOWN(1);
}


x86 assembly (clang, -O0):
<BrzBinaryFuncConstR_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_DATAOFF_DELAYED@plt>
mov    $0x1,%edi
call   1040 <SEND_REQDOWN@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzBinaryFuncConstR_reqdown>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <SEND_DATAOFF_DELAYED@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <SEND_REQDOWN@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzBinaryFuncConstR_ = type { i32 }
define void @BrzBinaryFuncConstR_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzBinaryFuncConstR_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzBinaryFuncConstR_*
store %struct.BrzBinaryFuncConstR_* %7, %struct.BrzBinaryFuncConstR_** %5
%8 = call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 0)
%9 = call i32 @SEND_REQDOWN(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzBinaryFuncConstR_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_DATAOFF_DELAYED(i32 0, i32 0)
%4 = tail call i32 @SEND_REQDOWN(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void kmapi_Warning(char *pch1) {
  char *pchWarning;
  pchWarning = "Warning";
  fprintf(stderr, "%s: %s\n", pchWarning, pch1);
}


x86 assembly (clang, -O0):
<kmapi_Warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmapi_Warning>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xee5(%rip),%rsi
lea    0xed6(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Warning\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%s: %s\0A\00"
define void @kmapi_Warning(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Warning\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%s: %s\0A\00"
define void @kmapi_Warning(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double fmod(double, double);
double Gcd(double m, double n) {
  double temp = 0.0;
  while (n > 0.0) {
    temp = n;
    n = fmod(m, n);
    m = temp;
  }
  return m;
}


x86 assembly (clang, -O0):
<Gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1169 <Gcd+0x59>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    112a <Gcd+0x1a>
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Gcd>:
push   %rax
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    1143 <Gcd+0x33>
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,(%rsp)
call   1030 <fmod@plt>
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
ucomisd %xmm2,%xmm0
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm0
ja     1120 <Gcd+0x10>
jmp    1147 <Gcd+0x37>
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Gcd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
br label %6
6: ; preds = %9, %2
%7 = load double, double* %4
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load double, double* %4
store double %10, double* %5
%11 = load double, double* %3
%12 = load double, double* %4
%13 = call double @fmod(double %11, double %12)
store double %13, double* %4
%14 = load double, double* %5
store double %14, double* %3
br label %6
15: ; preds = %6
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
define double @Gcd(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi double [ %7, %4 ], [ %1, %2 ]
%6 = phi double [ %5, %4 ], [ %0, %2 ]
%7 = tail call double @fmod(double %6, double %5)
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %4, label %9
9: ; preds = %4, %2
%10 = phi double [ %0, %2 ], [ %5, %4 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ SetFontCharSet112(unsigned long);
void setfontcharset(unsigned long cs) { SetFontCharSet112(cs); }


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

x86 assembly (clang, -O2):
<setfontcharset>:
jmp    1030 <SetFontCharSet112@plt>

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

LLVM IR (-O2):
define void @setfontcharset(i64 %0) {
%2 = tail call i32 @SetFontCharSet112(i64 %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int soru_6(const char s1[], const char s2[]) {
  return (strcmp(s1, s2)) ? 0 : 1;
}


x86 assembly (clang, -O0):
<soru_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @soru_6(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 1
ret i32 %10
}

LLVM IR (-O2):
define i32 @soru_6(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int ShopGetItemID(int);
int ShopSearchItem(int ID) {
  for (int i = 0; i < 40; i++) {
    if (ShopGetItemID(i) == ID)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ShopSearchItem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x28,-0xc(%rbp)
jge    115b <ShopSearchItem+0x4b>
mov    -0xc(%rbp),%edi
call   1030 <ShopGetItemID@plt>
cmp    -0x8(%rbp),%eax
jne    1148 <ShopSearchItem+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <ShopSearchItem+0x52>
jmp    114d <ShopSearchItem+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <ShopSearchItem+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShopSearchItem>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <ShopGetItemID@plt>
cmp    %ebp,%eax
je     1138 <ShopSearchItem+0x28>
add    $0x1,%ebx
cmp    $0x28,%ebx
jne    1120 <ShopSearchItem+0x10>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ShopSearchItem(i32 %0) {
br label %2
2: ; preds = %1, %6
%3 = phi i32 [ 0, %1 ], [ %7, %6 ]
%4 = tail call i32 @ShopGetItemID(i32 %3)
%5 = icmp eq i32 %4, %0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 40
br i1 %8, label %9, label %2
9: ; preds = %2, %6
%10 = phi i32 [ %3, %2 ], [ -1, %6 ]
ret i32 %10
}
int fibbo(int max) {
  if (max <= 2) {
    return 1;
  } else {
    return fibbo(max - 1) + fibbo(max - 2);
  }
}


x86 assembly (clang, -O0):
<fibbo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     1131 <fibbo+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fibbo+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibbo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibbo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibbo>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x3,%edi
jl     1145 <fibbo+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fibbo@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x4,%ebx
ja     1130 <fibbo+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibbo(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibbo(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 5
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
  scalar_t__ sa_flags;
  int /*<<< orphan*/ sa_mask;
};

/* Variables and functions */
int sigaction(int, struct sigaction *, int /*<<< orphan*/);
int /*<<< orphan*/ sigfillset(int /*<<< orphan*/ *);
int CatchAndMaskAll(int sig, void (*handler)(int)) {
  struct sigaction sa;
  sa.sa_handler = handler;
  sigfillset(&sa.sa_mask);
  sa.sa_flags = 0;
  return sigaction(sig, &sa, 0);
}


x86 assembly (clang, -O0):
<CatchAndMaskAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x28(%rbp),%rdi
add    $0x10,%rdi
call   1040 <sigfillset@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CatchAndMaskAll>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %rsi,0x8(%rsp)
lea    0x18(%rsp),%rdi
call   1040 <sigfillset@plt>
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)*, i64, i32 }
define i32 @CatchAndMaskAll(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%6 = load void (i32)*, void (i32)** %4
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (i32)* %6, void (i32)** %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 2
%9 = call i32 @sigfillset(i32* %8)
%10 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
store i64 0, i64* %10
%11 = load i32, i32* %3
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %5, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)*, i64, i32 }
define i32 @CatchAndMaskAll(i32 %0, void (i32)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (i32)* %1, void (i32)** %5
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 2
%7 = call i32 @sigfillset(i32* %6)
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
store i64 0, i64* %8
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, i32 0)
ret i32 %9
}
int okarea(int i1, int i2, int j1, int j2) {
  return ((i2 > i1) && (j2 > j1) && (i1 > 0) && (j1 > 0));
}


x86 assembly (clang, -O0):
<okarea>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x11(%rbp)
jle    114b <okarea+0x4b>
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jle    114b <okarea+0x4b>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jle    114b <okarea+0x4b>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<okarea>:
xor    %eax,%eax
cmp    %edi,%esi
jle    1115 <okarea+0x15>
test   %edi,%edi
jle    1115 <okarea+0x15>
cmp    %edx,%ecx
jle    1115 <okarea+0x15>
xor    %eax,%eax
test   %edx,%edx
setg   %al
ret

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

LLVM IR (-O2):
define i32 @okarea(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %1, %0
br i1 %5, label %6, label %13
6: ; preds = %4
%7 = icmp sgt i32 %3, %2
%8 = icmp sgt i32 %0, 0
%9 = and i1 %8, %7
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = icmp sgt i32 %2, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %6, %4
%14 = phi i32 [ 0, %6 ], [ 0, %4 ], [ %12, %10 ]
ret i32 %14
}