xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ARPV4_Init();
int /*<<< orphan*/ ETH_Init();
int /*<<< orphan*/ IPV4_Init();
int /*<<< orphan*/ Network_WaitForLink();
int /*<<< orphan*/ rtcc_init();
int /*<<< orphan*/ timersInit();
void Network_Init(void) {
  ETH_Init();
  ARPV4_Init();
  IPV4_Init();
  rtcc_init();
  Network_WaitForLink();
  timersInit();
}


x86 assembly (clang, -O0):
<Network_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <ETH_Init@plt>
mov    $0x0,%al
call   1050 <ARPV4_Init@plt>
mov    $0x0,%al
call   1080 <IPV4_Init@plt>
mov    $0x0,%al
call   1030 <rtcc_init@plt>
mov    $0x0,%al
call   1040 <Network_WaitForLink@plt>
mov    $0x0,%al
call   1070 <timersInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Network_Init>:
push   %rax
xor    %eax,%eax
call   1060 <ETH_Init@plt>
xor    %eax,%eax
call   1050 <ARPV4_Init@plt>
xor    %eax,%eax
call   1080 <IPV4_Init@plt>
xor    %eax,%eax
call   1030 <rtcc_init@plt>
xor    %eax,%eax
call   1040 <Network_WaitForLink@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <timersInit@plt>

LLVM IR (-O0):
define void @Network_Init() {
%1 = call i32 (...) @ETH_Init()
%2 = call i32 (...) @ARPV4_Init()
%3 = call i32 (...) @IPV4_Init()
%4 = call i32 (...) @rtcc_init()
%5 = call i32 (...) @Network_WaitForLink()
%6 = call i32 (...) @timersInit()
ret void
}

LLVM IR (-O2):
define void @Network_Init() {
%1 = tail call i32 (...) @ETH_Init()
%2 = tail call i32 (...) @ARPV4_Init()
%3 = tail call i32 (...) @IPV4_Init()
%4 = tail call i32 (...) @rtcc_init()
%5 = tail call i32 (...) @Network_WaitForLink()
%6 = tail call i32 (...) @timersInit()
ret void
}
int do_431() { return 431; }


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

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

LLVM IR (-O0):
define i32 @do_431() {
ret i32 431
}

LLVM IR (-O2):
define i32 @do_431() {
ret i32 431
}
/* Variables and functions */
int /*<<< orphan*/ load_compiler();
int pNvCliCompileProgram(char const **, unsigned int, size_t const *,
                         char const *, char **, char **);
int NvCliCompileProgram(const char **sourceStrings,
                        unsigned int sourceStringsCount,
                        const size_t *sourceStringsLengths,
                        const char *compilerOptions, char **compileLogRet,
                        char **compiledProgramRet) {
  load_compiler();
  return pNvCliCompileProgram(sourceStrings, sourceStringsCount,
                              sourceStringsLengths, compilerOptions,
                              compileLogRet, compiledProgramRet);
}


x86 assembly (clang, -O0):
<NvCliCompileProgram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0x0,%al
call   1030 <load_compiler@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1040 <pNvCliCompileProgram@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NvCliCompileProgram>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <load_compiler@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <pNvCliCompileProgram@plt>

LLVM IR (-O0):
define i32 @NvCliCompileProgram(i8** %0, i32 %1, i64* %2, i8* %3, i8** %4, i8** %5) {
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i64*
%10 = alloca i8*
%11 = alloca i8**
%12 = alloca i8**
store i8** %0, i8*** %7
store i32 %1, i32* %8
store i64* %2, i64** %9
store i8* %3, i8** %10
store i8** %4, i8*** %11
store i8** %5, i8*** %12
%13 = call i32 (...) @load_compiler()
%14 = load i8**, i8*** %7
%15 = load i32, i32* %8
%16 = load i64*, i64** %9
%17 = load i8*, i8** %10
%18 = load i8**, i8*** %11
%19 = load i8**, i8*** %12
%20 = call i32 @pNvCliCompileProgram(i8** %14, i32 %15, i64* %16, i8* %17, i8** %18, i8** %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @NvCliCompileProgram(i8** %0, i32 %1, i64* %2, i8* %3, i8** %4, i8** %5) {
%7 = tail call i32 (...) @load_compiler()
%8 = tail call i32 @pNvCliCompileProgram(i8** %0, i32 %1, i64* %2, i8* %3, i8** %4, i8** %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("wangshuwei \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 = [13 x i8] c"wangshuwei \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"wangshuwei \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void Error1(char *str, char *a) {
  fprintf(stderr, str, a);
  fprintf(stderr, "\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<Error1>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eb2(%rip),%rbx
mov    (%rbx),%edi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @Error1(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* %0, i8* %1)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ __softboundcets_read_shadow_stack_metadata_store(char **,
                                                                    int);
unsigned long strtoul(char const *, char **, int);
__attribute__((__weak__, __always___)) unsigned long int
softboundcets_strtoul(const char *nptr, char **endptr, int base) {
  unsigned long temp = strtoul(nptr, endptr, base);
  if (endptr != NULL) {
    __softboundcets_read_shadow_stack_metadata_store(endptr, 1);
  }
  return temp;
}


x86 assembly (clang, -O0):
<softboundcets_strtoul>:
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   1040 <strtoul@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <softboundcets_strtoul+0x40>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
call   1030 <__softboundcets_read_shadow_stack_metadata_store@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strtoul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <strtoul@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1141 <softboundcets_strtoul+0x21>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <__softboundcets_read_shadow_stack_metadata_store@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define weak i64 @softboundcets_strtoul(i8* %0, i8** %1, i32 %2) {
%4 = tail call i64 @strtoul(i8* %0, i8** %1, i32 %2)
%5 = icmp eq i8** %1, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @__softboundcets_read_shadow_stack_metadata_store(i8** %1, i32 1)
br label %8
8: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Cilk_free(void *s) { free(s); }


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

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

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

LLVM IR (-O2):
define void @Cilk_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
int read_buf(char *buf, int len, char *dst, int size) {
  if (len > size)
    len = size;
  memmove(dst, buf, len);
  return len;
}


x86 assembly (clang, -O0):
<read_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1138 <read_buf+0x28>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memmove@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_buf>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
cmp    %ecx,%ebx
cmovg  %ecx,%ebx
mov    %rdx,%rdi
mov    %ebx,%edx
call   1030 <memmove@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read_buf(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %1, %3
%6 = select i1 %5, i32 %3, i32 %1
%7 = tail call i32 @memmove(i8* %2, i8* %0, i32 %6)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void memory_destroy(void *mem) { free(mem); }


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

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

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

LLVM IR (-O2):
define void @memory_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_close(int /*<<< orphan*/);
void PIC16F18324_stop(void) {
  serial_close(0);
  ;
}


x86 assembly (clang, -O0):
<PIC16F18324_stop>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <serial_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PIC16F18324_stop>:
xor    %edi,%edi
jmp    1030 <serial_close@plt>

LLVM IR (-O0):
define void @PIC16F18324_stop() {
%1 = call i32 @serial_close(i32 0)
ret void
}

LLVM IR (-O2):
define void @PIC16F18324_stop() {
%1 = tail call i32 @serial_close(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int currentChar;
  for (currentChar = 0; currentChar <= 255; currentChar++) {
    printf("%d = %c\n", currentChar, currentChar);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d = %c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_command(int);
void target_singlecycle(void) { send_command(0x23); }


x86 assembly (clang, -O0):
<target_singlecycle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x23,%edi
call   1030 <send_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_singlecycle>:
mov    $0x23,%edi
jmp    1030 <send_command@plt>

LLVM IR (-O0):
define void @target_singlecycle() {
%1 = call i32 @send_command(i32 35)
ret void
}

LLVM IR (-O2):
define void @target_singlecycle() {
%1 = tail call i32 @send_command(i32 35)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ mb_free(void *);
int _destroy_memory(void *data, void *extra) {
  int result = 0;
  ((void)(extra));
  do {
    ((void)(data));
    assert(data);
  } while (0);
  do {
    if (data) {
      mb_free(data);
      data = 0;
    } else {
      do {
        ((void)(0 && "Memory already released."));
        assert(0 && "Memory already released.");
      } while (0);
    }
  } while (0);
  return result;
}


x86 assembly (clang, -O0):
<_destroy_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <assert@plt>
jmp    1147 <_destroy_memory+0x27>
cmpq   $0x0,-0x8(%rbp)
je     1168 <_destroy_memory+0x48>
mov    -0x8(%rbp),%rdi
call   1040 <mb_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1179 <_destroy_memory+0x59>
jmp    116d <_destroy_memory+0x4d>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1179 <_destroy_memory+0x59>
jmp    117e <_destroy_memory+0x5e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_destroy_memory>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
test   %rbx,%rbx
je     1138 <_destroy_memory+0x18>
mov    %rbx,%rdi
call   1040 <mb_free@plt>
jmp    113f <_destroy_memory+0x1f>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_destroy_memory(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
%6 = load i8*, i8** %4
br label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @assert(i32 %10)
br label %12
12: ; preds = %7
br label %13
13: ; preds = %12
%14 = load i8*, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i8*, i8** %3
%18 = call i32 @mb_free(i8* %17)
store i8* null, i8** %3
br label %23
19: ; preds = %13
br label %20
20: ; preds = %19
%21 = call i32 @assert(i32 0)
br label %22
22: ; preds = %20
br label %23
23: ; preds = %22, %16
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @_destroy_memory(i8* %0, i8* nocapture readnone %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp eq i8* %0, null
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @mb_free(i8* %0)
br label %11
9: ; preds = %2
%10 = tail call i32 @assert(i32 0)
br label %11
11: ; preds = %9, %7
ret i32 0
}
const char *build_time() { return "23:05:37"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"23:05:37\00"
define i8* @build_time() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"23:05:37\00"
define i8* @build_time() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ parent;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcreatewindow_parent(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcreatewindow.parent;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcreatewindow_parent>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XEvent_xcreatewindow_parent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
unsigned int eruDisable() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @eruDisable() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glmAnd3v(int *, int *, int const *);
void glmAnd3v_(bool x[3], const bool y[3]) { glmAnd3v(x, x, y); }


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

x86 assembly (clang, -O2):
<glmAnd3v_>:
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <glmAnd3v@plt>

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

LLVM IR (-O2):
define void @glmAnd3v_(i32* %0, i32* %1) {
%3 = tail call i32 @glmAnd3v(i32* %0, i32* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void Section4Third(int number) { printf(" %d |", number % 100 % 10); }


x86 assembly (clang, -O0):
<Section4Third>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section4Third>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
movsbl %al,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movzbl %dl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%esi
lea    0xeac(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" %d |\00"
define void @Section4Third(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 100
%5 = srem i32 %4, 10
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" %d |\00"
define void @Section4Third(i32 %0) {
%2 = srem i32 %0, 100
%3 = trunc i32 %2 to i8
%4 = srem i8 %3, 10
%5 = sext i8 %4 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int oct_lt(const char *pat, const char *text) {
  return (strcmp(text, pat) < 0);
}


x86 assembly (clang, -O0):
<oct_lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_lt>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
shr    $0x3f,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @oct_lt(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* %0)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello, World!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ function_from_primary();
int /*<<< orphan*/ function_from_secondary();
main() {
  function_from_primary();
  function_from_secondary();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <function_from_primary@plt>
mov    $0x0,%al
call   1030 <function_from_secondary@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <function_from_primary@plt>
xor    %eax,%eax
call   1030 <function_from_secondary@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @function_from_primary()
%2 = call i32 (...) @function_from_secondary()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @function_from_primary()
%2 = tail call i32 (...) @function_from_secondary()
ret i32 0
}
int rotateR_fun_int(int x, int i) {
  if ((i %= 32) == 0)
    return x;
  return (x << (32 - i)) | ((0x7fffffff >> (i - 1)) & (x >> i));
}


x86 assembly (clang, -O0):
<rotateR_fun_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateR_fun_int+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <rotateR_fun_int+0x5b>
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x7fffffff,%edx
sar    %cl,%edx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    -0x10(%rbp),%ecx
and    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateR_fun_int>:
mov    %edi,%eax
lea    0x1f(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
and    $0xffffffe0,%ecx
sub    %ecx,%esi
je     112b <rotateR_fun_int+0x2b>
mov    %esi,%ecx
neg    %cl
mov    %eax,%edx
shl    %cl,%edx
lea    -0x1(%rsi),%ecx
mov    $0x7fffffff,%edi
shr    %cl,%edi
mov    %esi,%ecx
sar    %cl,%eax
and    %edi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rotateR_fun_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 32
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %24
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 32, %13
%15 = shl i32 %12, %14
%16 = load i32, i32* %5
%17 = sub nsw i32 %16, 1
%18 = ashr i32 2147483647, %17
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = ashr i32 %19, %20
%22 = and i32 %18, %21
%23 = or i32 %15, %22
store i32 %23, i32* %3
br label %24
24: ; preds = %11, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @rotateR_fun_int(i32 %0, i32 %1) {
%3 = srem i32 %1, 32
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = sub nsw i32 32, %3
%7 = shl i32 %0, %6
%8 = add nsw i32 %3, -1
%9 = lshr i32 2147483647, %8
%10 = ashr i32 %0, %3
%11 = and i32 %9, %10
%12 = or i32 %11, %7
br label %13
13: ; preds = %2, %5
%14 = phi i32 [ %12, %5 ], [ %0, %2 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ recurse_stack(int);
int main(int argc, char *argv[]) {
  printf("Hello, world!\n");
  int depth = 0;
  recurse_stack(depth);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @recurse_stack(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @recurse_stack(i32 0)
ret i32 0
}
void vla_bound(int n) { int arr[n * 3]; }


x86 assembly (clang, -O0):
<vla_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vla_bound(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 3
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i32, i64 %7
store i64 %7, i64* %4
%10 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @vla_bound(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ genrand_int32();
double random_double_in_range(const double min, const double max) {
  return (((double)genrand_int32() * (max - min)) / (double)(0xffffffff) + min);
}


x86 assembly (clang, -O0):
<random_double_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <genrand_int32@plt>
cvtsi2sd %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double_in_range>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <genrand_int32@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
divsd  0xeb5(%rip),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @random_double_in_range(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i64 (...) @genrand_int32()
%6 = sitofp i64 %5 to double
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = fmul double %6, %9
%11 = fdiv double %10, 0x41EFFFFFFFE00000
%12 = load double, double* %3
%13 = fadd double %11, %12
ret double %13
}

LLVM IR (-O2):
define double @random_double_in_range(double %0, double %1) {
%3 = tail call i64 (...) @genrand_int32()
%4 = sitofp i64 %3 to double
%5 = fsub double %1, %0
%6 = fmul double %5, %4
%7 = fdiv double %6, 0x41EFFFFFFFE00000
%8 = fadd double %7, %0
ret double %8
}
/* Variables and functions */
int SIGCHLD;
int SIGTERM;
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ wait3(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
void sigHandler(int signo) {
  if (signo == SIGCHLD) {
    wait3(NULL, WNOHANG, NULL);
  } else if (signo == SIGTERM) {
  }
}


x86 assembly (clang, -O0):
<sigHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1147 <sigHandler+0x37>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
call   1030 <wait3@plt>
jmp    1163 <sigHandler+0x53>
mov    -0x4(%rbp),%eax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%eax
jne    115e <sigHandler+0x4e>
jmp    115e <sigHandler+0x4e>
jmp    1163 <sigHandler+0x53>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigHandler>:
mov    0x2ec9(%rip),%rax
cmp    %edi,(%rax)
jne    112d <sigHandler+0x1d>
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
xor    %edx,%edx
jmp    1030 <wait3@plt>
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
@WNOHANG = global i32 0
@SIGTERM = global i32 0
define void @sigHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGCHLD
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @WNOHANG
%8 = call i32 @wait3(i32* null, i32 %7, i32* null)
br label %15
9: ; preds = %1
%10 = load i32, i32* %2
%11 = load i32, i32* @SIGTERM
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9
br label %14
14: ; preds = %13, %9
br label %15
15: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@WNOHANG = global i32 0
@SIGTERM = global i32 0
define void @sigHandler(i32 %0) {
%2 = load i32, i32* @SIGCHLD
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @WNOHANG
%6 = tail call i32 @wait3(i32* null, i32 %5, i32* null)
br label %7
7: ; preds = %1, %4
ret void
}
int col_byte_johab_hangul(int col) { return (col >= 0x3e ? 0x43 : 0x41) + col; }


x86 assembly (clang, -O0):
<col_byte_johab_hangul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x41,%eax
mov    $0x43,%ecx
cmp    $0x3e,%edx
cmovge %ecx,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<col_byte_johab_hangul>:
xor    %eax,%eax
cmp    $0x3e,%edi
setge  %al
lea    (%rdi,%rax,2),%eax
add    $0x41,%eax
ret

LLVM IR (-O0):
define i32 @col_byte_johab_hangul(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 62
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 67, i32 65
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @col_byte_johab_hangul(i32 %0) {
%2 = icmp sgt i32 %0, 61
%3 = select i1 %2, i32 67, i32 65
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
char *pipe2string(char *);
char *date_get_colon_now_time(void) {
  char *sys_string;
  sys_string = "now.sh hhmmss | sed 's/\\([0-9][0-9]$\\)/:&/'";
  return pipe2string(sys_string);
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"now.sh hhmmss | sed 's/\\([0-9][0-9]$\\)/:&/'\00"
define i8* @date_get_colon_now_time() {
%1 = alloca i8*
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i8* @pipe2string(i8* %2)
ret i8* %3
}

LLVM IR (-O2):
@.str = [44 x i8] c"now.sh hhmmss | sed 's/\\([0-9][0-9]$\\)/:&/'\00"
define i8* @date_get_colon_now_time() {
%1 = tail call i8* @pipe2string(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
double centimetresToMetres(double centimetres) { return centimetres / 100.0; }


x86 assembly (clang, -O0):
<centimetresToMetres>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<centimetresToMetres>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @centimetresToMetres(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+02
ret double %4
}

LLVM IR (-O2):
define double @centimetresToMetres(double %0) {
%2 = fdiv double %0, 1.000000e+02
ret double %2
}
/* Variables and functions */
int isocket_option(int, int, int);
int isocket_enable(int fd, int mode) { return isocket_option(fd, mode, 1); }


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

x86 assembly (clang, -O2):
<isocket_enable>:
mov    $0x1,%edx
jmp    1030 <isocket_option@plt>

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

LLVM IR (-O2):
define i32 @isocket_enable(i32 %0, i32 %1) {
%3 = tail call i32 @isocket_option(i32 %0, i32 %1, i32 1)
ret i32 %3
}
void rop3_52_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D & S;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_52_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_52_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
and    %sil,%cl
or     %dl,%cl
xor    %sil,%cl
mov    %edx,%eax
not    %al
or     %sil,%al
and    %cl,%al
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_52_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = or i32 %33, %39
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = xor i32 %44, -1
%46 = and i32 %42, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %46, %49
%51 = or i32 %40, %50
%52 = trunc i32 %51 to i8
%53 = load i8*, i8** %4
store i8 %52, i8* %53
ret void
}

LLVM IR (-O2):
define void @rop3_52_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
double lgamma_r(double, int /*<<< orphan*/ *);
int /*<<< orphan*/ signgam;
double lgamma(double x) { return lgamma_r(x, &signgam); }


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

x86 assembly (clang, -O2):
<lgamma>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <lgamma_r@plt>

LLVM IR (-O0):
@signgam = global i32 0
define double @lgamma(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @lgamma_r(double %3, i32* @signgam)
ret double %4
}

LLVM IR (-O2):
@signgam = global i32 0
define double @lgamma(double %0) {
%2 = tail call double @lgamma_r(double %0, i32* @signgam)
ret double %2
}
unsigned char f72(unsigned char x, unsigned long int y) {
  return (x << y) + (x >> (8 - y));
}


x86 assembly (clang, -O0):
<f72>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f72>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f72(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 8, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f72(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 8, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
double sla_dranrm_(double *);
double slaDranrm(double angle) {
  double ANGLE;
  double result;
  ANGLE = angle;
  result = sla_dranrm_(&ANGLE);
  return result;
}


x86 assembly (clang, -O0):
<slaDranrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <sla_dranrm_@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaDranrm>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_dranrm_@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define double @slaDranrm(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double %0, double* %2
%4 = call double @sla_dranrm_(double* %2)
ret double %4
}
void delgmode(f, n) int f, n;
{
  adjustmode(0, 1);
  return;
  f = f;
  n = n;
}


x86 assembly (clang, -O0):
<delgmode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <adjustmode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delgmode>:
xor    %edi,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <adjustmode@plt>

LLVM IR (-O0):
define void @delgmode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 0, i32 1)
ret void
}

LLVM IR (-O2):
define void @delgmode(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 0, i32 1)
ret void
}
__attribute__((no_sanitize_address, no)) long unsigned int
strlen(const char *p) {
  long unsigned int n = 0;
  for (; *p; ++n, ++p)
    ;
  return n;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113f <strlen+0x3f>
jmp    1122 <strlen+0x22>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add i64 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %7, %4 ]
ret i64 %12
}
/* Variables and functions */
float sinhf(float);
float __ocl_sinh_float(float src) { return sinhf(src); }


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

x86 assembly (clang, -O2):
<__ocl_sinh_float>:
jmp    1030 <sinhf@plt>

LLVM IR (-O0):
define float @__ocl_sinh_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sinhf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__ocl_sinh_float(float %0) {
%2 = tail call float @sinhf(float %0)
ret float %2
}
int test11(int *q, int *x) {
  int *p = q;
  if (q)
    ;
  if (x)
    ;
  return *p;
}


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1124 <test11+0x24>
jmp    1124 <test11+0x24>
cmpq   $0x0,-0x10(%rbp)
je     1134 <test11+0x34>
jmp    1134 <test11+0x34>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test11(i32* nocapture %0, i32* nocapture readnone %1) {
%3 = load i32, i32* %0
ret i32 %3
}