xunge/DecIR huggingface dataset:
int do_149() { return 149; }


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

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

LLVM IR (-O0):
define i32 @do_149() {
ret i32 149
}

LLVM IR (-O2):
define i32 @do_149() {
ret i32 149
}
/* Type definitions */
struct entity_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destroy_rocket(struct entity_t *);
void rocket_rails_collision(struct entity_t *rocket, struct entity_t *rails) {
  destroy_rocket(rocket);
}


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

x86 assembly (clang, -O2):
<rocket_rails_collision>:
jmp    1030 <destroy_rocket@plt>

LLVM IR (-O0):
%struct.entity_t = type { i32 }
define void @rocket_rails_collision(%struct.entity_t* %0, %struct.entity_t* %1) {
%3 = alloca %struct.entity_t*
%4 = alloca %struct.entity_t*
store %struct.entity_t* %0, %struct.entity_t** %3
store %struct.entity_t* %1, %struct.entity_t** %4
%5 = load %struct.entity_t*, %struct.entity_t** %3
%6 = call i32 @destroy_rocket(%struct.entity_t* %5)
ret void
}

LLVM IR (-O2):
%struct.entity_t = type { i32 }
define void @rocket_rails_collision(%struct.entity_t* %0, %struct.entity_t* nocapture readnone %1) {
%3 = tail call i32 @destroy_rocket(%struct.entity_t* %0)
ret void
}
/* Variables and functions */
int CS5;
int CS6;
int CS7;
int CS8;
int cDataSize(int numbits) {
  switch (numbits) {
  case 5:
    return (CS5);
    break;
  case 6:
    return (CS6);
    break;
  case 7:
    return (CS7);
    break;
  case 8:
    return (CS8);
    break;
  default:
    return (CS8);
    break;
  }
}


x86 assembly (clang, -O0):
<cDataSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1174 <cDataSize+0x74>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <cDataSize+0x80>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <cDataSize+0x80>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <cDataSize+0x80>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <cDataSize+0x80>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cDataSize>:
add    $0xfffffffb,%edi
cmp    $0x3,%edi
ja     1119 <cDataSize+0x19>
movslq %edi,%rax
lea    0x2d16(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    (%rax),%eax
ret
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@CS5 = global i32 0
@CS6 = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
define i32 @cDataSize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 5, label %5
i32 6, label %7
i32 7, label %9
i32 8, label %11
]
5: ; preds = %1
%6 = load i32, i32* @CS5
store i32 %6, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* @CS6
store i32 %8, i32* %2
br label %15
9: ; preds = %1
%10 = load i32, i32* @CS7
store i32 %10, i32* %2
br label %15
11: ; preds = %1
%12 = load i32, i32* @CS8
store i32 %12, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* @CS8
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %11, %9, %7, %5
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@CS5 = global i32 0
@CS6 = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
@switch.table.cDataSize = [4 x i32*] [i32* @CS5, i32* @CS6, i32* @CS7, i32* @CS8]
define i32 @cDataSize(i32 %0) {
%2 = add i32 %0, -5
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32*], [4 x i32*]* @switch.table.cDataSize, i64 0, i64 %5
%7 = load i32*, i32** %6
br label %8
8: ; preds = %1, %4
%9 = phi i32* [ %7, %4 ], [ @CS8, %1 ]
%10 = load i32, i32* %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ ftell(int /*<<< orphan*/ *);
size_t sxbp_get_file_size(FILE *file_handle) {
  fseek(file_handle, 0, SEEK_END);
  size_t file_size = (size_t)ftell(file_handle);
  fseek(file_handle, 0, SEEK_SET);
  return file_size;
}


x86 assembly (clang, -O0):
<sxbp_get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sxbp_get_file_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
movslq %eax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @sxbp_get_file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @ftell(i32* %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load i32*, i32** %2
%11 = load i32, i32* @SEEK_SET
%12 = call i32 @fseek(i32* %10, i32 0, i32 %11)
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @sxbp_get_file_size(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i32 @ftell(i32* %0)
%5 = sext i32 %4 to i64
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 0, i32 %6)
ret i64 %5
}
void remove_all_chars(char *str, char c) {
  char *pr = str, *pw = str;
  while (*pr) {
    *pw = *pr++;
    pw += (*pw != c);
  }
  *pw = '\0';
}


x86 assembly (clang, -O0):
<remove_all_chars>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     116a <remove_all_chars+0x6a>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    111e <remove_all_chars+0x1e>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_all_chars>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <remove_all_chars+0x28>
lea    0x1(%rdi),%rax
nopw   0x0(%rax,%rax,1)
mov    %cl,(%rdi)
xor    %edx,%edx
cmp    %sil,%cl
setne  %dl
add    %rdx,%rdi
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <remove_all_chars+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @remove_all_chars(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %7
%10 = icmp ne i8 %6, %1
%11 = zext i1 %10 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %0, %2 ], [ %12, %5 ]
store i8 0, i8* %16
ret void
}
unsigned long long _Get_LL_Bits(unsigned long long uval, unsigned int pos,
                                unsigned int num) {
  return (uval >> pos) & ~(~0ULL << num);
}


x86 assembly (clang, -O0):
<_Get_LL_Bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    %cl,%rax
mov    -0x10(%rbp),%ecx
mov    $0xffffffffffffffff,%rdx
shl    %cl,%rdx
mov    %rdx,%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Get_LL_Bits>:
mov    %esi,%ecx
shr    %cl,%rdi
mov    $0xffffffffffffffff,%rax
mov    %edx,%ecx
shl    %cl,%rax
not    %rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @_Get_LL_Bits(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i32, i32* %5
%9 = zext i32 %8 to i64
%10 = lshr i64 %7, %9
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = shl i64 -1, %12
%14 = xor i64 %13, -1
%15 = and i64 %10, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @_Get_LL_Bits(i64 %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = lshr i64 %0, %4
%6 = zext i32 %2 to i64
%7 = shl nsw i64 -1, %6
%8 = xor i64 %7, -1
%9 = and i64 %5, %8
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_165() {
  Assert_real((isqrt(165) == 12),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              830, ("Integer square root of 165 should be 12"));
}


x86 assembly (clang, -O0):
<t_sqrt_165>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa5,%edi
call   1030 <isqrt@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x33e,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_165>:
push   %rax
mov    $0xa5,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x33e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 165 should be 12\00"
define void @t_sqrt_165() {
%1 = call i32 @isqrt(i32 165)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 830, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 165 should be 12\00"
define void @t_sqrt_165() {
%1 = tail call i32 @isqrt(i32 165)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 830, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *test_mgr_with_ssl(int /*<<< orphan*/);
const char *test_mgr(void) { return test_mgr_with_ssl(0); }


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

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

LLVM IR (-O0):
define i8* @test_mgr() {
%1 = call i8* @test_mgr_with_ssl(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_mgr() {
%1 = tail call i8* @test_mgr_with_ssl(i32 0)
ret i8* %1
}
/* Variables and functions */
float pow(float, double);
float hipotenus(float a, float b) {
  float c;
  c = pow(a * a + b * b, 1.0 / 2);
  return c;
}


x86 assembly (clang, -O0):
<hipotenus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
call   1030 <pow@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hipotenus>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @hipotenus(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %3
%8 = load float, float* %4
%9 = load float, float* %4
%10 = fmul float %8, %9
%11 = call float @llvm.fmuladd.f32(float %6, float %7, float %10)
%12 = call float @pow(float %11, double 5.000000e-01)
store float %12, float* %5
%13 = load float, float* %5
ret float %13
}

LLVM IR (-O2):
define float @hipotenus(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
%5 = tail call float @pow(float %4, double 5.000000e-01)
ret float %5
}
void WcAllowDuplicateConstructorReg(ignored) int ignored;
{ return; }


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

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

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

LLVM IR (-O2):
define void @WcAllowDuplicateConstructorReg(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc_via_ptr(int);
void malloc_ptr_no_check_leak_bad() {
  int *p = (int *)malloc_via_ptr(sizeof(int));
  *p = 42;
}


x86 assembly (clang, -O0):
<malloc_ptr_no_check_leak_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <malloc_via_ptr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_ptr_no_check_leak_bad>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc_via_ptr@plt>
movl   $0x2a,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @malloc_ptr_no_check_leak_bad() {
%1 = alloca i32*
%2 = call i64 @malloc_via_ptr(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 42, i32* %4
ret void
}

LLVM IR (-O2):
define void @malloc_ptr_no_check_leak_bad() {
%1 = tail call i64 @malloc_via_ptr(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 42, i32* %2
ret void
}
void analysis_destroy() {}


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

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

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

LLVM IR (-O2):
define void @analysis_destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XCopyGC() {
  printf("XCopyGC called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"XCopyGC called\00"
define i32 @XCopyGC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int PM_inpb(int);
int kbWaitForReadReady(void) {
  int timeout = 8192;
  while ((timeout > 0) && (!(PM_inpb(0x64) & 0x01)))
    timeout--;
  return (timeout > 0);
}


x86 assembly (clang, -O0):
<kbWaitForReadReady>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2000,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1146 <kbWaitForReadReady+0x36>
mov    $0x64,%edi
call   1030 <PM_inpb@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1156 <kbWaitForReadReady+0x46>
jmp    1164 <kbWaitForReadReady+0x54>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <kbWaitForReadReady+0xf>
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbWaitForReadReady>:
push   %rbx
mov    $0x2000,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1030 <PM_inpb@plt>
test   $0x1,%al
jne    1138 <kbWaitForReadReady+0x28>
lea    -0x1(%rbx),%ecx
cmp    $0x1,%ebx
mov    %ecx,%ebx
ja     1120 <kbWaitForReadReady+0x10>
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @kbWaitForReadReady() {
%1 = alloca i32
store i32 8192, i32* %1
br label %2
2: ; preds = %12, %0
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @PM_inpb(i32 100)
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %2
%11 = phi i1 [ false, %2 ], [ %9, %5 ]
br i1 %11, label %12, label %15
12: ; preds = %10
%13 = load i32, i32* %1
%14 = add nsw i32 %13, -1
store i32 %14, i32* %1
br label %2
15: ; preds = %10
%16 = load i32, i32* %1
%17 = icmp sgt i32 %16, 0
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @kbWaitForReadReady() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 8192, %0 ], [ %6, %1 ]
%3 = tail call i32 @PM_inpb(i32 100)
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = add nsw i32 %2, -1
%7 = icmp ugt i32 %2, 1
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %1, label %9
9: ; preds = %1
%10 = xor i1 %5, true
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
char *rfc822_append_text(char *ptr, char *str) {
  strcat(ptr, str);
  return (ptr + (strlen(str)));
}


x86 assembly (clang, -O0):
<rfc822_append_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfc822_append_text>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <strcat@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @rfc822_append_text(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
ret i8* %12
}

LLVM IR (-O2):
define i8* @rfc822_append_text(i8* %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %6
}
void dm_dbg(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @dm_dbg(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
char *getenv(char *);
scalar_t__ strcmp(char *, char *);
int cgiServerHttpsIsOn() {
  char *httpsIsOn = getenv("HTTPS");
  if (httpsIsOn)
    return (strcmp(httpsIsOn, "on") == 0);
  else
    return 0;
}


x86 assembly (clang, -O0):
<cgiServerHttpsIsOn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1167 <cgiServerHttpsIsOn+0x47>
mov    -0x10(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <cgiServerHttpsIsOn+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiServerHttpsIsOn>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     114e <cgiServerHttpsIsOn+0x2e>
lea    0xecd(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"HTTPS\00"
@.str.1 = [3 x i8] c"on\00"
define i32 @cgiServerHttpsIsOn() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i8*, i8** %2
%8 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
store i32 %10, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [6 x i8] c"HTTPS\00"
@.str.1 = [3 x i8] c"on\00"
define i32 @cgiServerHttpsIsOn() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ %6, %3 ], [ 0, %0 ]
ret i32 %8
}
void intercambio(int x, int y) {
  int z = x;
  x = y;
  y = z;
}


x86 assembly (clang, -O0):
<intercambio>:
push   %rbp
mov    %rsp,%rbp
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)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @intercambio(i32 %0, i32 %1) {
ret void
}
int compare_func(void *a, void *b) {
  if (a == b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <compare_func+0x26>
movl   $0x1,-0x4(%rbp)
jmp    112d <compare_func+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_func>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @compare_func(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ SHA256(void *, scalar_t__, unsigned char *);
char *fcla_bin_to_hex(unsigned char *, int);
scalar_t__ strlen(void *);
char *sha256_hex(void *data, ssize_t len) {
  if (len < 0)
    len = strlen(data);
  unsigned char h[32];
  SHA256(data, len, h);
  return fcla_bin_to_hex(h, 32);
}


x86 assembly (clang, -O0):
<sha256_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1158 <sha256_hex+0x28>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <SHA256@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
call   1050 <fcla_bin_to_hex@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha256_hex>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
test   %rsi,%rsi
jns    114a <sha256_hex+0x1a>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%rsi
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <SHA256@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1050 <fcla_bin_to_hex@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @sha256_hex(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [32 x i8]
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %4
br label %11
11: ; preds = %8, %2
%12 = load i8*, i8** %3
%13 = load i64, i64* %4
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%15 = call i32 @SHA256(i8* %12, i64 %13, i8* %14)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%17 = call i8* @fcla_bin_to_hex(i8* %16, i32 32)
ret i8* %17
}

LLVM IR (-O2):
define i8* @sha256_hex(i8* %0, i64 %1) {
%3 = alloca [32 x i8]
%4 = icmp slt i64 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %7
7: ; preds = %5, %2
%8 = phi i64 [ %6, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @SHA256(i8* %0, i64 %8, i8* %9)
%11 = call i8* @fcla_bin_to_hex(i8* %9, i32 32)
ret i8* %11
}
double calcEccentricityEarthOrbit(double t) {
  return 0.016708634 - t * (0.000042037 + 0.0000001267 * t);
}


x86 assembly (clang, -O0):
<calcEccentricityEarthOrbit>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xeed(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xee9(%rip),%xmm2
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcEccentricityEarthOrbit>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calcEccentricityEarthOrbit(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double 1.267000e-07, double %4, double 4.203700e-05)
%6 = fneg double %3
%7 = call double @llvm.fmuladd.f64(double %6, double %5, double 0x3F911C11725D0380)
ret double %7
}

LLVM IR (-O2):
define double @calcEccentricityEarthOrbit(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.267000e-07, double 4.203700e-05)
%3 = fneg double %0
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 0x3F911C11725D0380)
ret double %4
}
int parse_ifla_protinfo(struct rtattr *ifla, struct iflist_entry *ifle,
                        unsigned char family) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.rtattr = type opaque
%struct.iflist_entry = type opaque
define i32 @parse_ifla_protinfo(%struct.rtattr* %0, %struct.iflist_entry* %1, i8 zeroext %2) {
%4 = alloca %struct.rtattr*
%5 = alloca %struct.iflist_entry*
%6 = alloca i8
store %struct.rtattr* %0, %struct.rtattr** %4
store %struct.iflist_entry* %1, %struct.iflist_entry** %5
store i8 %2, i8* %6
ret i32 0
}

LLVM IR (-O2):
%struct.rtattr = type opaque
%struct.iflist_entry = type opaque
define i32 @parse_ifla_protinfo(%struct.rtattr* nocapture readnone %0, %struct.iflist_entry* nocapture readnone %1, i8 zeroext %2) {
ret i32 0
}
/* Variables and functions */
int get_errno();
int get_last_socket_error() { return get_errno(); }


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

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

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

LLVM IR (-O2):
define i32 @get_last_socket_error() {
%1 = tail call i32 (...) @get_errno()
ret i32 %1
}
int operation_mul(int a, int b) { return a * b; }


x86 assembly (clang, -O0):
<operation_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<operation_mul>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @operation_mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
int is_whitespace(char c) {
  if (c == ' ')
    return 1;
  if (c == '\t')
    return 1;
  if (c == '\r' || c == '\n')
    return 1;
  if (c == '\0')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1123 <is_whitespace+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1182 <is_whitespace+0x82>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113c <is_whitespace+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1182 <is_whitespace+0x82>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     1156 <is_whitespace+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1162 <is_whitespace+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1182 <is_whitespace+0x82>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    117b <is_whitespace+0x7b>
movl   $0x1,-0x4(%rbp)
jmp    1182 <is_whitespace+0x82>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002601,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 9, label %3
i8 13, label %3
i8 10, label %3
i8 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int U_PMF_CHARACTERRANGE_get(char const *, int *, int *, char const *);
int /*<<< orphan*/ printf(char *, int, int);
int U_PMF_CHARACTERRANGE_print(const char *contents, const char *blimit) {
  int32_t First, Length;
  int status = U_PMF_CHARACTERRANGE_get(contents, &First, &Length, blimit);
  if (status) {
    printf(" {%d,%d}", First, Length);
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_CHARACTERRANGE_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <U_PMF_CHARACTERRANGE_get@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1164 <U_PMF_CHARACTERRANGE_print+0x44>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_CHARACTERRANGE_print>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rcx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <U_PMF_CHARACTERRANGE_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1151 <U_PMF_CHARACTERRANGE_print+0x31>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c" {%d,%d}\00"
define i32 @U_PMF_CHARACTERRANGE_print(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @U_PMF_CHARACTERRANGE_get(i8* %0, i32* %3, i32* %4, i8* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
br label %13
13: ; preds = %9, %2
ret i32 %7
}
void RAWToRGBARow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @RAWToRGBARow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
char *_getlogin();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pexit(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *login;
  if ((login = _getlogin()) == NULL)
    pexit("_getlogin");
  printf("%s\n", login);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <_getlogin@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1170 <main+0x30>
lea    0xe95(%rip),%rdi
call   1060 <pexit@plt>
mov    -0x10(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <_getlogin@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115c <main+0x1c>
lea    0xea9(%rip),%rdi
call   1060 <pexit@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"_getlogin\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i8* (...) @_getlogin()
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @pexit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
}
int test_imm_07uint8_mem(unsigned char *val) {
  return ((*val) & (-0x07 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_07uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xfffffff9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_07uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -7
%7 = icmp ne i32 %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_07uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -7
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: hostap_diag [-abhpru] <device>\n"
         "Options:\n"
         "  -h      show this usage info\n"
         "  -a      show all info\n"
         "  -b      show baseband processor control registers\n"
         "  -p      show production data area (PDA)\n"
         "  -r      show known RIDs\n"
         "  -u      show unknown RIDs\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [251 x i8] c"Usage: hostap_diag [-abhpru] <device>\0AOptions:\0A -h show this usage info\0A -a show all info\0A -b show baseband processor control registers\0A -p show production data area (PDA)\0A -r show known RIDs\0A -u show unknown RIDs\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [250 x i8] c"Usage: hostap_diag [-abhpru] <device>\0AOptions:\0A -h show this usage info\0A -a show all info\0A -b show baseband processor control registers\0A -p show production data area (PDA)\0A -r show known RIDs\0A -u show unknown RIDs\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([250 x i8], [250 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, float *, int);
uint32_t eh_float32_to_uint32(float f) {
  uint32_t u;
  memcpy(&u, &f, sizeof(uint32_t));
  return u;
}


x86 assembly (clang, -O0):
<eh_float32_to_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eh_float32_to_uint32>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @eh_float32_to_uint32(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int riv_nbits(int);
int srslte_ra_type2_n_rb_step(int);
int srslte_ra_type2_n_vrb_dl(int, int);
uint32_t dci_format1C_sizeof(uint32_t nof_prb) {
  uint32_t n_vrb_dl_gap1 = srslte_ra_type2_n_vrb_dl(nof_prb, true);
  uint32_t n_step = srslte_ra_type2_n_rb_step(nof_prb);
  uint32_t n = riv_nbits((uint32_t)n_vrb_dl_gap1 / n_step) + 5;
  if (nof_prb >= 50) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<dci_format1C_sizeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <srslte_ra_type2_n_vrb_dl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <srslte_ra_type2_n_rb_step@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%edi
call   1030 <riv_nbits@plt>
add    $0x5,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x32,-0x4(%rbp)
jl     117d <dci_format1C_sizeof+0x4d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dci_format1C_sizeof>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1,%esi
call   1040 <srslte_ra_type2_n_vrb_dl@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <srslte_ra_type2_n_rb_step@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <riv_nbits@plt>
xor    %ecx,%ecx
cmp    $0x32,%ebx
setge  %cl
add    %ecx,%eax
add    $0x5,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @dci_format1C_sizeof(i32 %0) {
%2 = tail call i32 @srslte_ra_type2_n_vrb_dl(i32 %0, i32 1)
%3 = tail call i32 @srslte_ra_type2_n_rb_step(i32 %0)
%4 = sdiv i32 %2, %3
%5 = tail call i32 @riv_nbits(i32 %4)
%6 = icmp sgt i32 %0, 49
%7 = select i1 %6, i32 6, i32 5
%8 = add nsw i32 %5, %7
ret i32 %8
}
void g_array_append_vals() {}


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

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

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

LLVM IR (-O2):
define void @g_array_append_vals() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bully();
void main() { bully(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @bully()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ droproot();
scalar_t__ dropuidgid(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ getegid();
void test1(void) {
  droproot();
  if (dropuidgid(0, 1231, getegid()))
    _exit(111);
  _exit(0);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <droproot@plt>
mov    $0x0,%al
call   1060 <getegid@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x4cf,%esi
call   1050 <dropuidgid@plt>
cmp    $0x0,%rax
je     1174 <test1+0x34>
mov    $0x6f,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<test1>:
push   %rax
xor    %eax,%eax
call   1040 <droproot@plt>
xor    %eax,%eax
call   1060 <getegid@plt>
xor    %edi,%edi
mov    $0x4cf,%esi
mov    %eax,%edx
call   1050 <dropuidgid@plt>
test   %rax,%rax
jne    1169 <test1+0x29>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0x6f,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @test1() {
%1 = call i32 (...) @droproot()
%2 = call i32 (...) @getegid()
%3 = call i64 @dropuidgid(i32 0, i32 1231, i32 %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @_exit(i32 111)
unreachable
7: ; preds = %0
%8 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @test1() {
%1 = tail call i32 (...) @droproot()
%2 = tail call i32 (...) @getegid()
%3 = tail call i64 @dropuidgid(i32 0, i32 1231, i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @_exit(i32 111)
unreachable
7: ; preds = %0
%8 = tail call i32 @_exit(i32 0)
unreachable
}