xunge/DecIR huggingface dataset:
/* Variables and functions */
int _InterlockedExchange(int volatile *, int);
int test_InterlockedExchange(int volatile *value, int mask) {
  return _InterlockedExchange(value, mask);
}


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

x86 assembly (clang, -O2):
<test_InterlockedExchange>:
jmp    1030 <_InterlockedExchange@plt>

LLVM IR (-O0):
define i32 @test_InterlockedExchange(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 @_InterlockedExchange(i32* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_InterlockedExchange(i32* %0, i32 %1) {
%3 = tail call i32 @_InterlockedExchange(i32* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
char *mdp_format_extended_markdown(char const *, int /*<<< orphan*/, int);
char *mdp_format_markdown(char const *markdown, int format) {
  return mdp_format_extended_markdown(markdown, 0, format);
}


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

x86 assembly (clang, -O2):
<mdp_format_markdown>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <mdp_format_extended_markdown@plt>

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

LLVM IR (-O2):
define i8* @mdp_format_markdown(i8* %0, i32 %1) {
%3 = tail call i8* @mdp_format_extended_markdown(i8* %0, i32 0, i32 %1)
ret i8* %3
}
void set_proc_limits(void) {}


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

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

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

LLVM IR (-O2):
define void @set_proc_limits() {
ret void
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char str[16];
  double d;
  printf("str: ");
  scanf("%s", str);
  d = atof(str);
  printf("d = %lf\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe92(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
lea    0xea5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"str: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [9 x i8] c"d = %lf\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call double @atof(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, float *, int);
int /*<<< orphan*/ *packer_uint32_pack(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
uint8_t *packer_float_pack(uint8_t *buffer, float value) {
  uint32_t v;
  memcpy(&v, &value, 4);
  return packer_uint32_pack(buffer, v);
}


x86 assembly (clang, -O0):
<packer_float_pack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <packer_uint32_pack@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packer_float_pack>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  %xmm0,0xc(%rsp)
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <packer_uint32_pack@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32* @packer_float_pack(i32* %0, float %1) {
%3 = alloca i32*
%4 = alloca float
%5 = alloca i32
store i32* %0, i32** %3
store float %1, float* %4
%6 = call i32 @memcpy(i32* %5, float* %4, i32 4)
%7 = load i32*, i32** %3
%8 = load i32, i32* %5
%9 = call i32* @packer_uint32_pack(i32* %7, i32 %8)
ret i32* %9
}

LLVM IR (-O2):
define i32* @packer_float_pack(i32* %0, float %1) {
%3 = alloca float
%4 = alloca i32
store float %1, float* %3
%5 = bitcast i32* %4 to i8*
%6 = call i32 @memcpy(i32* %4, float* %3, i32 4)
%7 = load i32, i32* %4
%8 = call i32* @packer_uint32_pack(i32* %0, i32 %7)
ret i32* %8
}
int LINES() { return 25; }


x86 assembly (clang, -O0):
<LINES>:
push   %rbp
mov    %rsp,%rbp
mov    $0x19,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @LINES() {
ret i32 25
}

LLVM IR (-O2):
define i32 @LINES() {
ret i32 25
}
int get_bit(const unsigned char *a, unsigned int pos) {
  unsigned int ofs;
  ofs = pos >> 3;
  pos = ~pos & 7;
  return (a[ofs] >> pos) & 1;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
mov    %esi,%eax
shr    $0x3,%rax
movzbl (%rdi,%rax,1),%eax
not    %cl
and    $0x7,%cl
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = lshr i32 %6, 3
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = xor i32 %8, -1
%10 = and i32 %9, 7
store i32 %10, i32* %4
%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 = zext i8 %15 to i32
%17 = load i32, i32* %4
%18 = ashr i32 %16, %17
%19 = and i32 %18, 1
ret i32 %19
}

LLVM IR (-O2):
define i32 @get_bit(i8* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = and i32 %1, 7
%5 = xor i32 %4, 7
%6 = zext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = lshr i32 %9, %5
%11 = and i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SetDrawProcedure48(void *);
void setdrawprocedure(void *th) { SetDrawProcedure48(th); }


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

x86 assembly (clang, -O2):
<setdrawprocedure>:
jmp    1030 <SetDrawProcedure48@plt>

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

LLVM IR (-O2):
define void @setdrawprocedure(i8* %0) {
%2 = tail call i32 @SetDrawProcedure48(i8* %0)
ret void
}
/* Variables and functions */
int fmax(int, int);
fmin(int m, int n) { return m * n / fmax(m, n); }


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <fmax@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
push   %rbx
mov    %esi,%ebx
imul   %edi,%ebx
call   1030 <fmax@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fmin(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 = mul nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @fmax(i32 %8, i32 %9)
%11 = sdiv i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @fmin(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @fmax(i32 %0, i32 %1)
%5 = sdiv i32 %3, %4
ret i32 %5
}
int ft_len_word(char const *s, char c) {
  int i;
  int len;
  i = 0;
  len = 0;
  while (s[i] != '\0' && s[i] != c) {
    i++;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_len_word>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     114e <ft_len_word+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    115e <ft_len_word+0x5e>
jmp    1175 <ft_len_word+0x75>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <ft_len_word+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_len_word>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <ft_len_word+0x22>
cmp    %sil,%cl
je     1122 <ft_len_word+0x22>
xor    %eax,%eax
nop
movzbl 0x1(%rdi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1122 <ft_len_word+0x22>
cmp    %sil,%cl
jne    1110 <ft_len_word+0x10>
ret

LLVM IR (-O0):
define i32 @ft_len_word(i8* %0, i8 signext %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 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %7
%16 = load i8*, i8** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %21, %23
br label %25
25: ; preds = %15, %7
%26 = phi i1 [ false, %7 ], [ %24, %15 ]
br i1 %26, label %27, label %32
27: ; preds = %25
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %7
32: ; preds = %25
%33 = load i32, i32* %6
ret i32 %33
}

LLVM IR (-O2):
define i32 @ft_len_word(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
%5 = icmp eq i8 %3, %1
%6 = or i1 %4, %5
br i1 %6, label %17, label %7
7: ; preds = %2, %7
%8 = phi i64 [ %9, %7 ], [ 0, %2 ]
%9 = add nuw nsw i64 %8, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
%13 = icmp eq i8 %11, %1
%14 = or i1 %12, %13
br i1 %14, label %15, label %7
15: ; preds = %7
%16 = trunc i64 %9 to i32
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 0, %2 ], [ %16, %15 ]
ret i32 %18
}
char *i2a(unsigned i, char *a, unsigned r) {
  if (i / r > 0) {
    a = i2a(i / r, a, r);
  }
  *a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i % r];
  return a + 1;
}


x86 assembly (clang, -O0):
<i2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x14(%rbp)
cmp    $0x0,%eax
jbe    114d <i2a+0x3d>
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x14(%rbp)
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <i2a@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x14(%rbp)
mov    %edx,%eax
mov    %eax,%ecx
lea    0xea0(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2a>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %edi,%ebp
cmp    %edi,%edx
ja     112d <i2a+0x1d>
mov    %ebp,%eax
xor    %edx,%edx
div    %ebx
mov    %eax,%edi
mov    %ebx,%edx
call   1030 <i2a@plt>
mov    %rax,%rsi
mov    %ebp,%eax
xor    %edx,%edx
div    %ebx
lea    0xec6(%rip),%rax
mov    (%rdx,%rax,1),%al
mov    %al,(%rsi)
add    $0x1,%rsi
mov    %rsi,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
define i8* @i2a(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = udiv i32 %7, %8
%10 = icmp ugt i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %3
%12 = load i32, i32* %4
%13 = load i32, i32* %6
%14 = udiv i32 %12, %13
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = call i8* @i2a(i32 %14, i8* %15, i32 %16)
store i8* %17, i8** %5
br label %18
18: ; preds = %11, %3
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = urem i32 %19, %20
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds [37 x i8], [37 x i8]* @.str, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = load i8*, i8** %5
store i8 %24, i8* %25
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 1
ret i8* %27
}

LLVM IR (-O2):
@.str = [37 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
define i8* @i2a(i32 %0, i8* %1, i32 %2) {
%4 = icmp ugt i32 %2, %0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = udiv i32 %0, %2
%7 = tail call i8* @i2a(i32 %6, i8* %1, i32 %2)
br label %8
8: ; preds = %5, %3
%9 = phi i8* [ %7, %5 ], [ %1, %3 ]
%10 = urem i32 %0, %2
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [37 x i8], [37 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
store i8 %13, i8* %9
%14 = getelementptr inbounds i8, i8* %9, i64 1
ret i8* %14
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int width;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xconfigurerequest_width(void *_p, int _v) {
  ((XEvent *)_p)->xconfigurerequest.width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xconfigurerequest_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xconfigurerequest_width(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xconfigurerequest_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char const *, int /*<<< orphan*/);
void printtime(FILE *stream, const char *format, time_t time) {
  char buf[100];
  strftime(buf, 100, format, localtime(&time));
  fprintf(stream, "%s", buf);
}


x86 assembly (clang, -O0):
<printtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rdx
mov    %eax,%ecx
mov    $0x64,%esi
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0xe72(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printtime>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %edx,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1050 <strftime@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <fputs@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printtime(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [100 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @localtime(i32* %6)
%11 = call i32 @strftime(i8* %8, i32 100, i8* %9, i32 %10)
%12 = load i32*, i32** %4
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%14 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
define void @printtime(i32* nocapture %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca [100 x i8]
store i32 %2, i32* %4
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = call i32 @localtime(i32* %4)
%8 = call i32 @strftime(i8* %6, i32 100, i8* %1, i32 %7)
%9 = call i32 @fputs(i8* %6, i32* %0)
ret void
}
void gtk_entry_get_max_length() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_get_max_length() {
ret void
}
int should_match(int single_quotes, int double_quotes, int multiline_comments) {
  return !(single_quotes || double_quotes || multiline_comments);
}


x86 assembly (clang, -O0):
<should_match>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <should_match+0x35>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <should_match+0x35>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_match>:
or     %esi,%edi
xor    %eax,%eax
or     %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @should_match(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %12, %9, %3
%16 = phi i1 [ true, %9 ], [ true, %3 ], [ %14, %12 ]
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @should_match(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %1, %0
%5 = or i32 %4, %2
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void _set_abrt(unsigned char *u) { u[1] |= (1 << 0); }


x86 assembly (clang, -O0):
<_set_abrt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
or     $0x1,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_set_abrt>:
orb    $0x1,0x1(%rdi)
ret

LLVM IR (-O0):
define void @_set_abrt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = or i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %4
ret void
}

LLVM IR (-O2):
define void @_set_abrt(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = or i8 %3, 1
store i8 %4, i8* %2
ret void
}
unsigned char answer_1(int arg0) {
  unsigned int output = (1 << arg0);
  return output;
}


x86 assembly (clang, -O0):
<answer_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer_1>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define zeroext i8 @answer_1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = shl i32 1, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @answer_1(i32 %0) {
%2 = shl nuw i32 1, %0
%3 = trunc i32 %2 to i8
ret i8 %3
}
int test_imm_0Fint64_midword_reg(long long val) {
  return ((val >> 16) & (0x0F << 0)) ? -20 : -40;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @executeNOP() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ configure2();
main() { configure2(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @configure2()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
char *chomp(char *str) {
  if (*str && str[strlen(str) - 1] == '\n')
    str[strlen(str) - 1] = 0;
  return str;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1177 <chomp+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1177 <chomp+0x67>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1139 <chomp+0x29>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1139 <chomp+0x29>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @chomp(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, -1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %11, %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void JUNK_JUNK_() { printf("and _\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"and _\00"
define void @JUNK_JUNK_() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
int rl_copy_forward_word(count, key)
int count, key;
{
  if (count < 0)
    return (rl_copy_backward_word(-count, key));
  return (_rl_copy_word_as_kill(count, 1));
}


x86 assembly (clang, -O0):
<rl_copy_forward_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114f <rl_copy_forward_word+0x2f>
xor    %edi,%edi
sub    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <rl_copy_backward_word@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <rl_copy_forward_word+0x41>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <_rl_copy_word_as_kill@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_copy_forward_word>:
test   %edi,%edi
js     1130 <rl_copy_forward_word+0x10>
mov    $0x1,%esi
xor    %eax,%eax
jmp    1040 <_rl_copy_word_as_kill@plt>
neg    %edi
xor    %eax,%eax
jmp    1030 <rl_copy_backward_word@plt>

LLVM IR (-O0):
define i32 @rl_copy_forward_word(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 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sub nsw i32 0, %9
%11 = load i32, i32* %5
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_copy_backward_word to i32 (i32, i32, ...)*)(i32 %10, i32 %11)
store i32 %12, i32* %3
br label %16
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 (i32, i32, ...) bitcast (i32 (...)* @_rl_copy_word_as_kill to i32 (i32, i32, ...)*)(i32 %14, i32 1)
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @rl_copy_forward_word(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = sub nsw i32 0, %0
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @rl_copy_backward_word to i32 (i32, i32, ...)*)(i32 %5, i32 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @_rl_copy_word_as_kill to i32 (i32, i32, ...)*)(i32 %0, i32 1)
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ %8, %7 ]
ret i32 %10
}
void ff_hevc_put_hevc_qpel_v48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v48_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_warnIfReached();
void invariably_infinite_loop() {
  int i = 0;
  while (1) {
    ++i;
  }
  clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<invariably_infinite_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
jmp    110b <invariably_infinite_loop+0xb>

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

LLVM IR (-O0):
define void @invariably_infinite_loop() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
br label %2
}

LLVM IR (-O2):
define void @invariably_infinite_loop() {
br label %1
1: ; preds = %1, %0
br label %1
}
int native_runtime_validator(void *addr, struct http_request *req,
                             const void *data) {
  int (*cb)(struct http_request *, const void *);
  *(void **)&(cb) = addr;
  return (cb(req, data));
}


x86 assembly (clang, -O0):
<native_runtime_validator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_runtime_validator>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    *%rax

LLVM IR (-O0):
%struct.http_request = type opaque
define i32 @native_runtime_validator(i8* %0, %struct.http_request* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.http_request*
%6 = alloca i8*
%7 = alloca i32 (%struct.http_request*, i8*)*
store i8* %0, i8** %4
store %struct.http_request* %1, %struct.http_request** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i32 (%struct.http_request*, i8*)** %7 to i8**
store i8* %8, i8** %9
%10 = load i32 (%struct.http_request*, i8*)*, i32 (%struct.http_request*, i8*)** %7
%11 = load %struct.http_request*, %struct.http_request** %5
%12 = load i8*, i8** %6
%13 = call i32 %10(%struct.http_request* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.http_request = type opaque
define i32 @native_runtime_validator(i8* nocapture %0, %struct.http_request* %1, i8* %2) {
%4 = bitcast i8* %0 to i32 (%struct.http_request*, i8*)*
%5 = tail call i32 %4(%struct.http_request* %1, i8* %2)
ret i32 %5
}
/* Variables and functions */
int PalindromeThreeDigitProduct();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Largest 3 digit Palindrome is %d", PalindromeThreeDigitProduct());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <PalindromeThreeDigitProduct@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"Largest 3 digit Palindrome is %d\00"
define i32 @main() {
%1 = call i32 (...) @PalindromeThreeDigitProduct()
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Largest 3 digit Palindrome is %d\00"
define i32 @main() {
%1 = tail call i32 (...) @PalindromeThreeDigitProduct()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int redislite_get_4bytes(const unsigned char *p) {
  return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
}


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

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

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

LLVM IR (-O2):
define i32 @redislite_get_4bytes(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
__attribute__((visibility("default"))) void *sd_login_monitor_unref(void *m) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_login_monitor_unref(i8* nocapture readnone %0) {
ret i8* null
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_uint64_t(uint64_t const k1, uint64_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_uint64_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint64_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_uint64_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long hash(const char *key) {
  unsigned long hash = 5381;
  char c;
  while ((c = *key++) != '\0')
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114d <hash+0x4d>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movsbq -0x11(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int sck_sendf(int, char *, char const *);
int irc_quit(int s, const char *data) {
  return sck_sendf(s, "QUIT :%s\r\n", data);
}


x86 assembly (clang, -O0):
<irc_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <sck_sendf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_quit>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <sck_sendf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"QUIT :%s\0D\0A\00"
define i32 @irc_quit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @sck_sendf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"QUIT :%s\0D\0A\00"
define i32 @irc_quit(i32 %0, i8* %1) {
%3 = tail call i32 @sck_sendf(i32 %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
/* Type definitions */
struct mdea_array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_null_node_get_array(void *p, struct mdea_array **array, char **error) {
  mdea_error(error, "Expected array, got null");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_null_node_get_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_null_node_get_array>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdea_array = type { i32 }
@.str = [25 x i8] c"Expected array, got null\00"
define i32 @mdea_null_node_get_array(i8* %0, %struct.mdea_array** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca %struct.mdea_array**
%6 = alloca i8**
store i8* %0, i8** %4
store %struct.mdea_array** %1, %struct.mdea_array*** %5
store i8** %2, i8*** %6
%7 = load i8**, i8*** %6
%8 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.mdea_array = type { i32 }
@.str = [25 x i8] c"Expected array, got null\00"
define i32 @mdea_null_node_get_array(i8* nocapture readnone %0, %struct.mdea_array** nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ console_print(char *);
int init_module() {
  console_print("Hello, world - this is the kernel speaking\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<init_module>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <console_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Hello, world - this is the kernel speaking\0A\00"
define i32 @init_module() {
%1 = call i32 @console_print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Hello, world - this is the kernel speaking\0A\00"
define i32 @init_module() {
%1 = tail call i32 @console_print(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int tuner_select(void *, unsigned int, unsigned int);
int bbm_com_tuner_select(void *handle, unsigned int product,
                         unsigned int band) {
  int res = 0;
  res = tuner_select(handle, product, band);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_tuner_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <tuner_select@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_tuner_select>:
jmp    1030 <tuner_select@plt>

LLVM IR (-O0):
define i32 @bbm_com_tuner_select(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @tuner_select(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @bbm_com_tuner_select(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @tuner_select(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ report(char *, int);
void test_cpuid_consistency(int pcid_enabled, int invpcid_enabled) {
  int passed = !(!pcid_enabled && invpcid_enabled);
  report("CPUID consistency", passed);
}


x86 assembly (clang, -O0):
<test_cpuid_consistency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1137 <test_cpuid_consistency+0x27>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cpuid_consistency>:
test   %edi,%edi
setne  %al
test   %esi,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%esi
lea    0xeda(%rip),%rdi
jmp    1030 <report@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"CPUID consistency\00"
define void @test_cpuid_consistency(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ false, %2 ], [ %10, %8 ]
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = call i32 @report(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"CPUID consistency\00"
define void @test_cpuid_consistency(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @report(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
void msg1() {
  printf("I am in function %s\n", __func__);
  msg0();
}


x86 assembly (clang, -O0):
<msg1>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <msg0@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <msg0@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"I am in function %s\0A\00"
@__func__.msg1 = [5 x i8] c"msg1\00"
define void @msg1() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.msg1, i64 0, i64 0))
%2 = call i32 (...) @msg0()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"I am in function %s\0A\00"
@__func__.msg1 = [5 x i8] c"msg1\00"
define void @msg1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.msg1, i64 0, i64 0))
%2 = tail call i32 (...) @msg0()
ret void
}