xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ log_msg(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void log_ackFrameSent(int frame) {
  char buffer[50];
  sprintf(buffer, "DAT: ACK for sequence %d sent", frame);
  log_msg(buffer);
}


x86 assembly (clang, -O0):
<log_ackFrameSent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <log_msg@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_ackFrameSent>:
push   %rbx
sub    $0x40,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <log_msg@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"DAT: ACK for sequence %d sent\00"
define void @log_ackFrameSent(i32 %0) {
%2 = alloca i32
%3 = alloca [50 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%8 = call i32 @log_msg(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"DAT: ACK for sequence %d sent\00"
define void @log_ackFrameSent(i32 %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @log_msg(i8* %3)
ret void
}
int test_imm_92int64_midword_reg(long long val) {
  return ((val >> 16) & (0x92 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_92int64_midword_reg(i64 %0) {
%2 = and i64 %0, 9568256
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float modff(float x, float *iptr) { return __builtin_modff(x, iptr); }


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

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

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

LLVM IR (-O2):
define float @modff(float %0, float* nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void message(char *m) { write(STDERR_FILENO, m, strlen(m)); }


x86 assembly (clang, -O0):
<message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<message>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
define void @message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDERR_FILENO
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @write(i32 %3, i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
define void @message(i8* %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %2, i8* %0, i32 %3)
ret void
}
void rop3_177_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ T;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_177_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_177_1_0>:
mov    %edx,%eax
xor    %sil,%al
mov    (%rdi),%cl
or     %cl,%al
xor    %dl,%al
or     %sil,%al
not    %al
and    %sil,%cl
or     %al,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_177_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_177_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %2
%8 = or i8 %7, %1
%9 = xor i8 %8, -1
%10 = and i8 %5, %1
%11 = or i8 %10, %9
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tinflDiag(void) {
  printf("tinflDiag()\n");
  printf("MINIZ_HAS_64BIT_REGISTERS.\n");
}


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

x86 assembly (clang, -O2):
<tinflDiag>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [12 x i8] c"tinflDiag()\00"
@str.2 = [27 x i8] c"MINIZ_HAS_64BIT_REGISTERS.\00"
define void @tinflDiag() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct mq_attr {
  int dummy;
};
typedef scalar_t__ mqd_t;

/* Variables and functions */
int mq_getattr(scalar_t__, struct mq_attr *);
void test_mq_getattr_prototype(void) {
  mqd_t mqdes;
  struct mq_attr mqs;
  int err;
  mqdes = 0;
  err = mq_getattr(mqdes, &mqs);
  (void)err;
}


x86 assembly (clang, -O0):
<test_mq_getattr_prototype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <mq_getattr@plt>
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mq_getattr_prototype>:
push   %rax
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <mq_getattr@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.mq_attr = type { i32 }
define void @test_mq_getattr_prototype() {
%1 = alloca i64
%2 = alloca %struct.mq_attr
%3 = alloca i32
store i64 0, i64* %1
%4 = load i64, i64* %1
%5 = call i32 @mq_getattr(i64 %4, %struct.mq_attr* %2)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
%struct.mq_attr = type { i32 }
define void @test_mq_getattr_prototype() {
%1 = alloca %struct.mq_attr
%2 = bitcast %struct.mq_attr* %1 to i8*
%3 = call i32 @mq_getattr(i64 0, %struct.mq_attr* %1)
ret void
}
/* Type definitions */
struct compat_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compat_init_MUTEX(struct compat_semaphore *);
void init_MUTEX(struct compat_semaphore *sem) { compat_init_MUTEX(sem); }


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

x86 assembly (clang, -O2):
<init_MUTEX>:
jmp    1030 <compat_init_MUTEX@plt>

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

LLVM IR (-O2):
%struct.compat_semaphore = type { i32 }
define void @init_MUTEX(%struct.compat_semaphore* %0) {
%2 = tail call i32 @compat_init_MUTEX(%struct.compat_semaphore* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_hlt();
unsigned int __builtin_inl(int);
void main(void) {
  unsigned dev;
  dev = __builtin_inl(0xcd);
  if (dev == (0xffffffffU)) {
    do {
      __builtin_hlt();
    } while (1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xcd,%edi
call   1030 <__builtin_inl@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    115f <main+0x3f>
jmp    1144 <main+0x24>
mov    $0x0,%al
call   1040 <__builtin_hlt@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1144 <main+0x24>
jmp    115a <main+0x3a>
jmp    115f <main+0x3f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xcd,%edi
call   1030 <__builtin_inl@plt>
cmp    $0xffffffff,%eax
je     1140 <main+0x20>
pop    %rax
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <__builtin_hlt@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 @__builtin_inl(i32 205)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %10
5: ; preds = %0
br label %6
6: ; preds = %8, %5
%7 = call i32 (...) @__builtin_hlt()
br label %8
8: ; preds = %6
br i1 true, label %6, label %9
9: ; preds = %8
br label %10
10: ; preds = %9, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @__builtin_inl(i32 205)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0, %3
%4 = tail call i32 (...) @__builtin_hlt()
br label %3
5: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 10;
  int y = ~x + x;
  printf("Num: %d", y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecb(%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
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"Num: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Variables and functions */
int five();
char *test_divide_five() {
  int out = five() / five();
  do {
    if (!(out == 1))
      return "error, five / five != 1";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_divide_five>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <five@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <five@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     114e <test_divide_five+0x3e>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <test_divide_five+0x4b>
jmp    1153 <test_divide_five+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_divide_five>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <five@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <five@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
cmp    $0x1,%eax
lea    0xeca(%rip),%rax
cmovne %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"error, five / five != 1\00"
define i8* @test_divide_five() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 (...) @five()
%4 = call i32 (...) @five()
%5 = sdiv i32 %3, %4
store i32 %5, i32* %2
br label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %10, label %9
9: ; preds = %6
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %1
br label %12
10: ; preds = %6
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %9
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [24 x i8] c"error, five / five != 1\00"
define i8* @test_divide_five() {
%1 = tail call i32 (...) @five()
%2 = tail call i32 (...) @five()
%3 = sdiv i32 %1, %2
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i8* null, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
/* Variables and functions */
char *UtilCalloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
scalar_t__ strlen(char const *);
char *UtilStrDup(const char *str) {
  char *result;
  int len = (int)strlen(str);
  result = UtilCalloc(len + 1);
  if (len > 0)
    memcpy(result, str, len);
  result[len] = 0;
  return result;
}


x86 assembly (clang, -O0):
<UtilStrDup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <UtilCalloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1171 <UtilStrDup+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UtilStrDup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
lea    0x1(%rax),%edi
call   1050 <UtilCalloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
jle    115c <UtilStrDup+0x2c>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
movb   $0x0,(%r15,%rax,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @UtilStrDup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 1
%5 = tail call i8* @UtilCalloc(i32 %4)
%6 = icmp sgt i32 %3, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %3)
br label %9
9: ; preds = %7, %1
%10 = shl i64 %2, 32
%11 = ashr exact i64 %10, 32
%12 = getelementptr inbounds i8, i8* %5, i64 %11
store i8 0, i8* %12
ret i8* %5
}
void store32(char *d, unsigned int v) {
  d[0] = v & 0xff;
  d[1] = (v >> 8) & 0xff;
  d[2] = (v >> 16) & 0xff;
  d[3] = (v >> 24) & 0xff;
}


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

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

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

LLVM IR (-O2):
define void @store32(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
float tan(float);
float IsoscelesTriangleOpposite(float adjacentLength, float coneTheta) {
  return 2.0f * tan(coneTheta) * adjacentLength;
}


x86 assembly (clang, -O0):
<IsoscelesTriangleOpposite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <tan@plt>
movaps %xmm0,%xmm1
movss  0xec9(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsoscelesTriangleOpposite>:
push   %rax
movss  %xmm0,0x4(%rsp)
movaps %xmm1,%xmm0
call   1030 <tan@plt>
addss  %xmm0,%xmm0
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @IsoscelesTriangleOpposite(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = call float @tan(float %5)
%7 = fmul float 2.000000e+00, %6
%8 = load float, float* %3
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
define float @IsoscelesTriangleOpposite(float %0, float %1) {
%3 = tail call float @tan(float %1)
%4 = fmul float %3, 2.000000e+00
%5 = fmul float %4, %0
ret float %5
}
/* Variables and functions */
void *MAP_FAILED;
int /*<<< orphan*/ munmap(void *, size_t);
void aRPio_memory_unmap(void **pmem, size_t size) {
  if (*pmem == MAP_FAILED)
    return;
  munmap(*pmem, size);
  *pmem = MAP_FAILED;
}


x86 assembly (clang, -O0):
<aRPio_memory_unmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%rax
jne    113c <aRPio_memory_unmap+0x2c>
jmp    115d <aRPio_memory_unmap+0x4d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <munmap@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aRPio_memory_unmap>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    0x2ebf(%rip),%r14
cmp    (%r14),%rdi
je     1131 <aRPio_memory_unmap+0x21>
call   1030 <munmap@plt>
mov    (%r14),%rax
mov    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@MAP_FAILED = global i8* null
define void @aRPio_memory_unmap(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
store i8** %0, i8*** %3
store i64 %1, i64* %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = load i8*, i8** @MAP_FAILED
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
br label %17
10: ; preds = %2
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = load i64, i64* %4
%14 = call i32 @munmap(i8* %12, i64 %13)
%15 = load i8*, i8** @MAP_FAILED
%16 = load i8**, i8*** %3
store i8* %15, i8** %16
br label %17
17: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
@MAP_FAILED = global i8* null
define void @aRPio_memory_unmap(i8** nocapture %0, i64 %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** @MAP_FAILED
%5 = icmp eq i8* %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @munmap(i8* %3, i64 %1)
%8 = load i8*, i8** @MAP_FAILED
store i8* %8, i8** %0
br label %9
9: ; preds = %2, %6
ret void
}
void and (struct forth_instance * fi) { st_push(fi, st_pop(fi) & st_pop(fi)); }


x86 assembly (clang, -O0):
<and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <st_pop@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <st_pop@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdi
and    %eax,%esi
mov    $0x0,%al
call   1040 <st_push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <st_pop@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <st_pop@plt>
and    %eax,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <st_push@plt>

LLVM IR (-O0):
%struct.forth_instance = type opaque
define void @and(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
store %struct.forth_instance* %0, %struct.forth_instance** %2
%3 = load %struct.forth_instance*, %struct.forth_instance** %2
%4 = load %struct.forth_instance*, %struct.forth_instance** %2
%5 = call i32 (%struct.forth_instance*, ...) bitcast (i32 (...)* @st_pop to i32 (%struct.forth_instance*, ...)*)(%struct.forth_instance* %4)
%6 = load %struct.forth_instance*, %struct.forth_instance** %2
%7 = call i32 (%struct.forth_instance*, ...) bitcast (i32 (...)* @st_pop to i32 (%struct.forth_instance*, ...)*)(%struct.forth_instance* %6)
%8 = and i32 %5, %7
%9 = call i32 (%struct.forth_instance*, i32, ...) bitcast (i32 (...)* @st_push to i32 (%struct.forth_instance*, i32, ...)*)(%struct.forth_instance* %3, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type opaque
define void @and(%struct.forth_instance* %0) {
%2 = tail call i32 (%struct.forth_instance*, ...) bitcast (i32 (...)* @st_pop to i32 (%struct.forth_instance*, ...)*)(%struct.forth_instance* %0)
%3 = tail call i32 (%struct.forth_instance*, ...) bitcast (i32 (...)* @st_pop to i32 (%struct.forth_instance*, ...)*)(%struct.forth_instance* %0)
%4 = and i32 %3, %2
%5 = tail call i32 (%struct.forth_instance*, i32, ...) bitcast (i32 (...)* @st_push to i32 (%struct.forth_instance*, i32, ...)*)(%struct.forth_instance* %0, i32 %4)
ret void
}
void eac_mode_in(struct TAG_compcxt *ccx) { return; }


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

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

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

LLVM IR (-O2):
%struct.TAG_compcxt = type opaque
define void @eac_mode_in(%struct.TAG_compcxt* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
void iosupported(void) {
  FILE *f;
  if ((f = fopen("/proc/self/io", "r")) == NULL)
    err(EXIT_FAILURE, "cannot open /proc/self/io");
  fclose(f);
}


x86 assembly (clang, -O0):
<iosupported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xecf(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    116e <iosupported+0x3e>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1040 <err@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iosupported>:
push   %rbx
lea    0xed6(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1161 <iosupported+0x31>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
call   1040 <err@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/self/io\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [26 x i8] c"cannot open /proc/self/io\00"
define void @iosupported() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @err(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %4, %0
%8 = load i32*, i32** %1
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/self/io\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [26 x i8] c"cannot open /proc/self/io\00"
define void @iosupported() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @err(i32 %4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %3, %0
%7 = tail call i32 @fclose(i32* %1)
ret void
}
void set_fd_to_binary_mode(int fd) {}


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

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

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

LLVM IR (-O2):
define void @set_fd_to_binary_mode(i32 %0) {
ret void
}
void NoDepY_func() {}


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

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

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

LLVM IR (-O2):
define void @NoDepY_func() {
ret void
}
/* Variables and functions */
int print(int /*<<< orphan*/, int *);
int printf(const char *format, ...) {
  int *varg = (int *)(&format);
  return print(0, varg);
}


x86 assembly (clang, -O0):
<printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <print@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = bitcast i8** %2 to i32*
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @print(i32 0, i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i32*
%4 = call i32 @print(i32 0, i32* %3)
ret i32 %4
}
double div(double x, double y) { return x / y; }


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
divsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @div(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void _marshall_put8(void *pBuf, unsigned char iVal) {
  *(unsigned char *)pBuf = iVal;
}


x86 assembly (clang, -O0):
<_marshall_put8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_marshall_put8>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @_marshall_put8(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 %1, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *);
int fprint_ipamfilter_help(FILE *out) {
  return fprintf(out,
                 "IPAM lines can be filtered on:\n"
                 " -prefix\n"
                 " -mask\n"
                 " -Extended Attributes\n"
                 "operator are :\n"
                 "- '=' (EQUALS)\n"
                 "- '#' (DIFFERENT)\n"
                 "- '<' (numerically inferior, if EA is of type INT)\n"
                 "- '>' (numerically superior, if EA is of type INT)\n"
                 "- '{' (is included (for prefixes))\n"
                 "- '}' (includes (for prefixes))\n"
                 "- '~' (st_scanf regular expression)\n"
                 "- '%%' (st_scanf case insensitive regular expression)\n");
}


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

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

LLVM IR (-O0):
@.str = [377 x i8] c"IPAM lines can be filtered on:\0A -prefix\0A -mask\0A -Extended Attributes\0Aoperator are :\0A- '=' (EQUALS)\0A- '#' (DIFFERENT)\0A- '<' (numerically inferior, if EA is of type INT)\0A- '>' (numerically superior, if EA is of type INT)\0A- '{' (is included (for prefixes))\0A- '}' (includes (for prefixes))\0A- '~' (st_scanf regular expression)\0A- '%%' (st_scanf case insensitive regular expression)\0A\00"
define i32 @fprint_ipamfilter_help(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [377 x i8] c"IPAM lines can be filtered on:\0A -prefix\0A -mask\0A -Extended Attributes\0Aoperator are :\0A- '=' (EQUALS)\0A- '#' (DIFFERENT)\0A- '<' (numerically inferior, if EA is of type INT)\0A- '>' (numerically superior, if EA is of type INT)\0A- '{' (is included (for prefixes))\0A- '}' (includes (for prefixes))\0A- '~' (st_scanf regular expression)\0A- '%%' (st_scanf case insensitive regular expression)\0A\00"
define i32 @fprint_ipamfilter_help(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
long long l_abs(long long *);
long long intr_wrap_091(long long p1) { return l_abs(&p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_091>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <l_abs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @intr_wrap_091(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @l_abs(i64* %2)
ret i64 %3
}

LLVM IR (-O2):
define i64 @intr_wrap_091(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @l_abs(i64* %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Msp430CounterC__1__Msp430Timer__overflow();
int /*<<< orphan*/ Msp430TimerCapComP__0__Timer__overflow();
int /*<<< orphan*/ Msp430TimerCapComP__1__Timer__overflow();
int /*<<< orphan*/ Msp430TimerCapComP__2__Timer__overflow();
void Msp430TimerP__0__Timer__overflow(void) {
  Msp430CounterC__1__Msp430Timer__overflow();
  Msp430TimerCapComP__0__Timer__overflow();
  Msp430TimerCapComP__1__Timer__overflow();
  Msp430TimerCapComP__2__Timer__overflow();
}


x86 assembly (clang, -O0):
<Msp430TimerP__0__Timer__overflow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Msp430CounterC__1__Msp430Timer__overflow@plt>
mov    $0x0,%al
call   1030 <Msp430TimerCapComP__0__Timer__overflow@plt>
mov    $0x0,%al
call   1050 <Msp430TimerCapComP__1__Timer__overflow@plt>
mov    $0x0,%al
call   1060 <Msp430TimerCapComP__2__Timer__overflow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430TimerP__0__Timer__overflow>:
push   %rax
xor    %eax,%eax
call   1040 <Msp430CounterC__1__Msp430Timer__overflow@plt>
xor    %eax,%eax
call   1030 <Msp430TimerCapComP__0__Timer__overflow@plt>
xor    %eax,%eax
call   1050 <Msp430TimerCapComP__1__Timer__overflow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Msp430TimerCapComP__2__Timer__overflow@plt>

LLVM IR (-O0):
define void @Msp430TimerP__0__Timer__overflow() {
%1 = call i32 (...) @Msp430CounterC__1__Msp430Timer__overflow()
%2 = call i32 (...) @Msp430TimerCapComP__0__Timer__overflow()
%3 = call i32 (...) @Msp430TimerCapComP__1__Timer__overflow()
%4 = call i32 (...) @Msp430TimerCapComP__2__Timer__overflow()
ret void
}

LLVM IR (-O2):
define void @Msp430TimerP__0__Timer__overflow() {
%1 = tail call i32 (...) @Msp430CounterC__1__Msp430Timer__overflow()
%2 = tail call i32 (...) @Msp430TimerCapComP__0__Timer__overflow()
%3 = tail call i32 (...) @Msp430TimerCapComP__1__Timer__overflow()
%4 = tail call i32 (...) @Msp430TimerCapComP__2__Timer__overflow()
ret void
}
/* Variables and functions */
int query_add_remove(int);
int query_add_device(char **args, int num_args) { return query_add_remove(2); }


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

x86 assembly (clang, -O2):
<query_add_device>:
mov    $0x2,%edi
jmp    1030 <query_add_remove@plt>

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

LLVM IR (-O2):
define i32 @query_add_device(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 @query_add_remove(i32 2)
ret i32 %3
}
int f3(int (*p)[], int (*q)[3]) { return p > q; }


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

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

LLVM IR (-O0):
define i32 @f3([0 x i32]* %0, [3 x i32]* %1) {
%3 = alloca [0 x i32]*
%4 = alloca [3 x i32]*
store [0 x i32]* %0, [0 x i32]** %3
store [3 x i32]* %1, [3 x i32]** %4
%5 = load [0 x i32]*, [0 x i32]** %3
%6 = load [3 x i32]*, [3 x i32]** %4
%7 = bitcast [3 x i32]* %6 to [0 x i32]*
%8 = icmp ugt [0 x i32]* %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f3([0 x i32]* readnone %0, [3 x i32]* readnone %1) {
%3 = bitcast [3 x i32]* %1 to [0 x i32]*
%4 = icmp ult [0 x i32]* %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void swapint(int *x, int *y) {
  int tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
}


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

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

LLVM IR (-O0):
define void @swapint(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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swapint(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_multprec_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(498, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<clear_multprec_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f2,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_multprec_data>:
mov    $0x1f2,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_multprec_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 498, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_multprec_data() {
%1 = tail call i32 @_ada_use_c2phc(i32 498, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
float sin(float);
float sinf(float x) { return sin(x); }


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

x86 assembly (clang, -O2):
<sinf>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define float @sinf(float %0) {
%2 = tail call float @sin(float %0)
ret float %2
}
int tgetent(char *bp, const char *name) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @tgetent(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
int(_rl_digit_value)(c) int c;
{ return ((c) - '0'); }


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

x86 assembly (clang, -O2):
<_rl_digit_value>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @_rl_digit_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 48
ret i32 %4
}

LLVM IR (-O2):
define i32 @_rl_digit_value(i32 %0) {
%2 = add nsw i32 %0, -48
ret i32 %2
}
/* Type definitions */
struct tdb_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLKW;
int /*<<< orphan*/ F_WRLCK;
int _tdb_lockall(struct tdb_context *, int /*<<< orphan*/, int /*<<< orphan*/);
int ext2fs_tdb_lockall(struct tdb_context *tdb) {
  return _tdb_lockall(tdb, F_WRLCK, F_SETLKW);
}


x86 assembly (clang, -O0):
<ext2fs_tdb_lockall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
call   1030 <_tdb_lockall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_tdb_lockall>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_tdb_lockall@plt>

LLVM IR (-O0):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLKW = global i32 0
define i32 @ext2fs_tdb_lockall(%struct.tdb_context* %0) {
%2 = alloca %struct.tdb_context*
store %struct.tdb_context* %0, %struct.tdb_context** %2
%3 = load %struct.tdb_context*, %struct.tdb_context** %2
%4 = load i32, i32* @F_WRLCK
%5 = load i32, i32* @F_SETLKW
%6 = call i32 @_tdb_lockall(%struct.tdb_context* %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLKW = global i32 0
define i32 @ext2fs_tdb_lockall(%struct.tdb_context* %0) {
%2 = load i32, i32* @F_WRLCK
%3 = load i32, i32* @F_SETLKW
%4 = tail call i32 @_tdb_lockall(%struct.tdb_context* %0, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void profile_release_string(char *str) { free(str); }


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

LLVM IR (-O0):
define void @profile_release_string(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 @profile_release_string(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
char *strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *format_string(char *orig) {
  char *rn = (char *)malloc(strlen(orig) + 2 + 1);
  strcpy(rn, "'");
  strcat(strcat(rn, orig), "'");
  return rn;
}


x86 assembly (clang, -O0):
<format_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x2,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    %rax,%rdi
lea    0xe70(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x3(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movw   $0x27,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"'\00"
define i8* @format_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 2
%7 = add nsw i64 %6, 1
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i8* @strcat(i8* %12, i8* %13)
%15 = call i8* @strcat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"'\00"
define i8* @format_string(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 3
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i8* @strcat(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
%8 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%9 = getelementptr i8, i8* %5, i64 %8
%10 = bitcast i8* %9 to i16*
store i16 39, i16* %10
ret i8* %5
}
int main() {
  int i, j;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}