xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ send(int, void *, size_t, int /*<<< orphan*/);
ssize_t mywrite_swift_tcmalloc(int fd, void *buf, size_t len) {
  return send(fd, buf, len, 0);
}


x86 assembly (clang, -O0):
<mywrite_swift_tcmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mywrite_swift_tcmalloc>:
xor    %ecx,%ecx
jmp    1030 <send@plt>

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

LLVM IR (-O2):
define i32 @mywrite_swift_tcmalloc(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
int pwc_read(unsigned short offset, unsigned int *data) { return 0; }


x86 assembly (clang, -O0):
<pwc_read>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pwc_read(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @pwc_read(i16 zeroext %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t ChipInfo_GetDeviceIdHwRevCode(void) {
  return ((*((volatile unsigned long *)(0x50001000 + 0x00000318))) >> 28);
}


x86 assembly (clang, -O0):
<ChipInfo_GetDeviceIdHwRevCode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50001318,%eax
mov    (%rax),%rax
shr    $0x1c,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChipInfo_GetDeviceIdHwRevCode>:
mov    0x50001318,%rax
50
shr    $0x1c,%rax
ret

LLVM IR (-O0):
define i64 @ChipInfo_GetDeviceIdHwRevCode() {
%1 = load volatile i64, i64* inttoptr (i64 1342182168 to i64*)
%2 = lshr i64 %1, 28
ret i64 %2
}

LLVM IR (-O2):
define i64 @ChipInfo_GetDeviceIdHwRevCode() {
%1 = load volatile i64, i64* inttoptr (i64 1342182168 to i64*)
%2 = lshr i64 %1, 28
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Memory_wrapped_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<Memory_wrapped_free>:
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):
<Memory_wrapped_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @Memory_wrapped_free(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 @Memory_wrapped_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;
struct superblock_bookkeeping {
  int dummy;
};

/* Variables and functions */
struct superblock_bookkeeping *obj2bkeep(void *ptr) {
  uint64_t addr = (uint64_t)ptr;
  addr &= (~(4096 - 1));
  return (struct superblock_bookkeeping *)addr;
}


x86 assembly (clang, -O0):
<obj2bkeep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfffff000,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<obj2bkeep>:
movslq %edi,%rax
and    $0xfffffffffffff000,%rax
ret

LLVM IR (-O0):
%struct.superblock_bookkeeping = type { i32 }
define %struct.superblock_bookkeeping* @obj2bkeep(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, -4096
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to %struct.superblock_bookkeeping*
ret %struct.superblock_bookkeeping* %10
}

LLVM IR (-O2):
%struct.superblock_bookkeeping = type { i32 }
define %struct.superblock_bookkeeping* @obj2bkeep(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = shl i64 %2, 32
%4 = ashr exact i64 %3, 32
%5 = and i64 %4, -4096
%6 = inttoptr i64 %5 to %struct.superblock_bookkeeping*
ret %struct.superblock_bookkeeping* %6
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void adc_reg32_imm32(unsigned long reg32, unsigned long imm32) {
  put8(0x81);
  put8(0xD0 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<adc_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
add    $0xd0,%rax
mov    %eax,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_reg32_imm32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xd0,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @adc_reg32_imm32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 129)
%6 = load i64, i64* %3
%7 = add i64 208, %6
%8 = trunc i64 %7 to i32
%9 = call i32 @put8(i32 %8)
%10 = load i64, i64* %4
%11 = call i32 @put32(i64 %10)
ret void
}

LLVM IR (-O2):
define void @adc_reg32_imm32(i64 %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = trunc i64 %0 to i32
%5 = add i32 %4, 208
%6 = tail call i32 @put8(i32 %5)
%7 = tail call i32 @put32(i64 %1)
ret void
}
void uncharge_dcache(struct user_beancounter *ub, unsigned long size) {}


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

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

LLVM IR (-O0):
%struct.user_beancounter = type opaque
define void @uncharge_dcache(%struct.user_beancounter* %0, i64 %1) {
%3 = alloca %struct.user_beancounter*
%4 = alloca i64
store %struct.user_beancounter* %0, %struct.user_beancounter** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
%struct.user_beancounter = type opaque
define void @uncharge_dcache(%struct.user_beancounter* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
char *alloca(int);
int main() {
  char *c = alloca(23);
  (void)c;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x17,%edi
call   1030 <alloca@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8* @alloca(i32 23)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f17(int, int, int);
void g17(void) { f17(41, 42, 43); }


x86 assembly (clang, -O0):
<g17>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
mov    $0x2a,%esi
mov    $0x2b,%edx
call   1030 <f17@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g17>:
mov    $0x29,%edi
mov    $0x2a,%esi
mov    $0x2b,%edx
jmp    1030 <f17@plt>

LLVM IR (-O0):
define void @g17() {
%1 = call i32 @f17(i32 41, i32 42, i32 43)
ret void
}

LLVM IR (-O2):
define void @g17() {
%1 = tail call i32 @f17(i32 41, i32 42, i32 43)
ret void
}
/* Variables and functions */
short EVM5515_I2C_write(int, unsigned char *, int);
short AIC3204_rset(unsigned short regnum, unsigned short regval) {
  unsigned char cmd[2];
  cmd[0] = regnum & 0x007F;
  cmd[1] = regval;
  return EVM5515_I2C_write(0x18, cmd, 2);
}


x86 assembly (clang, -O0):
<AIC3204_rset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x7f,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %al,-0x5(%rbp)
lea    -0x6(%rbp),%rsi
mov    $0x18,%edi
mov    $0x2,%edx
call   1030 <EVM5515_I2C_write@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AIC3204_rset>:
push   %rax
and    $0x7f,%dil
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x18,%edi
mov    $0x2,%edx
call   1030 <EVM5515_I2C_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @AIC3204_rset(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca [2 x i8]
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = and i32 %7, 127
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i16, i16* %4
%12 = trunc i16 %11 to i8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %12, i8* %13
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%15 = call signext i16 @EVM5515_I2C_write(i32 24, i8* %14, i32 2)
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @AIC3204_rset(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i16 %0 to i8
%6 = and i8 %5, 127
store i8 %6, i8* %4
%7 = trunc i16 %1 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call signext i16 @EVM5515_I2C_write(i32 24, i8* %4, i32 2)
ret i16 %9
}
void TestC() {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<TestC>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <TestC+0x9>
jmp    1109 <TestC+0x9>

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

LLVM IR (-O0):
define void @TestC() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @TestC() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ do_work();
int main(int argc, char **argv) { do_work(); }


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

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

LLVM IR (-O0):
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 (...) @do_work()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_work()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void cmp_reg32_imm32(int reg32, unsigned long imm32) {
  put8(0x81);
  put8(0xF8 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<cmp_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xf8,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_reg32_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xf8,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @cmp_reg32_imm32(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = call i32 @put8(i32 129)
%6 = load i32, i32* %3
%7 = add nsw i32 248, %6
%8 = call i32 @put8(i32 %7)
%9 = load i64, i64* %4
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @cmp_reg32_imm32(i32 %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = add nsw i32 %0, 248
%5 = tail call i32 @put8(i32 %4)
%6 = tail call i32 @put32(i64 %1)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
int main() {
  long nc;
  nc = 0;
  while (getchar() != EOF)
    ++nc;
  printf("%ld\n", nc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %7, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
br label %3
10: ; preds = %3
%11 = load i64, i64* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
void foo037() {}


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

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

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

LLVM IR (-O2):
define void @foo037() {
ret void
}
/* Variables and functions */
char *duplica_string(char *);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *s = malloc(sizeof(char) * sizeof("Campos verdes"));
  char *s_duplicado;
  s = "Campos verdes";
  s_duplicado = duplica_string(s);
  printf("%s\n", s_duplicado);
  free(s);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xe,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9c(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <duplica_string@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
mov    %r14,%rdi
call   1050 <duplica_string@plt>
mov    %rax,%rbx
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @malloc(i32 14)
store i8* %4, i8** %2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @duplica_string(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @duplica_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned int f1(unsigned int x, unsigned int y) {
  unsigned int r = x + y;
  if (r > y)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    113a <f1+0x2a>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %edi,%ebx
add    %esi,%ebx
cmp    %esi,%ebx
jbe    1120 <f1+0x10>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp ugt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = icmp ugt i32 %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
long xatoll_sfx(char const *, struct suffix_mult const *);
long xatol_sfx(const char *str, const struct suffix_mult *sfx) {
  return xatoll_sfx(str, sfx);
}


x86 assembly (clang, -O0):
<xatol_sfx>:
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 <xatoll_sfx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatol_sfx>:
jmp    1030 <xatoll_sfx@plt>

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

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i64 @xatol_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = tail call i64 @xatoll_sfx(i8* %0, %struct.suffix_mult* %1)
ret i64 %3
}
/* Type definitions */
struct element {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ get_last(struct element *);
int /*<<< orphan*/ list_remove(int /*<<< orphan*/);
void list_removelast(struct element *list) {
  if (list == NULL)
    return;
  list_remove(get_last(list));
}


x86 assembly (clang, -O0):
<list_removelast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <list_removelast+0x1c>
jmp    114c <list_removelast+0x2c>
mov    -0x8(%rbp),%rdi
call   1030 <get_last@plt>
mov    %eax,%edi
call   1040 <list_remove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_removelast>:
test   %rdi,%rdi
je     1133 <list_removelast+0x13>
push   %rax
call   1030 <get_last@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <list_remove@plt>
ret

LLVM IR (-O0):
%struct.element = type { i32 }
define void @list_removelast(%struct.element* %0) {
%2 = alloca %struct.element*
store %struct.element* %0, %struct.element** %2
%3 = load %struct.element*, %struct.element** %2
%4 = icmp eq %struct.element* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load %struct.element*, %struct.element** %2
%8 = call i32 @get_last(%struct.element* %7)
%9 = call i32 @list_remove(i32 %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.element = type { i32 }
define void @list_removelast(%struct.element* %0) {
%2 = icmp eq %struct.element* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @get_last(%struct.element* %0)
%5 = tail call i32 @list_remove(i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(char *);
void foo(void) {
  for (;;)
    bar("");
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <foo+0x9>
lea    0xee0(%rip),%rdi
call   1030 <bar@plt>
jmp    1119 <foo+0x9>

x86 assembly (clang, -O2):
<foo>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <bar@plt>
jmp    1120 <foo+0x10>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @foo() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @bar(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @foo() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @bar(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((unused)) __m128 local_add_ps(__m128 in1, __m128 in2) {
  return _mm_add_ps(in1, in2);
}


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

x86 assembly (clang, -O2):
<local_add_ps>:
jmp    1030 <_mm_add_ps@plt>

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

LLVM IR (-O2):
define i32 @local_add_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_ps(i32 %0, i32 %1)
ret i32 %3
}
int isEmptyQueue(int begin, int end) { return (begin == -1 && end == -1); }


x86 assembly (clang, -O0):
<isEmptyQueue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <isEmptyQueue+0x23>
cmpl   $0xffffffff,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmptyQueue>:
and    %esi,%edi
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isEmptyQueue(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 = icmp eq i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isEmptyQueue(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void __attribute__((visibility("hidden"))) main_hidden(void) {}


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

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

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

LLVM IR (-O2):
define hidden void @main_hidden() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ redraw_lists();
int /*<<< orphan*/ reload_lists();
void update_views(int reload) {
  if (reload)
    reload_lists();
  else
    redraw_lists();
}


x86 assembly (clang, -O0):
<update_views>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1141 <update_views+0x21>
mov    $0x0,%al
call   1030 <reload_lists@plt>
jmp    1148 <update_views+0x28>
mov    $0x0,%al
call   1040 <redraw_lists@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_views>:
xor    %eax,%eax
test   %edi,%edi
je     112b <update_views+0xb>
jmp    1030 <reload_lists@plt>
jmp    1040 <redraw_lists@plt>

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

LLVM IR (-O2):
define void @update_views(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @reload_lists()
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @redraw_lists()
br label %7
7: ; preds = %5, %3
ret void
}
unsigned _hash(const char *text) {
  unsigned rv = 5381;
  while (*text) {
    rv = 33 * rv + *text;
    ++text;
  }
  return rv % 1009;
}


x86 assembly (clang, -O0):
<_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <_hash+0x3d>
imul   $0x21,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <_hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x3f1,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1148 <_hash+0x48>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <_hash+0x10>
mov    %eax,%ecx
imul   $0x3ce4585,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x9,%edx
imul   $0x3f1,%edx,%ecx
sub    %ecx,%eax
ret
mov    $0x150,%eax
ret

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

LLVM IR (-O2):
define i32 @_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 33
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 1009
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 336, %1 ], [ %15, %14 ]
ret i32 %17
}
void cellgen_idle_stop() {}


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

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

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

LLVM IR (-O2):
define void @cellgen_idle_stop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flush_buffer();
int os_char_width(char);
int /*<<< orphan*/ screen_char(char);
int units_left();
void pad_status_line(int column) {
  int spaces;
  flush_buffer();
  spaces = units_left() / os_char_width(' ') - column;
  while (spaces--)
    screen_char(' ');
}


x86 assembly (clang, -O0):
<pad_status_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <flush_buffer@plt>
mov    $0x0,%al
call   1030 <units_left@plt>
mov    %eax,-0xc(%rbp)
mov    $0x20,%edi
call   1050 <os_char_width@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1197 <pad_status_line+0x57>
mov    $0x20,%edi
call   1040 <screen_char@plt>
jmp    1174 <pad_status_line+0x34>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad_status_line>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1060 <flush_buffer@plt>
xor    %eax,%eax
call   1030 <units_left@plt>
mov    %eax,%ebp
mov    $0x20,%edi
call   1050 <os_char_width@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
cmp    %ebx,%eax
je     117e <pad_status_line+0x3e>
sub    %eax,%ebx
nopl   0x0(%rax)
mov    $0x20,%edi
call   1040 <screen_char@plt>
inc    %ebx
jne    1170 <pad_status_line+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @pad_status_line(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @flush_buffer()
%5 = call i32 (...) @units_left()
%6 = call i32 @os_char_width(i8 signext 32)
%7 = sdiv i32 %5, %6
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %3
br label %10
10: ; preds = %14, %1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, -1
store i32 %12, i32* %3
%13 = icmp ne i32 %11, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @screen_char(i8 signext 32)
br label %10
16: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @pad_status_line(i32 %0) {
%2 = tail call i32 (...) @flush_buffer()
%3 = tail call i32 (...) @units_left()
%4 = tail call i32 @os_char_width(i8 signext 32)
%5 = sdiv i32 %3, %4
%6 = sub nsw i32 %5, %0
%7 = icmp eq i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %8
%9 = phi i32 [ %10, %8 ], [ %6, %1 ]
%10 = add nsw i32 %9, -1
%11 = tail call i32 @screen_char(i8 signext 32)
%12 = icmp eq i32 %10, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %1
ret void
}
int test_imm_25uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x25 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_25uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 37
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void str_copy(char *dest, char *src, int maxlength) {
  strncpy(dest, src, maxlength);
  dest[maxlength - 1] = '\0';
}


x86 assembly (clang, -O0):
<str_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_copy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @str_copy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @str_copy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = add nsw i32 %2, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret void
}
void foo_2_1_2_2_2_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_2_2_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("%d\n", sizeof(unsigned long));
  printf("%d\n", sizeof(unsigned long *));
  printf("%d\n", sizeof(void *));
  { printf("__x86_64__\n"); }
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@str = [11 x i8] c"__x86_64__\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @zpci_iov_remove_virtfn(%struct.pci_dev* nocapture %0, i32 %1) {
ret void
}
void print_state(const unsigned char *state) {}


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

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

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

LLVM IR (-O2):
define void @print_state(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct entry_list {
  int dummy;
};
struct entry {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_back(struct genlist const *);
struct entry *entry_list_back(const struct entry_list *tthis) {
  return (struct entry *)genlist_back((const struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<entry_list_back>:
jmp    1030 <genlist_back@plt>

LLVM IR (-O0):
%struct.entry = type { i32 }
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.entry* @entry_list_back(%struct.entry_list* %0) {
%2 = alloca %struct.entry_list*
store %struct.entry_list* %0, %struct.entry_list** %2
%3 = load %struct.entry_list*, %struct.entry_list** %2
%4 = bitcast %struct.entry_list* %3 to %struct.genlist*
%5 = call i64 @genlist_back(%struct.genlist* %4)
%6 = inttoptr i64 %5 to %struct.entry*
ret %struct.entry* %6
}

LLVM IR (-O2):
%struct.entry = type { i32 }
%struct.entry_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.entry* @entry_list_back(%struct.entry_list* %0) {
%2 = bitcast %struct.entry_list* %0 to %struct.genlist*
%3 = tail call i64 @genlist_back(%struct.genlist* %2)
%4 = inttoptr i64 %3 to %struct.entry*
ret %struct.entry* %4
}
void fd237(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  a:
    goto a;
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


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

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

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

LLVM IR (-O2):
define void @fd237(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void RTTimeDbgRaces(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeDbgRaces() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snoopy_string_append(char *, char *, int);
void snoopy_message_append(char *logMessage, char *appendThis) {
  snoopy_string_append(logMessage, appendThis, 16383);
}


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

x86 assembly (clang, -O2):
<snoopy_message_append>:
mov    $0x3fff,%edx
jmp    1030 <snoopy_string_append@plt>

LLVM IR (-O0):
define void @snoopy_message_append(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 @snoopy_string_append(i8* %5, i8* %6, i32 16383)
ret void
}

LLVM IR (-O2):
define void @snoopy_message_append(i8* %0, i8* %1) {
%3 = tail call i32 @snoopy_string_append(i8* %0, i8* %1, i32 16383)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ omp_get_thread_num();
int main(int argc, char *argv[]) {
  int a = 2;
#pragma omp parallel if (a > 50)
  {
    if (omp_get_thread_num() != 0) {
      abort();
    }
  }
  return 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)
movl   $0x2,-0x14(%rbp)
mov    $0x0,%al
call   1040 <omp_get_thread_num@plt>
cmp    $0x0,%rax
je     1155 <main+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
test   %rax,%rax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
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
store i32 2, i32* %6
%7 = call i64 (...) @omp_get_thread_num()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @omp_get_thread_num()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glRectf(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/);
void Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) {
  glRectf(x1, y1, x2, y2);
}


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

x86 assembly (clang, -O2):
<Rectf>:
jmp    1030 <glRectf@plt>

LLVM IR (-O0):
define void @Rectf(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @glRectf(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @Rectf(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glRectf(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void terminateProgram(int signum) {
  printf("Terminating from signal %d.\n", signum);
  exit(signum);
}


x86 assembly (clang, -O0):
<terminateProgram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<terminateProgram>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Terminating from signal %d.\0A\00"
define void @terminateProgram(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"Terminating from signal %d.\0A\00"
define void @terminateProgram(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
#define LM_FORWARDMASK 128
int /*<<< orphan*/ printf(char *);
void lm_wont(unsigned char *cmd, int len) {
  if (len < 1) {
    printf("lm_wont: no command!!!\n");
    return;
  }
  switch (cmd[0]) {
  case LM_FORWARDMASK:
  default:
    return;
  }
}


x86 assembly (clang, -O0):
<lm_wont>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    113a <lm_wont+0x2a>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
jmp    1157 <lm_wont+0x47>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
sub    $0x80,%al
jne    1152 <lm_wont+0x42>
jmp    114d <lm_wont+0x3d>
jmp    1152 <lm_wont+0x42>
jmp    1157 <lm_wont+0x47>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lm_wont>:
test   %esi,%esi
jle    1115 <lm_wont+0x5>
ret
lea    0xee4(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"lm_wont: no command!!!\0A\00"
define void @lm_wont(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 = icmp slt i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %16
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
switch i32 %13, label %15 [
i32 128, label %14
]
14: ; preds = %9
br label %15
15: ; preds = %9, %14
br label %16
16: ; preds = %15, %7
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"lm_wont: no command!!!\00"
define void @lm_wont(i8* nocapture readnone %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %2, %4
ret void
}