xunge/DecIR huggingface dataset:
unsigned scanline2x_generic_output_fmts(unsigned input_fmts) {
  return input_fmts;
}


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

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

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

LLVM IR (-O2):
define i32 @scanline2x_generic_output_fmts(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ convert_byte(int *, int, int);
int /*<<< orphan*/ convert_num(int *, int);
int /*<<< orphan*/ convert_text(int *, int);
void decode_segment(int *cw, int len, int mode) {
  switch (mode) {
  case 900:
    convert_text(cw, len);
    break;
  case 901:
  case 913:
  case 924:
    convert_byte(cw, len, mode);
    break;
  case 902:
    convert_num(cw, len);
    break;
  }
}


x86 assembly (clang, -O0):
<decode_segment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xfffffc7c,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x18,%eax
ja     119e <decode_segment+0x6e>
mov    -0x18(%rbp),%rax
lea    0xe9c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <convert_text@plt>
jmp    119e <decode_segment+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <convert_byte@plt>
jmp    119e <decode_segment+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <convert_num@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_segment>:
lea    -0x384(%rdx),%eax
cmp    $0x18,%eax
ja     115a <decode_segment+0x2a>
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1030 <convert_byte@plt>
jmp    1040 <convert_text@plt>
jmp    1050 <convert_num@plt>
ret

LLVM IR (-O0):
define void @decode_segment(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
switch i32 %7, label %21 [
i32 900, label %8
i32 901, label %12
i32 913, label %12
i32 924, label %12
i32 902, label %17
]
8: ; preds = %3
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = call i32 @convert_text(i32* %9, i32 %10)
br label %21
12: ; preds = %3, %3, %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @convert_byte(i32* %13, i32 %14, i32 %15)
br label %21
17: ; preds = %3
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = call i32 @convert_num(i32* %18, i32 %19)
br label %21
21: ; preds = %3, %17, %12, %8
ret void
}

LLVM IR (-O2):
define void @decode_segment(i32* %0, i32 %1, i32 %2) {
switch i32 %2, label %10 [
i32 900, label %4
i32 901, label %6
i32 913, label %6
i32 924, label %6
i32 902, label %8
]
4: ; preds = %3
%5 = tail call i32 @convert_text(i32* %0, i32 %1)
br label %10
6: ; preds = %3, %3, %3
%7 = tail call i32 @convert_byte(i32* %0, i32 %1, i32 %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @convert_num(i32* %0, i32 %1)
br label %10
10: ; preds = %3, %8, %6, %4
ret void
}
void led_status_unsupported_card_system(void) {}


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

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

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

LLVM IR (-O2):
define void @led_status_unsupported_card_system() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closesocket(int socket) { close(socket); }


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

x86 assembly (clang, -O2):
<closesocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closesocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
int test_imm_99int16_mem(short *val) {
  return ((*val) & (-0x99 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_99int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -153
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rec_untyp(void *);
void rec_typ(void *mem) { rec_untyp(mem); }


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

x86 assembly (clang, -O2):
<rec_typ>:
jmp    1030 <rec_untyp@plt>

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

LLVM IR (-O2):
define void @rec_typ(i8* %0) {
%2 = tail call i32 @rec_untyp(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblock_new_fixed() {
  printf("NOT IMPLEMENTED:"
         "pa_memblock_new_fixed"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_memblock_new_fixed\0A\00"
define i32 @pa_memblock_new_fixed() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_memblock_new_fixed\00"
define i32 @pa_memblock_new_fixed() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void dead_result11(int *data) {
  int i = data[0];
  int j = data[1];
  if (i & j)
    data[0] = i * j;
  j = data[2];
  data[j] = 2;
}


x86 assembly (clang, -O0):
<dead_result11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
cmp    $0x0,%eax
je     1137 <dead_result11+0x37>
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_result11>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
test   %eax,%ecx
je     110e <dead_result11+0xe>
imul   %eax,%ecx
mov    %ecx,(%rdi)
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @dead_result11(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = and i32 %4, %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = mul nsw i32 %4, %2
store i32 %8, i32* %0
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
store i32 2, i32* %13
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ max32u(int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t max4x32u(uint32_t a, uint32_t b, uint32_t c, uint32_t d) {
  return max32u(max32u(a, b), max32u(c, d));
}


x86 assembly (clang, -O0):
<max4x32u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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
call   1030 <max32u@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <max32u@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <max32u@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max4x32u>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
call   1030 <max32u@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <max32u@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <max32u@plt>

LLVM IR (-O0):
define i32 @max4x32u(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 = call i32 @max32u(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @max32u(i32 %12, i32 %13)
%15 = call i32 @max32u(i32 %11, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @max4x32u(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @max32u(i32 %0, i32 %1)
%6 = tail call i32 @max32u(i32 %2, i32 %3)
%7 = tail call i32 @max32u(i32 %5, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  f(2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 2)
ret i32 0
}
/* Variables and functions */
void mic_pull(double *data, size_t nelem, int device, int offload) {
#pragma offload_transfer target(mic                                            \
                                : device)                                      \
    out(data                                                                   \
        : length(nelem) alloc_if(0) free_if(0)) if (offload)
}


x86 assembly (clang, -O0):
<mic_pull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mic_pull(double* nocapture %0, i64 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int, int);
int sum(int, int);
int main() {
  int a, b, c, d;
  c = 2;
  d = c * 2;
  a = sum(c, d);
  b = sum(a, d);
  print("c = %d, d = %d", c, d);
  print("a = sum(c, d) = %d, b = sum(a, d) = %d", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <sum@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <sum@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe98(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe95(%rip),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <sum@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x4,%esi
call   1040 <sum@plt>
mov    %eax,%ebp
lea    0xeb7(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <print@plt>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <print@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"c = %d, d = %d\00"
@.str.1 = [39 x i8] c"a = sum(c, d) = %d, b = sum(a, d) = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 2
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @sum(i32 %8, i32 %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %5
%13 = call i32 @sum(i32 %11, i32 %12)
store i32 %13, i32* %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = call i32 @print(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"c = %d, d = %d\00"
@.str.1 = [39 x i8] c"a = sum(c, d) = %d, b = sum(a, d) = %d\00"
define i32 @main() {
%1 = tail call i32 @sum(i32 2, i32 4)
%2 = tail call i32 @sum(i32 %1, i32 4)
%3 = tail call i32 @print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 4)
%4 = tail call i32 @print(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
void write_pipe_data(pd, data, size) int *pd;
char *data;
int size;
{
  if (write(pd[1], data, size) < 0)
    show("<< Could not write to pipe >>");
}


x86 assembly (clang, -O0):
<write_pipe_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <write@plt>
cmp    $0x0,%eax
jge    115f <write_pipe_data+0x3f>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <show@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pipe_data>:
push   %rax
mov    0x4(%rdi),%edi
xor    %eax,%eax
call   1030 <write@plt>
test   %eax,%eax
js     1131 <write_pipe_data+0x11>
pop    %rax
ret
lea    0xec8(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <show@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"<< Could not write to pipe >>\00"
define void @write_pipe_data(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %9, i8* %10, i32 %11)
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @show to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"<< Could not write to pipe >>\00"
define void @write_pipe_data(i32* nocapture %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %5, i8* %1, i32 %2)
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @show to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %3
ret void
}
int Add10(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7,
          int a8, int a9) {
  int sum = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9;
  return sum;
}


x86 assembly (clang, -O0):
<Add10>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    0x10(%rbp),%eax
add    0x18(%rbp),%eax
add    0x20(%rbp),%eax
add    0x28(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Add10>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
add    0x8(%rsp),%eax
add    0x10(%rsp),%eax
add    0x18(%rsp),%eax
add    0x20(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @Add10(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%22 = load i32, i32* %11
%23 = load i32, i32* %12
%24 = add nsw i32 %22, %23
%25 = load i32, i32* %13
%26 = add nsw i32 %24, %25
%27 = load i32, i32* %14
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %15
%30 = add nsw i32 %28, %29
%31 = load i32, i32* %16
%32 = add nsw i32 %30, %31
%33 = load i32, i32* %17
%34 = add nsw i32 %32, %33
%35 = load i32, i32* %18
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %19
%38 = add nsw i32 %36, %37
%39 = load i32, i32* %20
%40 = add nsw i32 %38, %39
store i32 %40, i32* %21
%41 = load i32, i32* %21
ret i32 %41
}

LLVM IR (-O2):
define i32 @Add10(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = add nsw i32 %1, %0
%12 = add nsw i32 %11, %2
%13 = add nsw i32 %12, %3
%14 = add nsw i32 %13, %4
%15 = add nsw i32 %14, %5
%16 = add nsw i32 %15, %6
%17 = add nsw i32 %16, %7
%18 = add nsw i32 %17, %8
%19 = add nsw i32 %18, %9
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int hexdigit(char c) {
  if ((c - '0') <= 9) {
    return c - '0';
  } else if ((c - 'a') <= 6) {
    return 10 + (c - 'a');
  } else {
    assert((c - 'A') <= 6);
    return 10 + (c - 'A');
  }
}


x86 assembly (clang, -O0):
<hexdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
cmp    $0x9,%eax
jg     113d <hexdigit+0x2d>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1183 <hexdigit+0x73>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
cmp    $0x6,%eax
jg     115f <hexdigit+0x4f>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1183 <hexdigit+0x73>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
cmp    $0x6,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdigit>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffd0,%ecx
cmp    $0x3a,%bl
jl     1133 <hexdigit+0x23>
mov    $0xffffffa9,%ecx
cmp    $0x68,%bl
jb     1133 <hexdigit+0x23>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0xffffffc9,%ecx
movsbl %bl,%eax
add    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hexdigit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 48
%7 = icmp sle i32 %6, 9
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %33
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 97
%16 = icmp sle i32 %15, 6
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %19, 97
%21 = add nsw i32 10, %20
store i32 %21, i32* %2
br label %33
22: ; preds = %12
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = sub nsw i32 %24, 65
%26 = icmp sle i32 %25, 6
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 65
%32 = add nsw i32 10, %31
store i32 %32, i32* %2
br label %33
33: ; preds = %22, %17, %8
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @hexdigit(i8 signext %0) {
%2 = icmp slt i8 %0, 58
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = icmp ult i8 %0, 104
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @assert(i32 0)
br label %7
7: ; preds = %3, %1, %5
%8 = phi i32 [ -55, %5 ], [ -48, %1 ], [ -87, %3 ]
%9 = sext i8 %0 to i32
%10 = add nsw i32 %8, %9
ret i32 %10
}
float absval(float n) { return n < 0.0 ? -n : n; }


x86 assembly (clang, -O0):
<absval>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    113b <absval+0x3b>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1145 <absval+0x45>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absval>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @absval(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %2
%8 = fneg float %7
br label %11
9: ; preds = %1
%10 = load float, float* %2
br label %11
11: ; preds = %9, %6
%12 = phi float [ %8, %6 ], [ %10, %9 ]
ret float %12
}

LLVM IR (-O2):
define float @absval(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ _response(char const *);
void _stat_success_226(void) {
  const char msg[] = "226 Closing data connection."
                     "Requested file-action succeed.\r\n";
  _response(msg);
}


x86 assembly (clang, -O0):
<_stat_success_226>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x3d,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1030 <_response@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat_success_226>:
sub    $0x48,%rsp
movups 0xf12(%rip),%xmm0
movups %xmm0,0x2d(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <_response@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const._stat_success_226.msg = [61 x i8] c"226 Closing data connection.Requested file-action succeed.\0D\0A\00"
define void @_stat_success_226() {
%1 = alloca [61 x i8]
%2 = bitcast [61 x i8]* %1 to i8*
%3 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%4 = call i32 @_response(i8* %3)
ret void
}

LLVM IR (-O2):
@__const._stat_success_226.msg = [61 x i8] c"226 Closing data connection.Requested file-action succeed.\0D\0A\00"
define void @_stat_success_226() {
%1 = alloca [61 x i8]
%2 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
ret void
}
__attribute__((swiftcall)) int add_swiftcall(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<add_swiftcall>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_swiftcall>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define swiftcc i32 @add_swiftcall(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define swiftcc i32 @add_swiftcall(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ UINT_MAX;
int vsnprintf(char *, int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vsprintf(char *str, const char *format, va_list ap) {
  return vsnprintf(str, UINT_MAX, format, ap);
}


x86 assembly (clang, -O0):
<vsprintf>:
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    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
jmp    1030 <vsnprintf@plt>

LLVM IR (-O0):
@UINT_MAX = global i32 0
define i32 @vsprintf(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 i32, i32* @UINT_MAX
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @vsnprintf(i8* %7, i32 %8, i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@UINT_MAX = global i32 0
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @UINT_MAX
%5 = tail call i32 @vsnprintf(i8* %0, i32 %4, i8* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printSolution(int **);
int /*<<< orphan*/ printf(char *);
scalar_t__ solveNQUtil(int **, int /*<<< orphan*/);
int solveNQ() {
  int board[4][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
  if (solveNQUtil(board, 0) == 0) {
    printf("Solution does not exist");
    return 0;
  }
  printSolution(board);
  return 1;
}


x86 assembly (clang, -O0):
<solveNQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
call   1050 <solveNQUtil@plt>
cmp    $0x0,%rax
jne    1185 <solveNQ+0x45>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1195 <solveNQ+0x55>
lea    -0x50(%rbp),%rdi
call   1060 <printSolution@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solveNQ>:
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1040 <solveNQUtil@plt>
test   %rax,%rax
je     116b <solveNQ+0x3b>
mov    %rsp,%rdi
call   1050 <printSolution@plt>
mov    $0x1,%ebx
jmp    1177 <solveNQ+0x47>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Solution does not exist\00"
define i32 @solveNQ() {
%1 = alloca i32
%2 = alloca [4 x [4 x i32]]
%3 = bitcast [4 x [4 x i32]]* %2 to i8*
%4 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0
%5 = bitcast [4 x i32]* %4 to i32**
%6 = call i64 @solveNQUtil(i32** %5, i32 0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %14
10: ; preds = %0
%11 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0
%12 = bitcast [4 x i32]* %11 to i32**
%13 = call i32 @printSolution(i32** %12)
store i32 1, i32* %1
br label %14
14: ; preds = %10, %8
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [24 x i8] c"Solution does not exist\00"
define i32 @solveNQ() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = bitcast [4 x [4 x i32]]* %1 to i32**
%4 = call i64 @solveNQUtil(i32** %3, i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printSolution(i32** %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ 0, %6 ], [ 1, %8 ]
ret i32 %11
}
void protocol_smtp_free_topic_data(struct topic *t) {}


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

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

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

LLVM IR (-O2):
%struct.topic = type opaque
define void @protocol_smtp_free_topic_data(%struct.topic* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello, world\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int set_id(int *id_array, int contact, int new_id) {
  if (contact < 0 || contact >= 64) {
    return -1;
  }
  id_array[contact] = new_id;
  return new_id;
}


x86 assembly (clang, -O0):
<set_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1122 <set_id+0x22>
cmpl   $0x40,-0x14(%rbp)
jl     112e <set_id+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1142 <set_id+0x42>
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_id>:
mov    $0xffffffff,%eax
cmp    $0x3f,%esi
ja     1111 <set_id+0x11>
mov    %esi,%eax
mov    %edx,(%rdi,%rax,4)
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @set_id(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp ugt i32 %1, 63
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %2, i32* %7
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %2, %5 ], [ -1, %3 ]
ret i32 %9
}
int test_imm_0Fuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x0F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Fuint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 15
%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_0Fuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 15
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pifacecad_lcd_send_byte(int /*<<< orphan*/);
int /*<<< orphan*/ pifacecad_lcd_set_rs(int /*<<< orphan*/);
int /*<<< orphan*/ sleep_ns(int);
void pifacecad_lcd_send_command(uint8_t command) {
  pifacecad_lcd_set_rs(0);
  pifacecad_lcd_send_byte(command);
  sleep_ns(40000);
}


x86 assembly (clang, -O0):
<pifacecad_lcd_send_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <pifacecad_lcd_set_rs@plt>
mov    -0x4(%rbp),%edi
call   1050 <pifacecad_lcd_send_byte@plt>
mov    $0x9c40,%edi
call   1040 <sleep_ns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pifacecad_lcd_send_command>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <pifacecad_lcd_set_rs@plt>
mov    %ebx,%edi
call   1050 <pifacecad_lcd_send_byte@plt>
mov    $0x9c40,%edi
pop    %rbx
jmp    1040 <sleep_ns@plt>

LLVM IR (-O0):
define void @pifacecad_lcd_send_command(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @pifacecad_lcd_set_rs(i32 0)
%4 = load i32, i32* %2
%5 = call i32 @pifacecad_lcd_send_byte(i32 %4)
%6 = call i32 @sleep_ns(i32 40000)
ret void
}

LLVM IR (-O2):
define void @pifacecad_lcd_send_command(i32 %0) {
%2 = tail call i32 @pifacecad_lcd_set_rs(i32 0)
%3 = tail call i32 @pifacecad_lcd_send_byte(i32 %0)
%4 = tail call i32 @sleep_ns(i32 40000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int, int, char, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void changeBGcolor(char b) { interrupt(0x10, 0xB * 256, b, 0, 0); }


x86 assembly (clang, -O0):
<changeBGcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x10,%edi
mov    $0xb00,%esi
xor    %r8d,%r8d
movsbl -0x1(%rbp),%edx
mov    %r8d,%ecx
call   1030 <interrupt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeBGcolor>:
mov    %edi,%edx
mov    $0x10,%edi
mov    $0xb00,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <interrupt@plt>

LLVM IR (-O0):
define void @changeBGcolor(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @interrupt(i32 16, i32 2816, i8 signext %3, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @changeBGcolor(i8 signext %0) {
%2 = tail call i32 @interrupt(i32 16, i32 2816, i8 signext %0, i32 0, i32 0)
ret void
}
void gennop() {}


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

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

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

LLVM IR (-O2):
define void @gennop() {
ret void
}
void path_013_expected_5(int a, int b) {
  while (a) {
    if (b == 1) {
      return;
    }
    if (b == 2) {
      return;
    }
    if (b == 3) {
      return;
    }
    a--;
  }
}


x86 assembly (clang, -O0):
<path_013_expected_5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114f <path_013_expected_5+0x4f>
cmpl   $0x1,-0x8(%rbp)
jne    1123 <path_013_expected_5+0x23>
jmp    114f <path_013_expected_5+0x4f>
cmpl   $0x2,-0x8(%rbp)
jne    1132 <path_013_expected_5+0x32>
jmp    114f <path_013_expected_5+0x4f>
cmpl   $0x3,-0x8(%rbp)
jne    1141 <path_013_expected_5+0x41>
jmp    114f <path_013_expected_5+0x4f>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <path_013_expected_5+0xa>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @path_013_expected_5(i32 %0, i32 %1) {
ret void
}
void swap(int values[], int val1, int val2) {
  int temp = values[val1];
  values[val1] = values[val2];
  values[val2] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Type definitions */
struct timespec {
  double tv_sec;
  int tv_nsec;
};

/* Variables and functions */
double tp_diff(struct timespec *tp2, struct timespec *tp1) {
  return (tp2->tv_sec - tp1->tv_sec) + (tp2->tv_nsec - tp1->tv_nsec) * 1e-9;
}


x86 assembly (clang, -O0):
<tp_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x10(%rbp),%rcx
sub    0x8(%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeca(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp_diff>:
movsd  (%rdi),%xmm1
subsd  (%rsi),%xmm1
mov    0x8(%rdi),%eax
sub    0x8(%rsi),%eax
cvtsi2sd %eax,%xmm0
mulsd  0xee6(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
define double @tp_diff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%7 = load double, double* %6
%8 = load %struct.timespec*, %struct.timespec** %4
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = load %struct.timespec*, %struct.timespec** %3
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = load %struct.timespec*, %struct.timespec** %4
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = sub nsw i32 %14, %17
%19 = sitofp i32 %18 to double
%20 = call double @llvm.fmuladd.f64(double %19, double 1.000000e-09, double %11)
ret double %20
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
define double @tp_diff(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%11 = load i32, i32* %10
%12 = sub nsw i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = tail call double @llvm.fmuladd.f64(double %13, double 1.000000e-09, double %7)
ret double %14
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int query_format(int);
int control(uint32_t request, void *data) {
  switch (request) {
  case 2:
    return query_format(*((uint32_t *)data));
  }
  return -3;
}


x86 assembly (clang, -O0):
<control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
jne    1143 <control+0x33>
jmp    1130 <control+0x20>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <query_format@plt>
mov    %eax,-0x4(%rbp)
jmp    114a <control+0x3a>
movl   $0xfffffffd,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<control>:
cmp    $0x2,%edi
jne    111c <control+0xc>
mov    (%rsi),%edi
jmp    1030 <query_format@plt>
mov    $0xfffffffd,%eax
ret

LLVM IR (-O0):
define i32 @control(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
switch i32 %6, label %12 [
i32 2, label %7
]
7: ; preds = %2
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = call i32 @query_format(i32 %10)
store i32 %11, i32* %3
br label %13
12: ; preds = %2
store i32 -3, i32* %3
br label %13
13: ; preds = %12, %7
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @control(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @query_format(i32 %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ -3, %2 ]
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  short ascent;
};
struct TYPE_4__ {
  TYPE_1__ min_bounds;
};
typedef TYPE_2__ XFontStruct;

/* Variables and functions */
void set_XFontStruct_min_bounds_ascent(void *_p, short _v) {
  ((XFontStruct *)_p)->min_bounds.ascent = (short)_v;
}


x86 assembly (clang, -O0):
<set_XFontStruct_min_bounds_ascent>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontStruct_min_bounds_ascent>:
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XFontStruct_min_bounds_ascent(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrerror(char *);
void usage(void) {
  nrerror("usage: RNAplot [-t 0|1] [-o ps|gml|xrna|svg] [--pre <string>] "
          "[--post <string>]");
}


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

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

LLVM IR (-O0):
@.str = [80 x i8] c"usage: RNAplot [-t 0|1] [-o ps|gml|xrna|svg] [--pre <string>] [--post <string>]\00"
define void @usage() {
%1 = call i32 @nrerror(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [80 x i8] c"usage: RNAplot [-t 0|1] [-o ps|gml|xrna|svg] [--pre <string>] [--post <string>]\00"
define void @usage() {
%1 = tail call i32 @nrerror(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
ret void
}