xunge/DecIR huggingface dataset:
long long stringHashCode(const char *string) {
  long long code = 0ll;
  int x;
  for (x = 0; string[x]; ++x)
    code = (code << 1) ^ string[x];
  return code;
}


x86 assembly (clang, -O0):
<stringHashCode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1153 <stringHashCode+0x53>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbq (%rcx,%rdx,1),%rcx
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <stringHashCode+0x17>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringHashCode>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <stringHashCode+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
add    %rax,%rax
movsbq %cl,%rcx
xor    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <stringHashCode+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @stringHashCode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i64 [ %10, %4 ], [ 0, %1 ]
%8 = shl i64 %7, 1
%9 = sext i8 %6 to i64
%10 = xor i64 %8, %9
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %16
}
float conv_ui2_to_norm_float(unsigned ui2) { return (float)(ui2) / 3.0; }


x86 assembly (clang, -O0):
<conv_ui2_to_norm_float>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_ui2_to_norm_float>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
divss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @conv_ui2_to_norm_float(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = uitofp i32 %3 to float
%5 = fpext float %4 to double
%6 = fdiv double %5, 3.000000e+00
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @conv_ui2_to_norm_float(i32 %0) {
%2 = uitofp i32 %0 to float
%3 = fdiv float %2, 3.000000e+00
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_bit_false(int /*<<< orphan*/ volatile *, int);
int /*<<< orphan*/ set_bit_true(int /*<<< orphan*/ volatile *, int);
void set_led_red(volatile uint8_t *buffer) {
  set_bit_false(buffer, 1);
  set_bit_true(buffer, 3);
  set_bit_true(buffer, 2);
}


x86 assembly (clang, -O0):
<set_led_red>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <set_bit_false@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1040 <set_bit_true@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1040 <set_bit_true@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_led_red>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <set_bit_false@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <set_bit_true@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
pop    %rbx
jmp    1040 <set_bit_true@plt>

LLVM IR (-O0):
define void @set_led_red(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @set_bit_false(i32* %3, i32 1)
%5 = load i32*, i32** %2
%6 = call i32 @set_bit_true(i32* %5, i32 3)
%7 = load i32*, i32** %2
%8 = call i32 @set_bit_true(i32* %7, i32 2)
ret void
}

LLVM IR (-O2):
define void @set_led_red(i32* %0) {
%2 = tail call i32 @set_bit_false(i32* %0, i32 1)
%3 = tail call i32 @set_bit_true(i32* %0, i32 3)
%4 = tail call i32 @set_bit_true(i32* %0, i32 2)
ret void
}
int isspace(int c) {
  if (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
je     1139 <isspace+0x39>
cmpl   $0xa,-0x8(%rbp)
je     1139 <isspace+0x39>
cmpl   $0xb,-0x8(%rbp)
je     1139 <isspace+0x39>
cmpl   $0xc,-0x8(%rbp)
je     1139 <isspace+0x39>
cmpl   $0xd,-0x8(%rbp)
jne    1145 <isspace+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <isspace+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
add    $0xfffffff7,%edi
xor    %eax,%eax
cmp    $0x5,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 5
%4 = zext i1 %3 to i32
ret i32 %4
}
void RTP_set_ssrc(unsigned char *p, int v) {
  p[8] = (unsigned char)((unsigned int)(0xff & v >> 24));
  p[9] = (unsigned char)((unsigned int)(0xff & v >> 16));
  p[10] = (unsigned char)((unsigned int)(0xff & v >> 8));
  p[11] = (unsigned char)(0xff & v);
}


x86 assembly (clang, -O0):
<RTP_set_ssrc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0xa(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0xb(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_set_ssrc>:
bswap  %esi
mov    %esi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @RTP_set_ssrc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = and i32 255, %6
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 8
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = ashr i32 %11, 16
%13 = and i32 255, %12
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 9
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 8
%19 = and i32 255, %18
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 10
store i8 %20, i8* %22
%23 = load i32, i32* %4
%24 = and i32 255, %23
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 11
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @RTP_set_ssrc(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 8
store i8 %4, i8* %5
%6 = lshr i32 %1, 16
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 9
store i8 %7, i8* %8
%9 = lshr i32 %1, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 10
store i8 %10, i8* %11
%12 = trunc i32 %1 to i8
%13 = getelementptr inbounds i8, i8* %0, i64 11
store i8 %12, i8* %13
ret void
}
void foo736(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo736(i32 %0) {
ret void
}
/* Variables and functions */
bool nrf53_errata_83(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf53_errata_83() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf53_errata_83() {
ret i32 0
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ unlock();
int f() {
  if (rand() % 2 == 0) {
    unlock();
  } else {
    f();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115c <f+0x2c>
mov    $0x0,%al
call   1030 <unlock@plt>
jmp    1161 <f+0x31>
call   1040 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
test   $0x1,%al
jne    1130 <f+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <unlock@plt>

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @unlock()
br label %9
7: ; preds = %0
%8 = call i32 @f()
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @rand()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %0
%5 = tail call i32 (...) @unlock()
ret i32 undef
6: ; preds = %0, %6
%7 = tail call i32 (...) @rand()
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %4, label %6
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ umount2(char const *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  const char *target = *++argv;
  umount2(target, 0);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <umount2@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
xor    %esi,%esi
call   1030 <umount2@plt>
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i32 1
store i8** %8, i8*** %5
%9 = load i8*, i8** %8
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @umount2(i8* %10, i32 0)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @umount2(i8* %4, i32 0)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yield(int);
void g() {
  printf("Hi, I'm g!\n");
  yield(1);
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hi, I'm g!\0A\00"
define void @g() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @yield(i32 1)
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Hi, I'm g!\00"
define void @g() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @yield(i32 1)
ret void
}
/* Variables and functions */
int trap_CIN_PlayCinematic(char const *, float, float, float, float, int);
int CG_PlayCinematic(const char *name, float x, float y, float w, float h) {
  return trap_CIN_PlayCinematic(name, x, y, w, h, 2);
}


x86 assembly (clang, -O0):
<CG_PlayCinematic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
mov    $0x2,%esi
call   1030 <trap_CIN_PlayCinematic@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @CG_PlayCinematic(i8* %0, float %1, float %2, float %3, float %4) {
%6 = alloca i8*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i8* %0, i8** %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load i8*, i8** %6
%12 = load float, float* %7
%13 = load float, float* %8
%14 = load float, float* %9
%15 = load float, float* %10
%16 = call i32 @trap_CIN_PlayCinematic(i8* %11, float %12, float %13, float %14, float %15, i32 2)
ret i32 %16
}

LLVM IR (-O2):
define i32 @CG_PlayCinematic(i8* %0, float %1, float %2, float %3, float %4) {
%6 = tail call i32 @trap_CIN_PlayCinematic(i8* %0, float %1, float %2, float %3, float %4, i32 2)
ret i32 %6
}
int FindGeneric(Generic, Device)
char *Generic, *Device;
{
  int status;
  int DevNumber;
  status = ((-64 - 1) & (~0x10000));
  return (status);
}


x86 assembly (clang, -O0):
<FindGeneric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xfffeffbf,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @FindGeneric(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -65601
}
void assertions2ENDSUBJECT() {}


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

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

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

LLVM IR (-O2):
define void @assertions2ENDSUBJECT() {
ret void
}
void g_vasprintf() {}


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

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

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

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

/* Variables and functions */
int pcm_mmap_avail(struct pcm *);
int /*<<< orphan*/ pcm_sync_ptr(struct pcm *, int /*<<< orphan*/);
int pcm_avail_update(struct pcm *pcm) {
  pcm_sync_ptr(pcm, 0);
  return pcm_mmap_avail(pcm);
}


x86 assembly (clang, -O0):
<pcm_avail_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <pcm_sync_ptr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <pcm_mmap_avail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcm_avail_update>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <pcm_sync_ptr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <pcm_mmap_avail@plt>

LLVM IR (-O0):
%struct.pcm = type { i32 }
define i32 @pcm_avail_update(%struct.pcm* %0) {
%2 = alloca %struct.pcm*
store %struct.pcm* %0, %struct.pcm** %2
%3 = load %struct.pcm*, %struct.pcm** %2
%4 = call i32 @pcm_sync_ptr(%struct.pcm* %3, i32 0)
%5 = load %struct.pcm*, %struct.pcm** %2
%6 = call i32 @pcm_mmap_avail(%struct.pcm* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.pcm = type { i32 }
define i32 @pcm_avail_update(%struct.pcm* %0) {
%2 = tail call i32 @pcm_sync_ptr(%struct.pcm* %0, i32 0)
%3 = tail call i32 @pcm_mmap_avail(%struct.pcm* %0)
ret i32 %3
}
void nix(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @nix(i32 %0) {
ret void
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int hcf, a, b;
  printf("Enter the 2 numbers: ");
  scanf("%d%d", &a, &b);
  hcf = gcd(a, b);
  printf("The HCF is: %d\n", hcf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <gcd@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Enter the 2 numbers: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [16 x i8] c"The HCF is: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @gcd(i32 %6, i32 %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter the 2 numbers: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [16 x i8] c"The HCF is: %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @gcd(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}
int test_imm_94uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x94 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_94uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x94,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_94uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 148
%7 = icmp ne i64 %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_94uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 635655159808
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct stat64 {
  int dummy;
};

/* Variables and functions */
int __xstat64(int, char const *, struct stat64 *);
int stat64(const char *path, struct stat64 *buf) {
  return __xstat64(1, path, buf);
}


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

x86 assembly (clang, -O2):
<stat64>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <__xstat64@plt>

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

LLVM IR (-O2):
%struct.stat64 = type { i32 }
define i32 @stat64(i8* %0, %struct.stat64* %1) {
%3 = tail call i32 @__xstat64(i32 1, i8* %0, %struct.stat64* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint8_t uint32_big_encode(uint32_t value, uint8_t *p_encoded_data) {
  ((void)(value));
  ((void)(p_encoded_data));
  return sizeof(uint32_t);
}


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

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

LLVM IR (-O0):
define i32 @uint32_big_encode(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = load i32*, i32** %4
ret i32 8
}

LLVM IR (-O2):
define i32 @uint32_big_encode(i64 %0, i32* nocapture readnone %1) {
ret i32 8
}
int fltLq(const void *f1, const void *f2) {
  return (*((float *)f1) <= *((float *)f2));
  ;
}


x86 assembly (clang, -O0):
<fltLq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltLq>:
movss  (%rsi),%xmm0
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @fltLq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fcmp ole float %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @fltLq(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 ole float %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void RTLogCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_195() {
  Assert_real((isqrt(195) == 13),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              980, ("Integer square root of 195 should be 13"));
}


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

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

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

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 195 should be 13\00"
define void @t_sqrt_195() {
%1 = tail call i32 @isqrt(i32 195)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 980, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void halt_if_failed(const int test_result) {
  if (!test_result) {
    while (1)
      ;
  }
}


x86 assembly (clang, -O0):
<halt_if_failed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111b <halt_if_failed+0x1b>
jmp    1116 <halt_if_failed+0x16>
jmp    1116 <halt_if_failed+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<halt_if_failed>:
test   %edi,%edi
je     1110 <halt_if_failed+0x10>
ret
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <halt_if_failed+0x10>

LLVM IR (-O0):
define void @halt_if_failed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
br label %6
6: ; preds = %5, %6
br label %6
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @halt_if_failed(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret void
}
void RTLockValidatorClassAddPriorClass(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorClassAddPriorClass() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wfi();
void halt(void) { wfi(); }


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

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

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

LLVM IR (-O2):
define void @halt() {
%1 = tail call i32 (...) @wfi()
ret void
}
void label_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @label_finish() {
ret void
}
int char_le(int c1, int c2) { return c1 <= c2; }


x86 assembly (clang, -O0):
<char_le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_le>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

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

LLVM IR (-O2):
define i32 @char_le(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
cbuf14(f, n) int f, n;
{ cbuf(f, n, 14); }


x86 assembly (clang, -O0):
<cbuf14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0xe,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf14>:
mov    $0xe,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf14(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 14)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf14(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 14)
ret i32 undef
}
const char *idea_options(void) {
  if (sizeof(short) != sizeof(unsigned int)) {
    return ("idea(int)");
  } else {
    return ("idea(short)");
  }
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"idea(int)\00"
define i8* @idea_options() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"idea(int)\00"
define i8* @idea_options() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
void ff_hevc_put_hevc_uni_w_qpel_h4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h4_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRIO_USER;
int getpriority(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) { return getpriority(PRIO_USER, 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <getpriority@plt>

LLVM IR (-O0):
@PRIO_USER = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @PRIO_USER
%3 = call i32 @getpriority(i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@PRIO_USER = global i32 0
define i32 @main() {
%1 = load i32, i32* @PRIO_USER
%2 = tail call i32 @getpriority(i32 %1, i32 0)
ret i32 %2
}
void XtTranslateKeycode() {}


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

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

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

LLVM IR (-O2):
define void @XtTranslateKeycode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_i2c_byte(char const);
void drv_Newhaven_sendData(const char *data, const unsigned int len) {
  unsigned int i;
  for (i = 0; i < len; i++) {
    drv_generic_i2c_byte(data[i]);
  }
}


x86 assembly (clang, -O0):
<drv_Newhaven_sendData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1150 <drv_Newhaven_sendData+0x40>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1030 <drv_generic_i2c_byte@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <drv_Newhaven_sendData+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_Newhaven_sendData>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1143 <drv_Newhaven_sendData+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <drv_generic_i2c_byte@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <drv_Newhaven_sendData+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @drv_Newhaven_sendData(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @drv_generic_i2c_byte(i8 signext %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @drv_Newhaven_sendData(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @drv_generic_i2c_byte(i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void error(const char *msg) {
  printf("\n");
  printf("[o] ERROR: %s", msg);
  printf("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [14 x i8] c"[o] ERROR: %s\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"[o] ERROR: %s\00"
define void @error(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ function();
int main() {
  function();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @function()
ret i32 0
}
/* Variables and functions */
scalar_t__ EINTR;
int close(int);
scalar_t__ errno;
int close_all(int fd) {
  while (close(fd) == -1) {
    if (errno != EINTR) {
      return -1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<close_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1157 <close_all+0x47>
mov    0x2ead(%rip),%rax
mov    (%rax),%rax
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
je     1152 <close_all+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <close_all+0x4e>
jmp    111b <close_all+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_all>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec2(%rip),%r14
mov    0x2eb3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    114b <close_all+0x3b>
mov    (%r14),%rax
cmp    (%r15),%rax
je     1130 <close_all+0x20>
mov    $0xffffffff,%eax
jmp    114d <close_all+0x3d>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @close_all(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i32 @close(i32 %0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
br i1 %8, label %2, label %9
9: ; preds = %2, %5
%10 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %10
}
void swap(unsigned char *s, unsigned int i, unsigned int j) {
  unsigned char temp = s[i];
  s[i] = s[j];
  s[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    %esi,%eax
mov    (%rdi,%rax,1),%sil
mov    %edx,%edx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Variables and functions */
char *intToRoman(int);
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char **argv) {
  printf("input%d output:%s \n", 3999, intToRoman(3999));
  ;
  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)
mov    $0xf9f,%edi
call   1030 <intToRoman@plt>
mov    %rax,%rdx
lea    0xeb6(%rip),%rdi
mov    $0xf9f,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"input%d output:%s \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 i8* @intToRoman(i32 3999)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3999, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"input%d output:%s \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @intToRoman(i32 3999)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 3999, i8* %3)
ret i32 0
}
void _dasm_error_file_invalid() { int i; }


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

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

LLVM IR (-O0):
define void @_dasm_error_file_invalid() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @_dasm_error_file_invalid() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cng_current_color_index(int);
int /*<<< orphan*/ cng_get_mouse_x();
int /*<<< orphan*/ cng_get_mouse_y();
int /*<<< orphan*/ cng_put_pixel(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ cng_refresh_window();
int mon_depla() {
  cng_current_color_index(1);
  cng_put_pixel(cng_get_mouse_x(), cng_get_mouse_y());
  cng_refresh_window();
}


x86 assembly (clang, -O0):
<mon_depla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <cng_current_color_index@plt>
mov    $0x0,%al
call   1070 <cng_get_mouse_x@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <cng_get_mouse_y@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1030 <cng_put_pixel@plt>
mov    $0x0,%al
call   1060 <cng_refresh_window@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_depla>:
push   %rbx
mov    $0x1,%edi
call   1040 <cng_current_color_index@plt>
xor    %eax,%eax
call   1070 <cng_get_mouse_x@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <cng_get_mouse_y@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <cng_put_pixel@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <cng_refresh_window@plt>

LLVM IR (-O0):
define i32 @mon_depla() {
%1 = alloca i32
%2 = call i32 @cng_current_color_index(i32 1)
%3 = call i32 (...) @cng_get_mouse_x()
%4 = call i32 (...) @cng_get_mouse_y()
%5 = call i32 @cng_put_pixel(i32 %3, i32 %4)
%6 = call i32 (...) @cng_refresh_window()
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @mon_depla() {
%1 = tail call i32 @cng_current_color_index(i32 1)
%2 = tail call i32 (...) @cng_get_mouse_x()
%3 = tail call i32 (...) @cng_get_mouse_y()
%4 = tail call i32 @cng_put_pixel(i32 %2, i32 %3)
%5 = tail call i32 (...) @cng_refresh_window()
ret i32 undef
}
int test6() {
  return ({ 5; });
}


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

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

LLVM IR (-O0):
define i32 @test6() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @test6() {
ret i32 5
}
void gtk_im_context_simple_add_table() {}


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

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

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

LLVM IR (-O2):
define void @gtk_im_context_simple_add_table() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ put_prog_name();
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void default_warn_handler(const char *message) {
  put_prog_name();
  fprintf(stderr, "%s", message);
  putc('\n', stderr);
}


x86 assembly (clang, -O0):
<default_warn_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <put_prog_name@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_warn_handler>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <put_prog_name@plt>
mov    0x2e9b(%rip),%r14
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdx
call   1050 <fprintf@plt>
mov    (%r14),%esi
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <putc@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @default_warn_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @put_prog_name()
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @stderr
%8 = call i32 @putc(i8 signext 10, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @default_warn_handler(i8* %0) {
%2 = tail call i32 (...) @put_prog_name()
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 @putc(i8 signext 10, i32 %5)
ret void
}
int test_imm_FBuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xFB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FBuint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xfb,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FBuint64_lowword_reg>:
test   $0xfb,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FBuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 251
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}