xunge/DecIR huggingface dataset:
/* Variables and functions */
int __VERIFIER_nondet_int();
int PsCreateSystemThread(int ThreadHandle, int DesiredAccess,
                         int ObjectAttributes, int ProcessHandle, int ClientId,
                         int StartRoutine, int StartContext) {
  {
    int tmp_ndt_11;
    tmp_ndt_11 = __VERIFIER_nondet_int();
    if (tmp_ndt_11 == 0) {
      goto switch_11_0;
    } else {
      goto switch_11_default;
      if (0) {
      switch_11_0:
        return (0);
      switch_11_default:;
        return (-1073741823);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<PsCreateSystemThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1148 <PsCreateSystemThread+0x38>
jmp    114d <PsCreateSystemThread+0x3d>
jmp    1159 <PsCreateSystemThread+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1160 <PsCreateSystemThread+0x50>
movl   $0xc0000001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PsCreateSystemThread>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000001,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PsCreateSystemThread(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
%17 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %17, i32* %16
%18 = load i32, i32* %16
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %7
br label %24
21: ; preds = %7
br label %25
22: ; No predecessors!
br i1 false, label %23, label %26
23: ; preds = %22
br label %24
24: ; preds = %23, %20
store i32 0, i32* %8
br label %28
25: ; preds = %21
store i32 -1073741823, i32* %8
br label %28
26: ; preds = %22
br label %27
27: ; preds = %26
br label %28
28: ; preds = %24, %25, %27
%29 = load i32, i32* %8
ret i32 %29
}

LLVM IR (-O2):
define i32 @PsCreateSystemThread(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 (...) @__VERIFIER_nondet_int()
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 -1073741823
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ eloop_terminate();
int /*<<< orphan*/ printf(char *, int);
void handle_term(int sig, void *eloop_ctx, void *signal_ctx) {
  printf("Signal %d received - terminating\n", sig);
  eloop_terminate();
}


x86 assembly (clang, -O0):
<handle_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <eloop_terminate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_term>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <eloop_terminate@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Signal %d received - terminating\0A\00"
define void @handle_term(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @eloop_terminate()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Signal %d received - terminating\0A\00"
define void @handle_term(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 (...) @eloop_terminate()
ret void
}
/* Variables and functions */
int align(int, int);
int byte_align(int bits) { return align(bits, 8); }


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

x86 assembly (clang, -O2):
<byte_align>:
mov    $0x8,%esi
jmp    1030 <align@plt>

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

LLVM IR (-O2):
define i32 @byte_align(i32 %0) {
%2 = tail call i32 @align(i32 %0, i32 8)
ret i32 %2
}
void G_ReadGame(const char *filename) {}


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

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

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

LLVM IR (-O2):
define void @G_ReadGame(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int read_data_cmd();
int /*<<< orphan*/ send_ctrl_cmd(int);
unsigned int lcm_compare_id(void) {
  send_ctrl_cmd(0x00);
  return ((0x52) == read_data_cmd()) ? 1 : 0;
}


x86 assembly (clang, -O0):
<lcm_compare_id>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <send_ctrl_cmd@plt>
mov    $0x0,%al
call   1030 <read_data_cmd@plt>
mov    %eax,%esi
mov    $0x52,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm_compare_id>:
push   %rax
xor    %edi,%edi
call   1040 <send_ctrl_cmd@plt>
xor    %eax,%eax
call   1030 <read_data_cmd@plt>
xor    %ecx,%ecx
cmp    $0x52,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lcm_compare_id() {
%1 = call i32 @send_ctrl_cmd(i32 0)
%2 = call i32 (...) @read_data_cmd()
%3 = icmp eq i32 82, %2
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 1, i32 0
ret i32 %5
}

LLVM IR (-O2):
define i32 @lcm_compare_id() {
%1 = tail call i32 @send_ctrl_cmd(i32 0)
%2 = tail call i32 (...) @read_data_cmd()
%3 = icmp eq i32 %2, 82
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, int);
int /*<<< orphan*/ stdout;
void print(char ch, int index) { fprintf(stdout, "%c%d\n", ch, index); }


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%ecx
lea    0xec9(%rip),%rsi
movsbl %al,%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
mov    %esi,%ecx
mov    %edi,%edx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @print(i8 signext %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 %1)
ret void
}
char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=orion-m400 USING_ZBT=0 ONLY_ZBT=0 USING_OS_MEMORY=0 "
         "API_VERSION=6 REPO_URL=r2p1-04dev0 REVISION=r2p1-04dev0 "
         "CHANGED_REVISION=r2p1-04dev0 CHANGE_DATE=r2p1-04dev0 BUILD_DATE=Wed "
         "Nov  3 17:37:46 KST 2010 BUILD=RELEASE CPU=orion USING_MMU=0 "
         "USING_UMP=1 USING_PMM=0 USING_MALI200=0 USING_MALI400=6 "
         "USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR=/home/ysjung/linux/orion/linux-2.6-samsung-dev";
}


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

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

LLVM IR (-O0):
@.str = [399 x i8] c"malidrv: CONFIG=orion-m400 USING_ZBT=0 ONLY_ZBT=0 USING_OS_MEMORY=0 API_VERSION=6 REPO_URL=r2p1-04dev0 REVISION=r2p1-04dev0 CHANGED_REVISION=r2p1-04dev0 CHANGE_DATE=r2p1-04dev0 BUILD_DATE=Wed Nov 3 17:37:46 KST 2010 BUILD=RELEASE CPU=orion USING_MMU=0 USING_UMP=1 USING_PMM=0 USING_MALI200=0 USING_MALI400=6 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR=/home/ysjung/linux/orion/linux-2.6-samsung-dev\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([399 x i8], [399 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [399 x i8] c"malidrv: CONFIG=orion-m400 USING_ZBT=0 ONLY_ZBT=0 USING_OS_MEMORY=0 API_VERSION=6 REPO_URL=r2p1-04dev0 REVISION=r2p1-04dev0 CHANGED_REVISION=r2p1-04dev0 CHANGE_DATE=r2p1-04dev0 BUILD_DATE=Wed Nov 3 17:37:46 KST 2010 BUILD=RELEASE CPU=orion USING_MMU=0 USING_UMP=1 USING_PMM=0 USING_MALI200=0 USING_MALI400=6 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR=/home/ysjung/linux/orion/linux-2.6-samsung-dev\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([399 x i8], [399 x i8]* @.str, i64 0, i64 0)
}
void cbor_null_string_start_callback(void *_ctx) {}


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

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

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

LLVM IR (-O2):
define void @cbor_null_string_start_callback(i8* nocapture %0) {
ret void
}
void renderer_update_caches(int x, int y, int w, int h) {}


x86 assembly (clang, -O0):
<renderer_update_caches>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @renderer_update_caches(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
ret void
}

LLVM IR (-O2):
define void @renderer_update_caches(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
int test_01(int a) { return (a << 1) | ((unsigned int)a >> 31); }


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
mov    %edi,%eax
rol    %eax
ret

LLVM IR (-O0):
define i32 @test_01(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
%5 = load i32, i32* %2
%6 = lshr i32 %5, 31
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_01(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 1)
ret i32 %2
}
void end_lcd_thread(void) {}


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

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

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

LLVM IR (-O2):
define void @end_lcd_thread() {
ret void
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ unhide(struct graph *, int);
void unhide2(struct graph *g, int a, int b) {
  unhide(g, a);
  unhide(g, b);
}


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

x86 assembly (clang, -O2):
<unhide2>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <unhide@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <unhide@plt>

LLVM IR (-O0):
%struct.graph = type { i32 }
define void @unhide2(%struct.graph* %0, i32 %1, i32 %2) {
%4 = alloca %struct.graph*
%5 = alloca i32
%6 = alloca i32
store %struct.graph* %0, %struct.graph** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.graph*, %struct.graph** %4
%8 = load i32, i32* %5
%9 = call i32 @unhide(%struct.graph* %7, i32 %8)
%10 = load %struct.graph*, %struct.graph** %4
%11 = load i32, i32* %6
%12 = call i32 @unhide(%struct.graph* %10, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define void @unhide2(%struct.graph* %0, i32 %1, i32 %2) {
%4 = tail call i32 @unhide(%struct.graph* %0, i32 %1)
%5 = tail call i32 @unhide(%struct.graph* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("I love displaying text!");
  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 <puts@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 = [24 x i8] c"I love displaying text!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"I love displaying text!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void rop3_81_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_81_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%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_81_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
or     %al,%cl
not    %cl
and    %al,%sil
and    %dl,%al
or     %sil,%al
or     %cl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_81_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = or i8 %5, %4
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
%10 = and i8 %4, %2
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
bool Util_Timestamp(struct timeval *tv, bool relative) {
  if (tv == NULL) {
    return false;
  }
  (void)relative;
  return (0 == gettimeofday(tv, NULL));
}


x86 assembly (clang, -O0):
<Util_Timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <Util_Timestamp+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1156 <Util_Timestamp+0x46>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_Timestamp>:
test   %rdi,%rdi
je     112d <Util_Timestamp+0x1d>
push   %rax
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @Util_Timestamp(%struct.timeval* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.timeval*
%5 = alloca i32
store %struct.timeval* %0, %struct.timeval** %4
store i32 %1, i32* %5
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = icmp eq %struct.timeval* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %15
9: ; preds = %2
%10 = load i32, i32* %5
%11 = load %struct.timeval*, %struct.timeval** %4
%12 = call i64 @gettimeofday(%struct.timeval* %11, i32* null)
%13 = icmp eq i64 0, %12
%14 = zext i1 %13 to i32
store i32 %14, i32* %3
br label %15
15: ; preds = %9, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @Util_Timestamp(%struct.timeval* %0, i32 %1) {
%3 = icmp eq %struct.timeval* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @gettimeofday(%struct.timeval* %0, i32* null)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
ret i32 %9
}
double mod_for_power(double a, double b) {
  while (a >= b)
    a -= b;
  return a;
}


x86 assembly (clang, -O0):
<mod_for_power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1136 <mod_for_power+0x36>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    110e <mod_for_power+0xe>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_for_power>:
ucomisd %xmm1,%xmm0
jb     111a <mod_for_power+0x1a>
cs nopw 0x0(%rax,%rax,1)
subsd  %xmm1,%xmm0
ucomisd %xmm1,%xmm0
jae    1110 <mod_for_power+0x10>
ret

LLVM IR (-O0):
define double @mod_for_power(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
br label %5
5: ; preds = %9, %2
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fcmp oge double %6, %7
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fsub double %11, %10
store double %12, double* %3
br label %5
13: ; preds = %5
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @mod_for_power(double %0, double %1) {
%3 = fcmp ult double %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2, %4
%5 = phi double [ %6, %4 ], [ %0, %2 ]
%6 = fsub double %5, %1
%7 = fcmp ult double %6, %1
br i1 %7, label %8, label %4
8: ; preds = %4, %2
%9 = phi double [ %0, %2 ], [ %6, %4 ]
ret double %9
}
/* Variables and functions */
int darwin_convert_family_to_native(int);
int socket(int, int, int);
int darwin_my_socket(int socket_family, int socket_type, int protocol) {
  socket_family = darwin_convert_family_to_native(socket_family);
  return socket(socket_family, socket_type, protocol);
}


x86 assembly (clang, -O0):
<darwin_my_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <darwin_convert_family_to_native@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<darwin_my_socket>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <darwin_convert_family_to_native@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <socket@plt>

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

LLVM IR (-O2):
define i32 @darwin_my_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @darwin_convert_family_to_native(i32 %0)
%5 = tail call i32 @socket(i32 %4, i32 %1, i32 %2)
ret i32 %5
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
void *memzero64(void *dest, size_t n) {
  uint64_t z64 = 0U;
  do {
    uint64_t *p = (uint64_t *)dest;
    for (; n >= sizeof(uint64_t); n -= sizeof(uint64_t))
      *p++ = z64;
  } while (0);
  return (dest);
}


x86 assembly (clang, -O0):
<memzero64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x4,-0x10(%rbp)
jb     114b <memzero64+0x4b>
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x20(%rbp)
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
sub    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    111b <memzero64+0x1b>
jmp    1150 <memzero64+0x50>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memzero64>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x4,%rsi
jb     112b <memzero64+0x1b>
mov    %rsi,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memzero64(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %6
br label %10
10: ; preds = %17, %7
%11 = load i64, i64* %4
%12 = icmp uge i64 %11, 4
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %5
%15 = load i32*, i32** %6
%16 = getelementptr inbounds i32, i32* %15, i32 1
store i32* %16, i32** %6
store i32 %14, i32* %15
br label %17
17: ; preds = %13
%18 = load i64, i64* %4
%19 = sub i64 %18, 4
store i64 %19, i64* %4
br label %10
20: ; preds = %10
br label %21
21: ; preds = %20
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @memzero64(i8* returned writeonly %0, i64 %1) {
%3 = icmp ugt i64 %1, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = and i64 %1, -4
br label %6
6: ; preds = %4, %2
ret i8* %0
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_Lex_scan_charconst_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_Lex_scan_charconst(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_Lex_scan_charconst_rec(lexbuf, 1);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_Lex_scan_charconst>:
mov    $0x1,%esi
jmp    1030 <Cyc_Lex_scan_charconst_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_scan_charconst(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_Lex_scan_charconst_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 1)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_Lex_scan_charconst(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_Lex_scan_charconst_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 1)
ret i32 %2
}
unsigned char receive_usart(void) {
  while (!(*((volatile unsigned char *)(0xC0)) & (1 << 7)))
    ;
  return *((volatile unsigned char *)(0xC6));
}


x86 assembly (clang, -O0):
<receive_usart>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <receive_usart+0x9>
mov    $0xc0,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x80,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112d <receive_usart+0x2d>
jmp    1132 <receive_usart+0x32>
jmp    1109 <receive_usart+0x9>
mov    $0xc6,%eax
mov    (%rax),%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<receive_usart>:
cmpb   $0x0,0xc0
jns    1100 <receive_usart>
mov    0xc6,%al
ret

LLVM IR (-O0):
define zeroext i8 @receive_usart() {
br label %1
1: ; preds = %7, %0
%2 = load volatile i8, i8* inttoptr (i64 192 to i8*)
%3 = zext i8 %2 to i32
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %8
7: ; preds = %1
br label %1
8: ; preds = %1
%9 = load volatile i8, i8* inttoptr (i64 198 to i8*)
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @receive_usart() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i8, i8* inttoptr (i64 192 to i8*)
%3 = icmp sgt i8 %2, -1
br i1 %3, label %1, label %4
4: ; preds = %1
%5 = load volatile i8, i8* inttoptr (i64 198 to i8*)
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
gen_def_storage() { output_with_tab(".ds\t"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c".ds\09\00"
define i32 @gen_def_storage() {
%1 = alloca i32
%2 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c".ds\09\00"
define i32 @gen_def_storage() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
char *rtl_basename(char *fullName) {
  register char *pt;
  for (pt = fullName; *pt; pt++) {
    if ((((*pt) == '/') || ((*pt) == '\\'))) {
      fullName = pt + 1;
    }
  }
  return fullName;
}


x86 assembly (clang, -O0):
<rtl_basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <rtl_basename+0x5f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     113d <rtl_basename+0x3d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1149 <rtl_basename+0x49>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    114e <rtl_basename+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <rtl_basename+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtl_basename>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <rtl_basename+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <rtl_basename+0x10>
cmp    $0x5c,%dl
je     1110 <rtl_basename+0x10>
test   %dl,%dl
jne    1113 <rtl_basename+0x13>
ret

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

LLVM IR (-O2):
define i8* @rtl_basename(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = phi i8* [ %0, %1 ], [ %10, %8 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
i8 92, label %6
]
6: ; preds = %2, %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %3, %2 ]
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
11: ; preds = %2
ret i8* %3
}
void INT_Excep_SCI1_TEI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI1_TEI1() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_next_linear_product_solution(int n, int *i, int *m, double *sol) {
  int fail, a[2];
  a[0] = n, a[1] = *i;
  fail = _ada_use_c2phc4c(143, a, m, sol, 0);
  *i = a[1];
  return fail;
}


x86 assembly (clang, -O0):
<solcon_next_linear_product_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x8f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_next_linear_product_solution>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,0x8(%rsp)
mov    (%rsi),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x8f,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @solcon_next_linear_product_solution(i32 %0, i32* %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca [2 x i32]
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
store i32 %14, i32* %15
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%17 = load i32*, i32** %7
%18 = load double*, double** %8
%19 = call i32 @_ada_use_c2phc4c(i32 143, i32* %16, i32* %17, double* %18, i32 0)
store i32 %19, i32* %9
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%21 = load i32, i32* %20
%22 = load i32*, i32** %6
store i32 %21, i32* %22
%23 = load i32, i32* %9
ret i32 %23
}

LLVM IR (-O2):
define i32 @solcon_next_linear_product_solution(i32 %0, i32* nocapture %1, i32* %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = load i32, i32* %1
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %8, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 143, i32* %7, i32* %2, double* %3, i32 0)
%11 = load i32, i32* %9
store i32 %11, i32* %1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ DS3231_Write(int, int);
int /*<<< orphan*/ twi_Init(int);
void DS3231_init() {
  twi_Init(100000);
  DS3231_Write(0x0E, 0x00);
  DS3231_Write(0x0F, 0x08);
}


x86 assembly (clang, -O0):
<DS3231_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x186a0,%edi
call   1030 <twi_Init@plt>
mov    $0xe,%edi
xor    %esi,%esi
call   1040 <DS3231_Write@plt>
mov    $0xf,%edi
mov    $0x8,%esi
call   1040 <DS3231_Write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DS3231_init>:
push   %rax
mov    $0x186a0,%edi
call   1030 <twi_Init@plt>
mov    $0xe,%edi
xor    %esi,%esi
call   1040 <DS3231_Write@plt>
mov    $0xf,%edi
mov    $0x8,%esi
pop    %rax
jmp    1040 <DS3231_Write@plt>

LLVM IR (-O0):
define void @DS3231_init() {
%1 = call i32 @twi_Init(i32 100000)
%2 = call i32 @DS3231_Write(i32 14, i32 0)
%3 = call i32 @DS3231_Write(i32 15, i32 8)
ret void
}

LLVM IR (-O2):
define void @DS3231_init() {
%1 = tail call i32 @twi_Init(i32 100000)
%2 = tail call i32 @DS3231_Write(i32 14, i32 0)
%3 = tail call i32 @DS3231_Write(i32 15, i32 8)
ret void
}
double ease_out_quad(double t) {
  double p = t;
  return -1.0 * p * (p - 2);
}


x86 assembly (clang, -O0):
<ease_out_quad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeed(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xed3(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ease_out_quad>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
addsd  0xefc(%rip),%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ease_out_quad(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %3
%6 = fmul double -1.000000e+00, %5
%7 = load double, double* %3
%8 = fsub double %7, 2.000000e+00
%9 = fmul double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @ease_out_quad(double %0) {
%2 = fneg double %0
%3 = fadd double %0, -2.000000e+00
%4 = fmul double %3, %2
ret double %4
}
/* Variables and functions */
int f();
int h() { return f(); }


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

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

LLVM IR (-O0):
define i32 @h() {
%1 = call i32 (...) @f()
ret i32 %1
}

LLVM IR (-O2):
define i32 @h() {
%1 = tail call i32 (...) @f()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = 0;
#pragma omp parallel
#pragma omp master
  {
#pragma omp task
    {
#pragma omp parallel for
      for (int i = 0; i < 100000; i++) {
#pragma omp atomic update
        x++;
      }
    }
#pragma omp task
    {
#pragma omp target map(tofrom : x)
      {
#pragma omp parallel for
        for (int i = 0; i < 100000; i++) {
#pragma omp atomic update
          x++;
        }
      }
    }
#pragma omp taskwait
  }
  printf("x=%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jge    1151 <main+0x41>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
movl   $0x0,-0x10(%rbp)
cmpl   $0x186a0,-0x10(%rbp)
jge    117c <main+0x6c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%esi
lea    0xe7a(%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
mov    $0x30d40,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"x=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 200000)
ret i32 0
}
int kvmppc_uvmem_slot_init(struct kvm *kvm,
                           const struct kvm_memory_slot *slot) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kvm = type opaque
%struct.kvm_memory_slot = type opaque
define i32 @kvmppc_uvmem_slot_init(%struct.kvm* %0, %struct.kvm_memory_slot* %1) {
%3 = alloca %struct.kvm*
%4 = alloca %struct.kvm_memory_slot*
store %struct.kvm* %0, %struct.kvm** %3
store %struct.kvm_memory_slot* %1, %struct.kvm_memory_slot** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kvm = type opaque
%struct.kvm_memory_slot = type opaque
define i32 @kvmppc_uvmem_slot_init(%struct.kvm* nocapture readnone %0, %struct.kvm_memory_slot* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int mips_ejtag_data(int);
int /*<<< orphan*/ mips_ejtag_instr(int);
unsigned int mips_ejtag_getaddr() {
  int addr;
  mips_ejtag_instr(0x08);
  addr = mips_ejtag_data(0);
  mips_ejtag_data(addr);
  return addr;
}


x86 assembly (clang, -O0):
<mips_ejtag_getaddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8,%edi
call   1030 <mips_ejtag_instr@plt>
xor    %edi,%edi
call   1040 <mips_ejtag_data@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <mips_ejtag_data@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mips_ejtag_getaddr>:
push   %rbx
mov    $0x8,%edi
call   1030 <mips_ejtag_instr@plt>
xor    %edi,%edi
call   1040 <mips_ejtag_data@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <mips_ejtag_data@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @mips_ejtag_getaddr() {
%1 = tail call i32 @mips_ejtag_instr(i32 8)
%2 = tail call i32 @mips_ejtag_data(i32 0)
%3 = tail call i32 @mips_ejtag_data(i32 %2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clearScreen() { system("clear"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @clearScreen() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clearScreen() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
int supports_fast_mode(struct file *file, struct inode *inode) { return 0; }


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

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

LLVM IR (-O0):
%struct.file = type opaque
%struct.inode = type opaque
define i32 @supports_fast_mode(%struct.file* %0, %struct.inode* %1) {
%3 = alloca %struct.file*
%4 = alloca %struct.inode*
store %struct.file* %0, %struct.file** %3
store %struct.inode* %1, %struct.inode** %4
ret i32 0
}

LLVM IR (-O2):
%struct.file = type opaque
%struct.inode = type opaque
define i32 @supports_fast_mode(%struct.file* nocapture readnone %0, %struct.inode* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
void *_realloc(void *, size_t);
void *realloc(void *ptr, size_t size) { return _realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<realloc>:
jmp    1030 <_realloc@plt>

LLVM IR (-O0):
define i8* @realloc(i8* %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 = load i64, i64* %4
%7 = call i8* @_realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @realloc(i8* %0, i64 %1) {
%3 = tail call i8* @_realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ BSP_MotorControlBoard_ReleaseReset();
void L6474_ReleaseReset(void) { BSP_MotorControlBoard_ReleaseReset(); }


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

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

LLVM IR (-O0):
define void @L6474_ReleaseReset() {
%1 = call i32 (...) @BSP_MotorControlBoard_ReleaseReset()
ret void
}

LLVM IR (-O2):
define void @L6474_ReleaseReset() {
%1 = tail call i32 (...) @BSP_MotorControlBoard_ReleaseReset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
char *strdup(char const *);
char *local_strdup(const char *source) {
  char *ret;
  ;
  if (0 == (ret = strdup(source)))
    die("out of memory during strdup()");
  return ret;
}


x86 assembly (clang, -O0):
<local_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1153 <local_strdup+0x33>
lea    0xeb2(%rip),%rdi
call   1030 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_strdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <local_strdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"out of memory during strdup()\00"
define i8* @local_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* null, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [30 x i8] c"out of memory during strdup()\00"
define noalias i8* @local_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
main() {
  unsigned int i;
  for (i = 10; i >= 0; i--)
    printf("%d", i--);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jb     1155 <main+0x45>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%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
mov    $0xa,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0xfffffffe,%ebx
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp uge i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add i32 %7, -1
store i32 %8, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add 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 = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 10, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add i32 %2, -2
br label %1
}