#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 /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int k;
  int zznum;
  int sumnum;
  char mychar;
  printf("Hello World\n");
  k = 24;
  zznum = 4;
  sumnum = k + zznum;
  mychar = 'c';
  printf("Value àf k = %d\n", k);
  printf("Value of zznum = %d\n", zznum);
  printf("Value of to vars are: %d and %d\n", k, zznum);
  printf("Total is %d\n", sumnum);
  printf("mychar is %c\n", mychar);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x18,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movb   $0x63,-0x1d(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x1d(%rbp),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x18,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [18 x i8] c"Value \C3\A0f k = %d\0A\00"
@.str.2 = [21 x i8] c"Value of zznum = %d\0A\00"
@.str.3 = [33 x i8] c"Value of to vars are: %d and %d\0A\00"
@.str.4 = [13 x i8] c"Total is %d\0A\00"
@.str.5 = [14 x i8] c"mychar is %c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 24, i32* %6
store i32 4, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
store i32 %13, i32* %8
store i8 99, i8* %9
%14 = load i32, i32* %6
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %7
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %19)
%21 = load i32, i32* %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load i8, i8* %9
%24 = sext i8 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"Value \C3\A0f k = %d\0A\00"
@.str.2 = [21 x i8] c"Value of zznum = %d\0A\00"
@.str.3 = [33 x i8] c"Value of to vars are: %d and %d\0A\00"
@.str.4 = [13 x i8] c"Total is %d\0A\00"
@.str.5 = [14 x i8] c"mychar is %c\0A\00"
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 24)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 24, i32 4)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 28)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 99)
ret i32 0
}