#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 */

/* Variables and functions */
int get_bits_of_int_v1();
int get_bits_of_int_v2();
int get_bits_of_int_v4();
int /*<<< orphan*/ printf(char *, size_t);
int main() {
  printf("%u\n", get_bits_of_int_v1());
  printf("%u\n", get_bits_of_int_v2());
  printf("%u\n", (((size_t)(1 + (int *)0)) * 8));
  printf("%u\n", get_bits_of_int_v4());
  printf("%u\n", ((size_t)(1 + (double *)0)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_bits_of_int_v1@plt>
movslq %eax,%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <get_bits_of_int_v2@plt>
movslq %eax,%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
add    $0x4,%rsi
shl    $0x3,%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <get_bits_of_int_v4@plt>
movslq %eax,%rsi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe50(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
add    $0x8,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <get_bits_of_int_v1@plt>
movslq %eax,%rsi
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <get_bits_of_int_v2@plt>
movslq %eax,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x20,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <get_bits_of_int_v4@plt>
movslq %eax,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_bits_of_int_v1()
%3 = sext i32 %2 to i64
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = call i32 (...) @get_bits_of_int_v2()
%6 = sext i32 %5 to i64
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 mul (i64 ptrtoint (i32* getelementptr inbounds (i32, i32* null, i64 1) to i64), i64 8))
%9 = call i32 (...) @get_bits_of_int_v4()
%10 = sext i32 %9 to i64
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 ptrtoint (double* getelementptr inbounds (double, double* null, i64 1) to i64))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_bits_of_int_v1()
%2 = sext i32 %1 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = tail call i32 (...) @get_bits_of_int_v2()
%5 = sext i32 %4 to i64
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 32)
%8 = tail call i32 (...) @get_bits_of_int_v4()
%9 = sext i32 %8 to i64
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
ret i32 0
}