xunge/DecIR huggingface dataset:
int compare2(double **x, double **y) {
  if (x[0][2] < y[0][2])
    return -1;
  else if (x[0][2] > y[0][2])
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsd  0x10(%rax),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsd  0x10(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    113a <compare2+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <compare2+0x6b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
ucomisd 0x10(%rax),%xmm0
jbe    1164 <compare2+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <compare2+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare2>:
mov    (%rdi),%rax
movsd  0x10(%rax),%xmm0
mov    (%rsi),%rax
movsd  0x10(%rax),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare2(double** %0, double** %1) {
%3 = alloca i32
%4 = alloca double**
%5 = alloca double**
store double** %0, double*** %4
store double** %1, double*** %5
%6 = load double**, double*** %4
%7 = getelementptr inbounds double*, double** %6, i64 0
%8 = load double*, double** %7
%9 = getelementptr inbounds double, double* %8, i64 2
%10 = load double, double* %9
%11 = load double**, double*** %5
%12 = getelementptr inbounds double*, double** %11, i64 0
%13 = load double*, double** %12
%14 = getelementptr inbounds double, double* %13, i64 2
%15 = load double, double* %14
%16 = fcmp olt double %10, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %32
18: ; preds = %2
%19 = load double**, double*** %4
%20 = getelementptr inbounds double*, double** %19, i64 0
%21 = load double*, double** %20
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = load double**, double*** %5
%25 = getelementptr inbounds double*, double** %24, i64 0
%26 = load double*, double** %25
%27 = getelementptr inbounds double, double* %26, i64 2
%28 = load double, double* %27
%29 = fcmp ogt double %23, %28
br i1 %29, label %30, label %31
30: ; preds = %18
store i32 1, i32* %3
br label %32
31: ; preds = %18
store i32 0, i32* %3
br label %32
32: ; preds = %31, %30, %17
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @compare2(double** nocapture %0, double** nocapture %1) {
%3 = load double*, double** %0
%4 = getelementptr inbounds double, double* %3, i64 2
%5 = load double, double* %4
%6 = load double*, double** %1
%7 = getelementptr inbounds double, double* %6, i64 2
%8 = load double, double* %7
%9 = fcmp olt double %5, %8
%10 = fcmp ogt double %5, %8
%11 = zext i1 %10 to i32
%12 = select i1 %9, i32 -1, i32 %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ internal_function_is_not_visible();
int /*<<< orphan*/ printf(char *, int);
void foo1(int x) {
  internal_function_is_not_visible();
  printf("foo@@V1: %d\n", x);
}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <internal_function_is_not_visible@plt>
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <internal_function_is_not_visible@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"foo@@V1: %d\0A\00"
define void @foo1(i32 %0) {
%2 = tail call i32 (...) @internal_function_is_not_visible()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int test_imm_F9int8_reg(signed char val) {
  return ((val) & (-0xF9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F9int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff07,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F9int8_reg>:
test   $0xffffff07,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F9int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -249
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_F9int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -249
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void dsi_wait_pll_hsdiv_dsi_active(void) {}


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

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

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

LLVM IR (-O2):
define void @dsi_wait_pll_hsdiv_dsi_active() {
ret void
}
/* Type definitions */
struct injfile_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct injfile_t *);
void injfile_unload(struct injfile_t *injfile) { free(injfile); }


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

x86 assembly (clang, -O2):
<injfile_unload>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.injfile_t = type { i32 }
define void @injfile_unload(%struct.injfile_t* nocapture %0) {
%2 = tail call i32 @free(%struct.injfile_t* %0)
ret void
}
char *htmlWarnEndPattern() { return "<!-- HGERROR-END -->\n"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"<!-- HGERROR-END -->\0A\00"
define i8* @htmlWarnEndPattern() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"<!-- HGERROR-END -->\0A\00"
define i8* @htmlWarnEndPattern() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
unsigned int if_nametoindex(const char *ifname) {
  __set_errno(ENOSYS);
  return 0;
}


x86 assembly (clang, -O0):
<if_nametoindex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<if_nametoindex>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @if_nametoindex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 0
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @if_nametoindex(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _set_default_sigmask();
int _signal_init(void) {
  _set_default_sigmask();
  return 0;
}


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

x86 assembly (clang, -O2):
<_signal_init>:
push   %rax
xor    %eax,%eax
call   1030 <_set_default_sigmask@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_signal_init() {
%1 = call i32 (...) @_set_default_sigmask()
ret i32 0
}

LLVM IR (-O2):
define i32 @_signal_init() {
%1 = tail call i32 (...) @_set_default_sigmask()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abnormal();
int /*<<< orphan*/ destroy();
int /*<<< orphan*/ normal();
int main(void) {
  normal();
  abnormal();
  destroy();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @normal()
%2 = tail call i32 (...) @abnormal()
%3 = tail call i32 (...) @destroy()
ret i32 0
}
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *s = "Campos verdes";
  char *s_duplicado;
  s_duplicado = duplica_string(s);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <duplica_string@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t read_be_u16(const uint8_t *src) {
  return ((uint16_t)src[1]) | ((uint16_t)src[0] << 8);
}


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

x86 assembly (clang, -O2):
<read_be_u16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read_be_u16(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_be_u16(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 1
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = load i64, i64* %0
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %4
ret i32 %8
}
void knc_trnsp_periodic_check(__attribute__((unused)) void *opaque_ctx) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @knc_trnsp_periodic_check(i8* nocapture %0) {
ret void
}
int fqcmp(const void *p1, const void *p2) {
  double f1 = *((float *)p1), f2 = *((float *)p2);
  return f1 > f2 ? 1 : (f1 < f2 ? -1 : 0);
}


x86 assembly (clang, -O0):
<fqcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    114b <fqcmp+0x4b>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1166 <fqcmp+0x66>
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fqcmp>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fqcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = fcmp olt float %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ put64(unsigned long long);
int /*<<< orphan*/ put8(int);
void mov_rax_memoffs64(unsigned long long *memoffs64) {
  put8(0x48);
  put8(0xA1);
  put64((unsigned long long)memoffs64);
}


x86 assembly (clang, -O0):
<mov_rax_memoffs64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
call   1040 <put64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_rax_memoffs64>:
push   %rbx
mov    %rdi,%rbx
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put64@plt>

LLVM IR (-O0):
define void @mov_rax_memoffs64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 @put8(i32 72)
%4 = call i32 @put8(i32 161)
%5 = load i64*, i64** %2
%6 = ptrtoint i64* %5 to i64
%7 = call i32 @put64(i64 %6)
ret void
}

LLVM IR (-O2):
define void @mov_rax_memoffs64(i64* %0) {
%2 = tail call i32 @put8(i32 72)
%3 = tail call i32 @put8(i32 161)
%4 = ptrtoint i64* %0 to i64
%5 = tail call i32 @put64(i64 %4)
ret void
}
void ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) = 1 << ulSequenceNum;
}


x86 assembly (clang, -O0):
<ADCIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCIntClear>:
mov    %rsi,%rcx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @ADCIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 1, %6
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = add i64 %9, 12
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @ADCIntClear(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
%6 = add i64 %0, 12
%7 = inttoptr i64 %6 to i64*
store volatile i64 %5, i64* %7
ret void
}
/* Type definitions */
typedef int __m128;

/* Variables and functions */
__m128 __attribute__((__always___, __nodebug__))
_mm_div_ps(__m128 a, __m128 b) {
  return a / b;
}


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

x86 assembly (clang, -O2):
<_mm_div_ps>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @_mm_div_ps(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_mm_div_ps(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ std_err(char *);
usage() {
  std_err("Usage: umount special\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: umount special\0A\00"
define i32 @usage() {
%1 = call i32 @std_err(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: umount special\0A\00"
define i32 @usage() {
%1 = tail call i32 @std_err(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int unmailboxZ(int i) { return (i / 144) % 12 - 2; }


x86 assembly (clang, -O0):
<unmailboxZ>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x90,%ecx
cltd
idiv   %ecx
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
sub    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmailboxZ>:
movslq %edi,%rax
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @unmailboxZ(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 144
%5 = srem i32 %4, 12
%6 = sub nsw i32 %5, 2
ret i32 %6
}

LLVM IR (-O2):
define i32 @unmailboxZ(i32 %0) {
%2 = sdiv i32 %0, 144
%3 = srem i32 %2, 12
%4 = add nsw i32 %3, -2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_architecture(void) { printf("ALPHA"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ALPHA\00"
define void @get_architecture() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int is_Unauthorized(char *s) {
  if (strstr(s, "401 Unauthorized") != NULL) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_Unauthorized>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <is_Unauthorized+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_Unauthorized+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_Unauthorized>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"401 Unauthorized\00"
define i32 @is_Unauthorized(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ f(int *);
void h1(unsigned n) {
  int a[n];
  f(a);
}


x86 assembly (clang, -O0):
<h1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
call   1030 <f@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%eax
mov    %rsp,%rdi
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
call   1030 <f@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @h1(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i32, i64 %6
store i64 %6, i64* %4
%9 = call i32 @f(i32* %8)
%10 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @h1(i32 %0) {
%2 = zext i32 %0 to i64
%3 = alloca i32, i64 %2
%4 = call i32 @f(i32* %3)
ret void
}
int is_up_breakable(int maze[25][25], int i, int j) {
  int check = 0;
  if (i == 0) {
    check = 0;
  } else if (maze[i][j] != maze[i - 1][j]) {
    check = 1;
  }
  return check;
}


x86 assembly (clang, -O0):
<is_up_breakable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112b <is_up_breakable+0x2b>
movl   $0x0,-0x14(%rbp)
jmp    116e <is_up_breakable+0x6e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
imul   $0x64,%rdx,%rdx
add    %rdx,%rcx
movslq -0x10(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1169 <is_up_breakable+0x69>
movl   $0x1,-0x14(%rbp)
jmp    116e <is_up_breakable+0x6e>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_up_breakable>:
test   %esi,%esi
je     112a <is_up_breakable+0x2a>
movslq %esi,%rax
movslq %edx,%rcx
imul   $0x64,%rax,%rax
add    %rdi,%rax
mov    (%rax,%rcx,4),%edx
add    $0xffffffff,%esi
movslq %esi,%rax
imul   $0x64,%rax,%rsi
add    %rdi,%rsi
xor    %eax,%eax
cmp    (%rsi,%rcx,4),%edx
setne  %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_up_breakable([25 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [25 x i32]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store [25 x i32]* %0, [25 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 0, i32* %7
br label %32
11: ; preds = %3
%12 = load [25 x i32]*, [25 x i32]** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [25 x i32], [25 x i32]* %12, i64 %14
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [25 x i32], [25 x i32]* %15, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = load [25 x i32]*, [25 x i32]** %4
%21 = load i32, i32* %5
%22 = sub nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [25 x i32], [25 x i32]* %20, i64 %23
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [25 x i32], [25 x i32]* %24, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = icmp ne i32 %19, %28
br i1 %29, label %30, label %31
30: ; preds = %11
store i32 1, i32* %7
br label %31
31: ; preds = %30, %11
br label %32
32: ; preds = %31, %10
%33 = load i32, i32* %7
ret i32 %33
}

LLVM IR (-O2):
define i32 @is_up_breakable([25 x i32]* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds [25 x i32], [25 x i32]* %0, i64 %6, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %1, -1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [25 x i32], [25 x i32]* %0, i64 %11, i64 %7
%13 = load i32, i32* %12
%14 = icmp ne i32 %9, %13
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %5, %3
%17 = phi i32 [ 0, %3 ], [ %15, %5 ]
ret i32 %17
}
/* Variables and functions */
scalar_t__ errno;
int stub1(char const *, char const *);
int rename_handle_error(const char *oldpath, const char *newpath,
                        int (*real_rename)(const char *, const char *),
                        int in_case_of_failure) {
  if (in_case_of_failure == 1)
    return (*real_rename)(oldpath, newpath);
  else {
    errno = 0;
    return -1;
  }
}


x86 assembly (clang, -O0):
<rename_handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    1137 <rename_handle_error+0x37>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
mov    %eax,-0x4(%rbp)
jmp    114c <rename_handle_error+0x4c>
mov    0x2ea2(%rip),%rax
movq   $0x0,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename_handle_error>:
cmp    $0x1,%ecx
jne    1107 <rename_handle_error+0x7>
jmp    *%rdx
mov    0x2ed2(%rip),%rax
movq   $0x0,(%rax)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @rename_handle_error(i8* %0, i8* %1, i32 (i8*, i8*)* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32 (i8*, i8*)*
%9 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 (i8*, i8*)* %2, i32 (i8*, i8*)** %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %4
%13 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %8
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = call i32 %13(i8* %14, i8* %15)
store i32 %16, i32* %5
br label %18
17: ; preds = %4
store i64 0, i64* @errno
store i32 -1, i32* %5
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @rename_handle_error(i8* %0, i8* %1, i32 (i8*, i8*)* nocapture %2, i32 %3) {
%5 = icmp eq i32 %3, 1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 %2(i8* %0, i8* %1)
br label %9
8: ; preds = %4
store i64 0, i64* @errno
br label %9
9: ; preds = %8, %6
%10 = phi i32 [ %7, %6 ], [ -1, %8 ]
ret i32 %10
}
void foo_1_1_1_1_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_1_2_1_2_1_1() {
ret void
}
int ft_nbrmax(int n1, int n2) { return ((n1 > n2) ? n1 : n2); }


x86 assembly (clang, -O0):
<ft_nbrmax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <ft_nbrmax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <ft_nbrmax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_nbrmax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_nbrmax(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @ft_nbrmax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void sync(volatile unsigned int *gpio, int gpio_sync, int gpio_ack) {
  *(gpio + 1) = *(gpio + 1) | (1 << gpio_sync);
  while ((*gpio & (1 << gpio_ack)) == 0)
    ;
  *(gpio + 1) = (*(gpio + 1)) & ~(1 << gpio_sync);
}


x86 assembly (clang, -O0):
<sync>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x14(%rbp),%ecx
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    1150 <sync+0x50>
jmp    112e <sync+0x2e>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    -0x18(%rbp),%ecx
xor    $0xffffffff,%eax
and    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %edx,%ecx
or     %eax,0x4(%rdi)
mov    $0x1,%edx
shl    %cl,%edx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rdi),%ecx
and    %edx,%ecx
je     1120 <sync+0x20>
not    %eax
and    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @sync(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
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load volatile i32, i32* %8
%10 = load i32, i32* %5
%11 = shl i32 1, %10
%12 = or i32 %9, %11
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store volatile i32 %12, i32* %14
br label %15
15: ; preds = %22, %3
%16 = load i32*, i32** %4
%17 = load volatile i32, i32* %16
%18 = load i32, i32* %6
%19 = shl i32 1, %18
%20 = and i32 %17, %19
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %15
br label %15
23: ; preds = %15
%24 = load i32*, i32** %4
%25 = getelementptr inbounds i32, i32* %24, i64 1
%26 = load volatile i32, i32* %25
%27 = load i32, i32* %5
%28 = shl i32 1, %27
%29 = xor i32 %28, -1
%30 = and i32 %26, %29
%31 = load i32*, i32** %4
%32 = getelementptr inbounds i32, i32* %31, i64 1
store volatile i32 %30, i32* %32
ret void
}

LLVM IR (-O2):
define void @sync(i32* %0, i32 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load volatile i32, i32* %4
%6 = shl nuw i32 1, %1
%7 = or i32 %5, %6
store volatile i32 %7, i32* %4
%8 = shl nuw i32 1, %2
br label %9
9: ; preds = %9, %3
%10 = load volatile i32, i32* %0
%11 = and i32 %10, %8
%12 = icmp eq i32 %11, 0
br i1 %12, label %9, label %13
13: ; preds = %9
%14 = load volatile i32, i32* %4
%15 = xor i32 %6, -1
%16 = and i32 %14, %15
store volatile i32 %16, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void midi_write(uint8_t val) {}


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

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

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

LLVM IR (-O2):
define void @midi_write(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xmaprequest;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xmaprequest_display(void *_p, void *_v) {
  ((XEvent *)_p)->xmaprequest.display = (Display *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XEvent_xmaprequest_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xmaprequest_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
double mul(double x1, double x2) { return x1 * x2; }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @mul(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
int ya_random();
unsigned int random_cell(unsigned int p) {
  int r = ya_random() & 0xff;
  if (r < p) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<random_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ya_random@plt>
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1142 <random_cell+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <random_cell+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_cell>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <ya_random@plt>
movzbl %al,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setb   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random_cell(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 (...) @ya_random()
%6 = and i32 %5, 255
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @random_cell(i32 %0) {
%2 = tail call i32 (...) @ya_random()
%3 = and i32 %2, 255
%4 = icmp ult i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main(int argc, const char *argv[]) {
  printf("%c %c\n", '"', '\'');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x22,%esi
mov    $0x27,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 34, i8 signext 39)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rl_ttyset(int);
void rl_deprep_terminal(void) { rl_ttyset(1); }


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

x86 assembly (clang, -O2):
<rl_deprep_terminal>:
mov    $0x1,%edi
jmp    1030 <rl_ttyset@plt>

LLVM IR (-O0):
define void @rl_deprep_terminal() {
%1 = call i32 @rl_ttyset(i32 1)
ret void
}

LLVM IR (-O2):
define void @rl_deprep_terminal() {
%1 = tail call i32 @rl_ttyset(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  extern char *__progname;
  fprintf(stderr, "Usage: ./%s { path to input file }\n", __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: ./%s { path to input file }\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Usage: ./%s { path to input file }\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) { printf("hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast16_t;

/* Variables and functions */
uint_fast16_t lzs_idx_delta_wrap(uint_fast16_t idx1, uint_fast16_t idx2,
                                 uint_fast16_t array_size) {
  if (idx1 < idx2) {
    idx1 += array_size;
  }
  return idx1 - idx2;
}


x86 assembly (clang, -O0):
<lzs_idx_delta_wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112a <lzs_idx_delta_wrap+0x2a>
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzs_idx_delta_wrap>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovl  %rdx,%rax
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @lzs_idx_delta_wrap(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = select i1 %4, i64 %2, i64 0
%6 = sub i64 %0, %1
%7 = add i64 %6, %5
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_libs(void) {
  printf("\n");
  printf("Used libraries:\n");
  printf(" * openssl version 1.0.x is used\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<print_libs>:
push   %rbp
mov    %rsp,%rbp
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_libs>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xed2(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [17 x i8] c"Used libraries:\0A\00"
@.str.2 = [34 x i8] c" * openssl version 1.0.x is used\0A\00"
define void @print_libs() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Used libraries:\00"
@str.3 = [33 x i8] c" * openssl version 1.0.x is used\00"
define void @print_libs() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2cmaster_SetStopBit(int);
void i2c1master_SetStopBit(void) { i2cmaster_SetStopBit(1); }


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

x86 assembly (clang, -O2):
<i2c1master_SetStopBit>:
mov    $0x1,%edi
jmp    1030 <i2cmaster_SetStopBit@plt>

LLVM IR (-O0):
define void @i2c1master_SetStopBit() {
%1 = call i32 @i2cmaster_SetStopBit(i32 1)
ret void
}

LLVM IR (-O2):
define void @i2c1master_SetStopBit() {
%1 = tail call i32 @i2cmaster_SetStopBit(i32 1)
ret void
}
int Calculator(int FirstValue, int SecondValue, char Operator) {
  int result;
  if (Operator == '+') {
    result = FirstValue + SecondValue;
  }
  if (Operator == '-') {
    result = FirstValue - SecondValue;
  }
  return result;
}


x86 assembly (clang, -O0):
<Calculator>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2b,%eax
jne    1125 <Calculator+0x25>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x2d,%eax
jne    113b <Calculator+0x3b>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calculator>:
lea    (%rsi,%rdi,1),%eax
sub    %esi,%edi
cmp    $0x2d,%dl
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @Calculator(i32 %0, i32 %1, i8 signext %2) {
%4 = icmp eq i8 %2, 43
%5 = add nsw i32 %1, %0
%6 = select i1 %4, i32 %5, i32 undef
%7 = icmp eq i8 %2, 45
%8 = sub nsw i32 %0, %1
%9 = select i1 %7, i32 %8, i32 %6
ret i32 %9
}