xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_blksizecnt_reg(uint32_t *emmc) {
  uint32_t blksizecnt = (*(emmc + 4 / 4));
  printf("BLK_CNT:	%i\n", ((blksizecnt & 0xFFFF0000) >> 16));
  printf("BLKSIZE:	%i\n", (blksizecnt & 0x1FF));
}


x86 assembly (clang, -O0):
<print_blksizecnt_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
and    $0xffff0000,%esi
shr    $0x10,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
and    $0x1ff,%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_blksizecnt_reg>:
push   %rbx
mov    0x4(%rdi),%ebx
mov    %ebx,%esi
shr    $0x10,%esi
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
and    $0x1ff,%ebx
lea    0xedb(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"BLK_CNT:\09%i\0A\00"
@.str.1 = [13 x i8] c"BLKSIZE:\09%i\0A\00"
define void @print_blksizecnt_reg(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, -65536
%9 = lshr i32 %8, 16
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %3
%12 = and i32 %11, 511
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"BLK_CNT:\09%i\0A\00"
@.str.1 = [13 x i8] c"BLKSIZE:\09%i\0A\00"
define void @print_blksizecnt_reg(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = and i32 %3, 511
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}
int thresholdEquation(int lo, int hi) { return ((hi - lo) / 3) + lo; }


x86 assembly (clang, -O0):
<thresholdEquation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thresholdEquation>:
sub    %edi,%esi
movslq %esi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @thresholdEquation(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
%8 = sdiv i32 %7, 3
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @thresholdEquation(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = sdiv i32 %3, 3
%5 = add nsw i32 %4, %0
ret i32 %5
}
int fun343() { return 343; }


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

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

LLVM IR (-O0):
define i32 @fun343() {
ret i32 343
}

LLVM IR (-O2):
define i32 @fun343() {
ret i32 343
}
unsigned char can_ink(unsigned char map_type) {
  if (map_type == 0x2c || map_type == 0x2d || map_type == 0x3c ||
      map_type == 0x3d || map_type == 0x2a || map_type == 0x2b ||
      map_type == 0x3a || map_type == 0x3b) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<can_ink>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x2c,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x2d,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x3c,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x3d,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x2a,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x2b,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x3a,%eax
je     1172 <can_ink+0x72>
movzbl -0x2(%rbp),%eax
cmp    $0x3b,%eax
jne    117b <can_ink+0x7b>
movb   $0x0,-0x1(%rbp)
jmp    117f <can_ink+0x7f>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_ink>:
add    $0xd6,%dil
mov    $0x1,%al
cmp    $0x13,%dil
ja     111a <can_ink+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define zeroext i8 @can_ink(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 44
br i1 %6, label %35, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %35, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 60
br i1 %14, label %35, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %17, 61
br i1 %18, label %35, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %21, 42
br i1 %22, label %35, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = icmp eq i32 %25, 43
br i1 %26, label %35, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = zext i8 %28 to i32
%30 = icmp eq i32 %29, 58
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i8, i8* %3
%33 = zext i8 %32 to i32
%34 = icmp eq i32 %33, 59
br i1 %34, label %35, label %36
35: ; preds = %31, %27, %23, %19, %15, %11, %7, %1
store i8 0, i8* %2
br label %37
36: ; preds = %31
store i8 1, i8* %2
br label %37
37: ; preds = %36, %35
%38 = load i8, i8* %2
ret i8 %38
}

LLVM IR (-O2):
@switch.table.can_ink = [20 x i8] c"\00\00\00\00\01\01\01\01\01\01\01\01\01\01\01\01\00\00\00\00"
define zeroext i8 @can_ink(i8 zeroext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 20
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [20 x i8], [20 x i8]* @switch.table.can_ink, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 1, %1 ]
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strupr(char *);
int main() {
  char string[100];
  printf("Enter String : ");
  gets(string);
  strupr(string);
  printf("String after strupr : %s", string);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1050 <strupr@plt>
lea    -0x70(%rbp),%rsi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
mov    %rbx,%rdi
call   1050 <strupr@plt>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter String : \00"
@.str.1 = [25 x i8] c"String after strupr : %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @strupr(i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter String : \00"
@.str.1 = [25 x i8] c"String after strupr : %s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @strupr(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int time_t;
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void sleep(time_t sec, time_t msec) {
  static struct timeval sleep_time;
  sleep_time.tv_sec = sec;
  sleep_time.tv_usec = msec * 1000;
  select(0, NULL, NULL, NULL, &sleep_time);
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2f05(%rip)
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,0x2efc(%rip)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    0x2eeb(%rip),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
mov    %edi,0x2f16(%rip)
lea    0x2f0f(%rip),%r8
imul   $0x3e8,%esi,%eax
mov    %eax,0x2f07(%rip)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <select@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@sleep.sleep_time = internal global %struct.timeval zeroinitializer
define void @sleep(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
store i32 %5, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @sleep.sleep_time, i32 0, i32 0)
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 1000
store i32 %7, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @sleep.sleep_time, i32 0, i32 1)
%8 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* @sleep.sleep_time)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@sleep.sleep_time = internal global %struct.timeval zeroinitializer
define void @sleep(i32 %0, i32 %1) {
store i32 %0, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @sleep.sleep_time, i64 0, i32 0)
%3 = mul nsw i32 %1, 1000
store i32 %3, i32* getelementptr inbounds (%struct.timeval, %struct.timeval* @sleep.sleep_time, i64 0, i32 1)
%4 = tail call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* @sleep.sleep_time)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void I2CSlaveFIFODisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000804))) = 0x00000001;
}


x86 assembly (clang, -O0):
<I2CSlaveFIFODisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1,0x804(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveFIFODisable>:
movq   $0x1,0x804(%rdi)
ret

LLVM IR (-O0):
define void @I2CSlaveFIFODisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 2052
%5 = inttoptr i64 %4 to i64*
store volatile i64 1, i64* %5
ret void
}

LLVM IR (-O2):
define void @I2CSlaveFIFODisable(i64 %0) {
%2 = add nsw i64 %0, 2052
%3 = inttoptr i64 %2 to i64*
store volatile i64 1, i64* %3
ret void
}
void gtk_text_iter_get_offset() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_offset() {
ret void
}
/* Variables and functions */
scalar_t__ COND_PL();
int /*<<< orphan*/ EA_AW_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_spl_8_aw(void) { m68ki_write_8(EA_AW_8(), COND_PL() ? 0xff : 0); }


x86 assembly (clang, -O0):
<m68k_op_spl_8_aw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AW_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_PL@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_spl_8_aw>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AW_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_PL@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_spl_8_aw() {
%1 = call i32 (...) @EA_AW_8()
%2 = call i64 (...) @COND_PL()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_spl_8_aw() {
%1 = tail call i32 (...) @EA_AW_8()
%2 = tail call i64 (...) @COND_PL()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
void _M2_IOConsts_finish(__attribute__((unused)) int argc,
                         __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_IOConsts_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
struct wpcp_publish_handle_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct wpcp_publish_handle_t *);
void wpcp_return_republish(struct wpcp_publish_handle_t *publish_handle) {
  free(publish_handle);
}


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

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

LLVM IR (-O2):
%struct.wpcp_publish_handle_t = type { i32 }
define void @wpcp_return_republish(%struct.wpcp_publish_handle_t* nocapture %0) {
%2 = tail call i32 @free(%struct.wpcp_publish_handle_t* %0)
ret void
}
int fequal(float a, float b) {
  float epsilon = 0.1;
  float f = a - b;
  if (f < epsilon && f > -epsilon)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<fequal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1169 <fequal+0x69>
movss  -0x14(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
jbe    1169 <fequal+0x69>
movl   $0x1,-0x4(%rbp)
jmp    1170 <fequal+0x70>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fequal>:
subss  %xmm1,%xmm0
movss  0xef4(%rip),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
ucomiss 0xeeb(%rip),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @fequal(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float 0x3FB99999A0000000, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fsub float %8, %9
store float %10, float* %7
%11 = load float, float* %7
%12 = load float, float* %6
%13 = fcmp olt float %11, %12
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load float, float* %7
%16 = load float, float* %6
%17 = fneg float %16
%18 = fcmp ogt float %15, %17
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 1, i32* %3
br label %21
20: ; preds = %14, %2
store i32 0, i32* %3
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @fequal(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fcmp olt float %3, 0x3FB99999A0000000
%5 = fcmp ogt float %3, 0xBFB99999A0000000
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void global(const char *var) { printf("\tglobal %s\n", var); }


x86 assembly (clang, -O0):
<global>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<global>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\09global %s\0A\00"
define void @global(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09global %s\0A\00"
define void @global(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *str_terminate(int *str_buff_index, char *line, int *str_line_index) {
  *str_buff_index = *str_buff_index + 1;
  line[*str_line_index] = '\0';
  *str_line_index = 0;
  return (line);
}


x86 assembly (clang, -O0):
<str_terminate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq (%rcx),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_terminate>:
addl   $0x1,(%rdi)
mov    %rsi,%rax
movslq (%rdx),%rcx
movb   $0x0,(%rsi,%rcx,1)
movl   $0x0,(%rdx)
ret

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

LLVM IR (-O2):
define i8* @str_terminate(i32* nocapture %0, i8* returned writeonly %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %0
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 0, i8* %8
store i32 0, i32* %2
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char const *);
void log_err(const char *msg) {
  uart_puts(msg);
  uart_puts("\n");
}


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

x86 assembly (clang, -O2):
<log_err>:
push   %rax
call   1030 <uart_puts@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <uart_puts@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @log_err(i8* %0) {
%2 = tail call i32 @uart_puts(i8* %0)
%3 = tail call i32 @uart_puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};
struct Cyc_JumpAnalysis_Jump_Anal_Result {
  int dummy;
};

/* Variables and functions */
struct Cyc_JumpAnalysis_Jump_Anal_Result *
Cyc_JumpAnalysis_jump_analysis(struct Cyc_List_List *);
struct Cyc_JumpAnalysis_Jump_Anal_Result *
Cyc_do_jumpanalysis(int ignore, struct Cyc_List_List *tds) {
  struct Cyc_JumpAnalysis_Jump_Anal_Result *_T0;
  _T0 = Cyc_JumpAnalysis_jump_analysis(tds);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_do_jumpanalysis>:
mov    %rsi,%rdi
jmp    1030 <Cyc_JumpAnalysis_jump_analysis@plt>

LLVM IR (-O0):
%struct.Cyc_JumpAnalysis_Jump_Anal_Result = type { i32 }
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_JumpAnalysis_Jump_Anal_Result* @Cyc_do_jumpanalysis(i32 %0, %struct.Cyc_List_List* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_List_List*
%5 = alloca %struct.Cyc_JumpAnalysis_Jump_Anal_Result*
store i32 %0, i32* %3
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %4
%6 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%7 = call %struct.Cyc_JumpAnalysis_Jump_Anal_Result* @Cyc_JumpAnalysis_jump_analysis(%struct.Cyc_List_List* %6)
store %struct.Cyc_JumpAnalysis_Jump_Anal_Result* %7, %struct.Cyc_JumpAnalysis_Jump_Anal_Result** %5
%8 = load %struct.Cyc_JumpAnalysis_Jump_Anal_Result*, %struct.Cyc_JumpAnalysis_Jump_Anal_Result** %5
ret %struct.Cyc_JumpAnalysis_Jump_Anal_Result* %8
}

LLVM IR (-O2):
%struct.Cyc_JumpAnalysis_Jump_Anal_Result = type { i32 }
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_JumpAnalysis_Jump_Anal_Result* @Cyc_do_jumpanalysis(i32 %0, %struct.Cyc_List_List* %1) {
%3 = tail call %struct.Cyc_JumpAnalysis_Jump_Anal_Result* @Cyc_JumpAnalysis_jump_analysis(%struct.Cyc_List_List* %1)
ret %struct.Cyc_JumpAnalysis_Jump_Anal_Result* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void write_ble8(void *dest, uint8_t val) { *(uint8_t *)dest = val; }


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

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

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

LLVM IR (-O2):
define void @write_ble8(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void foo_2_1_2_2_2_1_2_2_2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void ASN1_PCTX_free(ASN1_PCTX *p) { free(p); }


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

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

LLVM IR (-O2):
define void @ASN1_PCTX_free(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void print_progress(float percent) { printf("\r%.2f %%", percent); }


x86 assembly (clang, -O0):
<print_progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"\0D%.2f %%\00"
define void @print_progress(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\0D%.2f %%\00"
define void @print_progress(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p = malloc(n);
  if (!p)
    fatal("out of memory");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int ft_isprint(int c) { return (32 <= c && c <= 126); }


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <ft_isprint+0x24>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_skein_vectors();
int /*<<< orphan*/ test_threefish_words_only();
int main() {
  test_threefish_words_only();
  test_skein_vectors();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_threefish_words_only@plt>
mov    $0x0,%al
call   1030 <test_skein_vectors@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_threefish_words_only()
%3 = call i32 (...) @test_skein_vectors()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_threefish_words_only()
%2 = tail call i32 (...) @test_skein_vectors()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello, World!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
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 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ client_destroy(char *);
scalar_t__ client_is_connected();
void client_shutdown() {
  if (client_is_connected())
    client_destroy("shutdown");
}


x86 assembly (clang, -O0):
<client_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <client_is_connected@plt>
cmp    $0x0,%rax
je     1141 <client_shutdown+0x21>
lea    0xec4(%rip),%rdi
call   1030 <client_destroy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_shutdown>:
push   %rax
xor    %eax,%eax
call   1040 <client_is_connected@plt>
test   %rax,%rax
je     113a <client_shutdown+0x1a>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <client_destroy@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"shutdown\00"
define void @client_shutdown() {
%1 = call i64 (...) @client_is_connected()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @client_destroy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"shutdown\00"
define void @client_shutdown() {
%1 = tail call i64 (...) @client_is_connected()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @client_destroy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ICPrintMama() { printf("mama"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"mama\00"
define void @ICPrintMama() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double M2_z(double, double, double, double);
double M3_y(double sign, double xi, double et, double qq) {
  return M2_z(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<M3_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <M2_z@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M3_y>:
jmp    1030 <M2_z@plt>

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

LLVM IR (-O2):
define double @M3_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @M2_z(double %0, double %1, double %2, double %3)
ret double %5
}
void foo214() {}


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

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

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

LLVM IR (-O2):
define void @foo214() {
ret void
}
void RTCrcAdler32Finish(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCrcAdler32Finish() {
ret void
}
void destruir_int(void *e) {}


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

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

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

LLVM IR (-O2):
define void @destruir_int(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void vt100_erase_up(void) {
  printf("\x1b[1J");
  fflush(stdout);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[1J\00"
@stdout = global i32 0
define void @vt100_erase_up() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1J\00"
@stdout = global i32 0
define void @vt100_erase_up() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
const char *mz_version(void) { return "9.1.14"; }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"9.1.14\00"
define i8* @mz_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"9.1.14\00"
define i8* @mz_version() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
void ph_handleConfProgress(char *data) {}


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

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

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

LLVM IR (-O2):
define void @ph_handleConfProgress(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  int x = 5, y;
  int array[(sizeof(void *) == sizeof(void *)) ? 4 : y];
  switch (x) {
  case ((sizeof(void *) == sizeof(void *)) ? 4 : y ):
    break;
  }
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    %rsp,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x4,%eax
jne    1153 <main+0x33>
jmp    114e <main+0x2e>
jmp    1153 <main+0x33>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 0, i32* %1
store i32 5, i32* %2
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %4
%6 = alloca i32, i64 4
%7 = load i32, i32* %2
switch i32 %7, label %9 [
i32 4, label %8
]
8: ; preds = %0
br label %9
9: ; preds = %0, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
signed int _muluschar(unsigned char x, unsigned char y) {
  return ((int)((signed char)x) * (int)y);
}


x86 assembly (clang, -O0):
<_muluschar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_muluschar>:
movsbl %dil,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @_muluschar(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_muluschar(i8 zeroext %0, i8 zeroext %1) {
%3 = sext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nsw i32 %4, %3
ret i32 %5
}
void ByteToFloatRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ByteToFloatRow_C() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ebml_int_size(uint64_t value) {
  value++;
  int size = 1;
  uint64_t max_value;
  for (max_value = 1 << 7; value >= max_value; max_value <<= 7) {
    size++;
    if (size == 8)
      break;
  }
  return size;
}


x86 assembly (clang, -O0):
<ebml_int_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x80,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1155 <ebml_int_size+0x55>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jne    1142 <ebml_int_size+0x42>
jmp    1155 <ebml_int_size+0x55>
jmp    1147 <ebml_int_size+0x47>
mov    -0xc(%rbp),%eax
shl    $0x7,%eax
mov    %eax,-0xc(%rbp)
jmp    111e <ebml_int_size+0x1e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebml_int_size>:
mov    $0x1,%eax
cmp    $0x7f,%edi
jl     1136 <ebml_int_size+0x36>
mov    $0x2,%eax
cmp    $0x3fff,%edi
jb     1136 <ebml_int_size+0x36>
mov    $0x3,%eax
cmp    $0x1fffff,%edi
jb     1136 <ebml_int_size+0x36>
xor    %eax,%eax
cmp    $0xfffffff,%edi
setae  %al
lea    0x4(,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @ebml_int_size(i32 %0) {
%2 = icmp slt i32 %0, 127
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 16383
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 2097151
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 268435455
%9 = select i1 %8, i32 4, i32 8
br label %10
10: ; preds = %7, %3, %5, %1
%11 = phi i32 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ %9, %7 ]
ret i32 %11
}
int compareInt(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

LLVM IR (-O0):
define i32 @compareInt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compareInt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printRunHelp(void) {
  fprintf(stderr, "Spustte program s parametrem -h pro napovedu.\n");
}


x86 assembly (clang, -O0):
<printRunHelp>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRunHelp>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Spustte program s parametrem -h pro napovedu.\0A\00"
define void @printRunHelp() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Spustte program s parametrem -h pro napovedu.\0A\00"
define void @printRunHelp() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DBG_putc(int /*<<< orphan*/);
void DBG_print(const char *msg) {
  while (*msg) {
    DBG_putc(*msg++);
  }
}


x86 assembly (clang, -O0):
<DBG_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <DBG_print+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <DBG_putc@plt>
jmp    111c <DBG_print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DBG_print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <DBG_print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <DBG_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <DBG_print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @DBG_print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @DBG_putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
main() {
  int x = 34;
  float y = 56.7;
  char z = 'A';
  printf("The value of "
         "x"
         "="
         "%d"
         " \n",
         x);
  printf("The value of "
         "y"
         "="
         "%f"
         " \n",
         y);
  printf("The value of "
         "z"
         "="
         "%c"
         " \n",
         z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x22,-0x4(%rbp)
movl   $0x4262cccd,-0x8(%rbp)
movb   $0x41,-0x9(%rbp)
movsbl -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
lea    0xeca(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
movsbl -0x9(%rbp),%esi
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    $0x22,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x38,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"The value of x=%d \0A\00"
@.str.1 = [20 x i8] c"The value of y=%f \0A\00"
@.str.2 = [20 x i8] c"The value of z=%c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i8
store i32 34, i32* %1
store float 0x404C5999A0000000, float* %2
store i8 65, i8* %3
%4 = load i32, i32* %1
%5 = trunc i32 %4 to i8
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%7 = load float, float* %2
%8 = fptosi float %7 to i8
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8 signext %8)
%10 = load i8, i8* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"The value of x=%d \0A\00"
@.str.1 = [20 x i8] c"The value of y=%f \0A\00"
@.str.2 = [20 x i8] c"The value of z=%c \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext 34)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8 signext 56)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8 signext 65)
ret i32 0
}