xunge/DecIR huggingface dataset:
float discretize(float value, float max, int modulo) {
  int t = (int)(value * modulo / max);
  return t * max / modulo;
}


x86 assembly (clang, -O0):
<discretize>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
divss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<discretize>:
cvtsi2ss %edi,%xmm2
mulss  %xmm2,%xmm0
divss  %xmm1,%xmm0
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
mulss  %xmm1,%xmm0
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @discretize(float %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
store float %0, float* %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load float, float* %4
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to float
%11 = fmul float %8, %10
%12 = load float, float* %5
%13 = fdiv float %11, %12
%14 = fptosi float %13 to i32
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = sitofp i32 %15 to float
%17 = load float, float* %5
%18 = fmul float %16, %17
%19 = load i32, i32* %6
%20 = sitofp i32 %19 to float
%21 = fdiv float %18, %20
ret float %21
}

LLVM IR (-O2):
define float @discretize(float %0, float %1, i32 %2) {
%4 = sitofp i32 %2 to float
%5 = fmul float %4, %0
%6 = fdiv float %5, %1
%7 = fptosi float %6 to i32
%8 = sitofp i32 %7 to float
%9 = fmul float %8, %1
%10 = fdiv float %9, %4
ret float %10
}
void DBGFR3AsGetConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @DBGFR3AsGetConfig() {
ret void
}
/* Variables and functions */
int stuff(int);
int hiphip(void (*f)()) { return stuff(2); }


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

x86 assembly (clang, -O2):
<hiphip>:
mov    $0x2,%edi
jmp    1030 <stuff@plt>

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

LLVM IR (-O2):
define i32 @hiphip(void (...)* nocapture readnone %0) {
%2 = tail call i32 @stuff(i32 2)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void com_exit() { exit(0); }


x86 assembly (clang, -O0):
<com_exit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<com_exit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @com_exit() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @com_exit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hterm();
int /*<<< orphan*/ hterms();
void gterm() {
  hterm();
  hterms();
}


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

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

LLVM IR (-O0):
define void @gterm() {
%1 = call i32 (...) @hterm()
%2 = call i32 (...) @hterms()
ret void
}

LLVM IR (-O2):
define void @gterm() {
%1 = tail call i32 (...) @hterm()
%2 = tail call i32 (...) @hterms()
ret void
}
int params__is_list_delim_char(char c) { return (c == ','); }


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

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

LLVM IR (-O0):
define i32 @params__is_list_delim_char(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, 44
%6 = zext i1 %5 to i32
ret i32 %6
}

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

/* Variables and functions */
int rand();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int _iGenerateRandomNumber(int _iMax, int _iPlus) {
  sleep(0x1);
  time_t _tT;
  srand((unsigned)time(&_tT));
  if (_iPlus != 0x1) {
    return rand() % _iMax;
  } else {
    return (rand() % _iMax) + _iPlus;
  }
}


x86 assembly (clang, -O0):
<_iGenerateRandomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    -0x10(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
cmpl   $0x1,-0xc(%rbp)
je     1185 <_iGenerateRandomNumber+0x45>
mov    $0x0,%al
call   1060 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x4(%rbp)
jmp    1196 <_iGenerateRandomNumber+0x56>
mov    $0x0,%al
call   1060 <rand@plt>
cltd
idivl  -0x8(%rbp)
add    -0xc(%rbp),%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_iGenerateRandomNumber>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%r14d
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    0xc(%rsp),%rdi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %ebp,%ebp
cmp    $0x1,%ebx
sete   %bpl
xor    %eax,%eax
call   1060 <rand@plt>
cltd
idiv   %r14d
add    %edx,%ebp
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @_iGenerateRandomNumber(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = call i32 @sleep(i32 1)
%8 = call i64 @time(i32* %6)
%9 = trunc i64 %8 to i32
%10 = call i32 @srand(i32 %9)
%11 = load i32, i32* %5
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = call i32 (...) @rand()
%15 = load i32, i32* %4
%16 = srem i32 %14, %15
store i32 %16, i32* %3
br label %23
17: ; preds = %2
%18 = call i32 (...) @rand()
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
%21 = load i32, i32* %5
%22 = add nsw i32 %20, %21
store i32 %22, i32* %3
br label %23
23: ; preds = %17, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @_iGenerateRandomNumber(i32 %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @sleep(i32 1)
%5 = bitcast i32* %3 to i8*
%6 = call i64 @time(i32* %3)
%7 = trunc i64 %6 to i32
%8 = call i32 @srand(i32 %7)
%9 = icmp eq i32 %1, 1
%10 = call i32 (...) @rand()
%11 = srem i32 %10, %0
%12 = zext i1 %9 to i32
%13 = add nsw i32 %11, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fb_hTimeDecodeSerial(double, int *, int /*<<< orphan*/,
                                        int /*<<< orphan*/, int);
int fb_Hour(double serial) {
  int hour;
  fb_hTimeDecodeSerial(serial, &hour, 0, 0, 1);
  return hour;
}


x86 assembly (clang, -O0):
<fb_Hour>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0xc(%rbp),%rdi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1030 <fb_hTimeDecodeSerial@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_Hour>:
push   %rax
lea    0x4(%rsp),%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <fb_hTimeDecodeSerial@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fb_Hour(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @fb_hTimeDecodeSerial(double %4, i32* %3, i32 0, i32 0, i32 1)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @fb_Hour(double %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fb_hTimeDecodeSerial(double %0, i32* %2, i32 0, i32 0, i32 1)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
scalar_t__ M_PI_2;
float cosf(float);
float sine_in(float step, float max_steps, float max_val) {
  return -max_val * cosf((float)step / max_steps * (float)M_PI_2) + max_val;
}


x86 assembly (clang, -O0):
<sine_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
mov    0x2e99(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1030 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_in>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    0x2ec6(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1030 <cosf@plt>
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI_2 = global i64 0
define float @sine_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = fneg float %7
%9 = load float, float* %4
%10 = load float, float* %5
%11 = fdiv float %9, %10
%12 = load i64, i64* @M_PI_2
%13 = sitofp i64 %12 to float
%14 = fmul float %11, %13
%15 = call float @cosf(float %14)
%16 = load float, float* %6
%17 = call float @llvm.fmuladd.f32(float %8, float %15, float %16)
ret float %17
}

LLVM IR (-O2):
@M_PI_2 = global i64 0
define float @sine_in(float %0, float %1, float %2) {
%4 = fneg float %2
%5 = fdiv float %0, %1
%6 = load i64, i64* @M_PI_2
%7 = sitofp i64 %6 to float
%8 = fmul float %5, %7
%9 = tail call float @cosf(float %8)
%10 = tail call float @llvm.fmuladd.f32(float %4, float %9, float %2)
ret float %10
}
/* Type definitions */
struct v3_str {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ v3_div(struct v3_str *, int /*<<< orphan*/);
int /*<<< orphan*/ v3_mag(struct v3_str *);
void v3_unit(struct v3_str *u) { v3_div(u, v3_mag(u)); }


x86 assembly (clang, -O0):
<v3_unit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <v3_mag@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <v3_div@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3_unit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <v3_mag@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <v3_div@plt>

LLVM IR (-O0):
%struct.v3_str = type { i32 }
define void @v3_unit(%struct.v3_str* %0) {
%2 = alloca %struct.v3_str*
store %struct.v3_str* %0, %struct.v3_str** %2
%3 = load %struct.v3_str*, %struct.v3_str** %2
%4 = load %struct.v3_str*, %struct.v3_str** %2
%5 = call i32 @v3_mag(%struct.v3_str* %4)
%6 = call i32 @v3_div(%struct.v3_str* %3, i32 %5)
ret void
}

LLVM IR (-O2):
%struct.v3_str = type { i32 }
define void @v3_unit(%struct.v3_str* %0) {
%2 = tail call i32 @v3_mag(%struct.v3_str* %0)
%3 = tail call i32 @v3_div(%struct.v3_str* %0, i32 %2)
ret void
}
void mfence() { __sync_synchronize(); }


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

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

LLVM IR (-O0):
define void @mfence() {
fence seq_cst
ret void
}

LLVM IR (-O2):
define void @mfence() {
fence seq_cst
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
void clearScreen() { clear(); }


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

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

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

LLVM IR (-O2):
define void @clearScreen() {
%1 = tail call i32 (...) @clear()
ret void
}
unsigned LZ4IO_readLE32(const void *s) {
  const unsigned char *const srcPtr = (const unsigned char *)s;
  unsigned value32 = srcPtr[0];
  value32 += (unsigned)srcPtr[1] << 8;
  value32 += (unsigned)srcPtr[2] << 16;
  value32 += (unsigned)srcPtr[3] << 24;
  return value32;
}


x86 assembly (clang, -O0):
<LZ4IO_readLE32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x10,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4IO_readLE32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @LZ4IO_readLE32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
store i32 %9, i32* %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i32, i32* %4
%16 = add i32 %15, %14
store i32 %16, i32* %4
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 16
%22 = load i32, i32* %4
%23 = add i32 %22, %21
store i32 %23, i32* %4
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 3
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 24
%29 = load i32, i32* %4
%30 = add i32 %29, %28
store i32 %30, i32* %4
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @LZ4IO_readLE32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void ff_hevc_put_hevc_epel_hv4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv4_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writechar(char);
void writehex(char x) {
  x = (x & 0xf) + '0';
  if (x > '9') {
    x += 'A' - '9' - 1;
  }
  writechar(x);
}


x86 assembly (clang, -O0):
<writehex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jle    1142 <writehex+0x32>
movsbl -0x1(%rbp),%eax
add    $0x7,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <writechar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writehex>:
and    $0xf,%dil
lea    0x30(%rdi),%eax
add    $0x37,%dil
cmp    $0x3a,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovae %ecx,%eax
movzbl %al,%edi
jmp    1030 <writechar@plt>

LLVM IR (-O0):
define void @writehex(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, 15
%6 = add nsw i32 %5, 48
%7 = trunc i32 %6 to i8
store i8 %7, i8* %2
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 7
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %11, %1
%17 = load i8, i8* %2
%18 = call i32 @writechar(i8 signext %17)
ret void
}

LLVM IR (-O2):
define void @writehex(i8 signext %0) {
%2 = and i8 %0, 15
%3 = or i8 %2, 48
%4 = icmp ugt i8 %3, 57
%5 = add nuw nsw i8 %2, 55
%6 = select i1 %4, i8 %5, i8 %3
%7 = tail call i32 @writechar(i8 signext %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void enable_pin(int pn) {
  FILE *outf = fopen("/sys/class/gpio/export", "wb");
  fprintf(outf, "%d", pn);
  fclose(outf);
}


x86 assembly (clang, -O0):
<enable_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xece(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_pin>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xec8(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"%d\00"
define void @enable_pin(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i32, i32* %2
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"%d\00"
define void @enable_pin(i32 %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
typedef int zl;
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
unsigned char *zmalloc(unsigned int);
unsigned char *ziplistNew(void) {
  unsigned int bytes = (sizeof(uint32_t) * 2 + sizeof(uint16_t)) + 1;
  unsigned char *zl = zmalloc(bytes);
  (*((uint32_t *)(zl))) = (bytes);
  (*((uint32_t *)((zl) + sizeof(uint32_t)))) =
      ((sizeof(uint32_t) * 2 + sizeof(uint16_t)));
  (*((uint16_t *)((zl) + sizeof(uint32_t) * 2))) = 0;
  zl[bytes - 1] = 255;
  return zl;
}


x86 assembly (clang, -O0):
<ziplistNew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x11,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <zmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x10,0x4(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movb   $0xff,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ziplistNew>:
push   %rax
mov    $0x11,%edi
call   1030 <zmalloc@plt>
movabs $0x1000000011,%rcx
mov    %rcx,(%rax)
movq   $0x0,0x8(%rax)
movb   $0xff,0x10(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ziplistNew() {
%1 = alloca i32
%2 = alloca i8*
store i32 17, i32* %1
%3 = load i32, i32* %1
%4 = call i8* @zmalloc(i32 %3)
store i8* %4, i8** %2
%5 = load i32, i32* %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 4
%10 = bitcast i8* %9 to i32*
store i32 16, i32* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 8
%13 = bitcast i8* %12 to i64*
store i64 0, i64* %13
%14 = load i8*, i8** %2
%15 = load i32, i32* %1
%16 = sub i32 %15, 1
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
store i8 -1, i8* %18
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @ziplistNew() {
%1 = tail call i8* @zmalloc(i32 17)
%2 = bitcast i8* %1 to i32*
store i32 17, i32* %2
%3 = getelementptr inbounds i8, i8* %1, i64 4
%4 = bitcast i8* %3 to i32*
store i32 16, i32* %4
%5 = getelementptr inbounds i8, i8* %1, i64 8
%6 = bitcast i8* %5 to i64*
store i64 0, i64* %6
%7 = getelementptr inbounds i8, i8* %1, i64 16
store i8 -1, i8* %7
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ normalize4_c(float *, float *);
void normalize4_neon(float v[4], float d[4]) { normalize4_c(v, d); }


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

x86 assembly (clang, -O2):
<normalize4_neon>:
jmp    1030 <normalize4_c@plt>

LLVM IR (-O0):
define void @normalize4_neon(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @normalize4_c(float* %5, float* %6)
ret void
}

LLVM IR (-O2):
define void @normalize4_neon(float* %0, float* %1) {
%3 = tail call i32 @normalize4_c(float* %0, float* %1)
ret void
}
/* Variables and functions */
float powf(float, float);
float ypowf(float x) { return powf(2.34f, x); }


x86 assembly (clang, -O0):
<ypowf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xed6(%rip),%xmm0
call   1030 <powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ypowf>:
movaps %xmm0,%xmm1
movss  0xee5(%rip),%xmm0
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @ypowf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @powf(float 0x4002B851E0000000, float %3)
ret float %4
}

LLVM IR (-O2):
define float @ypowf(float %0) {
%2 = tail call float @powf(float 0x4002B851E0000000, float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ execl(char *, char *, char *, char *, char *);
int fork();
int spawn(char *cmd) {
  int pid;
  pid = fork();
  if (pid == 0) {
    execl("/bin/sh", "sh", "-c", cmd, (char *)NULL);
    _exit(EXIT_FAILURE);
  }
  return pid;
}


x86 assembly (clang, -O0):
<spawn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1181 <spawn+0x51>
mov    -0x8(%rbp),%rcx
lea    0xea5(%rip),%rdi
lea    0xea3(%rip),%rsi
lea    0xe9f(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <execl@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spawn>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1141 <spawn+0x11>
pop    %rbx
ret
lea    0xeb8(%rip),%rdi
lea    0xeb6(%rip),%rsi
lea    0xeb2(%rip),%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1040 <execl@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
@.str.1 = [3 x i8] c"sh\00"
@.str.2 = [3 x i8] c"-c\00"
@EXIT_FAILURE = global i32 0
define i32 @spawn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @fork()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8, i8* null)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @_exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
@.str.1 = [3 x i8] c"sh\00"
@.str.2 = [3 x i8] c"-c\00"
@EXIT_FAILURE = global i32 0
define i32 @spawn(i8* %0) {
%2 = tail call i32 (...) @fork()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* null)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @_exit(i32 %6)
unreachable
8: ; preds = %1
ret i32 %2
}
void ade7854_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @ade7854_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
void fd101(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  a:
    goto a;
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd101>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd101+0x7>

x86 assembly (clang, -O2):
<fd101>:
jmp    1100 <fd101>

LLVM IR (-O0):
define void @fd101(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; preds = %42
br label %42
43: ; No predecessors!
%44 = load i32, i32* %2
%45 = zext i32 %44 to i64
br label %46
46: ; preds = %46, %43
br label %46
47: ; preds = %47
br label %47
}

LLVM IR (-O2):
define void @fd101(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ soundchannels(int);
void basSoundChannels() {
  int n;
  n = popNumber();
  pushNumber(soundchannels(n));
}


x86 assembly (clang, -O0):
<basSoundChannels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <soundchannels@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basSoundChannels>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <soundchannels@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basSoundChannels() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @soundchannels(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basSoundChannels() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @soundchannels(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpneq_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpneq_pd(__m128d __a, __m128d __b) {
  return _mm_cmpneq_pd(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpneq_pd>:
jmp    1030 <_mm_cmpneq_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpneq_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpneq_pd(i32 %0, i32 %1)
ret i32 %3
}
void main() { char pif[8192 * 1024]; }


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

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

LLVM IR (-O0):
define void @main() {
%1 = alloca [8388608 x i8]
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
adrx0indreg1_set(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (((char *)10000000)[x0]) = (*p1); }


x86 assembly (clang, -O0):
<adrx0indreg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%dl
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0indreg1_set>:
mov    (%r9),%al
movslq %edx,%rcx
mov    %al,0x989680(%rcx)
ret

LLVM IR (-O0):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %13
%17 = load i8, i8* %16
%18 = load i32, i32* %10
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %19
store i8 %17, i8* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @adrx0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = load i8, i8* %5
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %8
store i8 %7, i8* %9
ret i32 undef
}
void test123_TestProg_targetInit__I() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gdbstub_send_num_packet(struct gdbstub *, char, int);
void gdbstub_send_errno(struct gdbstub *stub, int errno) {
  gdbstub_send_num_packet(stub, 'E', errno);
}


x86 assembly (clang, -O0):
<gdbstub_send_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x45,%esi
call   1030 <gdbstub_send_num_packet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdbstub_send_errno>:
mov    %esi,%edx
mov    $0x45,%esi
jmp    1030 <gdbstub_send_num_packet@plt>

LLVM IR (-O0):
%struct.gdbstub = type { i32 }
define void @gdbstub_send_errno(%struct.gdbstub* %0, i32 %1) {
%3 = alloca %struct.gdbstub*
%4 = alloca i32
store %struct.gdbstub* %0, %struct.gdbstub** %3
store i32 %1, i32* %4
%5 = load %struct.gdbstub*, %struct.gdbstub** %3
%6 = load i32, i32* %4
%7 = call i32 @gdbstub_send_num_packet(%struct.gdbstub* %5, i8 signext 69, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.gdbstub = type { i32 }
define void @gdbstub_send_errno(%struct.gdbstub* %0, i32 %1) {
%3 = tail call i32 @gdbstub_send_num_packet(%struct.gdbstub* %0, i8 signext 69, i32 %1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_dobldobl_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(254, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xfe,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_container_to_start_system>:
mov    $0xfe,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_container_to_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 254, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 254, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ readmem65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc8(int /*<<< orphan*/);
int /*<<< orphan*/ sindirecty();
void sbcsIndirecty8(void) { sbc8(readmem65816(sindirecty())); }


x86 assembly (clang, -O0):
<sbcsIndirecty8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <sindirecty@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
call   1030 <sbc8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbcsIndirecty8>:
push   %rax
xor    %eax,%eax
call   1040 <sindirecty@plt>
mov    %eax,%edi
call   1050 <readmem65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sbc8@plt>

LLVM IR (-O0):
define void @sbcsIndirecty8() {
%1 = call i32 (...) @sindirecty()
%2 = call i32 @readmem65816(i32 %1)
%3 = call i32 @sbc8(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sbcsIndirecty8() {
%1 = tail call i32 (...) @sindirecty()
%2 = tail call i32 @readmem65816(i32 %1)
%3 = tail call i32 @sbc8(i32 %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
int get_XButtonEvent_y(void *_p) { return (int)((XButtonEvent *)_p)->y; }


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

x86 assembly (clang, -O2):
<get_XButtonEvent_y>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XButtonEvent_y(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 i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XButtonEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int test_imm_D1uint16_mem(unsigned short *val) {
  return ((*val) & (-0xD1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D1uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -209
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_tests();
int /*<<< orphan*/ init_tests();
void reset_tests(void) {
  cleanup_tests();
  init_tests();
}


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

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

LLVM IR (-O0):
define void @reset_tests() {
%1 = call i32 (...) @cleanup_tests()
%2 = call i32 (...) @init_tests()
ret void
}

LLVM IR (-O2):
define void @reset_tests() {
%1 = tail call i32 (...) @cleanup_tests()
%2 = tail call i32 (...) @init_tests()
ret void
}
/* Variables and functions */
int task_flag_asserted(int, int);
int task_exec_asserted(int id) { return task_flag_asserted(id, (1 << 1)); }


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

x86 assembly (clang, -O2):
<task_exec_asserted>:
mov    $0x2,%esi
jmp    1030 <task_flag_asserted@plt>

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

LLVM IR (-O2):
define i32 @task_exec_asserted(i32 %0) {
%2 = tail call i32 @task_flag_asserted(i32 %0, i32 2)
ret i32 %2
}
/* Variables and functions */
char *jsonTopoAddDevice(char *, char *, char *, char *, int /*<<< orphan*/);
char *jsonTopoAddManager(char *mac, char *name, char *type) {
  return (jsonTopoAddDevice("man", mac, name, type, 0));
}


x86 assembly (clang, -O0):
<jsonTopoAddManager>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
xor    %r8d,%r8d
call   1030 <jsonTopoAddDevice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonTopoAddManager>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
xor    %r8d,%r8d
jmp    1030 <jsonTopoAddDevice@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"man\00"
define i8* @jsonTopoAddManager(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @jsonTopoAddDevice(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i32 0)
ret i8* %4
}
char *hash_plugin_summary(void) { return ("o5logon \tOracle TNS O5logon"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"o5logon \09Oracle TNS O5logon\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [28 x i8] c"o5logon \09Oracle TNS O5logon\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int compacta(char *);
int main(int argc, char *argv[]) { return compacta("original.txt"); }


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
call   1030 <compacta@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"original.txt\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 @compacta(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str = [13 x i8] c"original.txt\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @compacta(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
void caller_2_2_1_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_2_1_2_2_1_2() {
ret void
}
const char *get_psy_version(void) {
  static const char *const str = "0"
                                 "."
                                 "85";
  return str;
}


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

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

LLVM IR (-O0):
@get_psy_version.str = internal constant i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
@.str = [5 x i8] c"0.85\00"
define i8* @get_psy_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"0.85\00"
define i8* @get_psy_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int LLONG_MAX;
int multiply_overflowll(long long a, int multiplier) {
  return (LLONG_MAX / multiplier) < a;
}


x86 assembly (clang, -O0):
<multiply_overflowll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
cltd
idivl  -0xc(%rbp)
cltq
cmp    -0x8(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply_overflowll>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
cltd
idiv   %esi
movslq %eax,%rcx
xor    %eax,%eax
cmp    %rdi,%rcx
setl   %al
ret

LLVM IR (-O0):
@LLONG_MAX = global i32 0
define i32 @multiply_overflowll(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* @LLONG_MAX
%6 = load i32, i32* %4
%7 = sdiv i32 %5, %6
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = icmp slt i64 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@LLONG_MAX = global i32 0
define i32 @multiply_overflowll(i64 %0, i32 %1) {
%3 = load i32, i32* @LLONG_MAX
%4 = sdiv i32 %3, %1
%5 = sext i32 %4 to i64
%6 = icmp slt i64 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *program) {
  printf("Usage: %s <STAT 1> <B 1> <SAVES 1> <DAM 1> <TAG 1> <...> <STAT 2> <B "
         "2> <SAVES 2> <DAM 2> <TAG 2> <...>\n",
         program);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [105 x i8] c"Usage: %s <STAT 1> <B 1> <SAVES 1> <DAM 1> <TAG 1> <...> <STAT 2> <B 2> <SAVES 2> <DAM 2> <TAG 2> <...>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [105 x i8] c"Usage: %s <STAT 1> <B 1> <SAVES 1> <DAM 1> <TAG 1> <...> <STAT 2> <B 2> <SAVES 2> <DAM 2> <TAG 2> <...>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ MemCheck_off();
int /*<<< orphan*/ MemCheck_on();
scalar_t__ is_MemCheck_on();
int /*<<< orphan*/ *pop_info();
int CRYPTO_pop_info(void) {
  int ret = 0;
  if (is_MemCheck_on()) {
    MemCheck_off();
    ret = (pop_info() != NULL);
    MemCheck_on();
  }
  return (ret);
}


x86 assembly (clang, -O0):
<CRYPTO_pop_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <is_MemCheck_on@plt>
cmp    $0x0,%rax
je     1184 <CRYPTO_pop_info+0x44>
mov    $0x0,%al
call   1050 <MemCheck_off@plt>
mov    $0x0,%al
call   1030 <pop_info@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <MemCheck_on@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_pop_info>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <is_MemCheck_on@plt>
test   %rax,%rax
je     116c <CRYPTO_pop_info+0x2c>
xor    %eax,%eax
call   1050 <MemCheck_off@plt>
xor    %eax,%eax
call   1030 <pop_info@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
xor    %eax,%eax
call   1060 <MemCheck_on@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CRYPTO_pop_info() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @is_MemCheck_on()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 (...) @MemCheck_off()
%6 = call i32* (...) @pop_info()
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
store i32 %8, i32* %1
%9 = call i32 (...) @MemCheck_on()
br label %10
10: ; preds = %4, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @CRYPTO_pop_info() {
%1 = tail call i64 (...) @is_MemCheck_on()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @MemCheck_off()
%5 = tail call i32* (...) @pop_info()
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = tail call i32 (...) @MemCheck_on()
br label %9
9: ; preds = %3, %0
%10 = phi i32 [ %7, %3 ], [ 0, %0 ]
ret i32 %10
}