xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ many_args(int, int, int, int, int, int, int, int, int, int,
                             int, int, int, int, int, int, int, int, int, int,
                             int, int, int, int, int, int);
main() {
  many_args(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
            20, 21, 22, 23, 24, 25, 26);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x9,0x10(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0xb,0x20(%rsp)
movl   $0xc,0x28(%rsp)
movl   $0xd,0x30(%rsp)
movl   $0xe,0x38(%rsp)
movl   $0xf,0x40(%rsp)
movl   $0x10,0x48(%rsp)
movl   $0x11,0x50(%rsp)
movl   $0x12,0x58(%rsp)
movl   $0x13,0x60(%rsp)
movl   $0x14,0x68(%rsp)
movl   $0x15,0x70(%rsp)
movl   $0x16,0x78(%rsp)
movl   $0x17,0x80(%rsp)
movl   $0x18,0x88(%rsp)
movl   $0x19,0x90(%rsp)
movl   $0x1a,0x98(%rsp)
call   1030 <many_args@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0x1a
push   $0x19
push   $0x18
push   $0x17
push   $0x16
push   $0x15
push   $0x14
push   $0x13
push   $0x12
push   $0x11
push   $0x10
push   $0xf
push   $0xe
push   $0xd
push   $0xc
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
call   1030 <many_args@plt>
add    $0xa0,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @many_args(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @many_args(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26)
ret i32 0
}
int nop(struct iplist **list) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iplist = type opaque
define i32 @nop(%struct.iplist** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Atm128Rfa1SerialP__Counter__overflow();
int /*<<< orphan*/ CounterToLocalTimeC__0__Counter__overflow();
int /*<<< orphan*/ TransformAlarmC__0__Counter__overflow();
void TransformCounterC__0__Counter__overflow(void) {
  CounterToLocalTimeC__0__Counter__overflow();
  TransformAlarmC__0__Counter__overflow();
  Atm128Rfa1SerialP__Counter__overflow();
}


x86 assembly (clang, -O0):
<TransformCounterC__0__Counter__overflow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <CounterToLocalTimeC__0__Counter__overflow@plt>
mov    $0x0,%al
call   1050 <TransformAlarmC__0__Counter__overflow@plt>
mov    $0x0,%al
call   1030 <Atm128Rfa1SerialP__Counter__overflow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TransformCounterC__0__Counter__overflow>:
push   %rax
xor    %eax,%eax
call   1040 <CounterToLocalTimeC__0__Counter__overflow@plt>
xor    %eax,%eax
call   1050 <TransformAlarmC__0__Counter__overflow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Atm128Rfa1SerialP__Counter__overflow@plt>

LLVM IR (-O0):
define void @TransformCounterC__0__Counter__overflow() {
%1 = call i32 (...) @CounterToLocalTimeC__0__Counter__overflow()
%2 = call i32 (...) @TransformAlarmC__0__Counter__overflow()
%3 = call i32 (...) @Atm128Rfa1SerialP__Counter__overflow()
ret void
}

LLVM IR (-O2):
define void @TransformCounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @CounterToLocalTimeC__0__Counter__overflow()
%2 = tail call i32 (...) @TransformAlarmC__0__Counter__overflow()
%3 = tail call i32 (...) @Atm128Rfa1SerialP__Counter__overflow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Delay1TCY();
void Delay10TCYx(unsigned char unit) {
  int i;
  while (unit > 0) {
    for (i = 0; i < 10; i++) {
      Delay1TCY();
    }
    unit--;
  }
}


x86 assembly (clang, -O0):
<Delay10TCYx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jle    115e <Delay10TCYx+0x4e>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1151 <Delay10TCYx+0x41>
mov    $0x0,%al
call   1030 <Delay1TCY@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <Delay10TCYx+0x22>
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
jmp    111e <Delay10TCYx+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay10TCYx>:
push   %rbx
test   %edi,%edi
je     116b <Delay10TCYx+0x5b>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
xor    %eax,%eax
call   1030 <Delay1TCY@plt>
add    $0xff,%bl
jne    1120 <Delay10TCYx+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @Delay10TCYx(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
br label %4
4: ; preds = %17, %1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %4
store i32 0, i32* %3
br label %9
9: ; preds = %14, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = call i32 (...) @Delay1TCY()
br label %14
14: ; preds = %12
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %9
17: ; preds = %9
%18 = load i8, i8* %2
%19 = add i8 %18, -1
store i8 %19, i8* %2
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Delay10TCYx(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %17, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %15, %3 ], [ %0, %1 ]
%5 = tail call i32 (...) @Delay1TCY()
%6 = tail call i32 (...) @Delay1TCY()
%7 = tail call i32 (...) @Delay1TCY()
%8 = tail call i32 (...) @Delay1TCY()
%9 = tail call i32 (...) @Delay1TCY()
%10 = tail call i32 (...) @Delay1TCY()
%11 = tail call i32 (...) @Delay1TCY()
%12 = tail call i32 (...) @Delay1TCY()
%13 = tail call i32 (...) @Delay1TCY()
%14 = tail call i32 (...) @Delay1TCY()
%15 = add i8 %4, -1
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %3
17: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int getOp(void) {
  int input = 0;
  scanf("%d", &input);
  return input;
}


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

x86 assembly (clang, -O2):
<getOp>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @getOp() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int hwfind();
int /*<<< orphan*/ hwreset();
int /*<<< orphan*/ printf(char *, int, char *);
int findprop(char *port) {
  int version = 0;
  hwreset();
  version = hwfind();
  if (version) {
    printf("Propeller Version %d on %s\n", version, port);
  }
  return version != 0 ? 0 : 1;
}


x86 assembly (clang, -O0):
<findprop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <hwreset@plt>
mov    $0x0,%al
call   1040 <hwfind@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1171 <findprop+0x41>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findprop>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <hwreset@plt>
xor    %eax,%eax
call   1040 <hwfind@plt>
mov    %eax,%ebp
test   %eax,%eax
je     115b <findprop+0x2b>
lea    0xeaf(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Propeller Version %d on %s\0A\00"
define i32 @findprop(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = call i32 (...) @hwreset()
%5 = call i32 (...) @hwfind()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 0, i32 1
ret i32 %16
}

LLVM IR (-O2):
@.str = [28 x i8] c"Propeller Version %d on %s\0A\00"
define i32 @findprop(i8* %0) {
%2 = tail call i32 (...) @hwreset()
%3 = tail call i32 (...) @hwfind()
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %0)
br label %7
7: ; preds = %5, %1
%8 = zext i1 %4 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_cvtt_ss2si(int /*<<< orphan*/);
int test_mm_cvtt_ss2si(__m128 A) { return _mm_cvtt_ss2si(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtt_ss2si>:
jmp    1030 <_mm_cvtt_ss2si@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtt_ss2si(i32 %0) {
%2 = tail call i32 @_mm_cvtt_ss2si(i32 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ xxrealloc(int /*<<< orphan*/ *, int);
char **string_array_new(void) {
  char **data = (char **)xxrealloc(NULL, (sizeof(char *) + sizeof(size_t)));
  *data = NULL;
  size_t *length = (size_t *)data + 1;
  *length = (sizeof(char *) + sizeof(size_t));
  return data;
}


x86 assembly (clang, -O0):
<string_array_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
mov    $0x10,%esi
call   1030 <xxrealloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x10,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_array_new>:
push   %rax
xor    %edi,%edi
mov    $0x10,%esi
call   1030 <xxrealloc@plt>
movq   $0x0,(%rax)
movq   $0x10,0x8(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8** @string_array_new() {
%1 = alloca i8**
%2 = alloca i64*
%3 = call i64 @xxrealloc(i32* null, i32 16)
%4 = inttoptr i64 %3 to i8**
store i8** %4, i8*** %1
%5 = load i8**, i8*** %1
store i8* null, i8** %5
%6 = load i8**, i8*** %1
%7 = bitcast i8** %6 to i64*
%8 = getelementptr inbounds i64, i64* %7, i64 1
store i64* %8, i64** %2
%9 = load i64*, i64** %2
store i64 16, i64* %9
%10 = load i8**, i8*** %1
ret i8** %10
}

LLVM IR (-O2):
define i8** @string_array_new() {
%1 = tail call i64 @xxrealloc(i32* null, i32 16)
%2 = inttoptr i64 %1 to i8**
store i8* null, i8** %2
%3 = inttoptr i64 %1 to i64*
%4 = getelementptr inbounds i64, i64* %3, i64 1
store i64 16, i64* %4
ret i8** %2
}
int audio_rate_best_match(struct audio_info_struct *ai) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.audio_info_struct = type opaque
define i32 @audio_rate_best_match(%struct.audio_info_struct* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct message_queue {
  int dummy;
};
struct message {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __msg_enqueue(struct message_queue *, struct message *);
int /*<<< orphan*/ msg_queue_lock(struct message_queue *);
int /*<<< orphan*/ msg_queue_unlock(struct message_queue *);
void msg_enqueue(struct message_queue *q, struct message *m) {
  msg_queue_lock(q);
  __msg_enqueue(q, m);
  msg_queue_unlock(q);
}


x86 assembly (clang, -O0):
<msg_enqueue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <msg_queue_lock@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <__msg_enqueue@plt>
mov    -0x8(%rbp),%rdi
call   1030 <msg_queue_unlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_enqueue>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <msg_queue_lock@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <__msg_enqueue@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <msg_queue_unlock@plt>

LLVM IR (-O0):
%struct.message_queue = type { i32 }
%struct.message = type { i32 }
define void @msg_enqueue(%struct.message_queue* %0, %struct.message* %1) {
%3 = alloca %struct.message_queue*
%4 = alloca %struct.message*
store %struct.message_queue* %0, %struct.message_queue** %3
store %struct.message* %1, %struct.message** %4
%5 = load %struct.message_queue*, %struct.message_queue** %3
%6 = call i32 @msg_queue_lock(%struct.message_queue* %5)
%7 = load %struct.message_queue*, %struct.message_queue** %3
%8 = load %struct.message*, %struct.message** %4
%9 = call i32 @__msg_enqueue(%struct.message_queue* %7, %struct.message* %8)
%10 = load %struct.message_queue*, %struct.message_queue** %3
%11 = call i32 @msg_queue_unlock(%struct.message_queue* %10)
ret void
}

LLVM IR (-O2):
%struct.message_queue = type { i32 }
%struct.message = type { i32 }
define void @msg_enqueue(%struct.message_queue* %0, %struct.message* %1) {
%3 = tail call i32 @msg_queue_lock(%struct.message_queue* %0)
%4 = tail call i32 @__msg_enqueue(%struct.message_queue* %0, %struct.message* %1)
%5 = tail call i32 @msg_queue_unlock(%struct.message_queue* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void sleep_cpu() {
  printf("%s:%d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/"
         "mock/avr/sleep.c",
         7);
}


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

x86 assembly (clang, -O2):
<sleep_cpu>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x7,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/avr/sleep.c\00"
define void @sleep_cpu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [149 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/avr/sleep.c\00"
define void @sleep_cpu() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.1, i64 0, i64 0), i32 7)
ret void
}
double newtonSecondLaw(double force, double massGram) {
  double mass = massGram / 1000;
  double acceleration = force / mass;
  double totalTime = 5;
  double V1 = totalTime * acceleration;
  return V1;
}


x86 assembly (clang, -O0):
<newtonSecondLaw>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeed(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<newtonSecondLaw>:
divsd  0xef8(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @newtonSecondLaw(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double %1, double* %4
%9 = load double, double* %4
%10 = fdiv double %9, 1.000000e+03
store double %10, double* %5
%11 = load double, double* %3
%12 = load double, double* %5
%13 = fdiv double %11, %12
store double %13, double* %6
store double 5.000000e+00, double* %7
%14 = load double, double* %7
%15 = load double, double* %6
%16 = fmul double %14, %15
store double %16, double* %8
%17 = load double, double* %8
ret double %17
}

LLVM IR (-O2):
define double @newtonSecondLaw(double %0, double %1) {
%3 = fdiv double %1, 1.000000e+03
%4 = fdiv double %0, %3
%5 = fmul double %4, 5.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ TimerIntClear(int, int);
void timer_spwm_double_handler(void) {
  static unsigned int i = 0;
  static unsigned int temp_spwm_counter_step = 60;
  static int nflag = 0;
  TimerIntClear(0x40032000, 0x00000001);
  i++;
  if (i >= 2048) {
    i = 0;
  }
}


x86 assembly (clang, -O0):
<timer_spwm_double_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40032000,%edi
mov    $0x1,%esi
call   1030 <TimerIntClear@plt>
mov    0x2f07(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2efe(%rip)
cmpl   $0x800,0x2ef4(%rip)
jb     114c <timer_spwm_double_handler+0x3c>
movl   $0x0,0x2ee4(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_spwm_double_handler>:
push   %rax
mov    $0x40032000,%edi
mov    $0x1,%esi
call   1030 <TimerIntClear@plt>
mov    0x2f06(%rip),%eax
add    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x800,%eax
cmovb  %eax,%ecx
mov    %ecx,0x2ef3(%rip)
pop    %rax
ret

LLVM IR (-O0):
@timer_spwm_double_handler.i = internal global i32 0
@timer_spwm_double_handler.temp_spwm_counter_step = internal global i32 60
@timer_spwm_double_handler.nflag = internal global i32 0
define void @timer_spwm_double_handler() {
%1 = call i32 @TimerIntClear(i32 1073946624, i32 1)
%2 = load i32, i32* @timer_spwm_double_handler.i
%3 = add i32 %2, 1
store i32 %3, i32* @timer_spwm_double_handler.i
%4 = load i32, i32* @timer_spwm_double_handler.i
%5 = icmp uge i32 %4, 2048
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* @timer_spwm_double_handler.i
br label %7
7: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@timer_spwm_double_handler.i = internal unnamed_addr global i32 0
define void @timer_spwm_double_handler() {
%1 = tail call i32 @TimerIntClear(i32 1073946624, i32 1)
%2 = load i32, i32* @timer_spwm_double_handler.i
%3 = add i32 %2, 1
%4 = icmp ugt i32 %3, 2047
%5 = select i1 %4, i32 0, i32 %3
store i32 %5, i32* @timer_spwm_double_handler.i
ret void
}
void iwl_reset_traffic_log(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwl_reset_traffic_log(%struct.iwl_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReloadPosition(int);
void LoadPrevPositionProc() { ReloadPosition(-1); }


x86 assembly (clang, -O0):
<LoadPrevPositionProc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <ReloadPosition@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadPrevPositionProc>:
mov    $0xffffffff,%edi
jmp    1030 <ReloadPosition@plt>

LLVM IR (-O0):
define void @LoadPrevPositionProc() {
%1 = call i32 @ReloadPosition(i32 -1)
ret void
}

LLVM IR (-O2):
define void @LoadPrevPositionProc() {
%1 = tail call i32 @ReloadPosition(i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ap_str(char *);
void ap_quest(void) { ap_str("?"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"?\00"
define void @ap_quest() {
%1 = call i32 @ap_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"?\00"
define void @ap_quest() {
%1 = tail call i32 @ap_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
void setDoublePrecision() {
  unsigned short cw;
  asm("fnstcw %0" : "=m"(cw));
  cw &= ~0x300;
  cw |= 0x200;
  asm("fldcw %0" ::"m"(cw));
}


x86 assembly (clang, -O0):
<setDoublePrecision>:
push   %rbp
mov    %rsp,%rbp
fnstcw -0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xfffffcff,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
or     $0x200,%eax
mov    %ax,-0x2(%rbp)
fldcw  -0x2(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDoublePrecision>:
fnstcw -0x2(%rsp)
movzwl -0x2(%rsp),%eax
and    $0xfffffcff,%eax
or     $0x200,%eax
mov    %ax,-0x2(%rsp)
fldcw  -0x2(%rsp)
ret

LLVM IR (-O0):
define void @setDoublePrecision() {
%1 = alloca i16
%2 = load i16, i16* %1
%3 = zext i16 %2 to i32
%4 = and i32 %3, -769
%5 = trunc i32 %4 to i16
store i16 %5, i16* %1
%6 = load i16, i16* %1
%7 = zext i16 %6 to i32
%8 = or i32 %7, 512
%9 = trunc i32 %8 to i16
store i16 %9, i16* %1
ret void
}

LLVM IR (-O2):
define void @setDoublePrecision() {
%1 = alloca i16
%2 = bitcast i16* %1 to i8*
%3 = load i16, i16* %1
%4 = and i16 %3, -769
%5 = or i16 %4, 512
store i16 %5, i16* %1
ret void
}
int fibcalc(int n) {
  if (n <= 1) {
    return n;
  } else {
    return fibcalc(n - 1) + fibcalc(n - 2);
  }
}


x86 assembly (clang, -O0):
<fibcalc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1130 <fibcalc+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibcalc+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibcalc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibcalc@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibcalc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibcalc+0x10>
mov    %ebx,%ecx
jmp    1144 <fibcalc+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibcalc@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibcalc+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibcalc(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibcalc(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
int satsw(int x) {
  if (x < -32768) {
    return -32768;
  } else if (x > 32767) {
    return 32767;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<satsw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffff8000,-0x8(%rbp)
jge    1120 <satsw+0x20>
movl   $0xffff8000,-0x4(%rbp)
jmp    113f <satsw+0x3f>
cmpl   $0x7fff,-0x8(%rbp)
jle    1139 <satsw+0x39>
movl   $0x7fff,-0x4(%rbp)
jmp    113f <satsw+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<satsw>:
cmp    $0x7fff,%edi
mov    $0x7fff,%ecx
cmovl  %edi,%ecx
cmp    $0xffff8001,%ecx
mov    $0xffff8000,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @satsw(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, -32768
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -32768, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 32767
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 32767, i32* %2
br label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @satsw(i32 %0) {
%2 = icmp slt i32 %0, 32767
%3 = select i1 %2, i32 %0, i32 32767
%4 = icmp sgt i32 %3, -32768
%5 = select i1 %4, i32 %3, i32 -32768
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gpio_config(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gpio_pull(int /*<<< orphan*/, int, int);
void uart_gpio_init(void) {
  gpio_config(0, 4, (2));
  gpio_config(0, 5, (2));
  gpio_pull(0, 5, (1));
}


x86 assembly (clang, -O0):
<uart_gpio_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x1,%edx
call   1040 <gpio_pull@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_gpio_init>:
push   %rax
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x2,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x1,%edx
pop    %rax
jmp    1040 <gpio_pull@plt>

LLVM IR (-O0):
define void @uart_gpio_init() {
%1 = call i32 @gpio_config(i32 0, i32 4, i32 2)
%2 = call i32 @gpio_config(i32 0, i32 5, i32 2)
%3 = call i32 @gpio_pull(i32 0, i32 5, i32 1)
ret void
}

LLVM IR (-O2):
define void @uart_gpio_init() {
%1 = tail call i32 @gpio_config(i32 0, i32 4, i32 2)
%2 = tail call i32 @gpio_config(i32 0, i32 5, i32 2)
%3 = tail call i32 @gpio_pull(i32 0, i32 5, i32 1)
ret void
}
void glGetVertexAttribIiv(void) { return; }


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

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

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

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

/* Variables and functions */
int Xorriso_list_speeds(struct XorrisO *, int /*<<< orphan*/);
int Xorriso_option_list_speeds(struct XorrisO *xorriso, int flag) {
  int ret;
  ret = Xorriso_list_speeds(xorriso, 0);
  return (ret);
}


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

x86 assembly (clang, -O2):
<Xorriso_option_list_speeds>:
xor    %esi,%esi
jmp    1030 <Xorriso_list_speeds@plt>

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

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_list_speeds(%struct.XorrisO* %0, i32 %1) {
%3 = tail call i32 @Xorriso_list_speeds(%struct.XorrisO* %0, i32 0)
ret i32 %3
}
/* Type definitions */
struct linger {
  int l_onoff;
  scalar_t__ l_linger;
};
typedef int /*<<< orphan*/ ling;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_LINGER;
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                      struct linger *, int);
int set_rst_close(int sock) {
  struct linger ling;
  ling.l_onoff = 1;
  ling.l_linger = 0;
  if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling)) < 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<set_rst_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    -0x18(%rbp),%rcx
mov    $0x10,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    1164 <set_rst_close+0x54>
movl   $0x0,-0x4(%rbp)
jmp    116b <set_rst_close+0x5b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_rst_close>:
sub    $0x18,%rsp
movl   $0x1,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    $0x10,%r8d
call   1030 <setsockopt@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.linger = type { i32, i64 }
@SOL_SOCKET = global i32 0
@SO_LINGER = global i32 0
define i32 @set_rst_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.linger
store i32 %0, i32* %3
%5 = getelementptr inbounds %struct.linger, %struct.linger* %4, i32 0, i32 0
store i32 1, i32* %5
%6 = getelementptr inbounds %struct.linger, %struct.linger* %4, i32 0, i32 1
store i64 0, i64* %6
%7 = load i32, i32* %3
%8 = load i32, i32* @SOL_SOCKET
%9 = load i32, i32* @SO_LINGER
%10 = call i64 @setsockopt(i32 %7, i32 %8, i32 %9, %struct.linger* %4, i32 16)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.linger = type { i32, i64 }
@SOL_SOCKET = global i32 0
@SO_LINGER = global i32 0
define i32 @set_rst_close(i32 %0) {
%2 = alloca %struct.linger
%3 = bitcast %struct.linger* %2 to i8*
%4 = getelementptr inbounds %struct.linger, %struct.linger* %2, i64 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds %struct.linger, %struct.linger* %2, i64 0, i32 1
store i64 0, i64* %5
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_LINGER
%8 = call i64 @setsockopt(i32 %0, i32 %6, i32 %7, %struct.linger* %2, i32 16)
%9 = lshr i64 %8, 63
%10 = trunc i64 %9 to i32
%11 = xor i32 %10, 1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
long atol(char *);
int main() {
  if (atol("0") != 0L) {
    abort();
  }
  if (atol("1") != 1L) {
    abort();
  }
  if (atol("123456") != 123456L) {
    abort();
  }
  if (atol("-123456") != -123456L) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <atol@plt>
cmp    $0x0,%rax
je     1141 <main+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xeba(%rip),%rdi
call   1040 <atol@plt>
cmp    $0x1,%rax
je     115e <main+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xea0(%rip),%rdi
call   1040 <atol@plt>
cmp    $0x1e240,%rax
je     117d <main+0x5d>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xe80(%rip),%rdi
call   1040 <atol@plt>
cmp    $0xfffffffffffe1dc0,%rax
je     119c <main+0x7c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [7 x i8] c"123456\00"
@.str.3 = [8 x i8] c"-123456\00"
define i32 @main() {
%1 = call i64 @atol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = call i64 @atol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = call i64 @atol(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp ne i64 %11, 123456
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = call i64 @atol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp ne i64 %16, -123456
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void fus_nametable_destroy(struct fus_nametable_t *nametable) {}


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

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

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

LLVM IR (-O2):
%struct.fus_nametable_t = type opaque
define void @fus_nametable_destroy(%struct.fus_nametable_t* nocapture %0) {
ret void
}
char *strerror(errnum)
int errnum;
{
  extern char *sys_errlist[];
  extern int sys_nerr;
  if (errnum >= 0 && errnum < sys_nerr)
    return sys_errlist[errnum];
  return (char *)"Unknown error";
}


x86 assembly (clang, -O0):
<strerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     113b <strerror+0x3b>
mov    -0xc(%rbp),%eax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%eax
jge    113b <strerror+0x3b>
movslq -0xc(%rbp),%rcx
mov    0x2eca(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <strerror+0x46>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strerror>:
lea    0xef9(%rip),%rax
test   %edi,%edi
js     1123 <strerror+0x23>
mov    0x2ed6(%rip),%rcx
cmp    %edi,(%rcx)
jle    1123 <strerror+0x23>
mov    %edi,%eax
mov    0x2ed9(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [14 x i8] c"Unknown error\00"
define i8* @strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %3
%8 = load i32, i32* @sys_nerr
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %12
%14 = load i8*, i8** %13
store i8* %14, i8** %2
br label %16
15: ; preds = %6, %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %10
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@sys_nerr = external global i32
@sys_errlist = external global [0 x i8*]
@.str = [14 x i8] c"Unknown error\00"
define i8* @strerror(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = load i32, i32* @sys_nerr
%4 = icmp sgt i32 %3, %0
%5 = select i1 %2, i1 %4, i1 false
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = zext i32 %0 to i64
%8 = getelementptr inbounds [0 x i8*], [0 x i8*]* @sys_errlist, i64 0, i64 %7
%9 = load i8*, i8** %8
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
/* Variables and functions */
double convert_to_fahrenheit(int /*<<< orphan*/);
char *convert_to_fahrenheit_should_return_32_when_input_is_0() {
  double degrees = convert_to_fahrenheit(0);
  do {
    if (!(degrees == 32.0))
      return "error, fahrenheit conversion != 32";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<convert_to_fahrenheit_should_return_32_when_input_is_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <convert_to_fahrenheit@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1146 <convert_to_fahrenheit_should_return_32_when_input_is_0+0x36>
jp     1146 <convert_to_fahrenheit_should_return_32_when_input_is_0+0x36>
jmp    1156 <convert_to_fahrenheit_should_return_32_when_input_is_0+0x46>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <convert_to_fahrenheit_should_return_32_when_input_is_0+0x53>
jmp    115b <convert_to_fahrenheit_should_return_32_when_input_is_0+0x4b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_to_fahrenheit_should_return_32_when_input_is_0>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <convert_to_fahrenheit@plt>
ucomisd 0xede(%rip),%xmm0
lea    0xedf(%rip),%rax
cmovne %rax,%rbx
cmovp  %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"error, fahrenheit conversion != 32\00"
define i8* @convert_to_fahrenheit_should_return_32_when_input_is_0() {
%1 = alloca i8*
%2 = alloca double
%3 = call double @convert_to_fahrenheit(i32 0)
store double %3, double* %2
br label %4
4: ; preds = %0
%5 = load double, double* %2
%6 = fcmp oeq double %5, 3.200000e+01
br i1 %6, label %8, label %7
7: ; preds = %4
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8** %1
br label %10
8: ; preds = %4
br label %9
9: ; preds = %8
store i8* null, i8** %1
br label %10
10: ; preds = %9, %7
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [35 x i8] c"error, fahrenheit conversion != 32\00"
define i8* @convert_to_fahrenheit_should_return_32_when_input_is_0() {
%1 = tail call double @convert_to_fahrenheit(i32 0)
%2 = fcmp oeq double %1, 3.200000e+01
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int strlen(char const *);
int sstrlen(const char *String) {
  if (!String)
    return (0);
  return (strlen(String));
}


x86 assembly (clang, -O0):
<sstrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <sstrlen+0x23>
movl   $0x0,-0x4(%rbp)
jmp    113f <sstrlen+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sstrlen>:
test   %rdi,%rdi
je     111a <sstrlen+0xa>
jmp    1030 <strlen@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sstrlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ rand();
int rand_between(int x, int y) {
  return ((unsigned int)rand() % (y - x + 1)) + x;
}


x86 assembly (clang, -O0):
<rand_between>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_between>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
xor    %edx,%edx
div    %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_between(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i64 (...) @rand()
%6 = trunc i64 %5 to i32
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = add nsw i32 %9, 1
%11 = urem i32 %6, %10
%12 = load i32, i32* %3
%13 = add i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rand_between(i32 %0, i32 %1) {
%3 = tail call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = urem i32 %4, %6
%8 = add i32 %7, %0
ret i32 %8
}
int main(int argc, const char **argv, const char **envp) { return 113; }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 113
}
/* Variables and functions */
char *strcpy(int /*<<< orphan*/, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ xmalloc(scalar_t__);
char *str_copy(char *str) { return (strcpy(xmalloc(strlen(str) + 1), str)); }


x86 assembly (clang, -O0):
<str_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_copy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @str_copy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i32 @xmalloc(i64 %5)
%7 = load i8*, i8** %2
%8 = call i8* @strcpy(i32 %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @str_copy(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @xmalloc(i64 %3)
%5 = tail call i8* @strcpy(i32 %4, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ appaserver_output_error_message(char *, char *, char *);
void m(char *message) {
  appaserver_output_error_message((char *)0, message, (char *)0);
}


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

x86 assembly (clang, -O2):
<m>:
mov    %rdi,%rsi
xor    %edi,%edi
xor    %edx,%edx
jmp    1030 <appaserver_output_error_message@plt>

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

LLVM IR (-O2):
define void @m(i8* %0) {
%2 = tail call i32 @appaserver_output_error_message(i8* null, i8* %0, i8* null)
ret void
}
void cgroup_pids_cancel_fork(void) {}


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

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

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

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

/* Variables and functions */
int A_write_delimited_to(struct A *, void *, int);
int write_raw_varint32(int, void *, int);
int A_write_with_tag(struct A *_A, void *_buffer, int offset, int tag) {
  offset = write_raw_varint32((tag << 3) + 2, _buffer, offset);
  offset = A_write_delimited_to(_A, _buffer, offset);
  return offset;
}


x86 assembly (clang, -O0):
<A_write_with_tag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
shl    $0x3,%edi
add    $0x2,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write_raw_varint32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <A_write_delimited_to@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A_write_with_tag>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x2(,%rcx,8),%edi
call   1030 <write_raw_varint32@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <A_write_delimited_to@plt>

LLVM IR (-O0):
%struct.A = type { i32 }
define i32 @A_write_with_tag(%struct.A* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.A*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.A* %0, %struct.A** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = shl i32 %9, 3
%11 = add nsw i32 %10, 2
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @write_raw_varint32(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %7
%15 = load %struct.A*, %struct.A** %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @A_write_delimited_to(%struct.A* %15, i8* %16, i32 %17)
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.A = type { i32 }
define i32 @A_write_with_tag(%struct.A* %0, i8* %1, i32 %2, i32 %3) {
%5 = shl i32 %3, 3
%6 = or i32 %5, 2
%7 = tail call i32 @write_raw_varint32(i32 %6, i8* %1, i32 %2)
%8 = tail call i32 @A_write_delimited_to(%struct.A* %0, i8* %1, i32 %7)
ret i32 %8
}