xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char c, d;
  c = 'd';
  d = c;
  printf("d = %c\n", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x64,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
lea    0xed7(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"d = %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ copyMat4(float *, float *);
int /*<<< orphan*/ hpmMultMat4(float *, float *, float *);
int /*<<< orphan*/ hpmYPRRotation(float, float, float, float *);
void hpmRotateYPR(float yaw, float pitch, float roll, float *mat) {
  float rot[16], r[16];
  hpmYPRRotation(yaw, pitch, roll, rot);
  hpmMultMat4(rot, mat, r);
  copyMat4(mat, r);
}


x86 assembly (clang, -O0):
<hpmRotateYPR>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    -0x60(%rbp),%rdi
call   1040 <hpmYPRRotation@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1030 <hpmMultMat4@plt>
mov    -0x18(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   1050 <copyMat4@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpmRotateYPR>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1040 <hpmYPRRotation@plt>
mov    %rsp,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <hpmMultMat4@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <copyMat4@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @hpmRotateYPR(float %0, float %1, float %2, float* %3) {
%5 = alloca [16 x float]
%6 = alloca [16 x float]
%7 = bitcast [16 x float]* %5 to i8*
%8 = bitcast [16 x float]* %6 to i8*
%9 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%10 = call i32 @hpmYPRRotation(float %0, float %1, float %2, float* %9)
%11 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 0
%12 = call i32 @hpmMultMat4(float* %9, float* %3, float* %11)
%13 = call i32 @copyMat4(float* %3, float* %11)
ret void
}
void handler(int sig) {
  printf("\n %s: \n", __func__);
  printf("Caught signal\n");
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.handler = [8 x i8] c"handler\00"
@.str.1 = [15 x i8] c"Caught signal\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.handler, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.handler = [8 x i8] c"handler\00"
@str = [14 x i8] c"Caught signal\00"
define void @handler(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.handler, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void cmp_drv_ballistic_deinit(struct CmpDrvBallistic *drv) { (void)drv; }


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

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

LLVM IR (-O0):
%struct.CmpDrvBallistic = type opaque
define void @cmp_drv_ballistic_deinit(%struct.CmpDrvBallistic* %0) {
%2 = alloca %struct.CmpDrvBallistic*
store %struct.CmpDrvBallistic* %0, %struct.CmpDrvBallistic** %2
%3 = load %struct.CmpDrvBallistic*, %struct.CmpDrvBallistic** %2
ret void
}

LLVM IR (-O2):
%struct.CmpDrvBallistic = type opaque
define void @cmp_drv_ballistic_deinit(%struct.CmpDrvBallistic* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int registers_read_byte(int);
int /*<<< orphan*/ registers_write_byte(int, int);
void motion_enable(void) {
  uint8_t flags_lo = registers_read_byte(0x05);
  registers_write_byte(0x05, flags_lo | (1 << 0x02));
}


x86 assembly (clang, -O0):
<motion_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
or     $0x4,%esi
mov    $0x5,%edi
call   1030 <registers_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<motion_enable>:
push   %rax
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
or     $0x4,%eax
mov    $0x5,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <registers_write_byte@plt>

LLVM IR (-O0):
define void @motion_enable() {
%1 = alloca i32
%2 = call i32 @registers_read_byte(i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 4
%5 = call i32 @registers_write_byte(i32 5, i32 %4)
ret void
}

LLVM IR (-O2):
define void @motion_enable() {
%1 = tail call i32 @registers_read_byte(i32 5)
%2 = or i32 %1, 4
%3 = tail call i32 @registers_write_byte(i32 5, i32 %2)
ret void
}
int test_imm_94uint16_mem(unsigned short *val) {
  return ((*val) & (-0x94 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_94uint16_mem>:
movzwl (%rdi),%eax
test   $0xff6c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_94uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -148
%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_94uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -148
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rep_nop();
__attribute__((always_)) void cpu_relax(void) { rep_nop(); }


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

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

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

LLVM IR (-O2):
define void @cpu_relax() {
%1 = tail call i32 (...) @rep_nop()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ ENOENT;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
int /*<<< orphan*/ *opendir(char *);
void test_zero(void) {
  DIR *dir = opendir("");
  assert(dir == NULL);
  assert(errno == ENOENT);
}


x86 assembly (clang, -O0):
<test_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_zero>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <opendir@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%rax
mov    0x2e84(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@errno = global i64 0
@ENOENT = global i64 0
define void @test_zero() {
%1 = alloca i32*
%2 = call i32* @opendir(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp eq i32* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* @errno
%8 = load i64, i64* @ENOENT
%9 = icmp eq i64 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@errno = global i64 0
@ENOENT = global i64 0
define void @test_zero() {
%1 = tail call i32* @opendir(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32* %1, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOENT
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WARN_ON(int);
int /*<<< orphan*/ might_sleep();
void gpio_free(unsigned gpio) {
  might_sleep();
  WARN_ON(1);
}


x86 assembly (clang, -O0):
<gpio_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <might_sleep@plt>
mov    $0x1,%edi
call   1030 <WARN_ON@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_free>:
push   %rax
xor    %eax,%eax
call   1040 <might_sleep@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <WARN_ON@plt>

LLVM IR (-O0):
define void @gpio_free(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @might_sleep()
%4 = call i32 @WARN_ON(i32 1)
ret void
}

LLVM IR (-O2):
define void @gpio_free(i32 %0) {
%2 = tail call i32 (...) @might_sleep()
%3 = tail call i32 @WARN_ON(i32 1)
ret void
}
int pm_wake_unlock(const char *buf) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pm_wake_unlock(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
__attribute__((pure)) char *str_skip_line(char *restrict str) {
  if (!str)
    return NULL;
  while (*str && (*str++ != '\n'))
    ;
  return str;
}


x86 assembly (clang, -O0):
<str_skip_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <str_skip_line+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1172 <str_skip_line+0x72>
jmp    1125 <str_skip_line+0x25>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1155 <str_skip_line+0x55>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1165 <str_skip_line+0x65>
jmp    116a <str_skip_line+0x6a>
jmp    1125 <str_skip_line+0x25>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_skip_line>:
test   %rdi,%rdi
je     1121 <str_skip_line+0x21>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
test   %cl,%cl
je     1120 <str_skip_line+0x20>
add    $0x1,%rax
cmp    $0xa,%cl
jne    1110 <str_skip_line+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @str_skip_line(i8* noalias %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1, %7
%4 = phi i8* [ %8, %7 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = icmp eq i8 %5, 10
br i1 %9, label %10, label %3
10: ; preds = %7, %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ], [ %8, %7 ]
ret i8* %11
}
/* Variables and functions */
float exp(float);
double exponencial(float t) {
  float resultado;
  resultado = exp(t);
  return resultado;
}


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

x86 assembly (clang, -O2):
<exponencial>:
push   %rax
call   1030 <exp@plt>
cvtss2sd %xmm0,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @exponencial(float %0) {
%2 = tail call float @exp(float %0)
%3 = fpext float %2 to double
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int genBitCount_uint32_t(uint32_t v) {
  unsigned c;
  for (c = 0; v; c++)
    v &= v - 1;
  return c;
}


x86 assembly (clang, -O0):
<genBitCount_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <genBitCount_uint32_t+0x38>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <genBitCount_uint32_t+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<genBitCount_uint32_t>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <genBitCount_uint32_t+0x1c>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rdi),%rcx
add    $0x1,%eax
and    %rcx,%rdi
jne    1110 <genBitCount_uint32_t+0x10>
ret

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

LLVM IR (-O2):
define i32 @genBitCount_uint32_t(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nsw i64 %5, -1
%7 = and i64 %6, %5
%8 = add i32 %4, 1
%9 = icmp eq i64 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SystemCoreClockUpdate();
void __attribute__((weak)) __initialize_hardware(void) {
  SystemCoreClockUpdate();
}


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

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

LLVM IR (-O0):
define weak void @__initialize_hardware() {
%1 = call i32 (...) @SystemCoreClockUpdate()
ret void
}

LLVM IR (-O2):
define weak void @__initialize_hardware() {
%1 = tail call i32 (...) @SystemCoreClockUpdate()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void hit(void) { say("THESE PEOPLE JUST DON'T GET IT!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"THESE PEOPLE JUST DON'T GET IT!\00"
define void @hit() {
%1 = call i32 @say(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"THESE PEOPLE JUST DON'T GET IT!\00"
define void @hit() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pad_set(int, int);
int(cmd_a)(int c, char **v) {
  pad_set((0x10), v[0][0] == '+');
  return 0;
}


x86 assembly (clang, -O0):
<cmd_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
mov    $0x10,%edi
call   1030 <pad_set@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_a>:
push   %rax
mov    (%rsi),%rax
xor    %esi,%esi
cmpb   $0x2b,(%rax)
sete   %sil
mov    $0x10,%edi
call   1030 <pad_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cmd_a(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 43
%12 = zext i1 %11 to i32
%13 = call i32 @pad_set(i32 16, i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @cmd_a(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 43
%6 = zext i1 %5 to i32
%7 = tail call i32 @pad_set(i32 16, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void serv_accept_chat(int i) {
  char *buf = malloc(256);
  snprintf(buf, 255, "toc_chat_accept %d", i);
  sflap_send(buf, -1, 2);
  free(buf);
}


x86 assembly (clang, -O0):
<serv_accept_chat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0xff,%esi
lea    0xe94(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x10(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1060 <sflap_send@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_accept_chat>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x100,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%rdx
mov    %rax,%rdi
mov    $0xff,%esi
mov    %ebp,%ecx
call   1040 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1060 <sflap_send@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"toc_chat_accept %d\00"
define void @serv_accept_chat(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @malloc(i32 256)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* %2
%7 = call i32 @snprintf(i8* %5, i32 255, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @sflap_send(i8* %8, i32 -1, i32 2)
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"toc_chat_accept %d\00"
define void @serv_accept_chat(i32 %0) {
%2 = tail call dereferenceable_or_null(256) i8* @malloc(i32 256)
%3 = tail call i32 @snprintf(i8* %2, i32 255, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @sflap_send(i8* %2, i32 -1, i32 2)
%5 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
double RAND_MAX;
double rand();
int randd(int d) { return (int)(1.0 * rand() / (RAND_MAX + 0.1) * d); }


x86 assembly (clang, -O0):
<randd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  0xedb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xec7(%rip),%xmm1
mov    0x2ea8(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randd>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec7(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xed3(%rip),%xmm1
cvtsi2sd %ebx,%xmm2
divsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
cvttsd2si %xmm2,%eax
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @randd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call double (...) @rand()
%4 = fmul double 1.000000e+00, %3
%5 = load double, double* @RAND_MAX
%6 = fadd double %5, 1.000000e-01
%7 = fdiv double %4, %6
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to double
%10 = fmul double %7, %9
%11 = fptosi double %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @randd(i32 %0) {
%2 = tail call double (...) @rand()
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e-01
%5 = fdiv double %2, %4
%6 = sitofp i32 %0 to double
%7 = fmul double %5, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness17(int a) {
  unsigned max = ((~0U) & ((~0U) >> 1));
  if (a < max)
    return;
  clang_analyzer_eval(a < 0);
  clang_analyzer_eval(a == 0);
  clang_analyzer_eval(a == ((~0U) & ((~0U) >> 1)));
}


x86 assembly (clang, -O0):
<mixedSignedness17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1133 <mixedSignedness17+0x23>
jmp    1169 <mixedSignedness17+0x59>
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
cmpl   $0x7fffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness17>:
cmp    $0x7fffffff,%edi
jae    1119 <mixedSignedness17+0x9>
ret
push   %rbx
xor    %eax,%eax
xor    %ebx,%ebx
cmp    $0x7fffffff,%edi
setne  %al
sete   %bl
mov    %eax,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness17(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2147483647, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ult i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
br label %21
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @clang_analyzer_eval(i32 %11)
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @clang_analyzer_eval(i32 %15)
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 2147483647
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
br label %21
21: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @mixedSignedness17(i32 %0) {
%2 = icmp ult i32 %0, 2147483647
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = icmp ne i32 %0, 2147483647
%5 = zext i1 %4 to i32
%6 = tail call i32 @clang_analyzer_eval(i32 %5)
%7 = tail call i32 @clang_analyzer_eval(i32 0)
%8 = icmp eq i32 %0, 2147483647
%9 = zext i1 %8 to i32
%10 = tail call i32 @clang_analyzer_eval(i32 %9)
br label %11
11: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clrscr() {
  system("clear");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clrscr() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct gheap_ctx {
  int dummy;
};

/* Variables and functions */
void *_gheap_get_item_ptr(struct gheap_ctx const *const, void *const,
                          size_t const);
int /*<<< orphan*/ gheap_swap_max_item(struct gheap_ctx const *const,
                                       void *const, size_t const, void *const);
void _gheap_pop_max_item(const struct gheap_ctx *const ctx, void *const base,
                         const size_t heap_size) {
  void *const hole = _gheap_get_item_ptr(ctx, base, heap_size);
  gheap_swap_max_item(ctx, base, heap_size, hole);
}


x86 assembly (clang, -O0):
<_gheap_pop_max_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <_gheap_get_item_ptr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <gheap_swap_max_item@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gheap_pop_max_item>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <_gheap_get_item_ptr@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <gheap_swap_max_item@plt>

LLVM IR (-O0):
%struct.gheap_ctx = type { i32 }
define void @_gheap_pop_max_item(%struct.gheap_ctx* %0, i8* %1, i64 %2) {
%4 = alloca %struct.gheap_ctx*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store %struct.gheap_ctx* %0, %struct.gheap_ctx** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.gheap_ctx*, %struct.gheap_ctx** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i8* @_gheap_get_item_ptr(%struct.gheap_ctx* %8, i8* %9, i64 %10)
store i8* %11, i8** %7
%12 = load %struct.gheap_ctx*, %struct.gheap_ctx** %4
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = load i8*, i8** %7
%16 = call i32 @gheap_swap_max_item(%struct.gheap_ctx* %12, i8* %13, i64 %14, i8* %15)
ret void
}

LLVM IR (-O2):
%struct.gheap_ctx = type { i32 }
define void @_gheap_pop_max_item(%struct.gheap_ctx* %0, i8* %1, i64 %2) {
%4 = tail call i8* @_gheap_get_item_ptr(%struct.gheap_ctx* %0, i8* %1, i64 %2)
%5 = tail call i32 @gheap_swap_max_item(%struct.gheap_ctx* %0, i8* %1, i64 %2, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drawFullTimebar();
int /*<<< orphan*/ drawInitialState();
int /*<<< orphan*/ drawPlayerIcons();
int /*<<< orphan*/ drawPlayerScores();
int /*<<< orphan*/ drawPlayers();
int /*<<< orphan*/ drawSidebar();
int /*<<< orphan*/ renderFrame();
int /*<<< orphan*/ setupGrids();
int /*<<< orphan*/ setupPlayers();
void setupRound(void) {
  setupGrids();
  setupPlayers();
  drawInitialState();
  drawPlayers();
  drawSidebar();
  drawPlayerIcons();
  drawPlayerScores();
  drawFullTimebar();
  renderFrame();
}


x86 assembly (clang, -O0):
<setupRound>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setupGrids@plt>
mov    $0x0,%al
call   1080 <setupPlayers@plt>
mov    $0x0,%al
call   1030 <drawInitialState@plt>
mov    $0x0,%al
call   1090 <drawPlayers@plt>
mov    $0x0,%al
call   10a0 <drawSidebar@plt>
mov    $0x0,%al
call   1070 <drawPlayerIcons@plt>
mov    $0x0,%al
call   10b0 <drawPlayerScores@plt>
mov    $0x0,%al
call   1060 <drawFullTimebar@plt>
mov    $0x0,%al
call   1050 <renderFrame@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupRound>:
push   %rax
xor    %eax,%eax
call   1040 <setupGrids@plt>
xor    %eax,%eax
call   1080 <setupPlayers@plt>
xor    %eax,%eax
call   1030 <drawInitialState@plt>
xor    %eax,%eax
call   1090 <drawPlayers@plt>
xor    %eax,%eax
call   10a0 <drawSidebar@plt>
xor    %eax,%eax
call   1070 <drawPlayerIcons@plt>
xor    %eax,%eax
call   10b0 <drawPlayerScores@plt>
xor    %eax,%eax
call   1060 <drawFullTimebar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <renderFrame@plt>

LLVM IR (-O0):
define void @setupRound() {
%1 = call i32 (...) @setupGrids()
%2 = call i32 (...) @setupPlayers()
%3 = call i32 (...) @drawInitialState()
%4 = call i32 (...) @drawPlayers()
%5 = call i32 (...) @drawSidebar()
%6 = call i32 (...) @drawPlayerIcons()
%7 = call i32 (...) @drawPlayerScores()
%8 = call i32 (...) @drawFullTimebar()
%9 = call i32 (...) @renderFrame()
ret void
}

LLVM IR (-O2):
define void @setupRound() {
%1 = tail call i32 (...) @setupGrids()
%2 = tail call i32 (...) @setupPlayers()
%3 = tail call i32 (...) @drawInitialState()
%4 = tail call i32 (...) @drawPlayers()
%5 = tail call i32 (...) @drawSidebar()
%6 = tail call i32 (...) @drawPlayerIcons()
%7 = tail call i32 (...) @drawPlayerScores()
%8 = tail call i32 (...) @drawFullTimebar()
%9 = tail call i32 (...) @renderFrame()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
void stfl_error_action(const wchar_t *mode) {
  abort();
  return;
}


x86 assembly (clang, -O0):
<stfl_error_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<stfl_error_action>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @stfl_error_action(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @stfl_error_action(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
void foo357(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo357(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void prtusage(void) {
  printf("One arg please: 1) string in "
         "FILENAME:COLUMN:SEPARATOR:COMMENTSYES:HEADERYES form\n");
  printf("Separator most probably \" \" or \",\"\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@.str = [83 x i8] c"One arg please: 1) string in FILENAME:COLUMN:SEPARATOR:COMMENTSYES:HEADERYES form\0A\00"
@.str.1 = [36 x i8] c"Separator most probably \22 \22 or \22,\22\0A\00"
@EXIT_FAILURE = global i32 0
define void @prtusage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [82 x i8] c"One arg please: 1) string in FILENAME:COLUMN:SEPARATOR:COMMENTSYES:HEADERYES form\00"
@str.2 = [35 x i8] c"Separator most probably \22 \22 or \22,\22\00"
define void @prtusage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.2, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int is_number(p)
register const char *p;
{
  do {
    if (!((unsigned)((*p) - '0') <= 9))
      return 0;
  } while (*++p != '\0');
  return 1;
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
cmp    $0x9,%eax
jbe    1127 <is_number+0x27>
movl   $0x0,-0x4(%rbp)
jmp    114f <is_number+0x4f>
jmp    112c <is_number+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    1108 <is_number+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
mov    (%rdi),%al
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%eax
add    $0xffffffd0,%eax
cmp    $0x9,%eax
ja     112c <is_number+0x2c>
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <is_number+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_number(i8* nocapture %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %9, %1
%4 = phi i8 [ %2, %1 ], [ %11, %9 ]
%5 = phi i8* [ %0, %1 ], [ %10, %9 ]
%6 = sext i8 %4 to i32
%7 = add nsw i32 %6, -48
%8 = icmp ult i32 %7, 10
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %9, %3
%14 = phi i32 [ 0, %3 ], [ 1, %9 ]
ret i32 %14
}
unsigned long cp_hash_int(void *i) { return (long)*((int *)i); }


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

x86 assembly (clang, -O2):
<cp_hash_int>:
movslq (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @cp_hash_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @cp_hash_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
ret i64 %4
}
char *estrdup(const char *str) {
  void *res = strdup(str);
  if (!res)
    eprint("fatal: could not malloc() %u bytes\n", strlen(str));
  return res;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <estrdup+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1050 <eprint@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115d <estrdup+0x2d>
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0xead(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <eprint@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [36 x i8] c"fatal: could not malloc() %u bytes\0A\00"
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @eprint to i32 (i8*, i64, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [36 x i8] c"fatal: could not malloc() %u bytes\0A\00"
define i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @eprint to i32 (i8*, i64, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 %5)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_51() {
  Assert_real((isqrt(51) == 7),
              "/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",
              260, ("Integer square root of 51 should be 7"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_51>:
push   %rax
mov    $0x33,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x104,%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 = [38 x i8] c"Integer square root of 51 should be 7\00"
define void @t_sqrt_51() {
%1 = call i32 @isqrt(i32 51)
%2 = icmp eq i32 %1, 7
%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 260, i8* getelementptr inbounds ([38 x i8], [38 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 = [38 x i8] c"Integer square root of 51 should be 7\00"
define void @t_sqrt_51() {
%1 = tail call i32 @isqrt(i32 51)
%2 = icmp eq i32 %1, 7
%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 260, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int REG_EXTENDED;
int REG_NEWLINE;
scalar_t__ regcomp(int /*<<< orphan*/ *, char const *, int);
short int regexp_is_valid(const char *regexp) {
  regex_t preg;
  if (regcomp(&preg, regexp, REG_NEWLINE | REG_EXTENDED) != 0)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<regexp_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    0x2ea8(%rip),%rax
or     (%rax),%edx
lea    -0x14(%rbp),%rdi
call   1030 <regcomp@plt>
cmp    $0x0,%rax
je     1150 <regexp_is_valid+0x40>
movw   $0x0,-0x2(%rbp)
jmp    1156 <regexp_is_valid+0x46>
movw   $0x1,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regexp_is_valid>:
push   %rax
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    0x2eb6(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
lea    0x4(%rsp),%rdi
call   1030 <regcomp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@REG_NEWLINE = global i32 0
@REG_EXTENDED = global i32 0
define signext i16 @regexp_is_valid(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @REG_NEWLINE
%7 = load i32, i32* @REG_EXTENDED
%8 = or i32 %6, %7
%9 = call i64 @regcomp(i32* %4, i8* %5, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i16 0, i16* %2
br label %13
12: ; preds = %1
store i16 1, i16* %2
br label %13
13: ; preds = %12, %11
%14 = load i16, i16* %2
ret i16 %14
}

LLVM IR (-O2):
@REG_NEWLINE = global i32 0
@REG_EXTENDED = global i32 0
define signext i16 @regexp_is_valid(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @REG_NEWLINE
%5 = load i32, i32* @REG_EXTENDED
%6 = or i32 %5, %4
%7 = call i64 @regcomp(i32* %2, i8* %0, i32 %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i16
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char hello[20] = "Hello   	 world!";
  printf("%s\n", hello);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xee6(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.hello = [20 x i8] c"Hello \09 world!\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.hello = [20 x i8] c"Hello \09 world!\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int iHxFaceSelectLang(unsigned char *pszLangs, unsigned char *pszDescs,
                      unsigned char *pszSelectedLang, unsigned char *pszPrompt,
                      unsigned char *pszLanguage) {
  return (99);
}


x86 assembly (clang, -O0):
<iHxFaceSelectLang>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0x63,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @iHxFaceSelectLang(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret i32 99
}

LLVM IR (-O2):
define i32 @iHxFaceSelectLang(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
ret i32 99
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xb0() {
  Assert_real((isprint(176) == 0),
              "/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/ctype/test_isprint.c",
              885, ("isprint should be 0 for 0xb0"));
}


x86 assembly (clang, -O0):
<t_isprint_0xb0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x375,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x375,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xb0\00"
define void @t_isprint_0xb0() {
%1 = call i64 @isprint(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xb0\00"
define void @t_isprint_0xb0() {
%1 = tail call i64 @isprint(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall_close(int);
int close(int file) { return syscall_close(file); }


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

x86 assembly (clang, -O2):
<close>:
jmp    1030 <syscall_close@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @syscall_close(i32 %0)
ret i32 %2
}