xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myOnUserInfo(char *userInfo, int len) {
  printf("myOnUserInfo %s\n", userInfo);
}


x86 assembly (clang, -O0):
<myOnUserInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myOnUserInfo>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"myOnUserInfo %s\0A\00"
define void @myOnUserInfo(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 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"myOnUserInfo %s\0A\00"
define void @myOnUserInfo(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tokenise(char *);
int main() {
  char *foo =
      "select _col1, col2, colC from test      where city = \"Auckland\" ;";
  tokenise(foo);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"select _col1, col2, colC from test where city = \22Auckland\22 ;\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @tokenise(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"select _col1, col2, colC from test where city = \22Auckland\22 ;\00"
define i32 @main() {
%1 = tail call i32 @tokenise(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_0Fint16_mem(short *val) {
  return ((*val) & (-0x0F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Fint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -15
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(unsigned char);
int is_number(char *num_str) {
  for (; *num_str != '\0'; num_str++) {
    if (!isdigit((unsigned char)*num_str)) {
      return (0);
    }
  }
  return (1);
}


x86 assembly (clang, -O0):
<is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1163 <is_number+0x53>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114d <is_number+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    116a <is_number+0x5a>
jmp    1152 <is_number+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <is_number+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_number>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_number+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <is_number+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_number+0x20>
jmp    114b <is_number+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 zeroext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint8_t clamp_byte255(int32_t n) {
  return n > 255 ? 255 : n;
}


x86 assembly (clang, -O0):
<clamp_byte255>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jle    1121 <clamp_byte255+0x21>
mov    $0xff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <clamp_byte255+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_byte255>:
cmp    $0xff,%edi
mov    $0xff,%eax
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @clamp_byte255(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 255
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i32, i32* %2
br label %8
8: ; preds = %6, %5
%9 = phi i32 [ 255, %5 ], [ %7, %6 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @clamp_byte255(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe2() {
  Assert_real((isodigit(226) == 0),
              "/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/ctype/test_isodigit.c",
              1135, ("isodigit should be 0 for 0xe2"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xe2>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe2,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x46f,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xe2>:
push   %rax
mov    $0xe2,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x46f,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xe2\00"
define void @t_isodigit_0xe2() {
%1 = call i64 @isodigit(i32 226)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1135, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xe2\00"
define void @t_isodigit_0xe2() {
%1 = tail call i64 @isodigit(i32 226)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1135, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dxl_write_word(unsigned char, int, unsigned short);
void setPunch(unsigned char id, unsigned short punch) {
  dxl_write_word(id, (48), punch);
}


x86 assembly (clang, -O0):
<setPunch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    $0x30,%esi
movzbl %al,%edi
movzwl -0x4(%rbp),%edx
call   1030 <dxl_write_word@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPunch>:
mov    %esi,%edx
mov    $0x30,%esi
jmp    1030 <dxl_write_word@plt>

LLVM IR (-O0):
define void @setPunch(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = call i32 @dxl_write_word(i8 zeroext %5, i32 48, i16 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @setPunch(i8 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @dxl_write_word(i8 zeroext %0, i32 48, i16 zeroext %1)
ret void
}
void kopiuj(char tab1[], char *tab2) {
  int i = 0;
  while (tab1[i] != '\0') {
    tab2[i] = tab1[i];
    i++;
  }
  tab2[i] = '\0';
}


x86 assembly (clang, -O0):
<kopiuj>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <kopiuj+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <kopiuj+0x13>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kopiuj>:
mov    (%rdi),%al
test   %al,%al
je     1127 <kopiuj+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsi,%rcx,1)
movzbl 0x1(%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <kopiuj+0x10>
mov    %ecx,%eax
movb   $0x0,(%rsi,%rax,1)
ret
xor    %eax,%eax
movb   $0x0,(%rsi,%rax,1)
ret

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

LLVM IR (-O2):
define void @kopiuj(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %1, i64 %16
store i8 0, i8* %17
ret void
}
/* Variables and functions */
double babl_pow_24(double);
double babl_gamma_2_2_to_linear(double value) {
  if (value > 0.04045)
    return babl_pow_24((value + 0.055) / 1.055);
  return value / 12.92;
}


x86 assembly (clang, -O0):
<babl_gamma_2_2_to_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115c <babl_gamma_2_2_to_linear+0x4c>
movsd  0xedc(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <babl_pow_24@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <babl_gamma_2_2_to_linear+0x62>
movsd  -0x10(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<babl_gamma_2_2_to_linear>:
ucomisd 0xee8(%rip),%xmm0
jbe    112f <babl_gamma_2_2_to_linear+0x1f>
addsd  0xeee(%rip),%xmm0
divsd  0xeee(%rip),%xmm0
jmp    1030 <babl_pow_24@plt>
divsd  0xed1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @babl_gamma_2_2_to_linear(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 4.045000e-02
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fadd double %7, 5.500000e-02
%9 = fdiv double %8, 1.055000e+00
%10 = call double @babl_pow_24(double %9)
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = fdiv double %12, 1.292000e+01
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @babl_gamma_2_2_to_linear(double %0) {
%2 = fcmp ogt double %0, 4.045000e-02
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fadd double %0, 5.500000e-02
%5 = fdiv double %4, 1.055000e+00
%6 = tail call double @babl_pow_24(double %5)
br label %9
7: ; preds = %1
%8 = fdiv double %0, 1.292000e+01
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
void first_Construct(_loc, _Base_Construct) int *_loc, *_Base_Construct;
{ Construct_FIRST_FNC_OBJ(_loc, _Base_Construct); }


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

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

LLVM IR (-O0):
define void @first_Construct(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 (i32*, i32*, ...) bitcast (i32 (...)* @Construct_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @first_Construct(i32* %0, i32* %1) {
%3 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @Construct_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void linkname_from_minor(char *linkname, int minor) {
  sprintf(linkname, "%s/drbd-minor-%d.conf", "/var/run/drbd", minor);
}


x86 assembly (clang, -O0):
<linkname_from_minor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xed3(%rip),%rsi
lea    0xee2(%rip),%rdx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkname_from_minor>:
mov    %esi,%ecx
lea    0xee7(%rip),%rsi
lea    0xef6(%rip),%rdx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"%s/drbd-minor-%d.conf\00"
@.str.1 = [14 x i8] c"/var/run/drbd\00"
define void @linkname_from_minor(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 i32 @sprintf(i8* %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"%s/drbd-minor-%d.conf\00"
@.str.1 = [14 x i8] c"/var/run/drbd\00"
define void @linkname_from_minor(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _s2priv_dropTexture(unsigned int);
void ss2dt(unsigned int texid) { _s2priv_dropTexture(texid); }


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

x86 assembly (clang, -O2):
<ss2dt>:
jmp    1030 <_s2priv_dropTexture@plt>

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

LLVM IR (-O2):
define void @ss2dt(i32 %0) {
%2 = tail call i32 @_s2priv_dropTexture(i32 %0)
ret void
}
float sub7(float f, float g, int i) { return i ? f : g; }


x86 assembly (clang, -O0):
<sub7>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     112a <sub7+0x2a>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1134 <sub7+0x34>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub7>:
test   %edi,%edi
je     1107 <sub7+0x7>
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @sub7(float %0, float %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = select i1 %4, float %1, float %0
ret float %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void U32TO8_LE(unsigned char *m, uint32_t v) {
  m[0] = v;
  m[1] = v >> 8;
  m[2] = v >> 16;
  m[3] = v >> 24;
}


x86 assembly (clang, -O0):
<U32TO8_LE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @U32TO8_LE(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 = trunc i32 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 %16, i8* %18
%19 = load i32, i32* %4
%20 = ashr i32 %19, 24
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

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


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

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

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

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

/* Variables and functions */
int i2c_master_recv(struct i2c_client *, void *, int);
struct i2c_client *to_i2c_client(struct device *);
int ft5x0x_i2c_recv(struct device *dev, void *buf, int len) {
  struct i2c_client *client = to_i2c_client(dev);
  int count = i2c_master_recv(client, buf, len);
  return count < 0 ? count : 0;
}


x86 assembly (clang, -O0):
<ft5x0x_i2c_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <to_i2c_client@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <i2c_master_recv@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1168 <ft5x0x_i2c_recv+0x48>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    1172 <ft5x0x_i2c_recv+0x52>
xor    %eax,%eax
mov    %eax,-0x28(%rbp)
jmp    1172 <ft5x0x_i2c_recv+0x52>
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft5x0x_i2c_recv>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <to_i2c_client@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <i2c_master_recv@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.device = type { i32 }
%struct.i2c_client = type { i32 }
define i32 @ft5x0x_i2c_recv(%struct.device* %0, i8* %1, i32 %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca %struct.i2c_client*
%8 = alloca i32
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%9 = load %struct.device*, %struct.device** %4
%10 = call %struct.i2c_client* @to_i2c_client(%struct.device* %9)
store %struct.i2c_client* %10, %struct.i2c_client** %7
%11 = load %struct.i2c_client*, %struct.i2c_client** %7
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @i2c_master_recv(%struct.i2c_client* %11, i8* %12, i32 %13)
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %3
%18 = load i32, i32* %8
br label %20
19: ; preds = %3
br label %20
20: ; preds = %19, %17
%21 = phi i32 [ %18, %17 ], [ 0, %19 ]
ret i32 %21
}

LLVM IR (-O2):
%struct.device = type { i32 }
%struct.i2c_client = type { i32 }
define i32 @ft5x0x_i2c_recv(%struct.device* %0, i8* %1, i32 %2) {
%4 = tail call %struct.i2c_client* @to_i2c_client(%struct.device* %0)
%5 = tail call i32 @i2c_master_recv(%struct.i2c_client* %4, i8* %1, i32 %2)
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 %5, i32 0
ret i32 %7
}
void gtk_spin_button_get_range() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_get_range() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main() {
  printf("going to sleep for 20 seconds\n");
  fflush(stdout);
  sleep(20);
  printf("finished sleeping\n");
  fprintf(stderr, "error output!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x14,%edi
call   1060 <sleep@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"going to sleep for 20 seconds\0A\00"
@stdout = global i32 0
@.str.1 = [19 x i8] c"finished sleeping\0A\00"
@stderr = global i32 0
@.str.2 = [15 x i8] c"error output!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @sleep(i32 20)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str.2 = [15 x i8] c"error output!\0A\00"
@str = [30 x i8] c"going to sleep for 20 seconds\00"
@str.3 = [18 x i8] c"finished sleeping\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @sleep(i32 20)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void XtIsRectObj() {}


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

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

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

LLVM IR (-O2):
define void @XtIsRectObj() {
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  size_t tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
size_t spx_resource_stats_wall_time(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return ((ts).tv_sec * 1000 * 1000 * 1000 + (ts).tv_nsec);
}


x86 assembly (clang, -O0):
<spx_resource_stats_wall_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
imul   $0x3e8,%eax,%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_resource_stats_wall_time>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x8(%rsp),%eax
3b
cltq
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @spx_resource_stats_wall_time() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = mul nsw i32 %6, 1000
%8 = mul nsw i32 %7, 1000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%11 = load i64, i64* %10
%12 = add i64 %9, %11
ret i64 %12
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @spx_resource_stats_wall_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul i32 %6, 1000000000
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i64, i64* %9
%11 = add i64 %10, %8
ret i64 %11
}
int test_imm_50uint16_reg(unsigned short val) {
  return ((val) & (0x50 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_50uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x50,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_50uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 80
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ roadmap_dialog_get_data_i(char *, char *);
int /*<<< orphan*/ roadmap_screen_refresh();
int /*<<< orphan*/ roadmap_trip_set_focus(char *);
void roadmap_trip_remove_dialog_selected(const char *name, void *data) {
  char *point_name = (char *)roadmap_dialog_get_data_i("Names", ".Waypoints");
  if (point_name != NULL) {
    roadmap_trip_set_focus(point_name);
    roadmap_screen_refresh();
  }
}


x86 assembly (clang, -O0):
<roadmap_trip_remove_dialog_selected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <roadmap_dialog_get_data_i@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1172 <roadmap_trip_remove_dialog_selected+0x42>
mov    -0x18(%rbp),%rdi
call   1030 <roadmap_trip_set_focus@plt>
mov    $0x0,%al
call   1050 <roadmap_screen_refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_trip_remove_dialog_selected>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1040 <roadmap_dialog_get_data_i@plt>
test   %rax,%rax
je     1159 <roadmap_trip_remove_dialog_selected+0x29>
mov    %rax,%rdi
call   1030 <roadmap_trip_set_focus@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <roadmap_screen_refresh@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Names\00"
@.str.1 = [11 x i8] c".Waypoints\00"
define void @roadmap_trip_remove_dialog_selected(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i64 @roadmap_dialog_get_data_i(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = call i32 @roadmap_trip_set_focus(i8* %11)
%13 = call i32 (...) @roadmap_screen_refresh()
br label %14
14: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Names\00"
@.str.1 = [11 x i8] c".Waypoints\00"
define void @roadmap_trip_remove_dialog_selected(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i64 @roadmap_dialog_get_data_i(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = inttoptr i64 %3 to i8*
%7 = tail call i32 @roadmap_trip_set_focus(i8* %6)
%8 = tail call i32 (...) @roadmap_screen_refresh()
br label %9
9: ; preds = %5, %2
ret void
}
int ref(void) {
  union {
    char c[5];
    int i;
  } u;
  __builtin_memset(&u, 0, sizeof(u));
  u.c[0] = 1;
  u.c[1] = 2;
  u.c[2] = 3;
  u.c[3] = 4;
  return u.i;
}


x86 assembly (clang, -O0):
<ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
movb   $0x1,-0x8(%rbp)
movb   $0x2,-0x7(%rbp)
movb   $0x3,-0x6(%rbp)
movb   $0x4,-0x5(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32, [4 x i8] }
define i32 @ref() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i8*
%3 = bitcast %union.anon* %1 to [5 x i8]*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
store i8 1, i8* %4
%5 = bitcast %union.anon* %1 to [5 x i8]*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 1
store i8 2, i8* %6
%7 = bitcast %union.anon* %1 to [5 x i8]*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 2
store i8 3, i8* %8
%9 = bitcast %union.anon* %1 to [5 x i8]*
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 3
store i8 4, i8* %10
%11 = bitcast %union.anon* %1 to i32*
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ref() {
ret i32 67305985
}
/* Type definitions */
struct completion {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wait_for_completion(struct completion *);
int wait_for_completion_killable(struct completion *x) {
  wait_for_completion(x);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.completion = type { i32 }
define i32 @wait_for_completion_killable(%struct.completion* %0) {
%2 = tail call i32 @wait_for_completion(%struct.completion* %0)
ret i32 0
}
/* Variables and functions */
double get_real_sec(int /*<<< orphan*/);
double get_real_secv(void) { return get_real_sec(0); }


x86 assembly (clang, -O0):
<get_real_secv>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <get_real_sec@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_real_secv>:
xor    %edi,%edi
jmp    1030 <get_real_sec@plt>

LLVM IR (-O0):
define double @get_real_secv() {
%1 = call double @get_real_sec(i32 0)
ret double %1
}

LLVM IR (-O2):
define double @get_real_secv() {
%1 = tail call double @get_real_sec(i32 0)
ret double %1
}
int edflib_version(void) { return 113; }


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

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

LLVM IR (-O0):
define i32 @edflib_version() {
ret i32 113
}

LLVM IR (-O2):
define i32 @edflib_version() {
ret i32 113
}
int spawn_process() { return 1; }


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

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

LLVM IR (-O0):
define i32 @spawn_process() {
ret i32 1
}

LLVM IR (-O2):
define i32 @spawn_process() {
ret i32 1
}
int lockon(int *block) {
  while (*block)
    ;
  *block = 1;
  return 0;
}


x86 assembly (clang, -O0):
<lockon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     111a <lockon+0x1a>
jmp    1108 <lockon+0x8>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lockon>:
cmpl   $0x0,(%rdi)
je     1112 <lockon+0x12>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <lockon+0x10>
movl   $0x1,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @lockon(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1, %4
br label %4
5: ; preds = %1
store i32 1, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", 3 % 0);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 poison)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 poison)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  int i;
  printf("argc = %d\n", argc);
  for (i = 0; i < argc; i++)
    puts(argv[i]);
  exit(0);
}


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    -0x8(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1187 <main+0x57>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <main+0x2c>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xec0(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
test   %ebp,%ebp
jle    1162 <main+0x32>
mov    %ebp,%ebp
xor    %ebx,%ebx
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <main+0x20>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"argc = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 0, i32* %6
br label %9
9: ; preds = %20, %2
%10 = load i32, i32* %6
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i8**, i8*** %5
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @puts(i8* %18)
br label %20
20: ; preds = %13
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %9
23: ; preds = %9
%24 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"argc = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %2
%15 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_isdst;
};
typedef int /*<<< orphan*/ nowtm;
typedef int /*<<< orphan*/ nowstr;

/* Variables and functions */
int /*<<< orphan*/ bzero(struct tm *, int);
char *fmt_tm(struct tm *, int, char *);
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
char *fmtctime(time_t now) {
  struct tm nowtm;
  static char nowstr[32];
  bzero(&nowtm, sizeof(nowtm));
  nowtm.tm_isdst = -1;
  localtime_r(&now, &nowtm);
  return (fmt_tm(&nowtm, sizeof(nowstr), nowstr));
}


x86 assembly (clang, -O0):
<fmtctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1050 <bzero@plt>
movl   $0xffffffff,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <localtime_r@plt>
lea    -0x8(%rbp),%rdi
mov    $0x20,%esi
lea    0x2ee3(%rip),%rdx
call   1040 <fmt_tm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmtctime>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <localtime_r@plt>
lea    0x2ef6(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1040 <fmt_tm@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@fmtctime.nowstr = internal global [32 x i8] zeroinitializer
define i8* @fmtctime(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm
store i32 %0, i32* %2
%4 = call i32 @bzero(%struct.tm* %3, i32 4)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 0
store i32 -1, i32* %5
%6 = call i32 @localtime_r(i32* %2, %struct.tm* %3)
%7 = call i8* @fmt_tm(%struct.tm* %3, i32 32, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @fmtctime.nowstr, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@fmtctime.nowstr = internal global [32 x i8] zeroinitializer
define i8* @fmtctime(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm
store i32 %0, i32* %2
%4 = bitcast %struct.tm* %3 to i8*
%5 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
store i32 -1, i32* %5
%6 = call i32 @localtime_r(i32* %2, %struct.tm* %3)
%7 = call i8* @fmt_tm(%struct.tm* %3, i32 32, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @fmtctime.nowstr, i64 0, i64 0))
ret i8* %7
}
/* Variables and functions */
int strcmp(char const *, char const *);
int(strcoll)(const char *src1, const char *src2) { return strcmp(src1, src2); }


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

x86 assembly (clang, -O2):
<strcoll>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strcoll(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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  const char *p = argc ? "correctly spelled" : "not so korectly speled";
  printf("The quick brown fox jumps over the lazy dog\n");
  printf("Ths s n xmple f spllng mstke\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
lea    0xee9(%rip),%rax
lea    0xed0(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x18(%rbp)
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"correctly spelled\00"
@.str.1 = [23 x i8] c"not so korectly speled\00"
@.str.2 = [45 x i8] c"The quick brown fox jumps over the lazy dog\0A\00"
@.str.3 = [30 x i8] c"Ths s n xmple f spllng mstke\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0)
store i8* %9, i8** %5
%10 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [44 x i8] c"The quick brown fox jumps over the lazy dog\00"
@str.4 = [29 x i8] c"Ths s n xmple f spllng mstke\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
void X509V3_EXT_get(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_get() {
ret void
}
/* Variables and functions */
int handleevent();
int /*<<< orphan*/ process_window_closure(int);
void queryevent() {
  int status;
  status = handleevent();
  if (status <= 0)
    process_window_closure(status);
}


x86 assembly (clang, -O0):
<queryevent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <handleevent@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1144 <queryevent+0x24>
mov    -0x4(%rbp),%edi
call   1040 <process_window_closure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<queryevent>:
push   %rax
xor    %eax,%eax
call   1030 <handleevent@plt>
test   %eax,%eax
jle    112e <queryevent+0xe>
pop    %rax
ret
mov    %eax,%edi
pop    %rax
jmp    1040 <process_window_closure@plt>

LLVM IR (-O0):
define void @queryevent() {
%1 = alloca i32
%2 = call i32 (...) @handleevent()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @process_window_closure(i32 %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @queryevent() {
%1 = tail call i32 (...) @handleevent()
%2 = icmp slt i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @process_window_closure(i32 %1)
br label %5
5: ; preds = %3, %0
ret void
}