#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct timer_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __CPROVER_assert(int, char *);
void add_timer(struct timer_list *timer) {
  unsigned long __cil_tmp2;
  unsigned long __cil_tmp3;
  short __cil_tmp4;
  int __cil_tmp5;
  unsigned long __cil_tmp6;
  unsigned long __cil_tmp7;
  {
    {
      __cil_tmp2 = (unsigned long)timer;
      __cil_tmp3 = __cil_tmp2 + 26;
      __cil_tmp4 = *((short *)__cil_tmp3);
      __cil_tmp5 = (int)__cil_tmp4;
      __CPROVER_assert(__cil_tmp5, "Timer is initialized");
      __cil_tmp6 = (unsigned long)timer;
      __cil_tmp7 = __cil_tmp6 + 24;
      *((short *)__cil_tmp7) = (short)1;
    }
    return;
  }
}


x86 assembly (clang, -O0):
<add_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1a,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
lea    0xeb4(%rip),%rsi
call   1030 <__CPROVER_assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movw   $0x1,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_timer>:
push   %rbx
mov    %rdi,%rbx
movswl 0x1a(%rdi),%edi
lea    0xee1(%rip),%rsi
call   1030 <__CPROVER_assert@plt>
movw   $0x1,0x18(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.timer_list = type { i32 }
@.str = [21 x i8] c"Timer is initialized\00"
define void @add_timer(%struct.timer_list* %0) {
%2 = alloca %struct.timer_list*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i16
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store %struct.timer_list* %0, %struct.timer_list** %2
%9 = load %struct.timer_list*, %struct.timer_list** %2
%10 = ptrtoint %struct.timer_list* %9 to i64
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = add i64 %11, 26
store i64 %12, i64* %4
%13 = load i64, i64* %4
%14 = inttoptr i64 %13 to i16*
%15 = load i16, i16* %14
store i16 %15, i16* %5
%16 = load i16, i16* %5
%17 = sext i16 %16 to i32
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = call i32 @__CPROVER_assert(i32 %18, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%20 = load %struct.timer_list*, %struct.timer_list** %2
%21 = ptrtoint %struct.timer_list* %20 to i64
store i64 %21, i64* %7
%22 = load i64, i64* %7
%23 = add i64 %22, 24
store i64 %23, i64* %8
%24 = load i64, i64* %8
%25 = inttoptr i64 %24 to i16*
store i16 1, i16* %25
ret void
}

LLVM IR (-O2):
%struct.timer_list = type { i32 }
@.str = [21 x i8] c"Timer is initialized\00"
define void @add_timer(%struct.timer_list* %0) {
%2 = ptrtoint %struct.timer_list* %0 to i64
%3 = add i64 %2, 26
%4 = inttoptr i64 %3 to i16*
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = tail call i32 @__CPROVER_assert(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = add i64 %2, 24
%9 = inttoptr i64 %8 to i16*
store i16 1, i16* %9
ret void
}