xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t smpte_fec_get_mask(const uint8_t *p_fec) {
  return (p_fec[5] << 16) | (p_fec[6] << 8) | p_fec[7];
}


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

x86 assembly (clang, -O2):
<smpte_fec_get_mask>:
mov    0x14(%rdi),%ecx
mov    0x18(%rdi),%eax
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x1c(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @smpte_fec_get_mask(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = shl i32 %3, 16
%5 = getelementptr inbounds i32, i32* %0, i64 6
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 7
%10 = load i32, i32* %9
%11 = or i32 %8, %10
ret i32 %11
}
void controller_init() {}


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

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

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

LLVM IR (-O2):
define void @controller_init() {
ret void
}
int main(int argc, char **pp_argv) {
  (void)pp_argv;
  return argc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 returned %0, i8** nocapture readnone %1) {
ret i32 %0
}
/* Variables and functions */
int identity(char);
char txor0(char x) {
  char y = (identity(x) ^ 0) ? 42 : 43;
  return y;
}


x86 assembly (clang, -O0):
<txor0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <identity@plt>
mov    %eax,%edx
xor    $0x0,%edx
mov    $0x2b,%eax
mov    $0x2a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txor0>:
push   %rax
call   1030 <identity@plt>
test   %eax,%eax
sete   %al
or     $0x2a,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @txor0(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @identity(i8 signext %4)
%6 = xor i32 %5, 0
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 42, i32 43
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
%11 = load i8, i8* %3
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @txor0(i8 signext %0) {
%2 = tail call i32 @identity(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8 43, i8 42
ret i8 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long border_pixmap;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
void set_XSetWindowAttributes_border_pixmap(void *_p, unsigned long _v) {
  ((XSetWindowAttributes *)_p)->border_pixmap = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XSetWindowAttributes_border_pixmap(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void gdk_visual_get_best_with_both() {}


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

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

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

LLVM IR (-O2):
define void @gdk_visual_get_best_with_both() {
ret void
}
int test_imm_2Fint16_reg(short val) {
  return ((val) & (0x2F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_2Fint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 47
%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_2Fint16_reg(i16 signext %0) {
%2 = and i16 %0, 47
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ save_rom(char *, char *);
int main(int argc, char *argv[]) { save_rom("test.log", "rom.bin"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [8 x i8] c"rom.bin\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @save_rom(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"test.log\00"
@.str.1 = [8 x i8] c"rom.bin\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @save_rom(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ WriteINIString(char *, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void WriteINIInt(char *section, char *key, int32_t value, char *filename) {
  char buf[80];
  sprintf(buf, "%i", value);
  WriteINIString(section, key, buf, filename);
}


x86 assembly (clang, -O0):
<WriteINIInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x70(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <WriteINIString@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteINIInt>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r14,%rcx
call   1030 <WriteINIString@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @WriteINIInt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [80 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%11 = load i32, i32* %7
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @WriteINIString(i8* %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @WriteINIInt(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca [80 x i8]
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%8 = call i32 @WriteINIString(i8* %0, i8* %1, i8* %6, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ RFCCpe0IntSelect(int /*<<< orphan*/);
int /*<<< orphan*/ RFCCpeIntClear(int /*<<< orphan*/);
int /*<<< orphan*/ RFCCpeIntEnable(int /*<<< orphan*/);
void RFCCpe0IntSelectClearEnable(uint32_t ui32Mask) {
  RFCCpe0IntSelect(ui32Mask);
  RFCCpeIntClear(ui32Mask);
  RFCCpeIntEnable(ui32Mask);
}


x86 assembly (clang, -O0):
<RFCCpe0IntSelectClearEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <RFCCpe0IntSelect@plt>
mov    -0x4(%rbp),%edi
call   1040 <RFCCpeIntClear@plt>
mov    -0x4(%rbp),%edi
call   1030 <RFCCpeIntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RFCCpe0IntSelectClearEnable>:
push   %rbx
mov    %edi,%ebx
call   1050 <RFCCpe0IntSelect@plt>
mov    %ebx,%edi
call   1040 <RFCCpeIntClear@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <RFCCpeIntEnable@plt>

LLVM IR (-O0):
define void @RFCCpe0IntSelectClearEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @RFCCpe0IntSelect(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @RFCCpeIntClear(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @RFCCpeIntEnable(i32 %7)
ret void
}

LLVM IR (-O2):
define void @RFCCpe0IntSelectClearEnable(i32 %0) {
%2 = tail call i32 @RFCCpe0IntSelect(i32 %0)
%3 = tail call i32 @RFCCpeIntClear(i32 %0)
%4 = tail call i32 @RFCCpeIntEnable(i32 %0)
ret void
}
unsigned int bit_num_ints(int num_bits) {
  unsigned int i;
  i = num_bits / (sizeof(unsigned int) * 8);
  if (num_bits % (sizeof(unsigned int) * 8))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<bit_num_ints>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shr    $0x5,%rax
mov    %eax,-0x8(%rbp)
movslq -0x4(%rbp),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
je     112d <bit_num_ints+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_num_ints>:
mov    %edi,%eax
sar    $0x5,%eax
and    $0x1f,%edi
cmp    $0x1,%edi
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @bit_num_ints(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = udiv i64 %5, 32
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = urem i64 %9, 32
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add i32 %13, 1
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @bit_num_ints(i32 %0) {
%2 = ashr i32 %0, 5
%3 = and i32 %0, 31
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %2, %5
ret i32 %6
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ system(char *);
int main(void) {
  pid_t pid;
  pid = getpid();
  printf("pid = %d\n", pid);
  sleep(60);
  printf("system before.\n");
  system("./system_sub 123 abc xyz");
  sleep(60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x3c,%edi
call   1060 <sleep@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe91(%rip),%rdi
call   1040 <system@plt>
mov    $0x3c,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x3c,%edi
call   1070 <sleep@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xe85(%rip),%rdi
call   1050 <system@plt>
mov    $0x3c,%edi
call   1070 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"pid = %d\0A\00"
@.str.1 = [16 x i8] c"system before.\0A\00"
@.str.2 = [25 x i8] c"./system_sub 123 abc xyz\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getpid()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @sleep(i32 60)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @sleep(i32 60)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"pid = %d\0A\00"
@.str.2 = [25 x i8] c"./system_sub 123 abc xyz\00"
@str = [15 x i8] c"system before.\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @sleep(i32 60)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @sleep(i32 60)
ret i32 0
}
int test_imm_D2int16_reg(short val) {
  return ((val) & (0xD2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D2int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 210
%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_D2int16_reg(i16 signext %0) {
%2 = and i16 %0, 210
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_real_date_ini(char *ini) { write("csv-task.csv", "%s,", ini); }


x86 assembly (clang, -O0):
<function_real_date_ini>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_real_date_ini>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_real_date_ini(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_real_date_ini(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct ts_tdt {
  int dummy;
};

/* Variables and functions */
struct ts_tdt *ts_tdt_init_empty(struct ts_tdt *, int /*<<< orphan*/, int);
struct ts_tdt *ts_tot_init(struct ts_tdt *tot, time_t ts) {
  return ts_tdt_init_empty(tot, ts, 1);
}


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

x86 assembly (clang, -O2):
<ts_tot_init>:
mov    $0x1,%edx
jmp    1030 <ts_tdt_init_empty@plt>

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

LLVM IR (-O2):
%struct.ts_tdt = type { i32 }
define %struct.ts_tdt* @ts_tot_init(%struct.ts_tdt* %0, i32 %1) {
%3 = tail call %struct.ts_tdt* @ts_tdt_init_empty(%struct.ts_tdt* %0, i32 %1, i32 1)
ret %struct.ts_tdt* %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ restore_state_and_exit(int /*<<< orphan*/);
void sig_handler(int signo) { restore_state_and_exit(EXIT_SUCCESS); }


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

x86 assembly (clang, -O2):
<sig_handler>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <restore_state_and_exit@plt>

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @sig_handler(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @restore_state_and_exit(i32 %2)
ret void
}
void dd_pbl_ios_adx_track_event(const char *name, const char *data,
                                const char *currency, const char *custom_data) {
}


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

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

LLVM IR (-O0):
define void @dd_pbl_ios_adx_track_event(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
define void @dd_pbl_ios_adx_track_event(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
int gbphy_runtime_get_sync(struct gbphy_device *gbphy_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.gbphy_device = type opaque
define i32 @gbphy_runtime_get_sync(%struct.gbphy_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int oauth_split_post_paramters(char const *, char ***, int);
int oauth_split_url_parameters(const char *url, char ***argv) {
  return oauth_split_post_paramters(url, argv, 1);
}


x86 assembly (clang, -O0):
<oauth_split_url_parameters>:
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    $0x1,%edx
call   1030 <oauth_split_post_paramters@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oauth_split_url_parameters>:
mov    $0x1,%edx
jmp    1030 <oauth_split_post_paramters@plt>

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

LLVM IR (-O2):
define i32 @oauth_split_url_parameters(i8* %0, i8*** %1) {
%3 = tail call i32 @oauth_split_post_paramters(i8* %0, i8*** %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f(int i) {
  if (i > 4 + 3 * 16)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x34,-0x4(%rbp)
jle    112c <f+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x35,%edi
jge    1116 <f+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 52
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp sgt i32 %0, 52
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void pad(int n) {
  while (n--)
    putchar(' ');
}


x86 assembly (clang, -O0):
<pad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     113e <pad+0x2e>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    111b <pad+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad>:
push   %rbx
test   %edi,%edi
je     112f <pad+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <pad+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @pad(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @putchar(i8 signext 32)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @pad(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i8 signext 32)
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int test_imm_77int32_mem(int *val) {
  return ((*val) & (0x77 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_77int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 119
%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_77int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 119
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gtk_text_buffer_get_line_count() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_get_line_count() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_ISSUER_AND_SERIAL;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_ISSUER_AND_SERIAL_it;
int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a,
                                unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ISSUER_AND_SERIAL_it);
}


x86 assembly (clang, -O0):
<i2d_PKCS7_ISSUER_AND_SERIAL>:
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    0x2eb9(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_PKCS7_ISSUER_AND_SERIAL>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@PKCS7_ISSUER_AND_SERIAL_it = global i32 0
define i32 @i2d_PKCS7_ISSUER_AND_SERIAL(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 @ASN1_item_i2d(i32* %5, i8** %6, i32* @PKCS7_ISSUER_AND_SERIAL_it)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_ISSUER_AND_SERIAL_it = global i32 0
define i32 @i2d_PKCS7_ISSUER_AND_SERIAL(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS7_ISSUER_AND_SERIAL_it)
ret i32 %3
}
float fakesin(float x) {
  x -= 1;
  return (-x * x) + 1;
}


x86 assembly (clang, -O0):
<fakesin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xebe(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fakesin>:
addss  0xef8(%rip),%xmm0
mulss  %xmm0,%xmm0
movss  0xef0(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fakesin(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 1.000000e+00
store float %4, float* %2
%5 = load float, float* %2
%6 = fneg float %5
%7 = load float, float* %2
%8 = call float @llvm.fmuladd.f32(float %6, float %7, float 1.000000e+00)
ret float %8
}

LLVM IR (-O2):
define float @fakesin(float %0) {
%2 = fadd float %0, -1.000000e+00
%3 = fneg float %2
%4 = tail call float @llvm.fmuladd.f32(float %3, float %2, float 1.000000e+00)
ret float %4
}
int main() {
  int a, *b;
  b = &a;
  a = 10;
  printf("a=%d,b=%d\n", a, b);
  printf("&a=%d,&b=%d", &a, &b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x4(%rsp),%rbx
mov    %rbx,0x8(%rsp)
movl   $0xa,0x4(%rsp)
lea    0xed2(%rip),%rdi
mov    $0xa,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x8(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"a=%d,b=%d\0A\00"
@.str.1 = [12 x i8] c"&a=%d,&b=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32* %2, i32** %3
store i32 10, i32* %2
%4 = load i32, i32* %2
%5 = load i32*, i32** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4, i32* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32** %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"a=%d,b=%d\0A\00"
@.str.1 = [12 x i8] c"&a=%d,&b=%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
store i32 10, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10, i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void log_close(void) { closelog(); }


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

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

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

LLVM IR (-O2):
define void @log_close() {
%1 = tail call i32 (...) @closelog()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func1(int i) {
  printf("func1!\n");
  return i;
}


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

x86 assembly (clang, -O2):
<func1>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [7 x i8] c"func1!\00"
define i32 @func1(i32 returned %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 %0
}
/* Variables and functions */
int lp_internal_iconfig(int, char *);
int lp_chn_port(int chn) { return lp_internal_iconfig(chn, "port"); }


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

x86 assembly (clang, -O2):
<lp_chn_port>:
lea    0xee9(%rip),%rsi
jmp    1030 <lp_internal_iconfig@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"port\00"
define i32 @lp_chn_port(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lp_internal_iconfig(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"port\00"
define i32 @lp_chn_port(i32 %0) {
%2 = tail call i32 @lp_internal_iconfig(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
long double test_creall(_Complex long double x) { return __builtin_creall(x); }


x86 assembly (clang, -O0):
<test_creall>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_creall>:
fldt   0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @test_creall({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @test_creall({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %3
}
/* Type definitions */
struct radix_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ radix_longest_prefix(struct radix_tree *, char *, void **);
void *radix_longest_prefix_value(struct radix_tree *t, char *key) {
  void *value = NULL;
  radix_longest_prefix(t, key, &value);
  return value;
}


x86 assembly (clang, -O0):
<radix_longest_prefix_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <radix_longest_prefix@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_longest_prefix_value>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdx
call   1030 <radix_longest_prefix@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.radix_tree = type { i32 }
define i8* @radix_longest_prefix_value(%struct.radix_tree* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @radix_longest_prefix(%struct.radix_tree* %0, i8* %1, i8** %3)
%6 = load i8*, i8** %3
ret i8* %6
}
void UI_get_result_maxsize(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_get_result_maxsize() {
ret void
}
void yy_1_PreParaWs(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_PreParaWs(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_1_PreParaWs(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void deleteEvt(void *my) { free(my); }


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

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

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

LLVM IR (-O2):
define void @deleteEvt(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void swapCharacters(char *a, char *b) {
  char temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

LLVM IR (-O0):
define void @swapCharacters(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swapCharacters(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int xMu(int idx, int x[4]) {
  int tI = idx;
  for (int i = 0; i < 4; i++) {
    x[i] = tI % 16;
    tI /= 16;
  };
  return tI;
}


x86 assembly (clang, -O0):
<xMu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1154 <xMu+0x54>
mov    -0x14(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1118 <xMu+0x18>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xMu>:
lea    0xffff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
lea    0xfff(%rdi),%r8d
test   %edi,%edi
cmovns %edi,%r8d
lea    0xff(%rdi),%edx
test   %edi,%edi
cmovns %edi,%edx
lea    0xf(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x4,%ecx
sar    $0x8,%edx
sar    $0xc,%r8d
movd   %r8d,%xmm0
movd   %edx,%xmm1
punpckldq %xmm0,%xmm1
movd   %ecx,%xmm0
movd   %edi,%xmm2
punpckldq %xmm0,%xmm2
punpcklqdq %xmm1,%xmm2
movdqa %xmm2,%xmm0
psrad  $0x1f,%xmm0
psrld  $0x1c,%xmm0
paddd  %xmm2,%xmm0
pand   0xe94(%rip),%xmm0
psubd  %xmm0,%xmm2
movdqu %xmm2,(%rsi)
sar    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @xMu(i32 %0, i32* nocapture writeonly %1) {
%3 = sdiv i32 %0, 16
%4 = sdiv i32 %0, 256
%5 = sdiv i32 %0, 4096
%6 = insertelement <4 x i32> poison, i32 %0, i64 0
%7 = insertelement <4 x i32> %6, i32 %3, i64 1
%8 = insertelement <4 x i32> %7, i32 %4, i64 2
%9 = insertelement <4 x i32> %8, i32 %5, i64 3
%10 = srem <4 x i32> %9, <i32 16, i32 16, i32 16, i32 16>
%11 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
%12 = sdiv i32 %0, 65536
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ run_dialog(int /*<<< orphan*/);
void load_dialog() { run_dialog(0); }


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

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

LLVM IR (-O0):
define void @load_dialog() {
%1 = call i32 @run_dialog(i32 0)
ret void
}

LLVM IR (-O2):
define void @load_dialog() {
%1 = tail call i32 @run_dialog(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ HAL_DelayMS(int /*<<< orphan*/);
void delay_ms(uint8_t delay) { HAL_DelayMS(delay); }


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

x86 assembly (clang, -O2):
<delay_ms>:
jmp    1030 <HAL_DelayMS@plt>

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

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
%2 = tail call i32 @HAL_DelayMS(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int socket(int, int, int);
int Socket(int family, int type, int protocol) {
  int n;
  if ((n = socket(family, type, protocol)) < 0) {
    perror("socket error");
    exit(1);
  }
  return (n);
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1171 <Socket+0x41>
lea    0xe9e(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rax
call   1050 <socket@plt>
test   %eax,%eax
js     113c <Socket+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @socket(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ foo(int);
int rand();
int main(void) {
  int i;
  float a = 0;
  for (i = 0; i < 1000; i++) {
    a += foo(rand() % 65536);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    117e <main+0x5e>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <foo@plt>
cvtsi2ss %rax,%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <main+0x1e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3e8,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
mov    %eax,%edi
call   1030 <foo@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store i32 0, i32* %2
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 65536
%10 = call i64 @foo(i32 %9)
%11 = sitofp i64 %10 to float
%12 = load float, float* %3
%13 = fadd float %12, %11
store float %13, float* %3
br label %14
14: ; preds = %7
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %4
17: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 65536
%5 = tail call i64 @foo(i32 %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 1000
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Type definitions */
struct page {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ might_sleep();
void *page_address(struct page *);
void *kmap(struct page *page) {
  might_sleep();
  return page_address(page);
}


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

x86 assembly (clang, -O2):
<kmap>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <might_sleep@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <page_address@plt>

LLVM IR (-O0):
%struct.page = type { i32 }
define i8* @kmap(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
%3 = call i32 (...) @might_sleep()
%4 = load %struct.page*, %struct.page** %2
%5 = call i8* @page_address(%struct.page* %4)
ret i8* %5
}

LLVM IR (-O2):
%struct.page = type { i32 }
define i8* @kmap(%struct.page* %0) {
%2 = tail call i32 (...) @might_sleep()
%3 = tail call i8* @page_address(%struct.page* %0)
ret i8* %3
}
int szl_no_cast(struct szl_interp *interp, struct szl_obj *obj) { return 1; }


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

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

LLVM IR (-O0):
%struct.szl_interp = type opaque
%struct.szl_obj = type opaque
define i32 @szl_no_cast(%struct.szl_interp* %0, %struct.szl_obj* %1) {
%3 = alloca %struct.szl_interp*
%4 = alloca %struct.szl_obj*
store %struct.szl_interp* %0, %struct.szl_interp** %3
store %struct.szl_obj* %1, %struct.szl_obj** %4
ret i32 1
}

LLVM IR (-O2):
%struct.szl_interp = type opaque
%struct.szl_obj = type opaque
define i32 @szl_no_cast(%struct.szl_interp* nocapture readnone %0, %struct.szl_obj* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *get_rfc3526_prime_3072(int /*<<< orphan*/ *);
BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn) {
  return get_rfc3526_prime_3072(bn);
}


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

x86 assembly (clang, -O2):
<BN_get_rfc3526_prime_3072>:
jmp    1030 <get_rfc3526_prime_3072@plt>

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

LLVM IR (-O2):
define i32* @BN_get_rfc3526_prime_3072(i32* %0) {
%2 = tail call i32* @get_rfc3526_prime_3072(i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ closelog();
void destroy_sys_log(void) { closelog(); }


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

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

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

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