#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 *, char, ...);
int main(int argc, char *argv[]) {
  int k;
  int zznum;
  int sumnum;
  char mychar;
  k = 24;
  printf("Value of k = %d\n", k);
  zznum = 4;
  printf("Value of zznum = %d\n", zznum);
  printf("k, zznum = %d, %d\n", k, zznum);
  sumnum = k + zznum;
  printf("+ Total is: %d\n", sumnum);
  printf("+ Total is: %d\n", k + zznum);
  mychar = 'c';
  printf("I've set mychar equal to %c\n", mychar);
  printf("I've set mychar equal to %d\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)
movl   $0x18,-0x14(%rbp)
mov    -0x14(%rbp),%eax
lea    0xec9(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x18(%rbp)
mov    -0x18(%rbp),%eax
lea    0xebf(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%edx
lea    0xebd(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xeb3(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
lea    0xe9c(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x63,-0x1d(%rbp)
lea    0xe97(%rip),%rdi
movsbl -0x1d(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
movsbl -0x1d(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x18,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Value of k = %d\0A\00"
@.str.1 = [21 x i8] c"Value of zznum = %d\0A\00"
@.str.2 = [19 x i8] c"k, zznum = %d, %d\0A\00"
@.str.3 = [16 x i8] c"+ Total is: %d\0A\00"
@.str.4 = [29 x i8] c"I've set mychar equal to %c\0A\00"
@.str.5 = [29 x i8] c"I've set mychar equal to %d\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
store i32 24, i32* %6
%10 = load i32, i32* %6
%11 = trunc i32 %10 to i8
%12 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext %11)
store i32 4, i32* %7
%13 = load i32, i32* %7
%14 = trunc i32 %13 to i8
%15 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 signext %14)
%16 = load i32, i32* %6
%17 = trunc i32 %16 to i8
%18 = load i32, i32* %7
%19 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8 signext %17, i32 %18)
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = add nsw i32 %20, %21
store i32 %22, i32* %8
%23 = load i32, i32* %8
%24 = trunc i32 %23 to i8
%25 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8 signext %24)
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = add nsw i32 %26, %27
%29 = trunc i32 %28 to i8
%30 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8 signext %29)
store i8 99, i8* %9
%31 = load i8, i8* %9
%32 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8 signext %31)
%33 = load i8, i8* %9
%34 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8 signext %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Value of k = %d\0A\00"
@.str.1 = [21 x i8] c"Value of zznum = %d\0A\00"
@.str.2 = [19 x i8] c"k, zznum = %d, %d\0A\00"
@.str.3 = [16 x i8] c"+ Total is: %d\0A\00"
@.str.4 = [29 x i8] c"I've set mychar equal to %c\0A\00"
@.str.5 = [29 x i8] c"I've set mychar equal to %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext 24)
%4 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8 signext 4)
%5 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8 signext 24, i32 4)
%6 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8 signext 28)
%7 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8 signext 28)
%8 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8 signext 99)
%9 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8 signext 99)
ret i32 0
}