xunge/DecIR huggingface dataset:
/* Variables and functions */
char nibble2hex(int);
void effect2text(int comm, int param, char *text) {
  text[0] = nibble2hex(comm);
  text[1] = nibble2hex(param >> 4);
  text[2] = nibble2hex(param & 0xF);
}


x86 assembly (clang, -O0):
<effect2text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nibble2hex@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
call   1030 <nibble2hex@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%edi
and    $0xf,%edi
call   1030 <nibble2hex@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<effect2text>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
call   1030 <nibble2hex@plt>
mov    %al,(%rbx)
mov    %ebp,%edi
sar    $0x4,%edi
call   1030 <nibble2hex@plt>
mov    %al,0x1(%rbx)
and    $0xf,%ebp
mov    %ebp,%edi
call   1030 <nibble2hex@plt>
mov    %al,0x2(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @effect2text(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call signext i8 @nibble2hex(i32 %7)
%9 = load i8*, i8** %6
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %5
%12 = ashr i32 %11, 4
%13 = call signext i8 @nibble2hex(i32 %12)
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %5
%17 = and i32 %16, 15
%18 = call signext i8 @nibble2hex(i32 %17)
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8 %18, i8* %20
ret void
}

LLVM IR (-O2):
define void @effect2text(i32 %0, i32 %1, i8* nocapture writeonly %2) {
%4 = tail call signext i8 @nibble2hex(i32 %0)
store i8 %4, i8* %2
%5 = ashr i32 %1, 4
%6 = tail call signext i8 @nibble2hex(i32 %5)
%7 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %6, i8* %7
%8 = and i32 %1, 15
%9 = tail call signext i8 @nibble2hex(i32 %8)
%10 = getelementptr inbounds i8, i8* %2, i64 2
store i8 %9, i8* %10
ret void
}
unsigned int ft_strlen(char *str) {
  unsigned int k;
  k = 0;
  while (str[k] != '\0')
    k++;
  return (k);
}


x86 assembly (clang, -O0):
<ft_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1131 <ft_strlen+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ft_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <ft_strlen+0x10>
ret

LLVM IR (-O0):
define i32 @ft_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%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 @ft_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ I2C_HAL_I2C_SCL_LO();
int /*<<< orphan*/ I2C_HAL_SCL_OUT_MODE();
void I2C_SCL_LOW(void) {
  I2C_HAL_SCL_OUT_MODE();
  I2C_HAL_I2C_SCL_LO();
}


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

x86 assembly (clang, -O2):
<I2C_SCL_LOW>:
push   %rax
xor    %eax,%eax
call   1030 <I2C_HAL_SCL_OUT_MODE@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <I2C_HAL_I2C_SCL_LO@plt>

LLVM IR (-O0):
define void @I2C_SCL_LOW() {
%1 = call i32 (...) @I2C_HAL_SCL_OUT_MODE()
%2 = call i32 (...) @I2C_HAL_I2C_SCL_LO()
ret void
}

LLVM IR (-O2):
define void @I2C_SCL_LOW() {
%1 = tail call i32 (...) @I2C_HAL_SCL_OUT_MODE()
%2 = tail call i32 (...) @I2C_HAL_I2C_SCL_LO()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
int /*<<< orphan*/ __coverity_mark_as_afm_freed__(void *, char *);
void H5Tclose(void *id) {
  __coverity_free__(id);
  __coverity_mark_as_afm_freed__(id, "H5Tclose");
}


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

x86 assembly (clang, -O2):
<H5Tclose>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__coverity_free__@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__coverity_mark_as_afm_freed__@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"H5Tclose\00"
define void @H5Tclose(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
%3 = tail call i32 @__coverity_mark_as_afm_freed__(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int condition_period(char c) { return c == '.'; }


x86 assembly (clang, -O0):
<condition_period>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_period>:
xor    %eax,%eax
cmp    $0x2e,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @condition_period(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @condition_period(i8 signext %0) {
%2 = icmp eq i8 %0, 46
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ write(int, char *, int);
void _Unwind_GetDataRelBase() {
  char msg[] = "Aborting: "
               "_Unwind_GetDataRelBase"
               " called "
               "(C++ exception handling is disabled)\n";
  write(2, msg, sizeof(msg) - 1);
  abort();
}


x86 assembly (clang, -O0):
<_Unwind_GetDataRelBase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x4e,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rsi
mov    $0x2,%edi
mov    $0x4d,%edx
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_Unwind_GetDataRelBase>:
sub    $0x58,%rsp
movups 0xf13(%rip),%xmm0
movups %xmm0,0x3e(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2,%edi
mov    $0x4d,%edx
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const._Unwind_GetDataRelBase.msg = [78 x i8] c"Aborting: _Unwind_GetDataRelBase called (C++ exception handling is disabled)\0A\00"
define void @_Unwind_GetDataRelBase() {
%1 = alloca [78 x i8]
%2 = bitcast [78 x i8]* %1 to i8*
%3 = getelementptr inbounds [78 x i8], [78 x i8]* %1, i64 0, i64 0
%4 = call i32 @write(i32 2, i8* %3, i32 77)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@__const._Unwind_GetDataRelBase.msg = [78 x i8] c"Aborting: _Unwind_GetDataRelBase called (C++ exception handling is disabled)\0A\00"
define void @_Unwind_GetDataRelBase() {
%1 = alloca [78 x i8]
%2 = getelementptr inbounds [78 x i8], [78 x i8]* %1, i64 0, i64 0
%3 = call i32 @write(i32 2, i8* %2, i32 77)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
size_t round_up_multof(size_t n, size_t f) { return (n + (f - 1)) / f * f; }


x86 assembly (clang, -O0):
<round_up_multof>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
add    %rcx,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
imul   -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up_multof>:
lea    (%rdi,%rsi,1),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111e <round_up_multof+0x1e>
mov    %rcx,%rax
xor    %edx,%edx
div    %rsi
jmp    1124 <round_up_multof+0x24>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @round_up_multof(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub i64 %6, 1
%8 = add i64 %5, %7
%9 = load i64, i64* %4
%10 = udiv i64 %8, %9
%11 = load i64, i64* %4
%12 = mul i64 %10, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @round_up_multof(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = urem i64 %4, %1
%6 = sub i64 %4, %5
ret i64 %6
}
/* Type definitions */
struct pipeline_worker_group {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pipeline_worker_group *);
int /*<<< orphan*/
pipeline_worker_group_free_internal(struct pipeline_worker_group *);
void pipeline_worker_group_free(struct pipeline_worker_group *group) {
  pipeline_worker_group_free_internal(group);
  free(group);
}


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

x86 assembly (clang, -O2):
<pipeline_worker_group_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <pipeline_worker_group_free_internal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.pipeline_worker_group = type { i32 }
define void @pipeline_worker_group_free(%struct.pipeline_worker_group* %0) {
%2 = tail call i32 @pipeline_worker_group_free_internal(%struct.pipeline_worker_group* %0)
%3 = tail call i32 @free(%struct.pipeline_worker_group* %0)
ret void
}
double epb2epj(epoch)
double epoch;
{
  double dj;
  dj = epb2jd(epoch);
  return (jd2epj(dj));
}


x86 assembly (clang, -O0):
<epb2epj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1040 <epb2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jd2epj@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epb2epj>:
push   %rax
mov    $0x1,%al
call   1040 <epb2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1030 <jd2epj@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @epb2epj(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 (double, ...) bitcast (i32 (...)* @epb2jd to i32 (double, ...)*)(double %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 (double, ...) bitcast (i32 (...)* @jd2epj to i32 (double, ...)*)(double %7)
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @epb2epj(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @epb2jd to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2epj to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to double
ret double %5
}
int tegra_mipi_cal_init_hw(struct tegra_mipi_cal *mipi_cal) { return 0; }


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

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

LLVM IR (-O0):
%struct.tegra_mipi_cal = type opaque
define i32 @tegra_mipi_cal_init_hw(%struct.tegra_mipi_cal* %0) {
%2 = alloca %struct.tegra_mipi_cal*
store %struct.tegra_mipi_cal* %0, %struct.tegra_mipi_cal** %2
ret i32 0
}

LLVM IR (-O2):
%struct.tegra_mipi_cal = type opaque
define i32 @tegra_mipi_cal_init_hw(%struct.tegra_mipi_cal* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __set_BASEPRI(int);
void enable_irq() { __set_BASEPRI(0x0F); }


x86 assembly (clang, -O0):
<enable_irq>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <__set_BASEPRI@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_irq>:
mov    $0xf,%edi
jmp    1030 <__set_BASEPRI@plt>

LLVM IR (-O0):
define void @enable_irq() {
%1 = call i32 @__set_BASEPRI(i32 15)
ret void
}

LLVM IR (-O2):
define void @enable_irq() {
%1 = tail call i32 @__set_BASEPRI(i32 15)
ret void
}
int Any_differ(const void *_self, const void *b) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Any_differ(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int sign_extend(int value, int bits) {
  if (((value) & (1 << (bits - 1)))) {
    value |= (0xffffffff << bits);
  }
  return value;
}


x86 assembly (clang, -O0):
<sign_extend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1137 <sign_extend+0x37>
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign_extend>:
mov    %esi,%ecx
lea    -0x1(%rcx),%eax
movzbl %al,%edx
mov    $0xffffffff,%esi
shl    %cl,%esi
xor    %eax,%eax
bt     %edx,%edi
cmovb  %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @sign_extend(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 = sub nsw i32 %6, 1
%8 = shl i32 1, %7
%9 = and i32 %5, %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %4
%13 = shl i32 -1, %12
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %2
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @sign_extend(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nuw i32 1, %3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = shl nsw i32 -1, %1
%8 = select i1 %6, i32 0, i32 %7
%9 = or i32 %8, %0
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ get_port(int /*<<< orphan*/, int, int);
uint8_t io_read_interrupt_status(uint8_t port) {
  return get_port(port, 0x0E, 0x0F);
}


x86 assembly (clang, -O0):
<io_read_interrupt_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xe,%esi
mov    $0xf,%edx
call   1030 <get_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_read_interrupt_status>:
mov    $0xe,%esi
mov    $0xf,%edx
jmp    1030 <get_port@plt>

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

LLVM IR (-O2):
define i32 @io_read_interrupt_status(i32 %0) {
%2 = tail call i32 @get_port(i32 %0, i32 14, i32 15)
ret i32 %2
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
void timeval_normalize(struct timeval *tv) {
  while (tv->tv_usec > 1000000) {
    tv->tv_sec++;
    tv->tv_usec -= 1000000;
  }
}


x86 assembly (clang, -O0):
<timeval_normalize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0xf4240,(%rax)
jle    1138 <timeval_normalize+0x38>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    $0xf4240,%ecx
mov    %ecx,(%rax)
jmp    1108 <timeval_normalize+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeval_normalize>:
mov    (%rdi),%eax
cmp    $0xf4241,%eax
jl     1145 <timeval_normalize+0x45>
mov    0x4(%rdi),%ecx
cmp    $0x1e8480,%eax
mov    $0x1e8480,%edx
cmovl  %eax,%edx
neg    %edx
add    %eax,%edx
add    $0xf423f,%edx
imul   $0x431bde83,%rdx,%rdx
shr    $0x32,%rdx
add    %edx,%ecx
add    $0x1,%ecx
imul   $0xfff0bdc0,%edx,%edx
add    %edx,%eax
add    $0xfff0bdc0,%eax
mov    %ecx,0x4(%rdi)
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @timeval_normalize(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
br label %3
3: ; preds = %8, %1
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, 1000000
br i1 %7, label %8, label %17
8: ; preds = %3
%9 = load %struct.timeval*, %struct.timeval** %2
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
%13 = load %struct.timeval*, %struct.timeval** %2
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%15 = load i32, i32* %14
%16 = sub nsw i32 %15, 1000000
store i32 %16, i32* %14
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @timeval_normalize(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 1000000
br i1 %4, label %5, label %17
5: ; preds = %1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%7 = load i32, i32* %6
%8 = add nuw i32 %3, 999999
%9 = call i32 @llvm.smin.i32(i32 %3, i32 2000000)
%10 = sub nuw i32 %8, %9
%11 = udiv i32 %10, 1000000
%12 = add i32 %7, %11
%13 = add i32 %12, 1
%14 = mul nsw i32 %11, -1000000
%15 = add nsw i32 %3, -1000000
%16 = add nsw i32 %14, %15
store i32 %13, i32* %6
store i32 %16, i32* %2
br label %17
17: ; preds = %5, %1
ret void
}
void OBJ_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @OBJ_cmp() {
ret void
}
/* Variables and functions */
scalar_t__ Alea();
double log(scalar_t__);
double Exponentielle(double lambda) {
  double ret;
  ret = -log(1.0 - Alea()) / lambda;
  return ret;
}


x86 assembly (clang, -O0):
<Exponentielle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Alea@plt>
cvtsi2sd %rax,%xmm1
movsd  0xebf(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Exponentielle>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <Alea@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xec3(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
call   1040 <log@plt>
xorpd  0xebd(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Exponentielle(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = call i64 (...) @Alea()
%5 = sitofp i64 %4 to double
%6 = fsub double 1.000000e+00, %5
%7 = fptosi double %6 to i64
%8 = call double @log(i64 %7)
%9 = fneg double %8
%10 = load double, double* %2
%11 = fdiv double %9, %10
store double %11, double* %3
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @Exponentielle(double %0) {
%2 = tail call i64 (...) @Alea()
%3 = sitofp i64 %2 to double
%4 = fsub double 1.000000e+00, %3
%5 = fptosi double %4 to i64
%6 = tail call double @log(i64 %5)
%7 = fneg double %6
%8 = fdiv double %7, %0
ret double %8
}
/* Type definitions */
struct link_util {
  int dummy;
};

/* Variables and functions */
struct link_util *__get_link_kind(char const *, int);
struct link_util *get_link_slave_kind(const char *id) {
  return __get_link_kind(id, true);
}


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

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

LLVM IR (-O0):
%struct.link_util = type { i32 }
define %struct.link_util* @get_link_slave_kind(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.link_util* @__get_link_kind(i8* %3, i32 1)
ret %struct.link_util* %4
}

LLVM IR (-O2):
%struct.link_util = type { i32 }
define %struct.link_util* @get_link_slave_kind(i8* %0) {
%2 = tail call %struct.link_util* @__get_link_kind(i8* %0, i32 1)
ret %struct.link_util* %2
}
/* Variables and functions */
int /*<<< orphan*/ RemoveLeadingWhitespace(char *);
int /*<<< orphan*/ RemoveTrailingWhitespace(char *);
void RemoveWhitespace(char *Text) {
  RemoveLeadingWhitespace(Text);
  RemoveTrailingWhitespace(Text);
}


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

x86 assembly (clang, -O2):
<RemoveWhitespace>:
push   %rbx
mov    %rdi,%rbx
call   1030 <RemoveLeadingWhitespace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <RemoveTrailingWhitespace@plt>

LLVM IR (-O0):
define void @RemoveWhitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @RemoveLeadingWhitespace(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @RemoveTrailingWhitespace(i8* %5)
ret void
}

LLVM IR (-O2):
define void @RemoveWhitespace(i8* %0) {
%2 = tail call i32 @RemoveLeadingWhitespace(i8* %0)
%3 = tail call i32 @RemoveTrailingWhitespace(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nrerror(char *);
float *fvector(long nl, long nh) {
  float *v;
  v = (float *)malloc((size_t)((nh - nl + 1 + 1) * sizeof(float)));
  if (!v)
    nrerror("allocation failure in fvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<fvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <fvector+0x44>
lea    0xea1(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x4,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x8(,%rsi,4),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <fvector+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <nrerror@plt>
shl    $0x2,%r14
sub    %r14,%rbx
add    $0x4,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in fvector()\00"
define float* @fvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca float*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 4
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to float*
store float* %13, float** %5
%14 = load float*, float** %5
%15 = icmp ne float* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load float*, float** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds float, float* %19, i64 %21
%23 = getelementptr inbounds float, float* %22, i64 1
ret float* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in fvector()\00"
define float* @fvector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 2
%5 = add i64 %4, 8
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to float*
%12 = sub i64 0, %0
%13 = getelementptr inbounds float, float* %11, i64 %12
%14 = getelementptr inbounds float, float* %13, i64 1
ret float* %14
}
int count(int **graph, int rows, int cols) { return 0; }


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

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

LLVM IR (-O0):
define i32 @count(i32** %0, i32 %1, i32 %2) {
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @count(i32** nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void exerciseC() {
  int sum = 0;
  int looper = 1;
  printf("\n\nExercise C running....");
  for (; looper <= 15; looper++) {
    sum += looper;
  }
  printf("\nSum of the numbers 1-15: %d", sum);
  printf("\nExercise C complete.");
  return;
}


x86 assembly (clang, -O0):
<exerciseC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xf,-0x8(%rbp)
jg     1155 <exerciseC+0x45>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <exerciseC+0x24>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exerciseC>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x78,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"\0A\0AExercise C running....\00"
@.str.1 = [29 x i8] c"\0ASum of the numbers 1-15: %d\00"
@.str.2 = [22 x i8] c"\0AExercise C complete.\00"
define void @exerciseC() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 15
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, %8
store i32 %10, i32* %1
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"\0A\0AExercise C running....\00"
@.str.1 = [29 x i8] c"\0ASum of the numbers 1-15: %d\00"
@.str.2 = [22 x i8] c"\0AExercise C complete.\00"
define void @exerciseC() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 120)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ptr_list {
  int dummy;
};
struct instruction_list {
  int dummy;
};
struct instruction {
  int dummy;
};

/* Variables and functions */
struct instruction *first_ptr_list(struct ptr_list *);
struct instruction *first_instruction(struct instruction_list *head) {
  return first_ptr_list((struct ptr_list *)head);
}


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

x86 assembly (clang, -O2):
<first_instruction>:
jmp    1030 <first_ptr_list@plt>

LLVM IR (-O0):
%struct.instruction = type { i32 }
%struct.instruction_list = type { i32 }
%struct.ptr_list = type { i32 }
define %struct.instruction* @first_instruction(%struct.instruction_list* %0) {
%2 = alloca %struct.instruction_list*
store %struct.instruction_list* %0, %struct.instruction_list** %2
%3 = load %struct.instruction_list*, %struct.instruction_list** %2
%4 = bitcast %struct.instruction_list* %3 to %struct.ptr_list*
%5 = call %struct.instruction* @first_ptr_list(%struct.ptr_list* %4)
ret %struct.instruction* %5
}

LLVM IR (-O2):
%struct.instruction = type { i32 }
%struct.instruction_list = type { i32 }
%struct.ptr_list = type { i32 }
define %struct.instruction* @first_instruction(%struct.instruction_list* %0) {
%2 = bitcast %struct.instruction_list* %0 to %struct.ptr_list*
%3 = tail call %struct.instruction* @first_ptr_list(%struct.ptr_list* %2)
ret %struct.instruction* %3
}
/* Variables and functions */
int EXIT_SUCCESS;
short multiplication_8bit(int, int);
int /*<<< orphan*/ printf(char *, int, int, short);
int main(void) {
  signed int val1 = -19;
  signed int val2 = -8;
  signed short result = multiplication_8bit(val1, val2);
  printf("%d * %d = %d\n", val1, val2, result);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffed,-0x8(%rbp)
movl   $0xfffffff8,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <multiplication_8bit@plt>
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea7(%rip),%rdi
movswl -0xe(%rbp),%ecx
call   1040 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffed,%edi
mov    $0xfffffff8,%esi
call   1030 <multiplication_8bit@plt>
movswl %ax,%ecx
lea    0xec6(%rip),%rdi
mov    $0xffffffed,%esi
mov    $0xfffffff8,%edx
call   1040 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i16
store i32 0, i32* %1
store i32 -19, i32* %2
store i32 -8, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call signext i16 @multiplication_8bit(i32 %5, i32 %6)
store i16 %7, i16* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i16, i16* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i16 signext %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call signext i16 @multiplication_8bit(i32 -19, i32 -8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 -19, i32 -8, i16 signext %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x;
};
typedef TYPE_1__ XTimeCoord;

/* Variables and functions */
short get_XTimeCoord_x(void *_p) { return (short)((XTimeCoord *)_p)->x; }


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

x86 assembly (clang, -O2):
<get_XTimeCoord_x>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XTimeCoord_x(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XTimeCoord_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
void EZI2C_ScbModePostEnable(void) {}


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

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

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

LLVM IR (-O2):
define void @EZI2C_ScbModePostEnable() {
ret void
}
unsigned int bitwise_not_uint8(unsigned char x) {
  unsigned char y = ~x;
  int z = y;
  return z;
}


x86 assembly (clang, -O0):
<bitwise_not_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitwise_not_uint8>:
not    %dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @bitwise_not_uint8(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = xor i32 %6, -1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @bitwise_not_uint8(i8 zeroext %0) {
%2 = xor i8 %0, -1
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("Usage: ./fibonacci N\n");
  printf("  where N >= 0\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: ./fibonacci N\0A\00"
@.str.1 = [16 x i8] c" where N >= 0\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Usage: ./fibonacci N\00"
@str.2 = [15 x i8] c" where N >= 0\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret void
}
__attribute__((always_)) __attribute__((flatten)) unsigned int
REG_SPI_BASE(unsigned int i) {
  return (0x60000200 - (i * 0x100));
}


x86 assembly (clang, -O0):
<REG_SPI_BASE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
mov    $0x60000200,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<REG_SPI_BASE>:
shl    $0x8,%edi
mov    $0x60000200,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @REG_SPI_BASE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 256
%5 = sub i32 1610613248, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @REG_SPI_BASE(i32 %0) {
%2 = mul i32 %0, -256
%3 = add i32 %2, 1610613248
ret i32 %3
}
int dcomp(const void *px, const void *py) {
  double x = *(double *)px;
  double y = *(double *)py;
  if (x == y)
    return 0;
  return (x < y ? -1 : 1);
}


x86 assembly (clang, -O0):
<dcomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    1148 <dcomp+0x48>
jp     1148 <dcomp+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1166 <dcomp+0x66>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcomp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
setbe  %cl
xor    %eax,%eax
ucomisd %xmm1,%xmm0
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @dcomp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp oeq double %4, %6
%8 = fcmp olt double %4, %6
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
int main() { return L'\0'; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double rt_powd_snf(double, double);
double db2mag(double ydb) { return rt_powd_snf(10.0, ydb / 20.0); }


x86 assembly (clang, -O0):
<db2mag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xede(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
call   1030 <rt_powd_snf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db2mag>:
movapd %xmm0,%xmm1
divsd  0xee4(%rip),%xmm1
movsd  0xee4(%rip),%xmm0
jmp    1030 <rt_powd_snf@plt>

LLVM IR (-O0):
define double @db2mag(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.000000e+01
%5 = call double @rt_powd_snf(double 1.000000e+01, double %4)
ret double %5
}

LLVM IR (-O2):
define double @db2mag(double %0) {
%2 = fdiv double %0, 2.000000e+01
%3 = tail call double @rt_powd_snf(double 1.000000e+01, double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ scanf(char *, char **);
int /*<<< orphan*/ stdout;
int main() {
  char s[100];
  scanf("%[^\n]%*c", &s);
  fprintf(stdout, "Hello, World!\n");
  fprintf(stdout, "%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    -0x70(%rbp),%rdx
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xed2(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x2ea0(%rip),%rbx
mov    (%rbx),%edi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%[^\0A]%*c\00"
@stdout = global i32 0
@.str.1 = [15 x i8] c"Hello, World!\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = bitcast [100 x i8]* %2 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = load i32, i32* @stdout
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%[^\0A]%*c\00"
@stdout = global i32 0
@.str.1 = [15 x i8] c"Hello, World!\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i8**
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = load i32, i32* @stdout
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
void muerte_hijo() { return; }


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

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

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

LLVM IR (-O2):
define void @muerte_hijo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void die(void) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @die() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die() {
%1 = load i32, i32* @EXIT_FAILURE
%2 = tail call i32 @exit(i32 %1)
unreachable
}
void debugfs_hw_add(struct ieee80211_local *local) {}


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

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

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

LLVM IR (-O2):
%struct.ieee80211_local = type opaque
define void @debugfs_hw_add(%struct.ieee80211_local* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
void printFifths(char *a, char *b) {
  char a5 = a[4];
  char b5 = b[4];
  printf("%c and %c", a5, b5);
}


x86 assembly (clang, -O0):
<printFifths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%al
mov    %al,-0x12(%rbp)
mov    -0x11(%rbp),%al
lea    0xec2(%rip),%rdi
movsbl %al,%esi
movsbl -0x12(%rbp),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFifths>:
movsbl 0x4(%rdi),%eax
movsbl 0x4(%rsi),%edx
lea    0xee1(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c and %c\00"
define void @printFifths(i8* %0, i8* %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
%8 = getelementptr inbounds i8, i8* %7, i64 4
%9 = load i8, i8* %8
store i8 %9, i8* %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 4
%12 = load i8, i8* %11
store i8 %12, i8* %6
%13 = load i8, i8* %5
%14 = load i8, i8* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %13, i8 signext %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c and %c\00"
define void @printFifths(i8* nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %1, i64 4
%6 = load i8, i8* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %4, i8 signext %6)
ret void
}