xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void troca2(int p, int q) {
  int temp;
  temp = p;
  p = q;
  q = temp;
  printf("@@@@    %d %d \n", p, q);
}


x86 assembly (clang, -O0):
<troca2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<troca2>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ reiserfs_warning(char *);
int errcatch_check_left(struct virtual_item *vi, int free, int start_skip,
                        int end_skip) {
  reiserfs_warning("green-16007: Invalid item type observed, run fsck ASAP\n");
  return -1;
}


x86 assembly (clang, -O0):
<errcatch_check_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
lea    0xed4(%rip),%rdi
call   1030 <reiserfs_warning@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errcatch_check_left>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <reiserfs_warning@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16007: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_check_left(%struct.virtual_item* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.virtual_item*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.virtual_item* %0, %struct.virtual_item** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16007: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_check_left(%struct.virtual_item* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ INSStateHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void INSStateUpdated() { UAVObjUpdated(INSStateHandle()); }


x86 assembly (clang, -O0):
<INSStateUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <INSStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INSStateUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <INSStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @INSStateUpdated() {
%1 = call i32 (...) @INSStateHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @INSStateUpdated() {
%1 = tail call i32 (...) @INSStateHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int testfloat(const void *a, const void *b) {
  float aa, bb;
  aa = *(float *)a;
  bb = *(float *)b;
  if (aa < bb)
    return -1;
  if (aa == bb)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<testfloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm1
movss  -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1145 <testfloat+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <testfloat+0x6d>
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jne    1166 <testfloat+0x66>
jp     1166 <testfloat+0x66>
movl   $0x0,-0x4(%rbp)
jmp    116d <testfloat+0x6d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfloat>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movaps %xmm0,%xmm2
cmpneqss %xmm1,%xmm2
movd   %xmm2,%ecx
and    $0x1,%ecx
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @testfloat(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca float
%7 = alloca float
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
store float %10, float* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to float*
%13 = load float, float* %12
store float %13, float* %7
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load float, float* %6
%20 = load float, float* %7
%21 = fcmp oeq float %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 0, i32* %3
br label %24
23: ; preds = %18
store i32 1, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @testfloat(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp une float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int do_nothing(void) {
  fprintf(stderr, "xgal.sndsrv: doing nothing, something is broken\n");
  while (1)
    sleep(5);
}


x86 assembly (clang, -O0):
<do_nothing>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
jmp    1139 <do_nothing+0x19>

x86 assembly (clang, -O2):
<do_nothing>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
mov    $0x5,%edi
call   1040 <sleep@plt>
jmp    1140 <do_nothing+0x20>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"xgal.sndsrv: doing nothing, something is broken\0A\00"
define i32 @do_nothing() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = call i32 @sleep(i32 5)
br label %3
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"xgal.sndsrv: doing nothing, something is broken\0A\00"
define i32 @do_nothing() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = tail call i32 @sleep(i32 5)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEistore(int, int /*<<< orphan*/ *);
void code_istore(int arg) { appendCODE(makeCODEistore(arg, NULL)); }


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

x86 assembly (clang, -O2):
<code_istore>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEistore@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_istore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEistore(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_istore(i32 %0) {
%2 = tail call i32 @makeCODEistore(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
int bitcount2(unsigned x) {
  int b;
  for (b = 0; x != 0; x >>= 1)
    if (x & 01)
      b++;
  return b;
}


x86 assembly (clang, -O0):
<bitcount2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1143 <bitcount2+0x43>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1130 <bitcount2+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <bitcount2+0x35>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitcount2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount2>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <bitcount2+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bitcount2+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
int platform_get_battery_pack_temp(int *temp) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @platform_get_battery_pack_temp(i32* nocapture readnone %0) {
ret i32 0
}
int sectorsPerFAT(char one, char two) {
  char num[1];
  num[0] = two;
  num[1] = one;
  int b = (num[0] << 8) | num[1];
  return b;
}


x86 assembly (clang, -O0):
<sectorsPerFAT>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x3(%rbp),%eax
shl    $0x8,%eax
movsbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sectorsPerFAT(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [1 x i8]
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i8, i8* %3
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 1
store i8 %9, i8* %10
%11 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = or i32 %14, %17
store i32 %18, i32* %6
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @sectorsPerFAT(i8 signext %0, i8 signext %1) {
ret i32 poison
}
int rtl931x_dma_if_rx_ring_size(int i) { return (0x2080) + ((i / 3) << 2); }


x86 assembly (clang, -O0):
<rtl931x_dma_if_rx_ring_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
add    $0x2080,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rtl931x_dma_if_rx_ring_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 3
%5 = shl i32 %4, 2
%6 = add nsw i32 8320, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @rtl931x_dma_if_rx_ring_size(i32 %0) {
%2 = sdiv i32 %0, 3
%3 = shl i32 %2, 2
%4 = add nsw i32 %3, 8320
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ limpaTela();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void pausa() {
  int opcao;
  while (opcao != 0) {
    printf("Digite [0] para voltar ao menu -> ");
    scanf("%d", &opcao);
    limpaTela();
  }
}


x86 assembly (clang, -O0):
<pausa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,-0x4(%rbp)
je     116a <pausa+0x3a>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <limpaTela@plt>
jmp    1138 <pausa+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pausa>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%r14
lea    0xedc(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <limpaTela@plt>
cmpl   $0x0,0xc(%rsp)
jne    1150 <pausa+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Digite [0] para voltar ao menu -> \00"
@.str.1 = [3 x i8] c"%d\00"
define void @pausa() {
%1 = alloca i32
br label %2
2: ; preds = %5, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = call i32 (...) @limpaTela()
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Digite [0] para voltar ao menu -> \00"
@.str.1 = [3 x i8] c"%d\00"
define void @pausa() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 (...) @limpaTela()
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int bundle_raw_set_proc_flags(int /*<<< orphan*/ *, int /*<<< orphan*/);
int bundle_raw_ext_set_proc_flags(uint8_t *ext_raw, uint8_t new_flags) {
  uint64_t flags_32 = 0;
  flags_32 = new_flags;
  return bundle_raw_set_proc_flags(ext_raw, flags_32);
}


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

x86 assembly (clang, -O2):
<bundle_raw_ext_set_proc_flags>:
jmp    1030 <bundle_raw_set_proc_flags@plt>

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

LLVM IR (-O2):
define i32 @bundle_raw_ext_set_proc_flags(i32* %0, i32 %1) {
%3 = tail call i32 @bundle_raw_set_proc_flags(i32* %0, i32 %1)
ret i32 %3
}
int test_imm_18int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x18 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_18int64_highword_mem>:
testb  $0x18,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_18int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 103079215104
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
size_t uint32_size(size_t);
size_t submessage_size(size_t len) { return uint32_size(len) + len; }


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

x86 assembly (clang, -O2):
<submessage_size>:
push   %rbx
mov    %rdi,%rbx
call   1030 <uint32_size@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @submessage_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @uint32_size(i64 %3)
%5 = load i64, i64* %2
%6 = add i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @submessage_size(i64 %0) {
%2 = tail call i64 @uint32_size(i64 %0)
%3 = add i64 %2, %0
ret i64 %3
}
/* Variables and functions */
void glmNotEqual3fs(bool out[3], const float x[3], float y) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = x[i] != y;
}


x86 assembly (clang, -O0):
<glmNotEqual3fs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    115e <glmNotEqual3fs+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x14(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1119 <glmNotEqual3fs+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmNotEqual3fs>:
movss  (%rsi),%xmm1
cmpneqss %xmm0,%xmm1
movd   %xmm1,%eax
and    $0x1,%eax
mov    %eax,(%rdi)
movss  0x4(%rsi),%xmm1
cmpneqss %xmm0,%xmm1
movd   %xmm1,%eax
and    $0x1,%eax
mov    %eax,0x4(%rdi)
cmpneqss 0x8(%rsi),%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmNotEqual3fs(i32* %0, float* %1, float %2) {
%4 = alloca i32*
%5 = alloca float*
%6 = alloca float
%7 = alloca i64
store i32* %0, i32** %4
store float* %1, float** %5
store float %2, float* %6
store i64 0, i64* %7
br label %8
8: ; preds = %22, %3
%9 = load i64, i64* %7
%10 = icmp ult i64 %9, 3
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load float*, float** %5
%13 = load i64, i64* %7
%14 = getelementptr inbounds float, float* %12, i64 %13
%15 = load float, float* %14
%16 = load float, float* %6
%17 = fcmp une float %15, %16
%18 = zext i1 %17 to i32
%19 = load i32*, i32** %4
%20 = load i64, i64* %7
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %11
%23 = load i64, i64* %7
%24 = add i64 %23, 1
store i64 %24, i64* %7
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @glmNotEqual3fs(i32* nocapture writeonly %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = fcmp une float %4, %2
%6 = zext i1 %5 to i32
store i32 %6, i32* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fcmp une float %8, %2
%10 = zext i1 %9 to i32
%11 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = fcmp une float %13, %2
%15 = zext i1 %14 to i32
%16 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %15, i32* %16
ret void
}
void _Unwind_GetDataRelBase() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_GetDataRelBase() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, unsigned long long const);
bool cutils_cdar_DynamicArray_unsigned_long_long_format(
    const unsigned long long *i, char **b, size_t *s) {
  snprintf(*b, *s, "%lluull", *i);
  return true;
}


x86 assembly (clang, -O0):
<cutils_cdar_DynamicArray_unsigned_long_long_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
lea    0xec0(%rip),%rdx
call   1030 <snprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutils_cdar_DynamicArray_unsigned_long_long_format>:
push   %rax
mov    (%rsi),%rax
mov    (%rdx),%rsi
mov    (%rdi),%rcx
lea    0xedf(%rip),%rdx
mov    %rax,%rdi
call   1030 <snprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lluull\00"
define i32 @cutils_cdar_DynamicArray_unsigned_long_long_format(i64* %0, i8** %1, i64* %2) {
%4 = alloca i64*
%5 = alloca i8**
%6 = alloca i64*
store i64* %0, i64** %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = load i64*, i64** %4
%12 = load i64, i64* %11
%13 = call i32 @snprintf(i8* %8, i64 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %12)
ret i32 1
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lluull\00"
define i32 @cutils_cdar_DynamicArray_unsigned_long_long_format(i64* nocapture %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i8*, i8** %1
%5 = load i64, i64* %2
%6 = load i64, i64* %0
%7 = tail call i32 @snprintf(i8* %4, i64 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %6)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t fread(long *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
long read_long(FILE *fh) {
  long value;
  size_t result1 = fread(&value, sizeof(long), 1, fh);
  if (result1 != 1) {
    fprintf(stderr, "File reading error for a long. File is corrupt.\n");
    exit(1);
  }
  return value;
}


x86 assembly (clang, -O0):
<read_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x10(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
je     1181 <read_long+0x51>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xe8e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_long>:
push   %rax
mov    %rdi,%rcx
mov    %rsp,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%rax
jne    1152 <read_long+0x22>
mov    (%rsp),%rax
pop    %rcx
ret
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"File reading error for a long. File is corrupt.\0A\00"
define i64 @read_long(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @fread(i64* %3, i32 8, i32 1, i32* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp ne i64 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"File reading error for a long. File is corrupt.\0A\00"
define i64 @read_long(i32* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i64 @fread(i64* %2, i32 8, i32 1, i32* %0)
%5 = icmp eq i64 %4, 1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i64, i64* %2
ret i64 %11
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t rtp_get_timestamp(const uint8_t *p_rtp) {
  return (p_rtp[4] << 24) | (p_rtp[5] << 16) | (p_rtp[6] << 8) | p_rtp[7];
}


x86 assembly (clang, -O0):
<rtp_get_timestamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x14(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0x1c(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp_get_timestamp>:
mov    0x10(%rdi),%eax
mov    0x14(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x18(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x1c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rtp_get_timestamp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 5
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 6
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 7
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @rtp_get_timestamp(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i32, i32* %0, i64 5
%6 = load i32, i32* %5
%7 = shl i32 %6, 16
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 6
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = or i32 %8, %11
%13 = getelementptr inbounds i32, i32* %0, i64 7
%14 = load i32, i32* %13
%15 = or i32 %12, %14
ret i32 %15
}
/* Type definitions */
struct uwsgi_buffer {
  int dummy;
};

/* Variables and functions */
int uwsgi_buffer_append(struct uwsgi_buffer *, char *, int);
int uwsgi_buffer_byte(struct uwsgi_buffer *ub, char byte) {
  return uwsgi_buffer_append(ub, &byte, 1);
}


x86 assembly (clang, -O0):
<uwsgi_buffer_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <uwsgi_buffer_append@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_buffer_byte>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <uwsgi_buffer_append@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.uwsgi_buffer = type { i32 }
define i32 @uwsgi_buffer_byte(%struct.uwsgi_buffer* %0, i8 signext %1) {
%3 = alloca %struct.uwsgi_buffer*
%4 = alloca i8
store %struct.uwsgi_buffer* %0, %struct.uwsgi_buffer** %3
store i8 %1, i8* %4
%5 = load %struct.uwsgi_buffer*, %struct.uwsgi_buffer** %3
%6 = call i32 @uwsgi_buffer_append(%struct.uwsgi_buffer* %5, i8* %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
%struct.uwsgi_buffer = type { i32 }
define i32 @uwsgi_buffer_byte(%struct.uwsgi_buffer* %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @uwsgi_buffer_append(%struct.uwsgi_buffer* %0, i8* %3, i32 1)
ret i32 %4
}
int ary_cb_cmpint(const void *a, const void *b) {
  int x = *(const int *)a, y = *(const int *)b;
  return x > y ? 1 : x < y ? -1 : 0;
}


x86 assembly (clang, -O0):
<ary_cb_cmpint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1137 <ary_cb_cmpint+0x37>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114c <ary_cb_cmpint+0x4c>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%esi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ary_cb_cmpint>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ary_cb_cmpint(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 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __u_char;

/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
void cbm_pp_write(int f, __u_char c) { ioctl(f, _IO(0xcb, 11), c); }


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

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

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

LLVM IR (-O2):
define void @cbm_pp_write(i32 %0, i32 %1) {
%3 = tail call i32 @_IO(i32 203, i32 11)
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int a[20] = {20, 19, 18, 17, 16, 15, 14, 13, 12, 11,
               10, 9,  8,  7,  6,  5,  4,  3,  2,  1};
  swap(&a[0], &a[19]);
  return a[1] + 2 * a[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    -0x60(%rbp),%rsi
add    $0x4c,%rsi
call   1040 <swap@plt>
mov    -0x5c(%rbp),%eax
mov    -0x60(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf25(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x4c(%rsp),%rsi
mov    %rsp,%rdi
call   1030 <swap@plt>
mov    (%rsp),%eax
add    %eax,%eax
add    0x4(%rsp),%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [20 x i32] [i32 20, i32 19, i32 18, i32 17, i32 16, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = bitcast [20 x i32]* %2 to i8*
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 19
%6 = call i32 @swap(i32* %4, i32* %5)
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%10 = load i32, i32* %9
%11 = mul nsw i32 2, %10
%12 = add nsw i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
@__const.main.a = [20 x i32] [i32 20, i32 19, i32 18, i32 17, i32 16, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1]
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 19
%5 = call i32 @swap(i32* %3, i32* %4)
%6 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 1
%7 = load i32, i32* %6
%8 = load i32, i32* %3
%9 = shl nsw i32 %8, 1
%10 = add nsw i32 %9, %7
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  printf("%d\n", a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
bool little_endian(void) {
  union {
    uint16_t x;
    uint8_t y;
  } a = {1};
  return a.y == 1;
}


x86 assembly (clang, -O0):
<little_endian>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
@__const.little_endian.a = %union.anon { i32 1 }
define i32 @little_endian() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i8*
%3 = bitcast %union.anon* %1 to i32*
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @little_endian() {
ret i32 1
}
unsigned long GenerateRandomNumber() {
  static unsigned long randSeed = 22222;
  randSeed = (randSeed * 196314165) + 907633515;
  return randSeed;
}


x86 assembly (clang, -O0):
<GenerateRandomNumber>:
push   %rbp
mov    %rsp,%rbp
imul   $0xbb38435,0x2f11(%rip),%rax
35 84 b3 0b
add    $0x3619636b,%rax
mov    %rax,0x2f04(%rip)
mov    0x2efd(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenerateRandomNumber>:
imul   $0xbb38435,0x2f15(%rip),%rax
35 84 b3 0b
add    $0x3619636b,%rax
mov    %rax,0x2f08(%rip)
ret

LLVM IR (-O0):
@GenerateRandomNumber.randSeed = internal global i64 22222
define i64 @GenerateRandomNumber() {
%1 = load i64, i64* @GenerateRandomNumber.randSeed
%2 = mul i64 %1, 196314165
%3 = add i64 %2, 907633515
store i64 %3, i64* @GenerateRandomNumber.randSeed
%4 = load i64, i64* @GenerateRandomNumber.randSeed
ret i64 %4
}

LLVM IR (-O2):
@GenerateRandomNumber.randSeed = internal unnamed_addr global i64 22222
define i64 @GenerateRandomNumber() {
%1 = load i64, i64* @GenerateRandomNumber.randSeed
%2 = mul i64 %1, 196314165
%3 = add i64 %2, 907633515
store i64 %3, i64* @GenerateRandomNumber.randSeed
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int /*<<< orphan*/ f2();
int /*<<< orphan*/ f3(int);
int f4(char, int);
int main() {
  f1();
  f2();
  f3(1);
  return (f4('a', 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <f1@plt>
mov    $0x0,%al
call   1030 <f2@plt>
mov    $0x1,%edi
call   1040 <f3@plt>
mov    $0x61,%edi
mov    $0x2,%esi
call   1060 <f4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <f1@plt>
xor    %eax,%eax
call   1030 <f2@plt>
mov    $0x1,%edi
call   1040 <f3@plt>
mov    $0x61,%edi
mov    $0x2,%esi
pop    %rax
jmp    1060 <f4@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f1()
%3 = call i32 (...) @f2()
%4 = call i32 @f3(i32 1)
%5 = call i32 @f4(i8 signext 97, i32 2)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 (...) @f2()
%3 = tail call i32 @f3(i32 1)
%4 = tail call i32 @f4(i8 signext 97, i32 2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
unsigned short ehrpwm_read(int /*<<< orphan*/, unsigned int);
int ehrpwm_reg_read(uint8_t module, unsigned int reg, unsigned short *val) {
  if (reg > 0x1040)
    return -1;
  *val = ehrpwm_read(module, reg);
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_reg_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1040,-0xc(%rbp)
jbe    113b <ehrpwm_reg_read+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <ehrpwm_reg_read+0x47>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <ehrpwm_read@plt>
mov    %ax,%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_reg_read>:
mov    $0xffffffff,%eax
cmp    $0x1040,%esi
ja     112c <ehrpwm_reg_read+0x1c>
push   %rbx
mov    %rdx,%rbx
call   1030 <ehrpwm_read@plt>
mov    %ax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ehrpwm_reg_read(i32 %0, i32 %1, i16* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i16*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i16* %2, i16** %7
%8 = load i32, i32* %6
%9 = icmp ugt i32 %8, 4160
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 -1, i32* %4
br label %16
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call zeroext i16 @ehrpwm_read(i32 %12, i32 %13)
%15 = load i16*, i16** %7
store i16 %14, i16* %15
store i32 0, i32* %4
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @ehrpwm_reg_read(i32 %0, i32 %1, i16* nocapture writeonly %2) {
%4 = icmp ugt i32 %1, 4160
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call zeroext i16 @ehrpwm_read(i32 %0, i32 %1)
store i16 %6, i16* %2
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ 0, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int tcgetattr(int, struct termios *);
int isatty(int fd) {
  struct termios t;
  return tcgetattr(fd, &t) != -1;
}


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
push   %rax
mov    %rsp,%rsi
call   1030 <tcgetattr@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @isatty(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.termios
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @tcgetattr(i32 %4, %struct.termios* %3)
%6 = icmp ne i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @isatty(i32 %0) {
%2 = alloca %struct.termios
%3 = bitcast %struct.termios* %2 to i8*
%4 = call i32 @tcgetattr(i32 %0, %struct.termios* %2)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}
void INT_Excep_MTU2_TCIV2(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU2_TCIV2() {
ret void
}
void test_one(int x) {
#pragma omp target parallel for simd
  for (int i = 0; i < x; i++)
    ;
}


x86 assembly (clang, -O0):
<test_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <test_one+0x2d>
jmp    111f <test_one+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <test_one+0xe>
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_ends_tag() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
char **alocarVetStrings(int n) {
  char **vet = NULL;
  vet = (char **)malloc(n * sizeof(char *));
  if (vet == NULL) {
    exit(-1);
    printf("Erro de alocação!\n");
  }
  return vet;
}


x86 assembly (clang, -O0):
<alocarVetStrings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <alocarVetStrings+0x3b>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alocarVetStrings>:
push   %rax
shl    $0x3,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1130 <alocarVetStrings+0x10>
pop    %rcx
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i8** @alocarVetStrings(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
store i32 %0, i32* %2
store i8** null, i8*** %3
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8**
store i8** %9, i8*** %3
%10 = load i8**, i8*** %3
%11 = icmp eq i8** %10, null
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %1
%15 = load i8**, i8*** %3
ret i8** %15
}

LLVM IR (-O2):
define i8** @alocarVetStrings(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
%8 = inttoptr i64 %3 to i8**
ret i8** %8
}
TAG_CALLBACK(spp_pipe) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @TAG_CALLBACK(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (!p) {
    perror("malloc");
    exit(1);
  }
  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    116a <xmalloc+0x3a>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\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 %11, label %8
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\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 %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}